net/cadence/macb: add support for dt phy definition

The macb driver only handle PHY description through platform_data
(macb_platform_data).
Thus, when using dt you cannot define phy properties like phy address or
phy irq pin.

This patch makes use of the of_mdiobus_register to add support for
phy device definition using dt.
A fallback to the autoscan procedure is added in case there is no phy
devices defined in dt.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: define phy available on sama5d3 mother board

This patch describe the phy used on atmel sama5d3 mother board:
 - phy address
 - phy interrupt pin

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: move 1ARM board to device tree

Add device tree definition for Ajeco 1ARM single board computer.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91: remove 1ARM non-dt board

Remove board-1arm.c.
This board is now supported using dt.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
pinctrl: at91: fix get_pullup/down function return

In PIO_PUSR and PIO_PPDSR register if a given bit is set 1 this means the
pullup/down for this pin (pin is represented as a bit position) is
disabled.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/at91-pinctrl documentation: add missing sam9x5 compatible string

Add missing "atmel,at91sam9x5-pinctrl" compatible string to the
documentation.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
pinctrl: at91: fix typos

Fix AT91_PINCTRL_DEBOUNCE_VAL dt macro typo.
Fix at91_pinctrl_mux_ops callback typos.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
pinctrl: at91: fix sam9x5 debounce/deglitch functions

Replace at91_mux_get_deglitch with at91_mux_pio3_get_deglitch when using
sam9x5 (pio3) IP.
at91_mux_get_deglitch only test the activation of the "Input Filter" which
may be overloaded by the activation of the "Input Filter Slow Clock" to use
the input filter as a debounce filter instead of a deglitch filter.

Fix at91_mux_pio3_get_debounce to test the activation of the Input Filter
before testing the activation of the debounce filter (Input Filter Slow
Clock depends on Input Filter).

Fix at91_mux_pio3_set_debounce function to avoid disabling the deglitch
filter ("Input Filter") when debounce filter is disabled.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
pinctrl: at91: improve pinconf_set/get function robustness

Reset caller's config variable before setting current config flags to avoid
wrong config return.

DEBOUNCE and DEGLITCH options are mutually excluse. Return an error if they
are both defined in the config.
Do not call set_deglitch if DEBOUNCE is enabled to avoid reseting the IFSR
register (which will result in disabling the debounce filter).

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
pinctrl: at91: check for debounce time conflicts

On sam9x5 (pio3) PIO controller the debounce time config is shared across
all the pins of a given PIO bank (PIOA, PIOB, ...).

This patch adds checks before applying debounce config on a given pin.
If the pinctrl core tries to configure a debounce time on a given pin and
another pin on the same bank is already configured with a different
debounce time, the pin config with fail with -EINVAL.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
pinctrl: at91: add support for OUTPUT config

Add support for pin output control through the pinctrl config:
 - support enabling/disabling output on a given pin
 - support output level setting (high or low)

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: rm9200: add spi0 chip select pins definitions

Add spi0 cs pins definitions.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add ethernet phy to at91rm9200ek board

Add ethernet phy node in at91rm9200ek.dts.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add usb1 vbus and pullup pins

Add vbus and pullup pinctrl definitions.
Request the vbus and pullup pins in usb1 node.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add atmel,pullup-gpio to at91rm9200ek usb1 definition

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add mmc0 slot0 support to at91rm9200ek board

Add slot0 of mmc0 pinctrl pins definitions:
 - detect pin
 - write protect pin
 - enable slot0 pin: this pin is connected to an external switch which
   enable mmc0 slot0 or spi dataflash connected to cs3

The mmc0 device is not enabled, as it depends on the choosen functionnality
(spi cs3 or mmc0 slot0).

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add spi0 support to at91rm9200ek board

Add spi0 cs3 switch pinctrl pin definitions: this pin is used to select
between mmc0 slot0 and spi dataflash connected to cs3.

Enable spi0 controller and define the mtd_dataflash connected to cs0.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add i2c devices connected to at91rm9200ek board

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add new at91rm9200ek_mmc board

Add a new at91rm9200ek_mmc board which enables the slot0 connected to mmc0.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: add new at91rm9200ek_dataflash board

Add a new at91rm9200ek_dataflash board (based on at91rm9200ek board) which
enables dataflash connected to cs3 of spi0.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>