Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 02:45:38 +0000 (18:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 02:45:38 +0000 (18:45 -0800)
Pull ARM SoC DT updates from Olof Johansson:
 "DT and DT-conversion-related changes for various ARM platforms.  Most
  of these are to enable various devices on various boards, etc, and not
  necessarily worth enumerating.

  New boards and systems continue to come in as new devicetree files
  that don't require corresponding C changes any more, which is
  indicating that the system is starting to work fairly well.

  A few things worth pointing out:

   * ST Ericsson ux500 platforms have made the major push to move over
     to fully support the platform with DT
   * Renesas platforms continue their conversion over from legacy
     platform devices to DT-based for hardware description"

* tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (327 commits)
  ARM: dts: SiRF: add pin group for USP0 with only RX or TX frame sync
  ARM: dts: SiRF: add lost usp1_uart_nostreamctrl pin group for atlas6
  ARM: dts: sirf: add lost minigpsrtc device node
  ARM: dts: sirf: add clock, frequence-voltage table for CPU0
  ARM: dts: sirf: add lost bus_width, clock and status for sdhci
  ARM: dts: sirf: add lost clocks for cphifbg
  ARM: dts: socfpga: add pl330 clock
  ARM: dts: socfpga: update L2 tag and data latency
  arm: sun7i: cubietruck: Enable the i2c controllers
  ARM: dts: add support for EXYNOS4412 based TINY4412 board
  ARM: dts: Add initial support for Arndale Octa board
  ARM: bcm2835: add USB controller to device tree
  ARM: dts: MSM8974: Add MMIO architected timer node
  ARM: dts: MSM8974: Add restart node
  ARM: dts: sun7i: external clock outputs
  ARM: dts: sun7i: Change 32768 Hz oscillator node name to clk@N style
  ARM: dts: sun7i: Add pin muxing options for clock outputs
  ARM: dts: sun7i: Add rtp controller node
  ARM: dts: sun5i: Add rtp controller node
  ARM: dts: sun4i: Add rtp controller node
  ...

17 files changed:
1  2 
Documentation/devicetree/bindings/arm/atmel-at91.txt
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/armada-370-xp.dtsi
arch/arm/boot/dts/exynos5250.dtsi
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/sun5i-a10s.dtsi
arch/arm/boot/dts/sun5i-a13.dtsi
arch/arm/boot/dts/sun6i-a31.dtsi
arch/arm/boot/dts/sun7i-a20.dtsi
arch/arm/boot/dts/tegra20-colibri-512.dtsi
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-shmobile/clock-r8a7778.c
arch/arm/mach-shmobile/clock-r8a7790.c
arch/arm/mach-ux500/board-mop500-audio.c
arch/arm/mach-ux500/setup.h
drivers/clocksource/nomadik-mtu.c
drivers/pinctrl/pinctrl-nomadik.c

index 78530e621a1ea8fa89f6b000f1bf8b678424adb2,d2170e780f0bc431c89b181fd7369e930003b115..16f60b41c14722893584faf3e60148e2edb56f39
@@@ -20,10 -20,6 +20,10 @@@ TC/TCLIB Timer required properties
  - interrupts: Should contain all interrupts for the TC block
    Note that you can specify several interrupt cells if the TC
    block has one interrupt per channel.
 +- clock-names: tuple listing input clock names.
 +      Required elements: "t0_clk"
 +      Optional elements: "t1_clk", "t2_clk"
 +- clocks: phandles to input clocks.
  
  Examples:
  
@@@ -32,8 -28,6 +32,8 @@@ One interrupt per TC block
                compatible = "atmel,at91rm9200-tcb";
                reg = <0xfff7c000 0x100>;
                interrupts = <18 4>;
 +              clocks = <&tcb0_clk>;
 +              clock-names = "t0_clk";
        };
  
  One interrupt per TC channel in a TC block:
@@@ -41,8 -35,6 +41,8 @@@
                compatible = "atmel,at91rm9200-tcb";
                reg = <0xfffdc000 0x100>;
                interrupts = <26 4 27 4 28 4>;
 +              clocks = <&tcb1_clk>;
 +              clock-names = "t0_clk";
        };
  
  RSTC Reset Controller required properties:
@@@ -58,7 -50,8 +58,8 @@@ Example
        };
  
  RAMC SDRAM/DDR Controller required properties:
- - compatible: Should be "atmel,at91sam9260-sdramc",
+ - compatible: Should be "atmel,at91rm9200-sdramc",
+                       "atmel,at91sam9260-sdramc",
                        "atmel,at91sam9g45-ddramc",
  - reg: Should contain registers location and length
    For at91sam9263 and at91sam9g45 you must specify 2 entries.
index 91896a3f703ad5a9ccafa903d77a3476baaa250a,21fdbbe203908da073aab6b98bd84bf191a65fe2..faa38bcc70017d43df287ca98e66947257a189cb
@@@ -6,7 -6,6 +6,7 @@@ dtb-$(CONFIG_ARCH_AT91) += at91rm9200ek
  dtb-$(CONFIG_ARCH_AT91) += mpa1600.dtb
  # sam9260
  dtb-$(CONFIG_ARCH_AT91) += animeo_ip.dtb
 +dtb-$(CONFIG_ARCH_AT91) += at91-qil_a9260.dtb
  dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb
  dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb
  dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb
@@@ -31,6 -30,7 +31,7 @@@ dtb-$(CONFIG_ARCH_AT91) += pm9g45.dt
  dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb
  # sam9x5
  dtb-$(CONFIG_ARCH_AT91) += at91-ariag25.dtb
+ dtb-$(CONFIG_ARCH_AT91) += at91-cosino_mega2560.dtb
  dtb-$(CONFIG_ARCH_AT91) += at91sam9g15ek.dtb
  dtb-$(CONFIG_ARCH_AT91) += at91sam9g25ek.dtb
  dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb
@@@ -41,14 -41,13 +42,16 @@@ dtb-$(CONFIG_ARCH_AT91)    += sama5d31ek.d
  dtb-$(CONFIG_ARCH_AT91)       += sama5d33ek.dtb
  dtb-$(CONFIG_ARCH_AT91)       += sama5d34ek.dtb
  dtb-$(CONFIG_ARCH_AT91)       += sama5d35ek.dtb
+ dtb-$(CONFIG_ARCH_AT91)       += sama5d36ek.dtb
  dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
  dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm11351-brt.dtb \
        bcm28155-ap.dtb
  dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
 +dtb-$(CONFIG_ARCH_BERLIN) += \
 +      berlin2-sony-nsz-gs7.dtb        \
 +      berlin2cd-google-chromecast.dtb
  dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \
        da850-evm.dtb
  dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
@@@ -56,7 -55,6 +59,7 @@@
        dove-d2plug.dtb \
        dove-d3plug.dtb \
        dove-dove-db.dtb
 +dtb-$(CONFIG_ARCH_EFM32) += efm32gg-dk3750.dtb
  dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
        exynos4210-smdkv310.dtb \
        exynos4210-trats.dtb \
        exynos4412-odroidx.dtb \
        exynos4412-origen.dtb \
        exynos4412-smdk4412.dtb \
+       exynos4412-tiny4412.dtb \
        exynos4412-trats2.dtb \
        exynos5250-arndale.dtb \
        exynos5250-smdk5250.dtb \
        exynos5250-snow.dtb \
+       exynos5420-arndale-octa.dtb \
        exynos5420-smdk5420.dtb \
        exynos5440-sd5v1.dtb \
        exynos5440-ssdk5440.dtb
 +dtb-$(CONFIG_ARCH_HI3xxx) += hi3620-hi4511.dtb
  dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
        ecx-2000.dtb
  dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
@@@ -91,11 -90,13 +96,13 @@@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
        kirkwood-iomega_ix2_200.dtb \
        kirkwood-is2.dtb \
        kirkwood-km_kirkwood.dtb \
+       kirkwood-laplug.dtb \
        kirkwood-lschlv2.dtb \
        kirkwood-lsxhl.dtb \
        kirkwood-mplcec4.dtb \
        kirkwood-mv88f6281gtw-ge.dtb \
        kirkwood-netgear_readynas_duo_v2.dtb \
+       kirkwood-netgear_readynas_nv+_v2.dtb \
        kirkwood-ns2.dtb \
        kirkwood-ns2lite.dtb \
        kirkwood-ns2max.dtb \
        kirkwood-ts219-6281.dtb \
        kirkwood-ts219-6282.dtb
  dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
+ dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
  dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
        qcom-msm8960-cdp.dtb
  dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
        armada-xp-axpwifiap.dtb \
        armada-xp-db.dtb \
        armada-xp-gp.dtb \
+       armada-xp-netgear-rn2120.dtb \
        armada-xp-matrix.dtb \
        armada-xp-openblocks-ax3-4.dtb
  dtb-$(CONFIG_ARCH_MXC) += \
@@@ -261,6 -264,7 +270,7 @@@ dtb-$(CONFIG_ARCH_SUNXI) += 
        sun4i-a10-hackberry.dtb \
        sun5i-a10s-olinuxino-micro.dtb \
        sun5i-a13-olinuxino.dtb \
+       sun5i-a13-olinuxino-micro.dtb \
        sun6i-a31-colombus.dtb \
        sun7i-a20-cubieboard2.dtb \
        sun7i-a20-cubietruck.dtb \
index 80ffacd128f828be3439ddc9b52f7139db6471e4,b6b253924893fffb88b21e7271653d5eb690d56e..74b5964430ac3a7d833d8fce12eb655746acba4b
                        #size-cells = <1>;
                        ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
  
