regulator: AXP20x: fix wrong call to of_find_node_by_name

The of_find_node_by_name function will search for a DT node named
"regulators" after the provided np node, but will not ensure that this node
is a child of np.
This might result in retrieving a "regulators" node that is not related to
the axp20x PMIC.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
mfd-core: Don't register supplies from add_device, add register_supply_aliases()

We cannot register supply alias in mfd_add_device before calling
platform_add_device, for 2 reasons:
1) devm resources may not be registered before the (platform) drivers probe
   method runs
2) The platform-dev's name must be set before registering the aliases which
   happens from platform_add_device.

So stop registering supply aliases from mfd_add_device, and add a
mfd_register_supply_aliases helper functions for the cell's plaform driver
probe method to use.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
regulator/axp20x: Call mfd_register_supply_aliases

The mfd-core no longer registers the supply aliases, instead the platform
driver probe method must now call mfd_register_supply_aliases().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arizona-mfd-codecs: Add mfd_register_supply_aliases() calls

The mfd-core no longer registers the supply aliases, instead the platform
driver probe method must now call mfd_register_supply_aliases().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sunxi: Add documentation for sunxi consumer infrared devices

This patch adds documentation for Device-Tree bindings for sunxi IR
controller.

Signed-off-by: Alexander Bersenev <bay@hackerdom.ru>
Signed-off-by: Alexsey Shestacov <wingrime@linux-sunxi.org>
rc: add sunxi-ir driver

This patch adds driver for sunxi IR controller.
It is based on Alexsey Shestacov's work based on the original driver
supplied by Allwinner.

Signed-off-by: Alexander Bersenev <bay@hackerdom.ru>
Signed-off-by: Alexsey Shestacov <wingrime@linux-sunxi.org>
ARM: sunxi: Add IR controller support in DT on A20

This patch adds IR controller in A20 Device-Tree:
- Two IR devices found in A20 user manual
- Pins for two devices
- One IR device physically found on Cubieboard 2
- One IR device physically found on Cubietruck

Signed-off-by: Alexander Bersenev <bay@hackerdom.ru>
Signed-off-by: Alexsey Shestacov <wingrime@linux-sunxi.org>
mfd: add support for sun6i PRCM (Power/Reset/Clock Management) unit

The PRCM (Power/Reset/Clock Management) block exposes several subdevices
in different subsystems (clk, reset ...)

Add basic support for the PRCM unit with clk (AR100, AHB0, and APB0 clks)
and reset controller subdevices.

Other subdevices might be added later (if needed).

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
mfd: sun6i-prcm: document DT bindings

Document DT bindings of the PRCM (Power/Reset/Clock Management) unit.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support

The PRCM (Power/Reset/Clock Management) unit provides several clock
devices:
- AR100 clk: used to clock the Power Management co-processor
- AHB0 clk: used to clock the AHB0 bus
- APB0 clk and gates: used to clk peripherals connected to the APB0 bus

Add support for these clks in a separate driver so that they can be probed
as platform devices instead of registered during early init.
This is needed to be able to probe PRCM MFD subdevices.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
clk: sunxi: document PRCM clock compatible strings

Document new compatible strings for clock provided by the PRCM
(Power/Reset/Clock Management) unit.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
ARM: sunxi: select MFD_SUN6I_PRCM when sun6i arch support is enabled

Select the MFD_SUN6I_PRCM option when sun6i arch is enabled in order to get
the PRCM (Power/Reset/Clock Management) related drivers compiled.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
ARM: dts: sun7i: cubietruck: set mmc3 bus-width property

bus-width defaults to 1, and all 4 lines are hooked up at the cubietruck,
properly set bus-width to 4.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: dts: sun7i: Add new i12-tvbox board

The i12 tvbox is an A20 based android tvbox, with 512M / 1G RAM, 4G nand flash,
ap6210 or ap6330 sdio wifi + bt (broadcom sdio wifi + uart attached brcm bt),
2USB host ports using USB-A receptacles and a micro-usb receptacle for USB OTG,
and 100Mbit ethernet using an IP101a phy.

The PCB is labelled i12-a20 hence I've named the board i12-a20. It is used
in noname allwinner A20 tv-boxes, which are sometimes sold with Q5 or
QT840A as product name.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: dts: sun7i: iv12-tvbox: Add axp209

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
dt: bindings: add bindings for Broadcom bcm43xx sdio devices

The Broadcom bcm43xx sdio devices are fullmac devices that may be
integrated in ARM platforms. Currently, the brcmfmac driver for
these devices support use of platform data. This patch specifies
the bindings that allow this platform data to be expressed in the
devicetree.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---8<-----------------------------------------------------
Currently the platform data also holds alignment requirements and
broke sg indication but those do not really characterize the device
so I did not include those.
brcmfmac: add device tree support for SDIO devices

brcmfmac devices can use an out-of-band interrupt on a GPIO line.
Currently this is specified using platform data. Add support for
specifying out-of-band interrupt via device tree.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
[arend@broadcom.com: conditionalize more of-code, use driver debug routines]
Signed-off-by: Arend van Spriel <arend@broadcom.com>
debug
wip