ARM: dts: berlin: convert BG2 to DT clock nodes
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Sun, 11 May 2014 19:32:41 +0000 (21:32 +0200)
committerSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Mon, 19 May 2014 21:02:27 +0000 (23:02 +0200)
This converts Berlin BG2 SoC dtsi to make use of the new DT clock
nodes for Berlin SoCs. While at it, also fix up twdclk which is
running at cpuclk/3 instead of sysclk.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arch/arm/boot/dts/berlin2.dtsi

index 57cadd31f4e1db5070c6bc755e8c663132149aa1..591d4b8c1c2b39dc6cc1843244046b6688d282a9 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include "skeleton.dtsi"
+#include <dt-bindings/clock/berlin2.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
 / {
                };
        };
 
-       clocks {
-               smclk: sysmgr-clock {
-                       compatible = "fixed-clock";
-                       #clock-cells = <0>;
-                       clock-frequency = <25000000>;
-               };
-
-               cfgclk: cfg-clock {
-                       compatible = "fixed-clock";
-                       #clock-cells = <0>;
-                       clock-frequency = <100000000>;
-               };
-
-               sysclk: system-clock {
-                       compatible = "fixed-clock";
-                       #clock-cells = <0>;
-                       clock-frequency = <400000000>;
-               };
+       refclk: oscillator {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <25000000>;
        };
 
        soc {
@@ -88,7 +75,7 @@
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0xad0600 0x20>;
                        interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&sysclk>;
+                       clocks = <&chip CLKID_TWD>;
                };
 
                apb@e80000 {
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c00 0x14>;
                                interrupts = <8>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "okay";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c14 0x14>;
                                interrupts = <9>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "okay";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c28 0x14>;
                                interrupts = <10>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "disabled";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c3c 0x14>;
                                interrupts = <11>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "disabled";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c50 0x14>;
                                interrupts = <12>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "disabled";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c64 0x14>;
                                interrupts = <13>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "disabled";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c78 0x14>;
                                interrupts = <14>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "disabled";
                        };
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c8c 0x14>;
                                interrupts = <15>;
-                               clocks = <&cfgclk>;
+                               clocks = <&chip CLKID_CFG>;
                                clock-names = "timer";
                                status = "disabled";
                        };
                        };
                };
 
-               generic-regs@ea0184 {
-                       compatible = "marvell,berlin-generic-regs", "syscon";
-                       reg = <0xea0184 0x10>;
+               chip: chip-control@ea0000 {
+                       compatible = "marvell,berlin2-chip-ctrl";
+                       #clock-cells = <1>;
+                       reg = <0xea0000 0x400>;
+                       clocks = <&refclk>;
+                       clock-names = "refclk";
                };
 
                apb@fc0000 {
                                reg-shift = <2>;
                                reg-io-width = <1>;
                                interrupts = <8>;
-                               clocks = <&smclk>;
+                               clocks = <&refclk>;
                                status = "disabled";
                        };
 
                                reg-shift = <2>;
                                reg-io-width = <1>;
                                interrupts = <9>;
-                               clocks = <&smclk>;
+                               clocks = <&refclk>;
                                status = "disabled";
                        };
 
                                reg-shift = <2>;
                                reg-io-width = <1>;
                                interrupts = <10>;
-                               clocks = <&smclk>;
+                               clocks = <&refclk>;
                                status = "disabled";
                        };