arm64: dts: stratix10: use clock bindings for the Stratix10 platform
authorDinh Nguyen <dinguyen@kernel.org>
Wed, 31 Jan 2018 20:58:02 +0000 (14:58 -0600)
committerDinh Nguyen <dinguyen@kernel.org>
Mon, 16 Apr 2018 14:04:29 +0000 (09:04 -0500)
Use the clock bindings for the Stratix10 SoC. This includes changing the old
binding of "intc,clk-s10-mgr" to "intel,stratix10-clkmgr". The reason that
this can be done is that there are currently no clock driver for Stratix10,
thus there are no consumers of the old binding. So changing the binding will
not break any legacy code.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
v7:
- move PLL out of clkmgr node and into DT root
v6:
- no changes
v5:
- no changes
v4:
- remove '_' in name of clock nodes
- use clock-controller in SoCDK node in dts file
v3:
- use the correct vendor prefix
- explain the binding change
v2:
- use a single clock binding for the clock controller

arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts

index c89d0c3..0e267c8 100644 (file)
@@ -17,6 +17,7 @@
 /dts-v1/;
 #include <dt-bindings/reset/altr,rst-mgr-s10.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/stratix10-clock.h>
 
 / {
        compatible = "altr,socfpga-stratix10";
                interrupt-parent = <&intc>;
                ranges = <0 0 0 0xffffffff>;
 
-               clkmgr@ffd1000 {
-                       compatible = "altr,clk-mgr";
+               clkmgr: clock-controller@ffd10000 {
+                       compatible = "intel,stratix10-clkmgr";
                        reg = <0xffd10000 0x1000>;
+                       #clock-cells = <1>;
+               };
+
+               clocks {
+                       cb_intosc_hs_div2_clk: cb-intosc-hs-div2-clk {
+                               #clock-cells = <0>;
+                               compatible = "fixed-clock";
+                       };
+
+                       cb_intosc_ls_clk: cb-intosc-ls-clk {
+                               #clock-cells = <0>;
+                               compatible = "fixed-clock";
+                       };
+
+                       f2s_free_clk: f2s-free-clk {
+                               #clock-cells = <0>;
+                               compatible = "fixed-clock";
+                       };
+
+                       osc1: osc1 {
+                               #clock-cells = <0>;
+                               compatible = "fixed-clock";
+                       };
                };
 
                gmac0: ethernet@ff800000 {
                        mac-address = [00 00 00 00 00 00];
                        resets = <&rst EMAC0_RESET>;
                        reset-names = "stmmaceth";
+                       clocks = <&clkmgr STRATIX10_EMAC0_CLK>;
+                       clock-names = "stmmaceth";
                        status = "disabled";
                };
 
                        mac-address = [00 00 00 00 00 00];
                        resets = <&rst EMAC1_RESET>;
                        reset-names = "stmmaceth";
+                       clocks = <&clkmgr STRATIX10_EMAC1_CLK>;
+                       clock-names = "stmmaceth";
                        status = "disabled";
                };
 
                        mac-address = [00 00 00 00 00 00];
                        resets = <&rst EMAC2_RESET>;
                        reset-names = "stmmaceth";
+                       clocks = <&clkmgr STRATIX10_EMAC2_CLK>;
+                       clock-names = "stmmaceth";
                        status = "disabled";
                };
 
                        fifo-depth = <0x400>;
                        resets = <&rst SDMMC_RESET>;
                        reset-names = "reset";
+                       clocks = <&clkmgr STRATIX10_L4_MP_CLK>,
+                                <&clkmgr STRATIX10_SDMMC_CLK>;
+                       clock-names = "biu", "ciu";
                        status = "disabled";
                };
 
                        compatible = "snps,dw-apb-timer";
                        interrupts = <0 113 4>;
                        reg = <0xffc03000 0x100>;
+                       clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+                       clock-names = "timer";
                };
 
                timer1: timer1@ffc03100 {
                        compatible = "snps,dw-apb-timer";
                        interrupts = <0 114 4>;
                        reg = <0xffc03100 0x100>;
+                       clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+                       clock-names = "timer";
                };
 
                timer2: timer2@ffd00000 {
                        compatible = "snps,dw-apb-timer";
                        interrupts = <0 115 4>;
                        reg = <0xffd00000 0x100>;
+                       clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+                       clock-names = "timer";
                };
 
                timer3: timer3@ffd00100 {
                        compatible = "snps,dw-apb-timer";
                        interrupts = <0 116 4>;
                        reg = <0xffd00100 0x100>;
+                       clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+                       clock-names = "timer";
                };
 
                uart0: serial0@ffc02000 {
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        resets = <&rst UART0_RESET>;
+                       clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
                        status = "disabled";
                };
 
                        reg-shift = <2>;
                        reg-io-width = <4>;
                        resets = <&rst UART1_RESET>;
+                       clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
                        status = "disabled";
                };
 
index eaf13fe..bec15e8 100644 (file)
                /* We expect the bootloader to fill in the reg */
                reg = <0 0 0 0>;
        };
+
+       soc {
+               clocks {
+                       osc1 {
+                               clock-frequency = <25000000>;
+                       };
+               };
+       };
 };
 
 &gpio1 {