-                       mbusc: mbus-controller@20000 {
-                               compatible = "marvell,mbus-controller";
-                               reg = <0x20000 0x100>, <0x20180 0x20>;
+                       rtc@10300 {
+                               compatible = "marvell,orion-rtc";
+                               reg = <0x10300 0x20>;
+                               interrupts = <50>;
                        };
  
-                       mpic: interrupt-controller@20000 {
-                               compatible = "marvell,mpic";
-                               #interrupt-cells = <1>;
-                               #size-cells = <1>;
-                               interrupt-controller;
-                               msi-controller;
+                       spi0: spi@10600 {
+                               compatible = "marvell,orion-spi";
+                               reg = <0x10600 0x28>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <0>;
+                               interrupts = <30>;
+                               clocks = <&coreclk 0>;
+                               status = "disabled";
                        };
  
-                       coherency-fabric@20200 {
-                               compatible = "marvell,coherency-fabric";
-                               reg = <0x20200 0xb0>, <0x21010 0x1c>;
+                       spi1: spi@10680 {
+                               compatible = "marvell,orion-spi";
+                               reg = <0x10680 0x28>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               cell-index = <1>;
+                               interrupts = <92>;
+                               clocks = <&coreclk 0>;
+                               status = "disabled";
+                       };
+                       i2c0: i2c@11000 {
+                               compatible = "marvell,mv64xxx-i2c";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               interrupts = <31>;
+                               timeout-ms = <1000>;
+                               clocks = <&coreclk 0>;
+                               status = "disabled";
+                       };
+                       i2c1: i2c@11100 {
+                               compatible = "marvell,mv64xxx-i2c";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               interrupts = <32>;
+                               timeout-ms = <1000>;
+                               clocks = <&coreclk 0>;
+                               status = "disabled";
                        };
  
                        serial@12000 {
                                clock-output-names = "nand";
                        };
  
+                       mbusc: mbus-controller@20000 {
+                               compatible = "marvell,mbus-controller";
+                               reg = <0x20000 0x100>, <0x20180 0x20>;
+                       };
+                       mpic: interrupt-controller@20000 {
+                               compatible = "marvell,mpic";
+                               #interrupt-cells = <1>;
+                               #size-cells = <1>;
+                               interrupt-controller;
+                               msi-controller;
+                       };
+                       coherency-fabric@20200 {
+                               compatible = "marvell,coherency-fabric";
+                               reg = <0x20200 0xb0>, <0x21010 0x1c>;
+                       };
                        timer@20300 {
                                reg = <0x20300 0x30>, <0x21040 0x30>;
                                interrupts = <37>, <38>, <39>, <40>, <5>, <6>;
                        };
  
-                       sata@a0000 {
-                               compatible = "marvell,armada-370-sata";
-                               reg = <0xa0000 0x5000>;
-                               interrupts = <55>;
-                               clocks = <&gateclk 15>, <&gateclk 30>;
-                               clock-names = "0", "1";
+                       usb@50000 {
+                               compatible = "marvell,orion-ehci";
+                               reg = <0x50000 0x500>;
+                               interrupts = <45>;
                                status = "disabled";
                        };
  
-                       mdio {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               compatible = "marvell,orion-mdio";
-                               reg = <0x72004 0x4>;
+                       usb@51000 {
+                               compatible = "marvell,orion-ehci";
+                               reg = <0x51000 0x500>;
+                               interrupts = <46>;
+                               status = "disabled";
                        };
  
                        eth0: ethernet@70000 {
                                status = "disabled";
                        };
  
+                       mdio {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "marvell,orion-mdio";
+                               reg = <0x72004 0x4>;
+                       };
                        eth1: ethernet@74000 {
                                compatible = "marvell,armada-370-neta";
                                reg = <0x74000 0x4000>;
                                status = "disabled";
                        };
  
-                       i2c0: i2c@11000 {
-                               compatible = "marvell,mv64xxx-i2c";
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               interrupts = <31>;
-                               timeout-ms = <1000>;
-                               clocks = <&coreclk 0>;
+                       sata@a0000 {
 -                              compatible = "marvell,orion-sata";
++                              compatible = "marvell,armada-370-sata";
+                               reg = <0xa0000 0x5000>;
+                               interrupts = <55>;
+                               clocks = <&gateclk 15>, <&gateclk 30>;
+                               clock-names = "0", "1";
                                status = "disabled";
                        };
  
-                       i2c1: i2c@11100 {
-                               compatible = "marvell,mv64xxx-i2c";
+                       nand@d0000 {
+                               compatible = "marvell,armada370-nand";
+                               reg = <0xd0000 0x54>;
                                #address-cells = <1>;
-                               #size-cells = <0>;
-                               interrupts = <32>;
-                               timeout-ms = <1000>;
-                               clocks = <&coreclk 0>;
+                               #size-cells = <1>;
+                               interrupts = <113>;
+                               clocks = <&coredivclk 0>;
                                status = "disabled";
                        };
  
-                       rtc@10300 {
-                               compatible = "marvell,orion-rtc";
-                               reg = <0x10300 0x20>;
-                               interrupts = <50>;
-                       };
                        mvsdio@d4000 {
                                compatible = "marvell,orion-sdio";
                                reg = <0xd4000 0x200>;
                                cap-mmc-highspeed;
                                status = "disabled";
                        };
-                       usb@50000 {
-                               compatible = "marvell,orion-ehci";
-                               reg = <0x50000 0x500>;
-                               interrupts = <45>;
-                               status = "disabled";
-                       };
-                       usb@51000 {
-                               compatible = "marvell,orion-ehci";
-                               reg = <0x51000 0x500>;
-                               interrupts = <46>;
-                               status = "disabled";
-                       };
-                       spi0: spi@10600 {
-                               compatible = "marvell,orion-spi";
-                               reg = <0x10600 0x28>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               cell-index = <0>;
-                               interrupts = <30>;
-                               clocks = <&coreclk 0>;
-                               status = "disabled";
-                       };
-                       spi1: spi@10680 {
-                               compatible = "marvell,orion-spi";
-                               reg = <0x10680 0x28>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               cell-index = <1>;
-                               interrupts = <92>;
-                               clocks = <&coreclk 0>;
-                               status = "disabled";
-                       };
                };
        };
  
index 6feaa1c454fae8783b7fe320a3d5a5b5d0ab5444,c341e55205cd4524ee6302741fe7e087a1a5fb31..587dd3e36f6c32d0173a317854f8ac2a3330347b
                gsc1 = &gsc_1;
                gsc2 = &gsc_2;
                gsc3 = &gsc_3;
-               mshc0 = &dwmmc_0;
-               mshc1 = &dwmmc_1;
-               mshc2 = &dwmmc_2;
-               mshc3 = &dwmmc_3;
+               mshc0 = &mmc_0;
+               mshc1 = &mmc_1;
+               mshc2 = &mmc_2;
+               mshc3 = &mmc_3;
                i2c0 = &i2c_0;
                i2c1 = &i2c_1;
                i2c2 = &i2c_2;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c0_bus>;
+               status = "disabled";
        };
  
        i2c_1: i2c@12C70000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c1_bus>;
+               status = "disabled";
        };
  
        i2c_2: i2c@12C80000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c2_bus>;
+               status = "disabled";
        };
  
        i2c_3: i2c@12C90000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c3_bus>;
+               status = "disabled";
        };
  
        i2c_4: i2c@12CA0000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c4_bus>;
+               status = "disabled";
        };
  
        i2c_5: i2c@12CB0000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c5_bus>;
+               status = "disabled";
        };
  
        i2c_6: i2c@12CC0000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c6_bus>;
