ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller

Allwinner A20/A31 SoCs have special registers to control / (un)mask /
acknowledge NMI. This NMI controller is separated and independent from GIC.
This patch adds a new irqchip to manage NMI.

Signed-off-by: Carlo Caione <carlo@caione.org>
ARM: sun7i/sun6i: dts: Add NMI irqchip support

This patch adds DTS entries for NMI controller as child of GIC.

Signed-off-by: Carlo Caione <carlo@caione.org>
ARM: sun7i/sun6i: irqchip: Update the documentation

Added documentation for NMI irqchip.

Signed-off-by: Carlo Caione <carlo@caione.org>
mfd: AXP20x: Add mfd driver for AXP20x PMIC

This patch introduces the preliminary support for PMICs X-Powers AXP202
and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit)
used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company
of Allwinner.

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

Signed-off-by: Carlo Caione <carlo@caione.org>
mfd: AXP20x: Add bindings documentation

Bindings documentation for the AXP20x driver. In this file also two
sub-nodes (PEK and regulators) are documented.

Signed-off-by: Carlo Caione <carlo@caione.org>
input: misc: Add driver for AXP20x Power Enable Key

This patch add support for the Power Enable Key found on MFD AXP202 and
AXP209. Besides the basic support for the button, the driver adds two
entries in sysfs to configure the time delay for power on/off.

Signed-off-by: Carlo Caione <carlo@caione.org>
input: misc: Add ABI docs for AXP20x PEK

Add ABI entries for the PEK found on PMU X-Powers AXP202 and AXP209.

Signed-off-by: Carlo Caione <carlo@caione.org>
regulator: AXP20x: Add support for regulators subsystem

AXP202 and AXP209 come with two synchronous step-down DC-DCs and five
LDOs. This patch introduces basic support for those regulators.

Signed-off-by: Carlo Caione <carlo@caione.org>
ARM: sun4i: dt: Add address- and size-cells info to i2c controller nodes

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun5i: dt: Add address- and size-cells info to i2c controller nodes

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun7i: dt: Add address- and size-cells info to i2c controller nodes

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sunxi: dt: Add x-powers-axp209.dtsi file

This dtsi describes the axp209 PMIC, and is to be included from inside
the i2c controller node to which the axp209 is connected.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun7i: dt: Add AXP209 support to the cubieboard2

AXP209 is the PMU used by Cubieboard2. This patch enables the AXP209
support in the dts file.

This patch requires: "ARM: sun7i/sun6i: irqchip: Add irqchip driver for
NMI controller"

Signed-off-by: Carlo Caione <carlo@caione.org>
ARM: sun4i: dt: Add AXP209 support to various boards

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun7i: dt: Add AXP209 support to cubietruck

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
clk: sunxi: Remove calls to clk_put

Callers of clk_put must disable the clock first. This also means that as long
as the clock is enabled the driver should hold a reference to that clock.
Hence, the call to clk_put here are bogus and should be removed.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
ARM: sunxi: Split out the various machines into separate files

This will allow to add per-SoC hooks more easily.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
ARM: sunxi: Move the clock protection to machine hooks

Since we start to have a lot of clocks to protect, some of them in a few boards
only, it becomes difficult to handle the clock protection without having to add
per machine exceptions.

Move these where they belong, in the machine definition code.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
ARM: sun6i: Protect CPU clock

Right now, AHB is an indirect child clock of the CPU clock. If that happens to
change, since the CPU clock has no other consumers declared in Linux, it would
be shut down, which is not really a good idea.

Prevent this by forcing it enabled.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
ARM: sun6i: Protect SDRAM gating bit

Prevent the SDRAM controller from being gated by force-enabling it in the
machine code.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>