aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2013-07-23 17:54:19 -0400
committerMaxime Ripard <maxime.ripard@free-electrons.com>2013-08-26 04:51:18 -0400
commit98096560ebb84a3bbbc871bb6b67f25565113135 (patch)
treecc6e77b0d47bf41265fff7141acf60fceac1ab91
parent29bb805475effce2522e0ae60fbfbcd135f363e6 (diff)
ARM: sun6i: Enable clock support in the DTSI
Now that the clock driver has support for the A31 clocks, we can add them to the DTSI and start using them in the relevant hardware blocks. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--arch/arm/boot/dts/sun6i-a31.dtsi144
1 files changed, 134 insertions, 10 deletions
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index dc5da4f3766b..f244f5f02365 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -51,13 +51,137 @@
51 51
52 clocks { 52 clocks {
53 #address-cells = <1>; 53 #address-cells = <1>;
54 #size-cells = <0>; 54 #size-cells = <1>;
55 ranges;
55 56
56 osc: oscillator { 57 osc24M: osc24M {
57 #clock-cells = <0>; 58 #clock-cells = <0>;
58 compatible = "fixed-clock"; 59 compatible = "fixed-clock";
59 clock-frequency = <24000000>; 60 clock-frequency = <24000000>;
60 }; 61 };
62
63 osc32k: osc32k {
64 #clock-cells = <0>;
65 compatible = "fixed-clock";
66 clock-frequency = <32768>;
67 };
68
69 pll1: pll1@01c20000 {
70 #clock-cells = <0>;
71 compatible = "allwinner,sun6i-a31-pll1-clk";
72 reg = <0x01c20000 0x4>;
73 clocks = <&osc24M>;
74 };
75
76 /*
77 * This is a dummy clock, to be used as placeholder on
78 * other mux clocks when a specific parent clock is not
79 * yet implemented. It should be dropped when the driver
80 * is complete.
81 */
82 pll6: pll6 {
83 #clock-cells = <0>;
84 compatible = "fixed-clock";
85 clock-frequency = <0>;
86 };
87
88 cpu: cpu@01c20050 {
89 #clock-cells = <0>;
90 compatible = "allwinner,sun4i-cpu-clk";
91 reg = <0x01c20050 0x4>;
92
93 /*
94 * PLL1 is listed twice here.
95 * While it looks suspicious, it's actually documented
96 * that way both in the datasheet and in the code from
97 * Allwinner.
98 */
99 clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
100 };
101
102 axi: axi@01c20050 {
103 #clock-cells = <0>;
104 compatible = "allwinner,sun4i-axi-clk";
105 reg = <0x01c20050 0x4>;
106 clocks = <&cpu>;
107 };
108
109 ahb1_mux: ahb1_mux@01c20054 {
110 #clock-cells = <0>;
111 compatible = "allwinner,sun6i-a31-ahb1-mux-clk";
112 reg = <0x01c20054 0x4>;
113 clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>;
114 };
115
116 ahb1: ahb1@01c20054 {
117 #clock-cells = <0>;
118 compatible = "allwinner,sun4i-ahb-clk";
119 reg = <0x01c20054 0x4>;
120 clocks = <&ahb1_mux>;
121 };
122
123 ahb1_gates: ahb1_gates@01c20060 {
124 #clock-cells = <1>;
125 compatible = "allwinner,sun6i-a31-ahb1-gates-clk";
126 reg = <0x01c20060 0x8>;
127 clocks = <&ahb1>;
128 clock-output-names = "ahb1_mipidsi", "ahb1_ss",
129 "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1",
130 "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1",
131 "ahb1_nand0", "ahb1_sdram",
132 "ahb1_gmac", "ahb1_ts", "ahb1_hstimer",
133 "ahb1_spi0", "ahb1_spi1", "ahb1_spi2",
134 "ahb1_spi3", "ahb1_otg", "ahb1_ehci0",
135 "ahb1_ehci1", "ahb1_ohci0",
136 "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve",
137 "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi",
138 "ahb1_hdmi", "ahb1_de0", "ahb1_de1",
139 "ahb1_fe0", "ahb1_fe1", "ahb1_mp",
140 "ahb1_gpu", "ahb1_deu0", "ahb1_deu1",
141 "ahb1_drc0", "ahb1_drc1";
142 };
143
144 apb1: apb1@01c20054 {
145 #clock-cells = <0>;
146 compatible = "allwinner,sun4i-apb0-clk";
147 reg = <0x01c20054 0x4>;
148 clocks = <&ahb1>;
149 };
150
151 apb1_gates: apb1_gates@01c20060 {
152 #clock-cells = <1>;
153 compatible = "allwinner,sun6i-a31-apb1-gates-clk";
154 reg = <0x01c20068 0x4>;
155 clocks = <&apb1>;
156 clock-output-names = "apb1_codec", "apb1_digital_mic",
157 "apb1_pio", "apb1_daudio0",
158 "apb1_daudio1";
159 };
160
161 apb2_mux: apb2_mux@01c20058 {
162 #clock-cells = <0>;
163 compatible = "allwinner,sun4i-apb1-mux-clk";
164 reg = <0x01c20058 0x4>;
165 clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>;
166 };
167
168 apb2: apb2@01c20058 {
169 #clock-cells = <0>;
170 compatible = "allwinner,sun6i-a31-apb2-div-clk";
171 reg = <0x01c20058 0x4>;
172 clocks = <&apb2_mux>;
173 };
174
175 apb2_gates: apb2_gates@01c2006c {
176 #clock-cells = <1>;
177 compatible = "allwinner,sun6i-a31-apb2-gates-clk";
178 reg = <0x01c2006c 0x8>;
179 clocks = <&apb2>;
180 clock-output-names = "apb2_i2c0", "apb2_i2c1",
181 "apb2_i2c2", "apb2_i2c3", "apb2_uart0",
182 "apb2_uart1", "apb2_uart2", "apb2_uart3",
183 "apb2_uart4", "apb2_uart5";
184 };
61 }; 185 };
62 186
63 soc@01c00000 { 187 soc@01c00000 {
@@ -70,7 +194,7 @@
70 compatible = "allwinner,sun6i-a31-pinctrl"; 194 compatible = "allwinner,sun6i-a31-pinctrl";
71 reg = <0x01c20800 0x400>; 195 reg = <0x01c20800 0x400>;
72 interrupts = <0 11 1>, <0 15 1>, <0 16 1>, <0 17 1>; 196 interrupts = <0 11 1>, <0 15 1>, <0 16 1>, <0 17 1>;
73 clocks = <&osc>; 197 clocks = <&apb1_gates 5>;
74 gpio-controller; 198 gpio-controller;
75 interrupt-controller; 199 interrupt-controller;
76 #address-cells = <1>; 200 #address-cells = <1>;
@@ -93,7 +217,7 @@
93 <0 20 1>, 217 <0 20 1>,
94 <0 21 1>, 218 <0 21 1>,
95 <0 22 1>; 219 <0 22 1>;
96 clocks = <&osc>; 220 clocks = <&osc24M>;
97 }; 221 };
98 222
99 wdt1: watchdog@01c20ca0 { 223 wdt1: watchdog@01c20ca0 {
@@ -107,7 +231,7 @@
107 interrupts = <0 0 1>; 231 interrupts = <0 0 1>;
108 reg-shift = <2>; 232 reg-shift = <2>;
109 reg-io-width = <4>; 233 reg-io-width = <4>;
110 clocks = <&osc>; 234 clocks = <&apb2_gates 16>;
111 status = "disabled"; 235 status = "disabled";
112 }; 236 };
113 237
@@ -117,7 +241,7 @@
117 interrupts = <0 1 1>; 241 interrupts = <0 1 1>;
118 reg-shift = <2>; 242 reg-shift = <2>;
119 reg-io-width = <4>; 243 reg-io-width = <4>;
120 clocks = <&osc>; 244 clocks = <&apb2_gates 17>;
121 status = "disabled"; 245 status = "disabled";
122 }; 246 };
123 247
@@ -127,7 +251,7 @@
127 interrupts = <0 2 1>; 251 interrupts = <0 2 1>;
128 reg-shift = <2>; 252 reg-shift = <2>;
129 reg-io-width = <4>; 253 reg-io-width = <4>;
130 clocks = <&osc>; 254 clocks = <&apb2_gates 18>;
131 status = "disabled"; 255 status = "disabled";
132 }; 256 };
133 257
@@ -137,7 +261,7 @@
137 interrupts = <0 3 1>; 261 interrupts = <0 3 1>;
138 reg-shift = <2>; 262 reg-shift = <2>;
139 reg-io-width = <4>; 263 reg-io-width = <4>;
140 clocks = <&osc>; 264 clocks = <&apb2_gates 19>;
141 status = "disabled"; 265 status = "disabled";
142 }; 266 };
143 267
@@ -147,7 +271,7 @@
147 interrupts = <0 4 1>; 271 interrupts = <0 4 1>;
148 reg-shift = <2>; 272 reg-shift = <2>;
149 reg-io-width = <4>; 273 reg-io-width = <4>;
150 clocks = <&osc>; 274 clocks = <&apb2_gates 20>;
151 status = "disabled"; 275 status = "disabled";
152 }; 276 };
153 277
@@ -157,7 +281,7 @@
157 interrupts = <0 5 1>; 281 interrupts = <0 5 1>;
158 reg-shift = <2>; 282 reg-shift = <2>;
159 reg-io-width = <4>; 283 reg-io-width = <4>;
160 clocks = <&osc>; 284 clocks = <&apb2_gates 21>;
161 status = "disabled"; 285 status = "disabled";
162 }; 286 };
163 287