+               status = "disabled";
        };
  
        i2c_7: i2c@12CD0000 {
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c7_bus>;
+               status = "disabled";
        };
  
        i2c_8: i2c@12CE0000 {
                #size-cells = <0>;
                clocks = <&clock 302>;
                clock-names = "i2c";
+               status = "disabled";
        };
  
        i2c@121D0000 {
                  #size-cells = <0>;
                clocks = <&clock 288>;
                clock-names = "i2c";
+               status = "disabled";
        };
  
        spi_0: spi@12d20000 {
                compatible = "samsung,exynos4210-spi";
+               status = "disabled";
                reg = <0x12d20000 0x100>;
                interrupts = <0 66 0>;
                dmas = <&pdma0 5
  
        spi_1: spi@12d30000 {
                compatible = "samsung,exynos4210-spi";
+               status = "disabled";
                reg = <0x12d30000 0x100>;
                interrupts = <0 67 0>;
                dmas = <&pdma1 5
  
        spi_2: spi@12d40000 {
                compatible = "samsung,exynos4210-spi";
+               status = "disabled";
                reg = <0x12d40000 0x100>;
                interrupts = <0 68 0>;
                dmas = <&pdma0 7
                pinctrl-0 = <&spi2_bus>;
        };
  
-       dwmmc_0: dwmmc0@12200000 {
+       mmc_0: mmc@12200000 {
+               compatible = "samsung,exynos5250-dw-mshc";
+               interrupts = <0 75 0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
                reg = <0x12200000 0x1000>;
                clocks = <&clock 280>, <&clock 139>;
                clock-names = "biu", "ciu";
+               fifo-depth = <0x80>;
+               status = "disabled";
        };
  
-       dwmmc_1: dwmmc1@12210000 {
+       mmc_1: mmc@12210000 {
+               compatible = "samsung,exynos5250-dw-mshc";
+               interrupts = <0 76 0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
                reg = <0x12210000 0x1000>;
                clocks = <&clock 281>, <&clock 140>;
                clock-names = "biu", "ciu";
+               fifo-depth = <0x80>;
+               status = "disabled";
        };
  
-       dwmmc_2: dwmmc2@12220000 {
+       mmc_2: mmc@12220000 {
+               compatible = "samsung,exynos5250-dw-mshc";
+               interrupts = <0 77 0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
                reg = <0x12220000 0x1000>;
                clocks = <&clock 282>, <&clock 141>;
                clock-names = "biu", "ciu";
+               fifo-depth = <0x80>;
+               status = "disabled";
        };
  
-       dwmmc_3: dwmmc3@12230000 {
+       mmc_3: mmc@12230000 {
                compatible = "samsung,exynos5250-dw-mshc";
                reg = <0x12230000 0x1000>;
                interrupts = <0 78 0>;
                #size-cells = <0>;
                clocks = <&clock 283>, <&clock 142>;
                clock-names = "biu", "ciu";
+               fifo-depth = <0x80>;
+               status = "disabled";
        };
  
        i2s0: i2s@03830000 {
                };
        };
  
+       pwm: pwm@12dd0000 {
+               compatible = "samsung,exynos4210-pwm";
+               reg = <0x12dd0000 0x100>;
+               samsung,pwm-outputs = <0>, <1>, <2>, <3>;
+               #pwm-cells = <3>;
+               clocks = <&clock 311>;
+               clock-names = "timers";
+       };
        amba {
                #address-cells = <1>;
                #size-cells = <1>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x10800000 0x1000>;
                        interrupts = <0 33 0>;
 -                      clocks = <&clock 271>;
 +                      clocks = <&clock 346>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
index 9987dd0e9c599929042b1ce70d4b1d6c3ec1ebfb,a1791250bf4b354148961f867568a5879ff0cd43..f48487c2a970aa6020d7400dfa3fbc2c710855cc
@@@ -8,6 -8,10 +8,10 @@@
   * kind, whether express or implied.
   */
  
+ #include <dt-bindings/clock/r8a7790-clock.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
  / {
        compatible = "renesas,r8a7790";
        interrupt-parent = <&gic>;
                        <0 0xf1002000 0 0x1000>,
                        <0 0xf1004000 0 0x2000>,
                        <0 0xf1006000 0 0x2000>;
-               interrupts = <1 9 0xf04>;
+               interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
        };
  
 -      gpio0: gpio@ffc40000 {
 +      gpio0: gpio@e6050000 {
                compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
 -              reg = <0 0xffc40000 0 0x2c>;
 +              reg = <0 0xe6050000 0 0x50>;
                interrupt-parent = <&gic>;
-               interrupts = <0 4 0x4>;
+               interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
                gpio-ranges = <&pfc 0 0 32>;
                interrupt-controller;
        };
  
 -      gpio1: gpio@ffc41000 {
 +      gpio1: gpio@e6051000 {
                compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
 -              reg = <0 0xffc41000 0 0x2c>;
 +              reg = <0 0xe6051000 0 0x50>;
                interrupt-parent = <&gic>;
-               interrupts = <0 5 0x4>;
+               interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
                gpio-ranges = <&pfc 0 32 32>;
                interrupt-controller;
        };
  
 -      gpio2: gpio@ffc42000 {
 +      gpio2: gpio@e6052000 {
                compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
 -              reg = <0 0xffc42000 0 0x2c>;
 +              reg = <0 0xe6052000 0 0x50>;
                interrupt-parent = <&gic>;
-               interrupts = <0 6 0x4>;
+               interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
                gpio-ranges = <&pfc 0 64 32>;
                interrupt-controller;
        };
  
 -      gpio3: gpio@ffc43000 {
 +      gpio3: gpio@e6053000 {
                compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
 -              reg = <0 0xffc43000 0 0x2c>;
 +              reg = <0 0xe6053000 0 0x50>;
                interrupt-parent = <&gic>;
-               interrupts = <0 7 0x4>;
+               interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
                gpio-ranges = <&pfc 0 96 32>;
                interrupt-controller;
        };
  
 -      gpio4: gpio@ffc44000 {
 +      gpio4: gpio@e6054000 {
                compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
 -              reg = <0 0xffc44000 0 0x2c>;
 +              reg = <0 0xe6054000 0 0x50>;
                interrupt-parent = <&gic>;
-               interrupts = <0 8 0x4>;
+               interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
                gpio-ranges = <&pfc 0 128 32>;
                interrupt-controller;
        };
  
 -      gpio5: gpio@ffc45000 {
 +      gpio5: gpio@e6055000 {
                compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
 -              reg = <0 0xffc45000 0 0x2c>;
 +              reg = <0 0xe6055000 0 0x50>;
                interrupt-parent = <&gic>;
-               interrupts = <0 9 0x4>;
+               interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
                gpio-ranges = <&pfc 0 160 32>;
                interrupt-controller;
        };
  
+       thermal@e61f0000 {
+               compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal";
+               reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
+       };
        timer {
                compatible = "arm,armv7-timer";
-               interrupts = <1 13 0xf08>,
-                               <1 14 0xf08>,
-                               <1 11 0xf08>,
-                               <1 10 0xf08>;
+               interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <1 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <1 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
        };
  
        irqc0: interrupt-controller@e61c0000 {
-               compatible = "renesas,irqc";
+               compatible = "renesas,irqc-r8a7790", "renesas,irqc";
                #interrupt-cells = <2>;
                interrupt-controller;
                reg = <0 0xe61c0000 0 0x200>;
                interrupt-parent = <&gic>;
-               interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>;
+               interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 1 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 2 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 3 IRQ_TYPE_LEVEL_HIGH>;
        };
  
        i2c0: i2c@e6508000 {
                compatible = "renesas,i2c-r8a7790";
                reg = <0 0xe6508000 0 0x40>;
                interrupt-parent = <&gic>;
-               interrupts = <0 287 0x4>;
+               interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_I2C0>;
                status = "disabled";
        };
  
                compatible = "renesas,i2c-r8a7790";
                reg = <0 0xe6518000 0 0x40>;
                interrupt-parent = <&gic>;
-               interrupts = <0 288 0x4>;
+               interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_I2C1>;
                status = "disabled";
        };
  
                compatible = "renesas,i2c-r8a7790";
                reg = <0 0xe6530000 0 0x40>;
                interrupt-parent = <&gic>;
-               interrupts = <0 286 0x4>;
+               interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_I2C2>;
                status = "disabled";
        };
  
                compatible = "renesas,i2c-r8a7790";
                reg = <0 0xe6540000 0 0x40>;
                interrupt-parent = <&gic>;
-               interrupts = <0 290 0x4>;
+               interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_I2C3>;
                status = "disabled";
        };
  
        mmcif0: mmcif@ee200000 {
-               compatible = "renesas,sh-mmcif";
+               compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
                reg = <0 0xee200000 0 0x80>;
                interrupt-parent = <&gic>;
-               interrupts = <0 169 0x4>;
+               interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
                reg-io-width = <4>;
                status = "disabled";
        };
  
-       mmcif1: mmcif@ee220000 {
-               compatible = "renesas,sh-mmcif";
+       mmcif1: mmc@ee220000 {
+               compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
                reg = <0 0xee220000 0 0x80>;
                interrupt-parent = <&gic>;
-               interrupts = <0 170 0x4>;
+               interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_MMCIF1>;
                reg-io-width = <4>;
                status = "disabled";
        };
                reg = <0 0xe6060000 0 0x250>;
        };
  
-       sdhi0: sdhi@ee100000 {
+       sdhi0: sd@ee100000 {
                compatible = "renesas,sdhi-r8a7790";
 -              reg = <0 0xee100000 0 0x100>;
 +              reg = <0 0xee100000 0 0x200>;
                interrupt-parent = <&gic>;
-               interrupts = <0 165 4>;
+               interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
                cap-sd-highspeed;
                status = "disabled";
        };
  
-       sdhi1: sdhi@ee120000 {
+       sdhi1: sd@ee120000 {
                compatible = "renesas,sdhi-r8a7790";
 -              reg = <0 0xee120000 0 0x100>;
 +              reg = <0 0xee120000 0 0x200>;
                interrupt-parent = <&gic>;
-               interrupts = <0 166 4>;
+               interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_SDHI1>;
                cap-sd-highspeed;
                status = "disabled";
        };
  
-       sdhi2: sdhi@ee140000 {
+       sdhi2: sd@ee140000 {
                compatible = "renesas,sdhi-r8a7790";
                reg = <0 0xee140000 0 0x100>;
                interrupt-parent = <&gic>;
-               interrupts = <0 167 4>;
+               interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
                cap-sd-highspeed;
                status = "disabled";
        };
  
-       sdhi3: sdhi@ee160000 {
+       sdhi3: sd@ee160000 {
                compatible = "renesas,sdhi-r8a7790";
                reg = <0 0xee160000 0 0x100>;
                interrupt-parent = <&gic>;
-               interrupts = <0 168 4>;
+               interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
                cap-sd-highspeed;
                status = "disabled";
        };
+       clocks {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               /* External root clock */
+               extal_clk: extal_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       /* This value must be overriden by the board. */
+                       clock-frequency = <0>;
+                       clock-output-names = "extal";
+               };
+               /* Special CPG clocks */
+               cpg_clocks: cpg_clocks@e6150000 {
+                       compatible = "renesas,r8a7790-cpg-clocks",
+                                    "renesas,rcar-gen2-cpg-clocks";
+                       reg = <0 0xe6150000 0 0x1000>;
+                       clocks = <&extal_clk>;
+                       #clock-cells = <1>;
+                       clock-output-names = "main", "pll0", "pll1", "pll3",
+                                            "lb", "qspi", "sdh", "sd0", "sd1",
+                                            "z";
+               };
+               /* Variable factor clocks */
+               sd2_clk: sd2_clk@e6150078 {
+                       compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+                       reg = <0 0xe6150078 0 4>;
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-output-names = "sd2";
+               };
+               sd3_clk: sd3_clk@e615007c {
+                       compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+                       reg = <0 0xe615007c 0 4>;
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-output-names = "sd3";
+               };
+               mmc0_clk: mmc0_clk@e6150240 {
+                       compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+                       reg = <0 0xe6150240 0 4>;
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-output-names = "mmc0";
+               };
+               mmc1_clk: mmc1_clk@e6150244 {
+                       compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+                       reg = <0 0xe6150244 0 4>;
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-output-names = "mmc1";
+               };
+               ssp_clk: ssp_clk@e6150248 {
+                       compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+                       reg = <0 0xe6150248 0 4>;
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-output-names = "ssp";
+               };
+               ssprs_clk: ssprs_clk@e615024c {
+                       compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+                       reg = <0 0xe615024c 0 4>;
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-output-names = "ssprs";
+               };
+               /* Fixed factor clocks */
+               pll1_div2_clk: pll1_div2_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clock-output-names = "pll1_div2";
+               };
+               z2_clk: z2_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clock-output-names = "z2";
+               };
+               zg_clk: zg_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <3>;
+                       clock-mult = <1>;
+                       clock-output-names = "zg";
+               };
+               zx_clk: zx_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <3>;
+                       clock-mult = <1>;
+                       clock-output-names = "zx";
+               };
+               zs_clk: zs_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <6>;
+                       clock-mult = <1>;
+                       clock-output-names = "zs";
+               };
+               hp_clk: hp_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <12>;
+                       clock-mult = <1>;
+                       clock-output-names = "hp";
+               };
+               i_clk: i_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clock-output-names = "i";
+               };
+               b_clk: b_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <12>;
+                       clock-mult = <1>;
+                       clock-output-names = "b";
+               };
+               p_clk: p_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <24>;
+                       clock-mult = <1>;
+                       clock-output-names = "p";
+               };
+               cl_clk: cl_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <48>;
+                       clock-mult = <1>;
+                       clock-output-names = "cl";
+               };
+               m2_clk: m2_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <8>;
+                       clock-mult = <1>;
+                       clock-output-names = "m2";
+               };
+               imp_clk: imp_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <4>;
+                       clock-mult = <1>;
+                       clock-output-names = "imp";
+               };
+               rclk_clk: rclk_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <(48 * 1024)>;
+                       clock-mult = <1>;
+                       clock-output-names = "rclk";
+               };
+               oscclk_clk: oscclk_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+                       #clock-cells = <0>;
+                       clock-div = <(12 * 1024)>;
+                       clock-mult = <1>;
+                       clock-output-names = "oscclk";
+               };
+               zb3_clk: zb3_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL3>;
+                       #clock-cells = <0>;
+                       clock-div = <4>;
+                       clock-mult = <1>;
+                       clock-output-names = "zb3";
+               };
+               zb3d2_clk: zb3d2_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL3>;
+                       #clock-cells = <0>;
+                       clock-div = <8>;
+                       clock-mult = <1>;
+                       clock-output-names = "zb3d2";
+               };
+               ddr_clk: ddr_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&cpg_clocks R8A7790_CLK_PLL3>;
+                       #clock-cells = <0>;
+                       clock-div = <8>;
+                       clock-mult = <1>;
+                       clock-output-names = "ddr";
+               };
+               mp_clk: mp_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&pll1_div2_clk>;
+                       #clock-cells = <0>;
+                       clock-div = <15>;
+                       clock-mult = <1>;
+                       clock-output-names = "mp";
+               };
+               cp_clk: cp_clk {
+                       compatible = "fixed-factor-clock";
+                       clocks = <&extal_clk>;
+                       #clock-cells = <0>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clock-output-names = "cp";
+               };
+               /* Gate clocks */
+               mstp0_clks: mstp0_clks@e6150130 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150130 0 4>, <0 0xe6150030 0 4>;
+                       clocks = <&mp_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <R8A7790_CLK_MSIOF0>;
+                       clock-output-names = "msiof0";
+               };
+               mstp1_clks: mstp1_clks@e6150134 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
+                       clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>,
+                                <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>,
+                                <&zs_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <
+                               R8A7790_CLK_TMU1 R8A7790_CLK_TMU3 R8A7790_CLK_TMU2
+                               R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1
+                               R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_RT R8A7790_CLK_VSP1_SY
+                       >;
+                       clock-output-names =
+                               "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
+                               "vsp1-du0", "vsp1-rt", "vsp1-sy";
+               };
+               mstp2_clks: mstp2_clks@e6150138 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
+                       clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
+                                <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <
+                               R8A7790_CLK_SCIFA2 R8A7790_CLK_SCIFA1 R8A7790_CLK_SCIFA0
+                               R8A7790_CLK_MSIOF2 R8A7790_CLK_SCIFB0 R8A7790_CLK_SCIFB1
+                               R8A7790_CLK_MSIOF1 R8A7790_CLK_MSIOF3 R8A7790_CLK_SCIFB2
+                       >;
+                       clock-output-names =
+                               "scifa2", "scifa1", "scifa0", "msiof2", "scifb0",
+                               "scifb1", "msiof1", "msiof3", "scifb2";
+               };
+               mstp3_clks: mstp3_clks@e615013c {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
+                       clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
+                                <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>,
+                                <&mmc0_clk>, <&rclk_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <
+                               R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
+                               R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
+                               R8A7790_CLK_MMCIF0 R8A7790_CLK_CMT1
+                       >;
+                       clock-output-names =
+                               "tpu0", "mmcif1", "sdhi3", "sdhi2",
+                               "sdhi1", "sdhi0", "mmcif0", "cmt1";
+               };
+               mstp5_clks: mstp5_clks@e6150144 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
+                       clocks = <&extal_clk>, <&p_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <R8A7790_CLK_THERMAL R8A7790_CLK_PWM>;
+                       clock-output-names = "thermal", "pwm";
+               };
+               mstp7_clks: mstp7_clks@e615014c {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
+                       clocks = <&mp_clk>, <&mp_clk>, <&zs_clk>, <&zs_clk>, <&p_clk>,
+                                <&p_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>,
+                                <&zx_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <
+                               R8A7790_CLK_EHCI R8A7790_CLK_HSUSB R8A7790_CLK_HSCIF1
+                               R8A7790_CLK_HSCIF0 R8A7790_CLK_SCIF1 R8A7790_CLK_SCIF0
+                               R8A7790_CLK_DU2 R8A7790_CLK_DU1 R8A7790_CLK_DU0
+                               R8A7790_CLK_LVDS1 R8A7790_CLK_LVDS0
+                       >;
+                       clock-output-names =
+                               "ehci", "hsusb", "hscif1", "hscif0", "scif1",
+                               "scif0", "du2", "du1", "du0", "lvds1", "lvds0";
+               };
+               mstp8_clks: mstp8_clks@e6150990 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
+                       clocks = <&p_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <R8A7790_CLK_ETHER>;
+                       clock-output-names = "ether";
+               };
+               mstp9_clks: mstp9_clks@e6150994 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
+                       clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>,
+                                <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
+                       #clock-cells = <1>;
+                       renesas,clock-indices = <
+                               R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD
+                               R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1
+                               R8A7790_CLK_I2C0
+                       >;
+                       clock-output-names =
+                               "rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0";
+               };
+       };
  };
index e674c94c720698e70b8a934ef5e560e4b725d0c7,9bb3a0d493de6a82e5235530a6cb4e9e2dd91f76..ea16054857a497e4794167402d4a0a456f2f378f
  / {
        interrupt-parent = <&intc>;
  
+       aliases {
+               ethernet0 = &emac;
+       };
        cpus {
                cpu@0 {
                        compatible = "arm,cortex-a8";
                        clocks = <&osc24M>;
                };
  
+               pll4: pll4@01c20018 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-pll1-clk";
+                       reg = <0x01c20018 0x4>;
+                       clocks = <&osc24M>;
+               };
+               pll5: pll5@01c20020 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-pll5-clk";
+                       reg = <0x01c20020 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll5_ddr", "pll5_other";
+               };
+               pll6: pll6@01c20028 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-pll6-clk";
+                       reg = <0x01c20028 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll6_sata", "pll6_other", "pll6";
+               };
                /* dummy is 200M */
                cpu: cpu@01c20054 {
                        #clock-cells = <0>;
                                "apb0_ir", "apb0_keypad";
                };
  
-               /* dummy is pll62 */
                apb1_mux: apb1_mux@01c20058 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-apb1-mux-clk";
                        reg = <0x01c20058 0x4>;
-                       clocks = <&osc24M>, <&dummy>, <&osc32k>;
+                       clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
                };
  
                apb1: apb1@01c20058 {
                                "apb1_i2c2", "apb1_uart0", "apb1_uart1",
                                "apb1_uart2", "apb1_uart3";
                };
