ARM: dts: sun9i: Add mmc module clock nodes for A80

The mmc module clocks are A80 specific module 0 (storage) type clocks.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
clk: sunxi: Add driver for A80 MMC config clocks/resets

On the A80 SoC, the 4 mmc controllers each have a separate register
controlling their register access clocks and reset controls. These
registers in turn share a ahb clock gate and reset control.

This patch adds a platform device driver for these controls. It
requires both clocks and reset controls to be available, so using
CLK_OF_DECLARE might not be the best way.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun9i: Add clock-indices property for bus gate clocks

of_clk_get_parent_name() uses the clock-indices property to resolve
clock phandle arguments in case that the argument index does not
match the clock-output-names sequence.

This is the case on sunxi, where we use the actual bit index as the
argument to the phandle. Add the clock-indices property so that
of_clk_get_parent_name() resolves the names correctly.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun9i: Add mmc config clock nodes

Add the device tree nodes for the mmc config clock nodes.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun9i: Add mmc controller nodes to the A80 dtsi

The A80 has 4 mmc controllers.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: sun9i: Add pinmux setting for mmc0

mmc0 is only available on port F, and is always used with a 4 bit wide
bus for the onboard micro-sd slot.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: sun9i: Enable mmc0 on A80 Optimus Board

Enable the micro-sd slot on the A80 Optimus Board, which is connected to
mmc0. This adds the card-detect gpio and enables mmc0.

This patch also adds a 3V fixed regulator, which is the default I/O
voltage level.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: sun9i: Add pinmux settings for mmc2

mmc2 is available on port C. Add a pinmux setting for usual 4 bit
wide bus, as well as one with the 4 extra pins for 8 bit wide bus.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ARM: dts: sun9i: Enable mmc2 on A80 Optimus Board

The A80 Optimus Board has a 16GB eMMC connected to mmc2, with 8 bit
wide data bus.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
fixup! clk: sunxi: Add driver for A80 MMC config clocks/resets

Use one driver/device for all the clocks/resets.
fixup! ARM: dts: sun9i: Add mmc config clock nodes

Merge mmc config clock nodes into one.
fixup! ARM: dts: sun9i: Add mmc controller nodes to the A80 dtsi

mmc config clock nodes merged.