+               nand_clk: clk@01c20080 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20080 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "nand";
+               };
+               ms_clk: clk@01c20084 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20084 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ms";
+               };
+               mmc0_clk: clk@01c20088 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20088 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc0";
+               };
+               mmc1_clk: clk@01c2008c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2008c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc1";
+               };
+               mmc2_clk: clk@01c20090 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20090 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc2";
+               };
+               ts_clk: clk@01c20098 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20098 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ts";
+               };
+               ss_clk: clk@01c2009c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2009c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ss";
+               };
+               spi0_clk: clk@01c200a0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a0 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi0";
+               };
+               spi1_clk: clk@01c200a4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a4 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi1";
+               };
+               spi2_clk: clk@01c200a8 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a8 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi2";
+               };
+               ir0_clk: clk@01c200b0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200b0 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ir0";
+               };
+               mbus_clk: clk@01c2015c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2015c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mbus";
+               };
        };
  
        soc@01c00000 {
                        reg = <0x01c23800 0x10>;
                };
  
+               rtp: rtp@01c25000 {
+                       compatible = "allwinner,sun4i-ts";
+                       reg = <0x01c25000 0x100>;
+                       interrupts = <29>;
+               };
                uart0: serial@01c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
                        clock-frequency = <100000>;
                        status = "disabled";
                };
 +
 +              timer@01c60000 {
 +                      compatible = "allwinner,sun5i-a13-hstimer";
 +                      reg = <0x01c60000 0x1000>;
 +                      interrupts = <82>, <83>;
 +                      clocks = <&ahb_gates 28>;
 +              };
        };
  };
index 1ccd75d37f49d4aeffbec39f0c518d62fd49b22b,4dee9716deb4ea8525eb487a77a669264873694f..320335abfccd763118408f3f836c0fba39ca6f69
                        clocks = <&osc24M>;
                };
  
+               pll4: pll4@01c20018 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-pll1-clk";
+                       reg = <0x01c20018 0x4>;
+                       clocks = <&osc24M>;
+               };
+               pll5: pll5@01c20020 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-pll5-clk";
+                       reg = <0x01c20020 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll5_ddr", "pll5_other";
+               };
+               pll6: pll6@01c20028 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-pll6-clk";
+                       reg = <0x01c20028 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll6_sata", "pll6_other", "pll6";
+               };
                /* dummy is 200M */
                cpu: cpu@01c20054 {
                        #clock-cells = <0>;
                        clock-output-names = "apb0_codec", "apb0_pio", "apb0_ir";
                };
  
-               /* dummy is pll6 */
                apb1_mux: apb1_mux@01c20058 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-apb1-mux-clk";
                        reg = <0x01c20058 0x4>;
-                       clocks = <&osc24M>, <&dummy>, <&osc32k>;
+                       clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
                };
  
                apb1: apb1@01c20058 {
                        clock-output-names = "apb1_i2c0", "apb1_i2c1",
                                "apb1_i2c2", "apb1_uart1", "apb1_uart3";
                };
+               nand_clk: clk@01c20080 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20080 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "nand";
+               };
+               ms_clk: clk@01c20084 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20084 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ms";
+               };
+               mmc0_clk: clk@01c20088 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20088 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc0";
+               };
+               mmc1_clk: clk@01c2008c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2008c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc1";
+               };
+               mmc2_clk: clk@01c20090 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20090 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc2";
+               };
+               ts_clk: clk@01c20098 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20098 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ts";
+               };
+               ss_clk: clk@01c2009c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2009c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ss";
+               };
+               spi0_clk: clk@01c200a0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a0 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi0";
+               };
+               spi1_clk: clk@01c200a4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a4 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi1";
+               };
+               spi2_clk: clk@01c200a8 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a8 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi2";
+               };
+               ir0_clk: clk@01c200b0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200b0 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ir0";
+               };
+               mbus_clk: clk@01c2015c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2015c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mbus";
+               };
        };
  
        soc@01c00000 {
                        reg = <0x01c23800 0x10>;
                };
  
+               rtp: rtp@01c25000 {
+                       compatible = "allwinner,sun4i-ts";
+                       reg = <0x01c25000 0x100>;
+                       interrupts = <29>;
+               };
                uart1: serial@01c28400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28400 0x400>;
                        clock-frequency = <100000>;
                        status = "disabled";
                };
 +
 +              timer@01c60000 {
 +                      compatible = "allwinner,sun5i-a13-hstimer";
 +                      reg = <0x01c60000 0x1000>;
 +                      interrupts = <82>, <83>;
 +                      clocks = <&ahb_gates 28>;
 +              };
        };
  };
index 7f5878c2784ab28eff69c2a278dfa408fe70bc4d,6dd9393dde1710c3a05143fc2c92fd32f7893442..5256ad9be52c691022ce99e81b679b012f766350
                pio: pinctrl@01c20800 {
                        compatible = "allwinner,sun6i-a31-pinctrl";
                        reg = <0x01c20800 0x400>;
 -                      interrupts = <0 11 1>, <0 15 1>, <0 16 1>, <0 17 1>;
 +                      interrupts = <0 11 4>,
 +                                   <0 15 4>,
 +                                   <0 16 4>,
 +                                   <0 17 4>;
                        clocks = <&apb1_gates 5>;
                        gpio-controller;
                        interrupt-controller;
                        };
                };
  
+               ahb1_rst: reset@01c202c0 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-ahb1-reset";
+                       reg = <0x01c202c0 0xc>;
+               };
+               apb1_rst: reset@01c202d0 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       reg = <0x01c202d0 0x4>;
+               };
+               apb2_rst: reset@01c202d8 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       reg = <0x01c202d8 0x4>;
+               };
                timer@01c20c00 {
                        compatible = "allwinner,sun4i-timer";
                        reg = <0x01c20c00 0xa0>;
 -                      interrupts = <0 18 1>,
 -                                   <0 19 1>,
 -                                   <0 20 1>,
 -                                   <0 21 1>,
 -                                   <0 22 1>;
 +                      interrupts = <0 18 4>,
 +                                   <0 19 4>,
 +                                   <0 20 4>,
 +                                   <0 21 4>,
 +                                   <0 22 4>;
                        clocks = <&osc24M>;
                };
  
                uart0: serial@01c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
 -                      interrupts = <0 0 1>;
 +                      interrupts = <0 0 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb2_gates 16>;
+                       resets = <&apb2_rst 16>;
                        status = "disabled";
                };
  
                uart1: serial@01c28400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28400 0x400>;
 -                      interrupts = <0 1 1>;
 +                      interrupts = <0 1 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb2_gates 17>;
+                       resets = <&apb2_rst 17>;
                        status = "disabled";
                };
  
                uart2: serial@01c28800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28800 0x400>;
 -                      interrupts = <0 2 1>;
 +                      interrupts = <0 2 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb2_gates 18>;
+                       resets = <&apb2_rst 18>;
                        status = "disabled";
                };
  
                uart3: serial@01c28c00 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28c00 0x400>;
 -                      interrupts = <0 3 1>;
 +                      interrupts = <0 3 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb2_gates 19>;
+                       resets = <&apb2_rst 19>;
                        status = "disabled";
                };
  
                uart4: serial@01c29000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29000 0x400>;
 -                      interrupts = <0 4 1>;
 +                      interrupts = <0 4 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb2_gates 20>;
+                       resets = <&apb2_rst 20>;
                        status = "disabled";
                };
  
                uart5: serial@01c29400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29400 0x400>;
 -                      interrupts = <0 5 1>;
 +                      interrupts = <0 5 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb2_gates 21>;
+                       resets = <&apb2_rst 21>;
                        status = "disabled";
                };
  
                        #interrupt-cells = <3>;
                        interrupts = <1 9 0xf04>;
                };
+               cpucfg@01f01c00 {
+                       compatible = "allwinner,sun6i-a31-cpuconfig";
+                       reg = <0x01f01c00 0x300>;
+               };
+               prcm@01f01c00 {
+                       compatible = "allwinner,sun6i-a31-prcm";
+                       reg = <0x01f01400 0x200>;
+               };
        };
  };
index 0135039eff96440dfc5b2fbb7813a137bd51122d,0d5499808b3a31b0cd9fb9f2d4c57886adfb7a28..119f066f0d98aa16221855e04e8a3f83e4afe33e
  / {
        interrupt-parent = <&gic>;
  
+       aliases {
+               ethernet0 = &emac;
+       };
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
                        clock-frequency = <24000000>;
                };
  
-               osc32k: osc32k {
+               osc32k: clk@0 {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <32768>;
+                       clock-output-names = "osc32k";
                };
  
                pll1: pll1@01c20000 {
                        clocks = <&osc24M>;
                };
  
-               /*
-                * This is a dummy clock, to be used as placeholder on
-                * other mux clocks when a specific parent clock is not
-                * yet implemented. It should be dropped when the driver
-                * is complete.
-                */
-               pll6: pll6 {
+               pll4: pll4@01c20018 {
                        #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <0>;
+                       compatible = "allwinner,sun4i-pll1-clk";
+                       reg = <0x01c20018 0x4>;
+                       clocks = <&osc24M>;
+               };
+               pll5: pll5@01c20020 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-pll5-clk";
+                       reg = <0x01c20020 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll5_ddr", "pll5_other";
+               };
+               pll6: pll6@01c20028 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-pll6-clk";
+                       reg = <0x01c20028 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll6_sata", "pll6_other", "pll6";
                };
  
                cpu: cpu@01c20054 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-cpu-clk";
                        reg = <0x01c20054 0x4>;
-                       clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll6>;
+                       clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll6 1>;
                };
  
                axi: axi@01c20054 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-apb1-mux-clk";
                        reg = <0x01c20058 0x4>;
-                       clocks = <&osc24M>, <&pll6>, <&osc32k>;
+                       clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
                };
  
                apb1: apb1@01c20058 {
                                "apb1_uart2", "apb1_uart3", "apb1_uart4",
                                "apb1_uart5", "apb1_uart6", "apb1_uart7";
                };
+               nand_clk: clk@01c20080 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20080 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "nand";
+               };
+               ms_clk: clk@01c20084 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20084 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ms";
+               };
+               mmc0_clk: clk@01c20088 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20088 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc0";
+               };
+               mmc1_clk: clk@01c2008c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2008c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc1";
+               };
+               mmc2_clk: clk@01c20090 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20090 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc2";
+               };
+               mmc3_clk: clk@01c20094 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20094 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "mmc3";
+               };
+               ts_clk: clk@01c20098 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c20098 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ts";
+               };
+               ss_clk: clk@01c2009c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2009c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ss";
+               };
+               spi0_clk: clk@01c200a0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a0 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi0";
+               };
+               spi1_clk: clk@01c200a4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a4 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi1";
+               };
+               spi2_clk: clk@01c200a8 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200a8 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi2";
+               };
+               pata_clk: clk@01c200ac {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200ac 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "pata";
+               };
+               ir0_clk: clk@01c200b0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200b0 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ir0";
+               };
+               ir1_clk: clk@01c200b4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200b4 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "ir1";
+               };
+               spi3_clk: clk@01c200d4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c200d4 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
+                       clock-output-names = "spi3";
+               };
+               mbus_clk: clk@01c2015c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-mod0-clk";
+                       reg = <0x01c2015c 0x4>;
+                       clocks = <&osc24M>, <&pll6 2>, <&pll5 1>;
+                       clock-output-names = "mbus";
+               };
+               /*
+                * Dummy clock used by output clocks
+                */
+               osc24M_32k: clk@1 {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clock-div = <750>;
+                       clock-mult = <1>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "osc24M_32k";
+               };
+               clk_out_a: clk@01c201f0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun7i-a20-out-clk";
+                       reg = <0x01c201f0 0x4>;
+                       clocks = <&osc24M_32k>, <&osc32k>, <&osc24M>;
+                       clock-output-names = "clk_out_a";
+               };
+               clk_out_b: clk@01c201f4 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun7i-a20-out-clk";
+                       reg = <0x01c201f4 0x4>;
+                       clocks = <&osc24M_32k>, <&osc32k>, <&osc24M>;
+                       clock-output-names = "clk_out_b";
+               };
        };
  
        soc@01c00000 {
                emac: ethernet@01c0b000 {
                        compatible = "allwinner,sun4i-emac";
                        reg = <0x01c0b000 0x1000>;
 -                      interrupts = <0 55 1>;
 +                      interrupts = <0 55 4>;
                        clocks = <&ahb_gates 17>;
                        status = "disabled";
                };
                pio: pinctrl@01c20800 {
                        compatible = "allwinner,sun7i-a20-pinctrl";
                        reg = <0x01c20800 0x400>;
 -                      interrupts = <0 28 1>;
 +                      interrupts = <0 28 4>;
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
                                allwinner,drive = <0>;
                                allwinner,pull = <0>;
                        };
+                       clk_out_a_pins_a: clk_out_a@0 {
+                               allwinner,pins = "PI12";
+                               allwinner,function = "clk_out_a";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
+                       clk_out_b_pins_a: clk_out_b@0 {
+                               allwinner,pins = "PI13";
+                               allwinner,function = "clk_out_b";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
                };
  
                timer@01c20c00 {
                        compatible = "allwinner,sun4i-timer";
                        reg = <0x01c20c00 0x90>;
 -                      interrupts = <0 22 1>,
 -                                   <0 23 1>,
 -                                   <0 24 1>,
 -                                   <0 25 1>,
 -                                   <0 67 1>,
 -                                   <0 68 1>;
 +                      interrupts = <0 22 4>,
 +                                   <0 23 4>,
 +                                   <0 24 4>,
 +                                   <0 25 4>,
 +                                   <0 67 4>,
 +                                   <0 68 4>;
                        clocks = <&osc24M>;
                };
  
                        reg = <0x01c20c90 0x10>;
                };
  
+               rtc: rtc@01c20d00 {
+                       compatible = "allwinner,sun7i-a20-rtc";
+                       reg = <0x01c20d00 0x20>;
+                       interrupts = <0 24 1>;
+               };
                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun7i-a20-sid";
                        reg = <0x01c23800 0x200>;
                };
  
+               rtp: rtp@01c25000 {
+                       compatible = "allwinner,sun4i-ts";
+                       reg = <0x01c25000 0x100>;
+                       interrupts = <0 29 4>;
+               };
                uart0: serial@01c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
 -                      interrupts = <0 1 1>;
 +                      interrupts = <0 1 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 16>;
                uart1: serial@01c28400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28400 0x400>;
 -                      interrupts = <0 2 1>;
 +                      interrupts = <0 2 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 17>;
                uart2: serial@01c28800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28800 0x400>;
 -                      interrupts = <0 3 1>;
 +                      interrupts = <0 3 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 18>;
                uart3: serial@01c28c00 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28c00 0x400>;
 -                      interrupts = <0 4 1>;
 +                      interrupts = <0 4 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 19>;
                uart4: serial@01c29000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29000 0x400>;
 -                      interrupts = <0 17 1>;
 +                      interrupts = <0 17 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 20>;
                uart5: serial@01c29400 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29400 0x400>;
 -                      interrupts = <0 18 1>;
 +                      interrupts = <0 18 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 21>;
                uart6: serial@01c29800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29800 0x400>;
 -                      interrupts = <0 19 1>;
 +                      interrupts = <0 19 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 22>;
                uart7: serial@01c29c00 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c29c00 0x400>;
 -                      interrupts = <0 20 1>;
 +                      interrupts = <0 20 4>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        clocks = <&apb1_gates 23>;
                i2c0: i2c@01c2ac00 {
                        compatible = "allwinner,sun4i-i2c";
                        reg = <0x01c2ac00 0x400>;
 -                      interrupts = <0 7 1>;
 +                      interrupts = <0 7 4>;
                        clocks = <&apb1_gates 0>;
                        clock-frequency = <100000>;
                        status = "disabled";
                i2c1: i2c@01c2b000 {
                        compatible = "allwinner,sun4i-i2c";
                        reg = <0x01c2b000 0x400>;
 -                      interrupts = <0 8 1>;
 +                      interrupts = <0 8 4>;
                        clocks = <&apb1_gates 1>;
                        clock-frequency = <100000>;
                        status = "disabled";
                i2c2: i2c@01c2b400 {
                        compatible = "allwinner,sun4i-i2c";
                        reg = <0x01c2b400 0x400>;
 -                      interrupts = <0 9 1>;
 +                      interrupts = <0 9 4>;
                        clocks = <&apb1_gates 2>;
                        clock-frequency = <100000>;
                        status = "disabled";
                i2c3: i2c@01c2b800 {
                        compatible = "allwinner,sun4i-i2c";
                        reg = <0x01c2b800 0x400>;
 -                      interrupts = <0 88 1>;
 +                      interrupts = <0 88 4>;
                        clocks = <&apb1_gates 3>;
                        clock-frequency = <100000>;
                        status = "disabled";
                i2c4: i2c@01c2bc00 {
                        compatible = "allwinner,sun4i-i2c";
                        reg = <0x01c2bc00 0x400>;
 -                      interrupts = <0 89 1>;
 +                      interrupts = <0 89 4>;
                        clocks = <&apb1_gates 15>;
                        clock-frequency = <100000>;
                        status = "disabled";
                };
  
 +              hstimer@01c60000 {
 +                      compatible = "allwinner,sun7i-a20-hstimer";
 +                      reg = <0x01c60000 0x1000>;
 +                      interrupts = <0 81 1>,
 +                                   <0 82 1>,
 +                                   <0 83 1>,
 +                                   <0 84 1>;
 +                      clocks = <&ahb_gates 28>;
 +              };
 +
                gic: interrupt-controller@01c81000 {
                        compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
                        reg = <0x01c81000 0x1000>,
index cbe89ff10686b15e008cb4bfc42ac385038b6a4a,61bc39335e3a365b736d37963d98fafd9a69a3cc..8e0066ad9628e745fa167ff7047fb474c29d6dcb
@@@ -4,12 -4,17 +4,17 @@@
        model = "Toradex Colibri T20 512MB";
        compatible = "toradex,colibri_t20-512", "nvidia,tegra20";
  
+       aliases {
+               rtc0 = "/i2c@7000d000/tps6586x@34";
+               rtc1 = "/rtc@7000e000";
+       };
        memory {
                reg = <0x00000000 0x20000000>;
        };
  
-       host1x {
-               hdmi {
+       host1x@50000000 {
+               hdmi@54280000 {
                        vdd-supply = <&hdmi_vdd_reg>;
                        pll-supply = <&hdmi_pll_reg>;
  
@@@ -19,7 -24,7 +24,7 @@@
                };
        };
  
-       pinmux {
+       pinmux@70000014 {
                pinctrl-names = "default";
                pinctrl-0 = <&state_default>;
  
                        audio_refclk {
                                nvidia,pins = "cdev1";
                                nvidia,function = "plla_out";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        crt {
                                nvidia,pins = "crtp";
                                nvidia,function = "crt";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        dap3 {
                                nvidia,pins = "dap3";
                                nvidia,function = "dap3";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        displaya {
                                nvidia,pins = "ld0", "ld1", "ld2", "ld3",
                                        "lhs", "lpw0", "lpw2", "lsc0",
                                        "lsc1", "lsck", "lsda", "lspi", "lvs";
                                nvidia,function = "displaya";
-                               nvidia,tristate = <1>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        gpio_dte {
                                nvidia,pins = "dte";
                                nvidia,function = "rsvd1";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        gpio_gmi {
                                nvidia,pins = "ata", "atc", "atd", "ate",
                                        "dap1", "dap2", "dap4", "gpu", "irrx",
                                        "irtx", "spia", "spib", "spic";
                                nvidia,function = "gmi";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        gpio_pta {
                                nvidia,pins = "pta";
                                nvidia,function = "rsvd4";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        gpio_uac {
                                nvidia,pins = "uac";
                                nvidia,function = "rsvd2";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        hdint {
                                nvidia,pins = "hdint";
                                nvidia,function = "hdmi";
-                               nvidia,tristate = <1>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        i2c1 {
                                nvidia,pins = "rm";
                                nvidia,function = "i2c1";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        i2c3 {
                                nvidia,pins = "dtf";
                                nvidia,function = "i2c3";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        i2cddc {
                                nvidia,pins = "ddc";
                                nvidia,function = "i2c2";
-                               nvidia,pull = <2>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        i2cp {
                                nvidia,pins = "i2cp";
                                nvidia,function = "i2cp";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        irda {
                                nvidia,pins = "uad";
                                nvidia,function = "irda";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        nand {
                                nvidia,pins = "kbca", "kbcc", "kbcd",
                                        "kbce", "kbcf";
                                nvidia,function = "nand";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        owc {
                                nvidia,pins = "owc";
                                nvidia,function = "owr";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        pmc {
                                nvidia,pins = "pmc";
                                nvidia,function = "pwr_on";
-                               nvidia,tristate = <0>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        pwm {
                                nvidia,pins = "sdb", "sdc", "sdd";
                                nvidia,function = "pwm";
-                               nvidia,tristate = <1>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        sdio4 {
                                nvidia,pins = "atb", "gma", "gme";
                                nvidia,function = "sdio4";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        spi1 {
                                nvidia,pins = "spid", "spie", "spif";
                                nvidia,function = "spi1";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        spi4 {
                                nvidia,pins = "slxa", "slxc", "slxd", "slxk";
                                nvidia,function = "spi4";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        uarta {
                                nvidia,pins = "sdio1";
                                nvidia,function = "uarta";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        uartd {
                                nvidia,pins = "gmc";
                                nvidia,function = "uartd";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        ulpi {
                                nvidia,pins = "uaa", "uab", "uda";
                                nvidia,function = "ulpi";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        ulpi_refclk {
                                nvidia,pins = "cdev2";
                                nvidia,function = "pllp_out4";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        usb_gpio {
                                nvidia,pins = "spig", "spih";
                                nvidia,function = "spi2_alt";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <0>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        vi {
                                nvidia,pins = "dta", "dtb", "dtc", "dtd";
                                nvidia,function = "vi";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                        vi_sc {
                                nvidia,pins = "csus";
                                nvidia,function = "vi_sensor_clk";
-                               nvidia,pull = <0>;
-                               nvidia,tristate = <1>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
                };
        };
  
+       ac97: ac97@70002000 {
+               status = "okay";
+               nvidia,codec-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
+                       GPIO_ACTIVE_HIGH>;
+               nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0)
+                       GPIO_ACTIVE_HIGH>;
+       };
        i2c@7000c000 {
                clock-frequency = <400000>;
        };
                        #gpio-cells = <2>;
                        gpio-controller;
  
-                       sys-supply = <&vdd_5v0_reg>;
+                       sys-supply = <&vdd_3v3_reg>;
                        vin-sm0-supply = <&sys_reg>;
                        vin-sm1-supply = <&sys_reg>;
                        vin-sm2-supply = <&sys_reg>;
                        vinldo01-supply = <&sm2_reg>;
-                       vinldo23-supply = <&sm2_reg>;
-                       vinldo4-supply = <&sm2_reg>;
-                       vinldo678-supply = <&sm2_reg>;
-                       vinldo9-supply = <&sm2_reg>;
+                       vinldo23-supply = <&vdd_3v3_reg>;
+                       vinldo4-supply = <&vdd_3v3_reg>;
+                       vinldo678-supply = <&vdd_3v3_reg>;
+                       vinldo9-supply = <&vdd_3v3_reg>;
  
                        regulators {
                                #address-cells = <1>;
                                        reg = <1>;
                                        regulator-compatible = "sm0";
                                        regulator-name = "vdd_sm0,vdd_core";
-                                       regulator-min-microvolt = <1275000>;
-                                       regulator-max-microvolt = <1275000>;
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
                                        regulator-always-on;
                                };
  
                                        reg = <2>;
                                        regulator-compatible = "sm1";
                                        regulator-name = "vdd_sm1,vdd_cpu";
-                                       regulator-min-microvolt = <1100000>;
-                                       regulator-max-microvolt = <1100000>;
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
                                        regulator-always-on;
                                };
  
                                        reg = <3>;
                                        regulator-compatible = "sm2";
                                        regulator-name = "vdd_sm2,vin_ldo*";
 -                                      regulator-min-microvolt = <3700000>;
 -                                      regulator-max-microvolt = <3700000>;
 +                                      regulator-min-microvolt = <1800000>;
 +                                      regulator-max-microvolt = <1800000>;
                                        regulator-always-on;
                                };
  
                                        reg = <10>;
                                        regulator-compatible = "ldo6";
                                        regulator-name = "vdd_ldo6,avdd_vdac,vddio_vi,vddio_cam";
-                                       regulator-min-microvolt = <1800000>;
-                                       regulator-max-microvolt = <1800000>;
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
                                };
  
                                hdmi_vdd_reg: regulator@11 {
                };
        };
  
-       pmc {
+       pmc@7000e400 {
                nvidia,suspend-mode = <1>;
                nvidia,cpu-pwr-good-time = <5000>;
                nvidia,cpu-pwr-off-time = <5000>;
                };
        };
  
-       ac97: ac97 {
-               status = "okay";
-               nvidia,codec-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
-                       GPIO_ACTIVE_HIGH>;
-               nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0)
-                       GPIO_ACTIVE_HIGH>;
-       };
        usb@c5004000 {
                status = "okay";
                nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
                #address-cells = <1>;
                #size-cells = <0>;
  
-               clk32k_in: clock {
+               clk32k_in: clock@0 {
                        compatible = "fixed-clock";
                        reg=<0>;
                        #clock-cells = <0>;
                };
        };
  
-       sound {
-               compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
-                                "nvidia,tegra-audio-wm9712";
-               nvidia,model = "Colibri T20 AC97 Audio";
-               nvidia,audio-routing =
-                       "Headphone", "HPOUTL",
-                       "Headphone", "HPOUTR",
-                       "LineIn", "LINEINL",
-                       "LineIn", "LINEINR",
-                       "Mic", "MIC1";
-               nvidia,ac97-controller = <&ac97>;
-               clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
-                        <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
-                        <&tegra_car TEGRA20_CLK_CDEV1>;
-               clock-names = "pll_a", "pll_a_out0", "mclk";
-       };
        regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;
  
-               vdd_5v0_reg: regulator@100 {
+               vdd_3v3_reg: regulator@100 {
                        compatible = "regulator-fixed";
                        reg = <100>;
-                       regulator-name = "vdd_5v0";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
+                       regulator-name = "vdd_3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
                        regulator-always-on;
                };
  
                        gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
                };
        };
+       sound {
+               compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
+                                "nvidia,tegra-audio-wm9712";
+               nvidia,model = "Colibri T20 AC97 Audio";
+               nvidia,audio-routing =
+                       "Headphone", "HPOUTL",
+                       "Headphone", "HPOUTR",
+                       "LineIn", "LINEINL",
+                       "LineIn", "LINEINR",
+                       "Mic", "MIC1";
+               nvidia,ac97-controller = <&ac97>;
+               clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
+                        <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA20_CLK_CDEV1>;
+               clock-names = "pll_a", "pll_a_out0", "mclk";
+       };
  };
index 473e21b8736441e94c54778116d8dcd225259707,cc1d3fe21c4efc39811f8049fe1d74f2e3114b9c..17c0fe6274357842d2769efc2f0bf2ac5241b982
@@@ -63,6 -63,9 +63,9 @@@
  
  /* Base address to the AP system controller */
  void __iomem *ap_syscon_base;
+ /* Base address to the external bus interface */
+ static void __iomem *ebi_base;
  
  /*
   * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
   * just for now).
   */
  #define VA_IC_BASE    __io_address(INTEGRATOR_IC_BASE)
- #define VA_EBI_BASE   __io_address(INTEGRATOR_EBI_BASE)
- #define VA_CMIC_BASE  __io_address(INTEGRATOR_HDR_IC)
  
  /*
   * Logical      Physical
   * ef000000                   Cache flush
-  * f1000000   10000000        Core module registers
   * f1100000   11000000        System controller registers
-  * f1200000   12000000        EBI registers
   * f1300000   13000000        Counter/Timer
   * f1400000   14000000        Interrupt controller
   * f1600000   16000000        UART 0
  
  static struct map_desc ap_io_desc[] __initdata __maybe_unused = {
        {
-               .virtual        = IO_ADDRESS(INTEGRATOR_HDR_BASE),
-               .pfn            = __phys_to_pfn(INTEGRATOR_HDR_BASE),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE
-       }, {
-               .virtual        = IO_ADDRESS(INTEGRATOR_EBI_BASE),
-               .pfn            = __phys_to_pfn(INTEGRATOR_EBI_BASE),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE
-       }, {
                .virtual        = IO_ADDRESS(INTEGRATOR_CT_BASE),
                .pfn            = __phys_to_pfn(INTEGRATOR_CT_BASE),
                .length         = SZ_4K,
@@@ -174,9 -163,6 +163,6 @@@ device_initcall(irq_syscore_init)
  /*
   * Flash handling.
   */
- #define EBI_CSR1 (VA_EBI_BASE + INTEGRATOR_EBI_CSR1_OFFSET)
- #define EBI_LOCK (VA_EBI_BASE + INTEGRATOR_EBI_LOCK_OFFSET)
  static int ap_flash_init(struct platform_device *dev)
  {
        u32 tmp;
        writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP,
               ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET);
  
-       tmp = readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE;
-       writel(tmp, EBI_CSR1);
+       tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) |
+               INTEGRATOR_EBI_WRITE_ENABLE;
+       writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
  
-       if (!(readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE)) {
-               writel(0xa05f, EBI_LOCK);
-               writel(tmp, EBI_CSR1);
-               writel(0, EBI_LOCK);
+       if (!(readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET)
+             & INTEGRATOR_EBI_WRITE_ENABLE)) {
+               writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
+               writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
+               writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
        }
        return 0;
  }
@@@ -202,13 -190,15 +190,15 @@@ static void ap_flash_exit(struct platfo
        writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP,
               ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET);
  
-       tmp = readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE;
-       writel(tmp, EBI_CSR1);
+       tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) &
+               ~INTEGRATOR_EBI_WRITE_ENABLE;
+       writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
  
-       if (readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE) {
-               writel(0xa05f, EBI_LOCK);
-               writel(tmp, EBI_CSR1);
-               writel(0, EBI_LOCK);
+       if (readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) &
+           INTEGRATOR_EBI_WRITE_ENABLE) {
+               writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
+               writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET);
+               writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET);
        }
  }
  
@@@ -277,7 -267,7 +267,7 @@@ struct amba_pl010_data ap_uart_data = 
  
  static unsigned long timer_reload;
  
 -static u32 notrace integrator_read_sched_clock(void)
 +static u64 notrace integrator_read_sched_clock(void)
  {
        return -readl((void __iomem *) TIMER2_VA_BASE + TIMER_VALUE);
  }
@@@ -298,7 -288,7 +288,7 @@@ static void integrator_clocksource_init
  
        clocksource_mmio_init(base + TIMER_VALUE, "timer2",
                        rate, 200, 16, clocksource_mmio_readl_down);
 -      setup_sched_clock(integrator_read_sched_clock, 16, rate);
 +      sched_clock_register(integrator_read_sched_clock, 16, rate);
  }
  
  static void __iomem * clkevt_base;
@@@ -475,11 -465,17 +465,17 @@@ static const struct of_device_id ap_sys
        { },
  };
  
+ static const struct of_device_id ebi_match[] = {
+       { .compatible = "arm,external-bus-interface"},
+       { },
+ };
  static void __init ap_init_of(void)
  {
        unsigned long sc_dec;
        struct device_node *root;
        struct device_node *syscon;
+       struct device_node *ebi;
        struct device *parent;
        struct soc_device *soc_dev;
        struct soc_device_attribute *soc_dev_attr;
        syscon = of_find_matching_node(root, ap_syscon_match);
        if (!syscon)
                return;
+       ebi = of_find_matching_node(root, ebi_match);
+       if (!ebi)
+               return;
  
        ap_syscon_base = of_iomap(syscon, 0);
        if (!ap_syscon_base)
                return;
+       ebi_base = of_iomap(ebi, 0);
+       if (!ebi_base)
+               return;
  
        ap_sc_id = readl(ap_syscon_base);
  
index dfb0fff4d24c15795fa3588866a323901803536a,4b601bf4ede4de3d8395bc1515321f0e733c23fb..9783945f8bc7972e9f13123c16335c3cbebefb9e
@@@ -115,8 -115,6 +115,8 @@@ static struct clk *main_clks[] = 
  };
  
  enum {
 +      MSTP531, MSTP530,
 +      MSTP529, MSTP528, MSTP527, MSTP526, MSTP525, MSTP524, MSTP523,
        MSTP331,
        MSTP323, MSTP322, MSTP321,
        MSTP311, MSTP310,
        MSTP_NR };
  
  static struct clk mstp_clks[MSTP_NR] = {
 +      [MSTP531] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 31, 0), /* SCU0 */
 +      [MSTP530] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 30, 0), /* SCU1 */
 +      [MSTP529] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 29, 0), /* SCU2 */
 +      [MSTP528] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 28, 0), /* SCU3 */
 +      [MSTP527] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 27, 0), /* SCU4 */
 +      [MSTP526] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 26, 0), /* SCU5 */
 +      [MSTP525] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 25, 0), /* SCU6 */
 +      [MSTP524] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 24, 0), /* SCU7 */
 +      [MSTP523] = SH_CLK_MSTP32(&p_clk, MSTPCR5, 23, 0), /* SCU8 */
        [MSTP331] = SH_CLK_MSTP32(&s4_clk, MSTPCR3, 31, 0), /* MMC */
        [MSTP323] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 23, 0), /* SDHI0 */
        [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */
@@@ -184,13 -173,13 +184,13 @@@ static struct clk_lookup lookups[] = 
  
        /* MSTP32 clocks */
        CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */
-       CLKDEV_DEV_ID("ffe4e000.mmcif", &mstp_clks[MSTP331]), /* MMC */
+       CLKDEV_DEV_ID("ffe4e000.mmc", &mstp_clks[MSTP331]), /* MMC */
        CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
-       CLKDEV_DEV_ID("ffe4c000.sdhi", &mstp_clks[MSTP323]), /* SDHI0 */
+       CLKDEV_DEV_ID("ffe4c000.sd", &mstp_clks[MSTP323]), /* SDHI0 */
        CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
-       CLKDEV_DEV_ID("ffe4d000.sdhi", &mstp_clks[MSTP322]), /* SDHI1 */
+       CLKDEV_DEV_ID("ffe4d000.sd", &mstp_clks[MSTP322]), /* SDHI1 */
        CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
-       CLKDEV_DEV_ID("ffe4f000.sdhi", &mstp_clks[MSTP321]), /* SDHI2 */
+       CLKDEV_DEV_ID("ffe4f000.sd", &mstp_clks[MSTP321]), /* SDHI2 */
        CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */
        CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */
        CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */
        CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP309]),
        CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP308]),
        CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP307]),
 +      CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP531]),
 +      CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP530]),
 +      CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP529]),
 +      CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP528]),
 +      CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP527]),
 +      CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP526]),
 +      CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP525]),
 +      CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP524]),
 +      CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP523]),
  };
  
  void __init r8a7778_clock_init(void)
index 30552448b0564d54ea98d3bb959fbf6e17de5e2d,c5c60ecdec8f78138e2c0aaf9667ff513c627d7d..f44987a92ad420d27fb3dab5638a1a1f6a32942a
@@@ -292,27 -292,27 +292,27 @@@ static struct clk_lookup lookups[] = 
        CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
        CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
        CLKDEV_DEV_ID("e6508000.i2c", &mstp_clks[MSTP931]),
 -      CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP931]),
 +      CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
        CLKDEV_DEV_ID("e6518000.i2c", &mstp_clks[MSTP930]),
 -      CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP930]),
 +      CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
        CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]),
 -      CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP929]),
 +      CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]),
        CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
 -      CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP928]),
 +      CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
        CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
        CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
        CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
-       CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
+       CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]),
        CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
-       CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]),
+       CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]),
        CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
-       CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]),
+       CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]),
        CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
-       CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]),
+       CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP312]),
        CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
-       CLKDEV_DEV_ID("ee160000.sdhi", &mstp_clks[MSTP311]),
+       CLKDEV_DEV_ID("ee160000.sd", &mstp_clks[MSTP311]),
        CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]),
-       CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]),
+       CLKDEV_DEV_ID("ee220000.mmc", &mstp_clks[MSTP305]),
        CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
        CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
        CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
index 43d6cb8c381da9d4364afd45ae686dd155e1975d,dc7f9015776641abde6e91adc8c9c93fe0c042a2..9309ad4cbd09596f215f86dfebe2d0ece9a7ca65
@@@ -7,16 -7,13 +7,13 @@@
  #include <linux/platform_device.h>
  #include <linux/init.h>
  #include <linux/gpio.h>
- #include <linux/platform_data/pinctrl-nomadik.h>
  #include <linux/platform_data/dma-ste-dma40.h>
  
- #include "devices.h"
  #include "irqs.h"
  #include <linux/platform_data/asoc-ux500-msp.h>
  
  #include "ste-dma40-db8500.h"
  #include "board-mop500.h"
- #include "devices-db8500.h"
  
  static struct stedma40_chan_cfg msp0_dma_rx = {
        .high_priority = true,
@@@ -31,7 -28,7 +28,7 @@@ static struct stedma40_chan_cfg msp0_dm
  };
  
  struct msp_i2s_platform_data msp0_platform_data = {
 -      .id = MSP_I2S_0,
 +      .id = 0,
        .msp_i2s_dma_rx = &msp0_dma_rx,
        .msp_i2s_dma_tx = &msp0_dma_tx,
  };
@@@ -49,7 -46,7 +46,7 @@@ static struct stedma40_chan_cfg msp1_dm
  };
  
  struct msp_i2s_platform_data msp1_platform_data = {
 -      .id = MSP_I2S_1,
 +      .id = 1,
        .msp_i2s_dma_rx = NULL,
        .msp_i2s_dma_tx = &msp1_dma_tx,
  };
@@@ -69,13 -66,13 +66,13 @@@ static struct stedma40_chan_cfg msp2_dm
  };
  
  struct msp_i2s_platform_data msp2_platform_data = {
 -      .id = MSP_I2S_2,
 +      .id = 2,
        .msp_i2s_dma_rx = &msp2_dma_rx,
        .msp_i2s_dma_tx = &msp2_dma_tx,
  };
  
  struct msp_i2s_platform_data msp3_platform_data = {
 -      .id             = MSP_I2S_3,
 +      .id             = 3,
        .msp_i2s_dma_rx = &msp1_dma_rx,
        .msp_i2s_dma_tx = NULL,
  };
index b1dd8584bed48d13efa4bde9c6b57074598009fa,7164cfd9971081d4312c6340a805507d67e4fbdb..2dea8b59d2220e1bacf274bdf7c75c010bbf8728
  void ux500_restart(enum reboot_mode mode, const char *cmd);
  
  void __init ux500_map_io(void);
- extern void __init u8500_map_io(void);
- extern struct device * __init u8500_init_devices(void);
  
  extern void __init ux500_init_irq(void);
  
  extern struct device *ux500_soc_device_init(const char *soc_id);
  
- struct amba_device;
- extern void __init amba_add_devices(struct amba_device *devs[], int num);
  extern void ux500_timer_init(void);
  
  #define __IO_DEV_DESC(x, sz)  {               \
@@@ -43,7 -37,7 +37,7 @@@
        .virtual        = IO_ADDRESS(x),        \
        .pfn            = __phys_to_pfn(x),     \
        .length         = sz,                   \
 -      .type           = MT_MEMORY,            \
 +      .type           = MT_MEMORY_RWX,                \
  }
  
  extern struct smp_operations ux500_smp_ops;
index 152a3f3875eeab3223a68f4cddc509e5b378a515,f00b5c9ce8b6dbc9599dc921eeea07e5db4d6423..a709cfa49d853bf79c6159d276c9c063ad1bed4b
@@@ -20,7 -20,6 +20,6 @@@
  #include <linux/jiffies.h>
  #include <linux/delay.h>
  #include <linux/err.h>
- #include <linux/platform_data/clocksource-nomadik-mtu.h>
  #include <linux/sched_clock.h>
  #include <asm/mach/time.h>
  
@@@ -103,7 -102,7 +102,7 @@@ static int nmdk_clkevt_next(unsigned lo
        return 0;
  }
  
- void nmdk_clkevt_reset(void)
static void nmdk_clkevt_reset(void)
  {
        if (clkevt_periodic) {
                /* Timer: configure load and background-load, and fire it up */
@@@ -144,7 -143,7 +143,7 @@@ static void nmdk_clkevt_mode(enum clock
        }
  }
  
- void nmdk_clksrc_reset(void)
static void nmdk_clksrc_reset(void)
  {
        /* Disable */
        writel(0, mtu_base + MTU_CR(0));
@@@ -187,13 -186,13 +186,13 @@@ static irqreturn_t nmdk_timer_interrupt
  
  static struct irqaction nmdk_timer_irq = {
        .name           = "Nomadik Timer Tick",
 -      .flags          = IRQF_DISABLED | IRQF_TIMER,
 +      .flags          = IRQF_TIMER,
        .handler        = nmdk_timer_interrupt,
        .dev_id         = &nmdk_clkevt,
  };
  
- static void __init __nmdk_timer_init(void __iomem *base, int irq,
-                                    struct clk *pclk, struct clk *clk)
+ static void __init nmdk_timer_init(void __iomem *base, int irq,
+                                  struct clk *pclk, struct clk *clk)
  {
        unsigned long rate;
  
        register_current_timer_delay(&mtu_delay_timer);
  }
  
- void __init nmdk_timer_init(void __iomem *base, int irq)
- {
-       struct clk *clk0, *pclk0;
-       pclk0 = clk_get_sys("mtu0", "apb_pclk");
-       BUG_ON(IS_ERR(pclk0));
-       clk0 = clk_get_sys("mtu0", NULL);
-       BUG_ON(IS_ERR(clk0));
-       __nmdk_timer_init(base, irq, pclk0, clk0);
- }
  static void __init nmdk_timer_of_init(struct device_node *node)
  {
        struct clk *pclk;
        if (irq <= 0)
                panic("Can't parse IRQ");
  
-       __nmdk_timer_init(base, irq, pclk, clk);
+       nmdk_timer_init(base, irq, pclk, clk);
  }
  CLOCKSOURCE_OF_DECLARE(nomadik_mtu, "st,nomadik-mtu",
                       nmdk_timer_of_init);
index cd2b1a1c927579ad25e60924a866c302641105a1,6559e143676870d4fc63d589310a822257784e7d..53a11114927fc2278456444dc22ae6ac8f1af964
@@@ -4,7 -4,7 +4,7 @@@
   * Copyright (C) 2008,2009 STMicroelectronics
   * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it>
   *   Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.com>
-  * Copyright (C) 2011 Linus Walleij <linus.walleij@linaro.org>
+  * Copyright (C) 2011-2013 Linus Walleij <linus.walleij@linaro.org>
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
@@@ -33,7 -33,6 +33,6 @@@
  #include <linux/pinctrl/pinconf.h>
  /* Since we request GPIOs from ourself */
  #include <linux/pinctrl/consumer.h>
- #include <linux/platform_data/pinctrl-nomadik.h>
  #include "pinctrl-nomadik.h"
  #include "core.h"
  
   * Symbols in this file are called "nmk_gpio" for "nomadik gpio"
   */
  
+ /*
+  * pin configurations are represented by 32-bit integers:
+  *
+  *    bit  0.. 8 - Pin Number (512 Pins Maximum)
+  *    bit  9..10 - Alternate Function Selection
+  *    bit 11..12 - Pull up/down state
+  *    bit     13 - Sleep mode behaviour
+  *    bit     14 - Direction
+  *    bit     15 - Value (if output)
+  *    bit 16..18 - SLPM pull up/down state
+  *    bit 19..20 - SLPM direction
+  *    bit 21..22 - SLPM Value (if output)
+  *    bit 23..25 - PDIS value (if input)
+  *    bit     26 - Gpio mode
+  *    bit     27 - Sleep mode
+  *
+  * to facilitate the definition, the following macros are provided
+  *
+  * PIN_CFG_DEFAULT - default config (0):
+  *                 pull up/down = disabled
+  *                 sleep mode = input/wakeup
+  *                 direction = input
+  *                 value = low
+  *                 SLPM direction = same as normal
+  *                 SLPM pull = same as normal
+  *                 SLPM value = same as normal
+  *
+  * PIN_CFG       - default config with alternate function
+  */
+ typedef unsigned long pin_cfg_t;
+ #define PIN_NUM_MASK          0x1ff
+ #define PIN_NUM(x)            ((x) & PIN_NUM_MASK)
+ #define PIN_ALT_SHIFT         9
+ #define PIN_ALT_MASK          (0x3 << PIN_ALT_SHIFT)
+ #define PIN_ALT(x)            (((x) & PIN_ALT_MASK) >> PIN_ALT_SHIFT)
+ #define PIN_GPIO              (NMK_GPIO_ALT_GPIO << PIN_ALT_SHIFT)
+ #define PIN_ALT_A             (NMK_GPIO_ALT_A << PIN_ALT_SHIFT)
+ #define PIN_ALT_B             (NMK_GPIO_ALT_B << PIN_ALT_SHIFT)
+ #define PIN_ALT_C             (NMK_GPIO_ALT_C << PIN_ALT_SHIFT)
+ #define PIN_PULL_SHIFT                11
+ #define PIN_PULL_MASK         (0x3 << PIN_PULL_SHIFT)
+ #define PIN_PULL(x)           (((x) & PIN_PULL_MASK) >> PIN_PULL_SHIFT)
+ #define PIN_PULL_NONE         (NMK_GPIO_PULL_NONE << PIN_PULL_SHIFT)
+ #define PIN_PULL_UP           (NMK_GPIO_PULL_UP << PIN_PULL_SHIFT)
+ #define PIN_PULL_DOWN         (NMK_GPIO_PULL_DOWN << PIN_PULL_SHIFT)
+ #define PIN_SLPM_SHIFT                13
+ #define PIN_SLPM_MASK         (0x1 << PIN_SLPM_SHIFT)
+ #define PIN_SLPM(x)           (((x) & PIN_SLPM_MASK) >> PIN_SLPM_SHIFT)
+ #define PIN_SLPM_MAKE_INPUT   (NMK_GPIO_SLPM_INPUT << PIN_SLPM_SHIFT)
+ #define PIN_SLPM_NOCHANGE     (NMK_GPIO_SLPM_NOCHANGE << PIN_SLPM_SHIFT)
+ /* These two replace the above in DB8500v2+ */
+ #define PIN_SLPM_WAKEUP_ENABLE        (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT)
+ #define PIN_SLPM_WAKEUP_DISABLE       (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT)
+ #define PIN_SLPM_USE_MUX_SETTINGS_IN_SLEEP PIN_SLPM_WAKEUP_DISABLE
+ #define PIN_SLPM_GPIO  PIN_SLPM_WAKEUP_ENABLE /* In SLPM, pin is a gpio */
+ #define PIN_SLPM_ALTFUNC PIN_SLPM_WAKEUP_DISABLE /* In SLPM, pin is altfunc */
+ #define PIN_DIR_SHIFT         14
+ #define PIN_DIR_MASK          (0x1 << PIN_DIR_SHIFT)
+ #define PIN_DIR(x)            (((x) & PIN_DIR_MASK) >> PIN_DIR_SHIFT)
+ #define PIN_DIR_INPUT         (0 << PIN_DIR_SHIFT)
+ #define PIN_DIR_OUTPUT                (1 << PIN_DIR_SHIFT)
+ #define PIN_VAL_SHIFT         15
+ #define PIN_VAL_MASK          (0x1 << PIN_VAL_SHIFT)
+ #define PIN_VAL(x)            (((x) & PIN_VAL_MASK) >> PIN_VAL_SHIFT)
+ #define PIN_VAL_LOW           (0 << PIN_VAL_SHIFT)
+ #define PIN_VAL_HIGH          (1 << PIN_VAL_SHIFT)
+ #define PIN_SLPM_PULL_SHIFT   16
+ #define PIN_SLPM_PULL_MASK    (0x7 << PIN_SLPM_PULL_SHIFT)
+ #define PIN_SLPM_PULL(x)      \
+       (((x) & PIN_SLPM_PULL_MASK) >> PIN_SLPM_PULL_SHIFT)
+ #define PIN_SLPM_PULL_NONE    \
+       ((1 + NMK_GPIO_PULL_NONE) << PIN_SLPM_PULL_SHIFT)
+ #define PIN_SLPM_PULL_UP      \
+       ((1 + NMK_GPIO_PULL_UP) << PIN_SLPM_PULL_SHIFT)
+ #define PIN_SLPM_PULL_DOWN    \
+       ((1 + NMK_GPIO_PULL_DOWN) << PIN_SLPM_PULL_SHIFT)
+ #define PIN_SLPM_DIR_SHIFT    19
+ #define PIN_SLPM_DIR_MASK     (0x3 << PIN_SLPM_DIR_SHIFT)
+ #define PIN_SLPM_DIR(x)               \
+       (((x) & PIN_SLPM_DIR_MASK) >> PIN_SLPM_DIR_SHIFT)
+ #define PIN_SLPM_DIR_INPUT    ((1 + 0) << PIN_SLPM_DIR_SHIFT)
+ #define PIN_SLPM_DIR_OUTPUT   ((1 + 1) << PIN_SLPM_DIR_SHIFT)
+ #define PIN_SLPM_VAL_SHIFT    21
+ #define PIN_SLPM_VAL_MASK     (0x3 << PIN_SLPM_VAL_SHIFT)
+ #define PIN_SLPM_VAL(x)               \
+       (((x) & PIN_SLPM_VAL_MASK) >> PIN_SLPM_VAL_SHIFT)
+ #define PIN_SLPM_VAL_LOW      ((1 + 0) << PIN_SLPM_VAL_SHIFT)
+ #define PIN_SLPM_VAL_HIGH     ((1 + 1) << PIN_SLPM_VAL_SHIFT)
+ #define PIN_SLPM_PDIS_SHIFT           23
+ #define PIN_SLPM_PDIS_MASK            (0x3 << PIN_SLPM_PDIS_SHIFT)
+ #define PIN_SLPM_PDIS(x)      \
+       (((x) & PIN_SLPM_PDIS_MASK) >> PIN_SLPM_PDIS_SHIFT)
+ #define PIN_SLPM_PDIS_NO_CHANGE               (0 << PIN_SLPM_PDIS_SHIFT)
+ #define PIN_SLPM_PDIS_DISABLED                (1 << PIN_SLPM_PDIS_SHIFT)
+ #define PIN_SLPM_PDIS_ENABLED         (2 << PIN_SLPM_PDIS_SHIFT)
+ #define PIN_LOWEMI_SHIFT      25
+ #define PIN_LOWEMI_MASK               (0x1 << PIN_LOWEMI_SHIFT)
+ #define PIN_LOWEMI(x)         (((x) & PIN_LOWEMI_MASK) >> PIN_LOWEMI_SHIFT)
+ #define PIN_LOWEMI_DISABLED   (0 << PIN_LOWEMI_SHIFT)
+ #define PIN_LOWEMI_ENABLED    (1 << PIN_LOWEMI_SHIFT)
+ #define PIN_GPIOMODE_SHIFT    26
+ #define PIN_GPIOMODE_MASK     (0x1 << PIN_GPIOMODE_SHIFT)
+ #define PIN_GPIOMODE(x)               (((x) & PIN_GPIOMODE_MASK) >> PIN_GPIOMODE_SHIFT)
+ #define PIN_GPIOMODE_DISABLED (0 << PIN_GPIOMODE_SHIFT)
+ #define PIN_GPIOMODE_ENABLED  (1 << PIN_GPIOMODE_SHIFT)
+ #define PIN_SLEEPMODE_SHIFT   27
+ #define PIN_SLEEPMODE_MASK    (0x1 << PIN_SLEEPMODE_SHIFT)
+ #define PIN_SLEEPMODE(x)      (((x) & PIN_SLEEPMODE_MASK) >> PIN_SLEEPMODE_SHIFT)
+ #define PIN_SLEEPMODE_DISABLED        (0 << PIN_SLEEPMODE_SHIFT)
+ #define PIN_SLEEPMODE_ENABLED (1 << PIN_SLEEPMODE_SHIFT)
+ /* Shortcuts.  Use these instead of separate DIR, PULL, and VAL.  */
+ #define PIN_INPUT_PULLDOWN    (PIN_DIR_INPUT | PIN_PULL_DOWN)
+ #define PIN_INPUT_PULLUP      (PIN_DIR_INPUT | PIN_PULL_UP)
+ #define PIN_INPUT_NOPULL      (PIN_DIR_INPUT | PIN_PULL_NONE)
+ #define PIN_OUTPUT_LOW                (PIN_DIR_OUTPUT | PIN_VAL_LOW)
+ #define PIN_OUTPUT_HIGH               (PIN_DIR_OUTPUT | PIN_VAL_HIGH)
+ #define PIN_SLPM_INPUT_PULLDOWN       (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_DOWN)
+ #define PIN_SLPM_INPUT_PULLUP (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_UP)
+ #define PIN_SLPM_INPUT_NOPULL (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_NONE)
+ #define PIN_SLPM_OUTPUT_LOW   (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_LOW)
+ #define PIN_SLPM_OUTPUT_HIGH  (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_HIGH)
+ #define PIN_CFG_DEFAULT               (0)
+ #define PIN_CFG(num, alt)             \
+       (PIN_CFG_DEFAULT |\
+        (PIN_NUM(num) | PIN_##alt))
+ #define PIN_CFG_INPUT(num, alt, pull)         \
+       (PIN_CFG_DEFAULT |\
+        (PIN_NUM(num) | PIN_##alt | PIN_INPUT_##pull))
+ #define PIN_CFG_OUTPUT(num, alt, val)         \
+       (PIN_CFG_DEFAULT |\
+        (PIN_NUM(num) | PIN_##alt | PIN_OUTPUT_##val))
+ /*
+  * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
+  * the "gpio" namespace for generic and cross-machine functions
+  */
+ #define GPIO_BLOCK_SHIFT 5
+ #define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT)
+ /* Register in the logic block */
+ #define NMK_GPIO_DAT  0x00
+ #define NMK_GPIO_DATS 0x04
+ #define NMK_GPIO_DATC 0x08
+ #define NMK_GPIO_PDIS 0x0c
+ #define NMK_GPIO_DIR  0x10
+ #define NMK_GPIO_DIRS 0x14
+ #define NMK_GPIO_DIRC 0x18
+ #define NMK_GPIO_SLPC 0x1c
+ #define NMK_GPIO_AFSLA        0x20
+ #define NMK_GPIO_AFSLB        0x24
+ #define NMK_GPIO_LOWEMI       0x28
+ #define NMK_GPIO_RIMSC        0x40
+ #define NMK_GPIO_FIMSC        0x44
+ #define NMK_GPIO_IS   0x48
+ #define NMK_GPIO_IC   0x4c
+ #define NMK_GPIO_RWIMSC       0x50
+ #define NMK_GPIO_FWIMSC       0x54
+ #define NMK_GPIO_WKS  0x58
+ /* These appear in DB8540 and later ASICs */
+ #define NMK_GPIO_EDGELEVEL 0x5C
+ #define NMK_GPIO_LEVEL        0x60
+ /* Pull up/down values */
+ enum nmk_gpio_pull {
+       NMK_GPIO_PULL_NONE,
+       NMK_GPIO_PULL_UP,
+       NMK_GPIO_PULL_DOWN,
+ };
+ /* Sleep mode */
+ enum nmk_gpio_slpm {
+       NMK_GPIO_SLPM_INPUT,
+       NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT,
+       NMK_GPIO_SLPM_NOCHANGE,
+       NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE,
+ };
+ /*
+  * Platform data to register a block: only the initial gpio/irq number.
+  */
+ struct nmk_gpio_platform_data {
+       char *name;
+       int first_gpio;
+       int first_irq;
+       int num_gpio;
+       u32 (*get_secondary_status)(unsigned int bank);
+       void (*set_ioforce)(bool enable);
+       bool supports_sleepmode;
+ };
  struct nmk_gpio_chip {
        struct gpio_chip chip;
        struct irq_domain *domain;
@@@ -904,7 -1118,7 +1118,7 @@@ static struct gpio_chip nmk_gpio_templa
        .set                    = nmk_gpio_set_output,
        .to_irq                 = nmk_gpio_to_irq,
        .dbg_show               = nmk_gpio_dbg_show,
 -      .can_sleep              = 0,
 +      .can_sleep              = false,
  };
  
  void nmk_gpio_clocks_enable(void)
@@@ -1026,7 -1240,7 +1240,7 @@@ static const struct irq_domain_ops nmk_
  
  static int nmk_gpio_probe(struct platform_device *dev)
  {
-       struct nmk_gpio_platform_data *pdata = dev->dev.platform_data;
+       struct nmk_gpio_platform_data *pdata;
        struct device_node *np = dev->dev.of_node;
        struct nmk_gpio_chip *nmk_chip;
        struct gpio_chip *chip;
        struct clk *clk;
        int secondary_irq;
        void __iomem *base;
-       int irq_start = 0;
        int irq;
        int ret;
  
-       if (!pdata && !np) {
-               dev_err(&dev->dev, "No platform data or device tree found\n");
-               return -ENODEV;
-       }
-       if (np) {
-               pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
-               if (!pdata)
-                       return -ENOMEM;
-               if (of_get_property(np, "st,supports-sleepmode", NULL))
-                       pdata->supports_sleepmode = true;
+       pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL);
+       if (!pdata)
+               return -ENOMEM;
  
-               if (of_property_read_u32(np, "gpio-bank", &dev->id)) {
-                       dev_err(&dev->dev, "gpio-bank property not found\n");
-                       return -EINVAL;
-               }
+       if (of_get_property(np, "st,supports-sleepmode", NULL))
+               pdata->supports_sleepmode = true;
  
-               pdata->first_gpio = dev->id * NMK_GPIO_PER_CHIP;
-               pdata->num_gpio   = NMK_GPIO_PER_CHIP;
+       if (of_property_read_u32(np, "gpio-bank", &dev->id)) {
+               dev_err(&dev->dev, "gpio-bank property not found\n");
+               return -EINVAL;
        }
  
+       pdata->first_gpio = dev->id * NMK_GPIO_PER_CHIP;
+       pdata->num_gpio = NMK_GPIO_PER_CHIP;
        irq = platform_get_irq(dev, 0);
        if (irq < 0)
                return irq;
        clk_enable(nmk_chip->clk);
        nmk_chip->lowemi = readl_relaxed(nmk_chip->addr + NMK_GPIO_LOWEMI);
        clk_disable(nmk_chip->clk);
- #ifdef CONFIG_OF_GPIO
        chip->of_node = np;
- #endif
  
        ret = gpiochip_add(&nmk_chip->chip);
        if (ret)
  
        platform_set_drvdata(dev, nmk_chip);
  
-       if (!np)
-               irq_start = pdata->first_irq;
        nmk_chip->domain = irq_domain_add_simple(np,
-                               NMK_GPIO_PER_CHIP, irq_start,
+                               NMK_GPIO_PER_CHIP, 0,
                                &nmk_gpio_irq_simple_ops, nmk_chip);
        if (!nmk_chip->domain) {
                dev_err(&dev->dev, "failed to create irqdomain\n");
@@@ -1858,11 -2059,10 +2059,10 @@@ static int nmk_pinctrl_resume(struct pl
  
  static int nmk_pinctrl_probe(struct platform_device *pdev)
  {
-       const struct platform_device_id *platid = platform_get_device_id(pdev);
+       const struct of_device_id *match;
        struct device_node *np = pdev->dev.of_node;
        struct device_node *prcm_np;
        struct nmk_pinctrl *npct;
-       struct resource *res;
        unsigned int version = 0;
        int i;
  
        if (!npct)
                return -ENOMEM;
  
-       if (platid)
-               version = platid->driver_data;
-       else if (np) {
-               const struct of_device_id *match;
-               match = of_match_device(nmk_pinctrl_match, &pdev->dev);
-               if (!match)
-                       return -ENODEV;
-               version = (unsigned int) match->data;
-       }
+       match = of_match_device(nmk_pinctrl_match, &pdev->dev);
+       if (!match)
+               return -ENODEV;
+       version = (unsigned int) match->data;
  
        /* Poke in other ASIC variants here */
        if (version == PINCTRL_NMK_STN8815)
        if (version == PINCTRL_NMK_DB8540)
                nmk_pinctrl_db8540_init(&npct->soc);
  
-       if (np) {
-               prcm_np = of_parse_phandle(np, "prcm", 0);
-               if (prcm_np)
-                       npct->prcm_base = of_iomap(prcm_np, 0);
-       }
-       /* Allow platform passed information to over-write DT. */
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (res)
-               npct->prcm_base = devm_ioremap(&pdev->dev, res->start,
-                                              resource_size(res));
+       prcm_np = of_parse_phandle(np, "prcm", 0);
+       if (prcm_np)
+               npct->prcm_base = of_iomap(prcm_np, 0);
        if (!npct->prcm_base) {
                if (version == PINCTRL_NMK_STN8815) {
                        dev_info(&pdev->dev,
@@@ -1958,13 -2144,6 +2144,6 @@@ static struct platform_driver nmk_gpio_
        .probe = nmk_gpio_probe,
  };
  
- static const struct platform_device_id nmk_pinctrl_id[] = {
-       { "pinctrl-stn8815", PINCTRL_NMK_STN8815 },
-       { "pinctrl-db8500", PINCTRL_NMK_DB8500 },
-       { "pinctrl-db8540", PINCTRL_NMK_DB8540 },
-       { }
- };
  static struct platform_driver nmk_pinctrl_driver = {
        .driver = {
                .owner = THIS_MODULE,
                .of_match_table = nmk_pinctrl_match,
        },
        .probe = nmk_pinctrl_probe,
-       .id_table = nmk_pinctrl_id,
  #ifdef CONFIG_PM
        .suspend = nmk_pinctrl_suspend,
        .resume = nmk_pinctrl_resume,