diff options
284 files changed, 11312 insertions, 3859 deletions
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index 5fac246a9530..3509707f9320 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards | |||
@@ -14,6 +14,9 @@ Required nodes: | |||
14 | - core-module: the root node to the Integrator platforms must have | 14 | - core-module: the root node to the Integrator platforms must have |
15 | a core-module with regs and the compatible string | 15 | a core-module with regs and the compatible string |
16 | "arm,core-module-integrator" | 16 | "arm,core-module-integrator" |
17 | - external-bus-interface: the root node to the Integrator platforms | ||
18 | must have an external bus interface with regs and the | ||
19 | compatible-string "arm,external-bus-interface" | ||
17 | 20 | ||
18 | Required properties for the core module: | 21 | Required properties for the core module: |
19 | - regs: the location and size of the core module registers, one | 22 | - regs: the location and size of the core module registers, one |
@@ -48,6 +51,11 @@ Required nodes: | |||
48 | reg = <0x10000000 0x200>; | 51 | reg = <0x10000000 0x200>; |
49 | }; | 52 | }; |
50 | 53 | ||
54 | ebi@12000000 { | ||
55 | compatible = "arm,external-bus-interface"; | ||
56 | reg = <0x12000000 0x100>; | ||
57 | }; | ||
58 | |||
51 | syscon { | 59 | syscon { |
52 | compatible = "arm,integrator-ap-syscon"; | 60 | compatible = "arm,integrator-ap-syscon"; |
53 | reg = <0x11000000 0x100>; | 61 | reg = <0x11000000 0x100>; |
diff --git a/Documentation/devicetree/bindings/arm/atmel-aic.txt b/Documentation/devicetree/bindings/arm/atmel-aic.txt index ad031211b5b8..2742e9cfd6b1 100644 --- a/Documentation/devicetree/bindings/arm/atmel-aic.txt +++ b/Documentation/devicetree/bindings/arm/atmel-aic.txt | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "atmel,<chip>-aic" | 4 | - compatible: Should be "atmel,<chip>-aic" |
5 | <chip> can be "at91rm9200" or "sama5d3" | ||
5 | - interrupt-controller: Identifies the node as an interrupt controller. | 6 | - interrupt-controller: Identifies the node as an interrupt controller. |
6 | - interrupt-parent: For single AIC system, it is an empty property. | 7 | - interrupt-parent: For single AIC system, it is an empty property. |
7 | - #interrupt-cells: The number of cells to define the interrupts. It should be 3. | 8 | - #interrupt-cells: The number of cells to define the interrupts. It should be 3. |
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt index 1196290082d1..d2170e780f0b 100644 --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt | |||
@@ -50,7 +50,8 @@ Example: | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | RAMC SDRAM/DDR Controller required properties: | 52 | RAMC SDRAM/DDR Controller required properties: |
53 | - compatible: Should be "atmel,at91sam9260-sdramc", | 53 | - compatible: Should be "atmel,at91rm9200-sdramc", |
54 | "atmel,at91sam9260-sdramc", | ||
54 | "atmel,at91sam9g45-ddramc", | 55 | "atmel,at91sam9g45-ddramc", |
55 | - reg: Should contain registers location and length | 56 | - reg: Should contain registers location and length |
56 | For at91sam9263 and at91sam9g45 you must specify 2 entries. | 57 | For at91sam9263 and at91sam9g45 you must specify 2 entries. |
diff --git a/Documentation/devicetree/bindings/arm/moxart.txt b/Documentation/devicetree/bindings/arm/moxart.txt new file mode 100644 index 000000000000..11087edb0658 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/moxart.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | MOXA ART device tree bindings | ||
2 | |||
3 | Boards with the MOXA ART SoC shall have the following properties: | ||
4 | |||
5 | Required root node property: | ||
6 | |||
7 | compatible = "moxa,moxart"; | ||
8 | |||
9 | Boards: | ||
10 | |||
11 | - UC-7112-LX: embedded computer | ||
12 | compatible = "moxa,moxart-uc-7112-lx", "moxa,moxart" | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt index 5039c0a12f55..0ab3251a6ec2 100644 --- a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt +++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt | |||
@@ -1,7 +1,12 @@ | |||
1 | SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) | 1 | SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) |
2 | 2 | ||
3 | Properties: | 3 | Properties: |
4 | - name : should be 'sysreg'; | ||
5 | - compatible : should contain "samsung,<chip name>-sysreg", "syscon"; | 4 | - compatible : should contain "samsung,<chip name>-sysreg", "syscon"; |
6 | For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; | 5 | For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; |
7 | - reg : offset and length of the register set. | 6 | - reg : offset and length of the register set. |
7 | |||
8 | Example: | ||
9 | syscon@10010000 { | ||
10 | compatible = "samsung,exynos4-sysreg", "syscon"; | ||
11 | reg = <0x10010000 0x400>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt new file mode 100644 index 000000000000..cd5e23912888 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt | |||
@@ -0,0 +1,339 @@ | |||
1 | Device Tree Clock bindings for arch-at91 | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : shall be one of the following: | ||
9 | "atmel,at91rm9200-pmc" or | ||
10 | "atmel,at91sam9g45-pmc" or | ||
11 | "atmel,at91sam9n12-pmc" or | ||
12 | "atmel,at91sam9x5-pmc" or | ||
13 | "atmel,sama5d3-pmc": | ||
14 | at91 PMC (Power Management Controller) | ||
15 | All at91 specific clocks (clocks defined below) must be child | ||
16 | node of the PMC node. | ||
17 | |||
18 | "atmel,at91rm9200-clk-main": | ||
19 | at91 main oscillator | ||
20 | |||
21 | "atmel,at91rm9200-clk-master" or | ||
22 | "atmel,at91sam9x5-clk-master": | ||
23 | at91 master clock | ||
24 | |||
25 | "atmel,at91sam9x5-clk-peripheral" or | ||
26 | "atmel,at91rm9200-clk-peripheral": | ||
27 | at91 peripheral clocks | ||
28 | |||
29 | "atmel,at91rm9200-clk-pll" or | ||
30 | "atmel,at91sam9g45-clk-pll" or | ||
31 | "atmel,at91sam9g20-clk-pllb" or | ||
32 | "atmel,sama5d3-clk-pll": | ||
33 | at91 pll clocks | ||
34 | |||
35 | "atmel,at91sam9x5-clk-plldiv": | ||
36 | at91 plla divisor | ||
37 | |||
38 | "atmel,at91rm9200-clk-programmable" or | ||
39 | "atmel,at91sam9g45-clk-programmable" or | ||
40 | "atmel,at91sam9x5-clk-programmable": | ||
41 | at91 programmable clocks | ||
42 | |||
43 | "atmel,at91sam9x5-clk-smd": | ||
44 | at91 SMD (Soft Modem) clock | ||
45 | |||
46 | "atmel,at91rm9200-clk-system": | ||
47 | at91 system clocks | ||
48 | |||
49 | "atmel,at91rm9200-clk-usb" or | ||
50 | "atmel,at91sam9x5-clk-usb" or | ||
51 | "atmel,at91sam9n12-clk-usb": | ||
52 | at91 usb clock | ||
53 | |||
54 | "atmel,at91sam9x5-clk-utmi": | ||
55 | at91 utmi clock | ||
56 | |||
57 | Required properties for PMC node: | ||
58 | - reg : defines the IO memory reserved for the PMC. | ||
59 | - #size-cells : shall be 0 (reg is used to encode clk id). | ||
60 | - #address-cells : shall be 1 (reg is used to encode clk id). | ||
61 | - interrupts : shall be set to PMC interrupt line. | ||
62 | - interrupt-controller : tell that the PMC is an interrupt controller. | ||
63 | - #interrupt-cells : must be set to 1. The first cell encodes the interrupt id, | ||
64 | and reflect the bit position in the PMC_ER/DR/SR registers. | ||
65 | You can use the dt macros defined in dt-bindings/clk/at91.h. | ||
66 | 0 (AT91_PMC_MOSCS) -> main oscillator ready | ||
67 | 1 (AT91_PMC_LOCKA) -> PLL A ready | ||
68 | 2 (AT91_PMC_LOCKB) -> PLL B ready | ||
69 | 3 (AT91_PMC_MCKRDY) -> master clock ready | ||
70 | 6 (AT91_PMC_LOCKU) -> UTMI PLL clock ready | ||
71 | 8 .. 15 (AT91_PMC_PCKRDY(id)) -> programmable clock ready | ||
72 | 16 (AT91_PMC_MOSCSELS) -> main oscillator selected | ||
73 | 17 (AT91_PMC_MOSCRCS) -> RC main oscillator stabilized | ||
74 | 18 (AT91_PMC_CFDEV) -> clock failure detected | ||
75 | |||
76 | For example: | ||
77 | pmc: pmc@fffffc00 { | ||
78 | compatible = "atmel,sama5d3-pmc"; | ||
79 | interrupts = <1 4 7>; | ||
80 | interrupt-controller; | ||
81 | #interrupt-cells = <2>; | ||
82 | #size-cells = <0>; | ||
83 | #address-cells = <1>; | ||
84 | |||
85 | /* put at91 clocks here */ | ||
86 | }; | ||
87 | |||
88 | Required properties for main clock: | ||
89 | - interrupt-parent : must reference the PMC node. | ||
90 | - interrupts : shall be set to "<0>". | ||
91 | - #clock-cells : from common clock binding; shall be set to 0. | ||
92 | - clocks (optional if clock-frequency is provided) : shall be the slow clock | ||
93 | phandle. This clock is used to calculate the main clock rate if | ||
94 | "clock-frequency" is not provided. | ||
95 | - clock-frequency : the main oscillator frequency.Prefer the use of | ||
96 | "clock-frequency" over automatic clock rate calculation. | ||
97 | |||
98 | For example: | ||
99 | main: mainck { | ||
100 | compatible = "atmel,at91rm9200-clk-main"; | ||
101 | interrupt-parent = <&pmc>; | ||
102 | interrupts = <0>; | ||
103 | #clock-cells = <0>; | ||
104 | clocks = <&ck32k>; | ||
105 | clock-frequency = <18432000>; | ||
106 | }; | ||
107 | |||
108 | Required properties for master clock: | ||
109 | - interrupt-parent : must reference the PMC node. | ||
110 | - interrupts : shall be set to "<3>". | ||
111 | - #clock-cells : from common clock binding; shall be set to 0. | ||
112 | - clocks : shall be the master clock sources (see atmel datasheet) phandles. | ||
113 | e.g. "<&ck32k>, <&main>, <&plla>, <&pllb>". | ||
114 | - atmel,clk-output-range : minimum and maximum clock frequency (two u32 | ||
115 | fields). | ||
116 | e.g. output = <0 133000000>; <=> 0 to 133MHz. | ||
117 | - atmel,clk-divisors : master clock divisors table (four u32 fields). | ||
118 | 0 <=> reserved value. | ||
119 | e.g. divisors = <1 2 4 6>; | ||
120 | - atmel,master-clk-have-div3-pres : some SoC use the reserved value 7 in the | ||
121 | PRES field as CLOCK_DIV3 (e.g sam9x5). | ||
122 | |||
123 | For example: | ||
124 | mck: mck { | ||
125 | compatible = "atmel,at91rm9200-clk-master"; | ||
126 | interrupt-parent = <&pmc>; | ||
127 | interrupts = <3>; | ||
128 | #clock-cells = <0>; | ||
129 | atmel,clk-output-range = <0 133000000>; | ||
130 | atmel,clk-divisors = <1 2 4 0>; | ||
131 | }; | ||
132 | |||
133 | Required properties for peripheral clocks: | ||
134 | - #size-cells : shall be 0 (reg is used to encode clk id). | ||
135 | - #address-cells : shall be 1 (reg is used to encode clk id). | ||
136 | - clocks : shall be the master clock phandle. | ||
137 | e.g. clocks = <&mck>; | ||
138 | - name: device tree node describing a specific system clock. | ||
139 | * #clock-cells : from common clock binding; shall be set to 0. | ||
140 | * reg: peripheral id. See Atmel's datasheets to get a full | ||
141 | list of peripheral ids. | ||
142 | * atmel,clk-output-range : minimum and maximum clock frequency | ||
143 | (two u32 fields). Only valid on at91sam9x5-clk-peripheral | ||
144 | compatible IPs. | ||
145 | |||
146 | For example: | ||
147 | periph: periphck { | ||
148 | compatible = "atmel,at91sam9x5-clk-peripheral"; | ||
149 | #size-cells = <0>; | ||
150 | #address-cells = <1>; | ||
151 | clocks = <&mck>; | ||
152 | |||
153 | ssc0_clk { | ||
154 | #clock-cells = <0>; | ||
155 | reg = <2>; | ||
156 | atmel,clk-output-range = <0 133000000>; | ||
157 | }; | ||
158 | |||
159 | usart0_clk { | ||
160 | #clock-cells = <0>; | ||
161 | reg = <3>; | ||
162 | atmel,clk-output-range = <0 66000000>; | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | |||
167 | Required properties for pll clocks: | ||
168 | - interrupt-parent : must reference the PMC node. | ||
169 | - interrupts : shall be set to "<1>". | ||
170 | - #clock-cells : from common clock binding; shall be set to 0. | ||
171 | - clocks : shall be the main clock phandle. | ||
172 | - reg : pll id. | ||
173 | 0 -> PLL A | ||
174 | 1 -> PLL B | ||
175 | - atmel,clk-input-range : minimum and maximum source clock frequency (two u32 | ||
176 | fields). | ||
177 | e.g. input = <1 32000000>; <=> 1 to 32MHz. | ||
178 | - #atmel,pll-clk-output-range-cells : number of cells reserved for pll output | ||
179 | range description. Sould be set to 2, 3 | ||
180 | or 4. | ||
181 | * 1st and 2nd cells represent the frequency range (min-max). | ||
182 | * 3rd cell is optional and represents the OUT field value for the given | ||
183 | range. | ||
184 | * 4th cell is optional and represents the ICPLL field (PLLICPR | ||
185 | register) | ||
186 | - atmel,pll-clk-output-ranges : pll output frequency ranges + optional parameter | ||
187 | depending on #atmel,pll-output-range-cells | ||
188 | property value. | ||
189 | |||
190 | For example: | ||
191 | plla: pllack { | ||
192 | compatible = "atmel,at91sam9g45-clk-pll"; | ||
193 | interrupt-parent = <&pmc>; | ||
194 | interrupts = <1>; | ||
195 | #clock-cells = <0>; | ||
196 | clocks = <&main>; | ||
197 | reg = <0>; | ||
198 | atmel,clk-input-range = <2000000 32000000>; | ||
199 | #atmel,pll-clk-output-range-cells = <4>; | ||
200 | atmel,pll-clk-output-ranges = <74500000 800000000 0 0 | ||
201 | 69500000 750000000 1 0 | ||
202 | 64500000 700000000 2 0 | ||
203 | 59500000 650000000 3 0 | ||
204 | 54500000 600000000 0 1 | ||
205 | 49500000 550000000 1 1 | ||
206 | 44500000 500000000 2 1 | ||
207 | 40000000 450000000 3 1>; | ||
208 | }; | ||
209 | |||
210 | Required properties for plldiv clocks (plldiv = pll / 2): | ||
211 | - #clock-cells : from common clock binding; shall be set to 0. | ||
212 | - clocks : shall be the plla clock phandle. | ||
213 | |||
214 | The pll divisor is equal to 2 and cannot be changed. | ||
215 | |||
216 | For example: | ||
217 | plladiv: plladivck { | ||
218 | compatible = "atmel,at91sam9x5-clk-plldiv"; | ||
219 | #clock-cells = <0>; | ||
220 | clocks = <&plla>; | ||
221 | }; | ||
222 | |||
223 | Required properties for programmable clocks: | ||
224 | - interrupt-parent : must reference the PMC node. | ||
225 | - #size-cells : shall be 0 (reg is used to encode clk id). | ||
226 | - #address-cells : shall be 1 (reg is used to encode clk id). | ||
227 | - clocks : shall be the programmable clock source phandles. | ||
228 | e.g. clocks = <&clk32k>, <&main>, <&plla>, <&pllb>; | ||
229 | - name: device tree node describing a specific prog clock. | ||
230 | * #clock-cells : from common clock binding; shall be set to 0. | ||
231 | * reg : programmable clock id (register offset from PCKx | ||
232 | register). | ||
233 | * interrupts : shall be set to "<(8 + id)>". | ||
234 | |||
235 | For example: | ||
236 | prog: progck { | ||
237 | compatible = "atmel,at91sam9g45-clk-programmable"; | ||
238 | #size-cells = <0>; | ||
239 | #address-cells = <1>; | ||
240 | interrupt-parent = <&pmc>; | ||
241 | clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>; | ||
242 | |||
243 | prog0 { | ||
244 | #clock-cells = <0>; | ||
245 | reg = <0>; | ||
246 | interrupts = <8>; | ||
247 | }; | ||
248 | |||
249 | prog1 { | ||
250 | #clock-cells = <0>; | ||
251 | reg = <1>; | ||
252 | interrupts = <9>; | ||
253 | }; | ||
254 | }; | ||
255 | |||
256 | |||
257 | Required properties for smd clock: | ||
258 | - #clock-cells : from common clock binding; shall be set to 0. | ||
259 | - clocks : shall be the smd clock source phandles. | ||
260 | e.g. clocks = <&plladiv>, <&utmi>; | ||
261 | |||
262 | For example: | ||
263 | smd: smdck { | ||
264 | compatible = "atmel,at91sam9x5-clk-smd"; | ||
265 | #clock-cells = <0>; | ||
266 | clocks = <&plladiv>, <&utmi>; | ||
267 | }; | ||
268 | |||
269 | Required properties for system clocks: | ||
270 | - #size-cells : shall be 0 (reg is used to encode clk id). | ||
271 | - #address-cells : shall be 1 (reg is used to encode clk id). | ||
272 | - name: device tree node describing a specific system clock. | ||
273 | * #clock-cells : from common clock binding; shall be set to 0. | ||
274 | * reg: system clock id (bit position in SCER/SCDR/SCSR registers). | ||
275 | See Atmel's datasheet to get a full list of system clock ids. | ||
276 | |||
277 | For example: | ||
278 | system: systemck { | ||
279 | compatible = "atmel,at91rm9200-clk-system"; | ||
280 | #address-cells = <1>; | ||
281 | #size-cells = <0>; | ||
282 | |||
283 | ddrck { | ||
284 | #clock-cells = <0>; | ||
285 | reg = <2>; | ||
286 | clocks = <&mck>; | ||
287 | }; | ||
288 | |||
289 | uhpck { | ||
290 | #clock-cells = <0>; | ||
291 | reg = <6>; | ||
292 | clocks = <&usb>; | ||
293 | }; | ||
294 | |||
295 | udpck { | ||
296 | #clock-cells = <0>; | ||
297 | reg = <7>; | ||
298 | clocks = <&usb>; | ||
299 | }; | ||
300 | }; | ||
301 | |||
302 | |||
303 | Required properties for usb clock: | ||
304 | - #clock-cells : from common clock binding; shall be set to 0. | ||
305 | - clocks : shall be the smd clock source phandles. | ||
306 | e.g. clocks = <&pllb>; | ||
307 | - atmel,clk-divisors (only available for "atmel,at91rm9200-clk-usb"): | ||
308 | usb clock divisor table. | ||
309 | e.g. divisors = <1 2 4 0>; | ||
310 | |||
311 | For example: | ||
312 | usb: usbck { | ||
313 | compatible = "atmel,at91sam9x5-clk-usb"; | ||
314 | #clock-cells = <0>; | ||
315 | clocks = <&plladiv>, <&utmi>; | ||
316 | }; | ||
317 | |||
318 | usb: usbck { | ||
319 | compatible = "atmel,at91rm9200-clk-usb"; | ||
320 | #clock-cells = <0>; | ||
321 | clocks = <&pllb>; | ||
322 | atmel,clk-divisors = <1 2 4 0>; | ||
323 | }; | ||
324 | |||
325 | |||
326 | Required properties for utmi clock: | ||
327 | - interrupt-parent : must reference the PMC node. | ||
328 | - interrupts : shall be set to "<AT91_PMC_LOCKU IRQ_TYPE_LEVEL_HIGH>". | ||
329 | - #clock-cells : from common clock binding; shall be set to 0. | ||
330 | - clocks : shall be the main clock source phandle. | ||
331 | |||
332 | For example: | ||
333 | utmi: utmick { | ||
334 | compatible = "atmel,at91sam9x5-clk-utmi"; | ||
335 | interrupt-parent = <&pmc>; | ||
336 | interrupts = <AT91_PMC_LOCKU IRQ_TYPE_LEVEL_HIGH>; | ||
337 | #clock-cells = <0>; | ||
338 | clocks = <&main>; | ||
339 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/ste-dma40.txt b/Documentation/devicetree/bindings/dma/ste-dma40.txt index a8c21c256baa..1f5729f10621 100644 --- a/Documentation/devicetree/bindings/dma/ste-dma40.txt +++ b/Documentation/devicetree/bindings/dma/ste-dma40.txt | |||
@@ -50,6 +50,9 @@ Each dmas request consists of 4 cells: | |||
50 | 0x00000008: Use fixed channel: | 50 | 0x00000008: Use fixed channel: |
51 | Use automatic channel selection when unset | 51 | Use automatic channel selection when unset |
52 | Use DMA request line number when set | 52 | Use DMA request line number when set |
53 | 0x00000010: Set channel as high priority: | ||
54 | Normal priority when unset | ||
55 | High priority when set | ||
53 | 56 | ||
54 | Example: | 57 | Example: |
55 | 58 | ||
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index c67b975c8906..532b1d440abc 100644 --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt | |||
@@ -16,6 +16,8 @@ Required Properties: | |||
16 | specific extensions. | 16 | specific extensions. |
17 | - "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250 | 17 | - "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250 |
18 | specific extensions. | 18 | specific extensions. |
19 | - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420 | ||
20 | specific extensions. | ||
19 | 21 | ||
20 | * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface | 22 | * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface |
21 | unit (ciu) clock. This property is applicable only for Exynos5 SoC's and | 23 | unit (ciu) clock. This property is applicable only for Exynos5 SoC's and |
diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt index b5a86d20ee36..167d5dab9f64 100644 --- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt +++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt | |||
@@ -31,38 +31,58 @@ Required properties: | |||
31 | 7: .. | 31 | 7: .. |
32 | i: Local Timer Interrupt n | 32 | i: Local Timer Interrupt n |
33 | 33 | ||
34 | Example 1: In this example, the system uses only the first global timer | 34 | For MCT block that uses a per-processor interrupt for local timers, such |
35 | interrupt generated by MCT and the remaining three global timer | 35 | as ones compatible with "samsung,exynos4412-mct", only one local timer |
36 | interrupts are unused. Two local timer interrupts have been | 36 | interrupt might be specified, meaning that all local timers use the same |
37 | specified. | 37 | per processor interrupt. |
38 | |||
39 | Example 1: In this example, the IP contains two local timers, using separate | ||
40 | interrupts, so two local timer interrupts have been specified, | ||
41 | in addition to four global timer interrupts. | ||
38 | 42 | ||
39 | mct@10050000 { | 43 | mct@10050000 { |
40 | compatible = "samsung,exynos4210-mct"; | 44 | compatible = "samsung,exynos4210-mct"; |
41 | reg = <0x10050000 0x800>; | 45 | reg = <0x10050000 0x800>; |
42 | interrupts = <0 57 0>, <0 0 0>, <0 0 0>, <0 0 0>, | 46 | interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, |
43 | <0 42 0>, <0 48 0>; | 47 | <0 42 0>, <0 48 0>; |
44 | }; | 48 | }; |
45 | 49 | ||
46 | Example 2: In this example, the MCT global and local timer interrupts are | 50 | Example 2: In this example, the timer interrupts are connected to two separate |
47 | connected to two separate interrupt controllers. Hence, an | 51 | interrupt controllers. Hence, an interrupt-map is created to map |
48 | interrupt-map is created to map the interrupts to the respective | 52 | the interrupts to the respective interrupt controllers. |
49 | interrupt controllers. | ||
50 | 53 | ||
51 | mct@101C0000 { | 54 | mct@101C0000 { |
52 | compatible = "samsung,exynos4210-mct"; | 55 | compatible = "samsung,exynos4210-mct"; |
53 | reg = <0x101C0000 0x800>; | 56 | reg = <0x101C0000 0x800>; |
54 | interrupt-controller; | ||
55 | #interrups-cells = <2>; | ||
56 | interrupt-parent = <&mct_map>; | 57 | interrupt-parent = <&mct_map>; |
57 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | 58 | interrupts = <0>, <1>, <2>, <3>, <4>, <5>; |
58 | <4 0>, <5 0>; | ||
59 | 59 | ||
60 | mct_map: mct-map { | 60 | mct_map: mct-map { |
61 | #interrupt-cells = <2>; | 61 | #interrupt-cells = <1>; |
62 | #address-cells = <0>; | 62 | #address-cells = <0>; |
63 | #size-cells = <0>; | 63 | #size-cells = <0>; |
64 | interrupt-map = <0x0 0 &combiner 23 3>, | 64 | interrupt-map = <0 &gic 0 57 0>, |
65 | <0x4 0 &gic 0 120 0>, | 65 | <1 &gic 0 69 0>, |
66 | <0x5 0 &gic 0 121 0>; | 66 | <2 &combiner 12 6>, |
67 | <3 &combiner 12 7>, | ||
68 | <4 &gic 0 42 0>, | ||
69 | <5 &gic 0 48 0>; | ||
67 | }; | 70 | }; |
68 | }; | 71 | }; |
72 | |||
73 | Example 3: In this example, the IP contains four local timers, but using | ||
74 | a per-processor interrupt to handle them. Either all the local | ||
75 | timer interrupts can be specified, with the same interrupt specifier | ||
76 | value or just the first one. | ||
77 | |||
78 | mct@10050000 { | ||
79 | compatible = "samsung,exynos4412-mct"; | ||
80 | reg = <0x10050000 0x800>; | ||
81 | |||
82 | /* Both ways are possible in this case. Either: */ | ||
83 | interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, | ||
84 | <0 42 0>; | ||
85 | /* or: */ | ||
86 | interrupts = <0 57 0>, <0 69 0>, <0 70 0>, <0 71 0>, | ||
87 | <0 42 0>, <0 42 0>, <0 42 0>, <0 42 0>; | ||
88 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/keystone-phy.txt b/Documentation/devicetree/bindings/usb/keystone-phy.txt new file mode 100644 index 000000000000..f37b3a86341d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/keystone-phy.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | TI Keystone USB PHY | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "ti,keystone-usbphy". | ||
5 | - #address-cells, #size-cells : should be '1' if the device has sub-nodes | ||
6 | with 'reg' property. | ||
7 | - reg : Address and length of the usb phy control register set. | ||
8 | |||
9 | The main purpose of this PHY driver is to enable the USB PHY reference clock | ||
10 | gate on the Keystone SOC for both the USB2 and USB3 PHY. Otherwise it is just | ||
11 | an NOP PHY driver. Hence this node is referenced as both the usb2 and usb3 | ||
12 | phy node in the USB Glue layer driver node. | ||
13 | |||
14 | usb_phy: usb_phy@2620738 { | ||
15 | compatible = "ti,keystone-usbphy"; | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | reg = <0x2620738 32>; | ||
19 | status = "disabled"; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/keystone-usb.txt b/Documentation/devicetree/bindings/usb/keystone-usb.txt new file mode 100644 index 000000000000..60527d335b58 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/keystone-usb.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | TI Keystone Soc USB Controller | ||
2 | |||
3 | DWC3 GLUE | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be "ti,keystone-dwc3". | ||
7 | - #address-cells, #size-cells : should be '1' if the device has sub-nodes | ||
8 | with 'reg' property. | ||
9 | - reg : Address and length of the register set for the USB subsystem on | ||
10 | the SOC. | ||
11 | - interrupts : The irq number of this device that is used to interrupt the | ||
12 | MPU. | ||
13 | - ranges: allows valid 1:1 translation between child's address space and | ||
14 | parent's address space. | ||
15 | - clocks: Clock IDs array as required by the controller. | ||
16 | - clock-names: names of clocks correseponding to IDs in the clock property. | ||
17 | |||
18 | Sub-nodes: | ||
19 | The dwc3 core should be added as subnode to Keystone DWC3 glue. | ||
20 | - dwc3 : | ||
21 | The binding details of dwc3 can be found in: | ||
22 | Documentation/devicetree/bindings/usb/dwc3.txt | ||
23 | |||
24 | Example: | ||
25 | usb: usb@2680000 { | ||
26 | compatible = "ti,keystone-dwc3"; | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <1>; | ||
29 | reg = <0x2680000 0x10000>; | ||
30 | clocks = <&clkusb>; | ||
31 | clock-names = "usb"; | ||
32 | interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; | ||
33 | ranges; | ||
34 | status = "disabled"; | ||
35 | |||
36 | dwc3@2690000 { | ||
37 | compatible = "synopsys,dwc3"; | ||
38 | reg = <0x2690000 0x70000>; | ||
39 | interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; | ||
40 | usb-phy = <&usb_phy>, <&usb_phy>; | ||
41 | }; | ||
42 | }; | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c1f1a7eee953..483d316543ad 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -644,8 +644,9 @@ config ARCH_MSM | |||
644 | stack and controls some vital subsystems | 644 | stack and controls some vital subsystems |
645 | (clock and power control, etc). | 645 | (clock and power control, etc). |
646 | 646 | ||
647 | config ARCH_SHMOBILE | 647 | config ARCH_SHMOBILE_LEGACY |
648 | bool "Renesas SH-Mobile / R-Mobile" | 648 | bool "Renesas SH-Mobile / R-Mobile (non-multiplatform)" |
649 | select ARCH_SHMOBILE | ||
649 | select ARM_PATCH_PHYS_VIRT | 650 | select ARM_PATCH_PHYS_VIRT |
650 | select CLKDEV_LOOKUP | 651 | select CLKDEV_LOOKUP |
651 | select GENERIC_CLOCKEVENTS | 652 | select GENERIC_CLOCKEVENTS |
@@ -660,7 +661,8 @@ config ARCH_SHMOBILE | |||
660 | select PM_GENERIC_DOMAINS if PM | 661 | select PM_GENERIC_DOMAINS if PM |
661 | select SPARSE_IRQ | 662 | select SPARSE_IRQ |
662 | help | 663 | help |
663 | Support for Renesas's SH-Mobile and R-Mobile ARM platforms. | 664 | Support for Renesas's SH-Mobile and R-Mobile ARM platforms using |
665 | a non-multiplatform kernel. | ||
664 | 666 | ||
665 | config ARCH_RPC | 667 | config ARCH_RPC |
666 | bool "RiscPC" | 668 | bool "RiscPC" |
@@ -1611,7 +1613,7 @@ config HZ_FIXED | |||
1611 | default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \ | 1613 | default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \ |
1612 | ARCH_S5PV210 || ARCH_EXYNOS4 | 1614 | ARCH_S5PV210 || ARCH_EXYNOS4 |
1613 | default AT91_TIMER_HZ if ARCH_AT91 | 1615 | default AT91_TIMER_HZ if ARCH_AT91 |
1614 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE | 1616 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE_LEGACY |
1615 | default 0 | 1617 | default 0 |
1616 | 1618 | ||
1617 | choice | 1619 | choice |
@@ -1796,8 +1798,8 @@ config ARCH_WANT_GENERAL_HUGETLB | |||
1796 | source "mm/Kconfig" | 1798 | source "mm/Kconfig" |
1797 | 1799 | ||
1798 | config FORCE_MAX_ZONEORDER | 1800 | config FORCE_MAX_ZONEORDER |
1799 | int "Maximum zone order" if ARCH_SHMOBILE | 1801 | int "Maximum zone order" if ARCH_SHMOBILE_LEGACY |
1800 | range 11 64 if ARCH_SHMOBILE | 1802 | range 11 64 if ARCH_SHMOBILE_LEGACY |
1801 | default "12" if SOC_AM33XX | 1803 | default "12" if SOC_AM33XX |
1802 | default "9" if SA1111 | 1804 | default "9" if SA1111 |
1803 | default "11" | 1805 | default "11" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c99b1086d83d..1edf8ebd8494 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -190,7 +190,6 @@ machine-$(CONFIG_ARCH_S5PC100) += s5pc100 | |||
190 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 | 190 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 |
191 | machine-$(CONFIG_ARCH_SA1100) += sa1100 | 191 | machine-$(CONFIG_ARCH_SA1100) += sa1100 |
192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile | 192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile |
193 | machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile | ||
194 | machine-$(CONFIG_ARCH_SIRF) += prima2 | 193 | machine-$(CONFIG_ARCH_SIRF) += prima2 |
195 | machine-$(CONFIG_ARCH_SOCFPGA) += socfpga | 194 | machine-$(CONFIG_ARCH_SOCFPGA) += socfpga |
196 | machine-$(CONFIG_ARCH_STI) += sti | 195 | machine-$(CONFIG_ARCH_STI) += sti |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index e7190bb5998e..f54d5a25c7ee 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -64,7 +64,7 @@ else | |||
64 | endif | 64 | endif |
65 | endif | 65 | endif |
66 | 66 | ||
67 | ifeq ($(CONFIG_ARCH_SHMOBILE),y) | 67 | ifeq ($(CONFIG_ARCH_SHMOBILE_LEGACY),y) |
68 | OBJS += head-shmobile.o | 68 | OBJS += head-shmobile.o |
69 | endif | 69 | endif |
70 | 70 | ||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index d57c1a65b24f..25d708c47eb5 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -30,6 +30,7 @@ dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb | |||
30 | dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb | 30 | dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb |
31 | # sam9x5 | 31 | # sam9x5 |
32 | dtb-$(CONFIG_ARCH_AT91) += at91-ariag25.dtb | 32 | dtb-$(CONFIG_ARCH_AT91) += at91-ariag25.dtb |
33 | dtb-$(CONFIG_ARCH_AT91) += at91-cosino_mega2560.dtb | ||
33 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g15ek.dtb | 34 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g15ek.dtb |
34 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g25ek.dtb | 35 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g25ek.dtb |
35 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb | 36 | dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb |
@@ -40,6 +41,8 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb | |||
40 | dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb | 41 | dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb |
41 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb | 42 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb |
42 | dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb | 43 | dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb |
44 | dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb | ||
45 | |||
43 | dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb | 46 | dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb |
44 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 47 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
45 | dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm11351-brt.dtb \ | 48 | dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm11351-brt.dtb \ |
@@ -90,6 +93,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ | |||
90 | kirkwood-mplcec4.dtb \ | 93 | kirkwood-mplcec4.dtb \ |
91 | kirkwood-mv88f6281gtw-ge.dtb \ | 94 | kirkwood-mv88f6281gtw-ge.dtb \ |
92 | kirkwood-netgear_readynas_duo_v2.dtb \ | 95 | kirkwood-netgear_readynas_duo_v2.dtb \ |
96 | kirkwood-netgear_readynas_nv+_v2.dtb \ | ||
93 | kirkwood-ns2.dtb \ | 97 | kirkwood-ns2.dtb \ |
94 | kirkwood-ns2lite.dtb \ | 98 | kirkwood-ns2lite.dtb \ |
95 | kirkwood-ns2max.dtb \ | 99 | kirkwood-ns2max.dtb \ |
@@ -104,6 +108,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ | |||
104 | kirkwood-ts219-6281.dtb \ | 108 | kirkwood-ts219-6281.dtb \ |
105 | kirkwood-ts219-6282.dtb | 109 | kirkwood-ts219-6282.dtb |
106 | dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb | 110 | dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb |
111 | dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb | ||
107 | dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \ | 112 | dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \ |
108 | qcom-msm8960-cdp.dtb | 113 | qcom-msm8960-cdp.dtb |
109 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ | 114 | dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ |
@@ -114,6 +119,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ | |||
114 | armada-xp-axpwifiap.dtb \ | 119 | armada-xp-axpwifiap.dtb \ |
115 | armada-xp-db.dtb \ | 120 | armada-xp-db.dtb \ |
116 | armada-xp-gp.dtb \ | 121 | armada-xp-gp.dtb \ |
122 | armada-xp-netgear-rn2120.dtb \ | ||
117 | armada-xp-matrix.dtb \ | 123 | armada-xp-matrix.dtb \ |
118 | armada-xp-openblocks-ax3-4.dtb | 124 | armada-xp-openblocks-ax3-4.dtb |
119 | dtb-$(CONFIG_ARCH_MXC) += \ | 125 | dtb-$(CONFIG_ARCH_MXC) += \ |
@@ -216,7 +222,7 @@ dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \ | |||
216 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb | 222 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb |
217 | dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \ | 223 | dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \ |
218 | s3c6410-smdk6410.dtb | 224 | s3c6410-smdk6410.dtb |
219 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | 225 | dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ |
220 | r7s72100-genmai.dtb \ | 226 | r7s72100-genmai.dtb \ |
221 | r8a7740-armadillo800eva.dtb \ | 227 | r8a7740-armadillo800eva.dtb \ |
222 | r8a7778-bockw.dtb \ | 228 | r8a7778-bockw.dtb \ |
@@ -225,6 +231,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | |||
225 | r8a7779-marzen.dtb \ | 231 | r8a7779-marzen.dtb \ |
226 | r8a7779-marzen-reference.dtb \ | 232 | r8a7779-marzen-reference.dtb \ |
227 | r8a7791-koelsch.dtb \ | 233 | r8a7791-koelsch.dtb \ |
234 | r8a7791-koelsch-reference.dtb \ | ||
228 | r8a7790-lager.dtb \ | 235 | r8a7790-lager.dtb \ |
229 | r8a7790-lager-reference.dtb \ | 236 | r8a7790-lager-reference.dtb \ |
230 | sh73a0-kzm9g.dtb \ | 237 | sh73a0-kzm9g.dtb \ |
diff --git a/arch/arm/boot/dts/animeo_ip.dts b/arch/arm/boot/dts/animeo_ip.dts index 3a1de9eb5111..3c4f6d983cbd 100644 --- a/arch/arm/boot/dts/animeo_ip.dts +++ b/arch/arm/boot/dts/animeo_ip.dts | |||
@@ -90,34 +90,19 @@ | |||
90 | nand-on-flash-bbt; | 90 | nand-on-flash-bbt; |
91 | status = "okay"; | 91 | status = "okay"; |
92 | 92 | ||
93 | at91bootstrap@0 { | 93 | barebox@0 { |
94 | label = "at91bootstrap"; | ||
95 | reg = <0x0 0x8000>; | ||
96 | }; | ||
97 | |||
98 | barebox@8000 { | ||
99 | label = "barebox"; | 94 | label = "barebox"; |
100 | reg = <0x8000 0x40000>; | 95 | reg = <0x0 0x58000>; |
101 | }; | ||
102 | |||
103 | bareboxenv@48000 { | ||
104 | label = "bareboxenv"; | ||
105 | reg = <0x48000 0x8000>; | ||
106 | }; | ||
107 | |||
108 | user_block@0x50000 { | ||
109 | label = "user_block"; | ||
110 | reg = <0x50000 0xb0000>; | ||
111 | }; | 96 | }; |
112 | 97 | ||
113 | kernel@100000 { | 98 | u_boot_env@58000 { |
114 | label = "kernel"; | 99 | label = "u_boot_env"; |
115 | reg = <0x100000 0x1b0000>; | 100 | reg = <0x58000 0x8000>; |
116 | }; | 101 | }; |
117 | 102 | ||
118 | root@2b0000 { | 103 | ubi@60000 { |
119 | label = "root"; | 104 | label = "ubi"; |
120 | reg = <0x2b0000 0x1D50000>; | 105 | reg = <0x60000 0x1FA0000>; |
121 | }; | 106 | }; |
122 | }; | 107 | }; |
123 | 108 | ||
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index 2471d9da767b..944e8785b308 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts | |||
@@ -74,13 +74,13 @@ | |||
74 | green_pwr_led { | 74 | green_pwr_led { |
75 | label = "mirabox:green:pwr"; | 75 | label = "mirabox:green:pwr"; |
76 | gpios = <&gpio1 31 1>; | 76 | gpios = <&gpio1 31 1>; |
77 | linux,default-trigger = "heartbeat"; | 77 | default-state = "keep"; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | blue_stat_led { | 80 | blue_stat_led { |
81 | label = "mirabox:blue:stat"; | 81 | label = "mirabox:blue:stat"; |
82 | gpios = <&gpio2 0 1>; | 82 | gpios = <&gpio2 0 1>; |
83 | linux,default-trigger = "cpu0"; | 83 | default-state = "off"; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | green_stat_led { | 86 | green_stat_led { |
@@ -139,6 +139,27 @@ | |||
139 | reg = <0x25>; | 139 | reg = <0x25>; |
140 | }; | 140 | }; |
141 | }; | 141 | }; |
142 | |||
143 | nand@d0000 { | ||
144 | status = "okay"; | ||
145 | num-cs = <1>; | ||
146 | marvell,nand-keep-config; | ||
147 | marvell,nand-enable-arbiter; | ||
148 | nand-on-flash-bbt; | ||
149 | |||
150 | partition@0 { | ||
151 | label = "U-Boot"; | ||
152 | reg = <0 0x400000>; | ||
153 | }; | ||
154 | partition@400000 { | ||
155 | label = "Linux"; | ||
156 | reg = <0x400000 0x400000>; | ||
157 | }; | ||
158 | partition@800000 { | ||
159 | label = "Filesystem"; | ||
160 | reg = <0x800000 0x3f800000>; | ||
161 | }; | ||
162 | }; | ||
142 | }; | 163 | }; |
143 | }; | 164 | }; |
144 | }; | 165 | }; |
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts index 8ac2ac1f69cc..6a7383f24c7c 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | 13 | ||
14 | #include <dt-bindings/input/input.h> | ||
15 | #include <dt-bindings/gpio/gpio.h> | ||
14 | #include "armada-370.dtsi" | 16 | #include "armada-370.dtsi" |
15 | 17 | ||
16 | / { | 18 | / { |
@@ -62,6 +64,7 @@ | |||
62 | marvell,pins = "mpp57"; | 64 | marvell,pins = "mpp57"; |
63 | marvell,function = "gpio"; | 65 | marvell,function = "gpio"; |
64 | }; | 66 | }; |
67 | |||
65 | sata1_led_pin: sata1-led-pin { | 68 | sata1_led_pin: sata1-led-pin { |
66 | marvell,pins = "mpp15"; | 69 | marvell,pins = "mpp15"; |
67 | marvell,function = "gpio"; | 70 | marvell,function = "gpio"; |
@@ -77,6 +80,21 @@ | |||
77 | marvell,function = "gpio"; | 80 | marvell,function = "gpio"; |
78 | }; | 81 | }; |
79 | 82 | ||
83 | backup_button_pin: backup-button-pin { | ||
84 | marvell,pins = "mpp58"; | ||
85 | marvell,function = "gpio"; | ||
86 | }; | ||
87 | |||
88 | power_button_pin: power-button-pin { | ||
89 | marvell,pins = "mpp62"; | ||
90 | marvell,function = "gpio"; | ||
91 | }; | ||
92 | |||
93 | reset_button_pin: reset-button-pin { | ||
94 | marvell,pins = "mpp6"; | ||
95 | marvell,function = "gpio"; | ||
96 | }; | ||
97 | |||
80 | poweroff: poweroff { | 98 | poweroff: poweroff { |
81 | marvell,pins = "mpp8"; | 99 | marvell,pins = "mpp8"; |
82 | marvell,function = "gpio"; | 100 | marvell,function = "gpio"; |
@@ -84,7 +102,7 @@ | |||
84 | }; | 102 | }; |
85 | 103 | ||
86 | mdio { | 104 | mdio { |
87 | phy0: ethernet-phy@0 { | 105 | phy0: ethernet-phy@0 { /* Marvell 88E1318 */ |
88 | reg = <0>; | 106 | reg = <0>; |
89 | }; | 107 | }; |
90 | }; | 108 | }; |
@@ -113,82 +131,116 @@ | |||
113 | pwm_polarity = <0>; | 131 | pwm_polarity = <0>; |
114 | }; | 132 | }; |
115 | }; | 133 | }; |
134 | |||
135 | nand@d0000 { | ||
136 | status = "okay"; | ||
137 | num-cs = <1>; | ||
138 | marvell,nand-keep-config; | ||
139 | marvell,nand-enable-arbiter; | ||
140 | nand-on-flash-bbt; | ||
141 | |||
142 | partition@0 { | ||
143 | label = "u-boot"; | ||
144 | reg = <0x0000000 0x180000>; /* 1.5MB */ | ||
145 | read-only; | ||
146 | }; | ||
147 | |||
148 | partition@180000 { | ||
149 | label = "u-boot-env"; | ||
150 | reg = <0x180000 0x20000>; /* 128KB */ | ||
151 | read-only; | ||
152 | }; | ||
153 | |||
154 | partition@200000 { | ||
155 | label = "uImage"; | ||
156 | reg = <0x0200000 0x600000>; /* 6MB */ | ||
157 | }; | ||
158 | |||
159 | partition@800000 { | ||
160 | label = "minirootfs"; | ||
161 | reg = <0x0800000 0x400000>; /* 4MB */ | ||
162 | }; | ||
163 | |||
164 | /* Last MB is for the BBT, i.e. not writable */ | ||
165 | partition@c00000 { | ||
166 | label = "ubifs"; | ||
167 | reg = <0x0c00000 0x7400000>; /* 116MB */ | ||
168 | }; | ||
169 | }; | ||
116 | }; | 170 | }; |
117 | }; | 171 | }; |
118 | 172 | ||
119 | clocks { | 173 | clocks { |
120 | #address-cells = <1>; | 174 | g762_clk: g762-oscillator { |
121 | #size-cells = <0>; | ||
122 | |||
123 | g762_clk: fixedclk { | ||
124 | compatible = "fixed-clock"; | 175 | compatible = "fixed-clock"; |
125 | #clock-cells = <0>; | 176 | #clock-cells = <0>; |
126 | clock-frequency = <8192>; | 177 | clock-frequency = <8192>; |
127 | }; | 178 | }; |
128 | }; | 179 | }; |
129 | 180 | ||
130 | gpio_leds { | 181 | gpio-leds { |
131 | compatible = "gpio-leds"; | 182 | compatible = "gpio-leds"; |
132 | pinctrl-0 = < &power_led_pin | 183 | pinctrl-0 = <&power_led_pin |
133 | &sata1_led_pin | 184 | &sata1_led_pin |
134 | &sata2_led_pin | 185 | &sata2_led_pin |
135 | &backup_led_pin >; | 186 | &backup_led_pin>; |
136 | pinctrl-names = "default"; | 187 | pinctrl-names = "default"; |
137 | 188 | ||
138 | blue_power_led { | 189 | blue-power-led { |
139 | label = "rn102:blue:pwr"; | 190 | label = "rn102:blue:pwr"; |
140 | gpios = <&gpio1 25 1>; /* GPIO 57 Active Low */ | 191 | gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; |
141 | linux,default-trigger = "heartbeat"; | 192 | default-state = "keep"; |
142 | }; | 193 | }; |
143 | 194 | ||
144 | green_sata1_led { | 195 | green-sata1-led { |
145 | label = "rn102:green:sata1"; | 196 | label = "rn102:green:sata1"; |
146 | gpios = <&gpio0 15 1>; /* GPIO 15 Active Low */ | 197 | gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; |
147 | default-state = "on"; | 198 | default-state = "on"; |
148 | }; | 199 | }; |
149 | 200 | ||
150 | green_sata2_led { | 201 | green-sata2-led { |
151 | label = "rn102:green:sata2"; | 202 | label = "rn102:green:sata2"; |
152 | gpios = <&gpio0 14 1>; /* GPIO 14 Active Low */ | 203 | gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; |
153 | default-state = "on"; | 204 | default-state = "on"; |
154 | }; | 205 | }; |
155 | 206 | ||
156 | green_backup_led { | 207 | green-backup-led { |
157 | label = "rn102:green:backup"; | 208 | label = "rn102:green:backup"; |
158 | gpios = <&gpio1 24 1>; /* GPIO 56 Active Low */ | 209 | gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; |
159 | default-state = "on"; | 210 | default-state = "on"; |
160 | }; | 211 | }; |
161 | }; | 212 | }; |
162 | 213 | ||
163 | gpio_keys { | 214 | gpio-keys { |
164 | compatible = "gpio-keys"; | 215 | compatible = "gpio-keys"; |
165 | #address-cells = <1>; | 216 | pinctrl-0 = <&power_button_pin |
166 | #size-cells = <0>; | 217 | &reset_button_pin |
218 | &backup_button_pin>; | ||
219 | pinctrl-names = "default"; | ||
167 | 220 | ||
168 | button@1 { | 221 | power-button { |
169 | label = "Power Button"; | 222 | label = "Power Button"; |
170 | linux,code = <116>; /* KEY_POWER */ | 223 | linux,code = <KEY_POWER>; |
171 | gpios = <&gpio1 30 0>; | 224 | gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; |
172 | }; | 225 | }; |
173 | 226 | ||
174 | button@2 { | 227 | reset-button { |
175 | label = "Reset Button"; | 228 | label = "Reset Button"; |
176 | linux,code = <0x198>; /* KEY_RESTART */ | 229 | linux,code = <KEY_RESTART>; |
177 | gpios = <&gpio0 6 1>; | 230 | gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; |
178 | }; | 231 | }; |
179 | 232 | ||
180 | button@3 { | 233 | backup-button { |
181 | label = "Backup Button"; | 234 | label = "Backup Button"; |
182 | linux,code = <133>; /* KEY_COPY */ | 235 | linux,code = <KEY_COPY>; |
183 | gpios = <&gpio1 26 1>; | 236 | gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; |
184 | }; | 237 | }; |
185 | }; | 238 | }; |
186 | 239 | ||
187 | gpio_poweroff { | 240 | gpio-poweroff { |
188 | compatible = "gpio-poweroff"; | 241 | compatible = "gpio-poweroff"; |
189 | pinctrl-0 = <&poweroff>; | 242 | pinctrl-0 = <&poweroff>; |
190 | pinctrl-names = "default"; | 243 | pinctrl-names = "default"; |
191 | gpios = <&gpio0 8 1>; | 244 | gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; |
192 | }; | 245 | }; |
193 | |||
194 | }; | 246 | }; |
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts index b0b32f5fbeb4..272e2e2fc58f 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | 13 | ||
14 | #include <dt-bindings/input/input.h> | ||
15 | #include <dt-bindings/gpio/gpio.h> | ||
14 | #include "armada-370.dtsi" | 16 | #include "armada-370.dtsi" |
15 | 17 | ||
16 | / { | 18 | / { |
@@ -58,12 +60,12 @@ | |||
58 | marvell,function = "gpio"; | 60 | marvell,function = "gpio"; |
59 | }; | 61 | }; |
60 | 62 | ||
61 | backup_key_pin: backup-key-pin { | 63 | backup_button_pin: backup-button-pin { |
62 | marvell,pins = "mpp52"; | 64 | marvell,pins = "mpp52"; |
63 | marvell,function = "gpio"; | 65 | marvell,function = "gpio"; |
64 | }; | 66 | }; |
65 | 67 | ||
66 | power_key_pin: power-key-pin { | 68 | power_button_pin: power-button-pin { |
67 | marvell,pins = "mpp62"; | 69 | marvell,pins = "mpp62"; |
68 | marvell,function = "gpio"; | 70 | marvell,function = "gpio"; |
69 | }; | 71 | }; |
@@ -78,18 +80,18 @@ | |||
78 | marvell,function = "gpio"; | 80 | marvell,function = "gpio"; |
79 | }; | 81 | }; |
80 | 82 | ||
81 | reset_key_pin: reset-key-pin { | 83 | reset_button_pin: reset-button-pin { |
82 | marvell,pins = "mpp65"; | 84 | marvell,pins = "mpp65"; |
83 | marvell,function = "gpio"; | 85 | marvell,function = "gpio"; |
84 | }; | 86 | }; |
85 | }; | 87 | }; |
86 | 88 | ||
87 | mdio { | 89 | mdio { |
88 | phy0: ethernet-phy@0 { | 90 | phy0: ethernet-phy@0 { /* Marvell 88E1318 */ |
89 | reg = <0>; | 91 | reg = <0>; |
90 | }; | 92 | }; |
91 | 93 | ||
92 | phy1: ethernet-phy@1 { | 94 | phy1: ethernet-phy@1 { /* Marvell 88E1318 */ |
93 | reg = <1>; | 95 | reg = <1>; |
94 | }; | 96 | }; |
95 | }; | 97 | }; |
@@ -123,71 +125,133 @@ | |||
123 | fan_startv = <1>; | 125 | fan_startv = <1>; |
124 | pwm_polarity = <0>; | 126 | pwm_polarity = <0>; |
125 | }; | 127 | }; |
128 | |||
129 | pca9554: pca9554@23 { | ||
130 | compatible = "nxp,pca9554"; | ||
131 | gpio-controller; | ||
132 | #gpio-cells = <2>; | ||
133 | reg = <0x23>; | ||
134 | }; | ||
135 | }; | ||
136 | |||
137 | nand@d0000 { | ||
138 | status = "okay"; | ||
139 | num-cs = <1>; | ||
140 | marvell,nand-keep-config; | ||
141 | marvell,nand-enable-arbiter; | ||
142 | nand-on-flash-bbt; | ||
143 | |||
144 | partition@0 { | ||
145 | label = "u-boot"; | ||
146 | reg = <0x0000000 0x180000>; /* 1.5MB */ | ||
147 | read-only; | ||
148 | }; | ||
149 | |||
150 | partition@180000 { | ||
151 | label = "u-boot-env"; | ||
152 | reg = <0x180000 0x20000>; /* 128KB */ | ||
153 | read-only; | ||
154 | }; | ||
155 | |||
156 | partition@200000 { | ||
157 | label = "uImage"; | ||
158 | reg = <0x0200000 0x600000>; /* 6MB */ | ||
159 | }; | ||
160 | |||
161 | partition@800000 { | ||
162 | label = "minirootfs"; | ||
163 | reg = <0x0800000 0x400000>; /* 4MB */ | ||
164 | }; | ||
165 | |||
166 | /* Last MB is for the BBT, i.e. not writable */ | ||
167 | partition@c00000 { | ||
168 | label = "ubifs"; | ||
169 | reg = <0x0c00000 0x7400000>; /* 116MB */ | ||
170 | }; | ||
126 | }; | 171 | }; |
127 | }; | 172 | }; |
128 | }; | 173 | }; |
129 | 174 | ||
130 | clocks { | 175 | clocks { |
131 | #address-cells = <1>; | 176 | g762_clk: g762-oscillator { |
132 | #size-cells = <0>; | ||
133 | |||
134 | g762_clk: fixedclk { | ||
135 | compatible = "fixed-clock"; | 177 | compatible = "fixed-clock"; |
136 | #clock-cells = <0>; | 178 | #clock-cells = <0>; |
137 | clock-frequency = <8192>; | 179 | clock-frequency = <8192>; |
138 | }; | 180 | }; |
139 | }; | 181 | }; |
140 | 182 | ||
141 | gpio_leds { | 183 | gpio-leds { |
142 | compatible = "gpio-leds"; | 184 | compatible = "gpio-leds"; |
143 | pinctrl-0 = <&backup_led_pin &power_led_pin>; | 185 | pinctrl-0 = <&backup_led_pin &power_led_pin>; |
144 | pinctrl-names = "default"; | 186 | pinctrl-names = "default"; |
145 | 187 | ||
146 | blue_backup_led { | 188 | blue-backup-led { |
147 | label = "rn104:blue:backup"; | 189 | label = "rn104:blue:backup"; |
148 | gpios = <&gpio1 31 0>; /* GPIO 63 Active High */ | 190 | gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; |
149 | default-state = "off"; | 191 | default-state = "off"; |
150 | }; | 192 | }; |
151 | 193 | ||
152 | blue_power_led { | 194 | blue-power-led { |
153 | label = "rn104:blue:pwr"; | 195 | label = "rn104:blue:pwr"; |
154 | gpios = <&gpio2 0 1>; /* GPIO 64 Active Low */ | 196 | gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; |
155 | linux,default-trigger = "keep"; | 197 | linux,default-trigger = "keep"; |
156 | }; | 198 | }; |
199 | |||
200 | blue-sata1-led { | ||
201 | label = "rn104:blue:sata1"; | ||
202 | gpios = <&pca9554 0 GPIO_ACTIVE_LOW>; | ||
203 | default-state = "off"; | ||
204 | }; | ||
205 | |||
206 | blue-sata2-led { | ||
207 | label = "rn104:blue:sata2"; | ||
208 | gpios = <&pca9554 1 GPIO_ACTIVE_LOW>; | ||
209 | default-state = "off"; | ||
210 | }; | ||
211 | |||
212 | blue-sata3-led { | ||
213 | label = "rn104:blue:sata3"; | ||
214 | gpios = <&pca9554 2 GPIO_ACTIVE_LOW>; | ||
215 | default-state = "off"; | ||
216 | }; | ||
217 | |||
218 | blue-sata4-led { | ||
219 | label = "rn104:blue:sata4"; | ||
220 | gpios = <&pca9554 3 GPIO_ACTIVE_LOW>; | ||
221 | default-state = "off"; | ||
222 | }; | ||
157 | }; | 223 | }; |
158 | 224 | ||
159 | gpio_keys { | 225 | gpio-keys { |
160 | compatible = "gpio-keys"; | 226 | compatible = "gpio-keys"; |
161 | #address-cells = <1>; | 227 | pinctrl-0 = <&backup_button_pin |
162 | #size-cells = <0>; | 228 | &power_button_pin |
163 | pinctrl-0 = <&backup_key_pin | 229 | &reset_button_pin>; |
164 | &power_key_pin | ||
165 | &reset_key_pin>; | ||
166 | pinctrl-names = "default"; | 230 | pinctrl-names = "default"; |
167 | 231 | ||
168 | button@1 { | 232 | backup-button { |
169 | label = "Backup Button"; | 233 | label = "Backup Button"; |
170 | linux,code = <133>; /* KEY_COPY */ | 234 | linux,code = <KEY_COPY>; |
171 | gpios = <&gpio1 20 1>; | 235 | gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; |
172 | }; | 236 | }; |
173 | 237 | ||
174 | button@2 { | 238 | power-button { |
175 | label = "Power Button"; | 239 | label = "Power Button"; |
176 | linux,code = <116>; /* KEY_POWER */ | 240 | linux,code = <KEY_POWER>; |
177 | gpios = <&gpio1 30 0>; | 241 | gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; |
178 | }; | 242 | }; |
179 | 243 | ||
180 | button@3 { | 244 | reset-button { |
181 | label = "Reset Button"; | 245 | label = "Reset Button"; |
182 | linux,code = <0x198>; /* KEY_RESTART */ | 246 | linux,code = <KEY_RESTART>; |
183 | gpios = <&gpio2 1 1>; | 247 | gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; |
184 | }; | 248 | }; |
185 | }; | 249 | }; |
186 | 250 | ||
187 | gpio_poweroff { | 251 | gpio-poweroff { |
188 | compatible = "gpio-poweroff"; | 252 | compatible = "gpio-poweroff"; |
189 | pinctrl-0 = <&poweroff>; | 253 | pinctrl-0 = <&poweroff>; |
190 | pinctrl-names = "default"; | 254 | pinctrl-names = "default"; |
191 | gpios = <&gpio1 28 1>; | 255 | gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; |
192 | }; | 256 | }; |
193 | }; | 257 | }; |
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts index f81810a59629..abbb807459d2 100644 --- a/arch/arm/boot/dts/armada-370-rd.dts +++ b/arch/arm/boot/dts/armada-370-rd.dts | |||
@@ -104,6 +104,27 @@ | |||
104 | gpios = <&gpio0 6 1>; | 104 | gpios = <&gpio0 6 1>; |
105 | }; | 105 | }; |
106 | }; | 106 | }; |
107 | |||
108 | nand@d0000 { | ||
109 | status = "okay"; | ||
110 | num-cs = <1>; | ||
111 | marvell,nand-keep-config; | ||
112 | marvell,nand-enable-arbiter; | ||
113 | nand-on-flash-bbt; | ||
114 | |||
115 | partition@0 { | ||
116 | label = "U-Boot"; | ||
117 | reg = <0 0x800000>; | ||
118 | }; | ||
119 | partition@800000 { | ||
120 | label = "Linux"; | ||
121 | reg = <0x800000 0x800000>; | ||
122 | }; | ||
123 | partition@1000000 { | ||
124 | label = "Filesystem"; | ||
125 | reg = <0x1000000 0x3f000000>; | ||
126 | }; | ||
127 | }; | ||
107 | }; | 128 | }; |
108 | }; | 129 | }; |
109 | }; | 130 | }; |
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 7f10f627ae5b..b6b253924893 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
@@ -103,22 +103,52 @@ | |||
103 | #size-cells = <1>; | 103 | #size-cells = <1>; |
104 | ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; | 104 | ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; |
105 | 105 | ||
106 | mbusc: mbus-controller@20000 { | 106 | rtc@10300 { |
107 | compatible = "marvell,mbus-controller"; | 107 | compatible = "marvell,orion-rtc"; |
108 | reg = <0x20000 0x100>, <0x20180 0x20>; | 108 | reg = <0x10300 0x20>; |
109 | interrupts = <50>; | ||
109 | }; | 110 | }; |
110 | 111 | ||
111 | mpic: interrupt-controller@20000 { | 112 | spi0: spi@10600 { |
112 | compatible = "marvell,mpic"; | 113 | compatible = "marvell,orion-spi"; |
113 | #interrupt-cells = <1>; | 114 | reg = <0x10600 0x28>; |
114 | #size-cells = <1>; | 115 | #address-cells = <1>; |
115 | interrupt-controller; | 116 | #size-cells = <0>; |
116 | msi-controller; | 117 | cell-index = <0>; |
118 | interrupts = <30>; | ||
119 | clocks = <&coreclk 0>; | ||
120 | status = "disabled"; | ||
117 | }; | 121 | }; |
118 | 122 | ||
119 | coherency-fabric@20200 { | 123 | spi1: spi@10680 { |
120 | compatible = "marvell,coherency-fabric"; | 124 | compatible = "marvell,orion-spi"; |
121 | reg = <0x20200 0xb0>, <0x21010 0x1c>; | 125 | reg = <0x10680 0x28>; |
126 | #address-cells = <1>; | ||
127 | #size-cells = <0>; | ||
128 | cell-index = <1>; | ||
129 | interrupts = <92>; | ||
130 | clocks = <&coreclk 0>; | ||
131 | status = "disabled"; | ||
132 | }; | ||
133 | |||
134 | i2c0: i2c@11000 { | ||
135 | compatible = "marvell,mv64xxx-i2c"; | ||
136 | #address-cells = <1>; | ||
137 | #size-cells = <0>; | ||
138 | interrupts = <31>; | ||
139 | timeout-ms = <1000>; | ||
140 | clocks = <&coreclk 0>; | ||
141 | status = "disabled"; | ||
142 | }; | ||
143 | |||
144 | i2c1: i2c@11100 { | ||
145 | compatible = "marvell,mv64xxx-i2c"; | ||
146 | #address-cells = <1>; | ||
147 | #size-cells = <0>; | ||
148 | interrupts = <32>; | ||
149 | timeout-ms = <1000>; | ||
150 | clocks = <&coreclk 0>; | ||
151 | status = "disabled"; | ||
122 | }; | 152 | }; |
123 | 153 | ||
124 | serial@12000 { | 154 | serial@12000 { |
@@ -146,25 +176,41 @@ | |||
146 | clock-output-names = "nand"; | 176 | clock-output-names = "nand"; |
147 | }; | 177 | }; |
148 | 178 | ||
179 | mbusc: mbus-controller@20000 { | ||
180 | compatible = "marvell,mbus-controller"; | ||
181 | reg = <0x20000 0x100>, <0x20180 0x20>; | ||
182 | }; | ||
183 | |||
184 | mpic: interrupt-controller@20000 { | ||
185 | compatible = "marvell,mpic"; | ||
186 | #interrupt-cells = <1>; | ||
187 | #size-cells = <1>; | ||
188 | interrupt-controller; | ||
189 | msi-controller; | ||
190 | }; | ||
191 | |||
192 | coherency-fabric@20200 { | ||
193 | compatible = "marvell,coherency-fabric"; | ||
194 | reg = <0x20200 0xb0>, <0x21010 0x1c>; | ||
195 | }; | ||
196 | |||
149 | timer@20300 { | 197 | timer@20300 { |
150 | reg = <0x20300 0x30>, <0x21040 0x30>; | 198 | reg = <0x20300 0x30>, <0x21040 0x30>; |
151 | interrupts = <37>, <38>, <39>, <40>, <5>, <6>; | 199 | interrupts = <37>, <38>, <39>, <40>, <5>, <6>; |
152 | }; | 200 | }; |
153 | 201 | ||
154 | sata@a0000 { | 202 | usb@50000 { |
155 | compatible = "marvell,orion-sata"; | 203 | compatible = "marvell,orion-ehci"; |
156 | reg = <0xa0000 0x5000>; | 204 | reg = <0x50000 0x500>; |
157 | interrupts = <55>; | 205 | interrupts = <45>; |
158 | clocks = <&gateclk 15>, <&gateclk 30>; | ||
159 | clock-names = "0", "1"; | ||
160 | status = "disabled"; | 206 | status = "disabled"; |
161 | }; | 207 | }; |
162 | 208 | ||
163 | mdio { | 209 | usb@51000 { |
164 | #address-cells = <1>; | 210 | compatible = "marvell,orion-ehci"; |
165 | #size-cells = <0>; | 211 | reg = <0x51000 0x500>; |
166 | compatible = "marvell,orion-mdio"; | 212 | interrupts = <46>; |
167 | reg = <0x72004 0x4>; | 213 | status = "disabled"; |
168 | }; | 214 | }; |
169 | 215 | ||
170 | eth0: ethernet@70000 { | 216 | eth0: ethernet@70000 { |
@@ -175,6 +221,13 @@ | |||
175 | status = "disabled"; | 221 | status = "disabled"; |
176 | }; | 222 | }; |
177 | 223 | ||
224 | mdio { | ||
225 | #address-cells = <1>; | ||
226 | #size-cells = <0>; | ||
227 | compatible = "marvell,orion-mdio"; | ||
228 | reg = <0x72004 0x4>; | ||
229 | }; | ||
230 | |||
178 | eth1: ethernet@74000 { | 231 | eth1: ethernet@74000 { |
179 | compatible = "marvell,armada-370-neta"; | 232 | compatible = "marvell,armada-370-neta"; |
180 | reg = <0x74000 0x4000>; | 233 | reg = <0x74000 0x4000>; |
@@ -183,32 +236,25 @@ | |||
183 | status = "disabled"; | 236 | status = "disabled"; |
184 | }; | 237 | }; |
185 | 238 | ||
186 | i2c0: i2c@11000 { | 239 | sata@a0000 { |
187 | compatible = "marvell,mv64xxx-i2c"; | 240 | compatible = "marvell,orion-sata"; |
188 | #address-cells = <1>; | 241 | reg = <0xa0000 0x5000>; |
189 | #size-cells = <0>; | 242 | interrupts = <55>; |
190 | interrupts = <31>; | 243 | clocks = <&gateclk 15>, <&gateclk 30>; |
191 | timeout-ms = <1000>; | 244 | clock-names = "0", "1"; |
192 | clocks = <&coreclk 0>; | ||
193 | status = "disabled"; | 245 | status = "disabled"; |
194 | }; | 246 | }; |
195 | 247 | ||
196 | i2c1: i2c@11100 { | 248 | nand@d0000 { |
197 | compatible = "marvell,mv64xxx-i2c"; | 249 | compatible = "marvell,armada370-nand"; |
250 | reg = <0xd0000 0x54>; | ||
198 | #address-cells = <1>; | 251 | #address-cells = <1>; |
199 | #size-cells = <0>; | 252 | #size-cells = <1>; |
200 | interrupts = <32>; | 253 | interrupts = <113>; |
201 | timeout-ms = <1000>; | 254 | clocks = <&coredivclk 0>; |
202 | clocks = <&coreclk 0>; | ||
203 | status = "disabled"; | 255 | status = "disabled"; |
204 | }; | 256 | }; |
205 | 257 | ||
206 | rtc@10300 { | ||
207 | compatible = "marvell,orion-rtc"; | ||
208 | reg = <0x10300 0x20>; | ||
209 | interrupts = <50>; | ||
210 | }; | ||
211 | |||
212 | mvsdio@d4000 { | 258 | mvsdio@d4000 { |
213 | compatible = "marvell,orion-sdio"; | 259 | compatible = "marvell,orion-sdio"; |
214 | reg = <0xd4000 0x200>; | 260 | reg = <0xd4000 0x200>; |
@@ -220,43 +266,6 @@ | |||
220 | cap-mmc-highspeed; | 266 | cap-mmc-highspeed; |
221 | status = "disabled"; | 267 | status = "disabled"; |
222 | }; | 268 | }; |
223 | |||
224 | usb@50000 { | ||
225 | compatible = "marvell,orion-ehci"; | ||
226 | reg = <0x50000 0x500>; | ||
227 | interrupts = <45>; | ||
228 | status = "disabled"; | ||
229 | }; | ||
230 | |||
231 | usb@51000 { | ||
232 | compatible = "marvell,orion-ehci"; | ||
233 | reg = <0x51000 0x500>; | ||
234 | interrupts = <46>; | ||
235 | status = "disabled"; | ||
236 | }; | ||
237 | |||
238 | spi0: spi@10600 { | ||
239 | compatible = "marvell,orion-spi"; | ||
240 | reg = <0x10600 0x28>; | ||
241 | #address-cells = <1>; | ||
242 | #size-cells = <0>; | ||
243 | cell-index = <0>; | ||
244 | interrupts = <30>; | ||
245 | clocks = <&coreclk 0>; | ||
246 | status = "disabled"; | ||
247 | }; | ||
248 | |||
249 | spi1: spi@10680 { | ||
250 | compatible = "marvell,orion-spi"; | ||
251 | reg = <0x10680 0x28>; | ||
252 | #address-cells = <1>; | ||
253 | #size-cells = <0>; | ||
254 | cell-index = <1>; | ||
255 | interrupts = <92>; | ||
256 | clocks = <&coreclk 0>; | ||
257 | status = "disabled"; | ||
258 | }; | ||
259 | |||
260 | }; | 269 | }; |
261 | }; | 270 | }; |
262 | 271 | ||
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index 7a4b82e71aaf..0d8530c98cf5 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi | |||
@@ -91,11 +91,6 @@ | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | internal-regs { | 93 | internal-regs { |
94 | system-controller@18200 { | ||
95 | compatible = "marvell,armada-370-xp-system-controller"; | ||
96 | reg = <0x18200 0x100>; | ||
97 | }; | ||
98 | |||
99 | L2: l2-cache { | 94 | L2: l2-cache { |
100 | compatible = "marvell,aurora-outer-cache"; | 95 | compatible = "marvell,aurora-outer-cache"; |
101 | reg = <0x08000 0x1000>; | 96 | reg = <0x08000 0x1000>; |
@@ -103,8 +98,17 @@ | |||
103 | wt-override; | 98 | wt-override; |
104 | }; | 99 | }; |
105 | 100 | ||
106 | interrupt-controller@20000 { | 101 | i2c0: i2c@11000 { |
107 | reg = <0x20a00 0x1d0>, <0x21870 0x58>; | 102 | reg = <0x11000 0x20>; |
103 | }; | ||
104 | |||
105 | i2c1: i2c@11100 { | ||
106 | reg = <0x11100 0x20>; | ||
107 | }; | ||
108 | |||
109 | system-controller@18200 { | ||
110 | compatible = "marvell,armada-370-xp-system-controller"; | ||
111 | reg = <0x18200 0x100>; | ||
108 | }; | 112 | }; |
109 | 113 | ||
110 | pinctrl { | 114 | pinctrl { |
@@ -163,9 +167,11 @@ | |||
163 | interrupts = <91>; | 167 | interrupts = <91>; |
164 | }; | 168 | }; |
165 | 169 | ||
166 | timer@20300 { | 170 | gateclk: clock-gating-control@18220 { |
167 | compatible = "marvell,armada-370-timer"; | 171 | compatible = "marvell,armada-370-gating-clock"; |
168 | clocks = <&coreclk 2>; | 172 | reg = <0x18220 0x4>; |
173 | clocks = <&coreclk 0>; | ||
174 | #clock-cells = <1>; | ||
169 | }; | 175 | }; |
170 | 176 | ||
171 | coreclk: mvebu-sar@18230 { | 177 | coreclk: mvebu-sar@18230 { |
@@ -174,11 +180,28 @@ | |||
174 | #clock-cells = <1>; | 180 | #clock-cells = <1>; |
175 | }; | 181 | }; |
176 | 182 | ||
177 | gateclk: clock-gating-control@18220 { | 183 | thermal@18300 { |
178 | compatible = "marvell,armada-370-gating-clock"; | 184 | compatible = "marvell,armada370-thermal"; |
179 | reg = <0x18220 0x4>; | 185 | reg = <0x18300 0x4 |
186 | 0x18304 0x4>; | ||
187 | status = "okay"; | ||
188 | }; | ||
189 | |||
190 | interrupt-controller@20000 { | ||
191 | reg = <0x20a00 0x1d0>, <0x21870 0x58>; | ||
192 | }; | ||
193 | |||
194 | timer@20300 { | ||
195 | compatible = "marvell,armada-370-timer"; | ||
196 | clocks = <&coreclk 2>; | ||
197 | }; | ||
198 | |||
199 | usb@50000 { | ||
200 | clocks = <&coreclk 0>; | ||
201 | }; | ||
202 | |||
203 | usb@51000 { | ||
180 | clocks = <&coreclk 0>; | 204 | clocks = <&coreclk 0>; |
181 | #clock-cells = <1>; | ||
182 | }; | 205 | }; |
183 | 206 | ||
184 | xor@60800 { | 207 | xor@60800 { |
@@ -218,29 +241,6 @@ | |||
218 | dmacap,memset; | 241 | dmacap,memset; |
219 | }; | 242 | }; |
220 | }; | 243 | }; |
221 | |||
222 | i2c0: i2c@11000 { | ||
223 | reg = <0x11000 0x20>; | ||
224 | }; | ||
225 | |||
226 | i2c1: i2c@11100 { | ||
227 | reg = <0x11100 0x20>; | ||
228 | }; | ||
229 | |||
230 | usb@50000 { | ||
231 | clocks = <&coreclk 0>; | ||
232 | }; | ||
233 | |||
234 | usb@51000 { | ||
235 | clocks = <&coreclk 0>; | ||
236 | }; | ||
237 | |||
238 | thermal@18300 { | ||
239 | compatible = "marvell,armada370-thermal"; | ||
240 | reg = <0x18300 0x4 | ||
241 | 0x18304 0x4>; | ||
242 | status = "okay"; | ||
243 | }; | ||
244 | }; | 244 | }; |
245 | }; | 245 | }; |
246 | }; | 246 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts index 2298e4a910e2..274e2ad5f51c 100644 --- a/arch/arm/boot/dts/armada-xp-gp.dts +++ b/arch/arm/boot/dts/armada-xp-gp.dts | |||
@@ -175,6 +175,14 @@ | |||
175 | spi-max-frequency = <108000000>; | 175 | spi-max-frequency = <108000000>; |
176 | }; | 176 | }; |
177 | }; | 177 | }; |
178 | |||
179 | nand@d0000 { | ||
180 | status = "okay"; | ||
181 | num-cs = <1>; | ||
182 | marvell,nand-keep-config; | ||
183 | marvell,nand-enable-arbiter; | ||
184 | nand-on-flash-bbt; | ||
185 | }; | ||
178 | }; | 186 | }; |
179 | }; | 187 | }; |
180 | }; | 188 | }; |
diff --git a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts new file mode 100644 index 000000000000..f048b4ee4d52 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | |||
@@ -0,0 +1,322 @@ | |||
1 | /* | ||
2 | * Device Tree file for NETGEAR ReadyNAS 2120 | ||
3 | * | ||
4 | * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | |||
14 | #include <dt-bindings/input/input.h> | ||
15 | #include <dt-bindings/gpio/gpio.h> | ||
16 | #include "armada-xp-mv78230.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "NETGEAR ReadyNAS 2120"; | ||
20 | compatible = "netgear,readynas-2120", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; | ||
21 | |||
22 | chosen { | ||
23 | bootargs = "console=ttyS0,115200 earlyprintk"; | ||
24 | }; | ||
25 | |||
26 | memory { | ||
27 | device_type = "memory"; | ||
28 | reg = <0 0x00000000 0 0x80000000>; /* 2GB */ | ||
29 | }; | ||
30 | |||
31 | soc { | ||
32 | ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 | ||
33 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; | ||
34 | |||
35 | pcie-controller { | ||
36 | status = "okay"; | ||
37 | |||
38 | /* Connected to first Marvell 88SE9170 SATA controller */ | ||
39 | pcie@1,0 { | ||
40 | /* Port 0, Lane 0 */ | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | /* Connected to second Marvell 88SE9170 SATA controller */ | ||
45 | pcie@2,0 { | ||
46 | /* Port 0, Lane 1 */ | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | /* Connected to Fresco Logic FL1009 USB 3.0 controller */ | ||
51 | pcie@5,0 { | ||
52 | /* Port 1, Lane 0 */ | ||
53 | status = "okay"; | ||
54 | }; | ||
55 | }; | ||
56 | |||
57 | internal-regs { | ||
58 | pinctrl { | ||
59 | poweroff: poweroff { | ||
60 | marvell,pins = "mpp42"; | ||
61 | marvell,function = "gpio"; | ||
62 | }; | ||
63 | |||
64 | power_button_pin: power-button-pin { | ||
65 | marvell,pins = "mpp27"; | ||
66 | marvell,function = "gpio"; | ||
67 | }; | ||
68 | |||
69 | reset_button_pin: reset-button-pin { | ||
70 | marvell,pins = "mpp41"; | ||
71 | marvell,function = "gpio"; | ||
72 | }; | ||
73 | |||
74 | sata1_led_pin: sata1-led-pin { | ||
75 | marvell,pins = "mpp31"; | ||
76 | marvell,function = "gpio"; | ||
77 | }; | ||
78 | |||
79 | sata2_led_pin: sata2-led-pin { | ||
80 | marvell,pins = "mpp40"; | ||
81 | marvell,function = "gpio"; | ||
82 | }; | ||
83 | |||
84 | sata3_led_pin: sata3-led-pin { | ||
85 | marvell,pins = "mpp44"; | ||
86 | marvell,function = "gpio"; | ||
87 | }; | ||
88 | |||
89 | sata4_led_pin: sata4-led-pin { | ||
90 | marvell,pins = "mpp47"; | ||
91 | marvell,function = "gpio"; | ||
92 | }; | ||
93 | |||
94 | sata1_power_pin: sata1-power-pin { | ||
95 | marvell,pins = "mpp24"; | ||
96 | marvell,function = "gpio"; | ||
97 | }; | ||
98 | |||
99 | sata2_power_pin: sata2-power-pin { | ||
100 | marvell,pins = "mpp25"; | ||
101 | marvell,function = "gpio"; | ||
102 | }; | ||
103 | |||
104 | sata3_power_pin: sata3-power-pin { | ||
105 | marvell,pins = "mpp26"; | ||
106 | marvell,function = "gpio"; | ||
107 | }; | ||
108 | |||
109 | sata4_power_pin: sata4-power-pin { | ||
110 | marvell,pins = "mpp28"; | ||
111 | marvell,function = "gpio"; | ||
112 | }; | ||
113 | |||
114 | sata1_pres_pin: sata1-pres-pin { | ||
115 | marvell,pins = "mpp32"; | ||
116 | marvell,function = "gpio"; | ||
117 | }; | ||
118 | |||
119 | sata2_pres_pin: sata2-pres-pin { | ||
120 | marvell,pins = "mpp33"; | ||
121 | marvell,function = "gpio"; | ||
122 | }; | ||
123 | |||
124 | sata3_pres_pin: sata3-pres-pin { | ||
125 | marvell,pins = "mpp34"; | ||
126 | marvell,function = "gpio"; | ||
127 | }; | ||
128 | |||
129 | sata4_pres_pin: sata4-pres-pin { | ||
130 | marvell,pins = "mpp35"; | ||
131 | marvell,function = "gpio"; | ||
132 | }; | ||
133 | |||
134 | err_led_pin: err-led-pin { | ||
135 | marvell,pins = "mpp45"; | ||
136 | marvell,function = "gpio"; | ||
137 | }; | ||
138 | }; | ||
139 | |||
140 | serial@12000 { | ||
141 | clocks = <&coreclk 0>; | ||
142 | status = "okay"; | ||
143 | }; | ||
144 | |||
145 | mdio { | ||
146 | phy0: ethernet-phy@0 { /* Marvell 88E1318 */ | ||
147 | reg = <0>; | ||
148 | }; | ||
149 | |||
150 | phy1: ethernet-phy@1 { /* Marvell 88E1318 */ | ||
151 | reg = <1>; | ||
152 | }; | ||
153 | }; | ||
154 | |||
155 | ethernet@70000 { | ||
156 | status = "okay"; | ||
157 | phy = <&phy0>; | ||
158 | phy-mode = "rgmii-id"; | ||
159 | }; | ||
160 | |||
161 | ethernet@74000 { | ||
162 | status = "okay"; | ||
163 | phy = <&phy1>; | ||
164 | phy-mode = "rgmii-id"; | ||
165 | }; | ||
166 | |||
167 | /* Front USB 2.0 port */ | ||
168 | usb@50000 { | ||
169 | status = "okay"; | ||
170 | }; | ||
171 | |||
172 | i2c@11000 { | ||
173 | compatible = "marvell,mv64xxx-i2c"; | ||
174 | clock-frequency = <400000>; | ||
175 | status = "okay"; | ||
176 | |||
177 | /* Controller for rear fan #1 of 3 (Protechnic | ||
178 | * MGT4012XB-O20, 8000RPM) near eSATA port */ | ||
179 | g762_fan1: g762@3e { | ||
180 | compatible = "gmt,g762"; | ||
181 | reg = <0x3e>; | ||
182 | clocks = <&g762_clk>; /* input clock */ | ||
183 | fan_gear_mode = <0>; | ||
184 | fan_startv = <1>; | ||
185 | pwm_polarity = <0>; | ||
186 | }; | ||
187 | |||
188 | /* Controller for rear (center) fan #2 of 3 */ | ||
189 | g762_fan2: g762@48 { | ||
190 | compatible = "gmt,g762"; | ||
191 | reg = <0x48>; | ||
192 | clocks = <&g762_clk>; /* input clock */ | ||
193 | fan_gear_mode = <0>; | ||
194 | fan_startv = <1>; | ||
195 | pwm_polarity = <0>; | ||
196 | }; | ||
197 | |||
198 | /* Controller for rear fan #3 of 3 */ | ||
199 | g762_fan3: g762@49 { | ||
200 | compatible = "gmt,g762"; | ||
201 | reg = <0x49>; | ||
202 | clocks = <&g762_clk>; /* input clock */ | ||
203 | fan_gear_mode = <0>; | ||
204 | fan_startv = <1>; | ||
205 | pwm_polarity = <0>; | ||
206 | }; | ||
207 | |||
208 | /* Temperature sensor */ | ||
209 | g751: g751@4c { | ||
210 | compatible = "gmt,g751"; | ||
211 | reg = <0x4c>; | ||
212 | }; | ||
213 | }; | ||
214 | |||
215 | nand@d0000 { | ||
216 | status = "okay"; | ||
217 | num-cs = <1>; | ||
218 | marvell,nand-keep-config; | ||
219 | marvell,nand-enable-arbiter; | ||
220 | nand-on-flash-bbt; | ||
221 | |||
222 | partition@0 { | ||
223 | label = "u-boot"; | ||
224 | reg = <0x0000000 0x180000>; /* 1.5MB */ | ||
225 | read-only; | ||
226 | }; | ||
227 | |||
228 | partition@180000 { | ||
229 | label = "u-boot-env"; | ||
230 | reg = <0x180000 0x20000>; /* 128KB */ | ||
231 | read-only; | ||
232 | }; | ||
233 | |||
234 | partition@200000 { | ||
235 | label = "uImage"; | ||
236 | reg = <0x0200000 0x600000>; /* 6MB */ | ||
237 | }; | ||
238 | |||
239 | partition@800000 { | ||
240 | label = "minirootfs"; | ||
241 | reg = <0x0800000 0x400000>; /* 4MB */ | ||
242 | }; | ||
243 | |||
244 | /* Last MB is for the BBT, i.e. not writable */ | ||
245 | partition@c00000 { | ||
246 | label = "ubifs"; | ||
247 | reg = <0x0c00000 0x7400000>; /* 116MB */ | ||
248 | }; | ||
249 | }; | ||
250 | }; | ||
251 | }; | ||
252 | |||
253 | clocks { | ||
254 | g762_clk: g762-oscillator { | ||
255 | compatible = "fixed-clock"; | ||
256 | #clock-cells = <0>; | ||
257 | clock-frequency = <32768>; | ||
258 | }; | ||
259 | }; | ||
260 | |||
261 | gpio-leds { | ||
262 | compatible = "gpio-leds"; | ||
263 | pinctrl-0 = <&sata1_led_pin &sata2_led_pin &err_led_pin | ||
264 | &sata3_led_pin &sata4_led_pin>; | ||
265 | pinctrl-names = "default"; | ||
266 | |||
267 | red-sata1-led { | ||
268 | label = "rn2120:red:sata1"; | ||
269 | gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; | ||
270 | default-state = "off"; | ||
271 | }; | ||
272 | |||
273 | red-sata2-led { | ||
274 | label = "rn2120:red:sata2"; | ||
275 | gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; | ||
276 | default-state = "off"; | ||
277 | }; | ||
278 | |||
279 | red-sata3-led { | ||
280 | label = "rn2120:red:sata3"; | ||
281 | gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; | ||
282 | default-state = "off"; | ||
283 | }; | ||
284 | |||
285 | red-sata4-led { | ||
286 | label = "rn2120:red:sata4"; | ||
287 | gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; | ||
288 | default-state = "off"; | ||
289 | }; | ||
290 | |||
291 | red-err-led { | ||
292 | label = "rn2120:red:err"; | ||
293 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; | ||
294 | default-state = "off"; | ||
295 | }; | ||
296 | }; | ||
297 | |||
298 | gpio-keys { | ||
299 | compatible = "gpio-keys"; | ||
300 | pinctrl-0 = <&power_button_pin &reset_button_pin>; | ||
301 | pinctrl-names = "default"; | ||
302 | |||
303 | power-button { | ||
304 | label = "Power Button"; | ||
305 | linux,code = <KEY_POWER>; | ||
306 | gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; | ||
307 | }; | ||
308 | |||
309 | reset-button { | ||
310 | label = "Reset Button"; | ||
311 | linux,code = <KEY_RESTART>; | ||
312 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; | ||
313 | }; | ||
314 | }; | ||
315 | |||
316 | gpio-poweroff { | ||
317 | compatible = "gpio-poweroff"; | ||
318 | pinctrl-0 = <&poweroff>; | ||
319 | pinctrl-names = "default"; | ||
320 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; | ||
321 | }; | ||
322 | }; | ||
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts index 5695afcc04bf..99bcf76e6953 100644 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | |||
@@ -103,8 +103,7 @@ | |||
103 | green_led { | 103 | green_led { |
104 | label = "green_led"; | 104 | label = "green_led"; |
105 | gpios = <&gpio1 21 1>; | 105 | gpios = <&gpio1 21 1>; |
106 | default-state = "off"; | 106 | default-state = "keep"; |
107 | linux,default-trigger = "heartbeat"; | ||
108 | }; | 107 | }; |
109 | }; | 108 | }; |
110 | 109 | ||
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 281c6447e872..4919fb82ac62 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi | |||
@@ -42,13 +42,14 @@ | |||
42 | wt-override; | 42 | wt-override; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | interrupt-controller@20000 { | 45 | i2c0: i2c@11000 { |
46 | reg = <0x20a00 0x2d0>, <0x21070 0x58>; | 46 | compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; |
47 | reg = <0x11000 0x100>; | ||
47 | }; | 48 | }; |
48 | 49 | ||
49 | armada-370-xp-pmsu@22000 { | 50 | i2c1: i2c@11100 { |
50 | compatible = "marvell,armada-370-xp-pmsu"; | 51 | compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; |
51 | reg = <0x22100 0x430>, <0x20800 0x20>; | 52 | reg = <0x11100 0x100>; |
52 | }; | 53 | }; |
53 | 54 | ||
54 | serial@12200 { | 55 | serial@12200 { |
@@ -68,10 +69,16 @@ | |||
68 | status = "disabled"; | 69 | status = "disabled"; |
69 | }; | 70 | }; |
70 | 71 | ||
71 | timer@20300 { | 72 | system-controller@18200 { |
72 | compatible = "marvell,armada-xp-timer"; | 73 | compatible = "marvell,armada-370-xp-system-controller"; |
73 | clocks = <&coreclk 2>, <&refclk>; | 74 | reg = <0x18200 0x500>; |
74 | clock-names = "nbclk", "fixed"; | 75 | }; |
76 | |||
77 | gateclk: clock-gating-control@18220 { | ||
78 | compatible = "marvell,armada-xp-gating-clock"; | ||
79 | reg = <0x18220 0x4>; | ||
80 | clocks = <&coreclk 0>; | ||
81 | #clock-cells = <1>; | ||
75 | }; | 82 | }; |
76 | 83 | ||
77 | coreclk: mvebu-sar@18230 { | 84 | coreclk: mvebu-sar@18230 { |
@@ -80,6 +87,13 @@ | |||
80 | #clock-cells = <1>; | 87 | #clock-cells = <1>; |
81 | }; | 88 | }; |
82 | 89 | ||
90 | thermal@182b0 { | ||
91 | compatible = "marvell,armadaxp-thermal"; | ||
92 | reg = <0x182b0 0x4 | ||
93 | 0x184d0 0x4>; | ||
94 | status = "okay"; | ||
95 | }; | ||
96 | |||
83 | cpuclk: clock-complex@18700 { | 97 | cpuclk: clock-complex@18700 { |
84 | #clock-cells = <1>; | 98 | #clock-cells = <1>; |
85 | compatible = "marvell,armada-xp-cpu-clock"; | 99 | compatible = "marvell,armada-xp-cpu-clock"; |
@@ -87,16 +101,19 @@ | |||
87 | clocks = <&coreclk 1>; | 101 | clocks = <&coreclk 1>; |
88 | }; | 102 | }; |
89 | 103 | ||
90 | gateclk: clock-gating-control@18220 { | 104 | interrupt-controller@20000 { |
91 | compatible = "marvell,armada-xp-gating-clock"; | 105 | reg = <0x20a00 0x2d0>, <0x21070 0x58>; |
92 | reg = <0x18220 0x4>; | ||
93 | clocks = <&coreclk 0>; | ||
94 | #clock-cells = <1>; | ||
95 | }; | 106 | }; |
96 | 107 | ||
97 | system-controller@18200 { | 108 | timer@20300 { |
98 | compatible = "marvell,armada-370-xp-system-controller"; | 109 | compatible = "marvell,armada-xp-timer"; |
99 | reg = <0x18200 0x500>; | 110 | clocks = <&coreclk 2>, <&refclk>; |
111 | clock-names = "nbclk", "fixed"; | ||
112 | }; | ||
113 | |||
114 | armada-370-xp-pmsu@22000 { | ||
115 | compatible = "marvell,armada-370-xp-pmsu"; | ||
116 | reg = <0x22100 0x430>, <0x20800 0x20>; | ||
100 | }; | 117 | }; |
101 | 118 | ||
102 | eth2: ethernet@30000 { | 119 | eth2: ethernet@30000 { |
@@ -107,6 +124,22 @@ | |||
107 | status = "disabled"; | 124 | status = "disabled"; |
108 | }; | 125 | }; |
109 | 126 | ||
127 | usb@50000 { | ||
128 | clocks = <&gateclk 18>; | ||
129 | }; | ||
130 | |||
131 | usb@51000 { | ||
132 | clocks = <&gateclk 19>; | ||
133 | }; | ||
134 | |||
135 | usb@52000 { | ||
136 | compatible = "marvell,orion-ehci"; | ||
137 | reg = <0x52000 0x500>; | ||
138 | interrupts = <47>; | ||
139 | clocks = <&gateclk 20>; | ||
140 | status = "disabled"; | ||
141 | }; | ||
142 | |||
110 | xor@60900 { | 143 | xor@60900 { |
111 | compatible = "marvell,orion-xor"; | 144 | compatible = "marvell,orion-xor"; |
112 | reg = <0x60900 0x100 | 145 | reg = <0x60900 0x100 |
@@ -146,39 +179,6 @@ | |||
146 | dmacap,memset; | 179 | dmacap,memset; |
147 | }; | 180 | }; |
148 | }; | 181 | }; |
149 | |||
150 | i2c0: i2c@11000 { | ||
151 | compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; | ||
152 | reg = <0x11000 0x100>; | ||
153 | }; | ||
154 | |||
155 | i2c1: i2c@11100 { | ||
156 | compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; | ||
157 | reg = <0x11100 0x100>; | ||
158 | }; | ||
159 | |||
160 | usb@50000 { | ||
161 | clocks = <&gateclk 18>; | ||
162 | }; | ||
163 | |||
164 | usb@51000 { | ||
165 | clocks = <&gateclk 19>; | ||
166 | }; | ||
167 | |||
168 | usb@52000 { | ||
169 | compatible = "marvell,orion-ehci"; | ||
170 | reg = <0x52000 0x500>; | ||
171 | interrupts = <47>; | ||
172 | clocks = <&gateclk 20>; | ||
173 | status = "disabled"; | ||
174 | }; | ||
175 | |||
176 | thermal@182b0 { | ||
177 | compatible = "marvell,armadaxp-thermal"; | ||
178 | reg = <0x182b0 0x4 | ||
179 | 0x184d0 0x4>; | ||
180 | status = "okay"; | ||
181 | }; | ||
182 | }; | 182 | }; |
183 | }; | 183 | }; |
184 | 184 | ||
diff --git a/arch/arm/boot/dts/at91-cosino.dtsi b/arch/arm/boot/dts/at91-cosino.dtsi new file mode 100644 index 000000000000..2093c4d7cd6a --- /dev/null +++ b/arch/arm/boot/dts/at91-cosino.dtsi | |||
@@ -0,0 +1,122 @@ | |||
1 | /* | ||
2 | * at91-cosino.dtsi - Device Tree file for Cosino core module | ||
3 | * | ||
4 | * Copyright (C) 2013 - Rodolfo Giometti <giometti@linux.it> | ||
5 | * HCE Engineering | ||
6 | * | ||
7 | * Derived from at91sam9x5ek.dtsi by: | ||
8 | * Copyright (C) 2012 Atmel, | ||
9 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
10 | * | ||
11 | * Licensed under GPLv2 or later. | ||
12 | */ | ||
13 | |||
14 | #include "at91sam9g35.dtsi" | ||
15 | |||
16 | / { | ||
17 | model = "HCE Cosino core module"; | ||
18 | compatible = "hce,cosino", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
19 | |||
20 | chosen { | ||
21 | bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait"; | ||
22 | }; | ||
23 | |||
24 | memory { | ||
25 | reg = <0x20000000 0x8000000>; | ||
26 | }; | ||
27 | |||
28 | clocks { | ||
29 | #address-cells = <1>; | ||
30 | #size-cells = <1>; | ||
31 | ranges; | ||
32 | |||
33 | main_clock: clock@0 { | ||
34 | compatible = "atmel,osc", "fixed-clock"; | ||
35 | clock-frequency = <12000000>; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | ahb { | ||
40 | apb { | ||
41 | mmc0: mmc@f0008000 { | ||
42 | pinctrl-0 = < | ||
43 | &pinctrl_board_mmc0 | ||
44 | &pinctrl_mmc0_slot0_clk_cmd_dat0 | ||
45 | &pinctrl_mmc0_slot0_dat1_3>; | ||
46 | status = "okay"; | ||
47 | slot@0 { | ||
48 | reg = <0>; | ||
49 | bus-width = <4>; | ||
50 | cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; | ||
51 | }; | ||
52 | }; | ||
53 | |||
54 | dbgu: serial@fffff200 { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | usart0: serial@f801c000 { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | i2c0: i2c@f8010000 { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | adc0: adc@f804c000 { | ||
67 | atmel,adc-clock-rate = <1000000>; | ||
68 | atmel,adc-ts-wires = <4>; | ||
69 | atmel,adc-ts-pressure-threshold = <10000>; | ||
70 | status = "okay"; | ||
71 | }; | ||
72 | |||
73 | pinctrl@fffff400 { | ||
74 | mmc0 { | ||
75 | pinctrl_board_mmc0: mmc0-board { | ||
76 | atmel,pins = | ||
77 | <AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD15 gpio CD pin pull up and deglitch */ | ||
78 | }; | ||
79 | }; | ||
80 | }; | ||
81 | |||
82 | watchdog@fffffe40 { | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | }; | ||
86 | |||
87 | nand0: nand@40000000 { | ||
88 | nand-bus-width = <8>; | ||
89 | nand-ecc-mode = "hw"; | ||
90 | atmel,has-pmecc; /* Enable PMECC */ | ||
91 | atmel,pmecc-cap = <4>; | ||
92 | atmel,pmecc-sector-size = <512>; | ||
93 | nand-on-flash-bbt; | ||
94 | status = "okay"; | ||
95 | |||
96 | at91bootstrap@0 { | ||
97 | label = "at91bootstrap"; | ||
98 | reg = <0x0 0x40000>; | ||
99 | }; | ||
100 | |||
101 | uboot@40000 { | ||
102 | label = "u-boot"; | ||
103 | reg = <0x40000 0x80000>; | ||
104 | }; | ||
105 | |||
106 | ubootenv@c0000 { | ||
107 | label = "U-Boot Env"; | ||
108 | reg = <0xc0000 0x140000>; | ||
109 | }; | ||
110 | |||
111 | kernel@200000 { | ||
112 | label = "kernel"; | ||
113 | reg = <0x200000 0x600000>; | ||
114 | }; | ||
115 | |||
116 | rootfs@800000 { | ||
117 | label = "rootfs"; | ||
118 | reg = <0x800000 0x0f800000>; | ||
119 | }; | ||
120 | }; | ||
121 | }; | ||
122 | }; | ||
diff --git a/arch/arm/boot/dts/at91-cosino_mega2560.dts b/arch/arm/boot/dts/at91-cosino_mega2560.dts new file mode 100644 index 000000000000..f9415dd11f17 --- /dev/null +++ b/arch/arm/boot/dts/at91-cosino_mega2560.dts | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * at91-cosino_mega2560.dts - Device Tree file for Cosino board with | ||
3 | * Mega 2560 extension | ||
4 | * | ||
5 | * Copyright (C) 2013 - Rodolfo Giometti <giometti@linux.it> | ||
6 | * HCE Engineering | ||
7 | * | ||
8 | * Derived from at91sam9g35ek.dts by: | ||
9 | * Copyright (C) 2012 Atmel, | ||
10 | * 2012 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
11 | * | ||
12 | * Licensed under GPLv2 or later. | ||
13 | */ | ||
14 | |||
15 | /dts-v1/; | ||
16 | #include "at91-cosino.dtsi" | ||
17 | |||
18 | / { | ||
19 | model = "HCE Cosino Mega 2560"; | ||
20 | compatible = "hce,cosino_mega2560", "atmel,at91sam9x5", "atmel,at91sam9"; | ||
21 | |||
22 | ahb { | ||
23 | apb { | ||
24 | macb0: ethernet@f802c000 { | ||
25 | phy-mode = "rmii"; | ||
26 | status = "okay"; | ||
27 | }; | ||
28 | |||
29 | adc0: adc@f804c000 { | ||
30 | atmel,adc-clock-rate = <1000000>; | ||
31 | atmel,adc-ts-wires = <4>; | ||
32 | atmel,adc-ts-pressure-threshold = <10000>; | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | |||
37 | tsadcc: tsadcc@f804c000 { | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | rtc@fffffeb0 { | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | usart1: serial@f8020000 { | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | usart2: serial@f8024000 { | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | usb2: gadget@f803c000 { | ||
54 | atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | mmc1: mmc@f000c000 { | ||
59 | pinctrl-0 = < | ||
60 | &pinctrl_mmc1_slot0_clk_cmd_dat0 | ||
61 | &pinctrl_mmc1_slot0_dat1_3>; | ||
62 | status = "okay"; | ||
63 | slot@0 { | ||
64 | reg = <0>; | ||
65 | bus-width = <4>; | ||
66 | non-removable; | ||
67 | }; | ||
68 | }; | ||
69 | }; | ||
70 | |||
71 | usb0: ohci@00600000 { | ||
72 | status = "okay"; | ||
73 | num-ports = <3>; | ||
74 | atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW */ | ||
75 | &pioD 19 GPIO_ACTIVE_LOW | ||
76 | &pioD 20 GPIO_ACTIVE_LOW | ||
77 | >; | ||
78 | }; | ||
79 | |||
80 | usb1: ehci@00700000 { | ||
81 | status = "okay"; | ||
82 | }; | ||
83 | }; | ||
84 | }; | ||
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi index f77065506f1e..c61b16fba79b 100644 --- a/arch/arm/boot/dts/at91rm9200.dtsi +++ b/arch/arm/boot/dts/at91rm9200.dtsi | |||
@@ -191,12 +191,12 @@ | |||
191 | AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA18 periph A */ | 191 | AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA18 periph A */ |
192 | }; | 192 | }; |
193 | 193 | ||
194 | pinctrl_uart0_rts: uart0_rts-0 { | 194 | pinctrl_uart0_cts: uart0_cts-0 { |
195 | atmel,pins = | 195 | atmel,pins = |
196 | <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA20 periph A */ | 196 | <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA20 periph A */ |
197 | }; | 197 | }; |
198 | 198 | ||
199 | pinctrl_uart0_cts: uart0_cts-0 { | 199 | pinctrl_uart0_rts: uart0_rts-0 { |
200 | atmel,pins = | 200 | atmel,pins = |
201 | <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA21 periph A */ | 201 | <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA21 periph A */ |
202 | }; | 202 | }; |
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts index d2d72c3b44c4..df6b0aa0e4dd 100644 --- a/arch/arm/boot/dts/at91rm9200ek.dts +++ b/arch/arm/boot/dts/at91rm9200ek.dts | |||
@@ -29,10 +29,22 @@ | |||
29 | 29 | ||
30 | ahb { | 30 | ahb { |
31 | apb { | 31 | apb { |
32 | dbgu: serial@fffff200 { | 32 | usb1: gadget@fffb0000 { |
33 | atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>; | ||
34 | atmel,pullup-gpio = <&pioD 5 GPIO_ACTIVE_HIGH>; | ||
33 | status = "okay"; | 35 | status = "okay"; |
34 | }; | 36 | }; |
35 | 37 | ||
38 | macb0: ethernet@fffbc000 { | ||
39 | phy-mode = "rmii"; | ||
40 | status = "okay"; | ||
41 | |||
42 | phy0: ethernet-phy { | ||
43 | interrupt-parent = <&pioC>; | ||
44 | interrupts = <4 IRQ_TYPE_EDGE_BOTH>; | ||
45 | }; | ||
46 | }; | ||
47 | |||
36 | usart1: serial@fffc4000 { | 48 | usart1: serial@fffc4000 { |
37 | pinctrl-0 = | 49 | pinctrl-0 = |
38 | <&pinctrl_uart1 | 50 | <&pinctrl_uart1 |
@@ -44,16 +56,6 @@ | |||
44 | status = "okay"; | 56 | status = "okay"; |
45 | }; | 57 | }; |
46 | 58 | ||
47 | macb0: ethernet@fffbc000 { | ||
48 | phy-mode = "rmii"; | ||
49 | status = "okay"; | ||
50 | }; | ||
51 | |||
52 | usb1: gadget@fffb0000 { | ||
53 | atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>; | ||
54 | status = "okay"; | ||
55 | }; | ||
56 | |||
57 | spi0: spi@fffe0000 { | 59 | spi0: spi@fffe0000 { |
58 | status = "okay"; | 60 | status = "okay"; |
59 | cs-gpios = <&pioA 3 0>, <0>, <0>, <0>; | 61 | cs-gpios = <&pioA 3 0>, <0>, <0>, <0>; |
@@ -63,12 +65,45 @@ | |||
63 | reg = <0>; | 65 | reg = <0>; |
64 | }; | 66 | }; |
65 | }; | 67 | }; |
68 | |||
69 | dbgu: serial@fffff200 { | ||
70 | status = "okay"; | ||
71 | }; | ||
66 | }; | 72 | }; |
67 | 73 | ||
68 | usb0: ohci@00300000 { | 74 | usb0: ohci@00300000 { |
69 | num-ports = <2>; | 75 | num-ports = <2>; |
70 | status = "okay"; | 76 | status = "okay"; |
71 | }; | 77 | }; |
78 | |||
79 | nor_flash@10000000 { | ||
80 | compatible = "cfi-flash"; | ||
81 | reg = <0x10000000 0x800000>; | ||
82 | linux,mtd-name = "physmap-flash.0"; | ||
83 | bank-width = <2>; | ||
84 | #address-cells = <1>; | ||
85 | #size-cells = <1>; | ||
86 | |||
87 | barebox@0 { | ||
88 | label = "barebox"; | ||
89 | reg = <0x00000 0x40000>; | ||
90 | }; | ||
91 | |||
92 | bareboxenv@40000 { | ||
93 | label = "bareboxenv"; | ||
94 | reg = <0x40000 0x10000>; | ||
95 | }; | ||
96 | |||
97 | kernel@50000 { | ||
98 | label = "kernel"; | ||
99 | reg = <0x50000 0x300000>; | ||
100 | }; | ||
101 | |||
102 | root@350000 { | ||
103 | label = "root"; | ||
104 | reg = <0x350000 0x4B0000>; | ||
105 | }; | ||
106 | }; | ||
72 | }; | 107 | }; |
73 | 108 | ||
74 | leds { | 109 | leds { |
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index d5bd65f74602..c8fa9b9f07e3 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -30,6 +30,7 @@ | |||
30 | i2c0 = &i2c0; | 30 | i2c0 = &i2c0; |
31 | ssc0 = &ssc0; | 31 | ssc0 = &ssc0; |
32 | ssc1 = &ssc1; | 32 | ssc1 = &ssc1; |
33 | pwm0 = &pwm0; | ||
33 | }; | 34 | }; |
34 | cpus { | 35 | cpus { |
35 | #address-cells = <0>; | 36 | #address-cells = <0>; |
@@ -366,6 +367,34 @@ | |||
366 | }; | 367 | }; |
367 | }; | 368 | }; |
368 | 369 | ||
370 | fb { | ||
371 | pinctrl_fb: fb-0 { | ||
372 | atmel,pins = | ||
373 | <AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC1 periph A */ | ||
374 | AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC2 periph A */ | ||
375 | AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC3 periph A */ | ||
376 | AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB9 periph B */ | ||
377 | AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC6 periph A */ | ||
378 | AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC7 periph A */ | ||
379 | AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC8 periph A */ | ||
380 | AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC9 periph A */ | ||
381 | AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC10 periph A */ | ||
382 | AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC11 periph A */ | ||
383 | AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC14 periph A */ | ||
384 | AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC15 periph A */ | ||
385 | AT91_PIOC 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC16 periph A */ | ||
386 | AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC12 periph B */ | ||
387 | AT91_PIOC 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC18 periph A */ | ||
388 | AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC19 periph A */ | ||
389 | AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC22 periph A */ | ||
390 | AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC23 periph A */ | ||
391 | AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC24 periph A */ | ||
392 | AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC17 periph B */ | ||
393 | AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC26 periph A */ | ||
394 | AT91_PIOC 27 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC27 periph A */ | ||
395 | }; | ||
396 | }; | ||
397 | |||
369 | pioA: gpio@fffff200 { | 398 | pioA: gpio@fffff200 { |
370 | compatible = "atmel,at91rm9200-gpio"; | 399 | compatible = "atmel,at91rm9200-gpio"; |
371 | reg = <0xfffff200 0x200>; | 400 | reg = <0xfffff200 0x200>; |
@@ -547,6 +576,23 @@ | |||
547 | pinctrl-0 = <&pinctrl_spi1>; | 576 | pinctrl-0 = <&pinctrl_spi1>; |
548 | status = "disabled"; | 577 | status = "disabled"; |
549 | }; | 578 | }; |
579 | |||
580 | pwm0: pwm@fffb8000 { | ||
581 | compatible = "atmel,at91sam9rl-pwm"; | ||
582 | reg = <0xfffb8000 0x300>; | ||
583 | interrupts = <20 IRQ_TYPE_LEVEL_HIGH 4>; | ||
584 | #pwm-cells = <3>; | ||
585 | status = "disabled"; | ||
586 | }; | ||
587 | }; | ||
588 | |||
589 | fb0: fb@0x00700000 { | ||
590 | compatible = "atmel,at91sam9263-lcdc"; | ||
591 | reg = <0x00700000 0x1000>; | ||
592 | interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>; | ||
593 | pinctrl-names = "default"; | ||
594 | pinctrl-0 = <&pinctrl_fb>; | ||
595 | status = "disabled"; | ||
550 | }; | 596 | }; |
551 | 597 | ||
552 | nand0: nand@40000000 { | 598 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts index 70f835b55c0b..15009c9f2293 100644 --- a/arch/arm/boot/dts/at91sam9263ek.dts +++ b/arch/arm/boot/dts/at91sam9263ek.dts | |||
@@ -95,6 +95,36 @@ | |||
95 | }; | 95 | }; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | fb0: fb@0x00700000 { | ||
99 | display = <&display0>; | ||
100 | status = "okay"; | ||
101 | |||
102 | display0: display { | ||
103 | bits-per-pixel = <16>; | ||
104 | atmel,lcdcon-backlight; | ||
105 | atmel,dmacon = <0x1>; | ||
106 | atmel,lcdcon2 = <0x80008002>; | ||
107 | atmel,guard-time = <1>; | ||
108 | |||
109 | display-timings { | ||
110 | native-mode = <&timing0>; | ||
111 | timing0: timing0 { | ||
112 | clock-frequency = <4965000>; | ||
113 | hactive = <240>; | ||
114 | vactive = <320>; | ||
115 | hback-porch = <1>; | ||
116 | hfront-porch = <33>; | ||
117 | vback-porch = <1>; | ||
118 | vfront-porch = <0>; | ||
119 | hsync-len = <5>; | ||
120 | vsync-len = <1>; | ||
121 | hsync-active = <1>; | ||
122 | vsync-active = <1>; | ||
123 | }; | ||
124 | }; | ||
125 | }; | ||
126 | }; | ||
127 | |||
98 | nand0: nand@40000000 { | 128 | nand0: nand@40000000 { |
99 | nand-bus-width = <8>; | 129 | nand-bus-width = <8>; |
100 | nand-ecc-mode = "soft"; | 130 | nand-ecc-mode = "soft"; |
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index c3e514837074..ef0857cb171c 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -37,6 +37,7 @@ | |||
37 | i2c1 = &i2c1; | 37 | i2c1 = &i2c1; |
38 | ssc0 = &ssc0; | 38 | ssc0 = &ssc0; |
39 | ssc1 = &ssc1; | 39 | ssc1 = &ssc1; |
40 | pwm0 = &pwm0; | ||
40 | }; | 41 | }; |
41 | cpus { | 42 | cpus { |
42 | #address-cells = <0>; | 43 | #address-cells = <0>; |
@@ -143,6 +144,22 @@ | |||
143 | }; | 144 | }; |
144 | }; | 145 | }; |
145 | 146 | ||
147 | i2c0 { | ||
148 | pinctrl_i2c0: i2c0-0 { | ||
149 | atmel,pins = | ||
150 | <AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA21 periph A TWCK0 */ | ||
151 | AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA20 periph A TWD0 */ | ||
152 | }; | ||
153 | }; | ||
154 | |||
155 | i2c1 { | ||
156 | pinctrl_i2c1: i2c1-0 { | ||
157 | atmel,pins = | ||
158 | <AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A TWCK1 */ | ||
159 | AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A TWD1 */ | ||
160 | }; | ||
161 | }; | ||
162 | |||
146 | usart0 { | 163 | usart0 { |
147 | pinctrl_usart0: usart0-0 { | 164 | pinctrl_usart0: usart0-0 { |
148 | atmel,pins = | 165 | atmel,pins = |
@@ -425,6 +442,42 @@ | |||
425 | }; | 442 | }; |
426 | }; | 443 | }; |
427 | 444 | ||
445 | fb { | ||
446 | pinctrl_fb: fb-0 { | ||
447 | atmel,pins = | ||
448 | <AT91_PIOE 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE0 periph A */ | ||
449 | AT91_PIOE 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE2 periph A */ | ||
450 | AT91_PIOE 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE3 periph A */ | ||
451 | AT91_PIOE 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE4 periph A */ | ||
452 | AT91_PIOE 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE5 periph A */ | ||
453 | AT91_PIOE 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE6 periph A */ | ||
454 | AT91_PIOE 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE7 periph A */ | ||
455 | AT91_PIOE 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE8 periph A */ | ||
456 | AT91_PIOE 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE9 periph A */ | ||
457 | AT91_PIOE 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE10 periph A */ | ||
458 | AT91_PIOE 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE11 periph A */ | ||
459 | AT91_PIOE 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE12 periph A */ | ||
460 | AT91_PIOE 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE13 periph A */ | ||
461 | AT91_PIOE 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE14 periph A */ | ||
462 | AT91_PIOE 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE15 periph A */ | ||
463 | AT91_PIOE 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE16 periph A */ | ||
464 | AT91_PIOE 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE17 periph A */ | ||
465 | AT91_PIOE 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE18 periph A */ | ||
466 | AT91_PIOE 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE19 periph A */ | ||
467 | AT91_PIOE 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE20 periph A */ | ||
468 | AT91_PIOE 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE21 periph A */ | ||
469 | AT91_PIOE 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE22 periph A */ | ||
470 | AT91_PIOE 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE23 periph A */ | ||
471 | AT91_PIOE 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE24 periph A */ | ||
472 | AT91_PIOE 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE25 periph A */ | ||
473 | AT91_PIOE 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE26 periph A */ | ||
474 | AT91_PIOE 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE27 periph A */ | ||
475 | AT91_PIOE 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE28 periph A */ | ||
476 | AT91_PIOE 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PE29 periph A */ | ||
477 | AT91_PIOE 30 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PE30 periph A */ | ||
478 | }; | ||
479 | }; | ||
480 | |||
428 | pioA: gpio@fffff200 { | 481 | pioA: gpio@fffff200 { |
429 | compatible = "atmel,at91rm9200-gpio"; | 482 | compatible = "atmel,at91rm9200-gpio"; |
430 | reg = <0xfffff200 0x200>; | 483 | reg = <0xfffff200 0x200>; |
@@ -542,6 +595,8 @@ | |||
542 | compatible = "atmel,at91sam9g10-i2c"; | 595 | compatible = "atmel,at91sam9g10-i2c"; |
543 | reg = <0xfff84000 0x100>; | 596 | reg = <0xfff84000 0x100>; |
544 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>; | 597 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>; |
598 | pinctrl-names = "default"; | ||
599 | pinctrl-0 = <&pinctrl_i2c0>; | ||
545 | #address-cells = <1>; | 600 | #address-cells = <1>; |
546 | #size-cells = <0>; | 601 | #size-cells = <0>; |
547 | status = "disabled"; | 602 | status = "disabled"; |
@@ -551,6 +606,8 @@ | |||
551 | compatible = "atmel,at91sam9g10-i2c"; | 606 | compatible = "atmel,at91sam9g10-i2c"; |
552 | reg = <0xfff88000 0x100>; | 607 | reg = <0xfff88000 0x100>; |
553 | interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>; | 608 | interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>; |
609 | pinctrl-names = "default"; | ||
610 | pinctrl-0 = <&pinctrl_i2c1>; | ||
554 | #address-cells = <1>; | 611 | #address-cells = <1>; |
555 | #size-cells = <0>; | 612 | #size-cells = <0>; |
556 | status = "disabled"; | 613 | status = "disabled"; |
@@ -614,10 +671,19 @@ | |||
614 | }; | 671 | }; |
615 | }; | 672 | }; |
616 | 673 | ||
674 | pwm0: pwm@fffb8000 { | ||
675 | compatible = "atmel,at91sam9rl-pwm"; | ||
676 | reg = <0xfffb8000 0x300>; | ||
677 | interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>; | ||
678 | #pwm-cells = <3>; | ||
679 | status = "disabled"; | ||
680 | }; | ||
681 | |||
617 | mmc0: mmc@fff80000 { | 682 | mmc0: mmc@fff80000 { |
618 | compatible = "atmel,hsmci"; | 683 | compatible = "atmel,hsmci"; |
619 | reg = <0xfff80000 0x600>; | 684 | reg = <0xfff80000 0x600>; |
620 | interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>; | 685 | interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>; |
686 | pinctrl-names = "default"; | ||
621 | dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>; | 687 | dmas = <&dma 1 AT91_DMA_CFG_PER_ID(0)>; |
622 | dma-names = "rxtx"; | 688 | dma-names = "rxtx"; |
623 | #address-cells = <1>; | 689 | #address-cells = <1>; |
@@ -629,6 +695,7 @@ | |||
629 | compatible = "atmel,hsmci"; | 695 | compatible = "atmel,hsmci"; |
630 | reg = <0xfffd0000 0x600>; | 696 | reg = <0xfffd0000 0x600>; |
631 | interrupts = <29 IRQ_TYPE_LEVEL_HIGH 0>; | 697 | interrupts = <29 IRQ_TYPE_LEVEL_HIGH 0>; |
698 | pinctrl-names = "default"; | ||
632 | dmas = <&dma 1 AT91_DMA_CFG_PER_ID(13)>; | 699 | dmas = <&dma 1 AT91_DMA_CFG_PER_ID(13)>; |
633 | dma-names = "rxtx"; | 700 | dma-names = "rxtx"; |
634 | #address-cells = <1>; | 701 | #address-cells = <1>; |
@@ -727,6 +794,15 @@ | |||
727 | }; | 794 | }; |
728 | }; | 795 | }; |
729 | 796 | ||
797 | fb0: fb@0x00500000 { | ||
798 | compatible = "atmel,at91sam9g45-lcdc"; | ||
799 | reg = <0x00500000 0x1000>; | ||
800 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>; | ||
801 | pinctrl-names = "default"; | ||
802 | pinctrl-0 = <&pinctrl_fb>; | ||
803 | status = "disabled"; | ||
804 | }; | ||
805 | |||
730 | nand0: nand@40000000 { | 806 | nand0: nand@40000000 { |
731 | compatible = "atmel,at91rm9200-nand"; | 807 | compatible = "atmel,at91rm9200-nand"; |
732 | #address-cells = <1>; | 808 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts index a4b00e5c61c0..7ff665a8c708 100644 --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts | |||
@@ -105,6 +105,14 @@ | |||
105 | AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PD29 gpio WP pin pull up */ | 105 | AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; /* PD29 gpio WP pin pull up */ |
106 | }; | 106 | }; |
107 | }; | 107 | }; |
108 | |||
109 | pwm0 { | ||
110 | pinctrl_pwm_leds: pwm-led { | ||
111 | atmel,pins = | ||
112 | <AT91_PIOD 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PD0 periph B */ | ||
113 | AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PD31 periph B */ | ||
114 | }; | ||
115 | }; | ||
108 | }; | 116 | }; |
109 | 117 | ||
110 | spi0: spi@fffa4000{ | 118 | spi0: spi@fffa4000{ |
@@ -121,6 +129,42 @@ | |||
121 | atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>; | 129 | atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>; |
122 | status = "okay"; | 130 | status = "okay"; |
123 | }; | 131 | }; |
132 | |||
133 | pwm0: pwm@fffb8000 { | ||
134 | status = "okay"; | ||
135 | |||
136 | pinctrl-names = "default"; | ||
137 | pinctrl-0 = <&pinctrl_pwm_leds>; | ||
138 | }; | ||
139 | }; | ||
140 | |||
141 | fb0: fb@0x00500000 { | ||
142 | display = <&display0>; | ||
143 | status = "okay"; | ||
144 | |||
145 | display0: display { | ||
146 | bits-per-pixel = <32>; | ||
147 | atmel,lcdcon-backlight; | ||
148 | atmel,dmacon = <0x1>; | ||
149 | atmel,lcdcon2 = <0x80008002>; | ||
150 | atmel,guard-time = <9>; | ||
151 | atmel,lcd-wiring-mode = "RGB"; | ||
152 | |||
153 | display-timings { | ||
154 | native-mode = <&timing0>; | ||
155 | timing0: timing0 { | ||
156 | clock-frequency = <9000000>; | ||
157 | hactive = <480>; | ||
158 | vactive = <272>; | ||
159 | hback-porch = <1>; | ||
160 | hfront-porch = <1>; | ||
161 | vback-porch = <40>; | ||
162 | vfront-porch = <1>; | ||
163 | hsync-len = <45>; | ||
164 | vsync-len = <1>; | ||
165 | }; | ||
166 | }; | ||
167 | }; | ||
124 | }; | 168 | }; |
125 | 169 | ||
126 | nand0: nand@40000000 { | 170 | nand0: nand@40000000 { |
@@ -165,16 +209,22 @@ | |||
165 | gpios = <&pioD 30 GPIO_ACTIVE_HIGH>; | 209 | gpios = <&pioD 30 GPIO_ACTIVE_HIGH>; |
166 | linux,default-trigger = "heartbeat"; | 210 | linux,default-trigger = "heartbeat"; |
167 | }; | 211 | }; |
212 | }; | ||
213 | |||
214 | pwmleds { | ||
215 | compatible = "pwm-leds"; | ||
168 | 216 | ||
169 | d6 { | 217 | d6 { |
170 | label = "d6"; | 218 | label = "d6"; |
171 | gpios = <&pioD 0 GPIO_ACTIVE_LOW>; | 219 | pwms = <&pwm0 3 5000 0>; |
220 | max-brightness = <255>; | ||
172 | linux,default-trigger = "nand-disk"; | 221 | linux,default-trigger = "nand-disk"; |
173 | }; | 222 | }; |
174 | 223 | ||
175 | d7 { | 224 | d7 { |
176 | label = "d7"; | 225 | label = "d7"; |
177 | gpios = <&pioD 31 GPIO_ACTIVE_LOW>; | 226 | pwms = <&pwm0 1 5000 0>; |
227 | max-brightness = <255>; | ||
178 | linux,default-trigger = "mmc0"; | 228 | linux,default-trigger = "mmc0"; |
179 | }; | 229 | }; |
180 | }; | 230 | }; |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index 6224f9fe2f2b..7248270a3ea6 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -33,6 +33,7 @@ | |||
33 | i2c0 = &i2c0; | 33 | i2c0 = &i2c0; |
34 | i2c1 = &i2c1; | 34 | i2c1 = &i2c1; |
35 | ssc0 = &ssc0; | 35 | ssc0 = &ssc0; |
36 | pwm0 = &pwm0; | ||
36 | }; | 37 | }; |
37 | cpus { | 38 | cpus { |
38 | #address-cells = <0>; | 39 | #address-cells = <0>; |
@@ -542,6 +543,14 @@ | |||
542 | reg = <0xfffffe40 0x10>; | 543 | reg = <0xfffffe40 0x10>; |
543 | status = "disabled"; | 544 | status = "disabled"; |
544 | }; | 545 | }; |
546 | |||
547 | pwm0: pwm@f8034000 { | ||
548 | compatible = "atmel,at91sam9rl-pwm"; | ||
549 | reg = <0xf8034000 0x300>; | ||
550 | interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>; | ||
551 | #pwm-cells = <3>; | ||
552 | status = "disabled"; | ||
553 | }; | ||
545 | }; | 554 | }; |
546 | 555 | ||
547 | nand0: nand@40000000 { | 556 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 40267a116c3c..6e5e9cfc3c49 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -35,6 +35,7 @@ | |||
35 | i2c1 = &i2c1; | 35 | i2c1 = &i2c1; |
36 | i2c2 = &i2c2; | 36 | i2c2 = &i2c2; |
37 | ssc0 = &ssc0; | 37 | ssc0 = &ssc0; |
38 | pwm0 = &pwm0; | ||
38 | }; | 39 | }; |
39 | cpus { | 40 | cpus { |
40 | #address-cells = <0>; | 41 | #address-cells = <0>; |
@@ -762,6 +763,14 @@ | |||
762 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; | 763 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; |
763 | status = "disabled"; | 764 | status = "disabled"; |
764 | }; | 765 | }; |
766 | |||
767 | pwm0: pwm@f8034000 { | ||
768 | compatible = "atmel,at91sam9rl-pwm"; | ||
769 | reg = <0xf8034000 0x300>; | ||
770 | interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>; | ||
771 | #pwm-cells = <3>; | ||
772 | status = "disabled"; | ||
773 | }; | ||
765 | }; | 774 | }; |
766 | 775 | ||
767 | nand0: nand@40000000 { | 776 | nand0: nand@40000000 { |
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index 8349a248ecea..7a70f4ca502a 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts | |||
@@ -23,7 +23,7 @@ | |||
23 | power { | 23 | power { |
24 | label = "Power"; | 24 | label = "Power"; |
25 | gpios = <&gpio0 18 1>; | 25 | gpios = <&gpio0 18 1>; |
26 | linux,default-trigger = "default-on"; | 26 | default-state = "keep"; |
27 | }; | 27 | }; |
28 | }; | 28 | }; |
29 | 29 | ||
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 113a8bc7bee7..852db2860015 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi | |||
@@ -107,51 +107,29 @@ | |||
107 | 0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */ | 107 | 0xffffe000 MBUS_ID(0x03, 0x01) 0 0x0000800 /* CESA SRAM 2k */ |
108 | 0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */ | 108 | 0xfffff000 MBUS_ID(0x0d, 0x00) 0 0x0000800>; /* PMU SRAM 2k */ |
109 | 109 | ||
110 | mbusc: mbus-ctrl@20000 { | 110 | spi0: spi-ctrl@10600 { |
111 | compatible = "marvell,mbus-controller"; | 111 | compatible = "marvell,orion-spi"; |
112 | reg = <0x20000 0x80>, <0x800100 0x8>; | 112 | #address-cells = <1>; |
113 | }; | 113 | #size-cells = <0>; |
114 | 114 | cell-index = <0>; | |
115 | timer: timer@20300 { | 115 | interrupts = <6>; |
116 | compatible = "marvell,orion-timer"; | 116 | reg = <0x10600 0x28>; |
117 | reg = <0x20300 0x20>; | ||
118 | interrupt-parent = <&bridge_intc>; | ||
119 | interrupts = <1>, <2>; | ||
120 | clocks = <&core_clk 0>; | 117 | clocks = <&core_clk 0>; |
118 | pinctrl-0 = <&pmx_spi0>; | ||
119 | pinctrl-names = "default"; | ||
120 | status = "disabled"; | ||
121 | }; | 121 | }; |
122 | 122 | ||
123 | intc: main-interrupt-ctrl@20200 { | 123 | i2c0: i2c-ctrl@11000 { |
124 | compatible = "marvell,orion-intc"; | 124 | compatible = "marvell,mv64xxx-i2c"; |
125 | interrupt-controller; | 125 | reg = <0x11000 0x20>; |
126 | #interrupt-cells = <1>; | 126 | #address-cells = <1>; |
127 | reg = <0x20200 0x10>, <0x20210 0x10>; | 127 | #size-cells = <0>; |
128 | }; | 128 | interrupts = <11>; |
129 | 129 | clock-frequency = <400000>; | |
130 | bridge_intc: bridge-interrupt-ctrl@20110 { | 130 | timeout-ms = <1000>; |
131 | compatible = "marvell,orion-bridge-intc"; | ||
132 | interrupt-controller; | ||
133 | #interrupt-cells = <1>; | ||
134 | reg = <0x20110 0x8>; | ||
135 | interrupts = <0>; | ||
136 | marvell,#interrupts = <5>; | ||
137 | }; | ||
138 | |||
139 | core_clk: core-clocks@d0214 { | ||
140 | compatible = "marvell,dove-core-clock"; | ||
141 | reg = <0xd0214 0x4>; | ||
142 | #clock-cells = <1>; | ||
143 | }; | ||
144 | |||
145 | gate_clk: clock-gating-ctrl@d0038 { | ||
146 | compatible = "marvell,dove-gating-clock"; | ||
147 | reg = <0xd0038 0x4>; | ||
148 | clocks = <&core_clk 0>; | 131 | clocks = <&core_clk 0>; |
149 | #clock-cells = <1>; | 132 | status = "disabled"; |
150 | }; | ||
151 | |||
152 | thermal: thermal-diode@d001c { | ||
153 | compatible = "marvell,dove-thermal"; | ||
154 | reg = <0xd001c 0x0c>, <0xd005c 0x08>; | ||
155 | }; | 133 | }; |
156 | 134 | ||
157 | uart0: serial@12000 { | 135 | uart0: serial@12000 { |
@@ -192,34 +170,213 @@ | |||
192 | status = "disabled"; | 170 | status = "disabled"; |
193 | }; | 171 | }; |
194 | 172 | ||
195 | gpio0: gpio-ctrl@d0400 { | 173 | spi1: spi-ctrl@14600 { |
196 | compatible = "marvell,orion-gpio"; | 174 | compatible = "marvell,orion-spi"; |
197 | #gpio-cells = <2>; | 175 | #address-cells = <1>; |
198 | gpio-controller; | 176 | #size-cells = <0>; |
199 | reg = <0xd0400 0x20>; | 177 | cell-index = <1>; |
200 | ngpios = <32>; | 178 | interrupts = <5>; |
179 | reg = <0x14600 0x28>; | ||
180 | clocks = <&core_clk 0>; | ||
181 | status = "disabled"; | ||
182 | }; | ||
183 | |||
184 | mbusc: mbus-ctrl@20000 { | ||
185 | compatible = "marvell,mbus-controller"; | ||
186 | reg = <0x20000 0x80>, <0x800100 0x8>; | ||
187 | }; | ||
188 | |||
189 | bridge_intc: bridge-interrupt-ctrl@20110 { | ||
190 | compatible = "marvell,orion-bridge-intc"; | ||
201 | interrupt-controller; | 191 | interrupt-controller; |
202 | #interrupt-cells = <2>; | 192 | #interrupt-cells = <1>; |
203 | interrupts = <12>, <13>, <14>, <60>; | 193 | reg = <0x20110 0x8>; |
194 | interrupts = <0>; | ||
195 | marvell,#interrupts = <5>; | ||
204 | }; | 196 | }; |
205 | 197 | ||
206 | gpio1: gpio-ctrl@d0420 { | 198 | intc: main-interrupt-ctrl@20200 { |
207 | compatible = "marvell,orion-gpio"; | 199 | compatible = "marvell,orion-intc"; |
208 | #gpio-cells = <2>; | ||
209 | gpio-controller; | ||
210 | reg = <0xd0420 0x20>; | ||
211 | ngpios = <32>; | ||
212 | interrupt-controller; | 200 | interrupt-controller; |
213 | #interrupt-cells = <2>; | 201 | #interrupt-cells = <1>; |
214 | interrupts = <61>; | 202 | reg = <0x20200 0x10>, <0x20210 0x10>; |
215 | }; | 203 | }; |
216 | 204 | ||
217 | gpio2: gpio-ctrl@e8400 { | 205 | timer: timer@20300 { |
218 | compatible = "marvell,orion-gpio"; | 206 | compatible = "marvell,orion-timer"; |
219 | #gpio-cells = <2>; | 207 | reg = <0x20300 0x20>; |
220 | gpio-controller; | 208 | interrupt-parent = <&bridge_intc>; |
221 | reg = <0xe8400 0x0c>; | 209 | interrupts = <1>, <2>; |
222 | ngpios = <8>; | 210 | clocks = <&core_clk 0>; |
211 | }; | ||
212 | |||
213 | crypto: crypto-engine@30000 { | ||
214 | compatible = "marvell,orion-crypto"; | ||
215 | reg = <0x30000 0x10000>, | ||
216 | <0xffffe000 0x800>; | ||
217 | reg-names = "regs", "sram"; | ||
218 | interrupts = <31>; | ||
219 | clocks = <&gate_clk 15>; | ||
220 | status = "okay"; | ||
221 | }; | ||
222 | |||
223 | ehci0: usb-host@50000 { | ||
224 | compatible = "marvell,orion-ehci"; | ||
225 | reg = <0x50000 0x1000>; | ||
226 | interrupts = <24>; | ||
227 | clocks = <&gate_clk 0>; | ||
228 | status = "okay"; | ||
229 | }; | ||
230 | |||
231 | ehci1: usb-host@51000 { | ||
232 | compatible = "marvell,orion-ehci"; | ||
233 | reg = <0x51000 0x1000>; | ||
234 | interrupts = <25>; | ||
235 | clocks = <&gate_clk 1>; | ||
236 | status = "okay"; | ||
237 | }; | ||
238 | |||
239 | xor0: dma-engine@60800 { | ||
240 | compatible = "marvell,orion-xor"; | ||
241 | reg = <0x60800 0x100 | ||
242 | 0x60a00 0x100>; | ||
243 | clocks = <&gate_clk 23>; | ||
244 | status = "okay"; | ||
245 | |||
246 | channel0 { | ||
247 | interrupts = <39>; | ||
248 | dmacap,memcpy; | ||
249 | dmacap,xor; | ||
250 | }; | ||
251 | |||
252 | channel1 { | ||
253 | interrupts = <40>; | ||
254 | dmacap,memcpy; | ||
255 | dmacap,xor; | ||
256 | }; | ||
257 | }; | ||
258 | |||
259 | xor1: dma-engine@60900 { | ||
260 | compatible = "marvell,orion-xor"; | ||
261 | reg = <0x60900 0x100 | ||
262 | 0x60b00 0x100>; | ||
263 | clocks = <&gate_clk 24>; | ||
264 | status = "okay"; | ||
265 | |||
266 | channel0 { | ||
267 | interrupts = <42>; | ||
268 | dmacap,memcpy; | ||
269 | dmacap,xor; | ||
270 | }; | ||
271 | |||
272 | channel1 { | ||
273 | interrupts = <43>; | ||
274 | dmacap,memcpy; | ||
275 | dmacap,xor; | ||
276 | }; | ||
277 | }; | ||
278 | |||
279 | sdio1: sdio-host@90000 { | ||
280 | compatible = "marvell,dove-sdhci"; | ||
281 | reg = <0x90000 0x100>; | ||
282 | interrupts = <36>, <38>; | ||
283 | clocks = <&gate_clk 9>; | ||
284 | pinctrl-0 = <&pmx_sdio1>; | ||
285 | pinctrl-names = "default"; | ||
286 | status = "disabled"; | ||
287 | }; | ||
288 | |||
289 | eth: ethernet-ctrl@72000 { | ||
290 | compatible = "marvell,orion-eth"; | ||
291 | #address-cells = <1>; | ||
292 | #size-cells = <0>; | ||
293 | reg = <0x72000 0x4000>; | ||
294 | clocks = <&gate_clk 2>; | ||
295 | marvell,tx-checksum-limit = <1600>; | ||
296 | status = "disabled"; | ||
297 | |||
298 | ethernet-port@0 { | ||
299 | device_type = "network"; | ||
300 | compatible = "marvell,orion-eth-port"; | ||
301 | reg = <0>; | ||
302 | interrupts = <29>; | ||
303 | /* overwrite MAC address in bootloader */ | ||
304 | local-mac-address = [00 00 00 00 00 00]; | ||
305 | phy-handle = <ðphy>; | ||
306 | }; | ||
307 | }; | ||
308 | |||
309 | mdio: mdio-bus@72004 { | ||
310 | compatible = "marvell,orion-mdio"; | ||
311 | #address-cells = <1>; | ||
312 | #size-cells = <0>; | ||
313 | reg = <0x72004 0x84>; | ||
314 | interrupts = <30>; | ||
315 | clocks = <&gate_clk 2>; | ||
316 | status = "disabled"; | ||
317 | |||
318 | ethphy: ethernet-phy { | ||
319 | device_type = "ethernet-phy"; | ||
320 | /* set phy address in board file */ | ||
321 | }; | ||
322 | }; | ||
323 | |||
324 | sdio0: sdio-host@92000 { | ||
325 | compatible = "marvell,dove-sdhci"; | ||
326 | reg = <0x92000 0x100>; | ||
327 | interrupts = <35>, <37>; | ||
328 | clocks = <&gate_clk 8>; | ||
329 | pinctrl-0 = <&pmx_sdio0>; | ||
330 | pinctrl-names = "default"; | ||
331 | status = "disabled"; | ||
332 | }; | ||
333 | |||
334 | sata0: sata-host@a0000 { | ||
335 | compatible = "marvell,orion-sata"; | ||
336 | reg = <0xa0000 0x2400>; | ||
337 | interrupts = <62>; | ||
338 | clocks = <&gate_clk 3>; | ||
339 | nr-ports = <1>; | ||
340 | status = "disabled"; | ||
341 | }; | ||
342 | |||
343 | audio0: audio-controller@b0000 { | ||
344 | compatible = "marvell,dove-audio"; | ||
345 | reg = <0xb0000 0x2210>; | ||
346 | interrupts = <19>, <20>; | ||
347 | clocks = <&gate_clk 12>; | ||
348 | clock-names = "internal"; | ||
349 | status = "disabled"; | ||
350 | }; | ||
351 | |||
352 | audio1: audio-controller@b4000 { | ||
353 | compatible = "marvell,dove-audio"; | ||
354 | reg = <0xb4000 0x2210>; | ||
355 | interrupts = <21>, <22>; | ||
356 | clocks = <&gate_clk 13>; | ||
357 | clock-names = "internal"; | ||
358 | status = "disabled"; | ||
359 | }; | ||
360 | |||
361 | thermal: thermal-diode@d001c { | ||
362 | compatible = "marvell,dove-thermal"; | ||
363 | reg = <0xd001c 0x0c>, <0xd005c 0x08>; | ||
364 | }; | ||
365 | |||
366 | gate_clk: clock-gating-ctrl@d0038 { | ||
367 | compatible = "marvell,dove-gating-clock"; | ||
368 | reg = <0xd0038 0x4>; | ||
369 | clocks = <&core_clk 0>; | ||
370 | #clock-cells = <1>; | ||
371 | }; | ||
372 | |||
373 | pmu_intc: pmu-interrupt-ctrl@d0050 { | ||
374 | compatible = "marvell,dove-pmu-intc"; | ||
375 | interrupt-controller; | ||
376 | #interrupt-cells = <1>; | ||
377 | reg = <0xd0050 0x8>; | ||
378 | interrupts = <33>; | ||
379 | marvell,#interrupts = <7>; | ||
223 | }; | 380 | }; |
224 | 381 | ||
225 | pinctrl: pin-ctrl@d0200 { | 382 | pinctrl: pin-ctrl@d0200 { |
@@ -413,193 +570,47 @@ | |||
413 | }; | 570 | }; |
414 | }; | 571 | }; |
415 | 572 | ||
416 | spi0: spi-ctrl@10600 { | 573 | core_clk: core-clocks@d0214 { |
417 | compatible = "marvell,orion-spi"; | 574 | compatible = "marvell,dove-core-clock"; |
418 | #address-cells = <1>; | 575 | reg = <0xd0214 0x4>; |
419 | #size-cells = <0>; | 576 | #clock-cells = <1>; |
420 | cell-index = <0>; | ||
421 | interrupts = <6>; | ||
422 | reg = <0x10600 0x28>; | ||
423 | clocks = <&core_clk 0>; | ||
424 | pinctrl-0 = <&pmx_spi0>; | ||
425 | pinctrl-names = "default"; | ||
426 | status = "disabled"; | ||
427 | }; | ||
428 | |||
429 | spi1: spi-ctrl@14600 { | ||
430 | compatible = "marvell,orion-spi"; | ||
431 | #address-cells = <1>; | ||
432 | #size-cells = <0>; | ||
433 | cell-index = <1>; | ||
434 | interrupts = <5>; | ||
435 | reg = <0x14600 0x28>; | ||
436 | clocks = <&core_clk 0>; | ||
437 | status = "disabled"; | ||
438 | }; | ||
439 | |||
440 | i2c0: i2c-ctrl@11000 { | ||
441 | compatible = "marvell,mv64xxx-i2c"; | ||
442 | reg = <0x11000 0x20>; | ||
443 | #address-cells = <1>; | ||
444 | #size-cells = <0>; | ||
445 | interrupts = <11>; | ||
446 | clock-frequency = <400000>; | ||
447 | timeout-ms = <1000>; | ||
448 | clocks = <&core_clk 0>; | ||
449 | status = "disabled"; | ||
450 | }; | ||
451 | |||
452 | ehci0: usb-host@50000 { | ||
453 | compatible = "marvell,orion-ehci"; | ||
454 | reg = <0x50000 0x1000>; | ||
455 | interrupts = <24>; | ||
456 | clocks = <&gate_clk 0>; | ||
457 | status = "okay"; | ||
458 | }; | ||
459 | |||
460 | ehci1: usb-host@51000 { | ||
461 | compatible = "marvell,orion-ehci"; | ||
462 | reg = <0x51000 0x1000>; | ||
463 | interrupts = <25>; | ||
464 | clocks = <&gate_clk 1>; | ||
465 | status = "okay"; | ||
466 | }; | ||
467 | |||
468 | sdio0: sdio-host@92000 { | ||
469 | compatible = "marvell,dove-sdhci"; | ||
470 | reg = <0x92000 0x100>; | ||
471 | interrupts = <35>, <37>; | ||
472 | clocks = <&gate_clk 8>; | ||
473 | pinctrl-0 = <&pmx_sdio0>; | ||
474 | pinctrl-names = "default"; | ||
475 | status = "disabled"; | ||
476 | }; | 577 | }; |
477 | 578 | ||
478 | sdio1: sdio-host@90000 { | 579 | gpio0: gpio-ctrl@d0400 { |
479 | compatible = "marvell,dove-sdhci"; | 580 | compatible = "marvell,orion-gpio"; |
480 | reg = <0x90000 0x100>; | 581 | #gpio-cells = <2>; |
481 | interrupts = <36>, <38>; | 582 | gpio-controller; |
482 | clocks = <&gate_clk 9>; | 583 | reg = <0xd0400 0x20>; |
483 | pinctrl-0 = <&pmx_sdio1>; | 584 | ngpios = <32>; |
484 | pinctrl-names = "default"; | 585 | interrupt-controller; |
485 | status = "disabled"; | 586 | #interrupt-cells = <2>; |
587 | interrupts = <12>, <13>, <14>, <60>; | ||
486 | }; | 588 | }; |
487 | 589 | ||
488 | sata0: sata-host@a0000 { | 590 | gpio1: gpio-ctrl@d0420 { |
489 | compatible = "marvell,orion-sata"; | 591 | compatible = "marvell,orion-gpio"; |
490 | reg = <0xa0000 0x2400>; | 592 | #gpio-cells = <2>; |
491 | interrupts = <62>; | 593 | gpio-controller; |
492 | clocks = <&gate_clk 3>; | 594 | reg = <0xd0420 0x20>; |
493 | nr-ports = <1>; | 595 | ngpios = <32>; |
494 | status = "disabled"; | 596 | interrupt-controller; |
597 | #interrupt-cells = <2>; | ||
598 | interrupts = <61>; | ||
495 | }; | 599 | }; |
496 | 600 | ||
497 | rtc: real-time-clock@d8500 { | 601 | rtc: real-time-clock@d8500 { |
498 | compatible = "marvell,orion-rtc"; | 602 | compatible = "marvell,orion-rtc"; |
499 | reg = <0xd8500 0x20>; | 603 | reg = <0xd8500 0x20>; |
604 | interrupt-parent = <&pmu_intc>; | ||
605 | interrupts = <5>; | ||
500 | }; | 606 | }; |
501 | 607 | ||
502 | crypto: crypto-engine@30000 { | 608 | gpio2: gpio-ctrl@e8400 { |
503 | compatible = "marvell,orion-crypto"; | 609 | compatible = "marvell,orion-gpio"; |
504 | reg = <0x30000 0x10000>, | 610 | #gpio-cells = <2>; |
505 | <0xffffe000 0x800>; | 611 | gpio-controller; |
506 | reg-names = "regs", "sram"; | 612 | reg = <0xe8400 0x0c>; |
507 | interrupts = <31>; | 613 | ngpios = <8>; |
508 | clocks = <&gate_clk 15>; | ||
509 | status = "okay"; | ||
510 | }; | ||
511 | |||
512 | xor0: dma-engine@60800 { | ||
513 | compatible = "marvell,orion-xor"; | ||
514 | reg = <0x60800 0x100 | ||
515 | 0x60a00 0x100>; | ||
516 | clocks = <&gate_clk 23>; | ||
517 | status = "okay"; | ||
518 | |||
519 | channel0 { | ||
520 | interrupts = <39>; | ||
521 | dmacap,memcpy; | ||
522 | dmacap,xor; | ||
523 | }; | ||
524 | |||
525 | channel1 { | ||
526 | interrupts = <40>; | ||
527 | dmacap,memcpy; | ||
528 | dmacap,xor; | ||
529 | }; | ||
530 | }; | ||
531 | |||
532 | xor1: dma-engine@60900 { | ||
533 | compatible = "marvell,orion-xor"; | ||
534 | reg = <0x60900 0x100 | ||
535 | 0x60b00 0x100>; | ||
536 | clocks = <&gate_clk 24>; | ||
537 | status = "okay"; | ||
538 | |||
539 | channel0 { | ||
540 | interrupts = <42>; | ||
541 | dmacap,memcpy; | ||
542 | dmacap,xor; | ||
543 | }; | ||
544 | |||
545 | channel1 { | ||
546 | interrupts = <43>; | ||
547 | dmacap,memcpy; | ||
548 | dmacap,xor; | ||
549 | }; | ||
550 | }; | ||
551 | |||
552 | mdio: mdio-bus@72004 { | ||
553 | compatible = "marvell,orion-mdio"; | ||
554 | #address-cells = <1>; | ||
555 | #size-cells = <0>; | ||
556 | reg = <0x72004 0x84>; | ||
557 | interrupts = <30>; | ||
558 | clocks = <&gate_clk 2>; | ||
559 | status = "disabled"; | ||
560 | |||
561 | ethphy: ethernet-phy { | ||
562 | device-type = "ethernet-phy"; | ||
563 | /* set phy address in board file */ | ||
564 | }; | ||
565 | }; | ||
566 | |||
567 | eth: ethernet-ctrl@72000 { | ||
568 | compatible = "marvell,orion-eth"; | ||
569 | #address-cells = <1>; | ||
570 | #size-cells = <0>; | ||
571 | reg = <0x72000 0x4000>; | ||
572 | clocks = <&gate_clk 2>; | ||
573 | marvell,tx-checksum-limit = <1600>; | ||
574 | status = "disabled"; | ||
575 | |||
576 | ethernet-port@0 { | ||
577 | device_type = "network"; | ||
578 | compatible = "marvell,orion-eth-port"; | ||
579 | reg = <0>; | ||
580 | interrupts = <29>; | ||
581 | /* overwrite MAC address in bootloader */ | ||
582 | local-mac-address = [00 00 00 00 00 00]; | ||
583 | phy-handle = <ðphy>; | ||
584 | }; | ||
585 | }; | ||
586 | |||
587 | audio0: audio-controller@b0000 { | ||
588 | compatible = "marvell,dove-audio"; | ||
589 | reg = <0xb0000 0x2210>; | ||
590 | interrupts = <19>, <20>; | ||
591 | clocks = <&gate_clk 12>; | ||
592 | clock-names = "internal"; | ||
593 | status = "disabled"; | ||
594 | }; | ||
595 | |||
596 | audio1: audio-controller@b4000 { | ||
597 | compatible = "marvell,dove-audio"; | ||
598 | reg = <0xb4000 0x2210>; | ||
599 | interrupts = <21>, <22>; | ||
600 | clocks = <&gate_clk 13>; | ||
601 | clock-names = "internal"; | ||
602 | status = "disabled"; | ||
603 | }; | 614 | }; |
604 | }; | 615 | }; |
605 | }; | 616 | }; |
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts index 861aa7d6fc7d..50ccd151091e 100644 --- a/arch/arm/boot/dts/emev2-kzm9d.dts +++ b/arch/arm/boot/dts/emev2-kzm9d.dts | |||
@@ -9,7 +9,10 @@ | |||
9 | */ | 9 | */ |
10 | /dts-v1/; | 10 | /dts-v1/; |
11 | 11 | ||
12 | /include/ "emev2.dtsi" | 12 | #include "emev2.dtsi" |
13 | #include <dt-bindings/gpio/gpio.h> | ||
14 | #include <dt-bindings/input/input.h> | ||
15 | #include <dt-bindings/interrupt-controller/irq.h> | ||
13 | 16 | ||
14 | / { | 17 | / { |
15 | model = "EMEV2 KZM9D Board"; | 18 | model = "EMEV2 KZM9D Board"; |
@@ -47,11 +50,46 @@ | |||
47 | reg = <0x20000000 0x10000>; | 50 | reg = <0x20000000 0x10000>; |
48 | phy-mode = "mii"; | 51 | phy-mode = "mii"; |
49 | interrupt-parent = <&gpio0>; | 52 | interrupt-parent = <&gpio0>; |
50 | interrupts = <1 1>; /* active high */ | 53 | interrupts = <1 IRQ_TYPE_EDGE_RISING>; |
51 | reg-io-width = <4>; | 54 | reg-io-width = <4>; |
52 | smsc,irq-active-high; | 55 | smsc,irq-active-high; |
53 | smsc,irq-push-pull; | 56 | smsc,irq-push-pull; |
54 | vddvario-supply = <®_1p8v>; | 57 | vddvario-supply = <®_1p8v>; |
55 | vdd33a-supply = <®_3p3v>; | 58 | vdd33a-supply = <®_3p3v>; |
56 | }; | 59 | }; |
60 | |||
61 | gpio_keys { | ||
62 | compatible = "gpio-keys"; | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <0>; | ||
65 | |||
66 | button@1 { | ||
67 | debounce_interval = <50>; | ||
68 | wakeup = <1>; | ||
69 | label = "DSW2-1"; | ||
70 | linux,code = <KEY_1>; | ||
71 | gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; | ||
72 | }; | ||
73 | button@2 { | ||
74 | debounce_interval = <50>; | ||
75 | wakeup = <1>; | ||
76 | label = "DSW2-2"; | ||
77 | linux,code = <KEY_2>; | ||
78 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; | ||
79 | }; | ||
80 | button@3 { | ||
81 | debounce_interval = <50>; | ||
82 | wakeup = <1>; | ||
83 | label = "DSW2-3"; | ||
84 | linux,code = <KEY_3>; | ||
85 | gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; | ||
86 | }; | ||
87 | button@4 { | ||
88 | debounce_interval = <50>; | ||
89 | wakeup = <1>; | ||
90 | label = "DSW2-4"; | ||
91 | linux,code = <KEY_4>; | ||
92 | gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; | ||
93 | }; | ||
94 | }; | ||
57 | }; | 95 | }; |
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi index 9063a4434d6a..e37985fa10e2 100644 --- a/arch/arm/boot/dts/emev2.dtsi +++ b/arch/arm/boot/dts/emev2.dtsi | |||
@@ -8,7 +8,8 @@ | |||
8 | * kind, whether express or implied. | 8 | * kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /include/ "skeleton.dtsi" | 11 | #include "skeleton.dtsi" |
12 | #include <dt-bindings/interrupt-controller/irq.h> | ||
12 | 13 | ||
13 | / { | 14 | / { |
14 | compatible = "renesas,emev2"; | 15 | compatible = "renesas,emev2"; |
@@ -48,44 +49,129 @@ | |||
48 | 49 | ||
49 | pmu { | 50 | pmu { |
50 | compatible = "arm,cortex-a9-pmu"; | 51 | compatible = "arm,cortex-a9-pmu"; |
51 | interrupts = <0 120 4>, | 52 | interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, |
52 | <0 121 4>; | 53 | <0 121 IRQ_TYPE_LEVEL_HIGH>; |
54 | }; | ||
55 | |||
56 | smu@e0110000 { | ||
57 | compatible = "renesas,emev2-smu"; | ||
58 | reg = <0xe0110000 0x10000>; | ||
59 | #address-cells = <2>; | ||
60 | #size-cells = <0>; | ||
61 | |||
62 | c32ki: c32ki { | ||
63 | compatible = "fixed-clock"; | ||
64 | clock-frequency = <32768>; | ||
65 | #clock-cells = <0>; | ||
66 | }; | ||
67 | pll3_fo: pll3_fo { | ||
68 | compatible = "fixed-factor-clock"; | ||
69 | clocks = <&c32ki>; | ||
70 | clock-div = <1>; | ||
71 | clock-mult = <7000>; | ||
72 | #clock-cells = <0>; | ||
73 | }; | ||
74 | usia_u0_sclkdiv: usia_u0_sclkdiv { | ||
75 | compatible = "renesas,emev2-smu-clkdiv"; | ||
76 | reg = <0x610 0>; | ||
77 | clocks = <&pll3_fo>; | ||
78 | #clock-cells = <0>; | ||
79 | }; | ||
80 | usib_u1_sclkdiv: usib_u1_sclkdiv { | ||
81 | compatible = "renesas,emev2-smu-clkdiv"; | ||
82 | reg = <0x65c 0>; | ||
83 | clocks = <&pll3_fo>; | ||
84 | #clock-cells = <0>; | ||
85 | }; | ||
86 | usib_u2_sclkdiv: usib_u2_sclkdiv { | ||
87 | compatible = "renesas,emev2-smu-clkdiv"; | ||
88 | reg = <0x65c 16>; | ||
89 | clocks = <&pll3_fo>; | ||
90 | #clock-cells = <0>; | ||
91 | }; | ||
92 | usib_u3_sclkdiv: usib_u3_sclkdiv { | ||
93 | compatible = "renesas,emev2-smu-clkdiv"; | ||
94 | reg = <0x660 0>; | ||
95 | clocks = <&pll3_fo>; | ||
96 | #clock-cells = <0>; | ||
97 | }; | ||
98 | usia_u0_sclk: usia_u0_sclk { | ||
99 | compatible = "renesas,emev2-smu-gclk"; | ||
100 | reg = <0x4a0 1>; | ||
101 | clocks = <&usia_u0_sclkdiv>; | ||
102 | #clock-cells = <0>; | ||
103 | }; | ||
104 | usib_u1_sclk: usib_u1_sclk { | ||
105 | compatible = "renesas,emev2-smu-gclk"; | ||
106 | reg = <0x4b8 1>; | ||
107 | clocks = <&usib_u1_sclkdiv>; | ||
108 | #clock-cells = <0>; | ||
109 | }; | ||
110 | usib_u2_sclk: usib_u2_sclk { | ||
111 | compatible = "renesas,emev2-smu-gclk"; | ||
112 | reg = <0x4bc 1>; | ||
113 | clocks = <&usib_u2_sclkdiv>; | ||
114 | #clock-cells = <0>; | ||
115 | }; | ||
116 | usib_u3_sclk: usib_u3_sclk { | ||
117 | compatible = "renesas,emev2-smu-gclk"; | ||
118 | reg = <0x4c0 1>; | ||
119 | clocks = <&usib_u3_sclkdiv>; | ||
120 | #clock-cells = <0>; | ||
121 | }; | ||
122 | sti_sclk: sti_sclk { | ||
123 | compatible = "renesas,emev2-smu-gclk"; | ||
124 | reg = <0x528 1>; | ||
125 | clocks = <&c32ki>; | ||
126 | #clock-cells = <0>; | ||
127 | }; | ||
53 | }; | 128 | }; |
54 | 129 | ||
55 | sti@e0180000 { | 130 | sti@e0180000 { |
56 | compatible = "renesas,em-sti"; | 131 | compatible = "renesas,em-sti"; |
57 | reg = <0xe0180000 0x54>; | 132 | reg = <0xe0180000 0x54>; |
58 | interrupts = <0 125 0>; | 133 | interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH>; |
134 | clocks = <&sti_sclk>; | ||
135 | clock-names = "sclk"; | ||
59 | }; | 136 | }; |
60 | 137 | ||
61 | uart@e1020000 { | 138 | uart@e1020000 { |
62 | compatible = "renesas,em-uart"; | 139 | compatible = "renesas,em-uart"; |
63 | reg = <0xe1020000 0x38>; | 140 | reg = <0xe1020000 0x38>; |
64 | interrupts = <0 8 0>; | 141 | interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>; |
142 | clocks = <&usia_u0_sclk>; | ||
143 | clock-names = "sclk"; | ||
65 | }; | 144 | }; |
66 | 145 | ||
67 | uart@e1030000 { | 146 | uart@e1030000 { |
68 | compatible = "renesas,em-uart"; | 147 | compatible = "renesas,em-uart"; |
69 | reg = <0xe1030000 0x38>; | 148 | reg = <0xe1030000 0x38>; |
70 | interrupts = <0 9 0>; | 149 | interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; |
150 | clocks = <&usib_u1_sclk>; | ||
151 | clock-names = "sclk"; | ||
71 | }; | 152 | }; |
72 | 153 | ||
73 | uart@e1040000 { | 154 | uart@e1040000 { |
74 | compatible = "renesas,em-uart"; | 155 | compatible = "renesas,em-uart"; |
75 | reg = <0xe1040000 0x38>; | 156 | reg = <0xe1040000 0x38>; |
76 | interrupts = <0 10 0>; | 157 | interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>; |
158 | clocks = <&usib_u2_sclk>; | ||
159 | clock-names = "sclk"; | ||
77 | }; | 160 | }; |
78 | 161 | ||
79 | uart@e1050000 { | 162 | uart@e1050000 { |
80 | compatible = "renesas,em-uart"; | 163 | compatible = "renesas,em-uart"; |
81 | reg = <0xe1050000 0x38>; | 164 | reg = <0xe1050000 0x38>; |
82 | interrupts = <0 11 0>; | 165 | interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; |
166 | clocks = <&usib_u3_sclk>; | ||
167 | clock-names = "sclk"; | ||
83 | }; | 168 | }; |
84 | 169 | ||
85 | gpio0: gpio@e0050000 { | 170 | gpio0: gpio@e0050000 { |
86 | compatible = "renesas,em-gio"; | 171 | compatible = "renesas,em-gio"; |
87 | reg = <0xe0050000 0x2c>, <0xe0050040 0x20>; | 172 | reg = <0xe0050000 0x2c>, <0xe0050040 0x20>; |
88 | interrupts = <0 67 0>, <0 68 0>; | 173 | interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>, |
174 | <0 68 IRQ_TYPE_LEVEL_HIGH>; | ||
89 | gpio-controller; | 175 | gpio-controller; |
90 | #gpio-cells = <2>; | 176 | #gpio-cells = <2>; |
91 | ngpios = <32>; | 177 | ngpios = <32>; |
@@ -95,7 +181,8 @@ | |||
95 | gpio1: gpio@e0050080 { | 181 | gpio1: gpio@e0050080 { |
96 | compatible = "renesas,em-gio"; | 182 | compatible = "renesas,em-gio"; |
97 | reg = <0xe0050080 0x2c>, <0xe00500c0 0x20>; | 183 | reg = <0xe0050080 0x2c>, <0xe00500c0 0x20>; |
98 | interrupts = <0 69 0>, <0 70 0>; | 184 | interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>, |
185 | <0 70 IRQ_TYPE_LEVEL_HIGH>; | ||
99 | gpio-controller; | 186 | gpio-controller; |
100 | #gpio-cells = <2>; | 187 | #gpio-cells = <2>; |
101 | ngpios = <32>; | 188 | ngpios = <32>; |
@@ -105,7 +192,8 @@ | |||
105 | gpio2: gpio@e0050100 { | 192 | gpio2: gpio@e0050100 { |
106 | compatible = "renesas,em-gio"; | 193 | compatible = "renesas,em-gio"; |
107 | reg = <0xe0050100 0x2c>, <0xe0050140 0x20>; | 194 | reg = <0xe0050100 0x2c>, <0xe0050140 0x20>; |
108 | interrupts = <0 71 0>, <0 72 0>; | 195 | interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>, |
196 | <0 72 IRQ_TYPE_LEVEL_HIGH>; | ||
109 | gpio-controller; | 197 | gpio-controller; |
110 | #gpio-cells = <2>; | 198 | #gpio-cells = <2>; |
111 | ngpios = <32>; | 199 | ngpios = <32>; |
@@ -115,7 +203,8 @@ | |||
115 | gpio3: gpio@e0050180 { | 203 | gpio3: gpio@e0050180 { |
116 | compatible = "renesas,em-gio"; | 204 | compatible = "renesas,em-gio"; |
117 | reg = <0xe0050180 0x2c>, <0xe00501c0 0x20>; | 205 | reg = <0xe0050180 0x2c>, <0xe00501c0 0x20>; |
118 | interrupts = <0 73 0>, <0 74 0>; | 206 | interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>, |
207 | <0 74 IRQ_TYPE_LEVEL_HIGH>; | ||
119 | gpio-controller; | 208 | gpio-controller; |
120 | #gpio-cells = <2>; | 209 | #gpio-cells = <2>; |
121 | ngpios = <32>; | 210 | ngpios = <32>; |
@@ -125,7 +214,8 @@ | |||
125 | gpio4: gpio@e0050200 { | 214 | gpio4: gpio@e0050200 { |
126 | compatible = "renesas,em-gio"; | 215 | compatible = "renesas,em-gio"; |
127 | reg = <0xe0050200 0x2c>, <0xe0050240 0x20>; | 216 | reg = <0xe0050200 0x2c>, <0xe0050240 0x20>; |
128 | interrupts = <0 75 0>, <0 76 0>; | 217 | interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>, |
218 | <0 76 IRQ_TYPE_LEVEL_HIGH>; | ||
129 | gpio-controller; | 219 | gpio-controller; |
130 | #gpio-cells = <2>; | 220 | #gpio-cells = <2>; |
131 | ngpios = <31>; | 221 | ngpios = <31>; |
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index a73eeb5f258f..08452e183b57 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
@@ -85,21 +85,21 @@ | |||
85 | reg = <0x10023CE0 0x20>; | 85 | reg = <0x10023CE0 0x20>; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | gic:interrupt-controller@10490000 { | 88 | gic: interrupt-controller@10490000 { |
89 | compatible = "arm,cortex-a9-gic"; | 89 | compatible = "arm,cortex-a9-gic"; |
90 | #interrupt-cells = <3>; | 90 | #interrupt-cells = <3>; |
91 | interrupt-controller; | 91 | interrupt-controller; |
92 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; | 92 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | combiner:interrupt-controller@10440000 { | 95 | combiner: interrupt-controller@10440000 { |
96 | compatible = "samsung,exynos4210-combiner"; | 96 | compatible = "samsung,exynos4210-combiner"; |
97 | #interrupt-cells = <2>; | 97 | #interrupt-cells = <2>; |
98 | interrupt-controller; | 98 | interrupt-controller; |
99 | reg = <0x10440000 0x1000>; | 99 | reg = <0x10440000 0x1000>; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | sys_reg: sysreg { | 102 | sys_reg: syscon@10010000 { |
103 | compatible = "samsung,exynos4-sysreg", "syscon"; | 103 | compatible = "samsung,exynos4-sysreg", "syscon"; |
104 | reg = <0x10010000 0x400>; | 104 | reg = <0x10010000 0x400>; |
105 | }; | 105 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index 1a12fb23767c..2aa13cb3bbed 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts | |||
@@ -313,7 +313,7 @@ | |||
313 | display-timings { | 313 | display-timings { |
314 | native-mode = <&timing0>; | 314 | native-mode = <&timing0>; |
315 | timing0: timing { | 315 | timing0: timing { |
316 | clock-frequency = <50000>; | 316 | clock-frequency = <47500000>; |
317 | hactive = <1024>; | 317 | hactive = <1024>; |
318 | vactive = <600>; | 318 | vactive = <600>; |
319 | hfront-porch = <64>; | 319 | hfront-porch = <64>; |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 057d6829d319..48ecd7a755ab 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -36,11 +36,11 @@ | |||
36 | reg = <0x10023CA0 0x20>; | 36 | reg = <0x10023CA0 0x20>; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | gic:interrupt-controller@10490000 { | 39 | gic: interrupt-controller@10490000 { |
40 | cpu-offset = <0x8000>; | 40 | cpu-offset = <0x8000>; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | combiner:interrupt-controller@10440000 { | 43 | combiner: interrupt-controller@10440000 { |
44 | samsung,combiner-nr = <16>; | 44 | samsung,combiner-nr = <16>; |
45 | interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, | 45 | interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, |
46 | <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, | 46 | <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, |
@@ -51,24 +51,21 @@ | |||
51 | mct@10050000 { | 51 | mct@10050000 { |
52 | compatible = "samsung,exynos4210-mct"; | 52 | compatible = "samsung,exynos4210-mct"; |
53 | reg = <0x10050000 0x800>; | 53 | reg = <0x10050000 0x800>; |
54 | interrupt-controller; | ||
55 | #interrups-cells = <2>; | ||
56 | interrupt-parent = <&mct_map>; | 54 | interrupt-parent = <&mct_map>; |
57 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | 55 | interrupts = <0>, <1>, <2>, <3>, <4>, <5>; |
58 | <4 0>, <5 0>; | ||
59 | clocks = <&clock 3>, <&clock 344>; | 56 | clocks = <&clock 3>, <&clock 344>; |
60 | clock-names = "fin_pll", "mct"; | 57 | clock-names = "fin_pll", "mct"; |
61 | 58 | ||
62 | mct_map: mct-map { | 59 | mct_map: mct-map { |
63 | #interrupt-cells = <2>; | 60 | #interrupt-cells = <1>; |
64 | #address-cells = <0>; | 61 | #address-cells = <0>; |
65 | #size-cells = <0>; | 62 | #size-cells = <0>; |
66 | interrupt-map = <0x0 0 &gic 0 57 0>, | 63 | interrupt-map = <0 &gic 0 57 0>, |
67 | <0x1 0 &gic 0 69 0>, | 64 | <1 &gic 0 69 0>, |
68 | <0x2 0 &combiner 12 6>, | 65 | <2 &combiner 12 6>, |
69 | <0x3 0 &combiner 12 7>, | 66 | <3 &combiner 12 7>, |
70 | <0x4 0 &gic 0 42 0>, | 67 | <4 &gic 0 42 0>, |
71 | <0x5 0 &gic 0 48 0>; | 68 | <5 &gic 0 48 0>; |
72 | }; | 69 | }; |
73 | }; | 70 | }; |
74 | 71 | ||
diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi index 6f34d7f6ba7e..94a43f9a05e2 100644 --- a/arch/arm/boot/dts/exynos4212.dtsi +++ b/arch/arm/boot/dts/exynos4212.dtsi | |||
@@ -22,7 +22,7 @@ | |||
22 | / { | 22 | / { |
23 | compatible = "samsung,exynos4212"; | 23 | compatible = "samsung,exynos4212"; |
24 | 24 | ||
25 | gic:interrupt-controller@10490000 { | 25 | gic: interrupt-controller@10490000 { |
26 | cpu-offset = <0x8000>; | 26 | cpu-offset = <0x8000>; |
27 | }; | 27 | }; |
28 | 28 | ||
@@ -34,26 +34,4 @@ | |||
34 | <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>, | 34 | <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>, |
35 | <0 107 0>, <0 108 0>; | 35 | <0 107 0>, <0 108 0>; |
36 | }; | 36 | }; |
37 | |||
38 | mct@10050000 { | ||
39 | compatible = "samsung,exynos4412-mct"; | ||
40 | reg = <0x10050000 0x800>; | ||
41 | interrupt-controller; | ||
42 | #interrups-cells = <2>; | ||
43 | interrupt-parent = <&mct_map>; | ||
44 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
45 | <4 0>, <5 0>; | ||
46 | |||
47 | mct_map: mct-map { | ||
48 | #interrupt-cells = <2>; | ||
49 | #address-cells = <0>; | ||
50 | #size-cells = <0>; | ||
51 | interrupt-map = <0x0 0 &gic 0 57 0>, | ||
52 | <0x1 0 &combiner 12 5>, | ||
53 | <0x2 0 &combiner 12 6>, | ||
54 | <0x3 0 &combiner 12 7>, | ||
55 | <0x4 0 &gic 1 12 0>, | ||
56 | <0x5 0 &gic 1 12 0>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | 37 | }; |
diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index 46c678ee119c..8aad5f72ced7 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts | |||
@@ -38,9 +38,7 @@ | |||
38 | }; | 38 | }; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | mshc@12550000 { | 41 | mmc@12550000 { |
42 | #address-cells = <1>; | ||
43 | #size-cells = <0>; | ||
44 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; | 42 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; |
45 | pinctrl-names = "default"; | 43 | pinctrl-names = "default"; |
46 | vmmc-supply = <&ldo20_reg &buck8_reg>; | 44 | vmmc-supply = <&ldo20_reg &buck8_reg>; |
@@ -49,7 +47,6 @@ | |||
49 | num-slots = <1>; | 47 | num-slots = <1>; |
50 | supports-highspeed; | 48 | supports-highspeed; |
51 | broken-cd; | 49 | broken-cd; |
52 | fifo-depth = <0x80>; | ||
53 | card-detect-delay = <200>; | 50 | card-detect-delay = <200>; |
54 | samsung,dw-mshc-ciu-div = <3>; | 51 | samsung,dw-mshc-ciu-div = <3>; |
55 | samsung,dw-mshc-sdr-timing = <2 3>; | 52 | samsung,dw-mshc-sdr-timing = <2 3>; |
diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts index d65984c440f6..6bc053924e9e 100644 --- a/arch/arm/boot/dts/exynos4412-origen.dts +++ b/arch/arm/boot/dts/exynos4412-origen.dts | |||
@@ -122,9 +122,7 @@ | |||
122 | status = "okay"; | 122 | status = "okay"; |
123 | }; | 123 | }; |
124 | 124 | ||
125 | mshc@12550000 { | 125 | mmc@12550000 { |
126 | #address-cells = <1>; | ||
127 | #size-cells = <0>; | ||
128 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; | 126 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; |
129 | pinctrl-names = "default"; | 127 | pinctrl-names = "default"; |
130 | status = "okay"; | 128 | status = "okay"; |
@@ -132,7 +130,6 @@ | |||
132 | num-slots = <1>; | 130 | num-slots = <1>; |
133 | supports-highspeed; | 131 | supports-highspeed; |
134 | broken-cd; | 132 | broken-cd; |
135 | fifo-depth = <0x80>; | ||
136 | card-detect-delay = <200>; | 133 | card-detect-delay = <200>; |
137 | samsung,dw-mshc-ciu-div = <3>; | 134 | samsung,dw-mshc-ciu-div = <3>; |
138 | samsung,dw-mshc-sdr-timing = <2 3>; | 135 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -159,7 +156,7 @@ | |||
159 | display-timings { | 156 | display-timings { |
160 | native-mode = <&timing0>; | 157 | native-mode = <&timing0>; |
161 | timing0: timing { | 158 | timing0: timing { |
162 | clock-frequency = <50000>; | 159 | clock-frequency = <47500000>; |
163 | hactive = <1024>; | 160 | hactive = <1024>; |
164 | vactive = <600>; | 161 | vactive = <600>; |
165 | hfront-porch = <64>; | 162 | hfront-porch = <64>; |
diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts index fb7b9ae5f399..890ad275cb85 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts | |||
@@ -442,13 +442,25 @@ | |||
442 | }; | 442 | }; |
443 | }; | 443 | }; |
444 | 444 | ||
445 | sdhci@12510000 { | 445 | mmc@12550000 { |
446 | bus-width = <8>; | 446 | num-slots = <1>; |
447 | supports-highspeed; | ||
448 | broken-cd; | ||
447 | non-removable; | 449 | non-removable; |
448 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus8>; | 450 | card-detect-delay = <200>; |
449 | pinctrl-names = "default"; | ||
450 | vmmc-supply = <&vemmc_reg>; | 451 | vmmc-supply = <&vemmc_reg>; |
452 | clock-frequency = <400000000>; | ||
453 | samsung,dw-mshc-ciu-div = <0>; | ||
454 | samsung,dw-mshc-sdr-timing = <2 3>; | ||
455 | samsung,dw-mshc-ddr-timing = <1 2>; | ||
456 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; | ||
457 | pinctrl-names = "default"; | ||
451 | status = "okay"; | 458 | status = "okay"; |
459 | |||
460 | slot@0 { | ||
461 | reg = <0>; | ||
462 | bus-width = <8>; | ||
463 | }; | ||
452 | }; | 464 | }; |
453 | 465 | ||
454 | serial@13800000 { | 466 | serial@13800000 { |
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index e743e677a9e2..87b339c739de 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi | |||
@@ -22,7 +22,7 @@ | |||
22 | / { | 22 | / { |
23 | compatible = "samsung,exynos4412"; | 23 | compatible = "samsung,exynos4412"; |
24 | 24 | ||
25 | gic:interrupt-controller@10490000 { | 25 | gic: interrupt-controller@10490000 { |
26 | cpu-offset = <0x4000>; | 26 | cpu-offset = <0x4000>; |
27 | }; | 27 | }; |
28 | 28 | ||
@@ -35,37 +35,4 @@ | |||
35 | <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>; | 35 | <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | mct@10050000 { | ||
39 | compatible = "samsung,exynos4412-mct"; | ||
40 | reg = <0x10050000 0x800>; | ||
41 | interrupt-controller; | ||
42 | #interrups-cells = <2>; | ||
43 | interrupt-parent = <&mct_map>; | ||
44 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
45 | <4 0>, <5 0>, <6 0>, <7 0>; | ||
46 | clocks = <&clock 3>, <&clock 344>; | ||
47 | clock-names = "fin_pll", "mct"; | ||
48 | |||
49 | mct_map: mct-map { | ||
50 | #interrupt-cells = <2>; | ||
51 | #address-cells = <0>; | ||
52 | #size-cells = <0>; | ||
53 | interrupt-map = <0x0 0 &gic 0 57 0>, | ||
54 | <0x1 0 &combiner 12 5>, | ||
55 | <0x2 0 &combiner 12 6>, | ||
56 | <0x3 0 &combiner 12 7>, | ||
57 | <0x4 0 &gic 1 12 0>, | ||
58 | <0x5 0 &gic 1 12 0>, | ||
59 | <0x6 0 &gic 1 12 0>, | ||
60 | <0x7 0 &gic 1 12 0>; | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | mshc@12550000 { | ||
65 | compatible = "samsung,exynos4412-dw-mshc"; | ||
66 | reg = <0x12550000 0x1000>; | ||
67 | interrupts = <0 77 0>; | ||
68 | #address-cells = <1>; | ||
69 | #size-cells = <0>; | ||
70 | }; | ||
71 | }; | 38 | }; |
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index ad531fe6ab95..5c412aa14738 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi | |||
@@ -28,6 +28,7 @@ | |||
28 | pinctrl3 = &pinctrl_3; | 28 | pinctrl3 = &pinctrl_3; |
29 | fimc-lite0 = &fimc_lite_0; | 29 | fimc-lite0 = &fimc_lite_0; |
30 | fimc-lite1 = &fimc_lite_1; | 30 | fimc-lite1 = &fimc_lite_1; |
31 | mshc0 = &mshc_0; | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | pd_isp: isp-power-domain@10023CA0 { | 34 | pd_isp: isp-power-domain@10023CA0 { |
@@ -41,6 +42,26 @@ | |||
41 | #clock-cells = <1>; | 42 | #clock-cells = <1>; |
42 | }; | 43 | }; |
43 | 44 | ||
45 | mct@10050000 { | ||
46 | compatible = "samsung,exynos4412-mct"; | ||
47 | reg = <0x10050000 0x800>; | ||
48 | interrupt-parent = <&mct_map>; | ||
49 | interrupts = <0>, <1>, <2>, <3>, <4>; | ||
50 | clocks = <&clock 3>, <&clock 344>; | ||
51 | clock-names = "fin_pll", "mct"; | ||
52 | |||
53 | mct_map: mct-map { | ||
54 | #interrupt-cells = <1>; | ||
55 | #address-cells = <0>; | ||
56 | #size-cells = <0>; | ||
57 | interrupt-map = <0 &gic 0 57 0>, | ||
58 | <1 &combiner 12 5>, | ||
59 | <2 &combiner 12 6>, | ||
60 | <3 &combiner 12 7>, | ||
61 | <4 &gic 1 12 0>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
44 | pinctrl_0: pinctrl@11400000 { | 65 | pinctrl_0: pinctrl@11400000 { |
45 | compatible = "samsung,exynos4x12-pinctrl"; | 66 | compatible = "samsung,exynos4x12-pinctrl"; |
46 | reg = <0x11400000 0x1000>; | 67 | reg = <0x11400000 0x1000>; |
@@ -176,4 +197,16 @@ | |||
176 | }; | 197 | }; |
177 | }; | 198 | }; |
178 | }; | 199 | }; |
200 | |||
201 | mshc_0: mmc@12550000 { | ||
202 | compatible = "samsung,exynos4412-dw-mshc"; | ||
203 | reg = <0x12550000 0x1000>; | ||
204 | interrupts = <0 77 0>; | ||
205 | #address-cells = <1>; | ||
206 | #size-cells = <0>; | ||
207 | fifo-depth = <0x80>; | ||
208 | clocks = <&clock 301>, <&clock 149>; | ||
209 | clock-names = "biu", "ciu"; | ||
210 | status = "disabled"; | ||
211 | }; | ||
179 | }; | 212 | }; |
diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi index 074739d39e2d..258dca441f36 100644 --- a/arch/arm/boot/dts/exynos5.dtsi +++ b/arch/arm/boot/dts/exynos5.dtsi | |||
@@ -23,7 +23,7 @@ | |||
23 | reg = <0x10000000 0x100>; | 23 | reg = <0x10000000 0x100>; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | combiner:interrupt-controller@10440000 { | 26 | combiner: interrupt-controller@10440000 { |
27 | compatible = "samsung,exynos4210-combiner"; | 27 | compatible = "samsung,exynos4210-combiner"; |
28 | #interrupt-cells = <2>; | 28 | #interrupt-cells = <2>; |
29 | interrupt-controller; | 29 | interrupt-controller; |
@@ -39,7 +39,7 @@ | |||
39 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; | 39 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | gic:interrupt-controller@10481000 { | 42 | gic: interrupt-controller@10481000 { |
43 | compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; | 43 | compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; |
44 | #interrupt-cells = <3>; | 44 | #interrupt-cells = <3>; |
45 | interrupt-controller; | 45 | interrupt-controller; |
@@ -50,27 +50,6 @@ | |||
50 | interrupts = <1 9 0xf04>; | 50 | interrupts = <1 9 0xf04>; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | dwmmc_0: dwmmc0@12200000 { | ||
54 | compatible = "samsung,exynos5250-dw-mshc"; | ||
55 | interrupts = <0 75 0>; | ||
56 | #address-cells = <1>; | ||
57 | #size-cells = <0>; | ||
58 | }; | ||
59 | |||
60 | dwmmc_1: dwmmc1@12210000 { | ||
61 | compatible = "samsung,exynos5250-dw-mshc"; | ||
62 | interrupts = <0 76 0>; | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <0>; | ||
65 | }; | ||
66 | |||
67 | dwmmc_2: dwmmc2@12220000 { | ||
68 | compatible = "samsung,exynos5250-dw-mshc"; | ||
69 | interrupts = <0 77 0>; | ||
70 | #address-cells = <1>; | ||
71 | #size-cells = <0>; | ||
72 | }; | ||
73 | |||
74 | serial@12C00000 { | 53 | serial@12C00000 { |
75 | compatible = "samsung,exynos4210-uart"; | 54 | compatible = "samsung,exynos4210-uart"; |
76 | reg = <0x12C00000 0x100>; | 55 | reg = <0x12C00000 0x100>; |
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index 684527087aa4..b42e658876e5 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts | |||
@@ -34,6 +34,7 @@ | |||
34 | samsung,i2c-sda-delay = <100>; | 34 | samsung,i2c-sda-delay = <100>; |
35 | samsung,i2c-max-bus-freq = <20000>; | 35 | samsung,i2c-max-bus-freq = <20000>; |
36 | samsung,i2c-slave-addr = <0x66>; | 36 | samsung,i2c-slave-addr = <0x66>; |
37 | status = "okay"; | ||
37 | 38 | ||
38 | s5m8767_pmic@66 { | 39 | s5m8767_pmic@66 { |
39 | compatible = "samsung,s5m8767-pmic"; | 40 | compatible = "samsung,s5m8767-pmic"; |
@@ -266,7 +267,7 @@ | |||
266 | 267 | ||
267 | buck2_reg: BUCK2 { | 268 | buck2_reg: BUCK2 { |
268 | regulator-name = "vdd_arm"; | 269 | regulator-name = "vdd_arm"; |
269 | regulator-min-microvolt = <925000>; | 270 | regulator-min-microvolt = <912500>; |
270 | regulator-max-microvolt = <1300000>; | 271 | regulator-max-microvolt = <1300000>; |
271 | regulator-always-on; | 272 | regulator-always-on; |
272 | regulator-boot-on; | 273 | regulator-boot-on; |
@@ -302,11 +303,13 @@ | |||
302 | buck7_reg: BUCK7 { | 303 | buck7_reg: BUCK7 { |
303 | regulator-name = "PVDD_BUCK7"; | 304 | regulator-name = "PVDD_BUCK7"; |
304 | regulator-always-on; | 305 | regulator-always-on; |
306 | op_mode = <1>; | ||
305 | }; | 307 | }; |
306 | 308 | ||
307 | buck8_reg: BUCK8 { | 309 | buck8_reg: BUCK8 { |
308 | regulator-name = "PVDD_BUCK8"; | 310 | regulator-name = "PVDD_BUCK8"; |
309 | regulator-always-on; | 311 | regulator-always-on; |
312 | op_mode = <1>; | ||
310 | }; | 313 | }; |
311 | 314 | ||
312 | buck9_reg: BUCK9 { | 315 | buck9_reg: BUCK9 { |
@@ -319,11 +322,9 @@ | |||
319 | }; | 322 | }; |
320 | }; | 323 | }; |
321 | 324 | ||
322 | i2c@12C70000 { | ||
323 | status = "disabled"; | ||
324 | }; | ||
325 | |||
326 | i2c@12C80000 { | 325 | i2c@12C80000 { |
326 | status = "okay"; | ||
327 | |||
327 | samsung,i2c-sda-delay = <100>; | 328 | samsung,i2c-sda-delay = <100>; |
328 | samsung,i2c-max-bus-freq = <66000>; | 329 | samsung,i2c-max-bus-freq = <66000>; |
329 | samsung,i2c-slave-addr = <0x50>; | 330 | samsung,i2c-slave-addr = <0x50>; |
@@ -335,7 +336,10 @@ | |||
335 | }; | 336 | }; |
336 | 337 | ||
337 | i2c@12C90000 { | 338 | i2c@12C90000 { |
339 | status = "okay"; | ||
340 | |||
338 | wm1811a@1a { | 341 | wm1811a@1a { |
342 | |||
339 | compatible = "wlf,wm1811"; | 343 | compatible = "wlf,wm1811"; |
340 | reg = <0x1a>; | 344 | reg = <0x1a>; |
341 | 345 | ||
@@ -353,23 +357,9 @@ | |||
353 | }; | 357 | }; |
354 | }; | 358 | }; |
355 | 359 | ||
356 | i2c@12CA0000 { | ||
357 | status = "disabled"; | ||
358 | }; | ||
359 | |||
360 | i2c@12CB0000 { | ||
361 | status = "disabled"; | ||
362 | }; | ||
363 | |||
364 | i2c@12CC0000 { | ||
365 | status = "disabled"; | ||
366 | }; | ||
367 | |||
368 | i2c@12CD0000 { | ||
369 | status = "disabled"; | ||
370 | }; | ||
371 | |||
372 | i2c@12CE0000 { | 360 | i2c@12CE0000 { |
361 | status = "okay"; | ||
362 | |||
373 | samsung,i2c-sda-delay = <100>; | 363 | samsung,i2c-sda-delay = <100>; |
374 | samsung,i2c-max-bus-freq = <66000>; | 364 | samsung,i2c-max-bus-freq = <66000>; |
375 | samsung,i2c-slave-addr = <0x38>; | 365 | samsung,i2c-slave-addr = <0x38>; |
@@ -380,15 +370,11 @@ | |||
380 | }; | 370 | }; |
381 | }; | 371 | }; |
382 | 372 | ||
383 | i2c@121D0000 { | 373 | mmc_0: mmc@12200000 { |
384 | status = "disabled"; | 374 | status = "okay"; |
385 | }; | ||
386 | |||
387 | dwmmc_0: dwmmc0@12200000 { | ||
388 | num-slots = <1>; | 375 | num-slots = <1>; |
389 | supports-highspeed; | 376 | supports-highspeed; |
390 | broken-cd; | 377 | broken-cd; |
391 | fifo-depth = <0x80>; | ||
392 | card-detect-delay = <200>; | 378 | card-detect-delay = <200>; |
393 | samsung,dw-mshc-ciu-div = <3>; | 379 | samsung,dw-mshc-ciu-div = <3>; |
394 | samsung,dw-mshc-sdr-timing = <2 3>; | 380 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -403,14 +389,10 @@ | |||
403 | }; | 389 | }; |
404 | }; | 390 | }; |
405 | 391 | ||
406 | dwmmc_1: dwmmc1@12210000 { | 392 | mmc_2: mmc@12220000 { |
407 | status = "disabled"; | 393 | status = "okay"; |
408 | }; | ||
409 | |||
410 | dwmmc_2: dwmmc2@12220000 { | ||
411 | num-slots = <1>; | 394 | num-slots = <1>; |
412 | supports-highspeed; | 395 | supports-highspeed; |
413 | fifo-depth = <0x80>; | ||
414 | card-detect-delay = <200>; | 396 | card-detect-delay = <200>; |
415 | samsung,dw-mshc-ciu-div = <3>; | 397 | samsung,dw-mshc-ciu-div = <3>; |
416 | samsung,dw-mshc-sdr-timing = <2 3>; | 398 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -426,26 +408,10 @@ | |||
426 | }; | 408 | }; |
427 | }; | 409 | }; |
428 | 410 | ||
429 | dwmmc_3: dwmmc3@12230000 { | ||
430 | status = "disabled"; | ||
431 | }; | ||
432 | |||
433 | i2s0: i2s@03830000 { | 411 | i2s0: i2s@03830000 { |
434 | status = "okay"; | 412 | status = "okay"; |
435 | }; | 413 | }; |
436 | 414 | ||
437 | spi_0: spi@12d20000 { | ||
438 | status = "disabled"; | ||
439 | }; | ||
440 | |||
441 | spi_1: spi@12d30000 { | ||
442 | status = "disabled"; | ||
443 | }; | ||
444 | |||
445 | spi_2: spi@12d40000 { | ||
446 | status = "disabled"; | ||
447 | }; | ||
448 | |||
449 | gpio_keys { | 415 | gpio_keys { |
450 | compatible = "gpio-keys"; | 416 | compatible = "gpio-keys"; |
451 | 417 | ||
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/exynos5250-cros-common.dtsi index 9b186ac06c8b..9a61494f45f5 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/exynos5250-cros-common.dtsi | |||
@@ -37,6 +37,7 @@ | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | i2c@12C60000 { | 39 | i2c@12C60000 { |
40 | status = "okay"; | ||
40 | samsung,i2c-sda-delay = <100>; | 41 | samsung,i2c-sda-delay = <100>; |
41 | samsung,i2c-max-bus-freq = <378000>; | 42 | samsung,i2c-max-bus-freq = <378000>; |
42 | 43 | ||
@@ -185,6 +186,7 @@ | |||
185 | }; | 186 | }; |
186 | 187 | ||
187 | i2c@12C70000 { | 188 | i2c@12C70000 { |
189 | status = "okay"; | ||
188 | samsung,i2c-sda-delay = <100>; | 190 | samsung,i2c-sda-delay = <100>; |
189 | samsung,i2c-max-bus-freq = <378000>; | 191 | samsung,i2c-max-bus-freq = <378000>; |
190 | 192 | ||
@@ -198,6 +200,7 @@ | |||
198 | }; | 200 | }; |
199 | 201 | ||
200 | i2c@12C80000 { | 202 | i2c@12C80000 { |
203 | status = "okay"; | ||
201 | samsung,i2c-sda-delay = <100>; | 204 | samsung,i2c-sda-delay = <100>; |
202 | samsung,i2c-max-bus-freq = <66000>; | 205 | samsung,i2c-max-bus-freq = <66000>; |
203 | 206 | ||
@@ -208,30 +211,31 @@ | |||
208 | }; | 211 | }; |
209 | 212 | ||
210 | i2c@12C90000 { | 213 | i2c@12C90000 { |
214 | status = "okay"; | ||
211 | samsung,i2c-sda-delay = <100>; | 215 | samsung,i2c-sda-delay = <100>; |
212 | samsung,i2c-max-bus-freq = <66000>; | 216 | samsung,i2c-max-bus-freq = <66000>; |
213 | }; | 217 | }; |
214 | 218 | ||
215 | i2c@12CA0000 { | 219 | i2c@12CA0000 { |
220 | status = "okay"; | ||
216 | samsung,i2c-sda-delay = <100>; | 221 | samsung,i2c-sda-delay = <100>; |
217 | samsung,i2c-max-bus-freq = <66000>; | 222 | samsung,i2c-max-bus-freq = <66000>; |
218 | }; | 223 | }; |
219 | 224 | ||
220 | i2c@12CB0000 { | 225 | i2c@12CB0000 { |
226 | status = "okay"; | ||
221 | samsung,i2c-sda-delay = <100>; | 227 | samsung,i2c-sda-delay = <100>; |
222 | samsung,i2c-max-bus-freq = <66000>; | 228 | samsung,i2c-max-bus-freq = <66000>; |
223 | }; | 229 | }; |
224 | 230 | ||
225 | i2c@12CC0000 { | ||
226 | status = "disabled"; | ||
227 | }; | ||
228 | |||
229 | i2c@12CD0000 { | 231 | i2c@12CD0000 { |
232 | status = "okay"; | ||
230 | samsung,i2c-sda-delay = <100>; | 233 | samsung,i2c-sda-delay = <100>; |
231 | samsung,i2c-max-bus-freq = <66000>; | 234 | samsung,i2c-max-bus-freq = <66000>; |
232 | }; | 235 | }; |
233 | 236 | ||
234 | i2c@12CE0000 { | 237 | i2c@12CE0000 { |
238 | status = "okay"; | ||
235 | samsung,i2c-sda-delay = <100>; | 239 | samsung,i2c-sda-delay = <100>; |
236 | samsung,i2c-max-bus-freq = <378000>; | 240 | samsung,i2c-max-bus-freq = <378000>; |
237 | 241 | ||
@@ -241,11 +245,10 @@ | |||
241 | }; | 245 | }; |
242 | }; | 246 | }; |
243 | 247 | ||
244 | dwmmc0@12200000 { | 248 | mmc@12200000 { |
245 | num-slots = <1>; | 249 | num-slots = <1>; |
246 | supports-highspeed; | 250 | supports-highspeed; |
247 | broken-cd; | 251 | broken-cd; |
248 | fifo-depth = <0x80>; | ||
249 | card-detect-delay = <200>; | 252 | card-detect-delay = <200>; |
250 | samsung,dw-mshc-ciu-div = <3>; | 253 | samsung,dw-mshc-ciu-div = <3>; |
251 | samsung,dw-mshc-sdr-timing = <2 3>; | 254 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -259,14 +262,9 @@ | |||
259 | }; | 262 | }; |
260 | }; | 263 | }; |
261 | 264 | ||
262 | dwmmc1@12210000 { | 265 | mmc@12220000 { |
263 | status = "disabled"; | ||
264 | }; | ||
265 | |||
266 | dwmmc2@12220000 { | ||
267 | num-slots = <1>; | 266 | num-slots = <1>; |
268 | supports-highspeed; | 267 | supports-highspeed; |
269 | fifo-depth = <0x80>; | ||
270 | card-detect-delay = <200>; | 268 | card-detect-delay = <200>; |
271 | samsung,dw-mshc-ciu-div = <3>; | 269 | samsung,dw-mshc-ciu-div = <3>; |
272 | samsung,dw-mshc-sdr-timing = <2 3>; | 270 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -281,11 +279,10 @@ | |||
281 | }; | 279 | }; |
282 | }; | 280 | }; |
283 | 281 | ||
284 | dwmmc3@12230000 { | 282 | mmc@12230000 { |
285 | num-slots = <1>; | 283 | num-slots = <1>; |
286 | supports-highspeed; | 284 | supports-highspeed; |
287 | broken-cd; | 285 | broken-cd; |
288 | fifo-depth = <0x80>; | ||
289 | card-detect-delay = <200>; | 286 | card-detect-delay = <200>; |
290 | samsung,dw-mshc-ciu-div = <3>; | 287 | samsung,dw-mshc-ciu-div = <3>; |
291 | samsung,dw-mshc-sdr-timing = <2 3>; | 288 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -298,19 +295,12 @@ | |||
298 | }; | 295 | }; |
299 | }; | 296 | }; |
300 | 297 | ||
301 | spi_0: spi@12d20000 { | ||
302 | status = "disabled"; | ||
303 | }; | ||
304 | |||
305 | spi_1: spi@12d30000 { | 298 | spi_1: spi@12d30000 { |
299 | status = "okay"; | ||
306 | samsung,spi-src-clk = <0>; | 300 | samsung,spi-src-clk = <0>; |
307 | num-cs = <1>; | 301 | num-cs = <1>; |
308 | }; | 302 | }; |
309 | 303 | ||
310 | spi_2: spi@12d40000 { | ||
311 | status = "disabled"; | ||
312 | }; | ||
313 | |||
314 | hdmi { | 304 | hdmi { |
315 | hpd-gpio = <&gpx3 7 0>; | 305 | hpd-gpio = <&gpx3 7 0>; |
316 | }; | 306 | }; |
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index f86d56760a45..3e69837c435c 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts | |||
@@ -30,6 +30,7 @@ | |||
30 | i2c@12C60000 { | 30 | i2c@12C60000 { |
31 | samsung,i2c-sda-delay = <100>; | 31 | samsung,i2c-sda-delay = <100>; |
32 | samsung,i2c-max-bus-freq = <20000>; | 32 | samsung,i2c-max-bus-freq = <20000>; |
33 | status = "okay"; | ||
33 | 34 | ||
34 | eeprom@50 { | 35 | eeprom@50 { |
35 | compatible = "samsung,s524ad0xd1"; | 36 | compatible = "samsung,s524ad0xd1"; |
@@ -37,7 +38,7 @@ | |||
37 | }; | 38 | }; |
38 | }; | 39 | }; |
39 | 40 | ||
40 | vdd:fixed-regulator@0 { | 41 | vdd: fixed-regulator@0 { |
41 | compatible = "regulator-fixed"; | 42 | compatible = "regulator-fixed"; |
42 | regulator-name = "vdd-supply"; | 43 | regulator-name = "vdd-supply"; |
43 | regulator-min-microvolt = <1800000>; | 44 | regulator-min-microvolt = <1800000>; |
@@ -45,7 +46,7 @@ | |||
45 | regulator-always-on; | 46 | regulator-always-on; |
46 | }; | 47 | }; |
47 | 48 | ||
48 | dbvdd:fixed-regulator@1 { | 49 | dbvdd: fixed-regulator@1 { |
49 | compatible = "regulator-fixed"; | 50 | compatible = "regulator-fixed"; |
50 | regulator-name = "dbvdd-supply"; | 51 | regulator-name = "dbvdd-supply"; |
51 | regulator-min-microvolt = <3300000>; | 52 | regulator-min-microvolt = <3300000>; |
@@ -53,7 +54,7 @@ | |||
53 | regulator-always-on; | 54 | regulator-always-on; |
54 | }; | 55 | }; |
55 | 56 | ||
56 | spkvdd:fixed-regulator@2 { | 57 | spkvdd: fixed-regulator@2 { |
57 | compatible = "regulator-fixed"; | 58 | compatible = "regulator-fixed"; |
58 | regulator-name = "spkvdd-supply"; | 59 | regulator-name = "spkvdd-supply"; |
59 | regulator-min-microvolt = <5000000>; | 60 | regulator-min-microvolt = <5000000>; |
@@ -64,6 +65,7 @@ | |||
64 | i2c@12C70000 { | 65 | i2c@12C70000 { |
65 | samsung,i2c-sda-delay = <100>; | 66 | samsung,i2c-sda-delay = <100>; |
66 | samsung,i2c-max-bus-freq = <20000>; | 67 | samsung,i2c-max-bus-freq = <20000>; |
68 | status = "okay"; | ||
67 | 69 | ||
68 | eeprom@51 { | 70 | eeprom@51 { |
69 | compatible = "samsung,s524ad0xd1"; | 71 | compatible = "samsung,s524ad0xd1"; |
@@ -77,6 +79,9 @@ | |||
77 | gpio-controller; | 79 | gpio-controller; |
78 | #gpio-cells = <2>; | 80 | #gpio-cells = <2>; |
79 | 81 | ||
82 | clocks = <&codec_mclk>; | ||
83 | clock-names = "MCLK1"; | ||
84 | |||
80 | AVDD2-supply = <&vdd>; | 85 | AVDD2-supply = <&vdd>; |
81 | CPVDD-supply = <&vdd>; | 86 | CPVDD-supply = <&vdd>; |
82 | DBVDD-supply = <&dbvdd>; | 87 | DBVDD-supply = <&dbvdd>; |
@@ -89,6 +94,7 @@ | |||
89 | samsung,i2c-sda-delay = <100>; | 94 | samsung,i2c-sda-delay = <100>; |
90 | samsung,i2c-max-bus-freq = <40000>; | 95 | samsung,i2c-max-bus-freq = <40000>; |
91 | samsung,i2c-slave-addr = <0x38>; | 96 | samsung,i2c-slave-addr = <0x38>; |
97 | status = "okay"; | ||
92 | 98 | ||
93 | sata-phy { | 99 | sata-phy { |
94 | compatible = "samsung,sata-phy"; | 100 | compatible = "samsung,sata-phy"; |
@@ -103,6 +109,7 @@ | |||
103 | i2c@12C80000 { | 109 | i2c@12C80000 { |
104 | samsung,i2c-sda-delay = <100>; | 110 | samsung,i2c-sda-delay = <100>; |
105 | samsung,i2c-max-bus-freq = <66000>; | 111 | samsung,i2c-max-bus-freq = <66000>; |
112 | status = "okay"; | ||
106 | 113 | ||
107 | hdmiddc@50 { | 114 | hdmiddc@50 { |
108 | compatible = "samsung,exynos4210-hdmiddc"; | 115 | compatible = "samsung,exynos4210-hdmiddc"; |
@@ -110,29 +117,10 @@ | |||
110 | }; | 117 | }; |
111 | }; | 118 | }; |
112 | 119 | ||
113 | i2c@12C90000 { | ||
114 | status = "disabled"; | ||
115 | }; | ||
116 | |||
117 | i2c@12CA0000 { | ||
118 | status = "disabled"; | ||
119 | }; | ||
120 | |||
121 | i2c@12CB0000 { | ||
122 | status = "disabled"; | ||
123 | }; | ||
124 | |||
125 | i2c@12CC0000 { | ||
126 | status = "disabled"; | ||
127 | }; | ||
128 | |||
129 | i2c@12CD0000 { | ||
130 | status = "disabled"; | ||
131 | }; | ||
132 | |||
133 | i2c@12CE0000 { | 120 | i2c@12CE0000 { |
134 | samsung,i2c-sda-delay = <100>; | 121 | samsung,i2c-sda-delay = <100>; |
135 | samsung,i2c-max-bus-freq = <66000>; | 122 | samsung,i2c-max-bus-freq = <66000>; |
123 | status = "okay"; | ||
136 | 124 | ||
137 | hdmiphy@38 { | 125 | hdmiphy@38 { |
138 | compatible = "samsung,exynos4212-hdmiphy"; | 126 | compatible = "samsung,exynos4212-hdmiphy"; |
@@ -140,11 +128,11 @@ | |||
140 | }; | 128 | }; |
141 | }; | 129 | }; |
142 | 130 | ||
143 | dwmmc0@12200000 { | 131 | mmc@12200000 { |
132 | status = "okay"; | ||
144 | num-slots = <1>; | 133 | num-slots = <1>; |
145 | supports-highspeed; | 134 | supports-highspeed; |
146 | broken-cd; | 135 | broken-cd; |
147 | fifo-depth = <0x80>; | ||
148 | card-detect-delay = <200>; | 136 | card-detect-delay = <200>; |
149 | samsung,dw-mshc-ciu-div = <3>; | 137 | samsung,dw-mshc-ciu-div = <3>; |
150 | samsung,dw-mshc-sdr-timing = <2 3>; | 138 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -158,14 +146,10 @@ | |||
158 | }; | 146 | }; |
159 | }; | 147 | }; |
160 | 148 | ||
161 | dwmmc1@12210000 { | 149 | mmc@12220000 { |
162 | status = "disabled"; | 150 | status = "okay"; |
163 | }; | ||
164 | |||
165 | dwmmc2@12220000 { | ||
166 | num-slots = <1>; | 151 | num-slots = <1>; |
167 | supports-highspeed; | 152 | supports-highspeed; |
168 | fifo-depth = <0x80>; | ||
169 | card-detect-delay = <200>; | 153 | card-detect-delay = <200>; |
170 | samsung,dw-mshc-ciu-div = <3>; | 154 | samsung,dw-mshc-ciu-div = <3>; |
171 | samsung,dw-mshc-sdr-timing = <2 3>; | 155 | samsung,dw-mshc-sdr-timing = <2 3>; |
@@ -180,15 +164,13 @@ | |||
180 | }; | 164 | }; |
181 | }; | 165 | }; |
182 | 166 | ||
183 | dwmmc3@12230000 { | ||
184 | status = "disabled"; | ||
185 | }; | ||
186 | |||
187 | spi_0: spi@12d20000 { | 167 | spi_0: spi@12d20000 { |
188 | status = "disabled"; | 168 | status = "disabled"; |
189 | }; | 169 | }; |
190 | 170 | ||
191 | spi_1: spi@12d30000 { | 171 | spi_1: spi@12d30000 { |
172 | status = "okay"; | ||
173 | |||
192 | w25q80bw@0 { | 174 | w25q80bw@0 { |
193 | #address-cells = <1>; | 175 | #address-cells = <1>; |
194 | #size-cells = <1>; | 176 | #size-cells = <1>; |
@@ -214,10 +196,6 @@ | |||
214 | }; | 196 | }; |
215 | }; | 197 | }; |
216 | 198 | ||
217 | spi_2: spi@12d40000 { | ||
218 | status = "disabled"; | ||
219 | }; | ||
220 | |||
221 | hdmi { | 199 | hdmi { |
222 | hpd-gpio = <&gpx3 7 0>; | 200 | hpd-gpio = <&gpx3 7 0>; |
223 | }; | 201 | }; |
@@ -279,5 +257,11 @@ | |||
279 | compatible = "samsung,clock-xxti"; | 257 | compatible = "samsung,clock-xxti"; |
280 | clock-frequency = <24000000>; | 258 | clock-frequency = <24000000>; |
281 | }; | 259 | }; |
260 | |||
261 | codec_mclk: codec-mclk { | ||
262 | compatible = "fixed-clock"; | ||
263 | #clock-cells = <0>; | ||
264 | clock-frequency = <16934000>; | ||
265 | }; | ||
282 | }; | 266 | }; |
283 | }; | 267 | }; |
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index fd711e245e8d..7e45eea2d78f 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | #include "exynos5250.dtsi" | 12 | #include "exynos5250.dtsi" |
13 | #include "cros5250-common.dtsi" | 13 | #include "exynos5250-cros-common.dtsi" |
14 | 14 | ||
15 | / { | 15 | / { |
16 | model = "Google Snow"; | 16 | model = "Google Snow"; |
@@ -85,7 +85,7 @@ | |||
85 | keypad,num-rows = <8>; | 85 | keypad,num-rows = <8>; |
86 | keypad,num-columns = <13>; | 86 | keypad,num-columns = <13>; |
87 | google,needs-ghost-filter; | 87 | google,needs-ghost-filter; |
88 | linux,keymap = <0x0001003a /* CAPSLK */ | 88 | linux,keymap = <0x0001007d /* L_META */ |
89 | 0x0002003b /* F1 */ | 89 | 0x0002003b /* F1 */ |
90 | 0x00030030 /* B */ | 90 | 0x00030030 /* B */ |
91 | 0x00040044 /* F10 */ | 91 | 0x00040044 /* F10 */ |
@@ -130,6 +130,7 @@ | |||
130 | 0x04060024 /* J */ | 130 | 0x04060024 /* J */ |
131 | 0x04080027 /* ; */ | 131 | 0x04080027 /* ; */ |
132 | 0x04090026 /* L */ | 132 | 0x04090026 /* L */ |
133 | 0x040a002b /* \ */ | ||
133 | 0x040b001c /* ENTER */ | 134 | 0x040b001c /* ENTER */ |
134 | 135 | ||
135 | 0x0501002c /* Z */ | 136 | 0x0501002c /* Z */ |
@@ -171,11 +172,20 @@ | |||
171 | }; | 172 | }; |
172 | }; | 173 | }; |
173 | 174 | ||
175 | mmc@12200000 { | ||
176 | status = "okay"; | ||
177 | }; | ||
178 | |||
179 | mmc@12220000 { | ||
180 | status = "okay"; | ||
181 | }; | ||
182 | |||
174 | /* | 183 | /* |
175 | * On Snow we've got SIP WiFi and so can keep drive strengths low to | 184 | * On Snow we've got SIP WiFi and so can keep drive strengths low to |
176 | * reduce EMI. | 185 | * reduce EMI. |
177 | */ | 186 | */ |
178 | dwmmc3@12230000 { | 187 | mmc@12230000 { |
188 | status = "okay"; | ||
179 | slot@0 { | 189 | slot@0 { |
180 | pinctrl-names = "default"; | 190 | pinctrl-names = "default"; |
181 | pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>; | 191 | pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>; |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 9db5047812f3..c341e55205cd 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -33,10 +33,10 @@ | |||
33 | gsc1 = &gsc_1; | 33 | gsc1 = &gsc_1; |
34 | gsc2 = &gsc_2; | 34 | gsc2 = &gsc_2; |
35 | gsc3 = &gsc_3; | 35 | gsc3 = &gsc_3; |
36 | mshc0 = &dwmmc_0; | 36 | mshc0 = &mmc_0; |
37 | mshc1 = &dwmmc_1; | 37 | mshc1 = &mmc_1; |
38 | mshc2 = &dwmmc_2; | 38 | mshc2 = &mmc_2; |
39 | mshc3 = &dwmmc_3; | 39 | mshc3 = &mmc_3; |
40 | i2c0 = &i2c_0; | 40 | i2c0 = &i2c_0; |
41 | i2c1 = &i2c_1; | 41 | i2c1 = &i2c_1; |
42 | i2c2 = &i2c_2; | 42 | i2c2 = &i2c_2; |
@@ -60,11 +60,13 @@ | |||
60 | device_type = "cpu"; | 60 | device_type = "cpu"; |
61 | compatible = "arm,cortex-a15"; | 61 | compatible = "arm,cortex-a15"; |
62 | reg = <0>; | 62 | reg = <0>; |
63 | clock-frequency = <1700000000>; | ||
63 | }; | 64 | }; |
64 | cpu@1 { | 65 | cpu@1 { |
65 | device_type = "cpu"; | 66 | device_type = "cpu"; |
66 | compatible = "arm,cortex-a15"; | 67 | compatible = "arm,cortex-a15"; |
67 | reg = <1>; | 68 | reg = <1>; |
69 | clock-frequency = <1700000000>; | ||
68 | }; | 70 | }; |
69 | }; | 71 | }; |
70 | 72 | ||
@@ -242,6 +244,7 @@ | |||
242 | clock-names = "i2c"; | 244 | clock-names = "i2c"; |
243 | pinctrl-names = "default"; | 245 | pinctrl-names = "default"; |
244 | pinctrl-0 = <&i2c0_bus>; | 246 | pinctrl-0 = <&i2c0_bus>; |
247 | status = "disabled"; | ||
245 | }; | 248 | }; |
246 | 249 | ||
247 | i2c_1: i2c@12C70000 { | 250 | i2c_1: i2c@12C70000 { |
@@ -254,6 +257,7 @@ | |||
254 | clock-names = "i2c"; | 257 | clock-names = "i2c"; |
255 | pinctrl-names = "default"; | 258 | pinctrl-names = "default"; |
256 | pinctrl-0 = <&i2c1_bus>; | 259 | pinctrl-0 = <&i2c1_bus>; |
260 | status = "disabled"; | ||
257 | }; | 261 | }; |
258 | 262 | ||
259 | i2c_2: i2c@12C80000 { | 263 | i2c_2: i2c@12C80000 { |
@@ -266,6 +270,7 @@ | |||
266 | clock-names = "i2c"; | 270 | clock-names = "i2c"; |
267 | pinctrl-names = "default"; | 271 | pinctrl-names = "default"; |
268 | pinctrl-0 = <&i2c2_bus>; | 272 | pinctrl-0 = <&i2c2_bus>; |
273 | status = "disabled"; | ||
269 | }; | 274 | }; |
270 | 275 | ||
271 | i2c_3: i2c@12C90000 { | 276 | i2c_3: i2c@12C90000 { |
@@ -278,6 +283,7 @@ | |||
278 | clock-names = "i2c"; | 283 | clock-names = "i2c"; |
279 | pinctrl-names = "default"; | 284 | pinctrl-names = "default"; |
280 | pinctrl-0 = <&i2c3_bus>; | 285 | pinctrl-0 = <&i2c3_bus>; |
286 | status = "disabled"; | ||
281 | }; | 287 | }; |
282 | 288 | ||
283 | i2c_4: i2c@12CA0000 { | 289 | i2c_4: i2c@12CA0000 { |
@@ -290,6 +296,7 @@ | |||
290 | clock-names = "i2c"; | 296 | clock-names = "i2c"; |
291 | pinctrl-names = "default"; | 297 | pinctrl-names = "default"; |
292 | pinctrl-0 = <&i2c4_bus>; | 298 | pinctrl-0 = <&i2c4_bus>; |
299 | status = "disabled"; | ||
293 | }; | 300 | }; |
294 | 301 | ||
295 | i2c_5: i2c@12CB0000 { | 302 | i2c_5: i2c@12CB0000 { |
@@ -302,6 +309,7 @@ | |||
302 | clock-names = "i2c"; | 309 | clock-names = "i2c"; |
303 | pinctrl-names = "default"; | 310 | pinctrl-names = "default"; |
304 | pinctrl-0 = <&i2c5_bus>; | 311 | pinctrl-0 = <&i2c5_bus>; |
312 | status = "disabled"; | ||
305 | }; | 313 | }; |
306 | 314 | ||
307 | i2c_6: i2c@12CC0000 { | 315 | i2c_6: i2c@12CC0000 { |
@@ -314,6 +322,7 @@ | |||
314 | clock-names = "i2c"; | 322 | clock-names = "i2c"; |
315 | pinctrl-names = "default"; | 323 | pinctrl-names = "default"; |
316 | pinctrl-0 = <&i2c6_bus>; | 324 | pinctrl-0 = <&i2c6_bus>; |
325 | status = "disabled"; | ||
317 | }; | 326 | }; |
318 | 327 | ||
319 | i2c_7: i2c@12CD0000 { | 328 | i2c_7: i2c@12CD0000 { |
@@ -326,6 +335,7 @@ | |||
326 | clock-names = "i2c"; | 335 | clock-names = "i2c"; |
327 | pinctrl-names = "default"; | 336 | pinctrl-names = "default"; |
328 | pinctrl-0 = <&i2c7_bus>; | 337 | pinctrl-0 = <&i2c7_bus>; |
338 | status = "disabled"; | ||
329 | }; | 339 | }; |
330 | 340 | ||
331 | i2c_8: i2c@12CE0000 { | 341 | i2c_8: i2c@12CE0000 { |
@@ -336,6 +346,7 @@ | |||
336 | #size-cells = <0>; | 346 | #size-cells = <0>; |
337 | clocks = <&clock 302>; | 347 | clocks = <&clock 302>; |
338 | clock-names = "i2c"; | 348 | clock-names = "i2c"; |
349 | status = "disabled"; | ||
339 | }; | 350 | }; |
340 | 351 | ||
341 | i2c@121D0000 { | 352 | i2c@121D0000 { |
@@ -345,10 +356,12 @@ | |||
345 | #size-cells = <0>; | 356 | #size-cells = <0>; |
346 | clocks = <&clock 288>; | 357 | clocks = <&clock 288>; |
347 | clock-names = "i2c"; | 358 | clock-names = "i2c"; |
359 | status = "disabled"; | ||
348 | }; | 360 | }; |
349 | 361 | ||
350 | spi_0: spi@12d20000 { | 362 | spi_0: spi@12d20000 { |
351 | compatible = "samsung,exynos4210-spi"; | 363 | compatible = "samsung,exynos4210-spi"; |
364 | status = "disabled"; | ||
352 | reg = <0x12d20000 0x100>; | 365 | reg = <0x12d20000 0x100>; |
353 | interrupts = <0 66 0>; | 366 | interrupts = <0 66 0>; |
354 | dmas = <&pdma0 5 | 367 | dmas = <&pdma0 5 |
@@ -364,6 +377,7 @@ | |||
364 | 377 | ||
365 | spi_1: spi@12d30000 { | 378 | spi_1: spi@12d30000 { |
366 | compatible = "samsung,exynos4210-spi"; | 379 | compatible = "samsung,exynos4210-spi"; |
380 | status = "disabled"; | ||
367 | reg = <0x12d30000 0x100>; | 381 | reg = <0x12d30000 0x100>; |
368 | interrupts = <0 67 0>; | 382 | interrupts = <0 67 0>; |
369 | dmas = <&pdma1 5 | 383 | dmas = <&pdma1 5 |
@@ -379,6 +393,7 @@ | |||
379 | 393 | ||
380 | spi_2: spi@12d40000 { | 394 | spi_2: spi@12d40000 { |
381 | compatible = "samsung,exynos4210-spi"; | 395 | compatible = "samsung,exynos4210-spi"; |
396 | status = "disabled"; | ||
382 | reg = <0x12d40000 0x100>; | 397 | reg = <0x12d40000 0x100>; |
383 | interrupts = <0 68 0>; | 398 | interrupts = <0 68 0>; |
384 | dmas = <&pdma0 7 | 399 | dmas = <&pdma0 7 |
@@ -392,25 +407,43 @@ | |||
392 | pinctrl-0 = <&spi2_bus>; | 407 | pinctrl-0 = <&spi2_bus>; |
393 | }; | 408 | }; |
394 | 409 | ||
395 | dwmmc_0: dwmmc0@12200000 { | 410 | mmc_0: mmc@12200000 { |
411 | compatible = "samsung,exynos5250-dw-mshc"; | ||
412 | interrupts = <0 75 0>; | ||
413 | #address-cells = <1>; | ||
414 | #size-cells = <0>; | ||
396 | reg = <0x12200000 0x1000>; | 415 | reg = <0x12200000 0x1000>; |
397 | clocks = <&clock 280>, <&clock 139>; | 416 | clocks = <&clock 280>, <&clock 139>; |
398 | clock-names = "biu", "ciu"; | 417 | clock-names = "biu", "ciu"; |
418 | fifo-depth = <0x80>; | ||
419 | status = "disabled"; | ||
399 | }; | 420 | }; |
400 | 421 | ||
401 | dwmmc_1: dwmmc1@12210000 { | 422 | mmc_1: mmc@12210000 { |
423 | compatible = "samsung,exynos5250-dw-mshc"; | ||
424 | interrupts = <0 76 0>; | ||
425 | #address-cells = <1>; | ||
426 | #size-cells = <0>; | ||
402 | reg = <0x12210000 0x1000>; | 427 | reg = <0x12210000 0x1000>; |
403 | clocks = <&clock 281>, <&clock 140>; | 428 | clocks = <&clock 281>, <&clock 140>; |
404 | clock-names = "biu", "ciu"; | 429 | clock-names = "biu", "ciu"; |
430 | fifo-depth = <0x80>; | ||
431 | status = "disabled"; | ||
405 | }; | 432 | }; |
406 | 433 | ||
407 | dwmmc_2: dwmmc2@12220000 { | 434 | mmc_2: mmc@12220000 { |
435 | compatible = "samsung,exynos5250-dw-mshc"; | ||
436 | interrupts = <0 77 0>; | ||
437 | #address-cells = <1>; | ||
438 | #size-cells = <0>; | ||
408 | reg = <0x12220000 0x1000>; | 439 | reg = <0x12220000 0x1000>; |
409 | clocks = <&clock 282>, <&clock 141>; | 440 | clocks = <&clock 282>, <&clock 141>; |
410 | clock-names = "biu", "ciu"; | 441 | clock-names = "biu", "ciu"; |
442 | fifo-depth = <0x80>; | ||
443 | status = "disabled"; | ||
411 | }; | 444 | }; |
412 | 445 | ||
413 | dwmmc_3: dwmmc3@12230000 { | 446 | mmc_3: mmc@12230000 { |
414 | compatible = "samsung,exynos5250-dw-mshc"; | 447 | compatible = "samsung,exynos5250-dw-mshc"; |
415 | reg = <0x12230000 0x1000>; | 448 | reg = <0x12230000 0x1000>; |
416 | interrupts = <0 78 0>; | 449 | interrupts = <0 78 0>; |
@@ -418,6 +451,8 @@ | |||
418 | #size-cells = <0>; | 451 | #size-cells = <0>; |
419 | clocks = <&clock 283>, <&clock 142>; | 452 | clocks = <&clock 283>, <&clock 142>; |
420 | clock-names = "biu", "ciu"; | 453 | clock-names = "biu", "ciu"; |
454 | fifo-depth = <0x80>; | ||
455 | status = "disabled"; | ||
421 | }; | 456 | }; |
422 | 457 | ||
423 | i2s0: i2s@03830000 { | 458 | i2s0: i2s@03830000 { |
@@ -526,6 +561,15 @@ | |||
526 | }; | 561 | }; |
527 | }; | 562 | }; |
528 | 563 | ||
564 | pwm: pwm@12dd0000 { | ||
565 | compatible = "samsung,exynos4210-pwm"; | ||
566 | reg = <0x12dd0000 0x100>; | ||
567 | samsung,pwm-outputs = <0>, <1>, <2>, <3>; | ||
568 | #pwm-cells = <3>; | ||
569 | clocks = <&clock 311>; | ||
570 | clock-names = "timers"; | ||
571 | }; | ||
572 | |||
529 | amba { | 573 | amba { |
530 | #address-cells = <1>; | 574 | #address-cells = <1>; |
531 | #size-cells = <1>; | 575 | #size-cells = <1>; |
diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi index e695aba5f73c..e62c8eb57438 100644 --- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi | |||
@@ -64,7 +64,7 @@ | |||
64 | samsung,pins = "gpx0-7"; | 64 | samsung,pins = "gpx0-7"; |
65 | samsung,pin-function = <3>; | 65 | samsung,pin-function = <3>; |
66 | samsung,pin-pud = <0>; | 66 | samsung,pin-pud = <0>; |
67 | samaung,pin-drv = <0>; | 67 | samsung,pin-drv = <0>; |
68 | }; | 68 | }; |
69 | }; | 69 | }; |
70 | 70 | ||
diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts index 79524c74c603..fb5a1e25c632 100644 --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts | |||
@@ -31,6 +31,39 @@ | |||
31 | }; | 31 | }; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | mmc@12200000 { | ||
35 | status = "okay"; | ||
36 | broken-cd; | ||
37 | supports-highspeed; | ||
38 | card-detect-delay = <200>; | ||
39 | samsung,dw-mshc-ciu-div = <3>; | ||
40 | samsung,dw-mshc-sdr-timing = <0 4>; | ||
41 | samsung,dw-mshc-ddr-timing = <0 2>; | ||
42 | pinctrl-names = "default"; | ||
43 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; | ||
44 | |||
45 | slot@0 { | ||
46 | reg = <0>; | ||
47 | bus-width = <8>; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | mmc@12220000 { | ||
52 | status = "okay"; | ||
53 | supports-highspeed; | ||
54 | card-detect-delay = <200>; | ||
55 | samsung,dw-mshc-ciu-div = <3>; | ||
56 | samsung,dw-mshc-sdr-timing = <2 3>; | ||
57 | samsung,dw-mshc-ddr-timing = <1 2>; | ||
58 | pinctrl-names = "default"; | ||
59 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; | ||
60 | |||
61 | slot@0 { | ||
62 | reg = <0>; | ||
63 | bus-width = <4>; | ||
64 | }; | ||
65 | }; | ||
66 | |||
34 | dp-controller@145B0000 { | 67 | dp-controller@145B0000 { |
35 | pinctrl-names = "default"; | 68 | pinctrl-names = "default"; |
36 | pinctrl-0 = <&dp_hpd>; | 69 | pinctrl-0 = <&dp_hpd>; |
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 09aa06cb3d3a..11dd202c54bb 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi | |||
@@ -22,6 +22,9 @@ | |||
22 | compatible = "samsung,exynos5420"; | 22 | compatible = "samsung,exynos5420"; |
23 | 23 | ||
24 | aliases { | 24 | aliases { |
25 | mshc0 = &mmc_0; | ||
26 | mshc1 = &mmc_1; | ||
27 | mshc2 = &mmc_2; | ||
25 | pinctrl0 = &pinctrl_0; | 28 | pinctrl0 = &pinctrl_0; |
26 | pinctrl1 = &pinctrl_1; | 29 | pinctrl1 = &pinctrl_1; |
27 | pinctrl2 = &pinctrl_2; | 30 | pinctrl2 = &pinctrl_2; |
@@ -31,6 +34,18 @@ | |||
31 | i2c1 = &i2c_1; | 34 | i2c1 = &i2c_1; |
32 | i2c2 = &i2c_2; | 35 | i2c2 = &i2c_2; |
33 | i2c3 = &i2c_3; | 36 | i2c3 = &i2c_3; |
37 | i2c4 = &hsi2c_4; | ||
38 | i2c5 = &hsi2c_5; | ||
39 | i2c6 = &hsi2c_6; | ||
40 | i2c7 = &hsi2c_7; | ||
41 | i2c8 = &hsi2c_8; | ||
42 | i2c9 = &hsi2c_9; | ||
43 | i2c10 = &hsi2c_10; | ||
44 | gsc0 = &gsc_0; | ||
45 | gsc1 = &gsc_1; | ||
46 | spi0 = &spi_0; | ||
47 | spi1 = &spi_1; | ||
48 | spi2 = &spi_2; | ||
34 | }; | 49 | }; |
35 | 50 | ||
36 | cpus { | 51 | cpus { |
@@ -64,6 +79,34 @@ | |||
64 | reg = <0x3>; | 79 | reg = <0x3>; |
65 | clock-frequency = <1800000000>; | 80 | clock-frequency = <1800000000>; |
66 | }; | 81 | }; |
82 | |||
83 | cpu4: cpu@100 { | ||
84 | device_type = "cpu"; | ||
85 | compatible = "arm,cortex-a7"; | ||
86 | reg = <0x100>; | ||
87 | clock-frequency = <1000000000>; | ||
88 | }; | ||
89 | |||
90 | cpu5: cpu@101 { | ||
91 | device_type = "cpu"; | ||
92 | compatible = "arm,cortex-a7"; | ||
93 | reg = <0x101>; | ||
94 | clock-frequency = <1000000000>; | ||
95 | }; | ||
96 | |||
97 | cpu6: cpu@102 { | ||
98 | device_type = "cpu"; | ||
99 | compatible = "arm,cortex-a7"; | ||
100 | reg = <0x102>; | ||
101 | clock-frequency = <1000000000>; | ||
102 | }; | ||
103 | |||
104 | cpu7: cpu@103 { | ||
105 | device_type = "cpu"; | ||
106 | compatible = "arm,cortex-a7"; | ||
107 | reg = <0x103>; | ||
108 | clock-frequency = <1000000000>; | ||
109 | }; | ||
67 | }; | 110 | }; |
68 | 111 | ||
69 | clock: clock-controller@10010000 { | 112 | clock: clock-controller@10010000 { |
@@ -88,13 +131,50 @@ | |||
88 | clock-names = "mfc"; | 131 | clock-names = "mfc"; |
89 | }; | 132 | }; |
90 | 133 | ||
134 | mmc_0: mmc@12200000 { | ||
135 | compatible = "samsung,exynos5420-dw-mshc-smu"; | ||
136 | interrupts = <0 75 0>; | ||
137 | #address-cells = <1>; | ||
138 | #size-cells = <0>; | ||
139 | reg = <0x12200000 0x2000>; | ||
140 | clocks = <&clock 351>, <&clock 132>; | ||
141 | clock-names = "biu", "ciu"; | ||
142 | fifo-depth = <0x40>; | ||
143 | status = "disabled"; | ||
144 | }; | ||
145 | |||
146 | mmc_1: mmc@12210000 { | ||
147 | compatible = "samsung,exynos5420-dw-mshc-smu"; | ||
148 | interrupts = <0 76 0>; | ||
149 | #address-cells = <1>; | ||
150 | #size-cells = <0>; | ||
151 | reg = <0x12210000 0x2000>; | ||
152 | clocks = <&clock 352>, <&clock 133>; | ||
153 | clock-names = "biu", "ciu"; | ||
154 | fifo-depth = <0x40>; | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | |||
158 | mmc_2: mmc@12220000 { | ||
159 | compatible = "samsung,exynos5420-dw-mshc"; | ||
160 | interrupts = <0 77 0>; | ||
161 | #address-cells = <1>; | ||
162 | #size-cells = <0>; | ||
163 | reg = <0x12220000 0x1000>; | ||
164 | clocks = <&clock 353>, <&clock 134>; | ||
165 | clock-names = "biu", "ciu"; | ||
166 | fifo-depth = <0x40>; | ||
167 | status = "disabled"; | ||
168 | }; | ||
169 | |||
91 | mct@101C0000 { | 170 | mct@101C0000 { |
92 | compatible = "samsung,exynos4210-mct"; | 171 | compatible = "samsung,exynos4210-mct"; |
93 | reg = <0x101C0000 0x800>; | 172 | reg = <0x101C0000 0x800>; |
94 | interrupt-controller; | 173 | interrupt-controller; |
95 | #interrups-cells = <1>; | 174 | #interrups-cells = <1>; |
96 | interrupt-parent = <&mct_map>; | 175 | interrupt-parent = <&mct_map>; |
97 | interrupts = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>; | 176 | interrupts = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>, |
177 | <8>, <9>, <10>, <11>; | ||
98 | clocks = <&clock 1>, <&clock 315>; | 178 | clocks = <&clock 1>, <&clock 315>; |
99 | clock-names = "fin_pll", "mct"; | 179 | clock-names = "fin_pll", "mct"; |
100 | 180 | ||
@@ -109,7 +189,11 @@ | |||
109 | <4 &gic 0 120 0>, | 189 | <4 &gic 0 120 0>, |
110 | <5 &gic 0 121 0>, | 190 | <5 &gic 0 121 0>, |
111 | <6 &gic 0 122 0>, | 191 | <6 &gic 0 122 0>, |
112 | <7 &gic 0 123 0>; | 192 | <7 &gic 0 123 0>, |
193 | <8 &gic 0 128 0>, | ||
194 | <9 &gic 0 129 0>, | ||
195 | <10 &gic 0 130 0>, | ||
196 | <11 &gic 0 131 0>; | ||
113 | }; | 197 | }; |
114 | }; | 198 | }; |
115 | 199 | ||
@@ -190,6 +274,106 @@ | |||
190 | status = "okay"; | 274 | status = "okay"; |
191 | }; | 275 | }; |
192 | 276 | ||
277 | amba { | ||
278 | #address-cells = <1>; | ||
279 | #size-cells = <1>; | ||
280 | compatible = "arm,amba-bus"; | ||
281 | interrupt-parent = <&gic>; | ||
282 | ranges; | ||
283 | |||
284 | pdma0: pdma@121A0000 { | ||
285 | compatible = "arm,pl330", "arm,primecell"; | ||
286 | reg = <0x121A0000 0x1000>; | ||
287 | interrupts = <0 34 0>; | ||
288 | clocks = <&clock 362>; | ||
289 | clock-names = "apb_pclk"; | ||
290 | #dma-cells = <1>; | ||
291 | #dma-channels = <8>; | ||
292 | #dma-requests = <32>; | ||
293 | }; | ||
294 | |||
295 | pdma1: pdma@121B0000 { | ||
296 | compatible = "arm,pl330", "arm,primecell"; | ||
297 | reg = <0x121B0000 0x1000>; | ||
298 | interrupts = <0 35 0>; | ||
299 | clocks = <&clock 363>; | ||
300 | clock-names = "apb_pclk"; | ||
301 | #dma-cells = <1>; | ||
302 | #dma-channels = <8>; | ||
303 | #dma-requests = <32>; | ||
304 | }; | ||
305 | |||
306 | mdma0: mdma@10800000 { | ||
307 | compatible = "arm,pl330", "arm,primecell"; | ||
308 | reg = <0x10800000 0x1000>; | ||
309 | interrupts = <0 33 0>; | ||
310 | clocks = <&clock 473>; | ||
311 | clock-names = "apb_pclk"; | ||
312 | #dma-cells = <1>; | ||
313 | #dma-channels = <8>; | ||
314 | #dma-requests = <1>; | ||
315 | }; | ||
316 | |||
317 | mdma1: mdma@11C10000 { | ||
318 | compatible = "arm,pl330", "arm,primecell"; | ||
319 | reg = <0x11C10000 0x1000>; | ||
320 | interrupts = <0 124 0>; | ||
321 | clocks = <&clock 442>; | ||
322 | clock-names = "apb_pclk"; | ||
323 | #dma-cells = <1>; | ||
324 | #dma-channels = <8>; | ||
325 | #dma-requests = <1>; | ||
326 | }; | ||
327 | }; | ||
328 | |||
329 | spi_0: spi@12d20000 { | ||
330 | compatible = "samsung,exynos4210-spi"; | ||
331 | reg = <0x12d20000 0x100>; | ||
332 | interrupts = <0 66 0>; | ||
333 | dmas = <&pdma0 5 | ||
334 | &pdma0 4>; | ||
335 | dma-names = "tx", "rx"; | ||
336 | #address-cells = <1>; | ||
337 | #size-cells = <0>; | ||
338 | pinctrl-names = "default"; | ||
339 | pinctrl-0 = <&spi0_bus>; | ||
340 | clocks = <&clock 271>, <&clock 135>; | ||
341 | clock-names = "spi", "spi_busclk0"; | ||
342 | status = "disabled"; | ||
343 | }; | ||
344 | |||
345 | spi_1: spi@12d30000 { | ||
346 | compatible = "samsung,exynos4210-spi"; | ||
347 | reg = <0x12d30000 0x100>; | ||
348 | interrupts = <0 67 0>; | ||
349 | dmas = <&pdma1 5 | ||
350 | &pdma1 4>; | ||
351 | dma-names = "tx", "rx"; | ||
352 | #address-cells = <1>; | ||
353 | #size-cells = <0>; | ||
354 | pinctrl-names = "default"; | ||
355 | pinctrl-0 = <&spi1_bus>; | ||
356 | clocks = <&clock 272>, <&clock 136>; | ||
357 | clock-names = "spi", "spi_busclk0"; | ||
358 | status = "disabled"; | ||
359 | }; | ||
360 | |||
361 | spi_2: spi@12d40000 { | ||
362 | compatible = "samsung,exynos4210-spi"; | ||
363 | reg = <0x12d40000 0x100>; | ||
364 | interrupts = <0 68 0>; | ||
365 | dmas = <&pdma0 7 | ||
366 | &pdma0 6>; | ||
367 | dma-names = "tx", "rx"; | ||
368 | #address-cells = <1>; | ||
369 | #size-cells = <0>; | ||
370 | pinctrl-names = "default"; | ||
371 | pinctrl-0 = <&spi2_bus>; | ||
372 | clocks = <&clock 273>, <&clock 137>; | ||
373 | clock-names = "spi", "spi_busclk0"; | ||
374 | status = "disabled"; | ||
375 | }; | ||
376 | |||
193 | serial@12C00000 { | 377 | serial@12C00000 { |
194 | clocks = <&clock 257>, <&clock 128>; | 378 | clocks = <&clock 257>, <&clock 128>; |
195 | clock-names = "uart", "clk_uart_baud0"; | 379 | clock-names = "uart", "clk_uart_baud0"; |
@@ -210,6 +394,15 @@ | |||
210 | clock-names = "uart", "clk_uart_baud0"; | 394 | clock-names = "uart", "clk_uart_baud0"; |
211 | }; | 395 | }; |
212 | 396 | ||
397 | pwm: pwm@12dd0000 { | ||
398 | compatible = "samsung,exynos4210-pwm"; | ||
399 | reg = <0x12dd0000 0x100>; | ||
400 | samsung,pwm-outputs = <0>, <1>, <2>, <3>; | ||
401 | #pwm-cells = <3>; | ||
402 | clocks = <&clock 279>; | ||
403 | clock-names = "timers"; | ||
404 | }; | ||
405 | |||
213 | dp_phy: video-phy@10040728 { | 406 | dp_phy: video-phy@10040728 { |
214 | compatible = "samsung,exynos5250-dp-video-phy"; | 407 | compatible = "samsung,exynos5250-dp-video-phy"; |
215 | reg = <0x10040728 4>; | 408 | reg = <0x10040728 4>; |
@@ -292,6 +485,97 @@ | |||
292 | status = "disabled"; | 485 | status = "disabled"; |
293 | }; | 486 | }; |
294 | 487 | ||
488 | hsi2c_4: i2c@12CA0000 { | ||
489 | compatible = "samsung,exynos5-hsi2c"; | ||
490 | reg = <0x12CA0000 0x1000>; | ||
491 | interrupts = <0 60 0>; | ||
492 | #address-cells = <1>; | ||
493 | #size-cells = <0>; | ||
494 | pinctrl-names = "default"; | ||
495 | pinctrl-0 = <&i2c4_hs_bus>; | ||
496 | clocks = <&clock 265>; | ||
497 | clock-names = "hsi2c"; | ||
498 | status = "disabled"; | ||
499 | }; | ||
500 | |||
501 | hsi2c_5: i2c@12CB0000 { | ||
502 | compatible = "samsung,exynos5-hsi2c"; | ||
503 | reg = <0x12CB0000 0x1000>; | ||
504 | interrupts = <0 61 0>; | ||
505 | #address-cells = <1>; | ||
506 | #size-cells = <0>; | ||
507 | pinctrl-names = "default"; | ||
508 | pinctrl-0 = <&i2c5_hs_bus>; | ||
509 | clocks = <&clock 266>; | ||
510 | clock-names = "hsi2c"; | ||
511 | status = "disabled"; | ||
512 | }; | ||
513 | |||
514 | hsi2c_6: i2c@12CC0000 { | ||
515 | compatible = "samsung,exynos5-hsi2c"; | ||
516 | reg = <0x12CC0000 0x1000>; | ||
517 | interrupts = <0 62 0>; | ||
518 | #address-cells = <1>; | ||
519 | #size-cells = <0>; | ||
520 | pinctrl-names = "default"; | ||
521 | pinctrl-0 = <&i2c6_hs_bus>; | ||
522 | clocks = <&clock 267>; | ||
523 | clock-names = "hsi2c"; | ||
524 | status = "disabled"; | ||
525 | }; | ||
526 | |||
527 | hsi2c_7: i2c@12CD0000 { | ||
528 | compatible = "samsung,exynos5-hsi2c"; | ||
529 | reg = <0x12CD0000 0x1000>; | ||
530 | interrupts = <0 63 0>; | ||
531 | #address-cells = <1>; | ||
532 | #size-cells = <0>; | ||
533 | pinctrl-names = "default"; | ||
534 | pinctrl-0 = <&i2c7_hs_bus>; | ||
535 | clocks = <&clock 268>; | ||
536 | clock-names = "hsi2c"; | ||
537 | status = "disabled"; | ||
538 | }; | ||
539 | |||
540 | hsi2c_8: i2c@12E00000 { | ||
541 | compatible = "samsung,exynos5-hsi2c"; | ||
542 | reg = <0x12E00000 0x1000>; | ||
543 | interrupts = <0 87 0>; | ||
544 | #address-cells = <1>; | ||
545 | #size-cells = <0>; | ||
546 | pinctrl-names = "default"; | ||
547 | pinctrl-0 = <&i2c8_hs_bus>; | ||
548 | clocks = <&clock 281>; | ||
549 | clock-names = "hsi2c"; | ||
550 | status = "disabled"; | ||
551 | }; | ||
552 | |||
553 | hsi2c_9: i2c@12E10000 { | ||
554 | compatible = "samsung,exynos5-hsi2c"; | ||
555 | reg = <0x12E10000 0x1000>; | ||
556 | interrupts = <0 88 0>; | ||
557 | #address-cells = <1>; | ||
558 | #size-cells = <0>; | ||
559 | pinctrl-names = "default"; | ||
560 | pinctrl-0 = <&i2c9_hs_bus>; | ||
561 | clocks = <&clock 282>; | ||
562 | clock-names = "hsi2c"; | ||
563 | status = "disabled"; | ||
564 | }; | ||
565 | |||
566 | hsi2c_10: i2c@12E20000 { | ||
567 | compatible = "samsung,exynos5-hsi2c"; | ||
568 | reg = <0x12E20000 0x1000>; | ||
569 | interrupts = <0 203 0>; | ||
570 | #address-cells = <1>; | ||
571 | #size-cells = <0>; | ||
572 | pinctrl-names = "default"; | ||
573 | pinctrl-0 = <&i2c10_hs_bus>; | ||
574 | clocks = <&clock 283>; | ||
575 | clock-names = "hsi2c"; | ||
576 | status = "disabled"; | ||
577 | }; | ||
578 | |||
295 | hdmi@14530000 { | 579 | hdmi@14530000 { |
296 | compatible = "samsung,exynos4212-hdmi"; | 580 | compatible = "samsung,exynos4212-hdmi"; |
297 | reg = <0x14530000 0x70000>; | 581 | reg = <0x14530000 0x70000>; |
@@ -310,4 +594,62 @@ | |||
310 | clocks = <&clock 431>, <&clock 143>; | 594 | clocks = <&clock 431>, <&clock 143>; |
311 | clock-names = "mixer", "sclk_hdmi"; | 595 | clock-names = "mixer", "sclk_hdmi"; |
312 | }; | 596 | }; |
597 | |||
598 | gsc_0: video-scaler@13e00000 { | ||
599 | compatible = "samsung,exynos5-gsc"; | ||
600 | reg = <0x13e00000 0x1000>; | ||
601 | interrupts = <0 85 0>; | ||
602 | clocks = <&clock 465>; | ||
603 | clock-names = "gscl"; | ||
604 | samsung,power-domain = <&gsc_pd>; | ||
605 | }; | ||
606 | |||
607 | gsc_1: video-scaler@13e10000 { | ||
608 | compatible = "samsung,exynos5-gsc"; | ||
609 | reg = <0x13e10000 0x1000>; | ||
610 | interrupts = <0 86 0>; | ||
611 | clocks = <&clock 466>; | ||
612 | clock-names = "gscl"; | ||
613 | samsung,power-domain = <&gsc_pd>; | ||
614 | }; | ||
615 | |||
616 | tmu_cpu0: tmu@10060000 { | ||
617 | compatible = "samsung,exynos5420-tmu"; | ||
618 | reg = <0x10060000 0x100>; | ||
619 | interrupts = <0 65 0>; | ||
620 | clocks = <&clock 318>; | ||
621 | clock-names = "tmu_apbif"; | ||
622 | }; | ||
623 | |||
624 | tmu_cpu1: tmu@10064000 { | ||
625 | compatible = "samsung,exynos5420-tmu"; | ||
626 | reg = <0x10064000 0x100>; | ||
627 | interrupts = <0 183 0>; | ||
628 | clocks = <&clock 318>; | ||
629 | clock-names = "tmu_apbif"; | ||
630 | }; | ||
631 | |||
632 | tmu_cpu2: tmu@10068000 { | ||
633 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
634 | reg = <0x10068000 0x100>, <0x1006c000 0x4>; | ||
635 | interrupts = <0 184 0>; | ||
636 | clocks = <&clock 318>, <&clock 318>; | ||
637 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
638 | }; | ||
639 | |||
640 | tmu_cpu3: tmu@1006c000 { | ||
641 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
642 | reg = <0x1006c000 0x100>, <0x100a0000 0x4>; | ||
643 | interrupts = <0 185 0>; | ||
644 | clocks = <&clock 318>, <&clock 319>; | ||
645 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
646 | }; | ||
647 | |||
648 | tmu_gpu: tmu@100a0000 { | ||
649 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
650 | reg = <0x100a0000 0x100>, <0x10068000 0x4>; | ||
651 | interrupts = <0 215 0>; | ||
652 | clocks = <&clock 319>, <&clock 318>; | ||
653 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
654 | }; | ||
313 | }; | 655 | }; |
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 8da107088ce4..02a0a1226cef 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
@@ -29,7 +29,7 @@ | |||
29 | #clock-cells = <1>; | 29 | #clock-cells = <1>; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | gic:interrupt-controller@2E0000 { | 32 | gic: interrupt-controller@2E0000 { |
33 | compatible = "arm,cortex-a15-gic"; | 33 | compatible = "arm,cortex-a15-gic"; |
34 | #interrupt-cells = <3>; | 34 | #interrupt-cells = <3>; |
35 | interrupt-controller; | 35 | interrupt-controller; |
diff --git a/arch/arm/boot/dts/integrator.dtsi b/arch/arm/boot/dts/integrator.dtsi index 0f06f8687b0b..88e3d477bf16 100644 --- a/arch/arm/boot/dts/integrator.dtsi +++ b/arch/arm/boot/dts/integrator.dtsi | |||
@@ -10,6 +10,11 @@ | |||
10 | reg = <0x10000000 0x200>; | 10 | reg = <0x10000000 0x200>; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | ebi@12000000 { | ||
14 | compatible = "arm,external-bus-interface"; | ||
15 | reg = <0x12000000 0x100>; | ||
16 | }; | ||
17 | |||
13 | timer@13000000 { | 18 | timer@13000000 { |
14 | reg = <0x13000000 0x100>; | 19 | reg = <0x13000000 0x100>; |
15 | interrupt-parent = <&pic>; | 20 | interrupt-parent = <&pic>; |
diff --git a/arch/arm/boot/dts/k2hk-evm.dts b/arch/arm/boot/dts/k2hk-evm.dts new file mode 100644 index 000000000000..eaefdfef65c3 --- /dev/null +++ b/arch/arm/boot/dts/k2hk-evm.dts | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright 2013 Texas Instruments, Inc. | ||
3 | * | ||
4 | * Keystone 2 Kepler/Hawking EVM device tree | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | /dts-v1/; | ||
11 | |||
12 | #include "keystone.dtsi" | ||
13 | |||
14 | / { | ||
15 | compatible = "ti,keystone-evm"; | ||
16 | |||
17 | soc { | ||
18 | clock { | ||
19 | refclksys: refclksys { | ||
20 | #clock-cells = <0>; | ||
21 | compatible = "fixed-clock"; | ||
22 | clock-frequency = <122880000>; | ||
23 | clock-output-names = "refclk-sys"; | ||
24 | }; | ||
25 | |||
26 | refclkpass: refclkpass { | ||
27 | #clock-cells = <0>; | ||
28 | compatible = "fixed-clock"; | ||
29 | clock-frequency = <122880000>; | ||
30 | clock-output-names = "refclk-pass"; | ||
31 | }; | ||
32 | |||
33 | refclkarm: refclkarm { | ||
34 | #clock-cells = <0>; | ||
35 | compatible = "fixed-clock"; | ||
36 | clock-frequency = <125000000>; | ||
37 | clock-output-names = "refclk-arm"; | ||
38 | }; | ||
39 | |||
40 | refclkddr3a: refclkddr3a { | ||
41 | #clock-cells = <0>; | ||
42 | compatible = "fixed-clock"; | ||
43 | clock-frequency = <100000000>; | ||
44 | clock-output-names = "refclk-ddr3a"; | ||
45 | }; | ||
46 | |||
47 | refclkddr3b: refclkddr3b { | ||
48 | #clock-cells = <0>; | ||
49 | compatible = "fixed-clock"; | ||
50 | clock-frequency = <100000000>; | ||
51 | clock-output-names = "refclk-ddr3b"; | ||
52 | }; | ||
53 | }; | ||
54 | }; | ||
55 | }; | ||
56 | |||
57 | &usb_phy { | ||
58 | status = "okay"; | ||
59 | }; | ||
60 | |||
61 | &usb { | ||
62 | status = "okay"; | ||
63 | }; | ||
diff --git a/arch/arm/boot/dts/keystone-clocks.dtsi b/arch/arm/boot/dts/keystone-clocks.dtsi index d6713b113258..2363593e1050 100644 --- a/arch/arm/boot/dts/keystone-clocks.dtsi +++ b/arch/arm/boot/dts/keystone-clocks.dtsi | |||
@@ -13,17 +13,10 @@ clocks { | |||
13 | #size-cells = <1>; | 13 | #size-cells = <1>; |
14 | ranges; | 14 | ranges; |
15 | 15 | ||
16 | refclkmain: refclkmain { | ||
17 | #clock-cells = <0>; | ||
18 | compatible = "fixed-clock"; | ||
19 | clock-frequency = <122880000>; | ||
20 | clock-output-names = "refclk-main"; | ||
21 | }; | ||
22 | |||
23 | mainpllclk: mainpllclk@2310110 { | 16 | mainpllclk: mainpllclk@2310110 { |
24 | #clock-cells = <0>; | 17 | #clock-cells = <0>; |
25 | compatible = "ti,keystone,main-pll-clock"; | 18 | compatible = "ti,keystone,main-pll-clock"; |
26 | clocks = <&refclkmain>; | 19 | clocks = <&refclksys>; |
27 | reg = <0x02620350 4>, <0x02310110 4>; | 20 | reg = <0x02620350 4>, <0x02310110 4>; |
28 | reg-names = "control", "multiplier"; | 21 | reg-names = "control", "multiplier"; |
29 | fixed-postdiv = <2>; | 22 | fixed-postdiv = <2>; |
@@ -32,47 +25,43 @@ clocks { | |||
32 | papllclk: papllclk@2620358 { | 25 | papllclk: papllclk@2620358 { |
33 | #clock-cells = <0>; | 26 | #clock-cells = <0>; |
34 | compatible = "ti,keystone,pll-clock"; | 27 | compatible = "ti,keystone,pll-clock"; |
35 | clocks = <&refclkmain>; | 28 | clocks = <&refclkpass>; |
36 | clock-output-names = "pa-pll-clk"; | 29 | clock-output-names = "pa-pll-clk"; |
37 | reg = <0x02620358 4>; | 30 | reg = <0x02620358 4>; |
38 | reg-names = "control"; | 31 | reg-names = "control"; |
39 | fixed-postdiv = <6>; | ||
40 | }; | 32 | }; |
41 | 33 | ||
42 | ddr3allclk: ddr3apllclk@2620360 { | 34 | ddr3apllclk: ddr3apllclk@2620360 { |
43 | #clock-cells = <0>; | 35 | #clock-cells = <0>; |
44 | compatible = "ti,keystone,pll-clock"; | 36 | compatible = "ti,keystone,pll-clock"; |
45 | clocks = <&refclkmain>; | 37 | clocks = <&refclkddr3a>; |
46 | clock-output-names = "ddr-3a-pll-clk"; | 38 | clock-output-names = "ddr-3a-pll-clk"; |
47 | reg = <0x02620360 4>; | 39 | reg = <0x02620360 4>; |
48 | reg-names = "control"; | 40 | reg-names = "control"; |
49 | fixed-postdiv = <6>; | ||
50 | }; | 41 | }; |
51 | 42 | ||
52 | ddr3bllclk: ddr3bpllclk@2620368 { | 43 | ddr3bpllclk: ddr3bpllclk@2620368 { |
53 | #clock-cells = <0>; | 44 | #clock-cells = <0>; |
54 | compatible = "ti,keystone,pll-clock"; | 45 | compatible = "ti,keystone,pll-clock"; |
55 | clocks = <&refclkmain>; | 46 | clocks = <&refclkddr3b>; |
56 | clock-output-names = "ddr-3b-pll-clk"; | 47 | clock-output-names = "ddr-3b-pll-clk"; |
57 | reg = <0x02620368 4>; | 48 | reg = <0x02620368 4>; |
58 | reg-names = "control"; | 49 | reg-names = "control"; |
59 | fixed-postdiv = <6>; | ||
60 | }; | 50 | }; |
61 | 51 | ||
62 | armpllclk: armpllclk@2620370 { | 52 | armpllclk: armpllclk@2620370 { |
63 | #clock-cells = <0>; | 53 | #clock-cells = <0>; |
64 | compatible = "ti,keystone,pll-clock"; | 54 | compatible = "ti,keystone,pll-clock"; |
65 | clocks = <&refclkmain>; | 55 | clocks = <&refclkarm>; |
66 | clock-output-names = "arm-pll-clk"; | 56 | clock-output-names = "arm-pll-clk"; |
67 | reg = <0x02620370 4>; | 57 | reg = <0x02620370 4>; |
68 | reg-names = "control"; | 58 | reg-names = "control"; |
69 | fixed-postdiv = <6>; | ||
70 | }; | 59 | }; |
71 | 60 | ||
72 | mainmuxclk: mainmuxclk@2310108 { | 61 | mainmuxclk: mainmuxclk@2310108 { |
73 | #clock-cells = <0>; | 62 | #clock-cells = <0>; |
74 | compatible = "ti,keystone,pll-mux-clock"; | 63 | compatible = "ti,keystone,pll-mux-clock"; |
75 | clocks = <&mainpllclk>, <&refclkmain>; | 64 | clocks = <&mainpllclk>, <&refclksys>; |
76 | reg = <0x02310108 4>; | 65 | reg = <0x02310108 4>; |
77 | bit-shift = <23>; | 66 | bit-shift = <23>; |
78 | bit-mask = <1>; | 67 | bit-mask = <1>; |
@@ -135,6 +124,15 @@ clocks { | |||
135 | clock-output-names = "chipclk13"; | 124 | clock-output-names = "chipclk13"; |
136 | }; | 125 | }; |
137 | 126 | ||
127 | paclk13: paclk13 { | ||
128 | #clock-cells = <0>; | ||
129 | compatible = "fixed-factor-clock"; | ||
130 | clocks = <&papllclk>; | ||
131 | clock-div = <3>; | ||
132 | clock-mult = <1>; | ||
133 | clock-output-names = "paclk13"; | ||
134 | }; | ||
135 | |||
138 | chipclk14: chipclk14 { | 136 | chipclk14: chipclk14 { |
139 | #clock-cells = <0>; | 137 | #clock-cells = <0>; |
140 | compatible = "fixed-factor-clock"; | 138 | compatible = "fixed-factor-clock"; |
diff --git a/arch/arm/boot/dts/keystone.dts b/arch/arm/boot/dts/keystone.dtsi index 100bdf52b847..b4202907a27b 100644 --- a/arch/arm/boot/dts/keystone.dts +++ b/arch/arm/boot/dts/keystone.dtsi | |||
@@ -6,14 +6,12 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /dts-v1/; | ||
10 | #include <dt-bindings/interrupt-controller/arm-gic.h> | 9 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
11 | 10 | ||
12 | #include "skeleton.dtsi" | 11 | #include "skeleton.dtsi" |
13 | 12 | ||
14 | / { | 13 | / { |
15 | model = "Texas Instruments Keystone 2 SoC"; | 14 | model = "Texas Instruments Keystone 2 SoC"; |
16 | compatible = "ti,keystone-evm"; | ||
17 | #address-cells = <2>; | 15 | #address-cells = <2>; |
18 | #size-cells = <2>; | 16 | #size-cells = <2>; |
19 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
@@ -64,7 +62,11 @@ | |||
64 | #address-cells = <1>; | 62 | #address-cells = <1>; |
65 | interrupt-controller; | 63 | interrupt-controller; |
66 | reg = <0x0 0x02561000 0x0 0x1000>, | 64 | reg = <0x0 0x02561000 0x0 0x1000>, |
67 | <0x0 0x02562000 0x0 0x2000>; | 65 | <0x0 0x02562000 0x0 0x2000>, |
66 | <0x0 0x02564000 0x0 0x1000>, | ||
67 | <0x0 0x02566000 0x0 0x2000>; | ||
68 | interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | | ||
69 | IRQ_TYPE_LEVEL_HIGH)>; | ||
68 | }; | 70 | }; |
69 | 71 | ||
70 | timer { | 72 | timer { |
@@ -179,5 +181,32 @@ | |||
179 | interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>; | 181 | interrupts = <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>; |
180 | clocks = <&clkspi>; | 182 | clocks = <&clkspi>; |
181 | }; | 183 | }; |
184 | |||
185 | usb_phy: usb_phy@2620738 { | ||
186 | compatible = "ti,keystone-usbphy"; | ||
187 | #address-cells = <1>; | ||
188 | #size-cells = <1>; | ||
189 | reg = <0x2620738 32>; | ||
190 | status = "disabled"; | ||
191 | }; | ||
192 | |||
193 | usb: usb@2680000 { | ||
194 | compatible = "ti,keystone-dwc3"; | ||
195 | #address-cells = <1>; | ||
196 | #size-cells = <1>; | ||
197 | reg = <0x2680000 0x10000>; | ||
198 | clocks = <&clkusb>; | ||
199 | clock-names = "usb"; | ||
200 | interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; | ||
201 | ranges; | ||
202 | status = "disabled"; | ||
203 | |||
204 | dwc3@2690000 { | ||
205 | compatible = "synopsys,dwc3"; | ||
206 | reg = <0x2690000 0x70000>; | ||
207 | interrupts = <GIC_SPI 393 IRQ_TYPE_EDGE_RISING>; | ||
208 | usb-phy = <&usb_phy>, <&usb_phy>; | ||
209 | }; | ||
210 | }; | ||
182 | }; | 211 | }; |
183 | }; | 212 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-6281.dtsi b/arch/arm/boot/dts/kirkwood-6281.dtsi index 650ef30e1856..e4e1968dfca8 100644 --- a/arch/arm/boot/dts/kirkwood-6281.dtsi +++ b/arch/arm/boot/dts/kirkwood-6281.dtsi | |||
@@ -97,6 +97,8 @@ | |||
97 | reg = <0x90000 0x200>; | 97 | reg = <0x90000 0x200>; |
98 | interrupts = <28>; | 98 | interrupts = <28>; |
99 | clocks = <&gate_clk 4>; | 99 | clocks = <&gate_clk 4>; |
100 | pinctrl-0 = <&pmx_sdio>; | ||
101 | pinctrl-names = "default"; | ||
100 | bus-width = <4>; | 102 | bus-width = <4>; |
101 | cap-sdio-irq; | 103 | cap-sdio-irq; |
102 | cap-sd-highspeed; | 104 | cap-sd-highspeed; |
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index 3933a331ddc2..f010c21220bf 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi | |||
@@ -125,6 +125,8 @@ | |||
125 | reg = <0x90000 0x200>; | 125 | reg = <0x90000 0x200>; |
126 | interrupts = <28>; | 126 | interrupts = <28>; |
127 | clocks = <&gate_clk 4>; | 127 | clocks = <&gate_clk 4>; |
128 | pinctrl-0 = <&pmx_sdio>; | ||
129 | pinctrl-names = "default"; | ||
128 | bus-width = <4>; | 130 | bus-width = <4>; |
129 | cap-sdio-irq; | 131 | cap-sdio-irq; |
130 | cap-sd-highspeed; | 132 | cap-sd-highspeed; |
diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts index 142b9cd3b454..bb4df405527c 100644 --- a/arch/arm/boot/dts/kirkwood-cloudbox.dts +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | button@1 { | 67 | button@1 { |
68 | label = "Power push button"; | 68 | label = "Power push button"; |
69 | linux,code = <116>; | 69 | linux,code = <KEY_POWER>; |
70 | gpios = <&gpio0 16 1>; | 70 | gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; |
71 | }; | 71 | }; |
72 | }; | 72 | }; |
73 | 73 | ||
@@ -76,17 +76,17 @@ | |||
76 | 76 | ||
77 | red-fail { | 77 | red-fail { |
78 | label = "cloudbox:red:fail"; | 78 | label = "cloudbox:red:fail"; |
79 | gpios = <&gpio0 14 0>; | 79 | gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
80 | }; | 80 | }; |
81 | blue-sata { | 81 | blue-sata { |
82 | label = "cloudbox:blue:sata"; | 82 | label = "cloudbox:blue:sata"; |
83 | gpios = <&gpio0 15 0>; | 83 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
84 | }; | 84 | }; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | gpio_poweroff { | 87 | gpio_poweroff { |
88 | compatible = "gpio-poweroff"; | 88 | compatible = "gpio-poweroff"; |
89 | gpios = <&gpio0 17 0>; | 89 | gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; |
90 | }; | 90 | }; |
91 | }; | 91 | }; |
92 | 92 | ||
diff --git a/arch/arm/boot/dts/kirkwood-db.dtsi b/arch/arm/boot/dts/kirkwood-db.dtsi index 053aa20fb30f..afebc1570318 100644 --- a/arch/arm/boot/dts/kirkwood-db.dtsi +++ b/arch/arm/boot/dts/kirkwood-db.dtsi | |||
@@ -51,8 +51,8 @@ | |||
51 | mvsdio@90000 { | 51 | mvsdio@90000 { |
52 | pinctrl-0 = <&pmx_sdio_gpios>; | 52 | pinctrl-0 = <&pmx_sdio_gpios>; |
53 | pinctrl-names = "default"; | 53 | pinctrl-names = "default"; |
54 | wp-gpios = <&gpio1 5 0>; | 54 | wp-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; |
55 | cd-gpios = <&gpio1 6 0>; | 55 | cd-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; |
56 | status = "okay"; | 56 | status = "okay"; |
57 | }; | 57 | }; |
58 | }; | 58 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts index e112ca62d978..bf7fe8ab88f4 100644 --- a/arch/arm/boot/dts/kirkwood-dns320.dts +++ b/arch/arm/boot/dts/kirkwood-dns320.dts | |||
@@ -24,24 +24,24 @@ | |||
24 | 24 | ||
25 | blue-power { | 25 | blue-power { |
26 | label = "dns320:blue:power"; | 26 | label = "dns320:blue:power"; |
27 | gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */ | 27 | gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; |
28 | linux,default-trigger = "default-on"; | 28 | default-state = "keep"; |
29 | }; | 29 | }; |
30 | blue-usb { | 30 | blue-usb { |
31 | label = "dns320:blue:usb"; | 31 | label = "dns320:blue:usb"; |
32 | gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */ | 32 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; |
33 | }; | 33 | }; |
34 | orange-l_hdd { | 34 | orange-l_hdd { |
35 | label = "dns320:orange:l_hdd"; | 35 | label = "dns320:orange:l_hdd"; |
36 | gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */ | 36 | gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; |
37 | }; | 37 | }; |
38 | orange-r_hdd { | 38 | orange-r_hdd { |
39 | label = "dns320:orange:r_hdd"; | 39 | label = "dns320:orange:r_hdd"; |
40 | gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */ | 40 | gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; |
41 | }; | 41 | }; |
42 | orange-usb { | 42 | orange-usb { |
43 | label = "dns320:orange:usb"; | 43 | label = "dns320:orange:usb"; |
44 | gpios = <&gpio1 3 1>; /* GPIO 35 Active Low */ | 44 | gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; /* GPIO 35 */ |
45 | }; | 45 | }; |
46 | }; | 46 | }; |
47 | 47 | ||
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts index 5119fb8a8eb6..cb9978c652f2 100644 --- a/arch/arm/boot/dts/kirkwood-dns325.dts +++ b/arch/arm/boot/dts/kirkwood-dns325.dts | |||
@@ -24,24 +24,24 @@ | |||
24 | 24 | ||
25 | white-power { | 25 | white-power { |
26 | label = "dns325:white:power"; | 26 | label = "dns325:white:power"; |
27 | gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */ | 27 | gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; |
28 | linux,default-trigger = "default-on"; | 28 | default-state = "keep"; |
29 | }; | 29 | }; |
30 | white-usb { | 30 | white-usb { |
31 | label = "dns325:white:usb"; | 31 | label = "dns325:white:usb"; |
32 | gpios = <&gpio1 11 1>; /* GPIO 43 Active Low */ | 32 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; /* GPIO 43 */ |
33 | }; | 33 | }; |
34 | red-l_hdd { | 34 | red-l_hdd { |
35 | label = "dns325:red:l_hdd"; | 35 | label = "dns325:red:l_hdd"; |
36 | gpios = <&gpio0 28 1>; /* GPIO 28 Active Low */ | 36 | gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; |
37 | }; | 37 | }; |
38 | red-r_hdd { | 38 | red-r_hdd { |
39 | label = "dns325:red:r_hdd"; | 39 | label = "dns325:red:r_hdd"; |
40 | gpios = <&gpio0 27 1>; /* GPIO 27 Active Low */ | 40 | gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; |
41 | }; | 41 | }; |
42 | red-usb { | 42 | red-usb { |
43 | label = "dns325:red:usb"; | 43 | label = "dns325:red:usb"; |
44 | gpios = <&gpio0 29 1>; /* GPIO 29 Active Low */ | 44 | gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; |
45 | }; | 45 | }; |
46 | }; | 46 | }; |
47 | 47 | ||
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi index aefa375a550d..12087566ac6d 100644 --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi | |||
@@ -15,18 +15,18 @@ | |||
15 | 15 | ||
16 | button@1 { | 16 | button@1 { |
17 | label = "Power button"; | 17 | label = "Power button"; |
18 | linux,code = <116>; | 18 | linux,code = <KEY_POWER>; |
19 | gpios = <&gpio1 2 1>; | 19 | gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; |
20 | }; | 20 | }; |
21 | button@2 { | 21 | button@2 { |
22 | label = "USB unmount button"; | 22 | label = "USB unmount button"; |
23 | linux,code = <161>; | 23 | linux,code = <KEY_EJECTCD>; |
24 | gpios = <&gpio1 15 1>; | 24 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
25 | }; | 25 | }; |
26 | button@3 { | 26 | button@3 { |
27 | label = "Reset button"; | 27 | label = "Reset button"; |
28 | linux,code = <0x198>; | 28 | linux,code = <KEY_RESTART>; |
29 | gpios = <&gpio1 16 1>; | 29 | gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; |
30 | }; | 30 | }; |
31 | }; | 31 | }; |
32 | 32 | ||
@@ -35,8 +35,8 @@ | |||
35 | compatible = "gpio-fan"; | 35 | compatible = "gpio-fan"; |
36 | pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>; | 36 | pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>; |
37 | pinctrl-names = "default"; | 37 | pinctrl-names = "default"; |
38 | gpios = <&gpio1 14 1 | 38 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW |
39 | &gpio1 13 1>; | 39 | &gpio1 13 GPIO_ACTIVE_LOW>; |
40 | gpio-fan,speed-map = <0 0 | 40 | gpio-fan,speed-map = <0 0 |
41 | 3000 1 | 41 | 3000 1 |
42 | 6000 2>; | 42 | 6000 2>; |
@@ -46,7 +46,7 @@ | |||
46 | compatible = "gpio-poweroff"; | 46 | compatible = "gpio-poweroff"; |
47 | pinctrl-0 = <&pmx_power_off>; | 47 | pinctrl-0 = <&pmx_power_off>; |
48 | pinctrl-names = "default"; | 48 | pinctrl-names = "default"; |
49 | gpios = <&gpio1 4 0>; | 49 | gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | ocp@f1000000 { | 52 | ocp@f1000000 { |
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts index 33ff368fbfa5..2a41c75c5c21 100644 --- a/arch/arm/boot/dts/kirkwood-dockstar.dts +++ b/arch/arm/boot/dts/kirkwood-dockstar.dts | |||
@@ -42,12 +42,12 @@ | |||
42 | 42 | ||
43 | health { | 43 | health { |
44 | label = "status:green:health"; | 44 | label = "status:green:health"; |
45 | gpios = <&gpio1 14 1>; | 45 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; |
46 | linux,default-trigger = "default-on"; | 46 | default-state = "keep"; |
47 | }; | 47 | }; |
48 | fault { | 48 | fault { |
49 | label = "status:orange:fault"; | 49 | label = "status:orange:fault"; |
50 | gpios = <&gpio1 15 1>; | 50 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
51 | }; | 51 | }; |
52 | }; | 52 | }; |
53 | regulators { | 53 | regulators { |
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index 6f62af99c9cb..a7558375e06f 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts | |||
@@ -87,15 +87,15 @@ | |||
87 | 87 | ||
88 | bluetooth { | 88 | bluetooth { |
89 | label = "dreamplug:blue:bluetooth"; | 89 | label = "dreamplug:blue:bluetooth"; |
90 | gpios = <&gpio1 15 1>; | 90 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
91 | }; | 91 | }; |
92 | wifi { | 92 | wifi { |
93 | label = "dreamplug:green:wifi"; | 93 | label = "dreamplug:green:wifi"; |
94 | gpios = <&gpio1 16 1>; | 94 | gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; |
95 | }; | 95 | }; |
96 | wifi-ap { | 96 | wifi-ap { |
97 | label = "dreamplug:green:wifi_ap"; | 97 | label = "dreamplug:green:wifi_ap"; |
98 | gpios = <&gpio1 17 1>; | 98 | gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; |
99 | }; | 99 | }; |
100 | }; | 100 | }; |
101 | }; | 101 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index a43bebb25110..c2e512953570 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts | |||
@@ -85,44 +85,44 @@ | |||
85 | 85 | ||
86 | health { | 86 | health { |
87 | label = "status:green:health"; | 87 | label = "status:green:health"; |
88 | gpios = <&gpio1 14 1>; | 88 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; |
89 | linux,default-trigger = "default-on"; | 89 | default-state = "keep"; |
90 | }; | 90 | }; |
91 | fault { | 91 | fault { |
92 | label = "status:orange:fault"; | 92 | label = "status:orange:fault"; |
93 | gpios = <&gpio1 15 1>; | 93 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
94 | }; | 94 | }; |
95 | left0 { | 95 | left0 { |
96 | label = "status:white:left0"; | 96 | label = "status:white:left0"; |
97 | gpios = <&gpio1 10 0>; | 97 | gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
98 | }; | 98 | }; |
99 | left1 { | 99 | left1 { |
100 | label = "status:white:left1"; | 100 | label = "status:white:left1"; |
101 | gpios = <&gpio1 11 0>; | 101 | gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; |
102 | }; | 102 | }; |
103 | left2 { | 103 | left2 { |
104 | label = "status:white:left2"; | 104 | label = "status:white:left2"; |
105 | gpios = <&gpio1 12 0>; | 105 | gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; |
106 | }; | 106 | }; |
107 | left3 { | 107 | left3 { |
108 | label = "status:white:left3"; | 108 | label = "status:white:left3"; |
109 | gpios = <&gpio1 13 0>; | 109 | gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; |
110 | }; | 110 | }; |
111 | right0 { | 111 | right0 { |
112 | label = "status:white:right0"; | 112 | label = "status:white:right0"; |
113 | gpios = <&gpio1 6 0>; | 113 | gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; |
114 | }; | 114 | }; |
115 | right1 { | 115 | right1 { |
116 | label = "status:white:right1"; | 116 | label = "status:white:right1"; |
117 | gpios = <&gpio1 7 0>; | 117 | gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; |
118 | }; | 118 | }; |
119 | right2 { | 119 | right2 { |
120 | label = "status:white:right2"; | 120 | label = "status:white:right2"; |
121 | gpios = <&gpio1 8 0>; | 121 | gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; |
122 | }; | 122 | }; |
123 | right3 { | 123 | right3 { |
124 | label = "status:white:right3"; | 124 | label = "status:white:right3"; |
125 | gpios = <&gpio1 9 0>; | 125 | gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; |
126 | }; | 126 | }; |
127 | }; | 127 | }; |
128 | regulators { | 128 | regulators { |
@@ -141,7 +141,7 @@ | |||
141 | enable-active-high; | 141 | enable-active-high; |
142 | regulator-always-on; | 142 | regulator-always-on; |
143 | regulator-boot-on; | 143 | regulator-boot-on; |
144 | gpio = <&gpio0 29 0>; | 144 | gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
145 | }; | 145 | }; |
146 | }; | 146 | }; |
147 | }; | 147 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts index d30a91a5047d..0b557d5cb723 100644 --- a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts +++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts | |||
@@ -45,10 +45,10 @@ | |||
45 | nr-ports = <1>; | 45 | nr-ports = <1>; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* AzureWave AW-GH381 WiFi/BT */ | ||
48 | mvsdio@90000 { | 49 | mvsdio@90000 { |
49 | status = "okay"; | 50 | status = "okay"; |
50 | /* No CD or WP GPIOs */ | 51 | non-removable; |
51 | broken-cd; | ||
52 | }; | 52 | }; |
53 | }; | 53 | }; |
54 | 54 | ||
@@ -60,19 +60,19 @@ | |||
60 | 60 | ||
61 | health-r { | 61 | health-r { |
62 | label = "guruplug:red:health"; | 62 | label = "guruplug:red:health"; |
63 | gpios = <&gpio1 14 1>; | 63 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; |
64 | }; | 64 | }; |
65 | health-g { | 65 | health-g { |
66 | label = "guruplug:green:health"; | 66 | label = "guruplug:green:health"; |
67 | gpios = <&gpio1 15 1>; | 67 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
68 | }; | 68 | }; |
69 | wmode-r { | 69 | wmode-r { |
70 | label = "guruplug:red:wmode"; | 70 | label = "guruplug:red:wmode"; |
71 | gpios = <&gpio1 16 1>; | 71 | gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; |
72 | }; | 72 | }; |
73 | wmode-g { | 73 | wmode-g { |
74 | label = "guruplug:green:wmode"; | 74 | label = "guruplug:green:wmode"; |
75 | gpios = <&gpio1 17 1>; | 75 | gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; |
76 | }; | 76 | }; |
77 | }; | 77 | }; |
78 | }; | 78 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index c5fb02f7ebc3..6ccc78866e6d 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts | |||
@@ -63,13 +63,13 @@ | |||
63 | 63 | ||
64 | button@1 { | 64 | button@1 { |
65 | label = "USB Copy"; | 65 | label = "USB Copy"; |
66 | linux,code = <133>; | 66 | linux,code = <KEY_COPY>; |
67 | gpios = <&gpio0 29 1>; | 67 | gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; |
68 | }; | 68 | }; |
69 | button@2 { | 69 | button@2 { |
70 | label = "Reset"; | 70 | label = "Reset"; |
71 | linux,code = <0x198>; | 71 | linux,code = <KEY_RESTART>; |
72 | gpios = <&gpio0 28 1>; | 72 | gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; |
73 | }; | 73 | }; |
74 | }; | 74 | }; |
75 | 75 | ||
@@ -81,16 +81,16 @@ | |||
81 | 81 | ||
82 | green-os { | 82 | green-os { |
83 | label = "ib62x0:green:os"; | 83 | label = "ib62x0:green:os"; |
84 | gpios = <&gpio0 25 0>; | 84 | gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; |
85 | linux,default-trigger = "default-on"; | 85 | default-state = "keep"; |
86 | }; | 86 | }; |
87 | red-os { | 87 | red-os { |
88 | label = "ib62x0:red:os"; | 88 | label = "ib62x0:red:os"; |
89 | gpios = <&gpio0 22 0>; | 89 | gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; |
90 | }; | 90 | }; |
91 | usb-copy { | 91 | usb-copy { |
92 | label = "ib62x0:red:usb_copy"; | 92 | label = "ib62x0:red:usb_copy"; |
93 | gpios = <&gpio0 27 0>; | 93 | gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; |
94 | }; | 94 | }; |
95 | }; | 95 | }; |
96 | 96 | ||
@@ -98,7 +98,7 @@ | |||
98 | compatible = "gpio-poweroff"; | 98 | compatible = "gpio-poweroff"; |
99 | pinctrl-0 = <&pmx_power_off>; | 99 | pinctrl-0 = <&pmx_power_off>; |
100 | pinctrl-names = "default"; | 100 | pinctrl-names = "default"; |
101 | gpios = <&gpio0 24 0>; | 101 | gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; |
102 | }; | 102 | }; |
103 | }; | 103 | }; |
104 | 104 | ||
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts index 4a62b206f680..f7636291de77 100644 --- a/arch/arm/boot/dts/kirkwood-iconnect.dts +++ b/arch/arm/boot/dts/kirkwood-iconnect.dts | |||
@@ -94,37 +94,37 @@ | |||
94 | 94 | ||
95 | led-level { | 95 | led-level { |
96 | label = "led_level"; | 96 | label = "led_level"; |
97 | gpios = <&gpio1 9 0>; | 97 | gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; |
98 | linux,default-trigger = "default-on"; | 98 | default-state = "on"; |
99 | }; | 99 | }; |
100 | power-blue { | 100 | power-blue { |
101 | label = "power:blue"; | 101 | label = "power:blue"; |
102 | gpios = <&gpio1 10 0>; | 102 | gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
103 | linux,default-trigger = "timer"; | 103 | default-state = "keep"; |
104 | }; | 104 | }; |
105 | power-red { | 105 | power-red { |
106 | label = "power:red"; | 106 | label = "power:red"; |
107 | gpios = <&gpio1 11 0>; | 107 | gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; |
108 | }; | 108 | }; |
109 | usb1 { | 109 | usb1 { |
110 | label = "usb1:blue"; | 110 | label = "usb1:blue"; |
111 | gpios = <&gpio1 12 0>; | 111 | gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; |
112 | }; | 112 | }; |
113 | usb2 { | 113 | usb2 { |
114 | label = "usb2:blue"; | 114 | label = "usb2:blue"; |
115 | gpios = <&gpio1 13 0>; | 115 | gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; |
116 | }; | 116 | }; |
117 | usb3 { | 117 | usb3 { |
118 | label = "usb3:blue"; | 118 | label = "usb3:blue"; |
119 | gpios = <&gpio1 14 0>; | 119 | gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; |
120 | }; | 120 | }; |
121 | usb4 { | 121 | usb4 { |
122 | label = "usb4:blue"; | 122 | label = "usb4:blue"; |
123 | gpios = <&gpio1 15 0>; | 123 | gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; |
124 | }; | 124 | }; |
125 | otb { | 125 | otb { |
126 | label = "otb:blue"; | 126 | label = "otb:blue"; |
127 | gpios = <&gpio1 16 0>; | 127 | gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; |
128 | }; | 128 | }; |
129 | }; | 129 | }; |
130 | 130 | ||
@@ -137,14 +137,14 @@ | |||
137 | 137 | ||
138 | button@1 { | 138 | button@1 { |
139 | label = "OTB Button"; | 139 | label = "OTB Button"; |
140 | linux,code = <133>; | 140 | linux,code = <KEY_COPY>; |
141 | gpios = <&gpio1 3 1>; | 141 | gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; |
142 | debounce-interval = <100>; | 142 | debounce-interval = <100>; |
143 | }; | 143 | }; |
144 | button@2 { | 144 | button@2 { |
145 | label = "Reset"; | 145 | label = "Reset"; |
146 | linux,code = <0x198>; | 146 | linux,code = <KEY_RESTART>; |
147 | gpios = <&gpio0 12 1>; | 147 | gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; |
148 | debounce-interval = <100>; | 148 | debounce-interval = <100>; |
149 | }; | 149 | }; |
150 | }; | 150 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts index d15395d671ed..589000631b5a 100644 --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts | |||
@@ -127,20 +127,20 @@ | |||
127 | 127 | ||
128 | power_led { | 128 | power_led { |
129 | label = "status:white:power_led"; | 129 | label = "status:white:power_led"; |
130 | gpios = <&gpio0 16 0>; | 130 | gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
131 | linux,default-trigger = "default-on"; | 131 | default-state = "keep"; |
132 | }; | 132 | }; |
133 | rebuild_led { | 133 | rebuild_led { |
134 | label = "status:white:rebuild_led"; | 134 | label = "status:white:rebuild_led"; |
135 | gpios = <&gpio1 4 0>; | 135 | gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; |
136 | }; | 136 | }; |
137 | health_led { | 137 | health_led { |
138 | label = "status:red:health_led"; | 138 | label = "status:red:health_led"; |
139 | gpios = <&gpio1 5 0>; | 139 | gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; |
140 | }; | 140 | }; |
141 | backup_led { | 141 | backup_led { |
142 | label = "status:blue:backup_led"; | 142 | label = "status:blue:backup_led"; |
143 | gpios = <&gpio0 15 0>; | 143 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
144 | }; | 144 | }; |
145 | }; | 145 | }; |
146 | gpio-keys { | 146 | gpio-keys { |
@@ -154,18 +154,18 @@ | |||
154 | 154 | ||
155 | Power { | 155 | Power { |
156 | label = "Power Button"; | 156 | label = "Power Button"; |
157 | linux,code = <116>; | 157 | linux,code = <KEY_POWER>; |
158 | gpios = <&gpio0 14 1>; | 158 | gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; |
159 | }; | 159 | }; |
160 | Reset { | 160 | Reset { |
161 | label = "Reset Button"; | 161 | label = "Reset Button"; |
162 | linux,code = <0x198>; | 162 | linux,code = <KEY_RESTART>; |
163 | gpios = <&gpio0 12 1>; | 163 | gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; |
164 | }; | 164 | }; |
165 | OTB { | 165 | OTB { |
166 | label = "OTB Button"; | 166 | label = "OTB Button"; |
167 | linux,code = <133>; | 167 | linux,code = <KEY_COPY>; |
168 | gpios = <&gpio1 3 1>; | 168 | gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; |
169 | }; | 169 | }; |
170 | }; | 170 | }; |
171 | }; | 171 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts index cd44f37e54b5..5b5808ebc6e0 100644 --- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts +++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts | |||
@@ -38,8 +38,8 @@ | |||
38 | 38 | ||
39 | i2c@0 { | 39 | i2c@0 { |
40 | compatible = "i2c-gpio"; | 40 | compatible = "i2c-gpio"; |
41 | gpios = < &gpio0 8 0 /* sda */ | 41 | gpios = < &gpio0 8 GPIO_ACTIVE_HIGH /* sda */ |
42 | &gpio0 9 0 >; /* scl */ | 42 | &gpio0 9 GPIO_ACTIVE_HIGH>; /* scl */ |
43 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ | 43 | i2c-gpio,delay-us = <2>; /* ~100 kHz */ |
44 | }; | 44 | }; |
45 | }; | 45 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 4e8f9e42c592..fc1cd3b7b968 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi | |||
@@ -108,20 +108,20 @@ | |||
108 | 108 | ||
109 | button@1 { | 109 | button@1 { |
110 | label = "Function Button"; | 110 | label = "Function Button"; |
111 | linux,code = <357>; | 111 | linux,code = <KEY_OPTION>; |
112 | gpios = <&gpio1 9 1>; | 112 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
113 | }; | 113 | }; |
114 | button@2 { | 114 | button@2 { |
115 | label = "Power-on Switch"; | 115 | label = "Power-on Switch"; |
116 | linux,code = <0>; | 116 | linux,code = <KEY_RESERVED>; |
117 | linux,input-type = <5>; | 117 | linux,input-type = <5>; |
118 | gpios = <&gpio1 10 1>; | 118 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; |
119 | }; | 119 | }; |
120 | button@3 { | 120 | button@3 { |
121 | label = "Power-auto Switch"; | 121 | label = "Power-auto Switch"; |
122 | linux,code = <1>; | 122 | linux,code = <KEY_ESC>; |
123 | linux,input-type = <5>; | 123 | linux,input-type = <5>; |
124 | gpios = <&gpio1 11 1>; | 124 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; |
125 | }; | 125 | }; |
126 | }; | 126 | }; |
127 | 127 | ||
@@ -134,28 +134,28 @@ | |||
134 | 134 | ||
135 | led@1 { | 135 | led@1 { |
136 | label = "lsxl:blue:func"; | 136 | label = "lsxl:blue:func"; |
137 | gpios = <&gpio1 4 1>; | 137 | gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
138 | }; | 138 | }; |
139 | 139 | ||
140 | led@2 { | 140 | led@2 { |
141 | label = "lsxl:red:alarm"; | 141 | label = "lsxl:red:alarm"; |
142 | gpios = <&gpio1 5 1>; | 142 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | led@3 { | 145 | led@3 { |
146 | label = "lsxl:amber:info"; | 146 | label = "lsxl:amber:info"; |
147 | gpios = <&gpio1 6 1>; | 147 | gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | led@4 { | 150 | led@4 { |
151 | label = "lsxl:blue:power"; | 151 | label = "lsxl:blue:power"; |
152 | gpios = <&gpio1 7 1>; | 152 | gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; |
153 | linux,default-trigger = "default-on"; | 153 | default-state = "keep"; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | led@5 { | 156 | led@5 { |
157 | label = "lsxl:red:func"; | 157 | label = "lsxl:red:func"; |
158 | gpios = <&gpio1 16 1>; | 158 | gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; |
159 | }; | 159 | }; |
160 | }; | 160 | }; |
161 | 161 | ||
@@ -163,13 +163,13 @@ | |||
163 | compatible = "gpio-fan"; | 163 | compatible = "gpio-fan"; |
164 | pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>; | 164 | pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>; |
165 | pinctrl-names = "default"; | 165 | pinctrl-names = "default"; |
166 | gpios = <&gpio0 19 1 | 166 | gpios = <&gpio0 19 GPIO_ACTIVE_LOW |
167 | &gpio0 18 1>; | 167 | &gpio0 18 GPIO_ACTIVE_LOW>; |
168 | gpio-fan,speed-map = <0 3 | 168 | gpio-fan,speed-map = <0 3 |
169 | 1500 2 | 169 | 1500 2 |
170 | 3250 1 | 170 | 3250 1 |
171 | 5000 0>; | 171 | 5000 0>; |
172 | alarm-gpios = <&gpio1 8 0>; | 172 | alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; |
173 | }; | 173 | }; |
174 | 174 | ||
175 | restart_poweroff { | 175 | restart_poweroff { |
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts index 6c1ec2786e6e..c20607cd7d7c 100644 --- a/arch/arm/boot/dts/kirkwood-mplcec4.dts +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts | |||
@@ -110,7 +110,7 @@ | |||
110 | pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; | 110 | pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; |
111 | pinctrl-names = "default"; | 111 | pinctrl-names = "default"; |
112 | status = "okay"; | 112 | status = "okay"; |
113 | cd-gpios = <&gpio1 15 1>; | 113 | cd-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
114 | /* No WP GPIO */ | 114 | /* No WP GPIO */ |
115 | }; | 115 | }; |
116 | }; | 116 | }; |
@@ -126,36 +126,36 @@ | |||
126 | 126 | ||
127 | health { | 127 | health { |
128 | label = "status:green:health"; | 128 | label = "status:green:health"; |
129 | gpios = <&gpio0 7 1>; | 129 | gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | user1o { | 132 | user1o { |
133 | label = "user1:orange"; | 133 | label = "user1:orange"; |
134 | gpios = <&gpio1 8 1>; | 134 | gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; |
135 | default-state = "on"; | 135 | default-state = "on"; |
136 | }; | 136 | }; |
137 | 137 | ||
138 | user1g { | 138 | user1g { |
139 | label = "user1:green"; | 139 | label = "user1:green"; |
140 | gpios = <&gpio1 9 1>; | 140 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
141 | default-state = "on"; | 141 | default-state = "on"; |
142 | }; | 142 | }; |
143 | 143 | ||
144 | user0o { | 144 | user0o { |
145 | label = "user0:orange"; | 145 | label = "user0:orange"; |
146 | gpios = <&gpio1 12 1>; | 146 | gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; |
147 | default-state = "on"; | 147 | default-state = "on"; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | user0g { | 150 | user0g { |
151 | label = "user0:green"; | 151 | label = "user0:green"; |
152 | gpios = <&gpio1 13 1>; | 152 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; |
153 | default-state = "on"; | 153 | default-state = "on"; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | misc { | 156 | misc { |
157 | label = "status:orange:misc"; | 157 | label = "status:orange:misc"; |
158 | gpios = <&gpio1 14 1>; | 158 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; |
159 | default-state = "on"; | 159 | default-state = "on"; |
160 | }; | 160 | }; |
161 | 161 | ||
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts index 6317e1d088b3..dc86429756d7 100644 --- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts +++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | |||
@@ -90,17 +90,17 @@ | |||
90 | 90 | ||
91 | green-status { | 91 | green-status { |
92 | label = "gtw:green:Status"; | 92 | label = "gtw:green:Status"; |
93 | gpios = <&gpio0 20 0>; | 93 | gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; |
94 | }; | 94 | }; |
95 | 95 | ||
96 | red-status { | 96 | red-status { |
97 | label = "gtw:red:Status"; | 97 | label = "gtw:red:Status"; |
98 | gpios = <&gpio0 21 0>; | 98 | gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | green-usb { | 101 | green-usb { |
102 | label = "gtw:green:USB"; | 102 | label = "gtw:green:USB"; |
103 | gpios = <&gpio0 12 0>; | 103 | gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
104 | }; | 104 | }; |
105 | }; | 105 | }; |
106 | 106 | ||
@@ -113,13 +113,13 @@ | |||
113 | 113 | ||
114 | button@1 { | 114 | button@1 { |
115 | label = "SWR Button"; | 115 | label = "SWR Button"; |
116 | linux,code = <0x198>; /* KEY_RESTART */ | 116 | linux,code = <KEY_RESTART>; |
117 | gpios = <&gpio1 15 1>; | 117 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
118 | }; | 118 | }; |
119 | button@2 { | 119 | button@2 { |
120 | label = "WPS Button"; | 120 | label = "WPS Button"; |
121 | linux,code = <0x211>; /* KEY_WPS_BUTTON */ | 121 | linux,code = <KEY_WPS_BUTTON>; |
122 | gpios = <&gpio1 14 1>; | 122 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; |
123 | }; | 123 | }; |
124 | }; | 124 | }; |
125 | }; | 125 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts index e6a102cf424c..4d2a8db9ab77 100644 --- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | |||
@@ -1,3 +1,14 @@ | |||
1 | /* | ||
2 | * Device Tree file for NETGEAR ReadyNAS Duo v2 | ||
3 | * | ||
4 | * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
1 | /dts-v1/; | 12 | /dts-v1/; |
2 | 13 | ||
3 | #include "kirkwood.dtsi" | 14 | #include "kirkwood.dtsi" |
@@ -32,41 +43,50 @@ | |||
32 | marvell,pins = "mpp47"; | 43 | marvell,pins = "mpp47"; |
33 | marvell,function = "gpio"; | 44 | marvell,function = "gpio"; |
34 | }; | 45 | }; |
46 | |||
35 | pmx_button_backup: pmx-button-backup { | 47 | pmx_button_backup: pmx-button-backup { |
36 | marvell,pins = "mpp45"; | 48 | marvell,pins = "mpp45"; |
37 | marvell,function = "gpio"; | 49 | marvell,function = "gpio"; |
38 | }; | 50 | }; |
51 | |||
39 | pmx_button_reset: pmx-button-reset { | 52 | pmx_button_reset: pmx-button-reset { |
40 | marvell,pins = "mpp13"; | 53 | marvell,pins = "mpp13"; |
41 | marvell,function = "gpio"; | 54 | marvell,function = "gpio"; |
42 | }; | 55 | }; |
56 | |||
43 | pmx_led_blue_power: pmx-led-blue-power { | 57 | pmx_led_blue_power: pmx-led-blue-power { |
44 | marvell,pins = "mpp31"; | 58 | marvell,pins = "mpp31"; |
45 | marvell,function = "gpio"; | 59 | marvell,function = "gpio"; |
46 | }; | 60 | }; |
61 | |||
47 | pmx_led_blue_activity: pmx-led-blue-activity { | 62 | pmx_led_blue_activity: pmx-led-blue-activity { |
48 | marvell,pins = "mpp38"; | 63 | marvell,pins = "mpp38"; |
49 | marvell,function = "gpio"; | 64 | marvell,function = "gpio"; |
50 | }; | 65 | }; |
66 | |||
51 | pmx_led_blue_disk1: pmx-led-blue-disk1 { | 67 | pmx_led_blue_disk1: pmx-led-blue-disk1 { |
52 | marvell,pins = "mpp23"; | 68 | marvell,pins = "mpp23"; |
53 | marvell,function = "gpio"; | 69 | marvell,function = "gpio"; |
54 | }; | 70 | }; |
71 | |||
55 | pmx_led_blue_disk2: pmx-led-blue-disk2 { | 72 | pmx_led_blue_disk2: pmx-led-blue-disk2 { |
56 | marvell,pins = "mpp22"; | 73 | marvell,pins = "mpp22"; |
57 | marvell,function = "gpio"; | 74 | marvell,function = "gpio"; |
58 | }; | 75 | }; |
76 | |||
59 | pmx_led_blue_backup: pmx-led-blue-backup { | 77 | pmx_led_blue_backup: pmx-led-blue-backup { |
60 | marvell,pins = "mpp29"; | 78 | marvell,pins = "mpp29"; |
61 | marvell,function = "gpio"; | 79 | marvell,function = "gpio"; |
62 | }; | 80 | }; |
81 | |||
82 | pmx_poweroff: pmx-poweroff { | ||
83 | marvell,pins = "mpp30"; | ||
84 | marvell,function = "gpio"; | ||
85 | }; | ||
63 | }; | 86 | }; |
64 | 87 | ||
65 | clocks { | 88 | clocks { |
66 | #address-cells = <1>; | 89 | g762_clk: g762-oscillator { |
67 | #size-cells = <0>; | ||
68 | |||
69 | g762_clk: fixedclk { | ||
70 | compatible = "fixed-clock"; | 90 | compatible = "fixed-clock"; |
71 | #clock-cells = <0>; | 91 | #clock-cells = <0>; |
72 | clock-frequency = <8192>; | 92 | clock-frequency = <8192>; |
@@ -112,69 +132,80 @@ | |||
112 | 132 | ||
113 | power_led { | 133 | power_led { |
114 | label = "status:blue:power_led"; | 134 | label = "status:blue:power_led"; |
115 | gpios = <&gpio0 31 1>; /* GPIO 31 Active Low */ | 135 | gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; |
116 | linux,default-trigger = "default-on"; | 136 | default-state = "keep"; |
117 | }; | 137 | }; |
138 | |||
118 | activity_led { | 139 | activity_led { |
119 | label = "status:blue:activity_led"; | 140 | label = "status:blue:activity_led"; |
120 | gpios = <&gpio1 6 1>; /* GPIO 38 Active Low */ | 141 | gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; |
121 | }; | 142 | }; |
143 | |||
122 | disk1_led { | 144 | disk1_led { |
123 | label = "status:blue:disk1_led"; | 145 | label = "status:blue:disk1_led"; |
124 | gpios = <&gpio0 23 1>; /* GPIO 23 Active Low */ | 146 | gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; |
125 | }; | 147 | }; |
148 | |||
126 | disk2_led { | 149 | disk2_led { |
127 | label = "status:blue:disk2_led"; | 150 | label = "status:blue:disk2_led"; |
128 | gpios = <&gpio0 22 1>; /* GPIO 22 Active Low */ | 151 | gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; |
129 | }; | 152 | }; |
153 | |||
130 | backup_led { | 154 | backup_led { |
131 | label = "status:blue:backup_led"; | 155 | label = "status:blue:backup_led"; |
132 | gpios = <&gpio0 29 1>; /* GPIO 29 Active Low*/ | 156 | gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; |
133 | }; | 157 | }; |
134 | }; | 158 | }; |
135 | 159 | ||
136 | gpio_keys { | 160 | gpio-keys { |
137 | compatible = "gpio-keys"; | 161 | compatible = "gpio-keys"; |
138 | #address-cells = <1>; | ||
139 | #size-cells = <0>; | ||
140 | pinctrl-0 = <&pmx_button_power &pmx_button_backup | 162 | pinctrl-0 = <&pmx_button_power &pmx_button_backup |
141 | &pmx_button_reset>; | 163 | &pmx_button_reset>; |
142 | pinctrl-names = "default"; | 164 | pinctrl-names = "default"; |
143 | 165 | ||
144 | button@1 { | 166 | power-button { |
145 | label = "Power Button"; | 167 | label = "Power Button"; |
146 | linux,code = <116>; /* KEY_POWER */ | 168 | linux,code = <KEY_POWER>; |
147 | gpios = <&gpio1 15 1>; | 169 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
148 | }; | 170 | }; |
149 | button@2 { | 171 | |
172 | reset-button { | ||
150 | label = "Reset Button"; | 173 | label = "Reset Button"; |
151 | linux,code = <0x198>; /* KEY_RESTART */ | 174 | linux,code = <KEY_RESTART>; |
152 | gpios = <&gpio0 13 1>; | 175 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
153 | }; | 176 | }; |
154 | button@3 { | 177 | |
178 | backup-button { | ||
155 | label = "Backup Button"; | 179 | label = "Backup Button"; |
156 | linux,code = <133>; /* KEY_COPY */ | 180 | linux,code = <KEY_COPY>; |
157 | gpios = <&gpio1 13 1>; | 181 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; |
158 | }; | 182 | }; |
159 | }; | 183 | }; |
160 | 184 | ||
161 | regulators { | 185 | gpio-poweroff { |
162 | compatible = "simple-bus"; | 186 | compatible = "gpio-poweroff"; |
163 | #address-cells = <1>; | 187 | pinctrl-0 = <&pmx_poweroff>; |
164 | #size-cells = <0>; | 188 | pinctrl-names = "default"; |
165 | 189 | gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; | |
166 | usb_power: regulator@1 { | 190 | }; |
167 | compatible = "regulator-fixed"; | 191 | |
168 | reg = <1>; | 192 | regulators { |
169 | regulator-name = "USB 3.0 Power"; | 193 | compatible = "simple-bus"; |
170 | regulator-min-microvolt = <5000000>; | 194 | #address-cells = <1>; |
171 | regulator-max-microvolt = <5000000>; | 195 | #size-cells = <0>; |
172 | enable-active-high; | 196 | |
173 | regulator-always-on; | 197 | usb3_regulator: usb3-regulator { |
174 | regulator-boot-on; | 198 | compatible = "regulator-fixed"; |
175 | gpio = <&gpio1 14 0>; | 199 | reg = <1>; |
176 | }; | 200 | regulator-name = "USB 3.0 Power"; |
177 | }; | 201 | regulator-min-microvolt = <5000000>; |
202 | regulator-max-microvolt = <5000000>; | ||
203 | enable-active-high; | ||
204 | regulator-always-on; | ||
205 | regulator-boot-on; | ||
206 | gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; | ||
207 | }; | ||
208 | }; | ||
178 | }; | 209 | }; |
179 | 210 | ||
180 | &nand { | 211 | &nand { |
@@ -210,7 +241,7 @@ | |||
210 | &mdio { | 241 | &mdio { |
211 | status = "okay"; | 242 | status = "okay"; |
212 | 243 | ||
213 | ethphy0: ethernet-phy@0 { | 244 | ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */ |
214 | device_type = "ethernet-phy"; | 245 | device_type = "ethernet-phy"; |
215 | reg = <0>; | 246 | reg = <0>; |
216 | }; | 247 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts new file mode 100644 index 000000000000..7c8a0d9d8d1f --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dts | |||
@@ -0,0 +1,268 @@ | |||
1 | /* | ||
2 | * Device Tree file for NETGEAR ReadyNAS NV+ v2 | ||
3 | * | ||
4 | * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | |||
14 | #include "kirkwood.dtsi" | ||
15 | #include "kirkwood-6282.dtsi" | ||
16 | |||
17 | / { | ||
18 | model = "NETGEAR ReadyNAS NV+ v2"; | ||
19 | compatible = "netgear,readynas-nv+-v2", "netgear,readynas", "marvell,kirkwood-88f6282", "marvell,kirkwood"; | ||
20 | |||
21 | memory { /* 256 MB */ | ||
22 | device_type = "memory"; | ||
23 | reg = <0x00000000 0x10000000>; | ||
24 | }; | ||
25 | |||
26 | chosen { | ||
27 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | ||
28 | }; | ||
29 | |||
30 | mbus { | ||
31 | pcie-controller { | ||
32 | status = "okay"; | ||
33 | |||
34 | /* Connected to NEC uPD720200 USB 3.0 controller */ | ||
35 | pcie@1,0 { | ||
36 | /* Port 0, Lane 0 */ | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | ocp@f1000000 { | ||
43 | pinctrl: pinctrl@10000 { | ||
44 | pmx_button_power: pmx-button-power { | ||
45 | marvell,pins = "mpp47"; | ||
46 | marvell,function = "gpio"; | ||
47 | }; | ||
48 | |||
49 | pmx_button_backup: pmx-button-backup { | ||
50 | marvell,pins = "mpp45"; | ||
51 | marvell,function = "gpio"; | ||
52 | }; | ||
53 | |||
54 | pmx_button_reset: pmx-button-reset { | ||
55 | marvell,pins = "mpp13"; | ||
56 | marvell,function = "gpio"; | ||
57 | }; | ||
58 | |||
59 | pmx_led_blue_power: pmx-led-blue-power { | ||
60 | marvell,pins = "mpp31"; | ||
61 | marvell,function = "gpio"; | ||
62 | }; | ||
63 | |||
64 | pmx_led_blue_backup: pmx-led-blue-backup { | ||
65 | marvell,pins = "mpp22"; | ||
66 | marvell,function = "gpio"; | ||
67 | }; | ||
68 | |||
69 | pmx_led_blue_disk1: pmx-led-blue-disk1 { | ||
70 | marvell,pins = "mpp20"; | ||
71 | marvell,function = "gpio"; | ||
72 | }; | ||
73 | |||
74 | pmx_led_blue_disk2: pmx-led-blue-disk2 { | ||
75 | marvell,pins = "mpp23"; | ||
76 | marvell,function = "gpio"; | ||
77 | }; | ||
78 | |||
79 | pmx_led_blue_disk3: pmx-led-blue-disk3 { | ||
80 | marvell,pins = "mpp24"; | ||
81 | marvell,function = "gpio"; | ||
82 | }; | ||
83 | |||
84 | pmx_led_blue_disk4: pmx-led-blue-disk4 { | ||
85 | marvell,pins = "mpp29"; | ||
86 | marvell,function = "gpio"; | ||
87 | }; | ||
88 | |||
89 | pmx_poweroff: pmx-poweroff { | ||
90 | marvell,pins = "mpp30"; | ||
91 | marvell,function = "gpio"; | ||
92 | }; | ||
93 | }; | ||
94 | |||
95 | clocks { | ||
96 | g762_clk: g762-oscillator { | ||
97 | compatible = "fixed-clock"; | ||
98 | #clock-cells = <0>; | ||
99 | clock-frequency = <8192>; | ||
100 | }; | ||
101 | }; | ||
102 | |||
103 | i2c@11000 { | ||
104 | status = "okay"; | ||
105 | |||
106 | rs5c372a: rs5c372a@32 { | ||
107 | compatible = "ricoh,rs5c372a"; | ||
108 | reg = <0x32>; | ||
109 | }; | ||
110 | |||
111 | g762: g762@3e { | ||
112 | compatible = "gmt,g762"; | ||
113 | reg = <0x3e>; | ||
114 | clocks = <&g762_clk>; /* input clock */ | ||
115 | fan_gear_mode = <0>; | ||
116 | fan_startv = <1>; | ||
117 | pwm_polarity = <0>; | ||
118 | }; | ||
119 | }; | ||
120 | |||
121 | serial@12000 { | ||
122 | pinctrl-0 = <&pmx_uart0>; | ||
123 | pinctrl-names = "default"; | ||
124 | status = "okay"; | ||
125 | }; | ||
126 | |||
127 | sata@80000 { /* Connected to Marvell 88SM4140 SATA port multiplier */ | ||
128 | status = "okay"; | ||
129 | nr-ports = <1>; | ||
130 | }; | ||
131 | }; | ||
132 | |||
133 | gpio-leds { | ||
134 | compatible = "gpio-leds"; | ||
135 | pinctrl-0 = < &pmx_led_blue_power &pmx_led_blue_backup | ||
136 | &pmx_led_blue_disk1 &pmx_led_blue_disk2 | ||
137 | &pmx_led_blue_disk3 &pmx_led_blue_disk3 >; | ||
138 | pinctrl-names = "default"; | ||
139 | |||
140 | power_led { | ||
141 | label = "status:blue:power_led"; | ||
142 | gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; | ||
143 | linux,default-trigger = "default-on"; | ||
144 | }; | ||
145 | |||
146 | backup_led { | ||
147 | label = "status:blue:backup_led"; | ||
148 | gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; | ||
149 | }; | ||
150 | |||
151 | disk1_led { | ||
152 | label = "status:blue:disk1_led"; | ||
153 | gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; | ||
154 | }; | ||
155 | |||
156 | disk2_led { | ||
157 | label = "status:blue:disk2_led"; | ||
158 | gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; | ||
159 | }; | ||
160 | |||
161 | disk3_led { | ||
162 | label = "status:blue:disk3_led"; | ||
163 | gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; | ||
164 | }; | ||
165 | |||
166 | disk4_led { | ||
167 | label = "status:blue:disk4_led"; | ||
168 | gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; | ||
169 | }; | ||
170 | }; | ||
171 | |||
172 | gpio-keys { | ||
173 | compatible = "gpio-keys"; | ||
174 | pinctrl-0 = <&pmx_button_power &pmx_button_backup | ||
175 | &pmx_button_reset>; | ||
176 | pinctrl-names = "default"; | ||
177 | |||
178 | power-button { | ||
179 | label = "Power Button"; | ||
180 | linux,code = <KEY_POWER>; | ||
181 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; | ||
182 | }; | ||
183 | |||
184 | reset-button { | ||
185 | label = "Reset Button"; | ||
186 | linux,code = <KEY_RESTART>; | ||
187 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; | ||
188 | }; | ||
189 | |||
190 | backup-button { | ||
191 | label = "Backup Button"; | ||
192 | linux,code = <KEY_COPY>; | ||
193 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; | ||
194 | }; | ||
195 | }; | ||
196 | |||
197 | gpio-poweroff { | ||
198 | compatible = "gpio-poweroff"; | ||
199 | pinctrl-0 = <&pmx_poweroff>; | ||
200 | pinctrl-names = "default"; | ||
201 | gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; | ||
202 | }; | ||
203 | |||
204 | regulators { | ||
205 | compatible = "simple-bus"; | ||
206 | #address-cells = <1>; | ||
207 | #size-cells = <0>; | ||
208 | |||
209 | usb3_regulator: usb3-regulator { | ||
210 | compatible = "regulator-fixed"; | ||
211 | reg = <1>; | ||
212 | regulator-name = "USB 3.0 Power"; | ||
213 | regulator-min-microvolt = <5000000>; | ||
214 | regulator-max-microvolt = <5000000>; | ||
215 | enable-active-high; | ||
216 | regulator-always-on; | ||
217 | regulator-boot-on; | ||
218 | gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; | ||
219 | }; | ||
220 | }; | ||
221 | }; | ||
222 | |||
223 | &nand { | ||
224 | status = "okay"; | ||
225 | |||
226 | partition@0 { | ||
227 | label = "u-boot"; | ||
228 | reg = <0x0000000 0x180000>; | ||
229 | read-only; | ||
230 | }; | ||
231 | |||
232 | partition@180000 { | ||
233 | label = "u-boot-env"; | ||
234 | reg = <0x180000 0x20000>; | ||
235 | }; | ||
236 | |||
237 | partition@200000 { | ||
238 | label = "uImage"; | ||
239 | reg = <0x0200000 0x600000>; | ||
240 | }; | ||
241 | |||
242 | partition@800000 { | ||
243 | label = "minirootfs"; | ||
244 | reg = <0x0800000 0x1000000>; | ||
245 | }; | ||
246 | |||
247 | partition@1800000 { | ||
248 | label = "jffs2"; | ||
249 | reg = <0x1800000 0x6800000>; | ||
250 | }; | ||
251 | }; | ||
252 | |||
253 | &mdio { | ||
254 | status = "okay"; | ||
255 | |||
256 | ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */ | ||
257 | device_type = "ethernet-phy"; | ||
258 | reg = <0>; | ||
259 | }; | ||
260 | }; | ||
261 | |||
262 | ð0 { | ||
263 | status = "okay"; | ||
264 | |||
265 | ethernet0-port@0 { | ||
266 | phy-handle = <ðphy0>; | ||
267 | }; | ||
268 | }; | ||
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 2fcb82e20828..ae1ccbe41029 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | button@1 { | 65 | button@1 { |
66 | label = "Power push button"; | 66 | label = "Power push button"; |
67 | linux,code = <116>; | 67 | linux,code = <KEY_POWER>; |
68 | gpios = <&gpio1 0 0>; | 68 | gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; |
69 | }; | 69 | }; |
70 | }; | 70 | }; |
71 | 71 | ||
@@ -74,13 +74,13 @@ | |||
74 | 74 | ||
75 | red-fail { | 75 | red-fail { |
76 | label = "ns2:red:fail"; | 76 | label = "ns2:red:fail"; |
77 | gpios = <&gpio0 12 0>; | 77 | gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
78 | }; | 78 | }; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | gpio_poweroff { | 81 | gpio_poweroff { |
82 | compatible = "gpio-poweroff"; | 82 | compatible = "gpio-poweroff"; |
83 | gpios = <&gpio0 31 0>; | 83 | gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | }; | 86 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts index 279607093cdb..1f2ca60d8b3d 100644 --- a/arch/arm/boot/dts/kirkwood-ns2lite.dts +++ b/arch/arm/boot/dts/kirkwood-ns2lite.dts | |||
@@ -25,8 +25,8 @@ | |||
25 | 25 | ||
26 | blue-sata { | 26 | blue-sata { |
27 | label = "ns2:blue:sata"; | 27 | label = "ns2:blue:sata"; |
28 | gpios = <&gpio0 30 1>; | 28 | gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; |
29 | linux,default-trigger = "default-on"; | 29 | linux,default-trigger = "ide-disk"; |
30 | }; | 30 | }; |
31 | }; | 31 | }; |
32 | }; | 32 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts index defdc77fb550..72c78d0b1116 100644 --- a/arch/arm/boot/dts/kirkwood-ns2max.dts +++ b/arch/arm/boot/dts/kirkwood-ns2max.dts | |||
@@ -22,10 +22,10 @@ | |||
22 | 22 | ||
23 | gpio_fan { | 23 | gpio_fan { |
24 | compatible = "gpio-fan"; | 24 | compatible = "gpio-fan"; |
25 | gpios = <&gpio0 22 1 | 25 | gpios = <&gpio0 22 GPIO_ACTIVE_LOW |
26 | &gpio0 7 1 | 26 | &gpio0 7 GPIO_ACTIVE_LOW |
27 | &gpio1 1 1 | 27 | &gpio1 1 GPIO_ACTIVE_LOW |
28 | &gpio0 23 1>; | 28 | &gpio0 23 GPIO_ACTIVE_LOW>; |
29 | gpio-fan,speed-map = | 29 | gpio-fan,speed-map = |
30 | < 0 0 | 30 | < 0 0 |
31 | 1500 15 | 31 | 1500 15 |
@@ -36,7 +36,7 @@ | |||
36 | 3300 10 | 36 | 3300 10 |
37 | 4300 9 | 37 | 4300 9 |
38 | 5500 8>; | 38 | 5500 8>; |
39 | alarm-gpios = <&gpio0 25 1>; | 39 | alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | ns2-leds { | 42 | ns2-leds { |
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts index adbafdd90991..c441bf62c09f 100644 --- a/arch/arm/boot/dts/kirkwood-ns2mini.dts +++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts | |||
@@ -23,10 +23,10 @@ | |||
23 | 23 | ||
24 | gpio_fan { | 24 | gpio_fan { |
25 | compatible = "gpio-fan"; | 25 | compatible = "gpio-fan"; |
26 | gpios = <&gpio0 22 1 | 26 | gpios = <&gpio0 22 GPIO_ACTIVE_LOW |
27 | &gpio0 7 1 | 27 | &gpio0 7 GPIO_ACTIVE_LOW |
28 | &gpio1 1 1 | 28 | &gpio1 1 GPIO_ACTIVE_LOW |
29 | &gpio0 23 1>; | 29 | &gpio0 23 GPIO_ACTIVE_LOW>; |
30 | gpio-fan,speed-map = | 30 | gpio-fan,speed-map = |
31 | < 0 0 | 31 | < 0 0 |
32 | 3000 15 | 32 | 3000 15 |
@@ -37,7 +37,7 @@ | |||
37 | 7140 10 | 37 | 7140 10 |
38 | 7980 9 | 38 | 7980 9 |
39 | 9200 8>; | 39 | 9200 8>; |
40 | alarm-gpios = <&gpio0 25 1>; | 40 | alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | ns2-leds { | 43 | ns2-leds { |
diff --git a/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi b/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi index e3f915defd3d..aa78c2d11fe7 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi | |||
@@ -40,7 +40,7 @@ | |||
40 | compatible = "gpio-poweroff"; | 40 | compatible = "gpio-poweroff"; |
41 | pinctrl-0 = <&pmx_pwr_off>; | 41 | pinctrl-0 = <&pmx_pwr_off>; |
42 | pinctrl-names = "default"; | 42 | pinctrl-names = "default"; |
43 | gpios = <&gpio1 16 0>; | 43 | gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | regulators { | 46 | regulators { |
@@ -58,7 +58,7 @@ | |||
58 | regulator-max-microvolt = <5000000>; | 58 | regulator-max-microvolt = <5000000>; |
59 | regulator-always-on; | 59 | regulator-always-on; |
60 | regulator-boot-on; | 60 | regulator-boot-on; |
61 | gpio = <&gpio0 21 0>; | 61 | gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>; |
62 | }; | 62 | }; |
63 | }; | 63 | }; |
64 | }; | 64 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index b5418bcaecce..03fa24cf3344 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts | |||
@@ -119,18 +119,18 @@ | |||
119 | 119 | ||
120 | button@1 { | 120 | button@1 { |
121 | label = "Power Button"; | 121 | label = "Power Button"; |
122 | linux,code = <116>; | 122 | linux,code = <KEY_POWER>; |
123 | gpios = <&gpio1 14 0>; | 123 | gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; |
124 | }; | 124 | }; |
125 | button@2 { | 125 | button@2 { |
126 | label = "Copy Button"; | 126 | label = "Copy Button"; |
127 | linux,code = <133>; | 127 | linux,code = <KEY_COPY>; |
128 | gpios = <&gpio1 5 1>; | 128 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
129 | }; | 129 | }; |
130 | button@3 { | 130 | button@3 { |
131 | label = "Reset Button"; | 131 | label = "Reset Button"; |
132 | linux,code = <0x198>; | 132 | linux,code = <KEY_RESTART>; |
133 | gpios = <&gpio1 4 1>; | 133 | gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
134 | }; | 134 | }; |
135 | }; | 135 | }; |
136 | 136 | ||
@@ -145,43 +145,43 @@ | |||
145 | 145 | ||
146 | green-sys { | 146 | green-sys { |
147 | label = "nsa310:green:sys"; | 147 | label = "nsa310:green:sys"; |
148 | gpios = <&gpio0 28 0>; | 148 | gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; |
149 | }; | 149 | }; |
150 | red-sys { | 150 | red-sys { |
151 | label = "nsa310:red:sys"; | 151 | label = "nsa310:red:sys"; |
152 | gpios = <&gpio0 29 0>; | 152 | gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
153 | }; | 153 | }; |
154 | green-hdd { | 154 | green-hdd { |
155 | label = "nsa310:green:hdd"; | 155 | label = "nsa310:green:hdd"; |
156 | gpios = <&gpio1 9 0>; | 156 | gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; |
157 | }; | 157 | }; |
158 | red-hdd { | 158 | red-hdd { |
159 | label = "nsa310:red:hdd"; | 159 | label = "nsa310:red:hdd"; |
160 | gpios = <&gpio1 10 0>; | 160 | gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
161 | }; | 161 | }; |
162 | green-esata { | 162 | green-esata { |
163 | label = "nsa310:green:esata"; | 163 | label = "nsa310:green:esata"; |
164 | gpios = <&gpio0 12 0>; | 164 | gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
165 | }; | 165 | }; |
166 | red-esata { | 166 | red-esata { |
167 | label = "nsa310:red:esata"; | 167 | label = "nsa310:red:esata"; |
168 | gpios = <&gpio0 13 0>; | 168 | gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; |
169 | }; | 169 | }; |
170 | green-usb { | 170 | green-usb { |
171 | label = "nsa310:green:usb"; | 171 | label = "nsa310:green:usb"; |
172 | gpios = <&gpio0 15 0>; | 172 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
173 | }; | 173 | }; |
174 | red-usb { | 174 | red-usb { |
175 | label = "nsa310:red:usb"; | 175 | label = "nsa310:red:usb"; |
176 | gpios = <&gpio0 16 0>; | 176 | gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
177 | }; | 177 | }; |
178 | green-copy { | 178 | green-copy { |
179 | label = "nsa310:green:copy"; | 179 | label = "nsa310:green:copy"; |
180 | gpios = <&gpio1 7 0>; | 180 | gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; |
181 | }; | 181 | }; |
182 | red-copy { | 182 | red-copy { |
183 | label = "nsa310:red:copy"; | 183 | label = "nsa310:red:copy"; |
184 | gpios = <&gpio1 8 0>; | 184 | gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; |
185 | }; | 185 | }; |
186 | }; | 186 | }; |
187 | }; | 187 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-nsa310a.dts b/arch/arm/boot/dts/kirkwood-nsa310a.dts index ab0212b0e6f5..a5e779452867 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310a.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310a.dts | |||
@@ -107,18 +107,18 @@ | |||
107 | 107 | ||
108 | button@1 { | 108 | button@1 { |
109 | label = "Power Button"; | 109 | label = "Power Button"; |
110 | linux,code = <116>; | 110 | linux,code = <KEY_POWER>; |
111 | gpios = <&gpio1 14 0>; | 111 | gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; |
112 | }; | 112 | }; |
113 | button@2 { | 113 | button@2 { |
114 | label = "Copy Button"; | 114 | label = "Copy Button"; |
115 | linux,code = <133>; | 115 | linux,code = <KEY_COPY>; |
116 | gpios = <&gpio1 5 1>; | 116 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
117 | }; | 117 | }; |
118 | button@3 { | 118 | button@3 { |
119 | label = "Reset Button"; | 119 | label = "Reset Button"; |
120 | linux,code = <0x198>; | 120 | linux,code = <KEY_RESTART>; |
121 | gpios = <&gpio1 4 1>; | 121 | gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; |
122 | }; | 122 | }; |
123 | }; | 123 | }; |
124 | 124 | ||
@@ -127,39 +127,39 @@ | |||
127 | 127 | ||
128 | green-sys { | 128 | green-sys { |
129 | label = "nsa310:green:sys"; | 129 | label = "nsa310:green:sys"; |
130 | gpios = <&gpio0 28 0>; | 130 | gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; |
131 | }; | 131 | }; |
132 | red-sys { | 132 | red-sys { |
133 | label = "nsa310:red:sys"; | 133 | label = "nsa310:red:sys"; |
134 | gpios = <&gpio0 29 0>; | 134 | gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
135 | }; | 135 | }; |
136 | green-hdd { | 136 | green-hdd { |
137 | label = "nsa310:green:hdd"; | 137 | label = "nsa310:green:hdd"; |
138 | gpios = <&gpio1 9 0>; | 138 | gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; |
139 | }; | 139 | }; |
140 | red-hdd { | 140 | red-hdd { |
141 | label = "nsa310:red:hdd"; | 141 | label = "nsa310:red:hdd"; |
142 | gpios = <&gpio1 10 0>; | 142 | gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
143 | }; | 143 | }; |
144 | green-esata { | 144 | green-esata { |
145 | label = "nsa310:green:esata"; | 145 | label = "nsa310:green:esata"; |
146 | gpios = <&gpio0 12 0>; | 146 | gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
147 | }; | 147 | }; |
148 | red-esata { | 148 | red-esata { |
149 | label = "nsa310:red:esata"; | 149 | label = "nsa310:red:esata"; |
150 | gpios = <&gpio0 13 0>; | 150 | gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; |
151 | }; | 151 | }; |
152 | green-usb { | 152 | green-usb { |
153 | label = "nsa310:green:usb"; | 153 | label = "nsa310:green:usb"; |
154 | gpios = <&gpio0 15 0>; | 154 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
155 | }; | 155 | }; |
156 | green-copy { | 156 | green-copy { |
157 | label = "nsa310:green:copy"; | 157 | label = "nsa310:green:copy"; |
158 | gpios = <&gpio1 7 0>; | 158 | gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; |
159 | }; | 159 | }; |
160 | red-copy { | 160 | red-copy { |
161 | label = "nsa310:red:copy"; | 161 | label = "nsa310:red:copy"; |
162 | gpios = <&gpio1 8 0>; | 162 | gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; |
163 | }; | 163 | }; |
164 | }; | 164 | }; |
165 | }; | 165 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts index f0e3d213604c..5c6a4f1b4e93 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts | |||
@@ -101,17 +101,17 @@ | |||
101 | 101 | ||
102 | led-red { | 102 | led-red { |
103 | label = "obsa6:red:stat"; | 103 | label = "obsa6:red:stat"; |
104 | gpios = <&gpio1 9 1>; | 104 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | led-green { | 107 | led-green { |
108 | label = "obsa6:green:stat"; | 108 | label = "obsa6:green:stat"; |
109 | gpios = <&gpio1 10 1>; | 109 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; |
110 | }; | 110 | }; |
111 | 111 | ||
112 | led-yellow { | 112 | led-yellow { |
113 | label = "obsa6:yellow:stat"; | 113 | label = "obsa6:yellow:stat"; |
114 | gpios = <&gpio1 11 1>; | 114 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; |
115 | }; | 115 | }; |
116 | }; | 116 | }; |
117 | 117 | ||
@@ -124,8 +124,8 @@ | |||
124 | 124 | ||
125 | button@1 { | 125 | button@1 { |
126 | label = "Init Button"; | 126 | label = "Init Button"; |
127 | linux,code = <116>; | 127 | linux,code = <KEY_POWER>; |
128 | gpios = <&gpio1 6 0>; | 128 | gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; |
129 | }; | 129 | }; |
130 | }; | 130 | }; |
131 | }; | 131 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts index 851fb2a60f20..c054ef61cff5 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts | |||
@@ -126,17 +126,17 @@ | |||
126 | 126 | ||
127 | led-red { | 127 | led-red { |
128 | label = "obsa7:red:stat"; | 128 | label = "obsa7:red:stat"; |
129 | gpios = <&gpio1 9 1>; | 129 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | led-green { | 132 | led-green { |
133 | label = "obsa7:green:stat"; | 133 | label = "obsa7:green:stat"; |
134 | gpios = <&gpio1 10 1>; | 134 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; |
135 | }; | 135 | }; |
136 | 136 | ||
137 | led-yellow { | 137 | led-yellow { |
138 | label = "obsa7:yellow:stat"; | 138 | label = "obsa7:yellow:stat"; |
139 | gpios = <&gpio1 11 1>; | 139 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; |
140 | }; | 140 | }; |
141 | }; | 141 | }; |
142 | 142 | ||
@@ -149,8 +149,8 @@ | |||
149 | 149 | ||
150 | button@1 { | 150 | button@1 { |
151 | label = "Init Button"; | 151 | label = "Init Button"; |
152 | linux,code = <116>; | 152 | linux,code = <KEY_POWER>; |
153 | gpios = <&gpio1 6 0>; | 153 | gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; |
154 | }; | 154 | }; |
155 | }; | 155 | }; |
156 | }; | 156 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi index 1173d7fb31b2..7b1cd993e891 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * kirkwood-sheevaplug-common.dts - Common parts for Sheevaplugs | 2 | * kirkwood-sheevaplug-common.dtsi - Common parts for Sheevaplugs |
3 | * | 3 | * |
4 | * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com> | 4 | * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com> |
5 | * | 5 | * |
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts b/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts index eac6a21f3b1f..e2b4ea4f9e10 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts +++ b/arch/arm/boot/dts/kirkwood-sheevaplug-esata.dts | |||
@@ -24,8 +24,8 @@ | |||
24 | pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>; | 24 | pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>; |
25 | pinctrl-names = "default"; | 25 | pinctrl-names = "default"; |
26 | status = "okay"; | 26 | status = "okay"; |
27 | cd-gpios = <&gpio1 12 1>; | 27 | cd-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; |
28 | wp-gpios = <&gpio1 15 0>; | 28 | wp-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; |
29 | }; | 29 | }; |
30 | }; | 30 | }; |
31 | 31 | ||
@@ -36,8 +36,8 @@ | |||
36 | 36 | ||
37 | health { | 37 | health { |
38 | label = "sheevaplug:blue:health"; | 38 | label = "sheevaplug:blue:health"; |
39 | gpios = <&gpio1 17 1>; | 39 | gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; |
40 | linux,default-trigger = "default-on"; | 40 | default-state = "keep"; |
41 | }; | 41 | }; |
42 | }; | 42 | }; |
43 | }; | 43 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-sheevaplug.dts b/arch/arm/boot/dts/kirkwood-sheevaplug.dts index bb61918313db..82f6abf120fd 100644 --- a/arch/arm/boot/dts/kirkwood-sheevaplug.dts +++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * kirkwood-sheevaplug-esata.dts - Device tree file for Sheevaplug | 2 | * kirkwood-sheevaplug.dts - Device tree file for Sheevaplug |
3 | * | 3 | * |
4 | * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com> | 4 | * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com> |
5 | * | 5 | * |
@@ -31,13 +31,13 @@ | |||
31 | 31 | ||
32 | health { | 32 | health { |
33 | label = "sheevaplug:blue:health"; | 33 | label = "sheevaplug:blue:health"; |
34 | gpios = <&gpio1 17 1>; | 34 | gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; |
35 | linux,default-trigger = "default-on"; | 35 | default-state = "keep"; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | misc { | 38 | misc { |
39 | label = "sheevaplug:red:misc"; | 39 | label = "sheevaplug:red:misc"; |
40 | gpios = <&gpio1 14 1>; | 40 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; |
41 | }; | 41 | }; |
42 | }; | 42 | }; |
43 | }; | 43 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index 320da677b984..40d6adf678ca 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts | |||
@@ -131,25 +131,25 @@ | |||
131 | 131 | ||
132 | disk { | 132 | disk { |
133 | label = "topkick:yellow:disk"; | 133 | label = "topkick:yellow:disk"; |
134 | gpios = <&gpio0 21 1>; | 134 | gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; |
135 | linux,default-trigger = "ide-disk"; | 135 | linux,default-trigger = "ide-disk"; |
136 | }; | 136 | }; |
137 | system2 { | 137 | system2 { |
138 | label = "topkick:red:system"; | 138 | label = "topkick:red:system"; |
139 | gpios = <&gpio1 5 1>; | 139 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
140 | }; | 140 | }; |
141 | system { | 141 | system { |
142 | label = "topkick:blue:system"; | 142 | label = "topkick:blue:system"; |
143 | gpios = <&gpio1 6 1>; | 143 | gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; |
144 | default-state = "on"; | 144 | default-state = "on"; |
145 | }; | 145 | }; |
146 | wifi { | 146 | wifi { |
147 | label = "topkick:green:wifi"; | 147 | label = "topkick:green:wifi"; |
148 | gpios = <&gpio1 7 1>; | 148 | gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; |
149 | }; | 149 | }; |
150 | wifi2 { | 150 | wifi2 { |
151 | label = "topkick:yellow:wifi"; | 151 | label = "topkick:yellow:wifi"; |
152 | gpios = <&gpio1 16 1>; | 152 | gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; |
153 | }; | 153 | }; |
154 | }; | 154 | }; |
155 | regulators { | 155 | regulators { |
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts index f755bc1dc604..c17ae45e19be 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts | |||
@@ -41,13 +41,13 @@ | |||
41 | 41 | ||
42 | button@1 { | 42 | button@1 { |
43 | label = "USB Copy"; | 43 | label = "USB Copy"; |
44 | linux,code = <133>; | 44 | linux,code = <KEY_COPY>; |
45 | gpios = <&gpio0 15 1>; | 45 | gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; |
46 | }; | 46 | }; |
47 | button@2 { | 47 | button@2 { |
48 | label = "Reset"; | 48 | label = "Reset"; |
49 | linux,code = <0x198>; | 49 | linux,code = <KEY_RESTART>; |
50 | gpios = <&gpio0 16 1>; | 50 | gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; |
51 | }; | 51 | }; |
52 | }; | 52 | }; |
53 | }; | 53 | }; |
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts index 345562f75891..0713d072758a 100644 --- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts +++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts | |||
@@ -51,13 +51,13 @@ | |||
51 | 51 | ||
52 | button@1 { | 52 | button@1 { |
53 | label = "USB Copy"; | 53 | label = "USB Copy"; |
54 | linux,code = <133>; | 54 | linux,code = <KEY_COPY>; |
55 | gpios = <&gpio1 11 1>; | 55 | gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; |
56 | }; | 56 | }; |
57 | button@2 { | 57 | button@2 { |
58 | label = "Reset"; | 58 | label = "Reset"; |
59 | linux,code = <0x198>; | 59 | linux,code = <KEY_RESTART>; |
60 | gpios = <&gpio1 5 1>; | 60 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
61 | }; | 61 | }; |
62 | }; | 62 | }; |
63 | }; | 63 | }; |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 8b73c80f1dad..1da94c187085 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -1,4 +1,6 @@ | |||
1 | /include/ "skeleton.dtsi" | 1 | /include/ "skeleton.dtsi" |
2 | #include <dt-bindings/input/input.h> | ||
3 | #include <dt-bindings/gpio/gpio.h> | ||
2 | 4 | ||
3 | #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) | 5 | #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) |
4 | 6 | ||
@@ -68,39 +70,21 @@ | |||
68 | #address-cells = <1>; | 70 | #address-cells = <1>; |
69 | #size-cells = <1>; | 71 | #size-cells = <1>; |
70 | 72 | ||
71 | mbusc: mbus-controller@20000 { | ||
72 | compatible = "marvell,mbus-controller"; | ||
73 | reg = <0x20000 0x80>, <0x1500 0x20>; | ||
74 | }; | ||
75 | |||
76 | timer: timer@20300 { | ||
77 | compatible = "marvell,orion-timer"; | ||
78 | reg = <0x20300 0x20>; | ||
79 | interrupt-parent = <&bridge_intc>; | ||
80 | interrupts = <1>, <2>; | ||
81 | clocks = <&core_clk 0>; | ||
82 | }; | ||
83 | |||
84 | intc: main-interrupt-ctrl@20200 { | ||
85 | compatible = "marvell,orion-intc"; | ||
86 | interrupt-controller; | ||
87 | #interrupt-cells = <1>; | ||
88 | reg = <0x20200 0x10>, <0x20210 0x10>; | ||
89 | }; | ||
90 | |||
91 | bridge_intc: bridge-interrupt-ctrl@20110 { | ||
92 | compatible = "marvell,orion-bridge-intc"; | ||
93 | interrupt-controller; | ||
94 | #interrupt-cells = <1>; | ||
95 | reg = <0x20110 0x8>; | ||
96 | interrupts = <1>; | ||
97 | marvell,#interrupts = <6>; | ||
98 | }; | ||
99 | |||
100 | core_clk: core-clocks@10030 { | 73 | core_clk: core-clocks@10030 { |
101 | compatible = "marvell,kirkwood-core-clock"; | 74 | compatible = "marvell,kirkwood-core-clock"; |
102 | reg = <0x10030 0x4>; | 75 | reg = <0x10030 0x4>; |
103 | #clock-cells = <1>; | 76 | #clock-cells = <1>; |
77 | }; | ||
78 | |||
79 | spi@10600 { | ||
80 | compatible = "marvell,orion-spi"; | ||
81 | #address-cells = <1>; | ||
82 | #size-cells = <0>; | ||
83 | cell-index = <0>; | ||
84 | interrupts = <23>; | ||
85 | reg = <0x10600 0x28>; | ||
86 | clocks = <&gate_clk 7>; | ||
87 | status = "disabled"; | ||
104 | }; | 88 | }; |
105 | 89 | ||
106 | gpio0: gpio@10100 { | 90 | gpio0: gpio@10100 { |
@@ -127,6 +111,17 @@ | |||
127 | clocks = <&gate_clk 7>; | 111 | clocks = <&gate_clk 7>; |
128 | }; | 112 | }; |
129 | 113 | ||
114 | i2c@11000 { | ||
115 | compatible = "marvell,mv64xxx-i2c"; | ||
116 | reg = <0x11000 0x20>; | ||
117 | #address-cells = <1>; | ||
118 | #size-cells = <0>; | ||
119 | interrupts = <29>; | ||
120 | clock-frequency = <100000>; | ||
121 | clocks = <&gate_clk 7>; | ||
122 | status = "disabled"; | ||
123 | }; | ||
124 | |||
130 | serial@12000 { | 125 | serial@12000 { |
131 | compatible = "ns16550a"; | 126 | compatible = "ns16550a"; |
132 | reg = <0x12000 0x100>; | 127 | reg = <0x12000 0x100>; |
@@ -145,15 +140,18 @@ | |||
145 | status = "disabled"; | 140 | status = "disabled"; |
146 | }; | 141 | }; |
147 | 142 | ||
148 | spi@10600 { | 143 | mbusc: mbus-controller@20000 { |
149 | compatible = "marvell,orion-spi"; | 144 | compatible = "marvell,mbus-controller"; |
150 | #address-cells = <1>; | 145 | reg = <0x20000 0x80>, <0x1500 0x20>; |
151 | #size-cells = <0>; | 146 | }; |
152 | cell-index = <0>; | 147 | |
153 | interrupts = <23>; | 148 | bridge_intc: bridge-interrupt-ctrl@20110 { |
154 | reg = <0x10600 0x28>; | 149 | compatible = "marvell,orion-bridge-intc"; |
155 | clocks = <&gate_clk 7>; | 150 | interrupt-controller; |
156 | status = "disabled"; | 151 | #interrupt-cells = <1>; |
152 | reg = <0x20110 0x8>; | ||
153 | interrupts = <1>; | ||
154 | marvell,#interrupts = <6>; | ||
157 | }; | 155 | }; |
158 | 156 | ||
159 | gate_clk: clock-gating-control@2011c { | 157 | gate_clk: clock-gating-control@2011c { |
@@ -163,6 +161,21 @@ | |||
163 | #clock-cells = <1>; | 161 | #clock-cells = <1>; |
164 | }; | 162 | }; |
165 | 163 | ||
164 | intc: main-interrupt-ctrl@20200 { | ||
165 | compatible = "marvell,orion-intc"; | ||
166 | interrupt-controller; | ||
167 | #interrupt-cells = <1>; | ||
168 | reg = <0x20200 0x10>, <0x20210 0x10>; | ||
169 | }; | ||
170 | |||
171 | timer: timer@20300 { | ||
172 | compatible = "marvell,orion-timer"; | ||
173 | reg = <0x20300 0x20>; | ||
174 | interrupt-parent = <&bridge_intc>; | ||
175 | interrupts = <1>, <2>; | ||
176 | clocks = <&core_clk 0>; | ||
177 | }; | ||
178 | |||
166 | wdt: watchdog-timer@20300 { | 179 | wdt: watchdog-timer@20300 { |
167 | compatible = "marvell,orion-wdt"; | 180 | compatible = "marvell,orion-wdt"; |
168 | reg = <0x20300 0x28>; | 181 | reg = <0x20300 0x28>; |
@@ -172,6 +185,14 @@ | |||
172 | status = "okay"; | 185 | status = "okay"; |
173 | }; | 186 | }; |
174 | 187 | ||
188 | ehci@50000 { | ||
189 | compatible = "marvell,orion-ehci"; | ||
190 | reg = <0x50000 0x1000>; | ||
191 | interrupts = <19>; | ||
192 | clocks = <&gate_clk 3>; | ||
193 | status = "okay"; | ||
194 | }; | ||
195 | |||
175 | xor@60800 { | 196 | xor@60800 { |
176 | compatible = "marvell,orion-xor"; | 197 | compatible = "marvell,orion-xor"; |
177 | reg = <0x60800 0x100 | 198 | reg = <0x60800 0x100 |
@@ -212,37 +233,6 @@ | |||
212 | }; | 233 | }; |
213 | }; | 234 | }; |
214 | 235 | ||
215 | ehci@50000 { | ||
216 | compatible = "marvell,orion-ehci"; | ||
217 | reg = <0x50000 0x1000>; | ||
218 | interrupts = <19>; | ||
219 | clocks = <&gate_clk 3>; | ||
220 | status = "okay"; | ||
221 | }; | ||
222 | |||
223 | i2c@11000 { | ||
224 | compatible = "marvell,mv64xxx-i2c"; | ||
225 | reg = <0x11000 0x20>; | ||
226 | #address-cells = <1>; | ||
227 | #size-cells = <0>; | ||
228 | interrupts = <29>; | ||
229 | clock-frequency = <100000>; | ||
230 | clocks = <&gate_clk 7>; | ||
231 | status = "disabled"; | ||
232 | }; | ||
233 | |||
234 | mdio: mdio-bus@72004 { | ||
235 | compatible = "marvell,orion-mdio"; | ||
236 | #address-cells = <1>; | ||
237 | #size-cells = <0>; | ||
238 | reg = <0x72004 0x84>; | ||
239 | interrupts = <46>; | ||
240 | clocks = <&gate_clk 0>; | ||
241 | status = "disabled"; | ||
242 | |||
243 | /* add phy nodes in board file */ | ||
244 | }; | ||
245 | |||
246 | eth0: ethernet-controller@72000 { | 236 | eth0: ethernet-controller@72000 { |
247 | compatible = "marvell,kirkwood-eth"; | 237 | compatible = "marvell,kirkwood-eth"; |
248 | #address-cells = <1>; | 238 | #address-cells = <1>; |
@@ -263,6 +253,18 @@ | |||
263 | }; | 253 | }; |
264 | }; | 254 | }; |
265 | 255 | ||
256 | mdio: mdio-bus@72004 { | ||
257 | compatible = "marvell,orion-mdio"; | ||
258 | #address-cells = <1>; | ||
259 | #size-cells = <0>; | ||
260 | reg = <0x72004 0x84>; | ||
261 | interrupts = <46>; | ||
262 | clocks = <&gate_clk 0>; | ||
263 | status = "disabled"; | ||
264 | |||
265 | /* add phy nodes in board file */ | ||
266 | }; | ||
267 | |||
266 | eth1: ethernet-controller@76000 { | 268 | eth1: ethernet-controller@76000 { |
267 | compatible = "marvell,kirkwood-eth"; | 269 | compatible = "marvell,kirkwood-eth"; |
268 | #address-cells = <1>; | 270 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/moxart-uc7112lx.dts b/arch/arm/boot/dts/moxart-uc7112lx.dts new file mode 100644 index 000000000000..90749d55de0d --- /dev/null +++ b/arch/arm/boot/dts/moxart-uc7112lx.dts | |||
@@ -0,0 +1,109 @@ | |||
1 | /* moxart-uc7112lx.dts - Device Tree file for MOXA UC-7112-LX | ||
2 | * | ||
3 | * Copyright (C) 2013 Jonas Jensen <jonas.jensen@gmail.com> | ||
4 | * | ||
5 | * Licensed under GPLv2 or later. | ||
6 | */ | ||
7 | |||
8 | /dts-v1/; | ||
9 | /include/ "moxart.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "MOXA UC-7112-LX"; | ||
13 | compatible = "moxa,moxart-uc-7112-lx", "moxa,moxart"; | ||
14 | |||
15 | memory { | ||
16 | device_type = "memory"; | ||
17 | reg = <0x0 0x2000000>; | ||
18 | }; | ||
19 | |||
20 | flash@80000000,0 { | ||
21 | compatible = "numonyx,js28f128", "cfi-flash"; | ||
22 | reg = <0x80000000 0x1000000>; | ||
23 | bank-width = <2>; | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <1>; | ||
26 | partition@0 { | ||
27 | label = "bootloader"; | ||
28 | reg = <0x0 0x40000>; | ||
29 | }; | ||
30 | partition@40000 { | ||
31 | label = "linux kernel"; | ||
32 | reg = <0x40000 0x1C0000>; | ||
33 | }; | ||
34 | partition@200000 { | ||
35 | label = "root filesystem"; | ||
36 | reg = <0x200000 0x800000>; | ||
37 | }; | ||
38 | partition@a00000 { | ||
39 | label = "user filesystem"; | ||
40 | reg = <0xa00000 0x600000>; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | leds { | ||
45 | compatible = "gpio-leds"; | ||
46 | user-led { | ||
47 | label = "ready-led"; | ||
48 | gpios = <&gpio 27 0x1>; | ||
49 | default-state = "on"; | ||
50 | linux,default-trigger = "default-on"; | ||
51 | }; | ||
52 | }; | ||
53 | |||
54 | gpio_keys_polled { | ||
55 | compatible = "gpio-keys-polled"; | ||
56 | #address-cells = <1>; | ||
57 | #size-cells = <0>; | ||
58 | poll-interval = <500>; | ||
59 | button@25 { | ||
60 | label = "GPIO Reset"; | ||
61 | linux,code = <116>; | ||
62 | gpios = <&gpio 25 1>; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | chosen { | ||
67 | bootargs = "console=ttyS0,115200n8 earlyprintk root=/dev/mmcblk0p1 rw rootwait"; | ||
68 | }; | ||
69 | }; | ||
70 | |||
71 | &clk_pll { | ||
72 | clocks = <&ref12>; | ||
73 | }; | ||
74 | |||
75 | &sdhci { | ||
76 | status = "okay"; | ||
77 | }; | ||
78 | |||
79 | &mdio0 { | ||
80 | status = "okay"; | ||
81 | |||
82 | ethphy0: ethernet-phy@1 { | ||
83 | device_type = "ethernet-phy"; | ||
84 | compatible = "moxa,moxart-rtl8201cp", "ethernet-phy-ieee802.3-c22"; | ||
85 | reg = <1>; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | &mdio1 { | ||
90 | status = "okay"; | ||
91 | |||
92 | ethphy1: ethernet-phy@1 { | ||
93 | device_type = "ethernet-phy"; | ||
94 | compatible = "moxa,moxart-rtl8201cp", "ethernet-phy-ieee802.3-c22"; | ||
95 | reg = <1>; | ||
96 | }; | ||
97 | }; | ||
98 | |||
99 | &mac0 { | ||
100 | status = "okay"; | ||
101 | }; | ||
102 | |||
103 | &mac1 { | ||
104 | status = "okay"; | ||
105 | }; | ||
106 | |||
107 | &uart0 { | ||
108 | status = "okay"; | ||
109 | }; | ||
diff --git a/arch/arm/boot/dts/moxart.dtsi b/arch/arm/boot/dts/moxart.dtsi new file mode 100644 index 000000000000..da1d8effef97 --- /dev/null +++ b/arch/arm/boot/dts/moxart.dtsi | |||
@@ -0,0 +1,154 @@ | |||
1 | /* moxart.dtsi - Device Tree Include file for MOXA ART family SoC | ||
2 | * | ||
3 | * Copyright (C) 2013 Jonas Jensen <jonas.jensen@gmail.com> | ||
4 | * | ||
5 | * Licensed under GPLv2 or later. | ||
6 | */ | ||
7 | |||
8 | /include/ "skeleton.dtsi" | ||
9 | |||
10 | / { | ||
11 | compatible = "moxa,moxart"; | ||
12 | model = "MOXART"; | ||
13 | interrupt-parent = <&intc>; | ||
14 | |||
15 | cpus { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <0>; | ||
18 | |||
19 | cpu@0 { | ||
20 | device_type = "cpu"; | ||
21 | compatible = "faraday,fa526"; | ||
22 | reg = <0>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <0>; | ||
29 | |||
30 | ref12: ref12M { | ||
31 | compatible = "fixed-clock"; | ||
32 | #clock-cells = <0>; | ||
33 | clock-frequency = <12000000>; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | soc { | ||
38 | compatible = "simple-bus"; | ||
39 | #address-cells = <1>; | ||
40 | #size-cells = <1>; | ||
41 | reg = <0x90000000 0x10000000>; | ||
42 | ranges; | ||
43 | |||
44 | intc: interrupt-controller@98800000 { | ||
45 | compatible = "moxa,moxart-ic"; | ||
46 | reg = <0x98800000 0x38>; | ||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <2>; | ||
49 | interrupt-mask = <0x00080000>; | ||
50 | }; | ||
51 | |||
52 | clk_pll: clk_pll@98100000 { | ||
53 | compatible = "moxa,moxart-pll-clock"; | ||
54 | #clock-cells = <0>; | ||
55 | reg = <0x98100000 0x34>; | ||
56 | }; | ||
57 | |||
58 | clk_apb: clk_apb@98100000 { | ||
59 | compatible = "moxa,moxart-apb-clock"; | ||
60 | #clock-cells = <0>; | ||
61 | reg = <0x98100000 0x34>; | ||
62 | clocks = <&clk_pll>; | ||
63 | }; | ||
64 | |||
65 | timer: timer@98400000 { | ||
66 | compatible = "moxa,moxart-timer"; | ||
67 | reg = <0x98400000 0x42>; | ||
68 | interrupts = <19 1>; | ||
69 | clocks = <&clk_apb>; | ||
70 | }; | ||
71 | |||
72 | gpio: gpio@98700000 { | ||
73 | gpio-controller; | ||
74 | #gpio-cells = <2>; | ||
75 | compatible = "moxa,moxart-gpio"; | ||
76 | reg = <0x98700000 0xC>; | ||
77 | }; | ||
78 | |||
79 | rtc: rtc { | ||
80 | compatible = "moxa,moxart-rtc"; | ||
81 | gpio-rtc-sclk = <&gpio 5 0>; | ||
82 | gpio-rtc-data = <&gpio 6 0>; | ||
83 | gpio-rtc-reset = <&gpio 7 0>; | ||
84 | }; | ||
85 | |||
86 | dma: dma@90500000 { | ||
87 | compatible = "moxa,moxart-dma"; | ||
88 | reg = <0x90500080 0x40>; | ||
89 | interrupts = <24 0>; | ||
90 | #dma-cells = <1>; | ||
91 | }; | ||
92 | |||
93 | watchdog: watchdog@98500000 { | ||
94 | compatible = "moxa,moxart-watchdog"; | ||
95 | reg = <0x98500000 0x10>; | ||
96 | clocks = <&clk_apb>; | ||
97 | }; | ||
98 | |||
99 | sdhci: sdhci@98e00000 { | ||
100 | compatible = "moxa,moxart-sdhci"; | ||
101 | reg = <0x98e00000 0x5C>; | ||
102 | interrupts = <5 0>; | ||
103 | clocks = <&clk_apb>; | ||
104 | dmas = <&dma 5>, | ||
105 | <&dma 5>; | ||
106 | dma-names = "tx", "rx"; | ||
107 | status = "disabled"; | ||
108 | }; | ||
109 | |||
110 | mdio0: mdio@90900090 { | ||
111 | compatible = "moxa,moxart-mdio"; | ||
112 | reg = <0x90900090 0x8>; | ||
113 | #address-cells = <1>; | ||
114 | #size-cells = <0>; | ||
115 | status = "disabled"; | ||
116 | }; | ||
117 | |||
118 | mdio1: mdio@92000090 { | ||
119 | compatible = "moxa,moxart-mdio"; | ||
120 | reg = <0x92000090 0x8>; | ||
121 | #address-cells = <1>; | ||
122 | #size-cells = <0>; | ||
123 | status = "disabled"; | ||
124 | }; | ||
125 | |||
126 | mac0: mac@90900000 { | ||
127 | compatible = "moxa,moxart-mac"; | ||
128 | reg = <0x90900000 0x90>; | ||
129 | interrupts = <25 0>; | ||
130 | phy-handle = <ðphy0>; | ||
131 | phy-mode = "mii"; | ||
132 | status = "disabled"; | ||
133 | }; | ||
134 | |||
135 | mac1: mac@92000000 { | ||
136 | compatible = "moxa,moxart-mac"; | ||
137 | reg = <0x92000000 0x90>; | ||
138 | interrupts = <27 0>; | ||
139 | phy-handle = <ðphy1>; | ||
140 | phy-mode = "mii"; | ||
141 | status = "disabled"; | ||
142 | }; | ||
143 | |||
144 | uart0: uart@98200000 { | ||
145 | compatible = "ns16550a"; | ||
146 | reg = <0x98200000 0x20>; | ||
147 | interrupts = <31 8>; | ||
148 | reg-shift = <2>; | ||
149 | reg-io-width = <4>; | ||
150 | clock-frequency = <14745600>; | ||
151 | status = "disabled"; | ||
152 | }; | ||
153 | }; | ||
154 | }; | ||
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts index aed83deaa991..fcc5bb63f03a 100644 --- a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts +++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts | |||
@@ -58,7 +58,7 @@ | |||
58 | status = "okay"; | 58 | status = "okay"; |
59 | 59 | ||
60 | ethphy: ethernet-phy { | 60 | ethphy: ethernet-phy { |
61 | device-type = "ethernet-phy"; | 61 | device_type = "ethernet-phy"; |
62 | reg = <8>; | 62 | reg = <8>; |
63 | }; | 63 | }; |
64 | }; | 64 | }; |
diff --git a/arch/arm/boot/dts/orion5x.dtsi b/arch/arm/boot/dts/orion5x.dtsi index e06c37e91ac6..9f51538cd9ef 100644 --- a/arch/arm/boot/dts/orion5x.dtsi +++ b/arch/arm/boot/dts/orion5x.dtsi | |||
@@ -42,6 +42,25 @@ | |||
42 | interrupts = <6>, <7>, <8>, <9>; | 42 | interrupts = <6>, <7>, <8>, <9>; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | spi@10600 { | ||
46 | compatible = "marvell,orion-spi"; | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <0>; | ||
49 | cell-index = <0>; | ||
50 | reg = <0x10600 0x28>; | ||
51 | status = "disabled"; | ||
52 | }; | ||
53 | |||
54 | i2c@11000 { | ||
55 | compatible = "marvell,mv64xxx-i2c"; | ||
56 | reg = <0x11000 0x20>; | ||
57 | #address-cells = <1>; | ||
58 | #size-cells = <0>; | ||
59 | interrupts = <5>; | ||
60 | clock-frequency = <100000>; | ||
61 | status = "disabled"; | ||
62 | }; | ||
63 | |||
45 | serial@12000 { | 64 | serial@12000 { |
46 | compatible = "ns16550a"; | 65 | compatible = "ns16550a"; |
47 | reg = <0x12000 0x100>; | 66 | reg = <0x12000 0x100>; |
@@ -60,15 +79,6 @@ | |||
60 | status = "disabled"; | 79 | status = "disabled"; |
61 | }; | 80 | }; |
62 | 81 | ||
63 | spi@10600 { | ||
64 | compatible = "marvell,orion-spi"; | ||
65 | #address-cells = <1>; | ||
66 | #size-cells = <0>; | ||
67 | cell-index = <0>; | ||
68 | reg = <0x10600 0x28>; | ||
69 | status = "disabled"; | ||
70 | }; | ||
71 | |||
72 | wdt@20300 { | 82 | wdt@20300 { |
73 | compatible = "marvell,orion-wdt"; | 83 | compatible = "marvell,orion-wdt"; |
74 | reg = <0x20300 0x28>; | 84 | reg = <0x20300 0x28>; |
@@ -82,30 +92,6 @@ | |||
82 | status = "disabled"; | 92 | status = "disabled"; |
83 | }; | 93 | }; |
84 | 94 | ||
85 | ehci@a0000 { | ||
86 | compatible = "marvell,orion-ehci"; | ||
87 | reg = <0xa0000 0x1000>; | ||
88 | interrupts = <12>; | ||
89 | status = "disabled"; | ||
90 | }; | ||
91 | |||
92 | sata@80000 { | ||
93 | compatible = "marvell,orion-sata"; | ||
94 | reg = <0x80000 0x5000>; | ||
95 | interrupts = <29>; | ||
96 | status = "disabled"; | ||
97 | }; | ||
98 | |||
99 | i2c@11000 { | ||
100 | compatible = "marvell,mv64xxx-i2c"; | ||
101 | reg = <0x11000 0x20>; | ||
102 | #address-cells = <1>; | ||
103 | #size-cells = <0>; | ||
104 | interrupts = <5>; | ||
105 | clock-frequency = <100000>; | ||
106 | status = "disabled"; | ||
107 | }; | ||
108 | |||
109 | xor@60900 { | 95 | xor@60900 { |
110 | compatible = "marvell,orion-xor"; | 96 | compatible = "marvell,orion-xor"; |
111 | reg = <0x60900 0x100 | 97 | reg = <0x60900 0x100 |
@@ -125,26 +111,6 @@ | |||
125 | }; | 111 | }; |
126 | }; | 112 | }; |
127 | 113 | ||
128 | crypto@90000 { | ||
129 | compatible = "marvell,orion-crypto"; | ||
130 | reg = <0x90000 0x10000>, | ||
131 | <0xf2200000 0x800>; | ||
132 | reg-names = "regs", "sram"; | ||
133 | interrupts = <28>; | ||
134 | status = "okay"; | ||
135 | }; | ||
136 | |||
137 | mdio: mdio-bus@72004 { | ||
138 | compatible = "marvell,orion-mdio"; | ||
139 | #address-cells = <1>; | ||
140 | #size-cells = <0>; | ||
141 | reg = <0x72004 0x84>; | ||
142 | interrupts = <22>; | ||
143 | status = "disabled"; | ||
144 | |||
145 | /* add phy nodes in board file */ | ||
146 | }; | ||
147 | |||
148 | eth: ethernet-controller@72000 { | 114 | eth: ethernet-controller@72000 { |
149 | compatible = "marvell,orion-eth"; | 115 | compatible = "marvell,orion-eth"; |
150 | #address-cells = <1>; | 116 | #address-cells = <1>; |
@@ -162,5 +128,39 @@ | |||
162 | /* set phy-handle property in board file */ | 128 | /* set phy-handle property in board file */ |
163 | }; | 129 | }; |
164 | }; | 130 | }; |
131 | |||
132 | mdio: mdio-bus@72004 { | ||
133 | compatible = "marvell,orion-mdio"; | ||
134 | #address-cells = <1>; | ||
135 | #size-cells = <0>; | ||
136 | reg = <0x72004 0x84>; | ||
137 | interrupts = <22>; | ||
138 | status = "disabled"; | ||
139 | |||
140 | /* add phy nodes in board file */ | ||
141 | }; | ||
142 | |||
143 | sata@80000 { | ||
144 | compatible = "marvell,orion-sata"; | ||
145 | reg = <0x80000 0x5000>; | ||
146 | interrupts = <29>; | ||
147 | status = "disabled"; | ||
148 | }; | ||
149 | |||
150 | crypto@90000 { | ||
151 | compatible = "marvell,orion-crypto"; | ||
152 | reg = <0x90000 0x10000>, | ||
153 | <0xf2200000 0x800>; | ||
154 | reg-names = "regs", "sram"; | ||
155 | interrupts = <28>; | ||
156 | status = "okay"; | ||
157 | }; | ||
158 | |||
159 | ehci@a0000 { | ||
160 | compatible = "marvell,orion-ehci"; | ||
161 | reg = <0xa0000 0x1000>; | ||
162 | interrupts = <12>; | ||
163 | status = "disabled"; | ||
164 | }; | ||
165 | }; | 165 | }; |
166 | }; | 166 | }; |
diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi index d7c5d721a5c7..a70546945985 100644 --- a/arch/arm/boot/dts/pxa27x.dtsi +++ b/arch/arm/boot/dts/pxa27x.dtsi | |||
@@ -10,5 +10,29 @@ | |||
10 | marvell,intc-priority; | 10 | marvell,intc-priority; |
11 | marvell,intc-nr-irqs = <34>; | 11 | marvell,intc-nr-irqs = <34>; |
12 | }; | 12 | }; |
13 | |||
14 | pwm0: pwm@40b00000 { | ||
15 | compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; | ||
16 | reg = <0x40b00000 0x10>; | ||
17 | #pwm-cells = <1>; | ||
18 | }; | ||
19 | |||
20 | pwm1: pwm@40b00010 { | ||
21 | compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; | ||
22 | reg = <0x40b00010 0x10>; | ||
23 | #pwm-cells = <1>; | ||
24 | }; | ||
25 | |||
26 | pwm2: pwm@40c00000 { | ||
27 | compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; | ||
28 | reg = <0x40c00000 0x10>; | ||
29 | #pwm-cells = <1>; | ||
30 | }; | ||
31 | |||
32 | pwm3: pwm@40c00010 { | ||
33 | compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm"; | ||
34 | reg = <0x40c00010 0x10>; | ||
35 | #pwm-cells = <1>; | ||
36 | }; | ||
13 | }; | 37 | }; |
14 | }; | 38 | }; |
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts index 1fb20f2333cc..b1deaf7e2e06 100644 --- a/arch/arm/boot/dts/r7s72100-genmai.dts +++ b/arch/arm/boot/dts/r7s72100-genmai.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r7s72100.dtsi" | 12 | #include "r7s72100.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "Genmai"; | 15 | model = "Genmai"; |
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts index 9443e93d3cac..70b1fff8f4a3 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a73a4.dtsi" | 12 | #include "r8a73a4.dtsi" |
13 | #include <dt-bindings/gpio/gpio.h> | 13 | #include <dt-bindings/gpio/gpio.h> |
14 | 14 | ||
15 | / { | 15 | / { |
@@ -25,6 +25,11 @@ | |||
25 | reg = <0 0x40000000 0 0x40000000>; | 25 | reg = <0 0x40000000 0 0x40000000>; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | memory@200000000 { | ||
29 | device_type = "memory"; | ||
30 | reg = <2 0x00000000 0 0x40000000>; | ||
31 | }; | ||
32 | |||
28 | vcc_mmc0: regulator@0 { | 33 | vcc_mmc0: regulator@0 { |
29 | compatible = "regulator-fixed"; | 34 | compatible = "regulator-fixed"; |
30 | regulator-name = "MMC0 Vcc"; | 35 | regulator-name = "MMC0 Vcc"; |
@@ -88,22 +93,22 @@ | |||
88 | pinctrl-0 = <&scifa0_pins>; | 93 | pinctrl-0 = <&scifa0_pins>; |
89 | pinctrl-names = "default"; | 94 | pinctrl-names = "default"; |
90 | 95 | ||
91 | scifa0_pins: scifa0 { | 96 | scifa0_pins: serial0 { |
92 | renesas,groups = "scifa0_data"; | 97 | renesas,groups = "scifa0_data"; |
93 | renesas,function = "scifa0"; | 98 | renesas,function = "scifa0"; |
94 | }; | 99 | }; |
95 | 100 | ||
96 | mmc0_pins: mmcif { | 101 | mmc0_pins: mmc { |
97 | renesas,groups = "mmc0_data8", "mmc0_ctrl"; | 102 | renesas,groups = "mmc0_data8", "mmc0_ctrl"; |
98 | renesas,function = "mmc0"; | 103 | renesas,function = "mmc0"; |
99 | }; | 104 | }; |
100 | 105 | ||
101 | sdhi0_pins: sdhi0 { | 106 | sdhi0_pins: sd0 { |
102 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; | 107 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; |
103 | renesas,function = "sdhi0"; | 108 | renesas,function = "sdhi0"; |
104 | }; | 109 | }; |
105 | 110 | ||
106 | sdhi1_pins: sdhi1 { | 111 | sdhi1_pins: sd1 { |
107 | renesas,groups = "sdhi1_data4", "sdhi1_ctrl"; | 112 | renesas,groups = "sdhi1_data4", "sdhi1_ctrl"; |
108 | renesas,function = "sdhi1"; | 113 | renesas,function = "sdhi1"; |
109 | }; | 114 | }; |
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm.dts b/arch/arm/boot/dts/r8a73a4-ape6evm.dts index 91436b58016f..ce085fa444a1 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm.dts | |||
@@ -9,7 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a73a4.dtsi" | 12 | #include "r8a73a4.dtsi" |
13 | #include <dt-bindings/interrupt-controller/irq.h> | ||
13 | 14 | ||
14 | / { | 15 | / { |
15 | model = "APE6EVM"; | 16 | model = "APE6EVM"; |
@@ -24,6 +25,11 @@ | |||
24 | reg = <0 0x40000000 0 0x40000000>; | 25 | reg = <0 0x40000000 0 0x40000000>; |
25 | }; | 26 | }; |
26 | 27 | ||
28 | memory@200000000 { | ||
29 | device_type = "memory"; | ||
30 | reg = <2 0x00000000 0 0x40000000>; | ||
31 | }; | ||
32 | |||
27 | ape6evm_fixed_3v3: fixedregulator@0 { | 33 | ape6evm_fixed_3v3: fixedregulator@0 { |
28 | compatible = "regulator-fixed"; | 34 | compatible = "regulator-fixed"; |
29 | regulator-name = "3V3"; | 35 | regulator-name = "3V3"; |
@@ -40,7 +46,7 @@ | |||
40 | compatible = "smsc,lan9118", "smsc,lan9115"; | 46 | compatible = "smsc,lan9118", "smsc,lan9115"; |
41 | reg = <0x08000000 0x1000>; | 47 | reg = <0x08000000 0x1000>; |
42 | interrupt-parent = <&irqc1>; | 48 | interrupt-parent = <&irqc1>; |
43 | interrupts = <8 0x4>; | 49 | interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; |
44 | phy-mode = "mii"; | 50 | phy-mode = "mii"; |
45 | reg-io-width = <4>; | 51 | reg-io-width = <4>; |
46 | smsc,irq-active-high; | 52 | smsc,irq-active-high; |
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 287e047592a0..6b7ce89a68f7 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi | |||
@@ -9,6 +9,9 @@ | |||
9 | * kind, whether express or implied. | 9 | * kind, whether express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
13 | #include <dt-bindings/interrupt-controller/irq.h> | ||
14 | |||
12 | / { | 15 | / { |
13 | compatible = "renesas,r8a73a4"; | 16 | compatible = "renesas,r8a73a4"; |
14 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
@@ -36,15 +39,15 @@ | |||
36 | <0 0xf1002000 0 0x1000>, | 39 | <0 0xf1002000 0 0x1000>, |
37 | <0 0xf1004000 0 0x2000>, | 40 | <0 0xf1004000 0 0x2000>, |
38 | <0 0xf1006000 0 0x2000>; | 41 | <0 0xf1006000 0 0x2000>; |
39 | interrupts = <1 9 0xf04>; | 42 | interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; |
40 | }; | 43 | }; |
41 | 44 | ||
42 | timer { | 45 | timer { |
43 | compatible = "arm,armv7-timer"; | 46 | compatible = "arm,armv7-timer"; |
44 | interrupts = <1 13 0xf08>, | 47 | interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
45 | <1 14 0xf08>, | 48 | <1 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
46 | <1 11 0xf08>, | 49 | <1 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
47 | <1 10 0xf08>; | 50 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
48 | }; | 51 | }; |
49 | 52 | ||
50 | irqc0: interrupt-controller@e61c0000 { | 53 | irqc0: interrupt-controller@e61c0000 { |
@@ -53,14 +56,38 @@ | |||
53 | interrupt-controller; | 56 | interrupt-controller; |
54 | reg = <0 0xe61c0000 0 0x200>; | 57 | reg = <0 0xe61c0000 0 0x200>; |
55 | interrupt-parent = <&gic>; | 58 | interrupt-parent = <&gic>; |
56 | interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>, | 59 | interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>, |
57 | <0 4 4>, <0 5 4>, <0 6 4>, <0 7 4>, | 60 | <0 1 IRQ_TYPE_LEVEL_HIGH>, |
58 | <0 8 4>, <0 9 4>, <0 10 4>, <0 11 4>, | 61 | <0 2 IRQ_TYPE_LEVEL_HIGH>, |
59 | <0 12 4>, <0 13 4>, <0 14 4>, <0 15 4>, | 62 | <0 3 IRQ_TYPE_LEVEL_HIGH>, |
60 | <0 16 4>, <0 17 4>, <0 18 4>, <0 19 4>, | 63 | <0 4 IRQ_TYPE_LEVEL_HIGH>, |
61 | <0 20 4>, <0 21 4>, <0 22 4>, <0 23 4>, | 64 | <0 5 IRQ_TYPE_LEVEL_HIGH>, |
62 | <0 24 4>, <0 25 4>, <0 26 4>, <0 27 4>, | 65 | <0 6 IRQ_TYPE_LEVEL_HIGH>, |
63 | <0 28 4>, <0 29 4>, <0 30 4>, <0 31 4>; | 66 | <0 7 IRQ_TYPE_LEVEL_HIGH>, |
67 | <0 8 IRQ_TYPE_LEVEL_HIGH>, | ||
68 | <0 9 IRQ_TYPE_LEVEL_HIGH>, | ||
69 | <0 10 IRQ_TYPE_LEVEL_HIGH>, | ||
70 | <0 11 IRQ_TYPE_LEVEL_HIGH>, | ||
71 | <0 12 IRQ_TYPE_LEVEL_HIGH>, | ||
72 | <0 13 IRQ_TYPE_LEVEL_HIGH>, | ||
73 | <0 14 IRQ_TYPE_LEVEL_HIGH>, | ||
74 | <0 15 IRQ_TYPE_LEVEL_HIGH>, | ||
75 | <0 16 IRQ_TYPE_LEVEL_HIGH>, | ||
76 | <0 17 IRQ_TYPE_LEVEL_HIGH>, | ||
77 | <0 18 IRQ_TYPE_LEVEL_HIGH>, | ||
78 | <0 19 IRQ_TYPE_LEVEL_HIGH>, | ||
79 | <0 20 IRQ_TYPE_LEVEL_HIGH>, | ||
80 | <0 21 IRQ_TYPE_LEVEL_HIGH>, | ||
81 | <0 22 IRQ_TYPE_LEVEL_HIGH>, | ||
82 | <0 23 IRQ_TYPE_LEVEL_HIGH>, | ||
83 | <0 24 IRQ_TYPE_LEVEL_HIGH>, | ||
84 | <0 25 IRQ_TYPE_LEVEL_HIGH>, | ||
85 | <0 26 IRQ_TYPE_LEVEL_HIGH>, | ||
86 | <0 27 IRQ_TYPE_LEVEL_HIGH>, | ||
87 | <0 28 IRQ_TYPE_LEVEL_HIGH>, | ||
88 | <0 29 IRQ_TYPE_LEVEL_HIGH>, | ||
89 | <0 30 IRQ_TYPE_LEVEL_HIGH>, | ||
90 | <0 31 IRQ_TYPE_LEVEL_HIGH>; | ||
64 | }; | 91 | }; |
65 | 92 | ||
66 | irqc1: interrupt-controller@e61c0200 { | 93 | irqc1: interrupt-controller@e61c0200 { |
@@ -69,13 +96,32 @@ | |||
69 | interrupt-controller; | 96 | interrupt-controller; |
70 | reg = <0 0xe61c0200 0 0x200>; | 97 | reg = <0 0xe61c0200 0 0x200>; |
71 | interrupt-parent = <&gic>; | 98 | interrupt-parent = <&gic>; |
72 | interrupts = <0 32 4>, <0 33 4>, <0 34 4>, <0 35 4>, | 99 | interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, |
73 | <0 36 4>, <0 37 4>, <0 38 4>, <0 39 4>, | 100 | <0 33 IRQ_TYPE_LEVEL_HIGH>, |
74 | <0 40 4>, <0 41 4>, <0 42 4>, <0 43 4>, | 101 | <0 34 IRQ_TYPE_LEVEL_HIGH>, |
75 | <0 44 4>, <0 45 4>, <0 46 4>, <0 47 4>, | 102 | <0 35 IRQ_TYPE_LEVEL_HIGH>, |
76 | <0 48 4>, <0 49 4>, <0 50 4>, <0 51 4>, | 103 | <0 36 IRQ_TYPE_LEVEL_HIGH>, |
77 | <0 52 4>, <0 53 4>, <0 54 4>, <0 55 4>, | 104 | <0 37 IRQ_TYPE_LEVEL_HIGH>, |
78 | <0 56 4>, <0 57 4>; | 105 | <0 38 IRQ_TYPE_LEVEL_HIGH>, |
106 | <0 39 IRQ_TYPE_LEVEL_HIGH>, | ||
107 | <0 40 IRQ_TYPE_LEVEL_HIGH>, | ||
108 | <0 41 IRQ_TYPE_LEVEL_HIGH>, | ||
109 | <0 42 IRQ_TYPE_LEVEL_HIGH>, | ||
110 | <0 43 IRQ_TYPE_LEVEL_HIGH>, | ||
111 | <0 44 IRQ_TYPE_LEVEL_HIGH>, | ||
112 | <0 45 IRQ_TYPE_LEVEL_HIGH>, | ||
113 | <0 46 IRQ_TYPE_LEVEL_HIGH>, | ||
114 | <0 47 IRQ_TYPE_LEVEL_HIGH>, | ||
115 | <0 48 IRQ_TYPE_LEVEL_HIGH>, | ||
116 | <0 49 IRQ_TYPE_LEVEL_HIGH>, | ||
117 | <0 50 IRQ_TYPE_LEVEL_HIGH>, | ||
118 | <0 51 IRQ_TYPE_LEVEL_HIGH>, | ||
119 | <0 52 IRQ_TYPE_LEVEL_HIGH>, | ||
120 | <0 53 IRQ_TYPE_LEVEL_HIGH>, | ||
121 | <0 54 IRQ_TYPE_LEVEL_HIGH>, | ||
122 | <0 55 IRQ_TYPE_LEVEL_HIGH>, | ||
123 | <0 56 IRQ_TYPE_LEVEL_HIGH>, | ||
124 | <0 57 IRQ_TYPE_LEVEL_HIGH>; | ||
79 | }; | 125 | }; |
80 | 126 | ||
81 | dmac: dma-multiplexer@0 { | 127 | dmac: dma-multiplexer@0 { |
@@ -91,27 +137,27 @@ | |||
91 | compatible = "renesas,shdma-r8a73a4"; | 137 | compatible = "renesas,shdma-r8a73a4"; |
92 | reg = <0 0xe6700020 0 0x89e0>; | 138 | reg = <0 0xe6700020 0 0x89e0>; |
93 | interrupt-parent = <&gic>; | 139 | interrupt-parent = <&gic>; |
94 | interrupts = <0 220 4 | 140 | interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH |
95 | 0 200 4 | 141 | 0 200 IRQ_TYPE_LEVEL_HIGH |
96 | 0 201 4 | 142 | 0 201 IRQ_TYPE_LEVEL_HIGH |
97 | 0 202 4 | 143 | 0 202 IRQ_TYPE_LEVEL_HIGH |
98 | 0 203 4 | 144 | 0 203 IRQ_TYPE_LEVEL_HIGH |
99 | 0 204 4 | 145 | 0 204 IRQ_TYPE_LEVEL_HIGH |
100 | 0 205 4 | 146 | 0 205 IRQ_TYPE_LEVEL_HIGH |
101 | 0 206 4 | 147 | 0 206 IRQ_TYPE_LEVEL_HIGH |
102 | 0 207 4 | 148 | 0 207 IRQ_TYPE_LEVEL_HIGH |
103 | 0 208 4 | 149 | 0 208 IRQ_TYPE_LEVEL_HIGH |
104 | 0 209 4 | 150 | 0 209 IRQ_TYPE_LEVEL_HIGH |
105 | 0 210 4 | 151 | 0 210 IRQ_TYPE_LEVEL_HIGH |
106 | 0 211 4 | 152 | 0 211 IRQ_TYPE_LEVEL_HIGH |
107 | 0 212 4 | 153 | 0 212 IRQ_TYPE_LEVEL_HIGH |
108 | 0 213 4 | 154 | 0 213 IRQ_TYPE_LEVEL_HIGH |
109 | 0 214 4 | 155 | 0 214 IRQ_TYPE_LEVEL_HIGH |
110 | 0 215 4 | 156 | 0 215 IRQ_TYPE_LEVEL_HIGH |
111 | 0 216 4 | 157 | 0 216 IRQ_TYPE_LEVEL_HIGH |
112 | 0 217 4 | 158 | 0 217 IRQ_TYPE_LEVEL_HIGH |
113 | 0 218 4 | 159 | 0 218 IRQ_TYPE_LEVEL_HIGH |
114 | 0 219 4>; | 160 | 0 219 IRQ_TYPE_LEVEL_HIGH>; |
115 | interrupt-names = "error", | 161 | interrupt-names = "error", |
116 | "ch0", "ch1", "ch2", "ch3", | 162 | "ch0", "ch1", "ch2", "ch3", |
117 | "ch4", "ch5", "ch6", "ch7", | 163 | "ch4", "ch5", "ch6", "ch7", |
@@ -126,7 +172,7 @@ | |||
126 | reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>, | 172 | reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>, |
127 | <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>; | 173 | <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>; |
128 | interrupt-parent = <&gic>; | 174 | interrupt-parent = <&gic>; |
129 | interrupts = <0 69 4>; | 175 | interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; |
130 | }; | 176 | }; |
131 | 177 | ||
132 | i2c0: i2c@e6500000 { | 178 | i2c0: i2c@e6500000 { |
@@ -135,7 +181,7 @@ | |||
135 | compatible = "renesas,rmobile-iic"; | 181 | compatible = "renesas,rmobile-iic"; |
136 | reg = <0 0xe6500000 0 0x428>; | 182 | reg = <0 0xe6500000 0 0x428>; |
137 | interrupt-parent = <&gic>; | 183 | interrupt-parent = <&gic>; |
138 | interrupts = <0 174 0x4>; | 184 | interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>; |
139 | status = "disabled"; | 185 | status = "disabled"; |
140 | }; | 186 | }; |
141 | 187 | ||
@@ -145,7 +191,7 @@ | |||
145 | compatible = "renesas,rmobile-iic"; | 191 | compatible = "renesas,rmobile-iic"; |
146 | reg = <0 0xe6510000 0 0x428>; | 192 | reg = <0 0xe6510000 0 0x428>; |
147 | interrupt-parent = <&gic>; | 193 | interrupt-parent = <&gic>; |
148 | interrupts = <0 175 0x4>; | 194 | interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>; |
149 | status = "disabled"; | 195 | status = "disabled"; |
150 | }; | 196 | }; |
151 | 197 | ||
@@ -155,7 +201,7 @@ | |||
155 | compatible = "renesas,rmobile-iic"; | 201 | compatible = "renesas,rmobile-iic"; |
156 | reg = <0 0xe6520000 0 0x428>; | 202 | reg = <0 0xe6520000 0 0x428>; |
157 | interrupt-parent = <&gic>; | 203 | interrupt-parent = <&gic>; |
158 | interrupts = <0 176 0x4>; | 204 | interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>; |
159 | status = "disabled"; | 205 | status = "disabled"; |
160 | }; | 206 | }; |
161 | 207 | ||
@@ -165,7 +211,7 @@ | |||
165 | compatible = "renesas,rmobile-iic"; | 211 | compatible = "renesas,rmobile-iic"; |
166 | reg = <0 0xe6530000 0 0x428>; | 212 | reg = <0 0xe6530000 0 0x428>; |
167 | interrupt-parent = <&gic>; | 213 | interrupt-parent = <&gic>; |
168 | interrupts = <0 177 0x4>; | 214 | interrupts = <0 177 IRQ_TYPE_LEVEL_HIGH>; |
169 | status = "disabled"; | 215 | status = "disabled"; |
170 | }; | 216 | }; |
171 | 217 | ||
@@ -175,7 +221,7 @@ | |||
175 | compatible = "renesas,rmobile-iic"; | 221 | compatible = "renesas,rmobile-iic"; |
176 | reg = <0 0xe6540000 0 0x428>; | 222 | reg = <0 0xe6540000 0 0x428>; |
177 | interrupt-parent = <&gic>; | 223 | interrupt-parent = <&gic>; |
178 | interrupts = <0 178 0x4>; | 224 | interrupts = <0 178 IRQ_TYPE_LEVEL_HIGH>; |
179 | status = "disabled"; | 225 | status = "disabled"; |
180 | }; | 226 | }; |
181 | 227 | ||
@@ -185,7 +231,7 @@ | |||
185 | compatible = "renesas,rmobile-iic"; | 231 | compatible = "renesas,rmobile-iic"; |
186 | reg = <0 0xe60b0000 0 0x428>; | 232 | reg = <0 0xe60b0000 0 0x428>; |
187 | interrupt-parent = <&gic>; | 233 | interrupt-parent = <&gic>; |
188 | interrupts = <0 179 0x4>; | 234 | interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>; |
189 | status = "disabled"; | 235 | status = "disabled"; |
190 | }; | 236 | }; |
191 | 237 | ||
@@ -195,7 +241,7 @@ | |||
195 | compatible = "renesas,rmobile-iic"; | 241 | compatible = "renesas,rmobile-iic"; |
196 | reg = <0 0xe6550000 0 0x428>; | 242 | reg = <0 0xe6550000 0 0x428>; |
197 | interrupt-parent = <&gic>; | 243 | interrupt-parent = <&gic>; |
198 | interrupts = <0 184 0x4>; | 244 | interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; |
199 | status = "disabled"; | 245 | status = "disabled"; |
200 | }; | 246 | }; |
201 | 247 | ||
@@ -205,7 +251,7 @@ | |||
205 | compatible = "renesas,rmobile-iic"; | 251 | compatible = "renesas,rmobile-iic"; |
206 | reg = <0 0xe6560000 0 0x428>; | 252 | reg = <0 0xe6560000 0 0x428>; |
207 | interrupt-parent = <&gic>; | 253 | interrupt-parent = <&gic>; |
208 | interrupts = <0 185 0x4>; | 254 | interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>; |
209 | status = "disabled"; | 255 | status = "disabled"; |
210 | }; | 256 | }; |
211 | 257 | ||
@@ -215,24 +261,24 @@ | |||
215 | compatible = "renesas,rmobile-iic"; | 261 | compatible = "renesas,rmobile-iic"; |
216 | reg = <0 0xe6570000 0 0x428>; | 262 | reg = <0 0xe6570000 0 0x428>; |
217 | interrupt-parent = <&gic>; | 263 | interrupt-parent = <&gic>; |
218 | interrupts = <0 173 0x4>; | 264 | interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>; |
219 | status = "disabled"; | 265 | status = "disabled"; |
220 | }; | 266 | }; |
221 | 267 | ||
222 | mmcif0: mmcif@ee200000 { | 268 | mmcif0: mmc@ee200000 { |
223 | compatible = "renesas,sh-mmcif"; | 269 | compatible = "renesas,sh-mmcif"; |
224 | reg = <0 0xee200000 0 0x80>; | 270 | reg = <0 0xee200000 0 0x80>; |
225 | interrupt-parent = <&gic>; | 271 | interrupt-parent = <&gic>; |
226 | interrupts = <0 169 0x4>; | 272 | interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; |
227 | reg-io-width = <4>; | 273 | reg-io-width = <4>; |
228 | status = "disabled"; | 274 | status = "disabled"; |
229 | }; | 275 | }; |
230 | 276 | ||
231 | mmcif1: mmcif@ee220000 { | 277 | mmcif1: mmc@ee220000 { |
232 | compatible = "renesas,sh-mmcif"; | 278 | compatible = "renesas,sh-mmcif"; |
233 | reg = <0 0xee220000 0 0x80>; | 279 | reg = <0 0xee220000 0 0x80>; |
234 | interrupt-parent = <&gic>; | 280 | interrupt-parent = <&gic>; |
235 | interrupts = <0 170 0x4>; | 281 | interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>; |
236 | reg-io-width = <4>; | 282 | reg-io-width = <4>; |
237 | status = "disabled"; | 283 | status = "disabled"; |
238 | }; | 284 | }; |
@@ -244,29 +290,29 @@ | |||
244 | #gpio-cells = <2>; | 290 | #gpio-cells = <2>; |
245 | }; | 291 | }; |
246 | 292 | ||
247 | sdhi0: sdhi@ee100000 { | 293 | sdhi0: sd@ee100000 { |
248 | compatible = "renesas,sdhi-r8a73a4"; | 294 | compatible = "renesas,sdhi-r8a73a4"; |
249 | reg = <0 0xee100000 0 0x100>; | 295 | reg = <0 0xee100000 0 0x100>; |
250 | interrupt-parent = <&gic>; | 296 | interrupt-parent = <&gic>; |
251 | interrupts = <0 165 4>; | 297 | interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; |
252 | cap-sd-highspeed; | 298 | cap-sd-highspeed; |
253 | status = "disabled"; | 299 | status = "disabled"; |
254 | }; | 300 | }; |
255 | 301 | ||
256 | sdhi1: sdhi@ee120000 { | 302 | sdhi1: sd@ee120000 { |
257 | compatible = "renesas,sdhi-r8a73a4"; | 303 | compatible = "renesas,sdhi-r8a73a4"; |
258 | reg = <0 0xee120000 0 0x100>; | 304 | reg = <0 0xee120000 0 0x100>; |
259 | interrupt-parent = <&gic>; | 305 | interrupt-parent = <&gic>; |
260 | interrupts = <0 166 4>; | 306 | interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>; |
261 | cap-sd-highspeed; | 307 | cap-sd-highspeed; |
262 | status = "disabled"; | 308 | status = "disabled"; |
263 | }; | 309 | }; |
264 | 310 | ||
265 | sdhi2: sdhi@ee140000 { | 311 | sdhi2: sd@ee140000 { |
266 | compatible = "renesas,sdhi-r8a73a4"; | 312 | compatible = "renesas,sdhi-r8a73a4"; |
267 | reg = <0 0xee140000 0 0x100>; | 313 | reg = <0 0xee140000 0 0x100>; |
268 | interrupt-parent = <&gic>; | 314 | interrupt-parent = <&gic>; |
269 | interrupts = <0 167 4>; | 315 | interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; |
270 | cap-sd-highspeed; | 316 | cap-sd-highspeed; |
271 | status = "disabled"; | 317 | status = "disabled"; |
272 | }; | 318 | }; |
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts index 1c56c5e56950..6d6fd3dff2d3 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | |||
@@ -9,8 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a7740.dtsi" | 12 | #include "r8a7740.dtsi" |
13 | #include <dt-bindings/gpio/gpio.h> | 13 | #include <dt-bindings/gpio/gpio.h> |
14 | #include <dt-bindings/interrupt-controller/irq.h> | ||
14 | #include <dt-bindings/pwm/pwm.h> | 15 | #include <dt-bindings/pwm/pwm.h> |
15 | 16 | ||
16 | / { | 17 | / { |
@@ -86,31 +87,55 @@ | |||
86 | pinctrl-0 = <&backlight_pins>; | 87 | pinctrl-0 = <&backlight_pins>; |
87 | pinctrl-names = "default"; | 88 | pinctrl-names = "default"; |
88 | }; | 89 | }; |
90 | |||
91 | sound { | ||
92 | compatible = "simple-audio-card"; | ||
93 | |||
94 | simple-audio-card,format = "i2s"; | ||
95 | |||
96 | simple-audio-card,cpu { | ||
97 | sound-dai = <&sh_fsi2 0>; | ||
98 | bitclock-inversion; | ||
99 | }; | ||
100 | |||
101 | simple-audio-card,codec { | ||
102 | sound-dai = <&wm8978>; | ||
103 | bitclock-master; | ||
104 | frame-master; | ||
105 | system-clock-frequency = <12288000>; | ||
106 | }; | ||
107 | }; | ||
89 | }; | 108 | }; |
90 | 109 | ||
91 | &i2c0 { | 110 | &i2c0 { |
92 | status = "okay"; | 111 | status = "okay"; |
93 | touchscreen: st1232@55 { | 112 | touchscreen@55 { |
94 | compatible = "sitronix,st1232"; | 113 | compatible = "sitronix,st1232"; |
95 | reg = <0x55>; | 114 | reg = <0x55>; |
96 | interrupt-parent = <&irqpin1>; | 115 | interrupt-parent = <&irqpin1>; |
97 | interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */ | 116 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; |
98 | pinctrl-0 = <&st1232_pins>; | 117 | pinctrl-0 = <&st1232_pins>; |
99 | pinctrl-names = "default"; | 118 | pinctrl-names = "default"; |
100 | gpios = <&pfc 166 GPIO_ACTIVE_LOW>; | 119 | gpios = <&pfc 166 GPIO_ACTIVE_LOW>; |
101 | }; | 120 | }; |
121 | |||
122 | wm8978: wm8978@1a { | ||
123 | #sound-dai-cells = <0>; | ||
124 | compatible = "wlf,wm8978"; | ||
125 | reg = <0x1a>; | ||
126 | }; | ||
102 | }; | 127 | }; |
103 | 128 | ||
104 | &pfc { | 129 | &pfc { |
105 | pinctrl-0 = <&scifa1_pins>; | 130 | pinctrl-0 = <&scifa1_pins>; |
106 | pinctrl-names = "default"; | 131 | pinctrl-names = "default"; |
107 | 132 | ||
108 | scifa1_pins: scifa1 { | 133 | scifa1_pins: serial1 { |
109 | renesas,groups = "scifa1_data"; | 134 | renesas,groups = "scifa1_data"; |
110 | renesas,function = "scifa1"; | 135 | renesas,function = "scifa1"; |
111 | }; | 136 | }; |
112 | 137 | ||
113 | st1232_pins: st1232 { | 138 | st1232_pins: touchscreen { |
114 | renesas,groups = "intc_irq10"; | 139 | renesas,groups = "intc_irq10"; |
115 | renesas,function = "intc"; | 140 | renesas,function = "intc"; |
116 | }; | 141 | }; |
@@ -125,10 +150,16 @@ | |||
125 | renesas,function = "mmc0"; | 150 | renesas,function = "mmc0"; |
126 | }; | 151 | }; |
127 | 152 | ||
128 | sdhi0_pins: sdhi0 { | 153 | sdhi0_pins: sd0 { |
129 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp"; | 154 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp"; |
130 | renesas,function = "sdhi0"; | 155 | renesas,function = "sdhi0"; |
131 | }; | 156 | }; |
157 | |||
158 | fsia_pins: sounda { | ||
159 | renesas,groups = "fsia_sclk_in", "fsia_mclk_out", | ||
160 | "fsia_data_in_1", "fsia_data_out_0"; | ||
161 | renesas,function = "fsia"; | ||
162 | }; | ||
132 | }; | 163 | }; |
133 | 164 | ||
134 | &tpu { | 165 | &tpu { |
@@ -155,3 +186,10 @@ | |||
155 | cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>; | 186 | cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>; |
156 | status = "okay"; | 187 | status = "okay"; |
157 | }; | 188 | }; |
189 | |||
190 | &sh_fsi2 { | ||
191 | pinctrl-0 = <&fsia_pins>; | ||
192 | pinctrl-names = "default"; | ||
193 | |||
194 | status = "okay"; | ||
195 | }; | ||
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts index 426cd9c3e1c4..a06a11e1a840 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a7740.dtsi" | 12 | #include "r8a7740.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "armadillo 800 eva"; | 15 | model = "armadillo 800 eva"; |
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index ae1e230f711d..2782f642acfc 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi | |||
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | /include/ "skeleton.dtsi" | 11 | /include/ "skeleton.dtsi" |
12 | 12 | ||
13 | #include <dt-bindings/interrupt-controller/irq.h> | ||
14 | |||
13 | / { | 15 | / { |
14 | compatible = "renesas,r8a7740"; | 16 | compatible = "renesas,r8a7740"; |
15 | 17 | ||
@@ -34,12 +36,12 @@ | |||
34 | 36 | ||
35 | pmu { | 37 | pmu { |
36 | compatible = "arm,cortex-a9-pmu"; | 38 | compatible = "arm,cortex-a9-pmu"; |
37 | interrupts = <0 83 4>; | 39 | interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>; |
38 | }; | 40 | }; |
39 | 41 | ||
40 | /* irqpin0: IRQ0 - IRQ7 */ | 42 | /* irqpin0: IRQ0 - IRQ7 */ |
41 | irqpin0: irqpin@e6900000 { | 43 | irqpin0: irqpin@e6900000 { |
42 | compatible = "renesas,intc-irqpin"; | 44 | compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; |
43 | #interrupt-cells = <2>; | 45 | #interrupt-cells = <2>; |
44 | interrupt-controller; | 46 | interrupt-controller; |
45 | reg = <0xe6900000 4>, | 47 | reg = <0xe6900000 4>, |
@@ -48,19 +50,19 @@ | |||
48 | <0xe6900040 1>, | 50 | <0xe6900040 1>, |
49 | <0xe6900060 1>; | 51 | <0xe6900060 1>; |
50 | interrupt-parent = <&gic>; | 52 | interrupt-parent = <&gic>; |
51 | interrupts = <0 149 0x4 | 53 | interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH |
52 | 0 149 0x4 | 54 | 0 149 IRQ_TYPE_LEVEL_HIGH |
53 | 0 149 0x4 | 55 | 0 149 IRQ_TYPE_LEVEL_HIGH |
54 | 0 149 0x4 | 56 | 0 149 IRQ_TYPE_LEVEL_HIGH |
55 | 0 149 0x4 | 57 | 0 149 IRQ_TYPE_LEVEL_HIGH |
56 | 0 149 0x4 | 58 | 0 149 IRQ_TYPE_LEVEL_HIGH |
57 | 0 149 0x4 | 59 | 0 149 IRQ_TYPE_LEVEL_HIGH |
58 | 0 149 0x4>; | 60 | 0 149 IRQ_TYPE_LEVEL_HIGH>; |
59 | }; | 61 | }; |
60 | 62 | ||
61 | /* irqpin1: IRQ8 - IRQ15 */ | 63 | /* irqpin1: IRQ8 - IRQ15 */ |
62 | irqpin1: irqpin@e6900004 { | 64 | irqpin1: irqpin@e6900004 { |
63 | compatible = "renesas,intc-irqpin"; | 65 | compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; |
64 | #interrupt-cells = <2>; | 66 | #interrupt-cells = <2>; |
65 | interrupt-controller; | 67 | interrupt-controller; |
66 | reg = <0xe6900004 4>, | 68 | reg = <0xe6900004 4>, |
@@ -69,19 +71,19 @@ | |||
69 | <0xe6900044 1>, | 71 | <0xe6900044 1>, |
70 | <0xe6900064 1>; | 72 | <0xe6900064 1>; |
71 | interrupt-parent = <&gic>; | 73 | interrupt-parent = <&gic>; |
72 | interrupts = <0 149 0x4 | 74 | interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH |
73 | 0 149 0x4 | 75 | 0 149 IRQ_TYPE_LEVEL_HIGH |
74 | 0 149 0x4 | 76 | 0 149 IRQ_TYPE_LEVEL_HIGH |
75 | 0 149 0x4 | 77 | 0 149 IRQ_TYPE_LEVEL_HIGH |
76 | 0 149 0x4 | 78 | 0 149 IRQ_TYPE_LEVEL_HIGH |
77 | 0 149 0x4 | 79 | 0 149 IRQ_TYPE_LEVEL_HIGH |
78 | 0 149 0x4 | 80 | 0 149 IRQ_TYPE_LEVEL_HIGH |
79 | 0 149 0x4>; | 81 | 0 149 IRQ_TYPE_LEVEL_HIGH>; |
80 | }; | 82 | }; |
81 | 83 | ||
82 | /* irqpin2: IRQ16 - IRQ23 */ | 84 | /* irqpin2: IRQ16 - IRQ23 */ |
83 | irqpin2: irqpin@e6900008 { | 85 | irqpin2: irqpin@e6900008 { |
84 | compatible = "renesas,intc-irqpin"; | 86 | compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; |
85 | #interrupt-cells = <2>; | 87 | #interrupt-cells = <2>; |
86 | interrupt-controller; | 88 | interrupt-controller; |
87 | reg = <0xe6900008 4>, | 89 | reg = <0xe6900008 4>, |
@@ -90,19 +92,19 @@ | |||
90 | <0xe6900048 1>, | 92 | <0xe6900048 1>, |
91 | <0xe6900068 1>; | 93 | <0xe6900068 1>; |
92 | interrupt-parent = <&gic>; | 94 | interrupt-parent = <&gic>; |
93 | interrupts = <0 149 0x4 | 95 | interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH |
94 | 0 149 0x4 | 96 | 0 149 IRQ_TYPE_LEVEL_HIGH |
95 | 0 149 0x4 | 97 | 0 149 IRQ_TYPE_LEVEL_HIGH |
96 | 0 149 0x4 | 98 | 0 149 IRQ_TYPE_LEVEL_HIGH |
97 | 0 149 0x4 | 99 | 0 149 IRQ_TYPE_LEVEL_HIGH |
98 | 0 149 0x4 | 100 | 0 149 IRQ_TYPE_LEVEL_HIGH |
99 | 0 149 0x4 | 101 | 0 149 IRQ_TYPE_LEVEL_HIGH |
100 | 0 149 0x4>; | 102 | 0 149 IRQ_TYPE_LEVEL_HIGH>; |
101 | }; | 103 | }; |
102 | 104 | ||
103 | /* irqpin3: IRQ24 - IRQ31 */ | 105 | /* irqpin3: IRQ24 - IRQ31 */ |
104 | irqpin3: irqpin@e690000c { | 106 | irqpin3: irqpin@e690000c { |
105 | compatible = "renesas,intc-irqpin"; | 107 | compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; |
106 | #interrupt-cells = <2>; | 108 | #interrupt-cells = <2>; |
107 | interrupt-controller; | 109 | interrupt-controller; |
108 | reg = <0xe690000c 4>, | 110 | reg = <0xe690000c 4>, |
@@ -111,14 +113,14 @@ | |||
111 | <0xe690004c 1>, | 113 | <0xe690004c 1>, |
112 | <0xe690006c 1>; | 114 | <0xe690006c 1>; |
113 | interrupt-parent = <&gic>; | 115 | interrupt-parent = <&gic>; |
114 | interrupts = <0 149 0x4 | 116 | interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH |
115 | 0 149 0x4 | 117 | 0 149 IRQ_TYPE_LEVEL_HIGH |
116 | 0 149 0x4 | 118 | 0 149 IRQ_TYPE_LEVEL_HIGH |
117 | 0 149 0x4 | 119 | 0 149 IRQ_TYPE_LEVEL_HIGH |
118 | 0 149 0x4 | 120 | 0 149 IRQ_TYPE_LEVEL_HIGH |
119 | 0 149 0x4 | 121 | 0 149 IRQ_TYPE_LEVEL_HIGH |
120 | 0 149 0x4 | 122 | 0 149 IRQ_TYPE_LEVEL_HIGH |
121 | 0 149 0x4>; | 123 | 0 149 IRQ_TYPE_LEVEL_HIGH>; |
122 | }; | 124 | }; |
123 | 125 | ||
124 | i2c0: i2c@fff20000 { | 126 | i2c0: i2c@fff20000 { |
@@ -127,10 +129,10 @@ | |||
127 | compatible = "renesas,rmobile-iic"; | 129 | compatible = "renesas,rmobile-iic"; |
128 | reg = <0xfff20000 0x425>; | 130 | reg = <0xfff20000 0x425>; |
129 | interrupt-parent = <&gic>; | 131 | interrupt-parent = <&gic>; |
130 | interrupts = <0 201 0x4 | 132 | interrupts = <0 201 IRQ_TYPE_LEVEL_HIGH |
131 | 0 202 0x4 | 133 | 0 202 IRQ_TYPE_LEVEL_HIGH |
132 | 0 203 0x4 | 134 | 0 203 IRQ_TYPE_LEVEL_HIGH |
133 | 0 204 0x4>; | 135 | 0 204 IRQ_TYPE_LEVEL_HIGH>; |
134 | status = "disabled"; | 136 | status = "disabled"; |
135 | }; | 137 | }; |
136 | 138 | ||
@@ -140,10 +142,10 @@ | |||
140 | compatible = "renesas,rmobile-iic"; | 142 | compatible = "renesas,rmobile-iic"; |
141 | reg = <0xe6c20000 0x425>; | 143 | reg = <0xe6c20000 0x425>; |
142 | interrupt-parent = <&gic>; | 144 | interrupt-parent = <&gic>; |
143 | interrupts = <0 70 0x4 | 145 | interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH |
144 | 0 71 0x4 | 146 | 0 71 IRQ_TYPE_LEVEL_HIGH |
145 | 0 72 0x4 | 147 | 0 72 IRQ_TYPE_LEVEL_HIGH |
146 | 0 73 0x4>; | 148 | 0 73 IRQ_TYPE_LEVEL_HIGH>; |
147 | status = "disabled"; | 149 | status = "disabled"; |
148 | }; | 150 | }; |
149 | 151 | ||
@@ -162,36 +164,57 @@ | |||
162 | #pwm-cells = <3>; | 164 | #pwm-cells = <3>; |
163 | }; | 165 | }; |
164 | 166 | ||
165 | mmcif0: mmcif@e6bd0000 { | 167 | mmcif0: mmc@e6bd0000 { |
166 | compatible = "renesas,sh-mmcif"; | 168 | compatible = "renesas,sh-mmcif"; |
167 | reg = <0xe6bd0000 0x100>; | 169 | reg = <0xe6bd0000 0x100>; |
168 | interrupt-parent = <&gic>; | 170 | interrupt-parent = <&gic>; |
169 | interrupts = <0 56 4 | 171 | interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH |
170 | 0 57 4>; | 172 | 0 57 IRQ_TYPE_LEVEL_HIGH>; |
171 | status = "disabled"; | 173 | status = "disabled"; |
172 | }; | 174 | }; |
173 | 175 | ||
174 | sdhi0: sdhi@e6850000 { | 176 | sdhi0: sd@e6850000 { |
175 | compatible = "renesas,sdhi-r8a7740"; | 177 | compatible = "renesas,sdhi-r8a7740"; |
176 | reg = <0xe6850000 0x100>; | 178 | reg = <0xe6850000 0x100>; |
177 | interrupt-parent = <&gic>; | 179 | interrupt-parent = <&gic>; |
178 | interrupts = <0 117 4 | 180 | interrupts = <0 117 IRQ_TYPE_LEVEL_HIGH |
179 | 0 118 4 | 181 | 0 118 IRQ_TYPE_LEVEL_HIGH |
180 | 0 119 4>; | 182 | 0 119 IRQ_TYPE_LEVEL_HIGH>; |
181 | cap-sd-highspeed; | 183 | cap-sd-highspeed; |
182 | cap-sdio-irq; | 184 | cap-sdio-irq; |
183 | status = "disabled"; | 185 | status = "disabled"; |
184 | }; | 186 | }; |
185 | 187 | ||
186 | sdhi1: sdhi@e6860000 { | 188 | sdhi1: sd@e6860000 { |
187 | compatible = "renesas,sdhi-r8a7740"; | 189 | compatible = "renesas,sdhi-r8a7740"; |
188 | reg = <0xe6860000 0x100>; | 190 | reg = <0xe6860000 0x100>; |
189 | interrupt-parent = <&gic>; | 191 | interrupt-parent = <&gic>; |
190 | interrupts = <0 121 4 | 192 | interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH |
191 | 0 122 4 | 193 | 0 122 IRQ_TYPE_LEVEL_HIGH |
192 | 0 123 4>; | 194 | 0 123 IRQ_TYPE_LEVEL_HIGH>; |
195 | cap-sd-highspeed; | ||
196 | cap-sdio-irq; | ||
197 | status = "disabled"; | ||
198 | }; | ||
199 | |||
200 | sdhi2: sd@e6870000 { | ||
201 | compatible = "renesas,sdhi-r8a7740"; | ||
202 | reg = <0xe6870000 0x100>; | ||
203 | interrupt-parent = <&gic>; | ||
204 | interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH | ||
205 | 0 126 IRQ_TYPE_LEVEL_HIGH | ||
206 | 0 127 IRQ_TYPE_LEVEL_HIGH>; | ||
193 | cap-sd-highspeed; | 207 | cap-sd-highspeed; |
194 | cap-sdio-irq; | 208 | cap-sdio-irq; |
195 | status = "disabled"; | 209 | status = "disabled"; |
196 | }; | 210 | }; |
211 | |||
212 | sh_fsi2: sound@fe1f0000 { | ||
213 | #sound-dai-cells = <1>; | ||
214 | compatible = "renesas,sh_fsi2"; | ||
215 | reg = <0xfe1f0000 0x400>; | ||
216 | interrupt-parent = <&gic>; | ||
217 | interrupts = <0 9 0x4>; | ||
218 | status = "disabled"; | ||
219 | }; | ||
197 | }; | 220 | }; |
diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts index 969e386e852c..bb62c7a906f4 100644 --- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts +++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts | |||
@@ -15,7 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | /dts-v1/; | 17 | /dts-v1/; |
18 | /include/ "r8a7778.dtsi" | 18 | #include "r8a7778.dtsi" |
19 | #include <dt-bindings/interrupt-controller/irq.h> | ||
19 | 20 | ||
20 | / { | 21 | / { |
21 | model = "bockw"; | 22 | model = "bockw"; |
@@ -45,13 +46,65 @@ | |||
45 | 46 | ||
46 | phy-mode = "mii"; | 47 | phy-mode = "mii"; |
47 | interrupt-parent = <&irqpin>; | 48 | interrupt-parent = <&irqpin>; |
48 | interrupts = <0 0>; /* IRQ0: hwirq 0 on irqpin */ | 49 | interrupts = <0 IRQ_TYPE_EDGE_FALLING>; |
49 | reg-io-width = <4>; | 50 | reg-io-width = <4>; |
50 | vddvario-supply = <&fixedregulator3v3>; | 51 | vddvario-supply = <&fixedregulator3v3>; |
51 | vdd33a-supply = <&fixedregulator3v3>; | 52 | vdd33a-supply = <&fixedregulator3v3>; |
52 | }; | 53 | }; |
54 | |||
55 | }; | ||
56 | |||
57 | &mmcif { | ||
58 | pinctrl-0 = <&mmc_pins>; | ||
59 | pinctrl-names = "default"; | ||
60 | |||
61 | vmmc-supply = <&fixedregulator3v3>; | ||
62 | bus-width = <8>; | ||
63 | broken-cd; | ||
64 | status = "okay"; | ||
53 | }; | 65 | }; |
54 | 66 | ||
55 | &irqpin { | 67 | &irqpin { |
56 | status = "okay"; | 68 | status = "okay"; |
57 | }; | 69 | }; |
70 | |||
71 | &pfc { | ||
72 | pinctrl-0 = <&scif0_pins>; | ||
73 | pinctrl-names = "default"; | ||
74 | |||
75 | scif0_pins: serial0 { | ||
76 | renesas,groups = "scif0_data_a", "scif0_ctrl"; | ||
77 | renesas,function = "scif0"; | ||
78 | }; | ||
79 | |||
80 | mmc_pins: mmc { | ||
81 | renesas,groups = "mmc_data8", "mmc_ctrl"; | ||
82 | renesas,function = "mmc"; | ||
83 | }; | ||
84 | |||
85 | sdhi0_pins: sd0 { | ||
86 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", | ||
87 | "sdhi0_cd", "sdhi0_wp"; | ||
88 | renesas,function = "sdhi0"; | ||
89 | }; | ||
90 | |||
91 | hspi0_pins: hspi0 { | ||
92 | renesas,groups = "hspi0_a"; | ||
93 | renesas,function = "hspi0"; | ||
94 | }; | ||
95 | }; | ||
96 | |||
97 | &sdhi0 { | ||
98 | pinctrl-0 = <&sdhi0_pins>; | ||
99 | pinctrl-names = "default"; | ||
100 | |||
101 | vmmc-supply = <&fixedregulator3v3>; | ||
102 | bus-width = <4>; | ||
103 | status = "okay"; | ||
104 | }; | ||
105 | |||
106 | &hspi0 { | ||
107 | pinctrl-0 = <&hspi0_pins>; | ||
108 | pinctrl-names = "default"; | ||
109 | status = "okay"; | ||
110 | }; | ||
diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts b/arch/arm/boot/dts/r8a7778-bockw.dts index 12bbebc9c955..46a884d45175 100644 --- a/arch/arm/boot/dts/r8a7778-bockw.dts +++ b/arch/arm/boot/dts/r8a7778-bockw.dts | |||
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | /dts-v1/; | 17 | /dts-v1/; |
18 | /include/ "r8a7778.dtsi" | 18 | #include "r8a7778.dtsi" |
19 | 19 | ||
20 | / { | 20 | / { |
21 | model = "bockw"; | 21 | model = "bockw"; |
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi index a6308a399e2d..ddb3bd7a8838 100644 --- a/arch/arm/boot/dts/r8a7778.dtsi +++ b/arch/arm/boot/dts/r8a7778.dtsi | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | /include/ "skeleton.dtsi" | 17 | /include/ "skeleton.dtsi" |
18 | 18 | ||
19 | #include <dt-bindings/interrupt-controller/irq.h> | ||
20 | |||
19 | / { | 21 | / { |
20 | compatible = "renesas,r8a7778"; | 22 | compatible = "renesas,r8a7778"; |
21 | 23 | ||
@@ -25,6 +27,12 @@ | |||
25 | }; | 27 | }; |
26 | }; | 28 | }; |
27 | 29 | ||
30 | aliases { | ||
31 | spi0 = &hspi0; | ||
32 | spi1 = &hspi1; | ||
33 | spi2 = &hspi2; | ||
34 | }; | ||
35 | |||
28 | gic: interrupt-controller@fe438000 { | 36 | gic: interrupt-controller@fe438000 { |
29 | compatible = "arm,cortex-a9-gic"; | 37 | compatible = "arm,cortex-a9-gic"; |
30 | #interrupt-cells = <3>; | 38 | #interrupt-cells = <3>; |
@@ -35,7 +43,7 @@ | |||
35 | 43 | ||
36 | /* irqpin: IRQ0 - IRQ3 */ | 44 | /* irqpin: IRQ0 - IRQ3 */ |
37 | irqpin: irqpin@fe78001c { | 45 | irqpin: irqpin@fe78001c { |
38 | compatible = "renesas,intc-irqpin"; | 46 | compatible = "renesas,intc-irqpin-r8a7778", "renesas,intc-irqpin"; |
39 | #interrupt-cells = <2>; | 47 | #interrupt-cells = <2>; |
40 | interrupt-controller; | 48 | interrupt-controller; |
41 | status = "disabled"; /* default off */ | 49 | status = "disabled"; /* default off */ |
@@ -45,10 +53,10 @@ | |||
45 | <0xfe780044 4>, | 53 | <0xfe780044 4>, |
46 | <0xfe780064 4>; | 54 | <0xfe780064 4>; |
47 | interrupt-parent = <&gic>; | 55 | interrupt-parent = <&gic>; |
48 | interrupts = <0 27 0x4 | 56 | interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH |
49 | 0 28 0x4 | 57 | 0 28 IRQ_TYPE_LEVEL_HIGH |
50 | 0 29 0x4 | 58 | 0 29 IRQ_TYPE_LEVEL_HIGH |
51 | 0 30 0x4>; | 59 | 0 30 IRQ_TYPE_LEVEL_HIGH>; |
52 | sense-bitfield-width = <2>; | 60 | sense-bitfield-width = <2>; |
53 | }; | 61 | }; |
54 | 62 | ||
@@ -56,7 +64,7 @@ | |||
56 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | 64 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; |
57 | reg = <0xffc40000 0x2c>; | 65 | reg = <0xffc40000 0x2c>; |
58 | interrupt-parent = <&gic>; | 66 | interrupt-parent = <&gic>; |
59 | interrupts = <0 103 0x4>; | 67 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; |
60 | #gpio-cells = <2>; | 68 | #gpio-cells = <2>; |
61 | gpio-controller; | 69 | gpio-controller; |
62 | gpio-ranges = <&pfc 0 0 32>; | 70 | gpio-ranges = <&pfc 0 0 32>; |
@@ -68,7 +76,7 @@ | |||
68 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | 76 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; |
69 | reg = <0xffc41000 0x2c>; | 77 | reg = <0xffc41000 0x2c>; |
70 | interrupt-parent = <&gic>; | 78 | interrupt-parent = <&gic>; |
71 | interrupts = <0 103 0x4>; | 79 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; |
72 | #gpio-cells = <2>; | 80 | #gpio-cells = <2>; |
73 | gpio-controller; | 81 | gpio-controller; |
74 | gpio-ranges = <&pfc 0 32 32>; | 82 | gpio-ranges = <&pfc 0 32 32>; |
@@ -80,7 +88,7 @@ | |||
80 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | 88 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; |
81 | reg = <0xffc42000 0x2c>; | 89 | reg = <0xffc42000 0x2c>; |
82 | interrupt-parent = <&gic>; | 90 | interrupt-parent = <&gic>; |
83 | interrupts = <0 103 0x4>; | 91 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; |
84 | #gpio-cells = <2>; | 92 | #gpio-cells = <2>; |
85 | gpio-controller; | 93 | gpio-controller; |
86 | gpio-ranges = <&pfc 0 64 32>; | 94 | gpio-ranges = <&pfc 0 64 32>; |
@@ -92,7 +100,7 @@ | |||
92 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | 100 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; |
93 | reg = <0xffc43000 0x2c>; | 101 | reg = <0xffc43000 0x2c>; |
94 | interrupt-parent = <&gic>; | 102 | interrupt-parent = <&gic>; |
95 | interrupts = <0 103 0x4>; | 103 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; |
96 | #gpio-cells = <2>; | 104 | #gpio-cells = <2>; |
97 | gpio-controller; | 105 | gpio-controller; |
98 | gpio-ranges = <&pfc 0 96 32>; | 106 | gpio-ranges = <&pfc 0 96 32>; |
@@ -104,7 +112,7 @@ | |||
104 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | 112 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; |
105 | reg = <0xffc44000 0x2c>; | 113 | reg = <0xffc44000 0x2c>; |
106 | interrupt-parent = <&gic>; | 114 | interrupt-parent = <&gic>; |
107 | interrupts = <0 103 0x4>; | 115 | interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; |
108 | #gpio-cells = <2>; | 116 | #gpio-cells = <2>; |
109 | gpio-controller; | 117 | gpio-controller; |
110 | gpio-ranges = <&pfc 0 128 27>; | 118 | gpio-ranges = <&pfc 0 128 27>; |
@@ -114,6 +122,148 @@ | |||
114 | 122 | ||
115 | pfc: pfc@fffc0000 { | 123 | pfc: pfc@fffc0000 { |
116 | compatible = "renesas,pfc-r8a7778"; | 124 | compatible = "renesas,pfc-r8a7778"; |
117 | reg = <0xfffc000 0x118>; | 125 | reg = <0xfffc0000 0x118>; |
126 | }; | ||
127 | |||
128 | i2c0: i2c@ffc70000 { | ||
129 | #address-cells = <1>; | ||
130 | #size-cells = <0>; | ||
131 | compatible = "renesas,i2c-r8a7778"; | ||
132 | reg = <0xffc70000 0x1000>; | ||
133 | interrupt-parent = <&gic>; | ||
134 | interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; | ||
135 | status = "disabled"; | ||
136 | }; | ||
137 | |||
138 | i2c1: i2c@ffc71000 { | ||
139 | #address-cells = <1>; | ||
140 | #size-cells = <0>; | ||
141 | compatible = "renesas,i2c-r8a7778"; | ||
142 | reg = <0xffc71000 0x1000>; | ||
143 | interrupt-parent = <&gic>; | ||
144 | interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; | ||
145 | status = "disabled"; | ||
146 | }; | ||
147 | |||
148 | i2c2: i2c@ffc72000 { | ||
149 | #address-cells = <1>; | ||
150 | #size-cells = <0>; | ||
151 | compatible = "renesas,i2c-r8a7778"; | ||
152 | reg = <0xffc72000 0x1000>; | ||
153 | interrupt-parent = <&gic>; | ||
154 | interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>; | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | |||
158 | i2c3: i2c@ffc73000 { | ||
159 | #address-cells = <1>; | ||
160 | #size-cells = <0>; | ||
161 | compatible = "renesas,i2c-r8a7778"; | ||
162 | reg = <0xffc73000 0x1000>; | ||
163 | interrupt-parent = <&gic>; | ||
164 | interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>; | ||
165 | status = "disabled"; | ||
166 | }; | ||
167 | |||
168 | mmcif: mmc@ffe4e000 { | ||
169 | compatible = "renesas,sh-mmcif"; | ||
170 | reg = <0xffe4e000 0x100>; | ||
171 | interrupt-parent = <&gic>; | ||
172 | interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>; | ||
173 | status = "disabled"; | ||
174 | }; | ||
175 | |||
176 | sdhi0: sd@ffe4c000 { | ||
177 | compatible = "renesas,sdhi-r8a7778"; | ||
178 | reg = <0xffe4c000 0x100>; | ||
179 | interrupt-parent = <&gic>; | ||
180 | interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>; | ||
181 | cap-sd-highspeed; | ||
182 | cap-sdio-irq; | ||
183 | status = "disabled"; | ||
184 | }; | ||
185 | |||
186 | sdhi1: sd@ffe4d000 { | ||
187 | compatible = "renesas,sdhi-r8a7778"; | ||
188 | reg = <0xffe4d000 0x100>; | ||
189 | interrupt-parent = <&gic>; | ||
190 | interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>; | ||
191 | cap-sd-highspeed; | ||
192 | cap-sdio-irq; | ||
193 | status = "disabled"; | ||
194 | }; | ||
195 | |||
196 | sdhi2: sd@ffe4f000 { | ||
197 | compatible = "renesas,sdhi-r8a7778"; | ||
198 | reg = <0xffe4f000 0x100>; | ||
199 | interrupt-parent = <&gic>; | ||
200 | interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>; | ||
201 | cap-sd-highspeed; | ||
202 | cap-sdio-irq; | ||
203 | status = "disabled"; | ||
204 | }; | ||
205 | |||
206 | i2c0: i2c@ffc70000 { | ||
207 | #address-cells = <1>; | ||
208 | #size-cells = <0>; | ||
209 | compatible = "renesas,i2c-r8a7778"; | ||
210 | reg = <0xffc70000 0x1000>; | ||
211 | interrupt-parent = <&gic>; | ||
212 | interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; | ||
213 | status = "disabled"; | ||
214 | }; | ||
215 | |||
216 | i2c1: i2c@ffc71000 { | ||
217 | #address-cells = <1>; | ||
218 | #size-cells = <0>; | ||
219 | compatible = "renesas,i2c-r8a7778"; | ||
220 | reg = <0xffc71000 0x1000>; | ||
221 | interrupt-parent = <&gic>; | ||
222 | interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; | ||
223 | status = "disabled"; | ||
224 | }; | ||
225 | |||
226 | i2c2: i2c@ffc72000 { | ||
227 | #address-cells = <1>; | ||
228 | #size-cells = <0>; | ||
229 | compatible = "renesas,i2c-r8a7778"; | ||
230 | reg = <0xffc72000 0x1000>; | ||
231 | interrupt-parent = <&gic>; | ||
232 | interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>; | ||
233 | status = "disabled"; | ||
234 | }; | ||
235 | |||
236 | i2c3: i2c@ffc73000 { | ||
237 | #address-cells = <1>; | ||
238 | #size-cells = <0>; | ||
239 | compatible = "renesas,i2c-r8a7778"; | ||
240 | reg = <0xffc73000 0x1000>; | ||
241 | interrupt-parent = <&gic>; | ||
242 | interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>; | ||
243 | status = "disabled"; | ||
244 | }; | ||
245 | |||
246 | hspi0: spi@fffc7000 { | ||
247 | compatible = "renesas,hspi"; | ||
248 | reg = <0xfffc7000 0x18>; | ||
249 | interrupt-controller = <&gic>; | ||
250 | interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>; | ||
251 | status = "disabled"; | ||
252 | }; | ||
253 | |||
254 | hspi1: spi@fffc8000 { | ||
255 | compatible = "renesas,hspi"; | ||
256 | reg = <0xfffc8000 0x18>; | ||
257 | interrupt-controller = <&gic>; | ||
258 | interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>; | ||
259 | status = "disabled"; | ||
260 | }; | ||
261 | |||
262 | hspi2: spi@fffc6000 { | ||
263 | compatible = "renesas,hspi"; | ||
264 | reg = <0xfffc6000 0x18>; | ||
265 | interrupt-controller = <&gic>; | ||
266 | interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>; | ||
267 | status = "disabled"; | ||
118 | }; | 268 | }; |
119 | }; | 269 | }; |
diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts index ab4110aa3c3b..76f5eef7d1cc 100644 --- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts +++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts | |||
@@ -10,8 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | /include/ "r8a7779.dtsi" | 13 | #include "r8a7779.dtsi" |
14 | #include <dt-bindings/gpio/gpio.h> | 14 | #include <dt-bindings/gpio/gpio.h> |
15 | #include <dt-bindings/interrupt-controller/irq.h> | ||
15 | 16 | ||
16 | / { | 17 | / { |
17 | model = "marzen"; | 18 | model = "marzen"; |
@@ -43,7 +44,7 @@ | |||
43 | 44 | ||
44 | phy-mode = "mii"; | 45 | phy-mode = "mii"; |
45 | interrupt-parent = <&irqpin0>; | 46 | interrupt-parent = <&irqpin0>; |
46 | interrupts = <1 0>; /* IRQ1: hwirq 1 on irqpin0 */ | 47 | interrupts = <1 IRQ_TYPE_EDGE_FALLING>; |
47 | reg-io-width = <4>; | 48 | reg-io-width = <4>; |
48 | vddvario-supply = <&fixedregulator3v3>; | 49 | vddvario-supply = <&fixedregulator3v3>; |
49 | vdd33a-supply = <&fixedregulator3v3>; | 50 | vdd33a-supply = <&fixedregulator3v3>; |
@@ -68,7 +69,7 @@ | |||
68 | }; | 69 | }; |
69 | 70 | ||
70 | &pfc { | 71 | &pfc { |
71 | pinctrl-0 = <&scif2_pins &scif4_pins &sdhi0_pins>; | 72 | pinctrl-0 = <&scif2_pins &scif4_pins>; |
72 | pinctrl-names = "default"; | 73 | pinctrl-names = "default"; |
73 | 74 | ||
74 | lan0_pins: lan0 { | 75 | lan0_pins: lan0 { |
@@ -82,19 +83,38 @@ | |||
82 | }; | 83 | }; |
83 | }; | 84 | }; |
84 | 85 | ||
85 | scif2_pins: scif2 { | 86 | scif2_pins: serial2 { |
86 | renesas,groups = "scif2_data_c"; | 87 | renesas,groups = "scif2_data_c"; |
87 | renesas,function = "scif2"; | 88 | renesas,function = "scif2"; |
88 | }; | 89 | }; |
89 | 90 | ||
90 | scif4_pins: scif4 { | 91 | scif4_pins: serial4 { |
91 | renesas,groups = "scif4_data"; | 92 | renesas,groups = "scif4_data"; |
92 | renesas,function = "scif4"; | 93 | renesas,function = "scif4"; |
93 | }; | 94 | }; |
94 | 95 | ||
95 | sdhi0_pins: sdhi0 { | 96 | sdhi0_pins: sd0 { |
96 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", | 97 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; |
97 | "sdhi0_wp"; | ||
98 | renesas,function = "sdhi0"; | 98 | renesas,function = "sdhi0"; |
99 | }; | 99 | }; |
100 | |||
101 | hspi0_pins: hspi0 { | ||
102 | renesas,groups = "hspi0"; | ||
103 | renesas,function = "hspi0"; | ||
104 | }; | ||
105 | }; | ||
106 | |||
107 | &sdhi0 { | ||
108 | pinctrl-0 = <&sdhi0_pins>; | ||
109 | pinctrl-names = "default"; | ||
110 | |||
111 | vmmc-supply = <&fixedregulator3v3>; | ||
112 | bus-width = <4>; | ||
113 | status = "okay"; | ||
114 | }; | ||
115 | |||
116 | &hspi0 { | ||
117 | pinctrl-0 = <&hspi0_pins>; | ||
118 | pinctrl-names = "default"; | ||
119 | status = "okay"; | ||
100 | }; | 120 | }; |
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts index f3f7f7999736..a7af2c2371f2 100644 --- a/arch/arm/boot/dts/r8a7779-marzen.dts +++ b/arch/arm/boot/dts/r8a7779-marzen.dts | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | /include/ "r8a7779.dtsi" | 13 | #include "r8a7779.dtsi" |
14 | 14 | ||
15 | / { | 15 | / { |
16 | model = "marzen"; | 16 | model = "marzen"; |
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index 19faeac3fd2e..d0561d4c7c46 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | /include/ "skeleton.dtsi" | 12 | /include/ "skeleton.dtsi" |
13 | 13 | ||
14 | #include <dt-bindings/interrupt-controller/irq.h> | ||
15 | |||
14 | / { | 16 | / { |
15 | compatible = "renesas,r8a7779"; | 17 | compatible = "renesas,r8a7779"; |
16 | 18 | ||
@@ -40,6 +42,12 @@ | |||
40 | }; | 42 | }; |
41 | }; | 43 | }; |
42 | 44 | ||
45 | aliases { | ||
46 | spi0 = &hspi0; | ||
47 | spi1 = &hspi1; | ||
48 | spi2 = &hspi2; | ||
49 | }; | ||
50 | |||
43 | gic: interrupt-controller@f0001000 { | 51 | gic: interrupt-controller@f0001000 { |
44 | compatible = "arm,cortex-a9-gic"; | 52 | compatible = "arm,cortex-a9-gic"; |
45 | #interrupt-cells = <3>; | 53 | #interrupt-cells = <3>; |
@@ -52,7 +60,7 @@ | |||
52 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 60 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
53 | reg = <0xffc40000 0x2c>; | 61 | reg = <0xffc40000 0x2c>; |
54 | interrupt-parent = <&gic>; | 62 | interrupt-parent = <&gic>; |
55 | interrupts = <0 141 0x4>; | 63 | interrupts = <0 141 IRQ_TYPE_LEVEL_HIGH>; |
56 | #gpio-cells = <2>; | 64 | #gpio-cells = <2>; |
57 | gpio-controller; | 65 | gpio-controller; |
58 | gpio-ranges = <&pfc 0 0 32>; | 66 | gpio-ranges = <&pfc 0 0 32>; |
@@ -64,7 +72,7 @@ | |||
64 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 72 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
65 | reg = <0xffc41000 0x2c>; | 73 | reg = <0xffc41000 0x2c>; |
66 | interrupt-parent = <&gic>; | 74 | interrupt-parent = <&gic>; |
67 | interrupts = <0 142 0x4>; | 75 | interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>; |
68 | #gpio-cells = <2>; | 76 | #gpio-cells = <2>; |
69 | gpio-controller; | 77 | gpio-controller; |
70 | gpio-ranges = <&pfc 0 32 32>; | 78 | gpio-ranges = <&pfc 0 32 32>; |
@@ -76,7 +84,7 @@ | |||
76 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 84 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
77 | reg = <0xffc42000 0x2c>; | 85 | reg = <0xffc42000 0x2c>; |
78 | interrupt-parent = <&gic>; | 86 | interrupt-parent = <&gic>; |
79 | interrupts = <0 143 0x4>; | 87 | interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>; |
80 | #gpio-cells = <2>; | 88 | #gpio-cells = <2>; |
81 | gpio-controller; | 89 | gpio-controller; |
82 | gpio-ranges = <&pfc 0 64 32>; | 90 | gpio-ranges = <&pfc 0 64 32>; |
@@ -88,7 +96,7 @@ | |||
88 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 96 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
89 | reg = <0xffc43000 0x2c>; | 97 | reg = <0xffc43000 0x2c>; |
90 | interrupt-parent = <&gic>; | 98 | interrupt-parent = <&gic>; |
91 | interrupts = <0 144 0x4>; | 99 | interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; |
92 | #gpio-cells = <2>; | 100 | #gpio-cells = <2>; |
93 | gpio-controller; | 101 | gpio-controller; |
94 | gpio-ranges = <&pfc 0 96 32>; | 102 | gpio-ranges = <&pfc 0 96 32>; |
@@ -100,7 +108,7 @@ | |||
100 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 108 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
101 | reg = <0xffc44000 0x2c>; | 109 | reg = <0xffc44000 0x2c>; |
102 | interrupt-parent = <&gic>; | 110 | interrupt-parent = <&gic>; |
103 | interrupts = <0 145 0x4>; | 111 | interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>; |
104 | #gpio-cells = <2>; | 112 | #gpio-cells = <2>; |
105 | gpio-controller; | 113 | gpio-controller; |
106 | gpio-ranges = <&pfc 0 128 32>; | 114 | gpio-ranges = <&pfc 0 128 32>; |
@@ -112,7 +120,7 @@ | |||
112 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 120 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
113 | reg = <0xffc45000 0x2c>; | 121 | reg = <0xffc45000 0x2c>; |
114 | interrupt-parent = <&gic>; | 122 | interrupt-parent = <&gic>; |
115 | interrupts = <0 146 0x4>; | 123 | interrupts = <0 146 IRQ_TYPE_LEVEL_HIGH>; |
116 | #gpio-cells = <2>; | 124 | #gpio-cells = <2>; |
117 | gpio-controller; | 125 | gpio-controller; |
118 | gpio-ranges = <&pfc 0 160 32>; | 126 | gpio-ranges = <&pfc 0 160 32>; |
@@ -124,7 +132,7 @@ | |||
124 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | 132 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; |
125 | reg = <0xffc46000 0x2c>; | 133 | reg = <0xffc46000 0x2c>; |
126 | interrupt-parent = <&gic>; | 134 | interrupt-parent = <&gic>; |
127 | interrupts = <0 147 0x4>; | 135 | interrupts = <0 147 IRQ_TYPE_LEVEL_HIGH>; |
128 | #gpio-cells = <2>; | 136 | #gpio-cells = <2>; |
129 | gpio-controller; | 137 | gpio-controller; |
130 | gpio-ranges = <&pfc 0 192 9>; | 138 | gpio-ranges = <&pfc 0 192 9>; |
@@ -133,7 +141,7 @@ | |||
133 | }; | 141 | }; |
134 | 142 | ||
135 | irqpin0: irqpin@fe780010 { | 143 | irqpin0: irqpin@fe780010 { |
136 | compatible = "renesas,intc-irqpin"; | 144 | compatible = "renesas,intc-irqpin-r8a7779", "renesas,intc-irqpin"; |
137 | #interrupt-cells = <2>; | 145 | #interrupt-cells = <2>; |
138 | status = "disabled"; | 146 | status = "disabled"; |
139 | interrupt-controller; | 147 | interrupt-controller; |
@@ -143,50 +151,50 @@ | |||
143 | <0xfe780044 4>, | 151 | <0xfe780044 4>, |
144 | <0xfe780064 4>; | 152 | <0xfe780064 4>; |
145 | interrupt-parent = <&gic>; | 153 | interrupt-parent = <&gic>; |
146 | interrupts = <0 27 0x4 | 154 | interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH |
147 | 0 28 0x4 | 155 | 0 28 IRQ_TYPE_LEVEL_HIGH |
148 | 0 29 0x4 | 156 | 0 29 IRQ_TYPE_LEVEL_HIGH |
149 | 0 30 0x4>; | 157 | 0 30 IRQ_TYPE_LEVEL_HIGH>; |
150 | sense-bitfield-width = <2>; | 158 | sense-bitfield-width = <2>; |
151 | }; | 159 | }; |
152 | 160 | ||
153 | i2c0: i2c@ffc70000 { | 161 | i2c0: i2c@ffc70000 { |
154 | #address-cells = <1>; | 162 | #address-cells = <1>; |
155 | #size-cells = <0>; | 163 | #size-cells = <0>; |
156 | compatible = "renesas,rmobile-iic"; | 164 | compatible = "renesas,i2c-r8a7779"; |
157 | reg = <0xffc70000 0x1000>; | 165 | reg = <0xffc70000 0x1000>; |
158 | interrupt-parent = <&gic>; | 166 | interrupt-parent = <&gic>; |
159 | interrupts = <0 79 0x4>; | 167 | interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; |
160 | status = "disabled"; | 168 | status = "disabled"; |
161 | }; | 169 | }; |
162 | 170 | ||
163 | i2c1: i2c@ffc71000 { | 171 | i2c1: i2c@ffc71000 { |
164 | #address-cells = <1>; | 172 | #address-cells = <1>; |
165 | #size-cells = <0>; | 173 | #size-cells = <0>; |
166 | compatible = "renesas,rmobile-iic"; | 174 | compatible = "renesas,i2c-r8a7779"; |
167 | reg = <0xffc71000 0x1000>; | 175 | reg = <0xffc71000 0x1000>; |
168 | interrupt-parent = <&gic>; | 176 | interrupt-parent = <&gic>; |
169 | interrupts = <0 82 0x4>; | 177 | interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; |
170 | status = "disabled"; | 178 | status = "disabled"; |
171 | }; | 179 | }; |
172 | 180 | ||
173 | i2c2: i2c@ffc72000 { | 181 | i2c2: i2c@ffc72000 { |
174 | #address-cells = <1>; | 182 | #address-cells = <1>; |
175 | #size-cells = <0>; | 183 | #size-cells = <0>; |
176 | compatible = "renesas,rmobile-iic"; | 184 | compatible = "renesas,i2c-r8a7779"; |
177 | reg = <0xffc72000 0x1000>; | 185 | reg = <0xffc72000 0x1000>; |
178 | interrupt-parent = <&gic>; | 186 | interrupt-parent = <&gic>; |
179 | interrupts = <0 80 0x4>; | 187 | interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; |
180 | status = "disabled"; | 188 | status = "disabled"; |
181 | }; | 189 | }; |
182 | 190 | ||
183 | i2c3: i2c@ffc73000 { | 191 | i2c3: i2c@ffc73000 { |
184 | #address-cells = <1>; | 192 | #address-cells = <1>; |
185 | #size-cells = <0>; | 193 | #size-cells = <0>; |
186 | compatible = "renesas,rmobile-iic"; | 194 | compatible = "renesas,i2c-r8a7779"; |
187 | reg = <0xffc73000 0x1000>; | 195 | reg = <0xffc73000 0x1000>; |
188 | interrupt-parent = <&gic>; | 196 | interrupt-parent = <&gic>; |
189 | interrupts = <0 81 0x4>; | 197 | interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; |
190 | status = "disabled"; | 198 | status = "disabled"; |
191 | }; | 199 | }; |
192 | 200 | ||
@@ -204,6 +212,70 @@ | |||
204 | compatible = "renesas,rcar-sata"; | 212 | compatible = "renesas,rcar-sata"; |
205 | reg = <0xfc600000 0x2000>; | 213 | reg = <0xfc600000 0x2000>; |
206 | interrupt-parent = <&gic>; | 214 | interrupt-parent = <&gic>; |
207 | interrupts = <0 100 0x4>; | 215 | interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; |
216 | }; | ||
217 | |||
218 | sdhi0: sd@ffe4c000 { | ||
219 | compatible = "renesas,sdhi-r8a7779"; | ||
220 | reg = <0xffe4c000 0x100>; | ||
221 | interrupt-parent = <&gic>; | ||
222 | interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; | ||
223 | cap-sd-highspeed; | ||
224 | cap-sdio-irq; | ||
225 | status = "disabled"; | ||
226 | }; | ||
227 | |||
228 | sdhi1: sd@ffe4d000 { | ||
229 | compatible = "renesas,sdhi-r8a7779"; | ||
230 | reg = <0xffe4d000 0x100>; | ||
231 | interrupt-parent = <&gic>; | ||
232 | interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; | ||
233 | cap-sd-highspeed; | ||
234 | cap-sdio-irq; | ||
235 | status = "disabled"; | ||
236 | }; | ||
237 | |||
238 | sdhi2: sd@ffe4e000 { | ||
239 | compatible = "renesas,sdhi-r8a7779"; | ||
240 | reg = <0xffe4e000 0x100>; | ||
241 | interrupt-parent = <&gic>; | ||
242 | interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; | ||
243 | cap-sd-highspeed; | ||
244 | cap-sdio-irq; | ||
245 | status = "disabled"; | ||
246 | }; | ||
247 | |||
248 | sdhi3: sd@ffe4f000 { | ||
249 | compatible = "renesas,sdhi-r8a7779"; | ||
250 | reg = <0xffe4f000 0x100>; | ||
251 | interrupt-parent = <&gic>; | ||
252 | interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; | ||
253 | cap-sd-highspeed; | ||
254 | cap-sdio-irq; | ||
255 | status = "disabled"; | ||
256 | }; | ||
257 | |||
258 | hspi0: spi@fffc7000 { | ||
259 | compatible = "renesas,hspi"; | ||
260 | reg = <0xfffc7000 0x18>; | ||
261 | interrupt-controller = <&gic>; | ||
262 | interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; | ||
263 | status = "disabled"; | ||
264 | }; | ||
265 | |||
266 | hspi1: spi@fffc8000 { | ||
267 | compatible = "renesas,hspi"; | ||
268 | reg = <0xfffc8000 0x18>; | ||
269 | interrupt-controller = <&gic>; | ||
270 | interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; | ||
271 | status = "disabled"; | ||
272 | }; | ||
273 | |||
274 | hspi2: spi@fffc6000 { | ||
275 | compatible = "renesas,hspi"; | ||
276 | reg = <0xfffc6000 0x18>; | ||
277 | interrupt-controller = <&gic>; | ||
278 | interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; | ||
279 | status = "disabled"; | ||
208 | }; | 280 | }; |
209 | }; | 281 | }; |
diff --git a/arch/arm/boot/dts/r8a7790-lager-reference.dts b/arch/arm/boot/dts/r8a7790-lager-reference.dts index c462ef138922..dfedc0ea82e1 100644 --- a/arch/arm/boot/dts/r8a7790-lager-reference.dts +++ b/arch/arm/boot/dts/r8a7790-lager-reference.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a7790.dtsi" | 12 | #include "r8a7790.dtsi" |
13 | #include <dt-bindings/gpio/gpio.h> | 13 | #include <dt-bindings/gpio/gpio.h> |
14 | 14 | ||
15 | / { | 15 | / { |
@@ -25,6 +25,11 @@ | |||
25 | reg = <0 0x40000000 0 0x80000000>; | 25 | reg = <0 0x40000000 0 0x80000000>; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | memory@180000000 { | ||
29 | device_type = "memory"; | ||
30 | reg = <1 0x80000000 0 0x80000000>; | ||
31 | }; | ||
32 | |||
28 | lbsc { | 33 | lbsc { |
29 | #address-cells = <1>; | 34 | #address-cells = <1>; |
30 | #size-cells = <1>; | 35 | #size-cells = <1>; |
@@ -42,4 +47,43 @@ | |||
42 | gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; | 47 | gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; |
43 | }; | 48 | }; |
44 | }; | 49 | }; |
50 | |||
51 | fixedregulator3v3: fixedregulator@0 { | ||
52 | compatible = "regulator-fixed"; | ||
53 | regulator-name = "fixed-3.3V"; | ||
54 | regulator-min-microvolt = <3300000>; | ||
55 | regulator-max-microvolt = <3300000>; | ||
56 | regulator-boot-on; | ||
57 | regulator-always-on; | ||
58 | }; | ||
59 | }; | ||
60 | |||
61 | &pfc { | ||
62 | pinctrl-0 = <&scif0_pins &scif1_pins>; | ||
63 | pinctrl-names = "default"; | ||
64 | |||
65 | scif0_pins: serial0 { | ||
66 | renesas,groups = "scif0_data"; | ||
67 | renesas,function = "scif0"; | ||
68 | }; | ||
69 | |||
70 | scif1_pins: serial1 { | ||
71 | renesas,groups = "scif1_data"; | ||
72 | renesas,function = "scif1"; | ||
73 | }; | ||
74 | |||
75 | mmc1_pins: mmc1 { | ||
76 | renesas,groups = "mmc1_data8", "mmc1_ctrl"; | ||
77 | renesas,function = "mmc1"; | ||
78 | }; | ||
79 | }; | ||
80 | |||
81 | &mmcif1 { | ||
82 | pinctrl-0 = <&mmc1_pins>; | ||
83 | pinctrl-names = "default"; | ||
84 | |||
85 | vmmc-supply = <&fixedregulator3v3>; | ||
86 | bus-width = <8>; | ||
87 | non-removable; | ||
88 | status = "okay"; | ||
45 | }; | 89 | }; |
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 203bd089af29..10e6a08164e5 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a7790.dtsi" | 12 | #include "r8a7790.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "Lager"; | 15 | model = "Lager"; |
@@ -24,6 +24,11 @@ | |||
24 | reg = <0 0x40000000 0 0x80000000>; | 24 | reg = <0 0x40000000 0 0x80000000>; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | memory@180000000 { | ||
28 | device_type = "memory"; | ||
29 | reg = <1 0x80000000 0 0x80000000>; | ||
30 | }; | ||
31 | |||
27 | lbsc { | 32 | lbsc { |
28 | #address-cells = <1>; | 33 | #address-cells = <1>; |
29 | #size-cells = <1>; | 34 | #size-cells = <1>; |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index ee845fad939b..0e4d5b57c48b 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
@@ -8,6 +8,9 @@ | |||
8 | * kind, whether express or implied. | 8 | * kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
12 | #include <dt-bindings/interrupt-controller/irq.h> | ||
13 | |||
11 | / { | 14 | / { |
12 | compatible = "renesas,r8a7790"; | 15 | compatible = "renesas,r8a7790"; |
13 | interrupt-parent = <&gic>; | 16 | interrupt-parent = <&gic>; |
@@ -84,14 +87,14 @@ | |||
84 | <0 0xf1002000 0 0x1000>, | 87 | <0 0xf1002000 0 0x1000>, |
85 | <0 0xf1004000 0 0x2000>, | 88 | <0 0xf1004000 0 0x2000>, |
86 | <0 0xf1006000 0 0x2000>; | 89 | <0 0xf1006000 0 0x2000>; |
87 | interrupts = <1 9 0xf04>; | 90 | interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; |
88 | }; | 91 | }; |
89 | 92 | ||
90 | gpio0: gpio@ffc40000 { | 93 | gpio0: gpio@ffc40000 { |
91 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 94 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
92 | reg = <0 0xffc40000 0 0x2c>; | 95 | reg = <0 0xffc40000 0 0x2c>; |
93 | interrupt-parent = <&gic>; | 96 | interrupt-parent = <&gic>; |
94 | interrupts = <0 4 0x4>; | 97 | interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; |
95 | #gpio-cells = <2>; | 98 | #gpio-cells = <2>; |
96 | gpio-controller; | 99 | gpio-controller; |
97 | gpio-ranges = <&pfc 0 0 32>; | 100 | gpio-ranges = <&pfc 0 0 32>; |
@@ -103,7 +106,7 @@ | |||
103 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 106 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
104 | reg = <0 0xffc41000 0 0x2c>; | 107 | reg = <0 0xffc41000 0 0x2c>; |
105 | interrupt-parent = <&gic>; | 108 | interrupt-parent = <&gic>; |
106 | interrupts = <0 5 0x4>; | 109 | interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>; |
107 | #gpio-cells = <2>; | 110 | #gpio-cells = <2>; |
108 | gpio-controller; | 111 | gpio-controller; |
109 | gpio-ranges = <&pfc 0 32 32>; | 112 | gpio-ranges = <&pfc 0 32 32>; |
@@ -115,7 +118,7 @@ | |||
115 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 118 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
116 | reg = <0 0xffc42000 0 0x2c>; | 119 | reg = <0 0xffc42000 0 0x2c>; |
117 | interrupt-parent = <&gic>; | 120 | interrupt-parent = <&gic>; |
118 | interrupts = <0 6 0x4>; | 121 | interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>; |
119 | #gpio-cells = <2>; | 122 | #gpio-cells = <2>; |
120 | gpio-controller; | 123 | gpio-controller; |
121 | gpio-ranges = <&pfc 0 64 32>; | 124 | gpio-ranges = <&pfc 0 64 32>; |
@@ -127,7 +130,7 @@ | |||
127 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 130 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
128 | reg = <0 0xffc43000 0 0x2c>; | 131 | reg = <0 0xffc43000 0 0x2c>; |
129 | interrupt-parent = <&gic>; | 132 | interrupt-parent = <&gic>; |
130 | interrupts = <0 7 0x4>; | 133 | interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>; |
131 | #gpio-cells = <2>; | 134 | #gpio-cells = <2>; |
132 | gpio-controller; | 135 | gpio-controller; |
133 | gpio-ranges = <&pfc 0 96 32>; | 136 | gpio-ranges = <&pfc 0 96 32>; |
@@ -139,7 +142,7 @@ | |||
139 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 142 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
140 | reg = <0 0xffc44000 0 0x2c>; | 143 | reg = <0 0xffc44000 0 0x2c>; |
141 | interrupt-parent = <&gic>; | 144 | interrupt-parent = <&gic>; |
142 | interrupts = <0 8 0x4>; | 145 | interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>; |
143 | #gpio-cells = <2>; | 146 | #gpio-cells = <2>; |
144 | gpio-controller; | 147 | gpio-controller; |
145 | gpio-ranges = <&pfc 0 128 32>; | 148 | gpio-ranges = <&pfc 0 128 32>; |
@@ -151,7 +154,7 @@ | |||
151 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | 154 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; |
152 | reg = <0 0xffc45000 0 0x2c>; | 155 | reg = <0 0xffc45000 0 0x2c>; |
153 | interrupt-parent = <&gic>; | 156 | interrupt-parent = <&gic>; |
154 | interrupts = <0 9 0x4>; | 157 | interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; |
155 | #gpio-cells = <2>; | 158 | #gpio-cells = <2>; |
156 | gpio-controller; | 159 | gpio-controller; |
157 | gpio-ranges = <&pfc 0 160 32>; | 160 | gpio-ranges = <&pfc 0 160 32>; |
@@ -159,21 +162,31 @@ | |||
159 | interrupt-controller; | 162 | interrupt-controller; |
160 | }; | 163 | }; |
161 | 164 | ||
165 | thermal@e61f0000 { | ||
166 | compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal"; | ||
167 | reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>; | ||
168 | interrupt-parent = <&gic>; | ||
169 | interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; | ||
170 | }; | ||
171 | |||
162 | timer { | 172 | timer { |
163 | compatible = "arm,armv7-timer"; | 173 | compatible = "arm,armv7-timer"; |
164 | interrupts = <1 13 0xf08>, | 174 | interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
165 | <1 14 0xf08>, | 175 | <1 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
166 | <1 11 0xf08>, | 176 | <1 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
167 | <1 10 0xf08>; | 177 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
168 | }; | 178 | }; |
169 | 179 | ||
170 | irqc0: interrupt-controller@e61c0000 { | 180 | irqc0: interrupt-controller@e61c0000 { |
171 | compatible = "renesas,irqc"; | 181 | compatible = "renesas,irqc-r8a7790", "renesas,irqc"; |
172 | #interrupt-cells = <2>; | 182 | #interrupt-cells = <2>; |
173 | interrupt-controller; | 183 | interrupt-controller; |
174 | reg = <0 0xe61c0000 0 0x200>; | 184 | reg = <0 0xe61c0000 0 0x200>; |
175 | interrupt-parent = <&gic>; | 185 | interrupt-parent = <&gic>; |
176 | interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>; | 186 | interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>, |
187 | <0 1 IRQ_TYPE_LEVEL_HIGH>, | ||
188 | <0 2 IRQ_TYPE_LEVEL_HIGH>, | ||
189 | <0 3 IRQ_TYPE_LEVEL_HIGH>; | ||
177 | }; | 190 | }; |
178 | 191 | ||
179 | i2c0: i2c@e6508000 { | 192 | i2c0: i2c@e6508000 { |
@@ -182,7 +195,7 @@ | |||
182 | compatible = "renesas,i2c-r8a7790"; | 195 | compatible = "renesas,i2c-r8a7790"; |
183 | reg = <0 0xe6508000 0 0x40>; | 196 | reg = <0 0xe6508000 0 0x40>; |
184 | interrupt-parent = <&gic>; | 197 | interrupt-parent = <&gic>; |
185 | interrupts = <0 287 0x4>; | 198 | interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>; |
186 | status = "disabled"; | 199 | status = "disabled"; |
187 | }; | 200 | }; |
188 | 201 | ||
@@ -192,7 +205,7 @@ | |||
192 | compatible = "renesas,i2c-r8a7790"; | 205 | compatible = "renesas,i2c-r8a7790"; |
193 | reg = <0 0xe6518000 0 0x40>; | 206 | reg = <0 0xe6518000 0 0x40>; |
194 | interrupt-parent = <&gic>; | 207 | interrupt-parent = <&gic>; |
195 | interrupts = <0 288 0x4>; | 208 | interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>; |
196 | status = "disabled"; | 209 | status = "disabled"; |
197 | }; | 210 | }; |
198 | 211 | ||
@@ -202,7 +215,7 @@ | |||
202 | compatible = "renesas,i2c-r8a7790"; | 215 | compatible = "renesas,i2c-r8a7790"; |
203 | reg = <0 0xe6530000 0 0x40>; | 216 | reg = <0 0xe6530000 0 0x40>; |
204 | interrupt-parent = <&gic>; | 217 | interrupt-parent = <&gic>; |
205 | interrupts = <0 286 0x4>; | 218 | interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>; |
206 | status = "disabled"; | 219 | status = "disabled"; |
207 | }; | 220 | }; |
208 | 221 | ||
@@ -212,24 +225,24 @@ | |||
212 | compatible = "renesas,i2c-r8a7790"; | 225 | compatible = "renesas,i2c-r8a7790"; |
213 | reg = <0 0xe6540000 0 0x40>; | 226 | reg = <0 0xe6540000 0 0x40>; |
214 | interrupt-parent = <&gic>; | 227 | interrupt-parent = <&gic>; |
215 | interrupts = <0 290 0x4>; | 228 | interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>; |
216 | status = "disabled"; | 229 | status = "disabled"; |
217 | }; | 230 | }; |
218 | 231 | ||
219 | mmcif0: mmcif@ee200000 { | 232 | mmcif0: mmcif@ee200000 { |
220 | compatible = "renesas,sh-mmcif"; | 233 | compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif"; |
221 | reg = <0 0xee200000 0 0x80>; | 234 | reg = <0 0xee200000 0 0x80>; |
222 | interrupt-parent = <&gic>; | 235 | interrupt-parent = <&gic>; |
223 | interrupts = <0 169 0x4>; | 236 | interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; |
224 | reg-io-width = <4>; | 237 | reg-io-width = <4>; |
225 | status = "disabled"; | 238 | status = "disabled"; |
226 | }; | 239 | }; |
227 | 240 | ||
228 | mmcif1: mmcif@ee220000 { | 241 | mmcif1: mmc@ee220000 { |
229 | compatible = "renesas,sh-mmcif"; | 242 | compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif"; |
230 | reg = <0 0xee220000 0 0x80>; | 243 | reg = <0 0xee220000 0 0x80>; |
231 | interrupt-parent = <&gic>; | 244 | interrupt-parent = <&gic>; |
232 | interrupts = <0 170 0x4>; | 245 | interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>; |
233 | reg-io-width = <4>; | 246 | reg-io-width = <4>; |
234 | status = "disabled"; | 247 | status = "disabled"; |
235 | }; | 248 | }; |
@@ -239,38 +252,38 @@ | |||
239 | reg = <0 0xe6060000 0 0x250>; | 252 | reg = <0 0xe6060000 0 0x250>; |
240 | }; | 253 | }; |
241 | 254 | ||
242 | sdhi0: sdhi@ee100000 { | 255 | sdhi0: sd@ee100000 { |
243 | compatible = "renesas,sdhi-r8a7790"; | 256 | compatible = "renesas,sdhi-r8a7790"; |
244 | reg = <0 0xee100000 0 0x100>; | 257 | reg = <0 0xee100000 0 0x100>; |
245 | interrupt-parent = <&gic>; | 258 | interrupt-parent = <&gic>; |
246 | interrupts = <0 165 4>; | 259 | interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; |
247 | cap-sd-highspeed; | 260 | cap-sd-highspeed; |
248 | status = "disabled"; | 261 | status = "disabled"; |
249 | }; | 262 | }; |
250 | 263 | ||
251 | sdhi1: sdhi@ee120000 { | 264 | sdhi1: sd@ee120000 { |
252 | compatible = "renesas,sdhi-r8a7790"; | 265 | compatible = "renesas,sdhi-r8a7790"; |
253 | reg = <0 0xee120000 0 0x100>; | 266 | reg = <0 0xee120000 0 0x100>; |
254 | interrupt-parent = <&gic>; | 267 | interrupt-parent = <&gic>; |
255 | interrupts = <0 166 4>; | 268 | interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>; |
256 | cap-sd-highspeed; | 269 | cap-sd-highspeed; |
257 | status = "disabled"; | 270 | status = "disabled"; |
258 | }; | 271 | }; |
259 | 272 | ||
260 | sdhi2: sdhi@ee140000 { | 273 | sdhi2: sd@ee140000 { |
261 | compatible = "renesas,sdhi-r8a7790"; | 274 | compatible = "renesas,sdhi-r8a7790"; |
262 | reg = <0 0xee140000 0 0x100>; | 275 | reg = <0 0xee140000 0 0x100>; |
263 | interrupt-parent = <&gic>; | 276 | interrupt-parent = <&gic>; |
264 | interrupts = <0 167 4>; | 277 | interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; |
265 | cap-sd-highspeed; | 278 | cap-sd-highspeed; |
266 | status = "disabled"; | 279 | status = "disabled"; |
267 | }; | 280 | }; |
268 | 281 | ||
269 | sdhi3: sdhi@ee160000 { | 282 | sdhi3: sd@ee160000 { |
270 | compatible = "renesas,sdhi-r8a7790"; | 283 | compatible = "renesas,sdhi-r8a7790"; |
271 | reg = <0 0xee160000 0 0x100>; | 284 | reg = <0 0xee160000 0 0x100>; |
272 | interrupt-parent = <&gic>; | 285 | interrupt-parent = <&gic>; |
273 | interrupts = <0 168 4>; | 286 | interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>; |
274 | cap-sd-highspeed; | 287 | cap-sd-highspeed; |
275 | status = "disabled"; | 288 | status = "disabled"; |
276 | }; | 289 | }; |
diff --git a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts new file mode 100644 index 000000000000..19192731c24a --- /dev/null +++ b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the Koelsch board | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Electronics Corporation | ||
5 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | /dts-v1/; | ||
13 | #include "r8a7791.dtsi" | ||
14 | #include <dt-bindings/gpio/gpio.h> | ||
15 | |||
16 | / { | ||
17 | model = "Koelsch"; | ||
18 | compatible = "renesas,koelsch-reference", "renesas,r8a7791"; | ||
19 | |||
20 | chosen { | ||
21 | bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; | ||
22 | }; | ||
23 | |||
24 | memory@40000000 { | ||
25 | device_type = "memory"; | ||
26 | reg = <0 0x40000000 0 0x80000000>; | ||
27 | }; | ||
28 | |||
29 | lbsc { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <1>; | ||
32 | }; | ||
33 | |||
34 | leds { | ||
35 | compatible = "gpio-leds"; | ||
36 | led6 { | ||
37 | gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>; | ||
38 | }; | ||
39 | led7 { | ||
40 | gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; | ||
41 | }; | ||
42 | led8 { | ||
43 | gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; | ||
44 | }; | ||
45 | }; | ||
46 | }; | ||
47 | |||
48 | &pfc { | ||
49 | pinctrl-0 = <&scif0_pins &scif1_pins>; | ||
50 | pinctrl-names = "default"; | ||
51 | |||
52 | scif0_pins: serial0 { | ||
53 | renesas,groups = "scif0_data_d"; | ||
54 | renesas,function = "scif0"; | ||
55 | }; | ||
56 | |||
57 | scif1_pins: serial1 { | ||
58 | renesas,groups = "scif1_data_d"; | ||
59 | renesas,function = "scif1"; | ||
60 | }; | ||
61 | }; | ||
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index 1ce5250ec278..c4e8b3a0cd13 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | /include/ "r8a7791.dtsi" | 13 | #include "r8a7791.dtsi" |
14 | 14 | ||
15 | / { | 15 | / { |
16 | model = "Koelsch"; | 16 | model = "Koelsch"; |
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index fea5cfef4691..a349aff54c76 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi | |||
@@ -9,6 +9,9 @@ | |||
9 | * kind, whether express or implied. | 9 | * kind, whether express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
13 | #include <dt-bindings/interrupt-controller/irq.h> | ||
14 | |||
12 | / { | 15 | / { |
13 | compatible = "renesas,r8a7791"; | 16 | compatible = "renesas,r8a7791"; |
14 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
@@ -43,32 +46,141 @@ | |||
43 | <0 0xf1002000 0 0x1000>, | 46 | <0 0xf1002000 0 0x1000>, |
44 | <0 0xf1004000 0 0x2000>, | 47 | <0 0xf1004000 0 0x2000>, |
45 | <0 0xf1006000 0 0x2000>; | 48 | <0 0xf1006000 0 0x2000>; |
46 | interrupts = <1 9 0xf04>; | 49 | interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; |
50 | }; | ||
51 | |||
52 | gpio0: gpio@e6050000 { | ||
53 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
54 | reg = <0 0xe6050000 0 0x50>; | ||
55 | interrupt-parent = <&gic>; | ||
56 | interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; | ||
57 | #gpio-cells = <2>; | ||
58 | gpio-controller; | ||
59 | gpio-ranges = <&pfc 0 0 32>; | ||
60 | #interrupt-cells = <2>; | ||
61 | interrupt-controller; | ||
62 | }; | ||
63 | |||
64 | gpio1: gpio@e6051000 { | ||
65 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
66 | reg = <0 0xe6051000 0 0x50>; | ||
67 | interrupt-parent = <&gic>; | ||
68 | interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>; | ||
69 | #gpio-cells = <2>; | ||
70 | gpio-controller; | ||
71 | gpio-ranges = <&pfc 0 32 32>; | ||
72 | #interrupt-cells = <2>; | ||
73 | interrupt-controller; | ||
74 | }; | ||
75 | |||
76 | gpio2: gpio@e6052000 { | ||
77 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
78 | reg = <0 0xe6052000 0 0x50>; | ||
79 | interrupt-parent = <&gic>; | ||
80 | interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>; | ||
81 | #gpio-cells = <2>; | ||
82 | gpio-controller; | ||
83 | gpio-ranges = <&pfc 0 64 32>; | ||
84 | #interrupt-cells = <2>; | ||
85 | interrupt-controller; | ||
86 | }; | ||
87 | |||
88 | gpio3: gpio@e6053000 { | ||
89 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
90 | reg = <0 0xe6053000 0 0x50>; | ||
91 | interrupt-parent = <&gic>; | ||
92 | interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>; | ||
93 | #gpio-cells = <2>; | ||
94 | gpio-controller; | ||
95 | gpio-ranges = <&pfc 0 96 32>; | ||
96 | #interrupt-cells = <2>; | ||
97 | interrupt-controller; | ||
98 | }; | ||
99 | |||
100 | gpio4: gpio@e6054000 { | ||
101 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
102 | reg = <0 0xe6054000 0 0x50>; | ||
103 | interrupt-parent = <&gic>; | ||
104 | interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>; | ||
105 | #gpio-cells = <2>; | ||
106 | gpio-controller; | ||
107 | gpio-ranges = <&pfc 0 128 32>; | ||
108 | #interrupt-cells = <2>; | ||
109 | interrupt-controller; | ||
110 | }; | ||
111 | |||
112 | gpio5: gpio@e6055000 { | ||
113 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
114 | reg = <0 0xe6055000 0 0x50>; | ||
115 | interrupt-parent = <&gic>; | ||
116 | interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; | ||
117 | #gpio-cells = <2>; | ||
118 | gpio-controller; | ||
119 | gpio-ranges = <&pfc 0 160 32>; | ||
120 | #interrupt-cells = <2>; | ||
121 | interrupt-controller; | ||
122 | }; | ||
123 | |||
124 | gpio6: gpio@e6055400 { | ||
125 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
126 | reg = <0 0xe6055400 0 0x50>; | ||
127 | interrupt-parent = <&gic>; | ||
128 | interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>; | ||
129 | #gpio-cells = <2>; | ||
130 | gpio-controller; | ||
131 | gpio-ranges = <&pfc 0 192 32>; | ||
132 | #interrupt-cells = <2>; | ||
133 | interrupt-controller; | ||
134 | }; | ||
135 | |||
136 | gpio7: gpio@e6055800 { | ||
137 | compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar"; | ||
138 | reg = <0 0xe6055800 0 0x50>; | ||
139 | interrupt-parent = <&gic>; | ||
140 | interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; | ||
141 | #gpio-cells = <2>; | ||
142 | gpio-controller; | ||
143 | gpio-ranges = <&pfc 0 224 26>; | ||
144 | #interrupt-cells = <2>; | ||
145 | interrupt-controller; | ||
146 | }; | ||
147 | |||
148 | thermal@e61f0000 { | ||
149 | compatible = "renesas,thermal-r8a7791", "renesas,rcar-thermal"; | ||
150 | reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>; | ||
151 | interrupt-parent = <&gic>; | ||
152 | interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; | ||
47 | }; | 153 | }; |
48 | 154 | ||
49 | timer { | 155 | timer { |
50 | compatible = "arm,armv7-timer"; | 156 | compatible = "arm,armv7-timer"; |
51 | interrupts = <1 13 0xf08>, | 157 | interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
52 | <1 14 0xf08>, | 158 | <1 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
53 | <1 11 0xf08>, | 159 | <1 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
54 | <1 10 0xf08>; | 160 | <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
55 | }; | 161 | }; |
56 | 162 | ||
57 | irqc0: interrupt-controller@e61c0000 { | 163 | irqc0: interrupt-controller@e61c0000 { |
58 | compatible = "renesas,irqc"; | 164 | compatible = "renesas,irqc-r8a7791", "renesas,irqc"; |
59 | #interrupt-cells = <2>; | 165 | #interrupt-cells = <2>; |
60 | interrupt-controller; | 166 | interrupt-controller; |
61 | reg = <0 0xe61c0000 0 0x200>; | 167 | reg = <0 0xe61c0000 0 0x200>; |
62 | interrupt-parent = <&gic>; | 168 | interrupt-parent = <&gic>; |
63 | interrupts = <0 0 4>, | 169 | interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>, |
64 | <0 1 4>, | 170 | <0 1 IRQ_TYPE_LEVEL_HIGH>, |
65 | <0 2 4>, | 171 | <0 2 IRQ_TYPE_LEVEL_HIGH>, |
66 | <0 3 4>, | 172 | <0 3 IRQ_TYPE_LEVEL_HIGH>, |
67 | <0 12 4>, | 173 | <0 12 IRQ_TYPE_LEVEL_HIGH>, |
68 | <0 13 4>, | 174 | <0 13 IRQ_TYPE_LEVEL_HIGH>, |
69 | <0 14 4>, | 175 | <0 14 IRQ_TYPE_LEVEL_HIGH>, |
70 | <0 15 4>, | 176 | <0 15 IRQ_TYPE_LEVEL_HIGH>, |
71 | <0 16 4>, | 177 | <0 16 IRQ_TYPE_LEVEL_HIGH>, |
72 | <0 17 4>; | 178 | <0 17 IRQ_TYPE_LEVEL_HIGH>; |
179 | }; | ||
180 | |||
181 | pfc: pfc@e6060000 { | ||
182 | compatible = "renesas,pfc-r8a7791"; | ||
183 | reg = <0 0xe6060000 0 0x250>; | ||
184 | #gpio-range-cells = <3>; | ||
73 | }; | 185 | }; |
74 | }; | 186 | }; |
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi index 5cdaba4cea86..1105558d188b 100644 --- a/arch/arm/boot/dts/sama5d3.dtsi +++ b/arch/arm/boot/dts/sama5d3.dtsi | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * sama5d3.dtsi - Device Tree Include file for SAMA5D3 family SoC | 2 | * sama5d3.dtsi - Device Tree Include file for SAMA5D3 family SoC |
3 | * applies to SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35 SoC | 3 | * applies to SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36 SoC |
4 | * | 4 | * |
5 | * Copyright (C) 2013 Atmel, | 5 | * Copyright (C) 2013 Atmel, |
6 | * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> | 6 | * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> |
@@ -13,6 +13,7 @@ | |||
13 | #include <dt-bindings/pinctrl/at91.h> | 13 | #include <dt-bindings/pinctrl/at91.h> |
14 | #include <dt-bindings/interrupt-controller/irq.h> | 14 | #include <dt-bindings/interrupt-controller/irq.h> |
15 | #include <dt-bindings/gpio/gpio.h> | 15 | #include <dt-bindings/gpio/gpio.h> |
16 | #include <dt-bindings/clk/at91.h> | ||
16 | 17 | ||
17 | / { | 18 | / { |
18 | model = "Atmel SAMA5D3 family SoC"; | 19 | model = "Atmel SAMA5D3 family SoC"; |
@@ -36,6 +37,7 @@ | |||
36 | i2c2 = &i2c2; | 37 | i2c2 = &i2c2; |
37 | ssc0 = &ssc0; | 38 | ssc0 = &ssc0; |
38 | ssc1 = &ssc1; | 39 | ssc1 = &ssc1; |
40 | pwm0 = &pwm0; | ||
39 | }; | 41 | }; |
40 | cpus { | 42 | cpus { |
41 | #address-cells = <1>; | 43 | #address-cells = <1>; |
@@ -56,6 +58,14 @@ | |||
56 | reg = <0x20000000 0x8000000>; | 58 | reg = <0x20000000 0x8000000>; |
57 | }; | 59 | }; |
58 | 60 | ||
61 | clocks { | ||
62 | adc_op_clk: adc_op_clk{ | ||
63 | compatible = "fixed-clock"; | ||
64 | #clock-cells = <0>; | ||
65 | clock-frequency = <20000000>; | ||
66 | }; | ||
67 | }; | ||
68 | |||
59 | ahb { | 69 | ahb { |
60 | compatible = "simple-bus"; | 70 | compatible = "simple-bus"; |
61 | #address-cells = <1>; | 71 | #address-cells = <1>; |
@@ -79,6 +89,8 @@ | |||
79 | status = "disabled"; | 89 | status = "disabled"; |
80 | #address-cells = <1>; | 90 | #address-cells = <1>; |
81 | #size-cells = <0>; | 91 | #size-cells = <0>; |
92 | clocks = <&mci0_clk>; | ||
93 | clock-names = "mci_clk"; | ||
82 | }; | 94 | }; |
83 | 95 | ||
84 | spi0: spi@f0004000 { | 96 | spi0: spi@f0004000 { |
@@ -92,6 +104,8 @@ | |||
92 | dma-names = "tx", "rx"; | 104 | dma-names = "tx", "rx"; |
93 | pinctrl-names = "default"; | 105 | pinctrl-names = "default"; |
94 | pinctrl-0 = <&pinctrl_spi0>; | 106 | pinctrl-0 = <&pinctrl_spi0>; |
107 | clocks = <&spi0_clk>; | ||
108 | clock-names = "spi_clk"; | ||
95 | status = "disabled"; | 109 | status = "disabled"; |
96 | }; | 110 | }; |
97 | 111 | ||
@@ -101,6 +115,8 @@ | |||
101 | interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>; | 115 | interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>; |
102 | pinctrl-names = "default"; | 116 | pinctrl-names = "default"; |
103 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; | 117 | pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; |
118 | clocks = <&ssc0_clk>; | ||
119 | clock-names = "pclk"; | ||
104 | status = "disabled"; | 120 | status = "disabled"; |
105 | }; | 121 | }; |
106 | 122 | ||
@@ -108,6 +124,8 @@ | |||
108 | compatible = "atmel,at91sam9x5-tcb"; | 124 | compatible = "atmel,at91sam9x5-tcb"; |
109 | reg = <0xf0010000 0x100>; | 125 | reg = <0xf0010000 0x100>; |
110 | interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>; | 126 | interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>; |
127 | clocks = <&tcb0_clk>; | ||
128 | clock-names = "t0_clk"; | ||
111 | }; | 129 | }; |
112 | 130 | ||
113 | i2c0: i2c@f0014000 { | 131 | i2c0: i2c@f0014000 { |
@@ -121,6 +139,7 @@ | |||
121 | pinctrl-0 = <&pinctrl_i2c0>; | 139 | pinctrl-0 = <&pinctrl_i2c0>; |
122 | #address-cells = <1>; | 140 | #address-cells = <1>; |
123 | #size-cells = <0>; | 141 | #size-cells = <0>; |
142 | clocks = <&twi0_clk>; | ||
124 | status = "disabled"; | 143 | status = "disabled"; |
125 | }; | 144 | }; |
126 | 145 | ||
@@ -135,6 +154,7 @@ | |||
135 | pinctrl-0 = <&pinctrl_i2c1>; | 154 | pinctrl-0 = <&pinctrl_i2c1>; |
136 | #address-cells = <1>; | 155 | #address-cells = <1>; |
137 | #size-cells = <0>; | 156 | #size-cells = <0>; |
157 | clocks = <&twi1_clk>; | ||
138 | status = "disabled"; | 158 | status = "disabled"; |
139 | }; | 159 | }; |
140 | 160 | ||
@@ -144,6 +164,8 @@ | |||
144 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>; | 164 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>; |
145 | pinctrl-names = "default"; | 165 | pinctrl-names = "default"; |
146 | pinctrl-0 = <&pinctrl_usart0>; | 166 | pinctrl-0 = <&pinctrl_usart0>; |
167 | clocks = <&usart0_clk>; | ||
168 | clock-names = "usart"; | ||
147 | status = "disabled"; | 169 | status = "disabled"; |
148 | }; | 170 | }; |
149 | 171 | ||
@@ -153,6 +175,17 @@ | |||
153 | interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>; | 175 | interrupts = <13 IRQ_TYPE_LEVEL_HIGH 5>; |
154 | pinctrl-names = "default"; | 176 | pinctrl-names = "default"; |
155 | pinctrl-0 = <&pinctrl_usart1>; | 177 | pinctrl-0 = <&pinctrl_usart1>; |
178 | clocks = <&usart1_clk>; | ||
179 | clock-names = "usart"; | ||
180 | status = "disabled"; | ||
181 | }; | ||
182 | |||
183 | pwm0: pwm@f002c000 { | ||
184 | compatible = "atmel,sama5d3-pwm"; | ||
185 | reg = <0xf002c000 0x300>; | ||
186 | interrupts = <28 IRQ_TYPE_LEVEL_HIGH 4>; | ||
187 | #pwm-cells = <3>; | ||
188 | clocks = <&pwm_clk>; | ||
156 | status = "disabled"; | 189 | status = "disabled"; |
157 | }; | 190 | }; |
158 | 191 | ||
@@ -174,6 +207,8 @@ | |||
174 | status = "disabled"; | 207 | status = "disabled"; |
175 | #address-cells = <1>; | 208 | #address-cells = <1>; |
176 | #size-cells = <0>; | 209 | #size-cells = <0>; |
210 | clocks = <&mci1_clk>; | ||
211 | clock-names = "mci_clk"; | ||
177 | }; | 212 | }; |
178 | 213 | ||
179 | spi1: spi@f8008000 { | 214 | spi1: spi@f8008000 { |
@@ -187,6 +222,8 @@ | |||
187 | dma-names = "tx", "rx"; | 222 | dma-names = "tx", "rx"; |
188 | pinctrl-names = "default"; | 223 | pinctrl-names = "default"; |
189 | pinctrl-0 = <&pinctrl_spi1>; | 224 | pinctrl-0 = <&pinctrl_spi1>; |
225 | clocks = <&spi1_clk>; | ||
226 | clock-names = "spi_clk"; | ||
190 | status = "disabled"; | 227 | status = "disabled"; |
191 | }; | 228 | }; |
192 | 229 | ||
@@ -196,6 +233,8 @@ | |||
196 | interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>; | 233 | interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>; |
197 | pinctrl-names = "default"; | 234 | pinctrl-names = "default"; |
198 | pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; | 235 | pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; |
236 | clocks = <&ssc1_clk>; | ||
237 | clock-names = "pclk"; | ||
199 | status = "disabled"; | 238 | status = "disabled"; |
200 | }; | 239 | }; |
201 | 240 | ||
@@ -219,6 +258,9 @@ | |||
219 | &pinctrl_adc0_ad10 | 258 | &pinctrl_adc0_ad10 |
220 | &pinctrl_adc0_ad11 | 259 | &pinctrl_adc0_ad11 |
221 | >; | 260 | >; |
261 | clocks = <&adc_clk>, | ||
262 | <&adc_op_clk>; | ||
263 | clock-names = "adc_clk", "adc_op_clk"; | ||
222 | atmel,adc-channel-base = <0x50>; | 264 | atmel,adc-channel-base = <0x50>; |
223 | atmel,adc-channels-used = <0xfff>; | 265 | atmel,adc-channels-used = <0xfff>; |
224 | atmel,adc-drdy-mask = <0x1000000>; | 266 | atmel,adc-drdy-mask = <0x1000000>; |
@@ -272,8 +314,11 @@ | |||
272 | dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(11)>, | 314 | dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(11)>, |
273 | <&dma1 2 AT91_DMA_CFG_PER_ID(12)>; | 315 | <&dma1 2 AT91_DMA_CFG_PER_ID(12)>; |
274 | dma-names = "tx", "rx"; | 316 | dma-names = "tx", "rx"; |
317 | pinctrl-names = "default"; | ||
318 | pinctrl-0 = <&pinctrl_i2c2>; | ||
275 | #address-cells = <1>; | 319 | #address-cells = <1>; |
276 | #size-cells = <0>; | 320 | #size-cells = <0>; |
321 | clocks = <&twi2_clk>; | ||
277 | status = "disabled"; | 322 | status = "disabled"; |
278 | }; | 323 | }; |
279 | 324 | ||
@@ -283,6 +328,8 @@ | |||
283 | interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>; | 328 | interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>; |
284 | pinctrl-names = "default"; | 329 | pinctrl-names = "default"; |
285 | pinctrl-0 = <&pinctrl_usart2>; | 330 | pinctrl-0 = <&pinctrl_usart2>; |
331 | clocks = <&usart2_clk>; | ||
332 | clock-names = "usart"; | ||
286 | status = "disabled"; | 333 | status = "disabled"; |
287 | }; | 334 | }; |
288 | 335 | ||
@@ -292,25 +339,41 @@ | |||
292 | interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>; | 339 | interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>; |
293 | pinctrl-names = "default"; | 340 | pinctrl-names = "default"; |
294 | pinctrl-0 = <&pinctrl_usart3>; | 341 | pinctrl-0 = <&pinctrl_usart3>; |
342 | clocks = <&usart3_clk>; | ||
343 | clock-names = "usart"; | ||
295 | status = "disabled"; | 344 | status = "disabled"; |
296 | }; | 345 | }; |
297 | 346 | ||
298 | sha@f8034000 { | 347 | sha@f8034000 { |
299 | compatible = "atmel,sam9g46-sha"; | 348 | compatible = "atmel,at91sam9g46-sha"; |
300 | reg = <0xf8034000 0x100>; | 349 | reg = <0xf8034000 0x100>; |
301 | interrupts = <42 IRQ_TYPE_LEVEL_HIGH 0>; | 350 | interrupts = <42 IRQ_TYPE_LEVEL_HIGH 0>; |
351 | dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(17)>; | ||
352 | dma-names = "tx"; | ||
353 | clocks = <&sha_clk>; | ||
354 | clock-names = "sha_clk"; | ||
302 | }; | 355 | }; |
303 | 356 | ||
304 | aes@f8038000 { | 357 | aes@f8038000 { |
305 | compatible = "atmel,sam9g46-aes"; | 358 | compatible = "atmel,at91sam9g46-aes"; |
306 | reg = <0xf8038000 0x100>; | 359 | reg = <0xf8038000 0x100>; |
307 | interrupts = <43 4 0>; | 360 | interrupts = <43 IRQ_TYPE_LEVEL_HIGH 0>; |
361 | dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(18)>, | ||
362 | <&dma1 2 AT91_DMA_CFG_PER_ID(19)>; | ||
363 | dma-names = "tx", "rx"; | ||
364 | clocks = <&aes_clk>; | ||
365 | clock-names = "aes_clk"; | ||
308 | }; | 366 | }; |
309 | 367 | ||
310 | tdes@f803c000 { | 368 | tdes@f803c000 { |
311 | compatible = "atmel,sam9g46-tdes"; | 369 | compatible = "atmel,at91sam9g46-tdes"; |
312 | reg = <0xf803c000 0x100>; | 370 | reg = <0xf803c000 0x100>; |
313 | interrupts = <44 IRQ_TYPE_LEVEL_HIGH 0>; | 371 | interrupts = <44 IRQ_TYPE_LEVEL_HIGH 0>; |
372 | dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(20)>, | ||
373 | <&dma1 2 AT91_DMA_CFG_PER_ID(21)>; | ||
374 | dma-names = "tx", "rx"; | ||
375 | clocks = <&tdes_clk>; | ||
376 | clock-names = "tdes_clk"; | ||
314 | }; | 377 | }; |
315 | 378 | ||
316 | dma0: dma-controller@ffffe600 { | 379 | dma0: dma-controller@ffffe600 { |
@@ -318,6 +381,8 @@ | |||
318 | reg = <0xffffe600 0x200>; | 381 | reg = <0xffffe600 0x200>; |
319 | interrupts = <30 IRQ_TYPE_LEVEL_HIGH 0>; | 382 | interrupts = <30 IRQ_TYPE_LEVEL_HIGH 0>; |
320 | #dma-cells = <2>; | 383 | #dma-cells = <2>; |
384 | clocks = <&dma0_clk>; | ||
385 | clock-names = "dma_clk"; | ||
321 | }; | 386 | }; |
322 | 387 | ||
323 | dma1: dma-controller@ffffe800 { | 388 | dma1: dma-controller@ffffe800 { |
@@ -325,6 +390,8 @@ | |||
325 | reg = <0xffffe800 0x200>; | 390 | reg = <0xffffe800 0x200>; |
326 | interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>; | 391 | interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>; |
327 | #dma-cells = <2>; | 392 | #dma-cells = <2>; |
393 | clocks = <&dma1_clk>; | ||
394 | clock-names = "dma_clk"; | ||
328 | }; | 395 | }; |
329 | 396 | ||
330 | ramc0: ramc@ffffea00 { | 397 | ramc0: ramc@ffffea00 { |
@@ -338,6 +405,8 @@ | |||
338 | interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; | 405 | interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; |
339 | pinctrl-names = "default"; | 406 | pinctrl-names = "default"; |
340 | pinctrl-0 = <&pinctrl_dbgu>; | 407 | pinctrl-0 = <&pinctrl_dbgu>; |
408 | clocks = <&dbgu_clk>; | ||
409 | clock-names = "usart"; | ||
341 | status = "disabled"; | 410 | status = "disabled"; |
342 | }; | 411 | }; |
343 | 412 | ||
@@ -443,6 +512,14 @@ | |||
443 | }; | 512 | }; |
444 | }; | 513 | }; |
445 | 514 | ||
515 | i2c2 { | ||
516 | pinctrl_i2c2: i2c2-0 { | ||
517 | atmel,pins = | ||
518 | <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* TWD2 pin, conflicts with LCDDAT18, ISI_D2 */ | ||
519 | AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* TWCK2 pin, conflicts with LCDDAT19, ISI_D3 */ | ||
520 | }; | ||
521 | }; | ||
522 | |||
446 | isi { | 523 | isi { |
447 | pinctrl_isi: isi-0 { | 524 | pinctrl_isi: isi-0 { |
448 | atmel,pins = | 525 | atmel,pins = |
@@ -626,6 +703,7 @@ | |||
626 | gpio-controller; | 703 | gpio-controller; |
627 | interrupt-controller; | 704 | interrupt-controller; |
628 | #interrupt-cells = <2>; | 705 | #interrupt-cells = <2>; |
706 | clocks = <&pioA_clk>; | ||
629 | }; | 707 | }; |
630 | 708 | ||
631 | pioB: gpio@fffff400 { | 709 | pioB: gpio@fffff400 { |
@@ -636,6 +714,7 @@ | |||
636 | gpio-controller; | 714 | gpio-controller; |
637 | interrupt-controller; | 715 | interrupt-controller; |
638 | #interrupt-cells = <2>; | 716 | #interrupt-cells = <2>; |
717 | clocks = <&pioB_clk>; | ||
639 | }; | 718 | }; |
640 | 719 | ||
641 | pioC: gpio@fffff600 { | 720 | pioC: gpio@fffff600 { |
@@ -646,6 +725,7 @@ | |||
646 | gpio-controller; | 725 | gpio-controller; |
647 | interrupt-controller; | 726 | interrupt-controller; |
648 | #interrupt-cells = <2>; | 727 | #interrupt-cells = <2>; |
728 | clocks = <&pioC_clk>; | ||
649 | }; | 729 | }; |
650 | 730 | ||
651 | pioD: gpio@fffff800 { | 731 | pioD: gpio@fffff800 { |
@@ -656,6 +736,7 @@ | |||
656 | gpio-controller; | 736 | gpio-controller; |
657 | interrupt-controller; | 737 | interrupt-controller; |
658 | #interrupt-cells = <2>; | 738 | #interrupt-cells = <2>; |
739 | clocks = <&pioD_clk>; | ||
659 | }; | 740 | }; |
660 | 741 | ||
661 | pioE: gpio@fffffa00 { | 742 | pioE: gpio@fffffa00 { |
@@ -666,12 +747,334 @@ | |||
666 | gpio-controller; | 747 | gpio-controller; |
667 | interrupt-controller; | 748 | interrupt-controller; |
668 | #interrupt-cells = <2>; | 749 | #interrupt-cells = <2>; |
750 | clocks = <&pioE_clk>; | ||
669 | }; | 751 | }; |
670 | }; | 752 | }; |
671 | 753 | ||
672 | pmc: pmc@fffffc00 { | 754 | pmc: pmc@fffffc00 { |
673 | compatible = "atmel,at91rm9200-pmc"; | 755 | compatible = "atmel,sama5d3-pmc"; |
674 | reg = <0xfffffc00 0x120>; | 756 | reg = <0xfffffc00 0x120>; |
757 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; | ||
758 | interrupt-controller; | ||
759 | #address-cells = <1>; | ||
760 | #size-cells = <0>; | ||
761 | #interrupt-cells = <1>; | ||
762 | |||
763 | clk32k: slck { | ||
764 | compatible = "fixed-clock"; | ||
765 | #clock-cells = <0>; | ||
766 | clock-frequency = <32768>; | ||
767 | }; | ||
768 | |||
769 | main: mainck { | ||
770 | compatible = "atmel,at91rm9200-clk-main"; | ||
771 | #clock-cells = <0>; | ||
772 | interrupt-parent = <&pmc>; | ||
773 | interrupts = <AT91_PMC_MOSCS>; | ||
774 | clocks = <&clk32k>; | ||
775 | }; | ||
776 | |||
777 | plla: pllack { | ||
778 | compatible = "atmel,sama5d3-clk-pll"; | ||
779 | #clock-cells = <0>; | ||
780 | interrupt-parent = <&pmc>; | ||
781 | interrupts = <AT91_PMC_LOCKA>; | ||
782 | clocks = <&main>; | ||
783 | reg = <0>; | ||
784 | atmel,clk-input-range = <8000000 50000000>; | ||
785 | #atmel,pll-clk-output-range-cells = <4>; | ||
786 | atmel,pll-clk-output-ranges = <400000000 1000000000 0 0>; | ||
787 | }; | ||
788 | |||
789 | plladiv: plladivck { | ||
790 | compatible = "atmel,at91sam9x5-clk-plldiv"; | ||
791 | #clock-cells = <0>; | ||
792 | clocks = <&plla>; | ||
793 | }; | ||
794 | |||
795 | utmi: utmick { | ||
796 | compatible = "atmel,at91sam9x5-clk-utmi"; | ||
797 | #clock-cells = <0>; | ||
798 | interrupt-parent = <&pmc>; | ||
799 | interrupts = <AT91_PMC_LOCKU>; | ||
800 | clocks = <&main>; | ||
801 | }; | ||
802 | |||
803 | mck: masterck { | ||
804 | compatible = "atmel,at91sam9x5-clk-master"; | ||
805 | #clock-cells = <0>; | ||
806 | interrupt-parent = <&pmc>; | ||
807 | interrupts = <AT91_PMC_MCKRDY>; | ||
808 | clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>; | ||
809 | atmel,clk-output-range = <0 166000000>; | ||
810 | atmel,clk-divisors = <1 2 4 3>; | ||
811 | }; | ||
812 | |||
813 | usb: usbck { | ||
814 | compatible = "atmel,at91sam9x5-clk-usb"; | ||
815 | #clock-cells = <0>; | ||
816 | clocks = <&plladiv>, <&utmi>; | ||
817 | }; | ||
818 | |||
819 | prog: progck { | ||
820 | compatible = "atmel,at91sam9x5-clk-programmable"; | ||
821 | #address-cells = <1>; | ||
822 | #size-cells = <0>; | ||
823 | interrupt-parent = <&pmc>; | ||
824 | clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>, <&mck>; | ||
825 | |||
826 | prog0: prog0 { | ||
827 | #clock-cells = <0>; | ||
828 | reg = <0>; | ||
829 | interrupts = <AT91_PMC_PCKRDY(0)>; | ||
830 | }; | ||
831 | |||
832 | prog1: prog1 { | ||
833 | #clock-cells = <0>; | ||
834 | reg = <1>; | ||
835 | interrupts = <AT91_PMC_PCKRDY(1)>; | ||
836 | }; | ||
837 | |||
838 | prog2: prog2 { | ||
839 | #clock-cells = <0>; | ||
840 | reg = <2>; | ||
841 | interrupts = <AT91_PMC_PCKRDY(2)>; | ||
842 | }; | ||
843 | }; | ||
844 | |||
845 | smd: smdclk { | ||
846 | compatible = "atmel,at91sam9x5-clk-smd"; | ||
847 | #clock-cells = <0>; | ||
848 | clocks = <&plladiv>, <&utmi>; | ||
849 | }; | ||
850 | |||
851 | systemck { | ||
852 | compatible = "atmel,at91rm9200-clk-system"; | ||
853 | #address-cells = <1>; | ||
854 | #size-cells = <0>; | ||
855 | |||
856 | ddrck: ddrck { | ||
857 | #clock-cells = <0>; | ||
858 | reg = <2>; | ||
859 | clocks = <&mck>; | ||
860 | }; | ||
861 | |||
862 | smdck: smdck { | ||
863 | #clock-cells = <0>; | ||
864 | reg = <4>; | ||
865 | clocks = <&smd>; | ||
866 | }; | ||
867 | |||
868 | uhpck: uhpck { | ||
869 | #clock-cells = <0>; | ||
870 | reg = <6>; | ||
871 | clocks = <&usb>; | ||
872 | }; | ||
873 | |||
874 | udpck: udpck { | ||
875 | #clock-cells = <0>; | ||
876 | reg = <7>; | ||
877 | clocks = <&usb>; | ||
878 | }; | ||
879 | |||
880 | pck0: pck0 { | ||
881 | #clock-cells = <0>; | ||
882 | reg = <8>; | ||
883 | clocks = <&prog0>; | ||
884 | }; | ||
885 | |||
886 | pck1: pck1 { | ||
887 | #clock-cells = <0>; | ||
888 | reg = <9>; | ||
889 | clocks = <&prog1>; | ||
890 | }; | ||
891 | |||
892 | pck2: pck2 { | ||
893 | #clock-cells = <0>; | ||
894 | reg = <10>; | ||
895 | clocks = <&prog2>; | ||
896 | }; | ||
897 | }; | ||
898 | |||
899 | periphck { | ||
900 | compatible = "atmel,at91sam9x5-clk-peripheral"; | ||
901 | #address-cells = <1>; | ||
902 | #size-cells = <0>; | ||
903 | clocks = <&mck>; | ||
904 | |||
905 | dbgu_clk: dbgu_clk { | ||
906 | #clock-cells = <0>; | ||
907 | reg = <2>; | ||
908 | }; | ||
909 | |||
910 | pioA_clk: pioA_clk { | ||
911 | #clock-cells = <0>; | ||
912 | reg = <6>; | ||
913 | }; | ||
914 | |||
915 | pioB_clk: pioB_clk { | ||
916 | #clock-cells = <0>; | ||
917 | reg = <7>; | ||
918 | }; | ||
919 | |||
920 | pioC_clk: pioC_clk { | ||
921 | #clock-cells = <0>; | ||
922 | reg = <8>; | ||
923 | }; | ||
924 | |||
925 | pioD_clk: pioD_clk { | ||
926 | #clock-cells = <0>; | ||
927 | reg = <9>; | ||
928 | }; | ||
929 | |||
930 | pioE_clk: pioE_clk { | ||
931 | #clock-cells = <0>; | ||
932 | reg = <10>; | ||
933 | }; | ||
934 | |||
935 | usart0_clk: usart0_clk { | ||
936 | #clock-cells = <0>; | ||
937 | reg = <12>; | ||
938 | atmel,clk-output-range = <0 66000000>; | ||
939 | }; | ||
940 | |||
941 | usart1_clk: usart1_clk { | ||
942 | #clock-cells = <0>; | ||
943 | reg = <13>; | ||
944 | atmel,clk-output-range = <0 66000000>; | ||
945 | }; | ||
946 | |||
947 | usart2_clk: usart2_clk { | ||
948 | #clock-cells = <0>; | ||
949 | reg = <14>; | ||
950 | atmel,clk-output-range = <0 66000000>; | ||
951 | }; | ||
952 | |||
953 | usart3_clk: usart3_clk { | ||
954 | #clock-cells = <0>; | ||
955 | reg = <15>; | ||
956 | atmel,clk-output-range = <0 66000000>; | ||
957 | }; | ||
958 | |||
959 | twi0_clk: twi0_clk { | ||
960 | reg = <18>; | ||
961 | #clock-cells = <0>; | ||
962 | atmel,clk-output-range = <0 16625000>; | ||
963 | }; | ||
964 | |||
965 | twi1_clk: twi1_clk { | ||
966 | #clock-cells = <0>; | ||
967 | reg = <19>; | ||
968 | atmel,clk-output-range = <0 16625000>; | ||
969 | }; | ||
970 | |||
971 | twi2_clk: twi2_clk { | ||
972 | #clock-cells = <0>; | ||
973 | reg = <20>; | ||
974 | atmel,clk-output-range = <0 16625000>; | ||
975 | }; | ||
976 | |||
977 | mci0_clk: mci0_clk { | ||
978 | #clock-cells = <0>; | ||
979 | reg = <21>; | ||
980 | }; | ||
981 | |||
982 | mci1_clk: mci1_clk { | ||
983 | #clock-cells = <0>; | ||
984 | reg = <22>; | ||
985 | }; | ||
986 | |||
987 | spi0_clk: spi0_clk { | ||
988 | #clock-cells = <0>; | ||
989 | reg = <24>; | ||
990 | atmel,clk-output-range = <0 133000000>; | ||
991 | }; | ||
992 | |||
993 | spi1_clk: spi1_clk { | ||
994 | #clock-cells = <0>; | ||
995 | reg = <25>; | ||
996 | atmel,clk-output-range = <0 133000000>; | ||
997 | }; | ||
998 | |||
999 | tcb0_clk: tcb0_clk { | ||
1000 | #clock-cells = <0>; | ||
1001 | reg = <26>; | ||
1002 | atmel,clk-output-range = <0 133000000>; | ||
1003 | }; | ||
1004 | |||
1005 | pwm_clk: pwm_clk { | ||
1006 | #clock-cells = <0>; | ||
1007 | reg = <28>; | ||
1008 | }; | ||
1009 | |||
1010 | adc_clk: adc_clk { | ||
1011 | #clock-cells = <0>; | ||
1012 | reg = <29>; | ||
1013 | atmel,clk-output-range = <0 66000000>; | ||
1014 | }; | ||
1015 | |||
1016 | dma0_clk: dma0_clk { | ||
1017 | #clock-cells = <0>; | ||
1018 | reg = <30>; | ||
1019 | }; | ||
1020 | |||
1021 | dma1_clk: dma1_clk { | ||
1022 | #clock-cells = <0>; | ||
1023 | reg = <31>; | ||
1024 | }; | ||
1025 | |||
1026 | uhphs_clk: uhphs_clk { | ||
1027 | #clock-cells = <0>; | ||
1028 | reg = <32>; | ||
1029 | }; | ||
1030 | |||
1031 | udphs_clk: udphs_clk { | ||
1032 | #clock-cells = <0>; | ||
1033 | reg = <33>; | ||
1034 | }; | ||
1035 | |||
1036 | isi_clk: isi_clk { | ||
1037 | #clock-cells = <0>; | ||
1038 | reg = <37>; | ||
1039 | }; | ||
1040 | |||
1041 | ssc0_clk: ssc0_clk { | ||
1042 | #clock-cells = <0>; | ||
1043 | reg = <38>; | ||
1044 | atmel,clk-output-range = <0 66000000>; | ||
1045 | }; | ||
1046 | |||
1047 | ssc1_clk: ssc1_clk { | ||
1048 | #clock-cells = <0>; | ||
1049 | reg = <39>; | ||
1050 | atmel,clk-output-range = <0 66000000>; | ||
1051 | }; | ||
1052 | |||
1053 | sha_clk: sha_clk { | ||
1054 | #clock-cells = <0>; | ||
1055 | reg = <42>; | ||
1056 | }; | ||
1057 | |||
1058 | aes_clk: aes_clk { | ||
1059 | #clock-cells = <0>; | ||
1060 | reg = <43>; | ||
1061 | }; | ||
1062 | |||
1063 | tdes_clk: tdes_clk { | ||
1064 | #clock-cells = <0>; | ||
1065 | reg = <44>; | ||
1066 | }; | ||
1067 | |||
1068 | trng_clk: trng_clk { | ||
1069 | #clock-cells = <0>; | ||
1070 | reg = <45>; | ||
1071 | }; | ||
1072 | |||
1073 | fuse_clk: fuse_clk { | ||
1074 | #clock-cells = <0>; | ||
1075 | reg = <48>; | ||
1076 | }; | ||
1077 | }; | ||
675 | }; | 1078 | }; |
676 | 1079 | ||
677 | rstc@fffffe00 { | 1080 | rstc@fffffe00 { |
@@ -683,6 +1086,7 @@ | |||
683 | compatible = "atmel,at91sam9260-pit"; | 1086 | compatible = "atmel,at91sam9260-pit"; |
684 | reg = <0xfffffe30 0xf>; | 1087 | reg = <0xfffffe30 0xf>; |
685 | interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>; | 1088 | interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>; |
1089 | clocks = <&mck>; | ||
686 | }; | 1090 | }; |
687 | 1091 | ||
688 | watchdog@fffffe40 { | 1092 | watchdog@fffffe40 { |
@@ -705,6 +1109,8 @@ | |||
705 | reg = <0x00500000 0x100000 | 1109 | reg = <0x00500000 0x100000 |
706 | 0xf8030000 0x4000>; | 1110 | 0xf8030000 0x4000>; |
707 | interrupts = <33 IRQ_TYPE_LEVEL_HIGH 2>; | 1111 | interrupts = <33 IRQ_TYPE_LEVEL_HIGH 2>; |
1112 | clocks = <&udphs_clk>, <&utmi>; | ||
1113 | clock-names = "pclk", "hclk"; | ||
708 | status = "disabled"; | 1114 | status = "disabled"; |
709 | 1115 | ||
710 | ep0 { | 1116 | ep0 { |
@@ -817,6 +1223,9 @@ | |||
817 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | 1223 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; |
818 | reg = <0x00600000 0x100000>; | 1224 | reg = <0x00600000 0x100000>; |
819 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; | 1225 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; |
1226 | clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, | ||
1227 | <&uhpck>; | ||
1228 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; | ||
820 | status = "disabled"; | 1229 | status = "disabled"; |
821 | }; | 1230 | }; |
822 | 1231 | ||
@@ -824,6 +1233,8 @@ | |||
824 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1233 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
825 | reg = <0x00700000 0x100000>; | 1234 | reg = <0x00700000 0x100000>; |
826 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; | 1235 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; |
1236 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | ||
1237 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | ||
827 | status = "disabled"; | 1238 | status = "disabled"; |
828 | }; | 1239 | }; |
829 | 1240 | ||
diff --git a/arch/arm/boot/dts/sama5d36.dtsi b/arch/arm/boot/dts/sama5d36.dtsi new file mode 100644 index 000000000000..6c31c26e6cc0 --- /dev/null +++ b/arch/arm/boot/dts/sama5d36.dtsi | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * sama5d36.dtsi - Device Tree Include file for SAMA5D36 SoC | ||
3 | * | ||
4 | * Copyright (C) 2013 Atmel, | ||
5 | * 2013 Josh Wu <josh.wu@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | #include "sama5d3.dtsi" | ||
10 | #include "sama5d3_can.dtsi" | ||
11 | #include "sama5d3_emac.dtsi" | ||
12 | #include "sama5d3_gmac.dtsi" | ||
13 | #include "sama5d3_lcd.dtsi" | ||
14 | #include "sama5d3_mci2.dtsi" | ||
15 | #include "sama5d3_tcb1.dtsi" | ||
16 | #include "sama5d3_uart.dtsi" | ||
17 | |||
18 | / { | ||
19 | compatible = "atmel,samad36", "atmel,sama5d3", "atmel,sama5"; | ||
20 | }; | ||
diff --git a/arch/arm/boot/dts/sama5d36ek.dts b/arch/arm/boot/dts/sama5d36ek.dts new file mode 100644 index 000000000000..59576c6f9826 --- /dev/null +++ b/arch/arm/boot/dts/sama5d36ek.dts | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * sama5d36ek.dts - Device Tree file for SAMA5D36-EK board | ||
3 | * | ||
4 | * Copyright (C) 2013 Atmel, | ||
5 | * 2013 Josh Wu <josh.wu@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /dts-v1/; | ||
10 | #include "sama5d36.dtsi" | ||
11 | #include "sama5d3xmb.dtsi" | ||
12 | #include "sama5d3xdm.dtsi" | ||
13 | |||
14 | / { | ||
15 | model = "Atmel SAMA5D36-EK"; | ||
16 | compatible = "atmel,sama5d36ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5"; | ||
17 | |||
18 | ahb { | ||
19 | apb { | ||
20 | spi0: spi@f0004000 { | ||
21 | status = "okay"; | ||
22 | }; | ||
23 | |||
24 | ssc0: ssc@f0008000 { | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | |||
28 | can0: can@f000c000 { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | i2c0: i2c@f0014000 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | i2c1: i2c@f0018000 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | macb0: ethernet@f0028000 { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | macb1: ethernet@f802c000 { | ||
45 | status = "okay"; | ||
46 | }; | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | sound { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | }; | ||
diff --git a/arch/arm/boot/dts/sama5d3_can.dtsi b/arch/arm/boot/dts/sama5d3_can.dtsi index 8ed3260cef66..a0775851cce5 100644 --- a/arch/arm/boot/dts/sama5d3_can.dtsi +++ b/arch/arm/boot/dts/sama5d3_can.dtsi | |||
@@ -32,12 +32,30 @@ | |||
32 | 32 | ||
33 | }; | 33 | }; |
34 | 34 | ||
35 | pmc: pmc@fffffc00 { | ||
36 | periphck { | ||
37 | can0_clk: can0_clk { | ||
38 | #clock-cells = <0>; | ||
39 | reg = <40>; | ||
40 | atmel,clk-output-range = <0 66000000>; | ||
41 | }; | ||
42 | |||
43 | can1_clk: can0_clk { | ||
44 | #clock-cells = <0>; | ||
45 | reg = <41>; | ||
46 | atmel,clk-output-range = <0 66000000>; | ||
47 | }; | ||
48 | }; | ||
49 | }; | ||
50 | |||
35 | can0: can@f000c000 { | 51 | can0: can@f000c000 { |
36 | compatible = "atmel,at91sam9x5-can"; | 52 | compatible = "atmel,at91sam9x5-can"; |
37 | reg = <0xf000c000 0x300>; | 53 | reg = <0xf000c000 0x300>; |
38 | interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>; | 54 | interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>; |
39 | pinctrl-names = "default"; | 55 | pinctrl-names = "default"; |
40 | pinctrl-0 = <&pinctrl_can0_rx_tx>; | 56 | pinctrl-0 = <&pinctrl_can0_rx_tx>; |
57 | clocks = <&can0_clk>; | ||
58 | clock-names = "can_clk"; | ||
41 | status = "disabled"; | 59 | status = "disabled"; |
42 | }; | 60 | }; |
43 | 61 | ||
@@ -47,6 +65,8 @@ | |||
47 | interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>; | 65 | interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>; |
48 | pinctrl-names = "default"; | 66 | pinctrl-names = "default"; |
49 | pinctrl-0 = <&pinctrl_can1_rx_tx>; | 67 | pinctrl-0 = <&pinctrl_can1_rx_tx>; |
68 | clocks = <&can1_clk>; | ||
69 | clock-names = "can_clk"; | ||
50 | status = "disabled"; | 70 | status = "disabled"; |
51 | }; | 71 | }; |
52 | }; | 72 | }; |
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi index 4d4f351f1f9f..fe2af9276312 100644 --- a/arch/arm/boot/dts/sama5d3_emac.dtsi +++ b/arch/arm/boot/dts/sama5d3_emac.dtsi | |||
@@ -31,12 +31,23 @@ | |||
31 | }; | 31 | }; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | pmc: pmc@fffffc00 { | ||
35 | periphck { | ||
36 | macb1_clk: macb1_clk { | ||
37 | #clock-cells = <0>; | ||
38 | reg = <35>; | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
42 | |||
34 | macb1: ethernet@f802c000 { | 43 | macb1: ethernet@f802c000 { |
35 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; | 44 | compatible = "cdns,at32ap7000-macb", "cdns,macb"; |
36 | reg = <0xf802c000 0x100>; | 45 | reg = <0xf802c000 0x100>; |
37 | interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>; | 46 | interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>; |
38 | pinctrl-names = "default"; | 47 | pinctrl-names = "default"; |
39 | pinctrl-0 = <&pinctrl_macb1_rmii>; | 48 | pinctrl-0 = <&pinctrl_macb1_rmii>; |
49 | clocks = <&macb1_clk>, <&macb1_clk>; | ||
50 | clock-names = "hclk", "pclk"; | ||
40 | status = "disabled"; | 51 | status = "disabled"; |
41 | }; | 52 | }; |
42 | }; | 53 | }; |
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi index 0ba8be30ccd8..a6cb0508762f 100644 --- a/arch/arm/boot/dts/sama5d3_gmac.dtsi +++ b/arch/arm/boot/dts/sama5d3_gmac.dtsi | |||
@@ -64,12 +64,23 @@ | |||
64 | }; | 64 | }; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | pmc: pmc@fffffc00 { | ||
68 | periphck { | ||
69 | macb0_clk: macb0_clk { | ||
70 | #clock-cells = <0>; | ||
71 | reg = <34>; | ||
72 | }; | ||
73 | }; | ||
74 | }; | ||
75 | |||
67 | macb0: ethernet@f0028000 { | 76 | macb0: ethernet@f0028000 { |
68 | compatible = "cdns,pc302-gem", "cdns,gem"; | 77 | compatible = "cdns,pc302-gem", "cdns,gem"; |
69 | reg = <0xf0028000 0x100>; | 78 | reg = <0xf0028000 0x100>; |
70 | interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>; | 79 | interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>; |
71 | pinctrl-names = "default"; | 80 | pinctrl-names = "default"; |
72 | pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>; | 81 | pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>; |
82 | clocks = <&macb0_clk>, <&macb0_clk>; | ||
83 | clock-names = "hclk", "pclk"; | ||
73 | status = "disabled"; | 84 | status = "disabled"; |
74 | }; | 85 | }; |
75 | }; | 86 | }; |
diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi index 01f52a79f8ba..85d302701565 100644 --- a/arch/arm/boot/dts/sama5d3_lcd.dtsi +++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi | |||
@@ -50,6 +50,23 @@ | |||
50 | }; | 50 | }; |
51 | }; | 51 | }; |
52 | }; | 52 | }; |
53 | |||
54 | pmc: pmc@fffffc00 { | ||
55 | periphck { | ||
56 | lcdc_clk: lcdc_clk { | ||
57 | #clock-cells = <0>; | ||
58 | reg = <36>; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | systemck { | ||
63 | lcdck: lcdck { | ||
64 | #clock-cells = <0>; | ||
65 | reg = <3>; | ||
66 | clocks = <&mck>; | ||
67 | }; | ||
68 | }; | ||
69 | }; | ||
53 | }; | 70 | }; |
54 | }; | 71 | }; |
55 | }; | 72 | }; |
diff --git a/arch/arm/boot/dts/sama5d3_mci2.dtsi b/arch/arm/boot/dts/sama5d3_mci2.dtsi index 38e88e39e551..b029fe7ef17a 100644 --- a/arch/arm/boot/dts/sama5d3_mci2.dtsi +++ b/arch/arm/boot/dts/sama5d3_mci2.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <dt-bindings/pinctrl/at91.h> | 10 | #include <dt-bindings/pinctrl/at91.h> |
11 | #include <dt-bindings/interrupt-controller/irq.h> | 11 | #include <dt-bindings/interrupt-controller/irq.h> |
12 | #include <dt-bindings/clk/at91.h> | ||
12 | 13 | ||
13 | / { | 14 | / { |
14 | ahb { | 15 | ahb { |
@@ -30,6 +31,15 @@ | |||
30 | }; | 31 | }; |
31 | }; | 32 | }; |
32 | 33 | ||
34 | pmc: pmc@fffffc00 { | ||
35 | periphck { | ||
36 | mci2_clk: mci2_clk { | ||
37 | #clock-cells = <0>; | ||
38 | reg = <23>; | ||
39 | }; | ||
40 | }; | ||
41 | }; | ||
42 | |||
33 | mmc2: mmc@f8004000 { | 43 | mmc2: mmc@f8004000 { |
34 | compatible = "atmel,hsmci"; | 44 | compatible = "atmel,hsmci"; |
35 | reg = <0xf8004000 0x600>; | 45 | reg = <0xf8004000 0x600>; |
@@ -38,6 +48,8 @@ | |||
38 | dma-names = "rxtx"; | 48 | dma-names = "rxtx"; |
39 | pinctrl-names = "default"; | 49 | pinctrl-names = "default"; |
40 | pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>; | 50 | pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>; |
51 | clocks = <&mci2_clk>; | ||
52 | clock-names = "mci_clk"; | ||
41 | status = "disabled"; | 53 | status = "disabled"; |
42 | #address-cells = <1>; | 54 | #address-cells = <1>; |
43 | #size-cells = <0>; | 55 | #size-cells = <0>; |
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi index 5264bb4a6998..382b04431f66 100644 --- a/arch/arm/boot/dts/sama5d3_tcb1.dtsi +++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <dt-bindings/pinctrl/at91.h> | 10 | #include <dt-bindings/pinctrl/at91.h> |
11 | #include <dt-bindings/interrupt-controller/irq.h> | 11 | #include <dt-bindings/interrupt-controller/irq.h> |
12 | #include <dt-bindings/clk/at91.h> | ||
12 | 13 | ||
13 | / { | 14 | / { |
14 | aliases { | 15 | aliases { |
@@ -17,10 +18,21 @@ | |||
17 | 18 | ||
18 | ahb { | 19 | ahb { |
19 | apb { | 20 | apb { |
21 | pmc: pmc@fffffc00 { | ||
22 | periphck { | ||
23 | tcb1_clk: tcb1_clk { | ||
24 | #clock-cells = <0>; | ||
25 | reg = <27>; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
29 | |||
20 | tcb1: timer@f8014000 { | 30 | tcb1: timer@f8014000 { |
21 | compatible = "atmel,at91sam9x5-tcb"; | 31 | compatible = "atmel,at91sam9x5-tcb"; |
22 | reg = <0xf8014000 0x100>; | 32 | reg = <0xf8014000 0x100>; |
23 | interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>; | 33 | interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>; |
34 | clocks = <&tcb1_clk>; | ||
35 | clock-names = "t0_clk"; | ||
24 | }; | 36 | }; |
25 | }; | 37 | }; |
26 | }; | 38 | }; |
diff --git a/arch/arm/boot/dts/sama5d3_uart.dtsi b/arch/arm/boot/dts/sama5d3_uart.dtsi index 98fcb2d57446..a9fa75e41652 100644 --- a/arch/arm/boot/dts/sama5d3_uart.dtsi +++ b/arch/arm/boot/dts/sama5d3_uart.dtsi | |||
@@ -9,8 +9,14 @@ | |||
9 | 9 | ||
10 | #include <dt-bindings/pinctrl/at91.h> | 10 | #include <dt-bindings/pinctrl/at91.h> |
11 | #include <dt-bindings/interrupt-controller/irq.h> | 11 | #include <dt-bindings/interrupt-controller/irq.h> |
12 | #include <dt-bindings/clk/at91.h> | ||
12 | 13 | ||
13 | / { | 14 | / { |
15 | aliases { | ||
16 | serial5 = &uart0; | ||
17 | serial6 = &uart1; | ||
18 | }; | ||
19 | |||
14 | ahb { | 20 | ahb { |
15 | apb { | 21 | apb { |
16 | pinctrl@fffff200 { | 22 | pinctrl@fffff200 { |
@@ -31,12 +37,30 @@ | |||
31 | }; | 37 | }; |
32 | }; | 38 | }; |
33 | 39 | ||
40 | pmc: pmc@fffffc00 { | ||
41 | periphck { | ||
42 | uart0_clk: uart0_clk { | ||
43 | #clock-cells = <0>; | ||
44 | reg = <16>; | ||
45 | atmel,clk-output-range = <0 66000000>; | ||
46 | }; | ||
47 | |||
48 | uart1_clk: uart1_clk { | ||
49 | #clock-cells = <0>; | ||
50 | reg = <17>; | ||
51 | atmel,clk-output-range = <0 66000000>; | ||
52 | }; | ||
53 | }; | ||
54 | }; | ||
55 | |||
34 | uart0: serial@f0024000 { | 56 | uart0: serial@f0024000 { |
35 | compatible = "atmel,at91sam9260-usart"; | 57 | compatible = "atmel,at91sam9260-usart"; |
36 | reg = <0xf0024000 0x200>; | 58 | reg = <0xf0024000 0x200>; |
37 | interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>; | 59 | interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>; |
38 | pinctrl-names = "default"; | 60 | pinctrl-names = "default"; |
39 | pinctrl-0 = <&pinctrl_uart0>; | 61 | pinctrl-0 = <&pinctrl_uart0>; |
62 | clocks = <&uart0_clk>; | ||
63 | clock-names = "usart"; | ||
40 | status = "disabled"; | 64 | status = "disabled"; |
41 | }; | 65 | }; |
42 | 66 | ||
@@ -46,6 +70,8 @@ | |||
46 | interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>; | 70 | interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>; |
47 | pinctrl-names = "default"; | 71 | pinctrl-names = "default"; |
48 | pinctrl-0 = <&pinctrl_uart1>; | 72 | pinctrl-0 = <&pinctrl_uart1>; |
73 | clocks = <&uart1_clk>; | ||
74 | clock-names = "usart"; | ||
49 | status = "disabled"; | 75 | status = "disabled"; |
50 | }; | 76 | }; |
51 | }; | 77 | }; |
diff --git a/arch/arm/boot/dts/sama5d3xcm.dtsi b/arch/arm/boot/dts/sama5d3xcm.dtsi index 726a0f35100c..f55ed072c8e6 100644 --- a/arch/arm/boot/dts/sama5d3xcm.dtsi +++ b/arch/arm/boot/dts/sama5d3xcm.dtsi | |||
@@ -18,17 +18,6 @@ | |||
18 | reg = <0x20000000 0x20000000>; | 18 | reg = <0x20000000 0x20000000>; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | clocks { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | ranges; | ||
25 | |||
26 | main_clock: clock@0 { | ||
27 | compatible = "atmel,osc", "fixed-clock"; | ||
28 | clock-frequency = <12000000>; | ||
29 | }; | ||
30 | }; | ||
31 | |||
32 | ahb { | 21 | ahb { |
33 | apb { | 22 | apb { |
34 | spi0: spi@f0004000 { | 23 | spi0: spi@f0004000 { |
@@ -38,6 +27,12 @@ | |||
38 | macb0: ethernet@f0028000 { | 27 | macb0: ethernet@f0028000 { |
39 | phy-mode = "rgmii"; | 28 | phy-mode = "rgmii"; |
40 | }; | 29 | }; |
30 | |||
31 | pmc: pmc@fffffc00 { | ||
32 | main: mainck { | ||
33 | clock-frequency = <12000000>; | ||
34 | }; | ||
35 | }; | ||
41 | }; | 36 | }; |
42 | 37 | ||
43 | nand0: nand@60000000 { | 38 | nand0: nand@60000000 { |
diff --git a/arch/arm/boot/dts/sama5d3xdm.dtsi b/arch/arm/boot/dts/sama5d3xdm.dtsi index 1c296d6b2f2a..f9bdde542ced 100644 --- a/arch/arm/boot/dts/sama5d3xdm.dtsi +++ b/arch/arm/boot/dts/sama5d3xdm.dtsi | |||
@@ -18,6 +18,7 @@ | |||
18 | interrupts = <31 0x0>; | 18 | interrupts = <31 0x0>; |
19 | pinctrl-names = "default"; | 19 | pinctrl-names = "default"; |
20 | pinctrl-0 = <&pinctrl_qt1070_irq>; | 20 | pinctrl-0 = <&pinctrl_qt1070_irq>; |
21 | wakeup-source; | ||
21 | }; | 22 | }; |
22 | }; | 23 | }; |
23 | 24 | ||
diff --git a/arch/arm/boot/dts/sh7372-mackerel.dts b/arch/arm/boot/dts/sh7372-mackerel.dts index 8acf51e0cdae..a759a276c9a9 100644 --- a/arch/arm/boot/dts/sh7372-mackerel.dts +++ b/arch/arm/boot/dts/sh7372-mackerel.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "sh7372.dtsi" | 12 | #include "sh7372.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "Mackerel (AP4 EVM 2nd)"; | 15 | model = "Mackerel (AP4 EVM 2nd)"; |
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index 8ee06dd81799..5bb593daab52 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | |||
@@ -12,8 +12,9 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | /dts-v1/; | 14 | /dts-v1/; |
15 | /include/ "sh73a0.dtsi" | 15 | #include "sh73a0.dtsi" |
16 | #include <dt-bindings/gpio/gpio.h> | 16 | #include <dt-bindings/gpio/gpio.h> |
17 | #include <dt-bindings/interrupt-controller/irq.h> | ||
17 | 18 | ||
18 | / { | 19 | / { |
19 | model = "KZM-A9-GT"; | 20 | model = "KZM-A9-GT"; |
@@ -82,7 +83,7 @@ | |||
82 | reg = <0x10000000 0x100>; | 83 | reg = <0x10000000 0x100>; |
83 | phy-mode = "mii"; | 84 | phy-mode = "mii"; |
84 | interrupt-parent = <&irqpin0>; | 85 | interrupt-parent = <&irqpin0>; |
85 | interrupts = <3 0>; /* active low */ | 86 | interrupts = <3 IRQ_TYPE_EDGE_FALLING>; |
86 | reg-io-width = <4>; | 87 | reg-io-width = <4>; |
87 | smsc,irq-push-pull; | 88 | smsc,irq-push-pull; |
88 | smsc,save-mac-address; | 89 | smsc,save-mac-address; |
@@ -105,6 +106,52 @@ | |||
105 | gpios = <&pfc 23 GPIO_ACTIVE_LOW>; | 106 | gpios = <&pfc 23 GPIO_ACTIVE_LOW>; |
106 | }; | 107 | }; |
107 | }; | 108 | }; |
109 | |||
110 | gpio-keys { | ||
111 | compatible = "gpio-keys"; | ||
112 | |||
113 | back-key { | ||
114 | gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>; | ||
115 | linux,code = <158>; | ||
116 | label = "SW3"; | ||
117 | }; | ||
118 | |||
119 | right-key { | ||
120 | gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>; | ||
121 | linux,code = <106>; | ||
122 | label = "SW2-R"; | ||
123 | }; | ||
124 | |||
125 | left-key { | ||
126 | gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>; | ||
127 | linux,code = <105>; | ||
128 | label = "SW2-L"; | ||
129 | }; | ||
130 | |||
131 | enter-key { | ||
132 | gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>; | ||
133 | linux,code = <28>; | ||
134 | label = "SW2-P"; | ||
135 | }; | ||
136 | |||
137 | up-key { | ||
138 | gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>; | ||
139 | linux,code = <103>; | ||
140 | label = "SW2-U"; | ||
141 | }; | ||
142 | |||
143 | down-key { | ||
144 | gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>; | ||
145 | linux,code = <108>; | ||
146 | label = "SW2-D"; | ||
147 | }; | ||
148 | |||
149 | home-key { | ||
150 | gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>; | ||
151 | linux,code = <102>; | ||
152 | label = "SW1"; | ||
153 | }; | ||
154 | }; | ||
108 | }; | 155 | }; |
109 | 156 | ||
110 | &i2c0 { | 157 | &i2c0 { |
@@ -185,6 +232,17 @@ | |||
185 | pinctrl-0 = <&i2c3_pins>; | 232 | pinctrl-0 = <&i2c3_pins>; |
186 | pinctrl-names = "default"; | 233 | pinctrl-names = "default"; |
187 | status = "okay"; | 234 | status = "okay"; |
235 | |||
236 | pcf8575: gpio@20 { | ||
237 | compatible = "nxp,pcf8575"; | ||
238 | reg = <0x20>; | ||
239 | interrupt-parent = <&irqpin2>; | ||
240 | interrupts = <3 IRQ_TYPE_EDGE_FALLING>; | ||
241 | gpio-controller; | ||
242 | #gpio-cells = <2>; | ||
243 | interrupt-controller; | ||
244 | #interrupt-cells = <2>; | ||
245 | }; | ||
188 | }; | 246 | }; |
189 | 247 | ||
190 | &mmcif { | 248 | &mmcif { |
@@ -205,7 +263,7 @@ | |||
205 | renesas,function = "i2c3"; | 263 | renesas,function = "i2c3"; |
206 | }; | 264 | }; |
207 | 265 | ||
208 | mmcif_pins: mmcif { | 266 | mmcif_pins: mmc { |
209 | mux { | 267 | mux { |
210 | renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0"; | 268 | renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0"; |
211 | renesas,function = "mmc0"; | 269 | renesas,function = "mmc0"; |
@@ -217,17 +275,17 @@ | |||
217 | }; | 275 | }; |
218 | }; | 276 | }; |
219 | 277 | ||
220 | scifa4_pins: scifa4 { | 278 | scifa4_pins: serial4 { |
221 | renesas,groups = "scifa4_data", "scifa4_ctrl"; | 279 | renesas,groups = "scifa4_data", "scifa4_ctrl"; |
222 | renesas,function = "scifa4"; | 280 | renesas,function = "scifa4"; |
223 | }; | 281 | }; |
224 | 282 | ||
225 | sdhi0_pins: sdhi0 { | 283 | sdhi0_pins: sd0 { |
226 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp"; | 284 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp"; |
227 | renesas,function = "sdhi0"; | 285 | renesas,function = "sdhi0"; |
228 | }; | 286 | }; |
229 | 287 | ||
230 | sdhi2_pins: sdhi2 { | 288 | sdhi2_pins: sd2 { |
231 | renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; | 289 | renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; |
232 | renesas,function = "sdhi2"; | 290 | renesas,function = "sdhi2"; |
233 | }; | 291 | }; |
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g.dts b/arch/arm/boot/dts/sh73a0-kzm9g.dts index 0f1ca7792c46..27c5f426d172 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g.dts | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "sh73a0.dtsi" | 12 | #include "sh73a0.dtsi" |
13 | 13 | ||
14 | / { | 14 | / { |
15 | model = "KZM-A9-GT"; | 15 | model = "KZM-A9-GT"; |
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index fcf26889a8a0..241c8cdaeaa1 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi | |||
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | /include/ "skeleton.dtsi" | 11 | /include/ "skeleton.dtsi" |
12 | 12 | ||
13 | #include <dt-bindings/interrupt-controller/irq.h> | ||
14 | |||
13 | / { | 15 | / { |
14 | compatible = "renesas,sh73a0"; | 16 | compatible = "renesas,sh73a0"; |
15 | 17 | ||
@@ -40,12 +42,12 @@ | |||
40 | 42 | ||
41 | pmu { | 43 | pmu { |
42 | compatible = "arm,cortex-a9-pmu"; | 44 | compatible = "arm,cortex-a9-pmu"; |
43 | interrupts = <0 55 4>, | 45 | interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>, |
44 | <0 56 4>; | 46 | <0 56 IRQ_TYPE_LEVEL_HIGH>; |
45 | }; | 47 | }; |
46 | 48 | ||
47 | irqpin0: irqpin@e6900000 { | 49 | irqpin0: irqpin@e6900000 { |
48 | compatible = "renesas,intc-irqpin"; | 50 | compatible = "renesas,intc-irqpin-sh73a0", "renesas,intc-irqpin"; |
49 | #interrupt-cells = <2>; | 51 | #interrupt-cells = <2>; |
50 | interrupt-controller; | 52 | interrupt-controller; |
51 | reg = <0xe6900000 4>, | 53 | reg = <0xe6900000 4>, |
@@ -54,18 +56,18 @@ | |||
54 | <0xe6900040 1>, | 56 | <0xe6900040 1>, |
55 | <0xe6900060 1>; | 57 | <0xe6900060 1>; |
56 | interrupt-parent = <&gic>; | 58 | interrupt-parent = <&gic>; |
57 | interrupts = <0 1 0x4 | 59 | interrupts = <0 1 IRQ_TYPE_LEVEL_HIGH |
58 | 0 2 0x4 | 60 | 0 2 IRQ_TYPE_LEVEL_HIGH |
59 | 0 3 0x4 | 61 | 0 3 IRQ_TYPE_LEVEL_HIGH |
60 | 0 4 0x4 | 62 | 0 4 IRQ_TYPE_LEVEL_HIGH |
61 | 0 5 0x4 | 63 | 0 5 IRQ_TYPE_LEVEL_HIGH |
62 | 0 6 0x4 | 64 | 0 6 IRQ_TYPE_LEVEL_HIGH |
63 | 0 7 0x4 | 65 | 0 7 IRQ_TYPE_LEVEL_HIGH |
64 | 0 8 0x4>; | 66 | 0 8 IRQ_TYPE_LEVEL_HIGH>; |
65 | }; | 67 | }; |
66 | 68 | ||
67 | irqpin1: irqpin@e6900004 { | 69 | irqpin1: irqpin@e6900004 { |
68 | compatible = "renesas,intc-irqpin"; | 70 | compatible = "renesas,intc-irqpin-sh73a0", "renesas,intc-irqpin"; |
69 | #interrupt-cells = <2>; | 71 | #interrupt-cells = <2>; |
70 | interrupt-controller; | 72 | interrupt-controller; |
71 | reg = <0xe6900004 4>, | 73 | reg = <0xe6900004 4>, |
@@ -74,19 +76,19 @@ | |||
74 | <0xe6900044 1>, | 76 | <0xe6900044 1>, |
75 | <0xe6900064 1>; | 77 | <0xe6900064 1>; |
76 | interrupt-parent = <&gic>; | 78 | interrupt-parent = <&gic>; |
77 | interrupts = <0 9 0x4 | 79 | interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH |
78 | 0 10 0x4 | 80 | 0 10 IRQ_TYPE_LEVEL_HIGH |
79 | 0 11 0x4 | 81 | 0 11 IRQ_TYPE_LEVEL_HIGH |
80 | 0 12 0x4 | 82 | 0 12 IRQ_TYPE_LEVEL_HIGH |
81 | 0 13 0x4 | 83 | 0 13 IRQ_TYPE_LEVEL_HIGH |
82 | 0 14 0x4 | 84 | 0 14 IRQ_TYPE_LEVEL_HIGH |
83 | 0 15 0x4 | 85 | 0 15 IRQ_TYPE_LEVEL_HIGH |
84 | 0 16 0x4>; | 86 | 0 16 IRQ_TYPE_LEVEL_HIGH>; |
85 | control-parent; | 87 | control-parent; |
86 | }; | 88 | }; |
87 | 89 | ||
88 | irqpin2: irqpin@e6900008 { | 90 | irqpin2: irqpin@e6900008 { |
89 | compatible = "renesas,intc-irqpin"; | 91 | compatible = "renesas,intc-irqpin-sh73a0", "renesas,intc-irqpin"; |
90 | #interrupt-cells = <2>; | 92 | #interrupt-cells = <2>; |
91 | interrupt-controller; | 93 | interrupt-controller; |
92 | reg = <0xe6900008 4>, | 94 | reg = <0xe6900008 4>, |
@@ -95,18 +97,18 @@ | |||
95 | <0xe6900048 1>, | 97 | <0xe6900048 1>, |
96 | <0xe6900068 1>; | 98 | <0xe6900068 1>; |
97 | interrupt-parent = <&gic>; | 99 | interrupt-parent = <&gic>; |
98 | interrupts = <0 17 0x4 | 100 | interrupts = <0 17 IRQ_TYPE_LEVEL_HIGH |
99 | 0 18 0x4 | 101 | 0 18 IRQ_TYPE_LEVEL_HIGH |
100 | 0 19 0x4 | 102 | 0 19 IRQ_TYPE_LEVEL_HIGH |
101 | 0 20 0x4 | 103 | 0 20 IRQ_TYPE_LEVEL_HIGH |
102 | 0 21 0x4 | 104 | 0 21 IRQ_TYPE_LEVEL_HIGH |
103 | 0 22 0x4 | 105 | 0 22 IRQ_TYPE_LEVEL_HIGH |
104 | 0 23 0x4 | 106 | 0 23 IRQ_TYPE_LEVEL_HIGH |
105 | 0 24 0x4>; | 107 | 0 24 IRQ_TYPE_LEVEL_HIGH>; |
106 | }; | 108 | }; |
107 | 109 | ||
108 | irqpin3: irqpin@e690000c { | 110 | irqpin3: irqpin@e690000c { |
109 | compatible = "renesas,intc-irqpin"; | 111 | compatible = "renesas,intc-irqpin-sh73a0", "renesas,intc-irqpin"; |
110 | #interrupt-cells = <2>; | 112 | #interrupt-cells = <2>; |
111 | interrupt-controller; | 113 | interrupt-controller; |
112 | reg = <0xe690000c 4>, | 114 | reg = <0xe690000c 4>, |
@@ -115,14 +117,14 @@ | |||
115 | <0xe690004c 1>, | 117 | <0xe690004c 1>, |
116 | <0xe690006c 1>; | 118 | <0xe690006c 1>; |
117 | interrupt-parent = <&gic>; | 119 | interrupt-parent = <&gic>; |
118 | interrupts = <0 25 0x4 | 120 | interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH |
119 | 0 26 0x4 | 121 | 0 26 IRQ_TYPE_LEVEL_HIGH |
120 | 0 27 0x4 | 122 | 0 27 IRQ_TYPE_LEVEL_HIGH |
121 | 0 28 0x4 | 123 | 0 28 IRQ_TYPE_LEVEL_HIGH |
122 | 0 29 0x4 | 124 | 0 29 IRQ_TYPE_LEVEL_HIGH |
123 | 0 30 0x4 | 125 | 0 30 IRQ_TYPE_LEVEL_HIGH |
124 | 0 31 0x4 | 126 | 0 31 IRQ_TYPE_LEVEL_HIGH |
125 | 0 32 0x4>; | 127 | 0 32 IRQ_TYPE_LEVEL_HIGH>; |
126 | }; | 128 | }; |
127 | 129 | ||
128 | i2c0: i2c@e6820000 { | 130 | i2c0: i2c@e6820000 { |
@@ -131,10 +133,10 @@ | |||
131 | compatible = "renesas,rmobile-iic"; | 133 | compatible = "renesas,rmobile-iic"; |
132 | reg = <0xe6820000 0x425>; | 134 | reg = <0xe6820000 0x425>; |
133 | interrupt-parent = <&gic>; | 135 | interrupt-parent = <&gic>; |
134 | interrupts = <0 167 0x4 | 136 | interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH |
135 | 0 168 0x4 | 137 | 0 168 IRQ_TYPE_LEVEL_HIGH |
136 | 0 169 0x4 | 138 | 0 169 IRQ_TYPE_LEVEL_HIGH |
137 | 0 170 0x4>; | 139 | 0 170 IRQ_TYPE_LEVEL_HIGH>; |
138 | status = "disabled"; | 140 | status = "disabled"; |
139 | }; | 141 | }; |
140 | 142 | ||
@@ -144,10 +146,10 @@ | |||
144 | compatible = "renesas,rmobile-iic"; | 146 | compatible = "renesas,rmobile-iic"; |
145 | reg = <0xe6822000 0x425>; | 147 | reg = <0xe6822000 0x425>; |
146 | interrupt-parent = <&gic>; | 148 | interrupt-parent = <&gic>; |
147 | interrupts = <0 51 0x4 | 149 | interrupts = <0 51 IRQ_TYPE_LEVEL_HIGH |
148 | 0 52 0x4 | 150 | 0 52 IRQ_TYPE_LEVEL_HIGH |
149 | 0 53 0x4 | 151 | 0 53 IRQ_TYPE_LEVEL_HIGH |
150 | 0 54 0x4>; | 152 | 0 54 IRQ_TYPE_LEVEL_HIGH>; |
151 | status = "disabled"; | 153 | status = "disabled"; |
152 | }; | 154 | }; |
153 | 155 | ||
@@ -157,10 +159,10 @@ | |||
157 | compatible = "renesas,rmobile-iic"; | 159 | compatible = "renesas,rmobile-iic"; |
158 | reg = <0xe6824000 0x425>; | 160 | reg = <0xe6824000 0x425>; |
159 | interrupt-parent = <&gic>; | 161 | interrupt-parent = <&gic>; |
160 | interrupts = <0 171 0x4 | 162 | interrupts = <0 171 IRQ_TYPE_LEVEL_HIGH |
161 | 0 172 0x4 | 163 | 0 172 IRQ_TYPE_LEVEL_HIGH |
162 | 0 173 0x4 | 164 | 0 173 IRQ_TYPE_LEVEL_HIGH |
163 | 0 174 0x4>; | 165 | 0 174 IRQ_TYPE_LEVEL_HIGH>; |
164 | status = "disabled"; | 166 | status = "disabled"; |
165 | }; | 167 | }; |
166 | 168 | ||
@@ -170,10 +172,10 @@ | |||
170 | compatible = "renesas,rmobile-iic"; | 172 | compatible = "renesas,rmobile-iic"; |
171 | reg = <0xe6826000 0x425>; | 173 | reg = <0xe6826000 0x425>; |
172 | interrupt-parent = <&gic>; | 174 | interrupt-parent = <&gic>; |
173 | interrupts = <0 183 0x4 | 175 | interrupts = <0 183 IRQ_TYPE_LEVEL_HIGH |
174 | 0 184 0x4 | 176 | 0 184 IRQ_TYPE_LEVEL_HIGH |
175 | 0 185 0x4 | 177 | 0 185 IRQ_TYPE_LEVEL_HIGH |
176 | 0 186 0x4>; | 178 | 0 186 IRQ_TYPE_LEVEL_HIGH>; |
177 | status = "disabled"; | 179 | status = "disabled"; |
178 | }; | 180 | }; |
179 | 181 | ||
@@ -183,52 +185,52 @@ | |||
183 | compatible = "renesas,rmobile-iic"; | 185 | compatible = "renesas,rmobile-iic"; |
184 | reg = <0xe6828000 0x425>; | 186 | reg = <0xe6828000 0x425>; |
185 | interrupt-parent = <&gic>; | 187 | interrupt-parent = <&gic>; |
186 | interrupts = <0 187 0x4 | 188 | interrupts = <0 187 IRQ_TYPE_LEVEL_HIGH |
187 | 0 188 0x4 | 189 | 0 188 IRQ_TYPE_LEVEL_HIGH |
188 | 0 189 0x4 | 190 | 0 189 IRQ_TYPE_LEVEL_HIGH |
189 | 0 190 0x4>; | 191 | 0 190 IRQ_TYPE_LEVEL_HIGH>; |
190 | status = "disabled"; | 192 | status = "disabled"; |
191 | }; | 193 | }; |
192 | 194 | ||
193 | mmcif: mmcif@e6bd0000 { | 195 | mmcif: mmc@e6bd0000 { |
194 | compatible = "renesas,sh-mmcif"; | 196 | compatible = "renesas,sh-mmcif"; |
195 | reg = <0xe6bd0000 0x100>; | 197 | reg = <0xe6bd0000 0x100>; |
196 | interrupt-parent = <&gic>; | 198 | interrupt-parent = <&gic>; |
197 | interrupts = <0 140 0x4 | 199 | interrupts = <0 140 IRQ_TYPE_LEVEL_HIGH |
198 | 0 141 0x4>; | 200 | 0 141 IRQ_TYPE_LEVEL_HIGH>; |
199 | reg-io-width = <4>; | 201 | reg-io-width = <4>; |
200 | status = "disabled"; | 202 | status = "disabled"; |
201 | }; | 203 | }; |
202 | 204 | ||
203 | sdhi0: sdhi@ee100000 { | 205 | sdhi0: sd@ee100000 { |
204 | compatible = "renesas,sdhi-r8a7740"; | 206 | compatible = "renesas,sdhi-sh73a0"; |
205 | reg = <0xee100000 0x100>; | 207 | reg = <0xee100000 0x100>; |
206 | interrupt-parent = <&gic>; | 208 | interrupt-parent = <&gic>; |
207 | interrupts = <0 83 4 | 209 | interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH |
208 | 0 84 4 | 210 | 0 84 IRQ_TYPE_LEVEL_HIGH |
209 | 0 85 4>; | 211 | 0 85 IRQ_TYPE_LEVEL_HIGH>; |
210 | cap-sd-highspeed; | 212 | cap-sd-highspeed; |
211 | status = "disabled"; | 213 | status = "disabled"; |
212 | }; | 214 | }; |
213 | 215 | ||
214 | /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ | 216 | /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ |
215 | sdhi1: sdhi@ee120000 { | 217 | sdhi1: sd@ee120000 { |
216 | compatible = "renesas,sdhi-r8a7740"; | 218 | compatible = "renesas,sdhi-sh73a0"; |
217 | reg = <0xee120000 0x100>; | 219 | reg = <0xee120000 0x100>; |
218 | interrupt-parent = <&gic>; | 220 | interrupt-parent = <&gic>; |
219 | interrupts = <0 88 4 | 221 | interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH |
220 | 0 89 4>; | 222 | 0 89 IRQ_TYPE_LEVEL_HIGH>; |
221 | toshiba,mmc-wrprotect-disable; | 223 | toshiba,mmc-wrprotect-disable; |
222 | cap-sd-highspeed; | 224 | cap-sd-highspeed; |
223 | status = "disabled"; | 225 | status = "disabled"; |
224 | }; | 226 | }; |
225 | 227 | ||
226 | sdhi2: sdhi@ee140000 { | 228 | sdhi2: sd@ee140000 { |
227 | compatible = "renesas,sdhi-r8a7740"; | 229 | compatible = "renesas,sdhi-sh73a0"; |
228 | reg = <0xee140000 0x100>; | 230 | reg = <0xee140000 0x100>; |
229 | interrupt-parent = <&gic>; | 231 | interrupt-parent = <&gic>; |
230 | interrupts = <0 104 4 | 232 | interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH |
231 | 0 105 4>; | 233 | 0 105 IRQ_TYPE_LEVEL_HIGH>; |
232 | toshiba,mmc-wrprotect-disable; | 234 | toshiba,mmc-wrprotect-disable; |
233 | cap-sd-highspeed; | 235 | cap-sd-highspeed; |
234 | status = "disabled"; | 236 | status = "disabled"; |
diff --git a/arch/arm/boot/dts/st-pincfg.h b/arch/arm/boot/dts/st-pincfg.h index 8c45d85ac13e..4851c387d52d 100644 --- a/arch/arm/boot/dts/st-pincfg.h +++ b/arch/arm/boot/dts/st-pincfg.h | |||
@@ -15,7 +15,7 @@ | |||
15 | /* Pull Up */ | 15 | /* Pull Up */ |
16 | #define PU (1 << 26) | 16 | #define PU (1 << 26) |
17 | /* Open Drain */ | 17 | /* Open Drain */ |
18 | #define OD (1 << 26) | 18 | #define OD (1 << 25) |
19 | #define RT (1 << 23) | 19 | #define RT (1 << 23) |
20 | #define INVERTCLK (1 << 22) | 20 | #define INVERTCLK (1 << 22) |
21 | #define CLKNOTDATA (1 << 21) | 21 | #define CLKNOTDATA (1 << 21) |
diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi index 7da99fe497e1..e0853ea02df2 100644 --- a/arch/arm/boot/dts/ste-dbx5x0.dtsi +++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi | |||
@@ -913,6 +913,10 @@ | |||
913 | interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>; | 913 | interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>; |
914 | v-ape-supply = <&db8500_vape_reg>; | 914 | v-ape-supply = <&db8500_vape_reg>; |
915 | 915 | ||
916 | dmas = <&dma 31 0 0x12>, /* Logical - DevToMem - HighPrio */ | ||
917 | <&dma 31 0 0x10>; /* Logical - MemToDev - HighPrio */ | ||
918 | dma-names = "rx", "tx"; | ||
919 | |||
916 | clocks = <&prcc_kclk 1 3>, <&prcc_pclk 1 3>; | 920 | clocks = <&prcc_kclk 1 3>, <&prcc_pclk 1 3>; |
917 | clock-names = "msp", "apb_pclk"; | 921 | clock-names = "msp", "apb_pclk"; |
918 | 922 | ||
@@ -925,6 +929,9 @@ | |||
925 | interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>; | 929 | interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>; |
926 | v-ape-supply = <&db8500_vape_reg>; | 930 | v-ape-supply = <&db8500_vape_reg>; |
927 | 931 | ||
932 | dmas = <&dma 30 0 0x10>; /* Logical - MemToDev - HighPrio */ | ||
933 | dma-names = "tx"; | ||
934 | |||
928 | clocks = <&prcc_kclk 1 4>, <&prcc_pclk 1 4>; | 935 | clocks = <&prcc_kclk 1 4>, <&prcc_pclk 1 4>; |
929 | clock-names = "msp", "apb_pclk"; | 936 | clock-names = "msp", "apb_pclk"; |
930 | 937 | ||
@@ -938,6 +945,11 @@ | |||
938 | interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>; | 945 | interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>; |
939 | v-ape-supply = <&db8500_vape_reg>; | 946 | v-ape-supply = <&db8500_vape_reg>; |
940 | 947 | ||
948 | dmas = <&dma 14 0 0x12>, /* Logical - DevToMem - HighPrio */ | ||
949 | <&dma 14 1 0x19>; /* Physical Chan 1 - MemToDev | ||
950 | HighPrio - Fixed */ | ||
951 | dma-names = "rx", "tx"; | ||
952 | |||
941 | clocks = <&prcc_kclk 2 3>, <&prcc_pclk 2 5>; | 953 | clocks = <&prcc_kclk 2 3>, <&prcc_pclk 2 5>; |
942 | clock-names = "msp", "apb_pclk"; | 954 | clock-names = "msp", "apb_pclk"; |
943 | 955 | ||
@@ -950,6 +962,9 @@ | |||
950 | interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>; | 962 | interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>; |
951 | v-ape-supply = <&db8500_vape_reg>; | 963 | v-ape-supply = <&db8500_vape_reg>; |
952 | 964 | ||
965 | dmas = <&dma 30 0 0x12>; /* Logical - DevToMem - HighPrio */ | ||
966 | dma-names = "rx"; | ||
967 | |||
953 | clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 11>; | 968 | clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 11>; |
954 | clock-names = "msp", "apb_pclk"; | 969 | clock-names = "msp", "apb_pclk"; |
955 | 970 | ||
@@ -987,6 +1002,23 @@ | |||
987 | status = "disabled"; | 1002 | status = "disabled"; |
988 | }; | 1003 | }; |
989 | 1004 | ||
1005 | mcde@a0350000 { | ||
1006 | compatible = "stericsson,mcde"; | ||
1007 | reg = <0xa0350000 0x1000>, /* MCDE */ | ||
1008 | <0xa0351000 0x1000>, /* DSI link 1 */ | ||
1009 | <0xa0352000 0x1000>, /* DSI link 2 */ | ||
1010 | <0xa0353000 0x1000>; /* DSI link 3 */ | ||
1011 | interrupts = <0 48 IRQ_TYPE_LEVEL_HIGH>; | ||
1012 | clocks = <&prcmu_clk PRCMU_MCDECLK>, /* Main MCDE clock */ | ||
1013 | <&prcmu_clk PRCMU_LCDCLK>, /* LCD clock */ | ||
1014 | <&prcmu_clk PRCMU_PLLDSI>, /* HDMI clock */ | ||
1015 | <&prcmu_clk PRCMU_DSI0CLK>, /* DSI 0 */ | ||
1016 | <&prcmu_clk PRCMU_DSI1CLK>, /* DSI 1 */ | ||
1017 | <&prcmu_clk PRCMU_DSI0ESCCLK>, /* TVout clock 0 */ | ||
1018 | <&prcmu_clk PRCMU_DSI1ESCCLK>, /* TVout clock 1 */ | ||
1019 | <&prcmu_clk PRCMU_DSI2ESCCLK>; /* TVout clock 2 */ | ||
1020 | }; | ||
1021 | |||
990 | cryp@a03cb000 { | 1022 | cryp@a03cb000 { |
991 | compatible = "stericsson,ux500-cryp"; | 1023 | compatible = "stericsson,ux500-cryp"; |
992 | reg = <0xa03cb000 0x1000>; | 1024 | reg = <0xa03cb000 0x1000>; |
diff --git a/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi b/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi new file mode 100644 index 000000000000..addfcc7c2750 --- /dev/null +++ b/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | |||
@@ -0,0 +1,745 @@ | |||
1 | /* | ||
2 | * Copyright 2013 Linaro Ltd. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include "ste-nomadik-pinctrl.dtsi" | ||
13 | |||
14 | / { | ||
15 | soc { | ||
16 | pinctrl { | ||
17 | /* Settings for all UART default and sleep states */ | ||
18 | uart0 { | ||
19 | uart0_default_mode: uart0_default { | ||
20 | default_mux { | ||
21 | ste,function = "u0"; | ||
22 | ste,pins = "u0_a_1"; | ||
23 | }; | ||
24 | default_cfg1 { | ||
25 | ste,pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */ | ||
26 | ste,config = <&in_pu>; | ||
27 | }; | ||
28 | |||
29 | default_cfg2 { | ||
30 | ste,pins = "GPIO1_AJ3", "GPIO3_AH3"; /* RTS+TXD */ | ||
31 | ste,config = <&out_hi>; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | uart0_sleep_mode: uart0_sleep { | ||
36 | sleep_cfg1 { | ||
37 | ste,pins = "GPIO0_AJ5", "GPIO2_AH4"; /* CTS+RXD */ | ||
38 | ste,config = <&slpm_in_wkup_pdis>; | ||
39 | }; | ||
40 | |||
41 | sleep_cfg2 { | ||
42 | ste,pins = "GPIO1_AJ3"; /* RTS */ | ||
43 | ste,config = <&slpm_out_hi_wkup_pdis>; | ||
44 | }; | ||
45 | |||
46 | sleep_cfg3 { | ||
47 | ste,pins = "GPIO3_AH3"; /* TXD */ | ||
48 | ste,config = <&slpm_out_wkup_pdis>; | ||
49 | }; | ||
50 | }; | ||
51 | }; | ||
52 | |||
53 | uart1 { | ||
54 | uart1_default_mode: uart1_default { | ||
55 | default_mux { | ||
56 | ste,function = "u1"; | ||
57 | ste,pins = "u1rxtx_a_1"; | ||
58 | }; | ||
59 | default_cfg1 { | ||
60 | ste,pins = "GPIO4_AH6"; /* RXD */ | ||
61 | ste,config = <&in_pu>; | ||
62 | }; | ||
63 | |||
64 | default_cfg2 { | ||
65 | ste,pins = "GPIO5_AG6"; /* TXD */ | ||
66 | ste,config = <&out_hi>; | ||
67 | }; | ||
68 | }; | ||
69 | |||
70 | uart1_sleep_mode: uart1_sleep { | ||
71 | sleep_cfg1 { | ||
72 | ste,pins = "GPIO4_AH6"; /* RXD */ | ||
73 | ste,config = <&slpm_in_wkup_pdis>; | ||
74 | }; | ||
75 | |||
76 | sleep_cfg2 { | ||
77 | ste,pins = "GPIO5_AG6"; /* TXD */ | ||
78 | ste,config = <&slpm_out_wkup_pdis>; | ||
79 | }; | ||
80 | }; | ||
81 | }; | ||
82 | |||
83 | uart2 { | ||
84 | uart2_default_mode: uart2_default { | ||
85 | default_mux { | ||
86 | ste,function = "u2"; | ||
87 | ste,pins = "u2rxtx_c_1"; | ||
88 | }; | ||
89 | default_cfg1 { | ||
90 | ste,pins = "GPIO29_W2"; /* RXD */ | ||
91 | ste,config = <&in_pu>; | ||
92 | }; | ||
93 | |||
94 | default_cfg2 { | ||
95 | ste,pins = "GPIO30_W3"; /* TXD */ | ||
96 | ste,config = <&out_hi>; | ||
97 | }; | ||
98 | }; | ||
99 | |||
100 | uart2_sleep_mode: uart2_sleep { | ||
101 | sleep_cfg1 { | ||
102 | ste,pins = "GPIO29_W2"; /* RXD */ | ||
103 | ste,config = <&in_wkup_pdis>; | ||
104 | }; | ||
105 | |||
106 | sleep_cfg2 { | ||
107 | ste,pins = "GPIO30_W3"; /* TXD */ | ||
108 | ste,config = <&out_wkup_pdis>; | ||
109 | }; | ||
110 | }; | ||
111 | }; | ||
112 | |||
113 | /* Settings for all I2C default and sleep states */ | ||
114 | i2c0 { | ||
115 | i2c0_default_mode: i2c_default { | ||
116 | default_mux { | ||
117 | ste,function = "i2c0"; | ||
118 | ste,pins = "i2c0_a_1"; | ||
119 | }; | ||
120 | default_cfg1 { | ||
121 | ste,pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */ | ||
122 | ste,config = <&in_pu>; | ||
123 | }; | ||
124 | }; | ||
125 | |||
126 | i2c0_sleep_mode: i2c_sleep { | ||
127 | sleep_cfg1 { | ||
128 | ste,pins = "GPIO147_C15", "GPIO148_B16"; /* SDA/SCL */ | ||
129 | ste,config = <&slpm_in_wkup_pdis>; | ||
130 | }; | ||
131 | }; | ||
132 | }; | ||
133 | |||
134 | i2c1 { | ||
135 | i2c1_default_mode: i2c_default { | ||
136 | default_mux { | ||
137 | ste,function = "i2c1"; | ||
138 | ste,pins = "i2c1_b_2"; | ||
139 | }; | ||
140 | default_cfg1 { | ||
141 | ste,pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */ | ||
142 | ste,config = <&in_pu>; | ||
143 | }; | ||
144 | }; | ||
145 | |||
146 | i2c1_sleep_mode: i2c_sleep { | ||
147 | sleep_cfg1 { | ||
148 | ste,pins = "GPIO16_AD3", "GPIO17_AD4"; /* SDA/SCL */ | ||
149 | ste,config = <&slpm_in_wkup_pdis>; | ||
150 | }; | ||
151 | }; | ||
152 | }; | ||
153 | |||
154 | i2c2 { | ||
155 | i2c2_default_mode: i2c_default { | ||
156 | default_mux { | ||
157 | ste,function = "i2c2"; | ||
158 | ste,pins = "i2c2_b_2"; | ||
159 | }; | ||
160 | default_cfg1 { | ||
161 | ste,pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */ | ||
162 | ste,config = <&in_pu>; | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | i2c2_sleep_mode: i2c_sleep { | ||
167 | sleep_cfg1 { | ||
168 | ste,pins = "GPIO10_AF5", "GPIO11_AG4"; /* SDA/SCL */ | ||
169 | ste,config = <&slpm_in_wkup_pdis>; | ||
170 | }; | ||
171 | }; | ||
172 | }; | ||
173 | |||
174 | i2c3 { | ||
175 | i2c3_default_mode: i2c_default { | ||
176 | default_mux { | ||
177 | ste,function = "i2c3"; | ||
178 | ste,pins = "i2c3_c_2"; | ||
179 | }; | ||
180 | default_cfg1 { | ||
181 | ste,pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */ | ||
182 | ste,config = <&in_pu>; | ||
183 | }; | ||
184 | }; | ||
185 | |||
186 | i2c3_sleep_mode: i2c_sleep { | ||
187 | sleep_cfg1 { | ||
188 | ste,pins = "GPIO229_AG7", "GPIO230_AF7"; /* SDA/SCL */ | ||
189 | ste,config = <&slpm_in_wkup_pdis>; | ||
190 | }; | ||
191 | }; | ||
192 | }; | ||
193 | |||
194 | /* | ||
195 | * Activating I2C4 will conflict with UART1 about the same pins so do not | ||
196 | * enable I2C4 and UART1 at the same time. | ||
197 | */ | ||
198 | i2c4 { | ||
199 | i2c4_default_mode: i2c_default { | ||
200 | default_mux { | ||
201 | ste,function = "i2c4"; | ||
202 | ste,pins = "i2c4_b_1"; | ||
203 | }; | ||
204 | default_cfg1 { | ||
205 | ste,pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */ | ||
206 | ste,config = <&in_pu>; | ||
207 | }; | ||
208 | }; | ||
209 | |||
210 | i2c4_sleep_mode: i2c_sleep { | ||
211 | sleep_cfg1 { | ||
212 | ste,pins = "GPIO4_AH6", "GPIO5_AG6"; /* SDA/SCL */ | ||
213 | ste,config = <&slpm_in_wkup_pdis>; | ||
214 | }; | ||
215 | }; | ||
216 | }; | ||
217 | |||
218 | /* Settings for all SPI default and sleep states */ | ||
219 | spi2 { | ||
220 | spi2_default_mode: spi_default { | ||
221 | default_mux { | ||
222 | ste,function = "spi2"; | ||
223 | ste,pins = "spi2_oc1_2"; | ||
224 | }; | ||
225 | default_cfg1 { | ||
226 | ste,pins = "GPIO216_AG12"; /* FRM */ | ||
227 | ste,config = <&gpio_out_hi>; | ||
228 | }; | ||
229 | default_cfg2 { | ||
230 | ste,pins = "GPIO218_AH11"; /* RXD */ | ||
231 | ste,config = <&in_pd>; | ||
232 | }; | ||
233 | default_cfg3 { | ||
234 | ste,pins = | ||
235 | "GPIO215_AH13", /* TXD */ | ||
236 | "GPIO217_AH12"; /* CLK */ | ||
237 | ste,config = <&out_lo>; | ||
238 | }; | ||
239 | }; | ||
240 | |||
241 | spi2_idle_mode: spi_idle { | ||
242 | /* | ||
243 | * The idle mode is basically sleep mode sans wakeups. Also | ||
244 | * note that we have muxes the pins off the function here | ||
245 | * as we do not state any muxing. | ||
246 | */ | ||
247 | idle_cfg1 { | ||
248 | ste,pins = "GPIO218_AH11"; /* RXD */ | ||
249 | ste,config = <&slpm_in_pdis>; | ||
250 | }; | ||
251 | idle_cfg2 { | ||
252 | ste,pins = "GPIO215_AH13"; /* TXD */ | ||
253 | ste,config = <&slpm_out_lo_pdis>; | ||
254 | }; | ||
255 | idle_cfg3 { | ||
256 | ste,pins = "GPIO217_AH12"; /* CLK */ | ||
257 | ste,config = <&slpm_pdis>; | ||
258 | }; | ||
259 | }; | ||
260 | |||
261 | spi2_sleep_mode: spi_sleep { | ||
262 | sleep_cfg1 { | ||
263 | ste,pins = | ||
264 | "GPIO216_AG12", /* FRM */ | ||
265 | "GPIO218_AH11"; /* RXD */ | ||
266 | ste,config = <&slpm_in_wkup_pdis>; | ||
267 | }; | ||
268 | sleep_cfg2 { | ||
269 | ste,pins = "GPIO215_AH13"; /* TXD */ | ||
270 | ste,config = <&slpm_out_lo_wkup_pdis>; | ||
271 | }; | ||
272 | sleep_cfg3 { | ||
273 | ste,pins = "GPIO217_AH12"; /* CLK */ | ||
274 | ste,config = <&slpm_wkup_pdis>; | ||
275 | }; | ||
276 | }; | ||
277 | }; | ||
278 | |||
279 | /* Settings for all MMC/SD/SDIO default and sleep states */ | ||
280 | sdi0 { | ||
281 | /* This is the external SD card slot, 4 bits wide */ | ||
282 | sdi0_default_mode: sdi0_default { | ||
283 | default_mux { | ||
284 | ste,function = "mc0"; | ||
285 | ste,pins = "mc0_a_1"; | ||
286 | }; | ||
287 | default_cfg1 { | ||
288 | ste,pins = | ||
289 | "GPIO18_AC2", /* CMDDIR */ | ||
290 | "GPIO19_AC1", /* DAT0DIR */ | ||
291 | "GPIO20_AB4"; /* DAT2DIR */ | ||
292 | ste,config = <&out_hi>; | ||
293 | }; | ||
294 | default_cfg2 { | ||
295 | ste,pins = "GPIO22_AA3"; /* FBCLK */ | ||
296 | ste,config = <&in_nopull>; | ||
297 | }; | ||
298 | default_cfg3 { | ||
299 | ste,pins = "GPIO23_AA4"; /* CLK */ | ||
300 | ste,config = <&out_lo>; | ||
301 | }; | ||
302 | default_cfg4 { | ||
303 | ste,pins = | ||
304 | "GPIO24_AB2", /* CMD */ | ||
305 | "GPIO25_Y4", /* DAT0 */ | ||
306 | "GPIO26_Y2", /* DAT1 */ | ||
307 | "GPIO27_AA2", /* DAT2 */ | ||
308 | "GPIO28_AA1"; /* DAT3 */ | ||
309 | ste,config = <&in_pu>; | ||
310 | }; | ||
311 | }; | ||
312 | |||
313 | sdi0_sleep_mode: sdi0_sleep { | ||
314 | sleep_cfg1 { | ||
315 | ste,pins = | ||
316 | "GPIO18_AC2", /* CMDDIR */ | ||
317 | "GPIO19_AC1", /* DAT0DIR */ | ||
318 | "GPIO20_AB4"; /* DAT2DIR */ | ||
319 | ste,config = <&slpm_out_hi_wkup_pdis>; | ||
320 | }; | ||
321 | sleep_cfg2 { | ||
322 | ste,pins = | ||
323 | "GPIO22_AA3", /* FBCLK */ | ||
324 | "GPIO24_AB2", /* CMD */ | ||
325 | "GPIO25_Y4", /* DAT0 */ | ||
326 | "GPIO26_Y2", /* DAT1 */ | ||
327 | "GPIO27_AA2", /* DAT2 */ | ||
328 | "GPIO28_AA1"; /* DAT3 */ | ||
329 | ste,config = <&slpm_in_wkup_pdis>; | ||
330 | }; | ||
331 | sleep_cfg3 { | ||
332 | ste,pins = "GPIO23_AA4"; /* CLK */ | ||
333 | ste,config = <&slpm_out_lo_wkup_pdis>; | ||
334 | }; | ||
335 | }; | ||
336 | }; | ||
337 | |||
338 | sdi1 { | ||
339 | /* This is the WLAN SDIO 4 bits wide */ | ||
340 | sdi1_default_mode: sdi1_default { | ||
341 | default_mux { | ||
342 | ste,function = "mc1"; | ||
343 | ste,pins = "mc1_a_1"; | ||
344 | }; | ||
345 | default_cfg1 { | ||
346 | ste,pins = "GPIO208_AH16"; /* CLK */ | ||
347 | ste,config = <&out_lo>; | ||
348 | }; | ||
349 | default_cfg2 { | ||
350 | ste,pins = "GPIO209_AG15"; /* FBCLK */ | ||
351 | ste,config = <&in_nopull>; | ||
352 | }; | ||
353 | default_cfg3 { | ||
354 | ste,pins = | ||
355 | "GPIO210_AJ15", /* CMD */ | ||
356 | "GPIO211_AG14", /* DAT0 */ | ||
357 | "GPIO212_AF13", /* DAT1 */ | ||
358 | "GPIO213_AG13", /* DAT2 */ | ||
359 | "GPIO214_AH15"; /* DAT3 */ | ||
360 | ste,config = <&in_pu>; | ||
361 | }; | ||
362 | }; | ||
363 | |||
364 | sdi1_sleep_mode: sdi1_sleep { | ||
365 | sleep_cfg1 { | ||
366 | ste,pins = "GPIO208_AH16"; /* CLK */ | ||
367 | ste,config = <&slpm_out_lo_wkup_pdis>; | ||
368 | }; | ||
369 | sleep_cfg2 { | ||
370 | ste,pins = | ||
371 | "GPIO209_AG15", /* FBCLK */ | ||
372 | "GPIO210_AJ15", /* CMD */ | ||
373 | "GPIO211_AG14", /* DAT0 */ | ||
374 | "GPIO212_AF13", /* DAT1 */ | ||
375 | "GPIO213_AG13", /* DAT2 */ | ||
376 | "GPIO214_AH15"; /* DAT3 */ | ||
377 | ste,config = <&slpm_in_wkup_pdis>; | ||
378 | }; | ||
379 | }; | ||
380 | }; | ||
381 | |||
382 | sdi2 { | ||
383 | /* This is the eMMC 8 bits wide, usually PoP eMMC */ | ||
384 | sdi2_default_mode: sdi2_default { | ||
385 | default_mux { | ||
386 | ste,function = "mc2"; | ||
387 | ste,pins = "mc2_a_1"; | ||
388 | }; | ||
389 | default_cfg1 { | ||
390 | ste,pins = "GPIO128_A5"; /* CLK */ | ||
391 | ste,config = <&out_lo>; | ||
392 | }; | ||
393 | default_cfg2 { | ||
394 | ste,pins = "GPIO130_C8"; /* FBCLK */ | ||
395 | ste,config = <&in_nopull>; | ||
396 | }; | ||
397 | default_cfg3 { | ||
398 | ste,pins = | ||
399 | "GPIO129_B4", /* CMD */ | ||
400 | "GPIO131_A12", /* DAT0 */ | ||
401 | "GPIO132_C10", /* DAT1 */ | ||
402 | "GPIO133_B10", /* DAT2 */ | ||
403 | "GPIO134_B9", /* DAT3 */ | ||
404 | "GPIO135_A9", /* DAT4 */ | ||
405 | "GPIO136_C7", /* DAT5 */ | ||
406 | "GPIO137_A7", /* DAT6 */ | ||
407 | "GPIO138_C5"; /* DAT7 */ | ||
408 | ste,config = <&in_pu>; | ||
409 | }; | ||
410 | }; | ||
411 | |||
412 | sdi2_sleep_mode: sdi2_sleep { | ||
413 | sleep_cfg1 { | ||
414 | ste,pins = "GPIO128_A5"; /* CLK */ | ||
415 | ste,config = <&out_lo_wkup_pdis>; | ||
416 | }; | ||
417 | sleep_cfg2 { | ||
418 | ste,pins = | ||
419 | "GPIO130_C8", /* FBCLK */ | ||
420 | "GPIO129_B4"; /* CMD */ | ||
421 | ste,config = <&in_wkup_pdis_en>; | ||
422 | }; | ||
423 | sleep_cfg3 { | ||
424 | ste,pins = | ||
425 | "GPIO131_A12", /* DAT0 */ | ||
426 | "GPIO132_C10", /* DAT1 */ | ||
427 | "GPIO133_B10", /* DAT2 */ | ||
428 | "GPIO134_B9", /* DAT3 */ | ||
429 | "GPIO135_A9", /* DAT4 */ | ||
430 | "GPIO136_C7", /* DAT5 */ | ||
431 | "GPIO137_A7", /* DAT6 */ | ||
432 | "GPIO138_C5"; /* DAT7 */ | ||
433 | ste,config = <&in_wkup_pdis>; | ||
434 | }; | ||
435 | }; | ||
436 | }; | ||
437 | |||
438 | sdi4 { | ||
439 | /* This is the eMMC 8 bits wide, usually PCB-mounted eMMC */ | ||
440 | sdi4_default_mode: sdi4_default { | ||
441 | default_mux { | ||
442 | ste,function = "mc4"; | ||
443 | ste,pins = "mc4_a_1"; | ||
444 | }; | ||
445 | default_cfg1 { | ||
446 | ste,pins = "GPIO203_AE23"; /* CLK */ | ||
447 | ste,config = <&out_lo>; | ||
448 | }; | ||
449 | default_cfg2 { | ||
450 | ste,pins = "GPIO202_AF25"; /* FBCLK */ | ||
451 | ste,config = <&in_nopull>; | ||
452 | }; | ||
453 | default_cfg3 { | ||
454 | ste,pins = | ||
455 | "GPIO201_AF24", /* CMD */ | ||
456 | "GPIO200_AH26", /* DAT0 */ | ||
457 | "GPIO199_AH23", /* DAT1 */ | ||
458 | "GPIO198_AG25", /* DAT2 */ | ||
459 | "GPIO197_AH24", /* DAT3 */ | ||
460 | "GPIO207_AJ23", /* DAT4 */ | ||
461 | "GPIO206_AG24", /* DAT5 */ | ||
462 | "GPIO205_AG23", /* DAT6 */ | ||
463 | "GPIO204_AF23"; /* DAT7 */ | ||
464 | ste,config = <&in_pu>; | ||
465 | }; | ||
466 | }; | ||
467 | |||
468 | sdi4_sleep_mode: sdi4_sleep { | ||
469 | sleep_cfg1 { | ||
470 | ste,pins = "GPIO203_AE23"; /* CLK */ | ||
471 | ste,config = <&out_lo_wkup_pdis>; | ||
472 | }; | ||
473 | sleep_cfg2 { | ||
474 | ste,pins = | ||
475 | "GPIO202_AF25", /* FBCLK */ | ||
476 | "GPIO201_AF24", /* CMD */ | ||
477 | "GPIO200_AH26", /* DAT0 */ | ||
478 | "GPIO199_AH23", /* DAT1 */ | ||
479 | "GPIO198_AG25", /* DAT2 */ | ||
480 | "GPIO197_AH24", /* DAT3 */ | ||
481 | "GPIO207_AJ23", /* DAT4 */ | ||
482 | "GPIO206_AG24", /* DAT5 */ | ||
483 | "GPIO205_AG23", /* DAT6 */ | ||
484 | "GPIO204_AF23"; /* DAT7 */ | ||
485 | ste,config = <&slpm_in_wkup_pdis>; | ||
486 | }; | ||
487 | }; | ||
488 | }; | ||
489 | |||
490 | /* | ||
491 | * Multi-rate serial ports (MSPs) - MSP3 output is internal and | ||
492 | * cannot be muxed onto any pins. | ||
493 | */ | ||
494 | msp0 { | ||
495 | msp0_default_mode: msp0_default { | ||
496 | default_msp0_mux { | ||
497 | ste,function = "msp0"; | ||
498 | ste,pins = "msp0txrx_a_1", "msp0tfstck_a_1"; | ||
499 | }; | ||
500 | default_msp0_cfg { | ||
501 | ste,pins = | ||
502 | "GPIO12_AC4", /* TXD */ | ||
503 | "GPIO15_AC3", /* RXD */ | ||
504 | "GPIO13_AF3", /* TFS */ | ||
505 | "GPIO14_AE3"; /* TCK */ | ||
506 | ste,config = <&in_nopull>; | ||
507 | }; | ||
508 | }; | ||
509 | }; | ||
510 | |||
511 | msp1 { | ||
512 | msp1_default_mode: msp1_default { | ||
513 | default_mux { | ||
514 | ste,function = "msp1"; | ||
515 | ste,pins = "msp1txrx_a_1", "msp1_a_1"; | ||
516 | }; | ||
517 | default_cfg1 { | ||
518 | ste,pins = "GPIO33_AF2"; | ||
519 | ste,config = <&out_lo>; | ||
520 | }; | ||
521 | default_cfg2 { | ||
522 | ste,pins = | ||
523 | "GPIO34_AE1", | ||
524 | "GPIO35_AE2", | ||
525 | "GPIO36_AG2"; | ||
526 | ste,config = <&in_nopull>; | ||
527 | }; | ||
528 | |||
529 | }; | ||
530 | }; | ||
531 | |||
532 | msp2 { | ||
533 | msp2_default_mode: msp2_default { | ||
534 | /* MSP2 usually used for HDMI audio */ | ||
535 | default_mux { | ||
536 | ste,function = "msp2"; | ||
537 | ste,pins = "msp2_a_1"; | ||
538 | }; | ||
539 | default_cfg1 { | ||
540 | ste,pins = | ||
541 | "GPIO193_AH27", /* TXD */ | ||
542 | "GPIO194_AF27", /* TCK */ | ||
543 | "GPIO195_AG28"; /* TFS */ | ||
544 | ste,config = <&in_pd>; | ||
545 | }; | ||
546 | default_cfg2 { | ||
547 | ste,pins = "GPIO196_AG26"; /* RXD */ | ||
548 | ste,config = <&out_lo>; | ||
549 | }; | ||
550 | }; | ||
551 | }; | ||
552 | |||
553 | |||
554 | musb { | ||
555 | musb_default_mode: musb_default { | ||
556 | default_mux { | ||
557 | ste,function = "usb"; | ||
558 | ste,pins = "usb_a_1"; | ||
559 | }; | ||
560 | default_cfg1 { | ||
561 | ste,pins = | ||
562 | "GPIO256_AF28", /* NXT */ | ||
563 | "GPIO258_AD29", /* XCLK */ | ||
564 | "GPIO259_AC29", /* DIR */ | ||
565 | "GPIO260_AD28", /* DAT7 */ | ||
566 | "GPIO261_AD26", /* DAT6 */ | ||
567 | "GPIO262_AE26", /* DAT5 */ | ||
568 | "GPIO263_AG29", /* DAT4 */ | ||
569 | "GPIO264_AE27", /* DAT3 */ | ||
570 | "GPIO265_AD27", /* DAT2 */ | ||
571 | "GPIO266_AC28", /* DAT1 */ | ||
572 | "GPIO267_AC27"; /* DAT0 */ | ||
573 | ste,config = <&in_nopull>; | ||
574 | }; | ||
575 | default_cfg2 { | ||
576 | ste,pins = "GPIO257_AE29"; /* STP */ | ||
577 | ste,config = <&out_hi>; | ||
578 | }; | ||
579 | }; | ||
580 | |||
581 | musb_sleep_mode: musb_sleep { | ||
582 | sleep_cfg1 { | ||
583 | ste,pins = | ||
584 | "GPIO256_AF28", /* NXT */ | ||
585 | "GPIO258_AD29", /* XCLK */ | ||
586 | "GPIO259_AC29"; /* DIR */ | ||
587 | ste,config = <&slpm_wkup_pdis_en>; | ||
588 | }; | ||
589 | sleep_cfg2 { | ||
590 | ste,pins = "GPIO257_AE29"; /* STP */ | ||
591 | ste,config = <&slpm_out_hi_wkup_pdis>; | ||
592 | }; | ||
593 | sleep_cfg3 { | ||
594 | ste,pins = | ||
595 | "GPIO260_AD28", /* DAT7 */ | ||
596 | "GPIO261_AD26", /* DAT6 */ | ||
597 | "GPIO262_AE26", /* DAT5 */ | ||
598 | "GPIO263_AG29", /* DAT4 */ | ||
599 | "GPIO264_AE27", /* DAT3 */ | ||
600 | "GPIO265_AD27", /* DAT2 */ | ||
601 | "GPIO266_AC28", /* DAT1 */ | ||
602 | "GPIO267_AC27"; /* DAT0 */ | ||
603 | ste,config = <&slpm_in_wkup_pdis_en>; | ||
604 | }; | ||
605 | }; | ||
606 | }; | ||
607 | |||
608 | mcde { | ||
609 | lcd_default_mode: lcd_default { | ||
610 | default_mux { | ||
611 | /* Mux in VSI0 and all the data lines */ | ||
612 | ste,function = "lcd"; | ||
613 | ste,pins = | ||
614 | "lcdvsi0_a_1", /* VSI0 for LCD */ | ||
615 | "lcd_d0_d7_a_1", /* Data lines */ | ||
616 | "lcd_d8_d11_a_1", /* TV-out */ | ||
617 | "lcdaclk_b_1", /* Clock line for TV-out */ | ||
618 | "lcdvsi1_a_1"; /* VSI1 for HDMI */ | ||
619 | }; | ||
620 | default_cfg1 { | ||
621 | ste,pins = | ||
622 | "GPIO68_E1", /* VSI0 */ | ||
623 | "GPIO69_E2"; /* VSI1 */ | ||
624 | ste,config = <&in_pu>; | ||
625 | }; | ||
626 | }; | ||
627 | lcd_sleep_mode: lcd_sleep { | ||
628 | sleep_cfg1 { | ||
629 | ste,pins = "GPIO69_E2"; /* VSI1 */ | ||
630 | ste,config = <&slpm_in_wkup_pdis>; | ||
631 | }; | ||
632 | }; | ||
633 | }; | ||
634 | |||
635 | ske { | ||
636 | /* SKE keys on position 2 in an 8x8 matrix */ | ||
637 | ske_kpa2_default_mode: ske_kpa2_default { | ||
638 | default_mux { | ||
639 | ste,function = "kp"; | ||
640 | ste,pins = "kp_a_2"; | ||
641 | }; | ||
642 | default_cfg1 { | ||
643 | ste,pins = | ||
644 | "GPIO153_B17", /* I7 */ | ||
645 | "GPIO154_C16", /* I6 */ | ||
646 | "GPIO155_C19", /* I5 */ | ||
647 | "GPIO156_C17", /* I4 */ | ||
648 | "GPIO161_D21", /* I3 */ | ||
649 | "GPIO162_D20", /* I2 */ | ||
650 | "GPIO163_C20", /* I1 */ | ||
651 | "GPIO164_B21"; /* I0 */ | ||
652 | ste,config = <&in_pd>; | ||
653 | }; | ||
654 | default_cfg2 { | ||
655 | ste,pins = | ||
656 | "GPIO157_A18", /* O7 */ | ||
657 | "GPIO158_C18", /* O6 */ | ||
658 | "GPIO159_B19", /* O5 */ | ||
659 | "GPIO160_B20", /* O4 */ | ||
660 | "GPIO165_C21", /* O3 */ | ||
661 | "GPIO166_A22", /* O2 */ | ||
662 | "GPIO167_B24", /* O1 */ | ||
663 | "GPIO168_C22"; /* O0 */ | ||
664 | ste,config = <&out_lo>; | ||
665 | }; | ||
666 | }; | ||
667 | ske_kpa2_sleep_mode: ske_kpa2_sleep { | ||
668 | sleep_cfg1 { | ||
669 | ste,pins = | ||
670 | "GPIO153_B17", /* I7 */ | ||
671 | "GPIO154_C16", /* I6 */ | ||
672 | "GPIO155_C19", /* I5 */ | ||
673 | "GPIO156_C17", /* I4 */ | ||
674 | "GPIO161_D21", /* I3 */ | ||
675 | "GPIO162_D20", /* I2 */ | ||
676 | "GPIO163_C20", /* I1 */ | ||
677 | "GPIO164_B21"; /* I0 */ | ||
678 | ste,config = <&slpm_in_pu_wkup_pdis_en>; | ||
679 | }; | ||
680 | sleep_cfg2 { | ||
681 | ste,pins = | ||
682 | "GPIO157_A18", /* O7 */ | ||
683 | "GPIO158_C18", /* O6 */ | ||
684 | "GPIO159_B19", /* O5 */ | ||
685 | "GPIO160_B20", /* O4 */ | ||
686 | "GPIO165_C21", /* O3 */ | ||
687 | "GPIO166_A22", /* O2 */ | ||
688 | "GPIO167_B24", /* O1 */ | ||
689 | "GPIO168_C22"; /* O0 */ | ||
690 | ste,config = <&slpm_out_lo_pdis>; | ||
691 | }; | ||
692 | }; | ||
693 | /* | ||
694 | * SKE keys on position 1 and "other C1" combi giving | ||
695 | * six rows of six keys. | ||
696 | */ | ||
697 | ske_kpaoc1_default_mode: ske_kpaoc1_default { | ||
698 | default_mux { | ||
699 | ste,function = "kp"; | ||
700 | ste,pins = "kp_a_1", "kp_oc1_1"; | ||
701 | }; | ||
702 | default_cfg1 { | ||
703 | ste,pins = | ||
704 | "GPIO91_B6", /* KP_O0 */ | ||
705 | "GPIO90_A3", /* KP_O1 */ | ||
706 | "GPIO87_B3", /* KP_O2 */ | ||
707 | "GPIO86_C6", /* KP_O3 */ | ||
708 | "GPIO96_D8", /* KP_O6 */ | ||
709 | "GPIO94_D7"; /* KP_O7 */ | ||
710 | ste,config = <&out_lo>; | ||
711 | }; | ||
712 | default_cfg2 { | ||
713 | ste,pins = | ||
714 | "GPIO93_B7", /* KP_I0 */ | ||
715 | "GPIO92_D6", /* KP_I1 */ | ||
716 | "GPIO89_E6", /* KP_I2 */ | ||
717 | "GPIO88_C4", /* KP_I3 */ | ||
718 | "GPIO97_D9", /* KP_I6 */ | ||
719 | "GPIO95_E8"; /* KP_I7 */ | ||
720 | ste,config = <&in_pu>; | ||
721 | }; | ||
722 | }; | ||
723 | }; | ||
724 | |||
725 | wlan { | ||
726 | wlan_default_mode: wlan_default { | ||
727 | /* | ||
728 | * Activate this mode with the WLAN chip. | ||
729 | * These are plain GPIO pins used by WLAN | ||
730 | */ | ||
731 | default_cfg1 { | ||
732 | ste,pins = | ||
733 | "GPIO226_AF8", /* WLAN_PMU_EN */ | ||
734 | "GPIO85_D5"; /* WLAN_ENA */ | ||
735 | ste,config = <&gpio_out_lo>; | ||
736 | }; | ||
737 | default_cfg2 { | ||
738 | ste,pins = "GPIO4_AH6"; /* WLAN_IRQ on UART1 */ | ||
739 | ste,config = <&gpio_in_pu>; | ||
740 | }; | ||
741 | }; | ||
742 | }; | ||
743 | }; | ||
744 | }; | ||
745 | }; | ||
diff --git a/arch/arm/boot/dts/ste-href-stuib.dtsi b/arch/arm/boot/dts/ste-href-stuib.dtsi index 76704ec0ffcc..1c3574435ea8 100644 --- a/arch/arm/boot/dts/ste-href-stuib.dtsi +++ b/arch/arm/boot/dts/ste-href-stuib.dtsi | |||
@@ -12,6 +12,28 @@ | |||
12 | #include <dt-bindings/interrupt-controller/irq.h> | 12 | #include <dt-bindings/interrupt-controller/irq.h> |
13 | 13 | ||
14 | / { | 14 | / { |
15 | gpio_keys { | ||
16 | compatible = "gpio-keys"; | ||
17 | #address-cells = <1>; | ||
18 | #size-cells = <0>; | ||
19 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
20 | pinctrl-names = "default"; | ||
21 | pinctrl-0 = <&prox_stuib_mode>, <&hall_stuib_mode>; | ||
22 | |||
23 | button@139 { | ||
24 | /* Proximity sensor */ | ||
25 | gpios = <&gpio6 25 0x4>; | ||
26 | linux,code = <11>; /* SW_FRONT_PROXIMITY */ | ||
27 | label = "SFH7741 Proximity Sensor"; | ||
28 | }; | ||
29 | button@145 { | ||
30 | /* Hall sensor */ | ||
31 | gpios = <&gpio4 17 0x4>; | ||
32 | linux,code = <0>; /* SW_LID */ | ||
33 | label = "HED54XXU11 Hall Effect Sensor"; | ||
34 | }; | ||
35 | }; | ||
36 | |||
15 | soc { | 37 | soc { |
16 | i2c@80004000 { | 38 | i2c@80004000 { |
17 | stmpe1601: stmpe1601@40 { | 39 | stmpe1601: stmpe1601@40 { |
@@ -74,5 +96,24 @@ | |||
74 | rohm,flip-y; | 96 | rohm,flip-y; |
75 | }; | 97 | }; |
76 | }; | 98 | }; |
99 | |||
100 | pinctrl { | ||
101 | prox { | ||
102 | prox_stuib_mode: prox_stuib { | ||
103 | stuib_cfg { | ||
104 | ste,pins = "GPIO217_AH12"; | ||
105 | ste,config = <&gpio_in_pu>; | ||
106 | }; | ||
107 | }; | ||
108 | }; | ||
109 | hall { | ||
110 | hall_stuib_mode: stuib_tvk { | ||
111 | stuib_cfg { | ||
112 | ste,pins = "GPIO145_C13"; | ||
113 | ste,config = <&gpio_in_pu>; | ||
114 | }; | ||
115 | }; | ||
116 | }; | ||
117 | }; | ||
77 | }; | 118 | }; |
78 | }; | 119 | }; |
diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi index 76d3ef13175f..c40565320978 100644 --- a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi +++ b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi | |||
@@ -14,27 +14,105 @@ | |||
14 | #include <dt-bindings/interrupt-controller/irq.h> | 14 | #include <dt-bindings/interrupt-controller/irq.h> |
15 | 15 | ||
16 | / { | 16 | / { |
17 | gpio_keys { | ||
18 | compatible = "gpio-keys"; | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | vdd-supply = <&ab8500_ldo_aux1_reg>; | ||
22 | pinctrl-names = "default"; | ||
23 | pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>; | ||
24 | |||
25 | button@139 { | ||
26 | /* Proximity sensor */ | ||
27 | gpios = <&gpio6 25 0x4>; | ||
28 | linux,code = <11>; /* SW_FRONT_PROXIMITY */ | ||
29 | label = "SFH7741 Proximity Sensor"; | ||
30 | }; | ||
31 | button@145 { | ||
32 | /* Hall sensor */ | ||
33 | gpios = <&gpio4 17 0x4>; | ||
34 | linux,code = <0>; /* SW_LID */ | ||
35 | label = "HED54XXU11 Hall Effect Sensor"; | ||
36 | }; | ||
37 | }; | ||
38 | |||
17 | soc { | 39 | soc { |
18 | /* Add Synaptics touch screen, TC35892 keypad etc here */ | 40 | /* Add Synaptics touch screen, TC35893 keypad etc here */ |
19 | i2c@80004000 { | 41 | i2c@80004000 { |
20 | tc3589x@44 { | 42 | tc35893@44 { |
21 | compatible = "tc3589x"; | 43 | compatible = "toshiba,tc35893"; |
22 | reg = <0x44>; | 44 | reg = <0x44>; |
23 | interrupt-parent = <&gpio6>; | 45 | interrupt-parent = <&gpio6>; |
24 | interrupts = <26 IRQ_TYPE_EDGE_RISING>; | 46 | interrupts = <26 IRQ_TYPE_EDGE_RISING>; |
47 | pinctrl-names = "default"; | ||
48 | pinctrl-0 = <&tc35893_tvk_mode>; | ||
25 | 49 | ||
26 | interrupt-controller; | 50 | interrupt-controller; |
27 | #interrupt-cells = <2>; | 51 | #interrupt-cells = <1>; |
28 | 52 | ||
29 | tc3589x_gpio { | 53 | tc3589x_gpio { |
30 | compatible = "tc3589x-gpio"; | 54 | compatible = "toshiba,tc3589x-gpio"; |
31 | interrupts = <0 IRQ_TYPE_EDGE_RISING>; | 55 | interrupts = <0>; |
32 | 56 | ||
33 | interrupt-controller; | 57 | interrupt-controller; |
34 | #interrupt-cells = <2>; | 58 | #interrupt-cells = <2>; |
35 | gpio-controller; | 59 | gpio-controller; |
36 | #gpio-cells = <2>; | 60 | #gpio-cells = <2>; |
37 | }; | 61 | }; |
62 | tc3589x_keypad { | ||
63 | compatible = "toshiba,tc3589x-keypad"; | ||
64 | interrupts = <6>; | ||
65 | debounce-delay-ms = <4>; | ||
66 | keypad,num-columns = <8>; | ||
67 | keypad,num-rows = <8>; | ||
68 | linux,no-autorepeat; | ||
69 | linux,wakeup; | ||
70 | linux,keymap = <0x0301006b | ||
71 | 0x04010066 | ||
72 | 0x06040072 | ||
73 | 0x040200d7 | ||
74 | 0x0303006a | ||
75 | 0x0205000e | ||
76 | 0x0607008b | ||
77 | 0x0500001c | ||
78 | 0x0403000b | ||
79 | 0x03040034 | ||
80 | 0x05020067 | ||
81 | 0x0305006c | ||
82 | 0x040500e7 | ||
83 | 0x0005009e | ||
84 | 0x06020073 | ||
85 | 0x01030039 | ||
86 | 0x07060069 | ||
87 | 0x050500d9>; | ||
88 | }; | ||
89 | }; | ||
90 | }; | ||
91 | pinctrl { | ||
92 | /* Pull up this GPIO pin */ | ||
93 | tc35893 { | ||
94 | tc35893_tvk_mode: tc35893_tvk { | ||
95 | tvk_cfg { | ||
96 | ste,pins = "GPIO218_AH11"; | ||
97 | ste,config = <&gpio_in_pu>; | ||
98 | }; | ||
99 | }; | ||
100 | }; | ||
101 | prox { | ||
102 | prox_tvk_mode: prox_tvk { | ||
103 | tvk_cfg { | ||
104 | ste,pins = "GPIO217_AH12"; | ||
105 | ste,config = <&gpio_in_pu>; | ||
106 | }; | ||
107 | }; | ||
108 | }; | ||
109 | hall { | ||
110 | hall_tvk_mode: hall_tvk { | ||
111 | tvk_cfg { | ||
112 | ste,pins = "GPIO145_C13"; | ||
113 | ste,config = <&gpio_in_pu>; | ||
114 | }; | ||
115 | }; | ||
38 | }; | 116 | }; |
39 | }; | 117 | }; |
40 | }; | 118 | }; |
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi index aa3f02060fdd..e28242173d18 100644 --- a/arch/arm/boot/dts/ste-href.dtsi +++ b/arch/arm/boot/dts/ste-href.dtsi | |||
@@ -11,37 +11,57 @@ | |||
11 | 11 | ||
12 | #include <dt-bindings/interrupt-controller/irq.h> | 12 | #include <dt-bindings/interrupt-controller/irq.h> |
13 | #include "ste-dbx5x0.dtsi" | 13 | #include "ste-dbx5x0.dtsi" |
14 | #include "ste-href-family-pinctrl.dtsi" | ||
14 | 15 | ||
15 | / { | 16 | / { |
16 | memory { | 17 | memory { |
17 | reg = <0x00000000 0x20000000>; | 18 | reg = <0x00000000 0x20000000>; |
18 | }; | 19 | }; |
19 | 20 | ||
20 | gpio_keys { | 21 | soc { |
21 | compatible = "gpio-keys"; | 22 | usb_per5@a03e0000 { |
22 | #address-cells = <1>; | 23 | pinctrl-names = "default", "sleep"; |
23 | #size-cells = <0>; | 24 | pinctrl-0 = <&musb_default_mode>; |
24 | 25 | pinctrl-1 = <&musb_sleep_mode>; | |
25 | button@1 { | ||
26 | linux,code = <11>; | ||
27 | label = "SFH7741 Proximity Sensor"; | ||
28 | }; | 26 | }; |
29 | }; | ||
30 | 27 | ||
31 | soc { | ||
32 | uart@80120000 { | 28 | uart@80120000 { |
29 | pinctrl-names = "default", "sleep"; | ||
30 | pinctrl-0 = <&uart0_default_mode>; | ||
31 | pinctrl-1 = <&uart0_sleep_mode>; | ||
33 | status = "okay"; | 32 | status = "okay"; |
34 | }; | 33 | }; |
35 | 34 | ||
36 | uart@80121000 { | 35 | uart@80121000 { |
36 | pinctrl-names = "default", "sleep"; | ||
37 | pinctrl-0 = <&uart1_default_mode>; | ||
38 | pinctrl-1 = <&uart1_sleep_mode>; | ||
37 | status = "okay"; | 39 | status = "okay"; |
38 | }; | 40 | }; |
39 | 41 | ||
40 | uart@80007000 { | 42 | uart@80007000 { |
43 | pinctrl-names = "default", "sleep"; | ||
44 | pinctrl-0 = <&uart2_default_mode>; | ||
45 | pinctrl-1 = <&uart2_sleep_mode>; | ||
41 | status = "okay"; | 46 | status = "okay"; |
42 | }; | 47 | }; |
43 | 48 | ||
49 | i2c@80004000 { | ||
50 | pinctrl-names = "default","sleep"; | ||
51 | pinctrl-0 = <&i2c0_default_mode>; | ||
52 | pinctrl-1 = <&i2c0_sleep_mode>; | ||
53 | }; | ||
54 | |||
55 | i2c@80122000 { | ||
56 | pinctrl-names = "default","sleep"; | ||
57 | pinctrl-0 = <&i2c1_default_mode>; | ||
58 | pinctrl-1 = <&i2c1_sleep_mode>; | ||
59 | }; | ||
60 | |||
44 | i2c@80128000 { | 61 | i2c@80128000 { |
62 | pinctrl-names = "default","sleep"; | ||
63 | pinctrl-0 = <&i2c2_default_mode>; | ||
64 | pinctrl-1 = <&i2c2_sleep_mode>; | ||
45 | lp5521@33 { | 65 | lp5521@33 { |
46 | compatible = "national,lp5521"; | 66 | compatible = "national,lp5521"; |
47 | reg = <0x33>; | 67 | reg = <0x33>; |
@@ -85,6 +105,12 @@ | |||
85 | }; | 105 | }; |
86 | }; | 106 | }; |
87 | 107 | ||
108 | i2c@80110000 { | ||
109 | pinctrl-names = "default","sleep"; | ||
110 | pinctrl-0 = <&i2c3_default_mode>; | ||
111 | pinctrl-1 = <&i2c3_sleep_mode>; | ||
112 | }; | ||
113 | |||
88 | // External Micro SD slot | 114 | // External Micro SD slot |
89 | sdi0_per1@80126000 { | 115 | sdi0_per1@80126000 { |
90 | arm,primecell-periphid = <0x10480180>; | 116 | arm,primecell-periphid = <0x10480180>; |
@@ -94,6 +120,9 @@ | |||
94 | mmc-cap-mmc-highspeed; | 120 | mmc-cap-mmc-highspeed; |
95 | vmmc-supply = <&ab8500_ldo_aux3_reg>; | 121 | vmmc-supply = <&ab8500_ldo_aux3_reg>; |
96 | vqmmc-supply = <&vmmci>; | 122 | vqmmc-supply = <&vmmci>; |
123 | pinctrl-names = "default", "sleep"; | ||
124 | pinctrl-0 = <&sdi0_default_mode>; | ||
125 | pinctrl-1 = <&sdi0_sleep_mode>; | ||
97 | 126 | ||
98 | cd-gpios = <&tc3589x_gpio 3 0x4>; | 127 | cd-gpios = <&tc3589x_gpio 3 0x4>; |
99 | 128 | ||
@@ -105,6 +134,9 @@ | |||
105 | arm,primecell-periphid = <0x10480180>; | 134 | arm,primecell-periphid = <0x10480180>; |
106 | max-frequency = <100000000>; | 135 | max-frequency = <100000000>; |
107 | bus-width = <4>; | 136 | bus-width = <4>; |
137 | pinctrl-names = "default", "sleep"; | ||
138 | pinctrl-0 = <&sdi1_default_mode>; | ||
139 | pinctrl-1 = <&sdi1_sleep_mode>; | ||
108 | 140 | ||
109 | status = "okay"; | 141 | status = "okay"; |
110 | }; | 142 | }; |
@@ -115,6 +147,9 @@ | |||
115 | max-frequency = <100000000>; | 147 | max-frequency = <100000000>; |
116 | bus-width = <8>; | 148 | bus-width = <8>; |
117 | mmc-cap-mmc-highspeed; | 149 | mmc-cap-mmc-highspeed; |
150 | pinctrl-names = "default", "sleep"; | ||
151 | pinctrl-0 = <&sdi2_default_mode>; | ||
152 | pinctrl-1 = <&sdi2_sleep_mode>; | ||
118 | 153 | ||
119 | status = "okay"; | 154 | status = "okay"; |
120 | }; | 155 | }; |
@@ -126,6 +161,9 @@ | |||
126 | bus-width = <8>; | 161 | bus-width = <8>; |
127 | mmc-cap-mmc-highspeed; | 162 | mmc-cap-mmc-highspeed; |
128 | vmmc-supply = <&ab8500_ldo_aux2_reg>; | 163 | vmmc-supply = <&ab8500_ldo_aux2_reg>; |
164 | pinctrl-names = "default", "sleep"; | ||
165 | pinctrl-0 = <&sdi4_default_mode>; | ||
166 | pinctrl-1 = <&sdi4_sleep_mode>; | ||
129 | 167 | ||
130 | status = "okay"; | 168 | status = "okay"; |
131 | }; | 169 | }; |
@@ -137,7 +175,21 @@ | |||
137 | stericsson,audio-codec = <&codec>; | 175 | stericsson,audio-codec = <&codec>; |
138 | }; | 176 | }; |
139 | 177 | ||
178 | msp0: msp@80123000 { | ||
179 | pinctrl-names = "default"; | ||
180 | pinctrl-0 = <&msp0_default_mode>; | ||
181 | status = "okay"; | ||
182 | }; | ||
183 | |||
140 | msp1: msp@80124000 { | 184 | msp1: msp@80124000 { |
185 | pinctrl-names = "default"; | ||
186 | pinctrl-0 = <&msp1_default_mode>; | ||
187 | status = "okay"; | ||
188 | }; | ||
189 | |||
190 | msp2: msp@80117000 { | ||
191 | pinctrl-names = "default"; | ||
192 | pinctrl-0 = <&msp2_default_mode>; | ||
141 | status = "okay"; | 193 | status = "okay"; |
142 | }; | 194 | }; |
143 | 195 | ||
@@ -198,5 +250,11 @@ | |||
198 | }; | 250 | }; |
199 | }; | 251 | }; |
200 | }; | 252 | }; |
253 | |||
254 | mcde@a0350000 { | ||
255 | pinctrl-names = "default", "sleep"; | ||
256 | pinctrl-0 = <&lcd_default_mode>; | ||
257 | pinctrl-1 = <&lcd_sleep_mode>; | ||
258 | }; | ||
201 | }; | 259 | }; |
202 | }; | 260 | }; |
diff --git a/arch/arm/boot/dts/ste-hrefprev60.dtsi b/arch/arm/boot/dts/ste-hrefprev60.dtsi index b2cd7bc2752f..b0f5def8e2a8 100644 --- a/arch/arm/boot/dts/ste-hrefprev60.dtsi +++ b/arch/arm/boot/dts/ste-hrefprev60.dtsi | |||
@@ -28,18 +28,20 @@ | |||
28 | reg = <0x33>; | 28 | reg = <0x33>; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | tc3589x@42 { | 31 | tc35892@42 { |
32 | compatible = "tc3589x"; | 32 | compatible = "toshiba,tc35892"; |
33 | reg = <0x42>; | 33 | reg = <0x42>; |
34 | interrupt-parent = <&gpio6>; | 34 | interrupt-parent = <&gpio6>; |
35 | interrupts = <25 IRQ_TYPE_EDGE_RISING>; | 35 | interrupts = <25 IRQ_TYPE_EDGE_RISING>; |
36 | pinctrl-names = "default"; | ||
37 | pinctrl-0 = <&tc35892_hrefprev60_mode>; | ||
36 | 38 | ||
37 | interrupt-controller; | 39 | interrupt-controller; |
38 | #interrupt-cells = <2>; | 40 | #interrupt-cells = <1>; |
39 | 41 | ||
40 | tc3589x_gpio: tc3589x_gpio { | 42 | tc3589x_gpio: tc3589x_gpio { |
41 | compatible = "tc3589x-gpio"; | 43 | compatible = "tc3589x-gpio"; |
42 | interrupts = <0 IRQ_TYPE_EDGE_RISING>; | 44 | interrupts = <0>; |
43 | 45 | ||
44 | interrupt-controller; | 46 | interrupt-controller; |
45 | #interrupt-cells = <2>; | 47 | #interrupt-cells = <2>; |
@@ -49,11 +51,74 @@ | |||
49 | }; | 51 | }; |
50 | }; | 52 | }; |
51 | 53 | ||
54 | ssp@80002000 { | ||
55 | /* | ||
56 | * On the first generation boards, this SSP/SPI port was connected | ||
57 | * to the AB8500. | ||
58 | */ | ||
59 | pinctrl-names = "default"; | ||
60 | pinctrl-0 = <&ssp0_hrefprev60_mode>; | ||
61 | }; | ||
62 | |||
52 | vmmci: regulator-gpio { | 63 | vmmci: regulator-gpio { |
53 | gpios = <&tc3589x_gpio 18 0x4>; | 64 | gpios = <&tc3589x_gpio 18 0x4>; |
54 | enable-gpio = <&tc3589x_gpio 17 0x4>; | 65 | enable-gpio = <&tc3589x_gpio 17 0x4>; |
55 | 66 | ||
56 | status = "okay"; | 67 | status = "okay"; |
57 | }; | 68 | }; |
69 | |||
70 | pinctrl { | ||
71 | /* Set this up using hogs */ | ||
72 | pinctrl-names = "default"; | ||
73 | pinctrl-0 = <&ipgpio_hrefprev60_mode>; | ||
74 | |||
75 | ssp0 { | ||
76 | ssp0_hrefprev60_mode: ssp0_hrefprev60_default { | ||
77 | hrefprev60_mux { | ||
78 | ste,function = "ssp0"; | ||
79 | ste,pins = "ssp0_a_1"; | ||
80 | }; | ||
81 | hrefprev60_cfg1 { | ||
82 | ste,pins = "GPIO145_C13"; /* RXD */ | ||
83 | ste,config = <&in_pd>; | ||
84 | }; | ||
85 | |||
86 | }; | ||
87 | }; | ||
88 | sdi0 { | ||
89 | /* This additional pin needed on early MOP500 and HREFs previous to v60 */ | ||
90 | sdi0_default_mode: sdi0_default { | ||
91 | hrefprev60_mux { | ||
92 | ste,function = "mc0"; | ||
93 | ste,pins = "mc0dat31dir_a_1"; | ||
94 | }; | ||
95 | hrefprev60_cfg1 { | ||
96 | ste,pins = "GPIO21_AB3"; /* DAT31DIR */ | ||
97 | ste,config = <&out_hi>; | ||
98 | }; | ||
99 | |||
100 | }; | ||
101 | }; | ||
102 | tc35892 { | ||
103 | tc35892_hrefprev60_mode: tc35892_hrefprev60 { | ||
104 | hrefprev60_cfg { | ||
105 | ste,pins = "GPIO217_AH12"; | ||
106 | ste,config = <&gpio_in_pu>; | ||
107 | }; | ||
108 | }; | ||
109 | }; | ||
110 | ipgpio { | ||
111 | ipgpio_hrefprev60_mode: ipgpio_hrefprev60 { | ||
112 | hrefprev60_mux { | ||
113 | ste,function = "ipgpio"; | ||
114 | ste,pins = "ipgpio0_c_1", "ipgpio1_c_1"; | ||
115 | }; | ||
116 | hrefprev60_cfg1 { | ||
117 | ste,pins = "GPIO6_AF6", "GPIO7_AG5"; | ||
118 | ste,config = <&in_pu>; | ||
119 | }; | ||
120 | }; | ||
121 | }; | ||
122 | }; | ||
58 | }; | 123 | }; |
59 | }; | 124 | }; |
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi index aed511b47a9e..941bf9ad6f01 100644 --- a/arch/arm/boot/dts/ste-hrefv60plus.dtsi +++ b/arch/arm/boot/dts/ste-hrefv60plus.dtsi | |||
@@ -16,12 +16,6 @@ | |||
16 | model = "ST-Ericsson HREF (v60+) platform with Device Tree"; | 16 | model = "ST-Ericsson HREF (v60+) platform with Device Tree"; |
17 | compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500"; | 17 | compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500"; |
18 | 18 | ||
19 | gpio_keys { | ||
20 | button@1 { | ||
21 | gpios = <&gpio5 25 0x4>; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | soc { | 19 | soc { |
26 | // External Micro SD slot | 20 | // External Micro SD slot |
27 | sdi0_per1@80126000 { | 21 | sdi0_per1@80126000 { |
@@ -66,5 +60,216 @@ | |||
66 | 60 | ||
67 | status = "okay"; | 61 | status = "okay"; |
68 | }; | 62 | }; |
63 | |||
64 | pinctrl { | ||
65 | /* | ||
66 | * Set this up using hogs, as time goes by and as seems fit, these | ||
67 | * can be moved over to being controlled by respective device. | ||
68 | */ | ||
69 | pinctrl-names = "default"; | ||
70 | pinctrl-0 = <&ipgpio_hrefv60_mode>, | ||
71 | <&accel_hrefv60_mode>, | ||
72 | <&magneto_hrefv60_mode>, | ||
73 | <&etm_hrefv60_mode>, | ||
74 | <&nahj_hrefv60_mode>, | ||
75 | <&nfc_hrefv60_mode>, | ||
76 | <&force_hrefv60_mode>, | ||
77 | <&dipro_hrefv60_mode>, | ||
78 | <&vaudio_hf_hrefv60_mode>, | ||
79 | <&gbf_hrefv60_mode>, | ||
80 | <&hdtv_hrefv60_mode>, | ||
81 | <&touch_hrefv60_mode>; | ||
82 | |||
83 | sdi0 { | ||
84 | /* SD card detect GPIO pin, extend default state */ | ||
85 | sdi0_default_mode: sdi0_default { | ||
86 | default_hrefv60_cfg1 { | ||
87 | ste,pins = "GPIO95_E8"; | ||
88 | ste,config = <&gpio_in_pu>; | ||
89 | }; | ||
90 | }; | ||
91 | }; | ||
92 | ipgpio { | ||
93 | /* | ||
94 | * XENON Flashgun on image processor GPIO (controlled from image | ||
95 | * processor firmware), mux in these image processor GPIO lines 0 | ||
96 | * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant | ||
97 | * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias | ||
98 | * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output. | ||
99 | */ | ||
100 | ipgpio_hrefv60_mode: ipgpio_hrefv60 { | ||
101 | hrefv60_mux { | ||
102 | ste,function = "ipgpio"; | ||
103 | ste,pins = "ipgpio0_c_1", "ipgpio1_c_1", "ipgpio4_c_1"; | ||
104 | }; | ||
105 | hrefv60_cfg1 { | ||
106 | ste,pins = "GPIO6_AF6", "GPIO7_AG5"; | ||
107 | ste,config = <&in_pu>; | ||
108 | }; | ||
109 | hrefv60_cfg2 { | ||
110 | ste,pins = "GPIO21_AB3"; | ||
111 | ste,config = <&gpio_out_lo>; | ||
112 | }; | ||
113 | hrefv60_cfg3 { | ||
114 | ste,pins = "GPIO64_F3"; | ||
115 | ste,config = <&out_lo>; | ||
116 | }; | ||
117 | }; | ||
118 | }; | ||
119 | accelerometer { | ||
120 | accel_hrefv60_mode: accel_hrefv60 { | ||
121 | /* Accelerometer interrupt lines 1 & 2 */ | ||
122 | hrefv60_cfg1 { | ||
123 | ste,pins = "GPIO82_C1", "GPIO83_D3"; | ||
124 | ste,config = <&gpio_in_pu>; | ||
125 | }; | ||
126 | }; | ||
127 | }; | ||
128 | magnetometer { | ||
129 | magneto_hrefv60_mode: magneto_hrefv60 { | ||
130 | /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ | ||
131 | hrefv60_cfg1 { | ||
132 | ste,pins = "GPIO31_V3"; | ||
133 | ste,config = <&gpio_in_pu>; | ||
134 | }; | ||
135 | hrefv60_cfg2 { | ||
136 | ste,pins = "GPIO32_V2"; | ||
137 | ste,config = <&gpio_in_pd>; | ||
138 | }; | ||
139 | }; | ||
140 | }; | ||
141 | etm { | ||
142 | /* | ||
143 | * Drive D19-D23 for the ETM PTM trace interface low, | ||
144 | * (presumably pins are unconnected therefore grounded here, | ||
145 | * the "other alt C1" setting enables these pins) | ||
146 | */ | ||
147 | etm_hrefv60_mode: etm_hrefv60 { | ||
148 | hrefv60_cfg1 { | ||
149 | ste,pins = | ||
150 | "GPIO70_G5", | ||
151 | "GPIO71_G4", | ||
152 | "GPIO72_H4", | ||
153 | "GPIO73_H3", | ||
154 | "GPIO74_J3"; | ||
155 | ste,config = <&gpio_out_lo>; | ||
156 | }; | ||
157 | }; | ||
158 | }; | ||
159 | nahj { | ||
160 | nahj_hrefv60_mode: nahj_hrefv60 { | ||
161 | /* NAHJ CTRL on GPIO76 to low, CTRL_INV on GPIO216 to high */ | ||
162 | hrefv60_cfg1 { | ||
163 | ste,pins = "GPIO76_J2"; | ||
164 | ste,config = <&gpio_out_lo>; | ||
165 | }; | ||
166 | hrefv60_cfg2 { | ||
167 | ste,pins = "GPIO216_AG12"; | ||
168 | ste,config = <&gpio_out_hi>; | ||
169 | }; | ||
170 | }; | ||
171 | }; | ||
172 | nfc { | ||
173 | nfc_hrefv60_mode: nfc_hrefv60 { | ||
174 | /* NFC ENA and RESET to low, pulldown IRQ line */ | ||
175 | hrefv60_cfg1 { | ||
176 | ste,pins = | ||
177 | "GPIO77_H1", /* NFC_ENA */ | ||
178 | "GPIO142_C11"; /* NFC_RESET */ | ||
179 | ste,config = <&gpio_out_lo>; | ||
180 | }; | ||
181 | hrefv60_cfg2 { | ||
182 | ste,pins = "GPIO144_B13"; /* NFC_IRQ */ | ||
183 | ste,config = <&gpio_in_pd>; | ||
184 | }; | ||
185 | }; | ||
186 | }; | ||
187 | force { | ||
188 | force_hrefv60_mode: force_hrefv60 { | ||
189 | hrefv60_cfg1 { | ||
190 | ste,pins = "GPIO91_B6"; /* FORCE_SENSING_INT */ | ||
191 | ste,config = <&gpio_in_pu>; | ||
192 | }; | ||
193 | hrefv60_cfg2 { | ||
194 | ste,pins = | ||
195 | "GPIO92_D6", /* FORCE_SENSING_RST */ | ||
196 | "GPIO97_D9"; /* FORCE_SENSING_WU */ | ||
197 | ste,config = <&gpio_out_lo>; | ||
198 | }; | ||
199 | }; | ||
200 | }; | ||
201 | dipro { | ||
202 | dipro_hrefv60_mode: dipro_hrefv60 { | ||
203 | hrefv60_cfg1 { | ||
204 | ste,pins = "GPIO139_C9"; /* DIPRO_INT */ | ||
205 | ste,config = <&gpio_in_pu>; | ||
206 | }; | ||
207 | }; | ||
208 | }; | ||
209 | vaudio_hf { | ||
210 | vaudio_hf_hrefv60_mode: vaudio_hf_hrefv60 { | ||
211 | /* Audio Amplifier HF enable GPIO */ | ||
212 | hrefv60_cfg1 { | ||
213 | ste,pins = "GPIO149_B14"; /* VAUDIO_HF_EN, enable MAX8968 */ | ||
214 | ste,config = <&gpio_out_hi>; | ||
215 | }; | ||
216 | }; | ||
217 | }; | ||
218 | gbf { | ||
219 | gbf_hrefv60_mode: gbf_hrefv60 { | ||
220 | /* | ||
221 | * GBF (GPS, Bluetooth, FM-radio) interface, | ||
222 | * pull low to reset state | ||
223 | */ | ||
224 | hrefv60_cfg1 { | ||
225 | ste,pins = "GPIO171_D23"; /* GBF_ENA_RESET */ | ||
226 | ste,config = <&gpio_out_lo>; | ||
227 | }; | ||
228 | }; | ||
229 | }; | ||
230 | hdtv { | ||
231 | hdtv_hrefv60_mode: hdtv_hrefv60 { | ||
232 | /* MSP : HDTV INTERFACE GPIO line */ | ||
233 | hrefv60_cfg1 { | ||
234 | ste,pins = "GPIO192_AJ27"; | ||
235 | ste,config = <&gpio_in_pd>; | ||
236 | }; | ||
237 | }; | ||
238 | }; | ||
239 | touch { | ||
240 | touch_hrefv60_mode: touch_hrefv60 { | ||
241 | /* | ||
242 | * Touch screen uses GPIO 143 for RST1, GPIO 146 for RST2 and | ||
243 | * GPIO 67 for interrupts. Pull-up the IRQ line and drive both | ||
244 | * reset signals low. | ||
245 | */ | ||
246 | hrefv60_cfg1 { | ||
247 | ste,pins = "GPIO143_D12", "GPIO146_D13"; | ||
248 | ste,config = <&gpio_out_lo>; | ||
249 | }; | ||
250 | hrefv60_cfg2 { | ||
251 | ste,pins = "GPIO67_G2"; | ||
252 | ste,config = <&gpio_in_pu>; | ||
253 | }; | ||
254 | }; | ||
255 | }; | ||
256 | mcde { | ||
257 | lcd_hrefv60_mode: lcd_hrefv60 { | ||
258 | /* | ||
259 | * Display Interface 1 uses GPIO 65 for RST (reset). | ||
260 | * Display Interface 2 uses GPIO 66 for RST (reset). | ||
261 | * Drive DISP1 reset high (not reset), driver DISP2 reset low (reset) | ||
262 | */ | ||
263 | hrefv60_cfg1 { | ||
264 | ste,pins ="GPIO65_F1"; | ||
265 | ste,config = <&gpio_out_hi>; | ||
266 | }; | ||
267 | hrefv60_cfg2 { | ||
268 | ste,pins ="GPIO66_G3"; | ||
269 | ste,config = <&gpio_out_lo>; | ||
270 | }; | ||
271 | }; | ||
272 | }; | ||
273 | }; | ||
69 | }; | 274 | }; |
70 | }; | 275 | }; |
diff --git a/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi b/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi index efddee9403c4..e6f22b266420 100644 --- a/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-pinctrl.dtsi | |||
@@ -31,17 +31,57 @@ | |||
31 | ste,output = <OUTPUT_LOW>; | 31 | ste,output = <OUTPUT_LOW>; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | gpio_in_pu: gpio_input_pull_up { | ||
35 | ste,gpio = <GPIOMODE_ENABLED>; | ||
36 | ste,input = <INPUT_PULLUP>; | ||
37 | }; | ||
38 | |||
39 | gpio_in_pd: gpio_input_pull_down { | ||
40 | ste,gpio = <GPIOMODE_ENABLED>; | ||
41 | ste,input = <INPUT_PULLDOWN>; | ||
42 | }; | ||
43 | |||
34 | gpio_out_lo: gpio_output_low { | 44 | gpio_out_lo: gpio_output_low { |
35 | ste,gpio = <GPIOMODE_ENABLED>; | 45 | ste,gpio = <GPIOMODE_ENABLED>; |
36 | ste,output = <OUTPUT_LOW>; | 46 | ste,output = <OUTPUT_LOW>; |
37 | }; | 47 | }; |
38 | 48 | ||
49 | gpio_out_hi: gpio_output_high { | ||
50 | ste,gpio = <GPIOMODE_ENABLED>; | ||
51 | ste,output = <OUTPUT_HIGH>; | ||
52 | }; | ||
53 | |||
54 | slpm_pdis: slpm_pdis { | ||
55 | ste,sleep = <SLPM_ENABLED>; | ||
56 | ste,sleep-wakeup = <SLPM_WAKEUP_DISABLE>; | ||
57 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | ||
58 | }; | ||
59 | |||
60 | slpm_wkup_pdis: slpm_wkup_pdis { | ||
61 | ste,sleep = <SLPM_ENABLED>; | ||
62 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
63 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | ||
64 | }; | ||
65 | |||
66 | slpm_wkup_pdis_en: slpm_wkup_pdis_en { | ||
67 | ste,sleep = <SLPM_ENABLED>; | ||
68 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
69 | ste,sleep-pull-disable = <SLPM_PDIS_ENABLED>; | ||
70 | }; | ||
71 | |||
39 | slpm_in_pu: slpm_in_pu { | 72 | slpm_in_pu: slpm_in_pu { |
40 | ste,sleep = <SLPM_ENABLED>; | 73 | ste,sleep = <SLPM_ENABLED>; |
41 | ste,sleep-input = <SLPM_INPUT_PULLUP>; | 74 | ste,sleep-input = <SLPM_INPUT_PULLUP>; |
42 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | 75 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; |
43 | }; | 76 | }; |
44 | 77 | ||
78 | slpm_in_pdis: slpm_in_pdis { | ||
79 | ste,sleep = <SLPM_ENABLED>; | ||
80 | ste,sleep-input = <SLPM_DIR_INPUT>; | ||
81 | ste,sleep-wakeup = <SLPM_WAKEUP_DISABLE>; | ||
82 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | ||
83 | }; | ||
84 | |||
45 | slpm_in_wkup_pdis: slpm_in_wkup_pdis { | 85 | slpm_in_wkup_pdis: slpm_in_wkup_pdis { |
46 | ste,sleep = <SLPM_ENABLED>; | 86 | ste,sleep = <SLPM_ENABLED>; |
47 | ste,sleep-input = <SLPM_DIR_INPUT>; | 87 | ste,sleep-input = <SLPM_DIR_INPUT>; |
@@ -49,6 +89,20 @@ | |||
49 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | 89 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; |
50 | }; | 90 | }; |
51 | 91 | ||
92 | slpm_in_wkup_pdis_en: slpm_in_wkup_pdis_en { | ||
93 | ste,sleep = <SLPM_ENABLED>; | ||
94 | ste,sleep-input = <SLPM_DIR_INPUT>; | ||
95 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
96 | ste,sleep-pull-disable = <SLPM_PDIS_ENABLED>; | ||
97 | }; | ||
98 | |||
99 | slpm_in_pu_wkup_pdis_en: slpm_in_wkup_pdis_en { | ||
100 | ste,sleep = <SLPM_ENABLED>; | ||
101 | ste,sleep-input = <SLPM_INPUT_PULLUP>; | ||
102 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
103 | ste,sleep-pull-disable = <SLPM_PDIS_ENABLED>; | ||
104 | }; | ||
105 | |||
52 | slpm_out_lo: slpm_out_lo { | 106 | slpm_out_lo: slpm_out_lo { |
53 | ste,sleep = <SLPM_ENABLED>; | 107 | ste,sleep = <SLPM_ENABLED>; |
54 | ste,sleep-output = <SLPM_OUTPUT_LOW>; | 108 | ste,sleep-output = <SLPM_OUTPUT_LOW>; |
@@ -68,6 +122,20 @@ | |||
68 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | 122 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; |
69 | }; | 123 | }; |
70 | 124 | ||
125 | slpm_out_lo_pdis: slpm_out_lo_pdis { | ||
126 | ste,sleep = <SLPM_ENABLED>; | ||
127 | ste,sleep-output = <SLPM_OUTPUT_LOW>; | ||
128 | ste,sleep-wakeup = <SLPM_WAKEUP_DISABLE>; | ||
129 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | ||
130 | }; | ||
131 | |||
132 | slpm_out_lo_wkup_pdis: slpm_out_lo_wkup_pdis { | ||
133 | ste,sleep = <SLPM_ENABLED>; | ||
134 | ste,sleep-output = <SLPM_OUTPUT_LOW>; | ||
135 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
136 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | ||
137 | }; | ||
138 | |||
71 | slpm_out_wkup_pdis: slpm_out_wkup_pdis { | 139 | slpm_out_wkup_pdis: slpm_out_wkup_pdis { |
72 | ste,sleep = <SLPM_ENABLED>; | 140 | ste,sleep = <SLPM_ENABLED>; |
73 | ste,sleep-output = <SLPM_DIR_OUTPUT>; | 141 | ste,sleep-output = <SLPM_DIR_OUTPUT>; |
@@ -81,6 +149,18 @@ | |||
81 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | 149 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; |
82 | }; | 150 | }; |
83 | 151 | ||
152 | in_wkup_pdis_en: in_wkup_pdis_en { | ||
153 | ste,sleep-input = <SLPM_DIR_INPUT>; | ||
154 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
155 | ste,sleep-pull-disable = <SLPM_PDIS_ENABLED>; | ||
156 | }; | ||
157 | |||
158 | out_lo_wkup_pdis: out_lo_wkup_pdis { | ||
159 | ste,sleep-output = <SLPM_OUTPUT_LOW>; | ||
160 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | ||
161 | ste,sleep-pull-disable = <SLPM_PDIS_DISABLED>; | ||
162 | }; | ||
163 | |||
84 | out_hi_wkup_pdis: out_hi_wkup_pdis { | 164 | out_hi_wkup_pdis: out_hi_wkup_pdis { |
85 | ste,sleep-output = <SLPM_OUTPUT_HIGH>; | 165 | ste,sleep-output = <SLPM_OUTPUT_HIGH>; |
86 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; | 166 | ste,sleep-wakeup = <SLPM_WAKEUP_ENABLE>; |
diff --git a/arch/arm/boot/dts/ste-nomadik-s8815.dts b/arch/arm/boot/dts/ste-nomadik-s8815.dts index 16c3888b7b15..f557feb997f4 100644 --- a/arch/arm/boot/dts/ste-nomadik-s8815.dts +++ b/arch/arm/boot/dts/ste-nomadik-s8815.dts | |||
@@ -67,10 +67,6 @@ | |||
67 | 67 | ||
68 | /* Custom board node with GPIO pins to active etc */ | 68 | /* Custom board node with GPIO pins to active etc */ |
69 | usb-s8815 { | 69 | usb-s8815 { |
70 | /* The S8815 is using this very GPIO pin for the SMSC91x IRQs */ | ||
71 | ethernet-gpio { | ||
72 | gpios = <&gpio3 8 0x1>; | ||
73 | }; | ||
74 | /* This will bias the MMC/SD card detect line */ | 70 | /* This will bias the MMC/SD card detect line */ |
75 | mmcsd-gpio { | 71 | mmcsd-gpio { |
76 | gpios = <&gpio3 16 0x1>; | 72 | gpios = <&gpio3 16 0x1>; |
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index 79425e3836ce..5acc0449676a 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | |||
@@ -769,14 +769,14 @@ | |||
769 | #size-cells = <1>; | 769 | #size-cells = <1>; |
770 | ranges; | 770 | ranges; |
771 | 771 | ||
772 | vica: intc@0x10140000 { | 772 | vica: intc@10140000 { |
773 | compatible = "arm,versatile-vic"; | 773 | compatible = "arm,versatile-vic"; |
774 | interrupt-controller; | 774 | interrupt-controller; |
775 | #interrupt-cells = <1>; | 775 | #interrupt-cells = <1>; |
776 | reg = <0x10140000 0x20>; | 776 | reg = <0x10140000 0x20>; |
777 | }; | 777 | }; |
778 | 778 | ||
779 | vicb: intc@0x10140020 { | 779 | vicb: intc@10140020 { |
780 | compatible = "arm,versatile-vic"; | 780 | compatible = "arm,versatile-vic"; |
781 | interrupt-controller; | 781 | interrupt-controller; |
782 | #interrupt-cells = <1>; | 782 | #interrupt-cells = <1>; |
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index f0b39f835914..9070c3701c89 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | #include "ste-dbx5x0.dtsi" | 13 | #include "ste-dbx5x0.dtsi" |
14 | #include "ste-href-family-pinctrl.dtsi" | ||
14 | 15 | ||
15 | / { | 16 | / { |
16 | model = "Calao Systems Snowball platform with device tree"; | 17 | model = "Calao Systems Snowball platform with device tree"; |
@@ -75,6 +76,8 @@ | |||
75 | 76 | ||
76 | leds { | 77 | leds { |
77 | compatible = "gpio-leds"; | 78 | compatible = "gpio-leds"; |
79 | pinctrl-names = "default"; | ||
80 | pinctrl-0 = <&gpioled_snowball_mode>; | ||
78 | used-led { | 81 | used-led { |
79 | label = "user_led"; | 82 | label = "user_led"; |
80 | gpios = <&gpio4 14 0x4>; | 83 | gpios = <&gpio4 14 0x4>; |
@@ -84,6 +87,11 @@ | |||
84 | }; | 87 | }; |
85 | 88 | ||
86 | soc { | 89 | soc { |
90 | usb_per5@a03e0000 { | ||
91 | pinctrl-names = "default", "sleep"; | ||
92 | pinctrl-0 = <&musb_default_mode>; | ||
93 | pinctrl-1 = <&musb_sleep_mode>; | ||
94 | }; | ||
87 | 95 | ||
88 | sound { | 96 | sound { |
89 | compatible = "stericsson,snd-soc-mop500"; | 97 | compatible = "stericsson,snd-soc-mop500"; |
@@ -92,7 +100,21 @@ | |||
92 | stericsson,audio-codec = <&codec>; | 100 | stericsson,audio-codec = <&codec>; |
93 | }; | 101 | }; |
94 | 102 | ||
103 | msp0: msp@80123000 { | ||
104 | pinctrl-names = "default"; | ||
105 | pinctrl-0 = <&msp0_default_mode>; | ||
106 | status = "okay"; | ||
107 | }; | ||
108 | |||
95 | msp1: msp@80124000 { | 109 | msp1: msp@80124000 { |
110 | pinctrl-names = "default"; | ||
111 | pinctrl-0 = <&msp1_default_mode>; | ||
112 | status = "okay"; | ||
113 | }; | ||
114 | |||
115 | msp2: msp@80117000 { | ||
116 | pinctrl-names = "default"; | ||
117 | pinctrl-0 = <&msp2_default_mode>; | ||
96 | status = "okay"; | 118 | status = "okay"; |
97 | }; | 119 | }; |
98 | 120 | ||
@@ -110,6 +132,8 @@ | |||
110 | interrupt-parent = <&gpio4>; | 132 | interrupt-parent = <&gpio4>; |
111 | vdd33a-supply = <&en_3v3_reg>; | 133 | vdd33a-supply = <&en_3v3_reg>; |
112 | vddvario-supply = <&db8500_vape_reg>; | 134 | vddvario-supply = <&db8500_vape_reg>; |
135 | pinctrl-names = "default"; | ||
136 | pinctrl-0 = <ð_snowball_mode>; | ||
113 | 137 | ||
114 | reg-shift = <1>; | 138 | reg-shift = <1>; |
115 | reg-io-width = <2>; | 139 | reg-io-width = <2>; |
@@ -136,6 +160,9 @@ | |||
136 | mmc-cap-mmc-highspeed; | 160 | mmc-cap-mmc-highspeed; |
137 | vmmc-supply = <&ab8500_ldo_aux3_reg>; | 161 | vmmc-supply = <&ab8500_ldo_aux3_reg>; |
138 | vqmmc-supply = <&vmmci>; | 162 | vqmmc-supply = <&vmmci>; |
163 | pinctrl-names = "default", "sleep"; | ||
164 | pinctrl-0 = <&sdi0_default_mode>; | ||
165 | pinctrl-1 = <&sdi0_sleep_mode>; | ||
139 | 166 | ||
140 | cd-gpios = <&gpio6 26 0x4>; // 218 | 167 | cd-gpios = <&gpio6 26 0x4>; // 218 |
141 | cd-inverted; | 168 | cd-inverted; |
@@ -143,6 +170,27 @@ | |||
143 | status = "okay"; | 170 | status = "okay"; |
144 | }; | 171 | }; |
145 | 172 | ||
173 | // WLAN SDIO channel | ||
174 | sdi1_per2@80118000 { | ||
175 | arm,primecell-periphid = <0x10480180>; | ||
176 | max-frequency = <100000000>; | ||
177 | bus-width = <4>; | ||
178 | pinctrl-names = "default", "sleep"; | ||
179 | pinctrl-0 = <&sdi1_default_mode>; | ||
180 | pinctrl-1 = <&sdi1_sleep_mode>; | ||
181 | |||
182 | status = "okay"; | ||
183 | }; | ||
184 | |||
185 | // Unused PoP eMMC - register and put it to sleep by default */ | ||
186 | sdi2_per3@80005000 { | ||
187 | arm,primecell-periphid = <0x10480180>; | ||
188 | pinctrl-names = "default"; | ||
189 | pinctrl-0 = <&sdi2_sleep_mode>; | ||
190 | |||
191 | status = "okay"; | ||
192 | }; | ||
193 | |||
146 | // On-board eMMC | 194 | // On-board eMMC |
147 | sdi4_per2@80114000 { | 195 | sdi4_per2@80114000 { |
148 | arm,primecell-periphid = <0x10480180>; | 196 | arm,primecell-periphid = <0x10480180>; |
@@ -150,22 +198,63 @@ | |||
150 | bus-width = <8>; | 198 | bus-width = <8>; |
151 | mmc-cap-mmc-highspeed; | 199 | mmc-cap-mmc-highspeed; |
152 | vmmc-supply = <&ab8500_ldo_aux2_reg>; | 200 | vmmc-supply = <&ab8500_ldo_aux2_reg>; |
201 | pinctrl-names = "default", "sleep"; | ||
202 | pinctrl-0 = <&sdi4_default_mode>; | ||
203 | pinctrl-1 = <&sdi4_sleep_mode>; | ||
153 | 204 | ||
154 | status = "okay"; | 205 | status = "okay"; |
155 | }; | 206 | }; |
156 | 207 | ||
157 | uart@80120000 { | 208 | uart@80120000 { |
209 | pinctrl-names = "default", "sleep"; | ||
210 | pinctrl-0 = <&uart0_default_mode>; | ||
211 | pinctrl-1 = <&uart0_sleep_mode>; | ||
158 | status = "okay"; | 212 | status = "okay"; |
159 | }; | 213 | }; |
160 | 214 | ||
161 | uart@80121000 { | 215 | uart@80121000 { |
216 | pinctrl-names = "default", "sleep"; | ||
217 | pinctrl-0 = <&uart1_default_mode>; | ||
218 | pinctrl-1 = <&uart1_sleep_mode>; | ||
162 | status = "okay"; | 219 | status = "okay"; |
163 | }; | 220 | }; |
164 | 221 | ||
165 | uart@80007000 { | 222 | uart@80007000 { |
223 | pinctrl-names = "default", "sleep"; | ||
224 | pinctrl-0 = <&uart2_default_mode>; | ||
225 | pinctrl-1 = <&uart2_sleep_mode>; | ||
166 | status = "okay"; | 226 | status = "okay"; |
167 | }; | 227 | }; |
168 | 228 | ||
229 | i2c@80004000 { | ||
230 | pinctrl-names = "default","sleep"; | ||
231 | pinctrl-0 = <&i2c0_default_mode>; | ||
232 | pinctrl-1 = <&i2c0_sleep_mode>; | ||
233 | }; | ||
234 | |||
235 | i2c@80122000 { | ||
236 | pinctrl-names = "default","sleep"; | ||
237 | pinctrl-0 = <&i2c1_default_mode>; | ||
238 | pinctrl-1 = <&i2c1_sleep_mode>; | ||
239 | }; | ||
240 | |||
241 | i2c@80128000 { | ||
242 | pinctrl-names = "default","sleep"; | ||
243 | pinctrl-0 = <&i2c2_default_mode>; | ||
244 | pinctrl-1 = <&i2c2_sleep_mode>; | ||
245 | }; | ||
246 | |||
247 | i2c@80110000 { | ||
248 | pinctrl-names = "default","sleep"; | ||
249 | pinctrl-0 = <&i2c3_default_mode>; | ||
250 | pinctrl-1 = <&i2c3_sleep_mode>; | ||
251 | }; | ||
252 | |||
253 | ssp@80002000 { | ||
254 | pinctrl-names = "default"; | ||
255 | pinctrl-0 = <&ssp0_snowball_mode>; | ||
256 | }; | ||
257 | |||
169 | cpufreq-cooling { | 258 | cpufreq-cooling { |
170 | status = "okay"; | 259 | status = "okay"; |
171 | }; | 260 | }; |
@@ -266,5 +355,141 @@ | |||
266 | }; | 355 | }; |
267 | }; | 356 | }; |
268 | }; | 357 | }; |
358 | |||
359 | pinctrl { | ||
360 | /* | ||
361 | * Set this up using hogs, as time goes by and as seems fit, these | ||
362 | * can be moved over to being controlled by respective device. | ||
363 | */ | ||
364 | pinctrl-names = "default"; | ||
365 | pinctrl-0 = <&accel_snowball_mode>, | ||
366 | <&magneto_snowball_mode>, | ||
367 | <&gbf_snowball_mode>, | ||
368 | <&wlan_snowball_mode>; | ||
369 | |||
370 | ethernet { | ||
371 | /* | ||
372 | * Mux in "SM" which is used for the | ||
373 | * SMSC911x Ethernet adapter | ||
374 | */ | ||
375 | eth_snowball_mode: eth_snowball { | ||
376 | snowball_mux { | ||
377 | ste,function = "sm"; | ||
378 | ste,pins = "sm_b_1"; | ||
379 | }; | ||
380 | /* LAN IRQ pin */ | ||
381 | snowball_cfg1 { | ||
382 | ste,pins = "GPIO140_B11"; | ||
383 | ste,config = <&in_nopull>; | ||
384 | }; | ||
385 | /* LAN reset pin */ | ||
386 | snowball_cfg2 { | ||
387 | ste,pins = "GPIO141_C12"; | ||
388 | ste,config = <&gpio_out_hi>; | ||
389 | }; | ||
390 | |||
391 | }; | ||
392 | }; | ||
393 | sdi0 { | ||
394 | sdi0_default_mode: sdi0_default { | ||
395 | snowball_mux { | ||
396 | ste,function = "mc0"; | ||
397 | ste,pins = "mc0dat31dir_a_1"; | ||
398 | }; | ||
399 | snowball_cfg1 { | ||
400 | ste,pins = "GPIO21_AB3"; /* DAT31DIR */ | ||
401 | ste,config = <&out_hi>; | ||
402 | }; | ||
403 | |||
404 | }; | ||
405 | }; | ||
406 | ssp0 { | ||
407 | ssp0_snowball_mode: ssp0_snowball_default { | ||
408 | snowball_mux { | ||
409 | ste,function = "ssp0"; | ||
410 | ste,pins = "ssp0_a_1"; | ||
411 | }; | ||
412 | snowball_cfg1 { | ||
413 | ste,pins = "GPIO144_B13"; /* FRM */ | ||
414 | ste,config = <&gpio_out_hi>; | ||
415 | }; | ||
416 | snowball_cfg2 { | ||
417 | ste,pins = "GPIO145_C13"; /* RXD */ | ||
418 | ste,config = <&in_pd>; | ||
419 | }; | ||
420 | snowball_cfg3 { | ||
421 | ste,pins = | ||
422 | "GPIO146_D13", /* TXD */ | ||
423 | "GPIO143_D12"; /* CLK */ | ||
424 | ste,config = <&out_lo>; | ||
425 | }; | ||
426 | |||
427 | }; | ||
428 | }; | ||
429 | gpio_led { | ||
430 | gpioled_snowball_mode: gpioled_default { | ||
431 | snowball_cfg1 { | ||
432 | ste,pins = "GPIO142_C11"; | ||
433 | ste,config = <&gpio_out_hi>; | ||
434 | }; | ||
435 | |||
436 | }; | ||
437 | }; | ||
438 | accelerometer { | ||
439 | accel_snowball_mode: accel_snowball { | ||
440 | /* Accelerometer lines */ | ||
441 | snowball_cfg1 { | ||
442 | ste,pins = | ||
443 | "GPIO163_C20", /* ACCEL_IRQ1 */ | ||
444 | "GPIO164_B21"; /* ACCEL_IRQ2 */ | ||
445 | ste,config = <&gpio_in_pu>; | ||
446 | }; | ||
447 | }; | ||
448 | }; | ||
449 | magnetometer { | ||
450 | magneto_snowball_mode: magneto_snowball { | ||
451 | snowball_cfg1 { | ||
452 | ste,pins = "GPIO165_C21"; /* MAG_DRDY */ | ||
453 | ste,config = <&gpio_in_pu>; | ||
454 | }; | ||
455 | }; | ||
456 | }; | ||
457 | gbf { | ||
458 | gbf_snowball_mode: gbf_snowball { | ||
459 | /* | ||
460 | * GBF (GPS, Bluetooth, FM-radio) interface, | ||
461 | * pull low to reset state | ||
462 | */ | ||
463 | snowball_cfg1 { | ||
464 | ste,pins = "GPIO171_D23"; /* GBF_ENA_RESET */ | ||
465 | ste,config = <&gpio_out_lo>; | ||
466 | }; | ||
467 | }; | ||
468 | }; | ||
469 | wlan { | ||
470 | wlan_snowball_mode: wlan_snowball { | ||
471 | /* | ||
472 | * Activate this mode with the WLAN chip. | ||
473 | * These are plain GPIO pins used by WLAN | ||
474 | */ | ||
475 | snowball_cfg1 { | ||
476 | ste,pins = | ||
477 | "GPIO161_D21", /* WLAN_PMU_EN */ | ||
478 | "GPIO215_AH13"; /* WLAN_ENA */ | ||
479 | ste,config = <&gpio_out_lo>; | ||
480 | }; | ||
481 | snowball_cfg2 { | ||
482 | ste,pins = "GPIO216_AG12"; /* WLAN_IRQ */ | ||
483 | ste,config = <&gpio_in_pu>; | ||
484 | }; | ||
485 | }; | ||
486 | }; | ||
487 | }; | ||
488 | |||
489 | mcde@a0350000 { | ||
490 | pinctrl-names = "default", "sleep"; | ||
491 | pinctrl-0 = <&lcd_default_mode>; | ||
492 | pinctrl-1 = <&lcd_sleep_mode>; | ||
493 | }; | ||
269 | }; | 494 | }; |
270 | }; | 495 | }; |
diff --git a/arch/arm/boot/dts/stih415-pinctrl.dtsi b/arch/arm/boot/dts/stih415-pinctrl.dtsi index 1d322b24d1e4..e56449d41481 100644 --- a/arch/arm/boot/dts/stih415-pinctrl.dtsi +++ b/arch/arm/boot/dts/stih415-pinctrl.dtsi | |||
@@ -86,6 +86,24 @@ | |||
86 | }; | 86 | }; |
87 | }; | 87 | }; |
88 | }; | 88 | }; |
89 | |||
90 | sbc_i2c0 { | ||
91 | pinctrl_sbc_i2c0_default: sbc_i2c0-default { | ||
92 | st,pins { | ||
93 | sda = <&PIO4 6 ALT1 BIDIR>; | ||
94 | scl = <&PIO4 5 ALT1 BIDIR>; | ||
95 | }; | ||
96 | }; | ||
97 | }; | ||
98 | |||
99 | sbc_i2c1 { | ||
100 | pinctrl_sbc_i2c1_default: sbc_i2c1-default { | ||
101 | st,pins { | ||
102 | sda = <&PIO3 2 ALT2 BIDIR>; | ||
103 | scl = <&PIO3 1 ALT2 BIDIR>; | ||
104 | }; | ||
105 | }; | ||
106 | }; | ||
89 | }; | 107 | }; |
90 | 108 | ||
91 | pin-controller-front { | 109 | pin-controller-front { |
@@ -143,6 +161,24 @@ | |||
143 | reg = <0x7000 0x100>; | 161 | reg = <0x7000 0x100>; |
144 | st,bank-name = "PIO12"; | 162 | st,bank-name = "PIO12"; |
145 | }; | 163 | }; |
164 | |||
165 | i2c0 { | ||
166 | pinctrl_i2c0_default: i2c0-default { | ||
167 | st,pins { | ||
168 | sda = <&PIO9 3 ALT1 BIDIR>; | ||
169 | scl = <&PIO9 2 ALT1 BIDIR>; | ||
170 | }; | ||
171 | }; | ||
172 | }; | ||
173 | |||
174 | i2c1 { | ||
175 | pinctrl_i2c1_default: i2c1-default { | ||
176 | st,pins { | ||
177 | sda = <&PIO12 1 ALT1 BIDIR>; | ||
178 | scl = <&PIO12 0 ALT1 BIDIR>; | ||
179 | }; | ||
180 | }; | ||
181 | }; | ||
146 | }; | 182 | }; |
147 | 183 | ||
148 | pin-controller-rear { | 184 | pin-controller-rear { |
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi index 74ab8ded4b49..d9c7dd1d95a4 100644 --- a/arch/arm/boot/dts/stih415.dtsi +++ b/arch/arm/boot/dts/stih415.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "stih41x.dtsi" | 9 | #include "stih41x.dtsi" |
10 | #include "stih415-clock.dtsi" | 10 | #include "stih415-clock.dtsi" |
11 | #include "stih415-pinctrl.dtsi" | 11 | #include "stih415-pinctrl.dtsi" |
12 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
12 | / { | 13 | / { |
13 | 14 | ||
14 | L2: cache-controller { | 15 | L2: cache-controller { |
@@ -83,5 +84,57 @@ | |||
83 | pinctrl-names = "default"; | 84 | pinctrl-names = "default"; |
84 | pinctrl-0 = <&pinctrl_sbc_serial1>; | 85 | pinctrl-0 = <&pinctrl_sbc_serial1>; |
85 | }; | 86 | }; |
87 | |||
88 | i2c@fed40000 { | ||
89 | compatible = "st,comms-ssc4-i2c"; | ||
90 | reg = <0xfed40000 0x110>; | ||
91 | interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; | ||
92 | clocks = <&CLKS_ICN_REG_0>; | ||
93 | clock-names = "ssc"; | ||
94 | clock-frequency = <400000>; | ||
95 | pinctrl-names = "default"; | ||
96 | pinctrl-0 = <&pinctrl_i2c0_default>; | ||
97 | |||
98 | status = "disabled"; | ||
99 | }; | ||
100 | |||
101 | i2c@fed41000 { | ||
102 | compatible = "st,comms-ssc4-i2c"; | ||
103 | reg = <0xfed41000 0x110>; | ||
104 | interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; | ||
105 | clocks = <&CLKS_ICN_REG_0>; | ||
106 | clock-names = "ssc"; | ||
107 | clock-frequency = <400000>; | ||
108 | pinctrl-names = "default"; | ||
109 | pinctrl-0 = <&pinctrl_i2c1_default>; | ||
110 | |||
111 | status = "disabled"; | ||
112 | }; | ||
113 | |||
114 | i2c@fe540000 { | ||
115 | compatible = "st,comms-ssc4-i2c"; | ||
116 | reg = <0xfe540000 0x110>; | ||
117 | interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; | ||
118 | clocks = <&CLK_SYSIN>; | ||
119 | clock-names = "ssc"; | ||
120 | clock-frequency = <400000>; | ||
121 | pinctrl-names = "default"; | ||
122 | pinctrl-0 = <&pinctrl_sbc_i2c0_default>; | ||
123 | |||
124 | status = "disabled"; | ||
125 | }; | ||
126 | |||
127 | i2c@fe541000 { | ||
128 | compatible = "st,comms-ssc4-i2c"; | ||
129 | reg = <0xfe541000 0x110>; | ||
130 | interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>; | ||
131 | clocks = <&CLK_SYSIN>; | ||
132 | clock-names = "ssc"; | ||
133 | clock-frequency = <400000>; | ||
134 | pinctrl-names = "default"; | ||
135 | pinctrl-0 = <&pinctrl_sbc_i2c1_default>; | ||
136 | |||
137 | status = "disabled"; | ||
138 | }; | ||
86 | }; | 139 | }; |
87 | }; | 140 | }; |
diff --git a/arch/arm/boot/dts/stih416-pinctrl.dtsi b/arch/arm/boot/dts/stih416-pinctrl.dtsi index 0f246c979262..b29ff4ba542c 100644 --- a/arch/arm/boot/dts/stih416-pinctrl.dtsi +++ b/arch/arm/boot/dts/stih416-pinctrl.dtsi | |||
@@ -97,6 +97,24 @@ | |||
97 | }; | 97 | }; |
98 | }; | 98 | }; |
99 | }; | 99 | }; |
100 | |||
101 | sbc_i2c0 { | ||
102 | pinctrl_sbc_i2c0_default: sbc_i2c0-default { | ||
103 | st,pins { | ||
104 | sda = <&PIO4 6 ALT1 BIDIR>; | ||
105 | scl = <&PIO4 5 ALT1 BIDIR>; | ||
106 | }; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | sbc_i2c1 { | ||
111 | pinctrl_sbc_i2c1_default: sbc_i2c1-default { | ||
112 | st,pins { | ||
113 | sda = <&PIO3 2 ALT2 BIDIR>; | ||
114 | scl = <&PIO3 1 ALT2 BIDIR>; | ||
115 | }; | ||
116 | }; | ||
117 | }; | ||
100 | }; | 118 | }; |
101 | 119 | ||
102 | pin-controller-front { | 120 | pin-controller-front { |
@@ -175,6 +193,23 @@ | |||
175 | }; | 193 | }; |
176 | }; | 194 | }; |
177 | 195 | ||
196 | i2c0 { | ||
197 | pinctrl_i2c0_default: i2c0-default { | ||
198 | st,pins { | ||
199 | sda = <&PIO9 3 ALT1 BIDIR>; | ||
200 | scl = <&PIO9 2 ALT1 BIDIR>; | ||
201 | }; | ||
202 | }; | ||
203 | }; | ||
204 | |||
205 | i2c1 { | ||
206 | pinctrl_i2c1_default: i2c1-default { | ||
207 | st,pins { | ||
208 | sda = <&PIO12 1 ALT1 BIDIR>; | ||
209 | scl = <&PIO12 0 ALT1 BIDIR>; | ||
210 | }; | ||
211 | }; | ||
212 | }; | ||
178 | }; | 213 | }; |
179 | 214 | ||
180 | pin-controller-rear { | 215 | pin-controller-rear { |
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi index 1a0326ea7d07..b7ab47b95816 100644 --- a/arch/arm/boot/dts/stih416.dtsi +++ b/arch/arm/boot/dts/stih416.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "stih41x.dtsi" | 9 | #include "stih41x.dtsi" |
10 | #include "stih416-clock.dtsi" | 10 | #include "stih416-clock.dtsi" |
11 | #include "stih416-pinctrl.dtsi" | 11 | #include "stih416-pinctrl.dtsi" |
12 | #include <dt-bindings/interrupt-controller/arm-gic.h> | ||
12 | / { | 13 | / { |
13 | L2: cache-controller { | 14 | L2: cache-controller { |
14 | compatible = "arm,pl310-cache"; | 15 | compatible = "arm,pl310-cache"; |
@@ -92,5 +93,57 @@ | |||
92 | pinctrl-0 = <&pinctrl_sbc_serial1>; | 93 | pinctrl-0 = <&pinctrl_sbc_serial1>; |
93 | clocks = <&CLK_SYSIN>; | 94 | clocks = <&CLK_SYSIN>; |
94 | }; | 95 | }; |
96 | |||
97 | i2c@fed40000 { | ||
98 | compatible = "st,comms-ssc4-i2c"; | ||
99 | reg = <0xfed40000 0x110>; | ||
100 | interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; | ||
101 | clocks = <&CLK_S_ICN_REG_0>; | ||
102 | clock-names = "ssc"; | ||
103 | clock-frequency = <400000>; | ||
104 | pinctrl-names = "default"; | ||
105 | pinctrl-0 = <&pinctrl_i2c0_default>; | ||
106 | |||
107 | status = "disabled"; | ||
108 | }; | ||
109 | |||
110 | i2c@fed41000 { | ||
111 | compatible = "st,comms-ssc4-i2c"; | ||
112 | reg = <0xfed41000 0x110>; | ||
113 | interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; | ||
114 | clocks = <&CLK_S_ICN_REG_0>; | ||
115 | clock-names = "ssc"; | ||
116 | clock-frequency = <400000>; | ||
117 | pinctrl-names = "default"; | ||
118 | pinctrl-0 = <&pinctrl_i2c1_default>; | ||
119 | |||
120 | status = "disabled"; | ||
121 | }; | ||
122 | |||
123 | i2c@fe540000 { | ||
124 | compatible = "st,comms-ssc4-i2c"; | ||
125 | reg = <0xfe540000 0x110>; | ||
126 | interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; | ||
127 | clocks = <&CLK_SYSIN>; | ||
128 | clock-names = "ssc"; | ||
129 | clock-frequency = <400000>; | ||
130 | pinctrl-names = "default"; | ||
131 | pinctrl-0 = <&pinctrl_sbc_i2c0_default>; | ||
132 | |||
133 | status = "disabled"; | ||
134 | }; | ||
135 | |||
136 | i2c@fe541000 { | ||
137 | compatible = "st,comms-ssc4-i2c"; | ||
138 | reg = <0xfe541000 0x110>; | ||
139 | interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>; | ||
140 | clocks = <&CLK_SYSIN>; | ||
141 | clock-names = "ssc"; | ||
142 | clock-frequency = <400000>; | ||
143 | pinctrl-names = "default"; | ||
144 | pinctrl-0 = <&pinctrl_sbc_i2c1_default>; | ||
145 | |||
146 | status = "disabled"; | ||
147 | }; | ||
95 | }; | 148 | }; |
96 | }; | 149 | }; |
diff --git a/arch/arm/boot/dts/stih41x-b2000.dtsi b/arch/arm/boot/dts/stih41x-b2000.dtsi index 8e694d2b8f5b..1e6aa92772f5 100644 --- a/arch/arm/boot/dts/stih41x-b2000.dtsi +++ b/arch/arm/boot/dts/stih41x-b2000.dtsi | |||
@@ -37,5 +37,14 @@ | |||
37 | }; | 37 | }; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | /* HDMI Tx I2C */ | ||
41 | i2c@fed41000 { | ||
42 | /* HDMI V1.3a supports Standard mode only */ | ||
43 | clock-frequency = <100000>; | ||
44 | i2c-min-scl-pulse-width-us = <0>; | ||
45 | i2c-min-sda-pulse-width-us = <5>; | ||
46 | |||
47 | status = "okay"; | ||
48 | }; | ||
40 | }; | 49 | }; |
41 | }; | 50 | }; |
diff --git a/arch/arm/boot/dts/stih41x-b2020.dtsi b/arch/arm/boot/dts/stih41x-b2020.dtsi index 133e18143b1b..0ef0a69df8ea 100644 --- a/arch/arm/boot/dts/stih41x-b2020.dtsi +++ b/arch/arm/boot/dts/stih41x-b2020.dtsi | |||
@@ -38,5 +38,27 @@ | |||
38 | default-state = "off"; | 38 | default-state = "off"; |
39 | }; | 39 | }; |
40 | }; | 40 | }; |
41 | |||
42 | i2c@fed40000 { | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | /* HDMI Tx I2C */ | ||
47 | i2c@fed41000 { | ||
48 | /* HDMI V1.3a supports Standard mode only */ | ||
49 | clock-frequency = <100000>; | ||
50 | i2c-min-scl-pulse-width-us = <0>; | ||
51 | i2c-min-sda-pulse-width-us = <5>; | ||
52 | |||
53 | status = "okay"; | ||
54 | }; | ||
55 | |||
56 | i2c@fe540000 { | ||
57 | status = "okay"; | ||
58 | }; | ||
59 | |||
60 | i2c@fe541000 { | ||
61 | status = "okay"; | ||
62 | }; | ||
41 | }; | 63 | }; |
42 | }; | 64 | }; |
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi index e7f73b2e4550..5d7681be0580 100644 --- a/arch/arm/boot/dts/zynq-7000.dtsi +++ b/arch/arm/boot/dts/zynq-7000.dtsi | |||
@@ -15,6 +15,25 @@ | |||
15 | / { | 15 | / { |
16 | compatible = "xlnx,zynq-7000"; | 16 | compatible = "xlnx,zynq-7000"; |
17 | 17 | ||
18 | cpus { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | |||
22 | cpu@0 { | ||
23 | compatible = "arm,cortex-a9"; | ||
24 | device_type = "cpu"; | ||
25 | reg = <0>; | ||
26 | clocks = <&clkc 3>; | ||
27 | }; | ||
28 | |||
29 | cpu@1 { | ||
30 | compatible = "arm,cortex-a9"; | ||
31 | device_type = "cpu"; | ||
32 | reg = <1>; | ||
33 | clocks = <&clkc 3>; | ||
34 | }; | ||
35 | }; | ||
36 | |||
18 | pmu { | 37 | pmu { |
19 | compatible = "arm,cortex-a9-pmu"; | 38 | compatible = "arm,cortex-a9-pmu"; |
20 | interrupts = <0 5 4>, <0 6 4>; | 39 | interrupts = <0 5 4>, <0 6 4>; |
@@ -65,6 +84,24 @@ | |||
65 | interrupts = <0 50 4>; | 84 | interrupts = <0 50 4>; |
66 | }; | 85 | }; |
67 | 86 | ||
87 | gem0: ethernet@e000b000 { | ||
88 | compatible = "cdns,gem"; | ||
89 | reg = <0xe000b000 0x4000>; | ||
90 | status = "disabled"; | ||
91 | interrupts = <0 22 4>; | ||
92 | clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>; | ||
93 | clock-names = "pclk", "hclk", "tx_clk"; | ||
94 | }; | ||
95 | |||
96 | gem1: ethernet@e000c000 { | ||
97 | compatible = "cdns,gem"; | ||
98 | reg = <0xe000c000 0x4000>; | ||
99 | status = "disabled"; | ||
100 | interrupts = <0 45 4>; | ||
101 | clocks = <&clkc 31>, <&clkc 31>, <&clkc 14>; | ||
102 | clock-names = "pclk", "hclk", "tx_clk"; | ||
103 | }; | ||
104 | |||
68 | slcr: slcr@f8000000 { | 105 | slcr: slcr@f8000000 { |
69 | compatible = "xlnx,zynq-slcr"; | 106 | compatible = "xlnx,zynq-slcr"; |
70 | reg = <0xF8000000 0x1000>; | 107 | reg = <0xF8000000 0x1000>; |
@@ -106,7 +143,6 @@ | |||
106 | compatible = "cdns,ttc"; | 143 | compatible = "cdns,ttc"; |
107 | clocks = <&clkc 6>; | 144 | clocks = <&clkc 6>; |
108 | reg = <0xF8001000 0x1000>; | 145 | reg = <0xF8001000 0x1000>; |
109 | clock-ranges; | ||
110 | }; | 146 | }; |
111 | 147 | ||
112 | ttc1: ttc1@f8002000 { | 148 | ttc1: ttc1@f8002000 { |
@@ -115,7 +151,6 @@ | |||
115 | compatible = "cdns,ttc"; | 151 | compatible = "cdns,ttc"; |
116 | clocks = <&clkc 6>; | 152 | clocks = <&clkc 6>; |
117 | reg = <0xF8002000 0x1000>; | 153 | reg = <0xF8002000 0x1000>; |
118 | clock-ranges; | ||
119 | }; | 154 | }; |
120 | scutimer: scutimer@f8f00600 { | 155 | scutimer: scutimer@f8f00600 { |
121 | interrupt-parent = <&intc>; | 156 | interrupt-parent = <&intc>; |
diff --git a/arch/arm/boot/dts/zynq-zc702.dts b/arch/arm/boot/dts/zynq-zc702.dts index 21aea99a067b..34d680a46b7e 100644 --- a/arch/arm/boot/dts/zynq-zc702.dts +++ b/arch/arm/boot/dts/zynq-zc702.dts | |||
@@ -29,6 +29,11 @@ | |||
29 | 29 | ||
30 | }; | 30 | }; |
31 | 31 | ||
32 | &gem0 { | ||
33 | status = "okay"; | ||
34 | phy-mode = "rgmii"; | ||
35 | }; | ||
36 | |||
32 | &uart1 { | 37 | &uart1 { |
33 | status = "okay"; | 38 | status = "okay"; |
34 | }; | 39 | }; |
diff --git a/arch/arm/boot/dts/zynq-zc706.dts b/arch/arm/boot/dts/zynq-zc706.dts index 79009e0b74b9..b2835d5fc09a 100644 --- a/arch/arm/boot/dts/zynq-zc706.dts +++ b/arch/arm/boot/dts/zynq-zc706.dts | |||
@@ -30,6 +30,11 @@ | |||
30 | 30 | ||
31 | }; | 31 | }; |
32 | 32 | ||
33 | &gem0 { | ||
34 | status = "okay"; | ||
35 | phy-mode = "rgmii"; | ||
36 | }; | ||
37 | |||
33 | &uart1 { | 38 | &uart1 { |
34 | status = "okay"; | 39 | status = "okay"; |
35 | }; | 40 | }; |
diff --git a/arch/arm/boot/dts/zynq-zed.dts b/arch/arm/boot/dts/zynq-zed.dts index d6acf2b1cdf4..2eda06889dfc 100644 --- a/arch/arm/boot/dts/zynq-zed.dts +++ b/arch/arm/boot/dts/zynq-zed.dts | |||
@@ -30,6 +30,11 @@ | |||
30 | 30 | ||
31 | }; | 31 | }; |
32 | 32 | ||
33 | &gem0 { | ||
34 | status = "okay"; | ||
35 | phy-mode = "rgmii"; | ||
36 | }; | ||
37 | |||
33 | &uart1 { | 38 | &uart1 { |
34 | status = "okay"; | 39 | status = "okay"; |
35 | }; | 40 | }; |
diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig index 1ce39940795d..cb26c62dc722 100644 --- a/arch/arm/configs/ape6evm_defconfig +++ b/arch/arm/configs/ape6evm_defconfig | |||
@@ -13,7 +13,7 @@ CONFIG_EMBEDDED=y | |||
13 | CONFIG_PERF_EVENTS=y | 13 | CONFIG_PERF_EVENTS=y |
14 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
15 | # CONFIG_BLOCK is not set | 15 | # CONFIG_BLOCK is not set |
16 | CONFIG_ARCH_SHMOBILE=y | 16 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
17 | CONFIG_ARCH_R8A73A4=y | 17 | CONFIG_ARCH_R8A73A4=y |
18 | CONFIG_MACH_APE6EVM=y | 18 | CONFIG_MACH_APE6EVM=y |
19 | # CONFIG_ARM_THUMB is not set | 19 | # CONFIG_ARM_THUMB is not set |
diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index fae939d3d7f0..5abf1a2e3160 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig | |||
@@ -15,7 +15,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y | |||
15 | # CONFIG_BLK_DEV_BSG is not set | 15 | # CONFIG_BLK_DEV_BSG is not set |
16 | # CONFIG_IOSCHED_DEADLINE is not set | 16 | # CONFIG_IOSCHED_DEADLINE is not set |
17 | # CONFIG_IOSCHED_CFQ is not set | 17 | # CONFIG_IOSCHED_CFQ is not set |
18 | CONFIG_ARCH_SHMOBILE=y | 18 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
19 | CONFIG_ARCH_R8A7740=y | 19 | CONFIG_ARCH_R8A7740=y |
20 | CONFIG_MACH_ARMADILLO800EVA=y | 20 | CONFIG_MACH_ARMADILLO800EVA=y |
21 | # CONFIG_SH_TIMER_TMU is not set | 21 | # CONFIG_SH_TIMER_TMU is not set |
diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index b38cd107f82d..1dd39716d7cb 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_SYSCTL_SYSCALL=y | |||
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EMBEDDED=y |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | # CONFIG_IOSCHED_CFQ is not set | 10 | # CONFIG_IOSCHED_CFQ is not set |
11 | CONFIG_ARCH_SHMOBILE=y | 11 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
12 | CONFIG_ARCH_R8A7778=y | 12 | CONFIG_ARCH_R8A7778=y |
13 | CONFIG_MACH_BOCKW=y | 13 | CONFIG_MACH_BOCKW=y |
14 | CONFIG_MEMORY_START=0x60000000 | 14 | CONFIG_MEMORY_START=0x60000000 |
diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig index 825c16dee8a0..7fd65a01ec7e 100644 --- a/arch/arm/configs/koelsch_defconfig +++ b/arch/arm/configs/koelsch_defconfig | |||
@@ -9,7 +9,7 @@ CONFIG_EMBEDDED=y | |||
9 | CONFIG_PERF_EVENTS=y | 9 | CONFIG_PERF_EVENTS=y |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
11 | # CONFIG_BLOCK is not set | 11 | # CONFIG_BLOCK is not set |
12 | CONFIG_ARCH_SHMOBILE=y | 12 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
13 | CONFIG_ARCH_R8A7791=y | 13 | CONFIG_ARCH_R8A7791=y |
14 | CONFIG_MACH_KOELSCH=y | 14 | CONFIG_MACH_KOELSCH=y |
15 | # CONFIG_SWP_EMULATE is not set | 15 | # CONFIG_SWP_EMULATE is not set |
diff --git a/arch/arm/configs/kzm9d_defconfig b/arch/arm/configs/kzm9d_defconfig index 6c37f4a98eb8..217f1dda2965 100644 --- a/arch/arm/configs/kzm9d_defconfig +++ b/arch/arm/configs/kzm9d_defconfig | |||
@@ -13,7 +13,7 @@ CONFIG_SLAB=y | |||
13 | # CONFIG_BLK_DEV_BSG is not set | 13 | # CONFIG_BLK_DEV_BSG is not set |
14 | # CONFIG_IOSCHED_DEADLINE is not set | 14 | # CONFIG_IOSCHED_DEADLINE is not set |
15 | # CONFIG_IOSCHED_CFQ is not set | 15 | # CONFIG_IOSCHED_CFQ is not set |
16 | CONFIG_ARCH_SHMOBILE=y | 16 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
17 | CONFIG_ARCH_EMEV2=y | 17 | CONFIG_ARCH_EMEV2=y |
18 | CONFIG_MACH_KZM9D=y | 18 | CONFIG_MACH_KZM9D=y |
19 | CONFIG_MEMORY_START=0x40000000 | 19 | CONFIG_MEMORY_START=0x40000000 |
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig index 1ad028023a64..9934dbc23d64 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig | |||
@@ -22,7 +22,7 @@ CONFIG_MODULE_UNLOAD=y | |||
22 | # CONFIG_BLK_DEV_BSG is not set | 22 | # CONFIG_BLK_DEV_BSG is not set |
23 | # CONFIG_IOSCHED_DEADLINE is not set | 23 | # CONFIG_IOSCHED_DEADLINE is not set |
24 | # CONFIG_IOSCHED_CFQ is not set | 24 | # CONFIG_IOSCHED_CFQ is not set |
25 | CONFIG_ARCH_SHMOBILE=y | 25 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
26 | CONFIG_ARCH_SH73A0=y | 26 | CONFIG_ARCH_SH73A0=y |
27 | CONFIG_MACH_KZM9G=y | 27 | CONFIG_MACH_KZM9G=y |
28 | CONFIG_MEMORY_START=0x41000000 | 28 | CONFIG_MEMORY_START=0x41000000 |
diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig index 35bff5e0d57a..35dc8b2be47f 100644 --- a/arch/arm/configs/lager_defconfig +++ b/arch/arm/configs/lager_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_SLAB=y | |||
12 | # CONFIG_BLK_DEV_BSG is not set | 12 | # CONFIG_BLK_DEV_BSG is not set |
13 | # CONFIG_IOSCHED_DEADLINE is not set | 13 | # CONFIG_IOSCHED_DEADLINE is not set |
14 | # CONFIG_IOSCHED_CFQ is not set | 14 | # CONFIG_IOSCHED_CFQ is not set |
15 | CONFIG_ARCH_SHMOBILE=y | 15 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
16 | CONFIG_ARCH_R8A7790=y | 16 | CONFIG_ARCH_R8A7790=y |
17 | CONFIG_MACH_LAGER=y | 17 | CONFIG_MACH_LAGER=y |
18 | # CONFIG_SH_TIMER_TMU is not set | 18 | # CONFIG_SH_TIMER_TMU is not set |
diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig index 9fb11895b2e2..a61e1653fc5e 100644 --- a/arch/arm/configs/mackerel_defconfig +++ b/arch/arm/configs/mackerel_defconfig | |||
@@ -14,7 +14,7 @@ CONFIG_MODULE_UNLOAD=y | |||
14 | # CONFIG_BLK_DEV_BSG is not set | 14 | # CONFIG_BLK_DEV_BSG is not set |
15 | # CONFIG_IOSCHED_DEADLINE is not set | 15 | # CONFIG_IOSCHED_DEADLINE is not set |
16 | # CONFIG_IOSCHED_CFQ is not set | 16 | # CONFIG_IOSCHED_CFQ is not set |
17 | CONFIG_ARCH_SHMOBILE=y | 17 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
18 | CONFIG_ARCH_SH7372=y | 18 | CONFIG_ARCH_SH7372=y |
19 | CONFIG_MACH_MACKEREL=y | 19 | CONFIG_MACH_MACKEREL=y |
20 | CONFIG_MEMORY_SIZE=0x10000000 | 20 | CONFIG_MEMORY_SIZE=0x10000000 |
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 5cc6360340b1..6981338cd08d 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -9,7 +9,7 @@ CONFIG_SYSCTL_SYSCALL=y | |||
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EMBEDDED=y |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
11 | # CONFIG_IOSCHED_CFQ is not set | 11 | # CONFIG_IOSCHED_CFQ is not set |
12 | CONFIG_ARCH_SHMOBILE=y | 12 | CONFIG_ARCH_SHMOBILE_LEGACY=y |
13 | CONFIG_ARCH_R8A7779=y | 13 | CONFIG_ARCH_R8A7779=y |
14 | CONFIG_MACH_MARZEN=y | 14 | CONFIG_MACH_MARZEN=y |
15 | CONFIG_MEMORY_START=0x60000000 | 15 | CONFIG_MEMORY_START=0x60000000 |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 699b71e7f7ec..b4f7d6ffa30b 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -1,15 +1,33 @@ | |||
1 | if ARCH_AT91 | 1 | if ARCH_AT91 |
2 | 2 | ||
3 | config HAVE_AT91_UTMI | ||
4 | bool | ||
5 | |||
6 | config HAVE_AT91_USB_CLK | ||
7 | bool | ||
8 | |||
3 | config HAVE_AT91_DBGU0 | 9 | config HAVE_AT91_DBGU0 |
4 | bool | 10 | bool |
5 | 11 | ||
6 | config HAVE_AT91_DBGU1 | 12 | config HAVE_AT91_DBGU1 |
7 | bool | 13 | bool |
8 | 14 | ||
15 | config AT91_USE_OLD_CLK | ||
16 | bool | ||
17 | |||
9 | config AT91_PMC_UNIT | 18 | config AT91_PMC_UNIT |
10 | bool | 19 | bool |
11 | default !ARCH_AT91X40 | 20 | default !ARCH_AT91X40 |
12 | 21 | ||
22 | config COMMON_CLK_AT91 | ||
23 | bool | ||
24 | default AT91_PMC_UNIT && USE_OF && !AT91_USE_OLD_CLK | ||
25 | select COMMON_CLK | ||
26 | |||
27 | config OLD_CLK_AT91 | ||
28 | bool | ||
29 | default AT91_PMC_UNIT && AT91_USE_OLD_CLK | ||
30 | |||
13 | config AT91_SAM9_ALT_RESET | 31 | config AT91_SAM9_ALT_RESET |
14 | bool | 32 | bool |
15 | default !ARCH_AT91X40 | 33 | default !ARCH_AT91X40 |
@@ -21,6 +39,9 @@ config AT91_SAM9G45_RESET | |||
21 | config AT91_SAM9_TIME | 39 | config AT91_SAM9_TIME |
22 | bool | 40 | bool |
23 | 41 | ||
42 | config HAVE_AT91_SMD | ||
43 | bool | ||
44 | |||
24 | config SOC_AT91SAM9 | 45 | config SOC_AT91SAM9 |
25 | bool | 46 | bool |
26 | select AT91_SAM9_TIME | 47 | select AT91_SAM9_TIME |
@@ -65,6 +86,9 @@ config SOC_SAMA5D3 | |||
65 | select SOC_SAMA5 | 86 | select SOC_SAMA5 |
66 | select HAVE_FB_ATMEL | 87 | select HAVE_FB_ATMEL |
67 | select HAVE_AT91_DBGU1 | 88 | select HAVE_AT91_DBGU1 |
89 | select HAVE_AT91_UTMI | ||
90 | select HAVE_AT91_SMD | ||
91 | select HAVE_AT91_USB_CLK | ||
68 | help | 92 | help |
69 | Select this if you are using one of Atmel's SAMA5D3 family SoC. | 93 | Select this if you are using one of Atmel's SAMA5D3 family SoC. |
70 | This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35. | 94 | This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35. |
@@ -78,11 +102,15 @@ config SOC_AT91RM9200 | |||
78 | select HAVE_AT91_DBGU0 | 102 | select HAVE_AT91_DBGU0 |
79 | select MULTI_IRQ_HANDLER | 103 | select MULTI_IRQ_HANDLER |
80 | select SPARSE_IRQ | 104 | select SPARSE_IRQ |
105 | select AT91_USE_OLD_CLK | ||
106 | select HAVE_AT91_USB_CLK | ||
81 | 107 | ||
82 | config SOC_AT91SAM9260 | 108 | config SOC_AT91SAM9260 |
83 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" | 109 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" |
84 | select HAVE_AT91_DBGU0 | 110 | select HAVE_AT91_DBGU0 |
85 | select SOC_AT91SAM9 | 111 | select SOC_AT91SAM9 |
112 | select AT91_USE_OLD_CLK | ||
113 | select HAVE_AT91_USB_CLK | ||
86 | help | 114 | help |
87 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE | 115 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE |
88 | or AT91SAM9G20 SoC. | 116 | or AT91SAM9G20 SoC. |
@@ -92,6 +120,8 @@ config SOC_AT91SAM9261 | |||
92 | select HAVE_AT91_DBGU0 | 120 | select HAVE_AT91_DBGU0 |
93 | select HAVE_FB_ATMEL | 121 | select HAVE_FB_ATMEL |
94 | select SOC_AT91SAM9 | 122 | select SOC_AT91SAM9 |
123 | select AT91_USE_OLD_CLK | ||
124 | select HAVE_AT91_USB_CLK | ||
95 | help | 125 | help |
96 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. | 126 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. |
97 | 127 | ||
@@ -100,18 +130,25 @@ config SOC_AT91SAM9263 | |||
100 | select HAVE_AT91_DBGU1 | 130 | select HAVE_AT91_DBGU1 |
101 | select HAVE_FB_ATMEL | 131 | select HAVE_FB_ATMEL |
102 | select SOC_AT91SAM9 | 132 | select SOC_AT91SAM9 |
133 | select AT91_USE_OLD_CLK | ||
134 | select HAVE_AT91_USB_CLK | ||
103 | 135 | ||
104 | config SOC_AT91SAM9RL | 136 | config SOC_AT91SAM9RL |
105 | bool "AT91SAM9RL" | 137 | bool "AT91SAM9RL" |
106 | select HAVE_AT91_DBGU0 | 138 | select HAVE_AT91_DBGU0 |
107 | select HAVE_FB_ATMEL | 139 | select HAVE_FB_ATMEL |
108 | select SOC_AT91SAM9 | 140 | select SOC_AT91SAM9 |
141 | select AT91_USE_OLD_CLK | ||
142 | select HAVE_AT91_UTMI | ||
109 | 143 | ||
110 | config SOC_AT91SAM9G45 | 144 | config SOC_AT91SAM9G45 |
111 | bool "AT91SAM9G45 or AT91SAM9M10 families" | 145 | bool "AT91SAM9G45 or AT91SAM9M10 families" |
112 | select HAVE_AT91_DBGU1 | 146 | select HAVE_AT91_DBGU1 |
113 | select HAVE_FB_ATMEL | 147 | select HAVE_FB_ATMEL |
114 | select SOC_AT91SAM9 | 148 | select SOC_AT91SAM9 |
149 | select AT91_USE_OLD_CLK | ||
150 | select HAVE_AT91_UTMI | ||
151 | select HAVE_AT91_USB_CLK | ||
115 | help | 152 | help |
116 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. | 153 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. |
117 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. | 154 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. |
@@ -121,6 +158,10 @@ config SOC_AT91SAM9X5 | |||
121 | select HAVE_AT91_DBGU0 | 158 | select HAVE_AT91_DBGU0 |
122 | select HAVE_FB_ATMEL | 159 | select HAVE_FB_ATMEL |
123 | select SOC_AT91SAM9 | 160 | select SOC_AT91SAM9 |
161 | select AT91_USE_OLD_CLK | ||
162 | select HAVE_AT91_UTMI | ||
163 | select HAVE_AT91_SMD | ||
164 | select HAVE_AT91_USB_CLK | ||
124 | help | 165 | help |
125 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. | 166 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. |
126 | This means that your SAM9 name finishes with a '5' (except if it is | 167 | This means that your SAM9 name finishes with a '5' (except if it is |
@@ -133,6 +174,8 @@ config SOC_AT91SAM9N12 | |||
133 | select HAVE_AT91_DBGU0 | 174 | select HAVE_AT91_DBGU0 |
134 | select HAVE_FB_ATMEL | 175 | select HAVE_FB_ATMEL |
135 | select SOC_AT91SAM9 | 176 | select SOC_AT91SAM9 |
177 | select AT91_USE_OLD_CLK | ||
178 | select HAVE_AT91_USB_CLK | ||
136 | help | 179 | help |
137 | Select this if you are using Atmel's AT91SAM9N12 SoC. | 180 | Select this if you are using Atmel's AT91SAM9N12 SoC. |
138 | 181 | ||
diff --git a/arch/arm/mach-at91/Kconfig.non_dt b/arch/arm/mach-at91/Kconfig.non_dt index ca900be144ce..b736b571e882 100644 --- a/arch/arm/mach-at91/Kconfig.non_dt +++ b/arch/arm/mach-at91/Kconfig.non_dt | |||
@@ -12,26 +12,32 @@ config ARCH_AT91_NONE | |||
12 | config ARCH_AT91RM9200 | 12 | config ARCH_AT91RM9200 |
13 | bool "AT91RM9200" | 13 | bool "AT91RM9200" |
14 | select SOC_AT91RM9200 | 14 | select SOC_AT91RM9200 |
15 | select AT91_USE_OLD_CLK | ||
15 | 16 | ||
16 | config ARCH_AT91SAM9260 | 17 | config ARCH_AT91SAM9260 |
17 | bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20" | 18 | bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20" |
18 | select SOC_AT91SAM9260 | 19 | select SOC_AT91SAM9260 |
20 | select AT91_USE_OLD_CLK | ||
19 | 21 | ||
20 | config ARCH_AT91SAM9261 | 22 | config ARCH_AT91SAM9261 |
21 | bool "AT91SAM9261 or AT91SAM9G10" | 23 | bool "AT91SAM9261 or AT91SAM9G10" |
22 | select SOC_AT91SAM9261 | 24 | select SOC_AT91SAM9261 |
25 | select AT91_USE_OLD_CLK | ||
23 | 26 | ||
24 | config ARCH_AT91SAM9263 | 27 | config ARCH_AT91SAM9263 |
25 | bool "AT91SAM9263" | 28 | bool "AT91SAM9263" |
26 | select SOC_AT91SAM9263 | 29 | select SOC_AT91SAM9263 |
30 | select AT91_USE_OLD_CLK | ||
27 | 31 | ||
28 | config ARCH_AT91SAM9RL | 32 | config ARCH_AT91SAM9RL |
29 | bool "AT91SAM9RL" | 33 | bool "AT91SAM9RL" |
30 | select SOC_AT91SAM9RL | 34 | select SOC_AT91SAM9RL |
35 | select AT91_USE_OLD_CLK | ||
31 | 36 | ||
32 | config ARCH_AT91SAM9G45 | 37 | config ARCH_AT91SAM9G45 |
33 | bool "AT91SAM9G45" | 38 | bool "AT91SAM9G45" |
34 | select SOC_AT91SAM9G45 | 39 | select SOC_AT91SAM9G45 |
40 | select AT91_USE_OLD_CLK | ||
35 | 41 | ||
36 | config ARCH_AT91X40 | 42 | config ARCH_AT91X40 |
37 | bool "AT91x40" | 43 | bool "AT91x40" |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 90aab2d5a07f..705b38a179ec 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -7,7 +7,7 @@ obj-m := | |||
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
9 | 9 | ||
10 | obj-$(CONFIG_AT91_PMC_UNIT) += clock.o | 10 | obj-$(CONFIG_OLD_CLK_AT91) += clock.o |
11 | obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o | 11 | obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o |
12 | obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o | 12 | obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o |
13 | obj-$(CONFIG_AT91_SAM9_TIME) += at91sam926x_time.o | 13 | obj-$(CONFIG_AT91_SAM9_TIME) += at91sam926x_time.o |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 25805f2f6010..e47f5fd232f5 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -12,13 +12,13 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/reboot.h> | 14 | #include <linux/reboot.h> |
15 | #include <linux/clk/at91_pmc.h> | ||
15 | 16 | ||
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
20 | #include <mach/at91rm9200.h> | 21 | #include <mach/at91rm9200.h> |
21 | #include <mach/at91_pmc.h> | ||
22 | #include <mach/at91_st.h> | 22 | #include <mach/at91_st.h> |
23 | #include <mach/cpu.h> | 23 | #include <mach/cpu.h> |
24 | 24 | ||
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index d6a1fa85371d..6c821e562159 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/clk/at91_pmc.h> | ||
14 | 15 | ||
15 | #include <asm/proc-fns.h> | 16 | #include <asm/proc-fns.h> |
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
@@ -20,7 +21,6 @@ | |||
20 | #include <mach/cpu.h> | 21 | #include <mach/cpu.h> |
21 | #include <mach/at91_dbgu.h> | 22 | #include <mach/at91_dbgu.h> |
22 | #include <mach/at91sam9260.h> | 23 | #include <mach/at91sam9260.h> |
23 | #include <mach/at91_pmc.h> | ||
24 | 24 | ||
25 | #include "at91_aic.h" | 25 | #include "at91_aic.h" |
26 | #include "at91_rstc.h" | 26 | #include "at91_rstc.h" |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 23ba1d8a1531..6276b4c1acfe 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/clk/at91_pmc.h> | ||
14 | 15 | ||
15 | #include <asm/proc-fns.h> | 16 | #include <asm/proc-fns.h> |
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
@@ -19,7 +20,6 @@ | |||
19 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
20 | #include <mach/cpu.h> | 21 | #include <mach/cpu.h> |
21 | #include <mach/at91sam9261.h> | 22 | #include <mach/at91sam9261.h> |
22 | #include <mach/at91_pmc.h> | ||
23 | 23 | ||
24 | #include "at91_aic.h" | 24 | #include "at91_aic.h" |
25 | #include "at91_rstc.h" | 25 | #include "at91_rstc.h" |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 7eccb0fc57bc..37b90f4b990c 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/clk/at91_pmc.h> | ||
14 | 15 | ||
15 | #include <asm/proc-fns.h> | 16 | #include <asm/proc-fns.h> |
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
@@ -18,7 +19,6 @@ | |||
18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
20 | #include <mach/at91sam9263.h> | 21 | #include <mach/at91sam9263.h> |
21 | #include <mach/at91_pmc.h> | ||
22 | 22 | ||
23 | #include "at91_aic.h" | 23 | #include "at91_aic.h" |
24 | #include "at91_rstc.h" | 24 | #include "at91_rstc.h" |
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index bb392320a0dd..0f04ffe9c5a8 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c | |||
@@ -39,6 +39,7 @@ | |||
39 | static u32 pit_cycle; /* write-once */ | 39 | static u32 pit_cycle; /* write-once */ |
40 | static u32 pit_cnt; /* access only w/system irq blocked */ | 40 | static u32 pit_cnt; /* access only w/system irq blocked */ |
41 | static void __iomem *pit_base_addr __read_mostly; | 41 | static void __iomem *pit_base_addr __read_mostly; |
42 | static struct clk *mck; | ||
42 | 43 | ||
43 | static inline unsigned int pit_read(unsigned int reg_offset) | 44 | static inline unsigned int pit_read(unsigned int reg_offset) |
44 | { | 45 | { |
@@ -195,10 +196,14 @@ static int __init of_at91sam926x_pit_init(void) | |||
195 | if (!pit_base_addr) | 196 | if (!pit_base_addr) |
196 | goto node_err; | 197 | goto node_err; |
197 | 198 | ||
199 | mck = of_clk_get(np, 0); | ||
200 | |||
198 | /* Get the interrupts property */ | 201 | /* Get the interrupts property */ |
199 | ret = irq_of_parse_and_map(np, 0); | 202 | ret = irq_of_parse_and_map(np, 0); |
200 | if (!ret) { | 203 | if (!ret) { |
201 | pr_crit("AT91: PIT: Unable to get IRQ from DT\n"); | 204 | pr_crit("AT91: PIT: Unable to get IRQ from DT\n"); |
205 | if (!IS_ERR(mck)) | ||
206 | clk_put(mck); | ||
202 | goto ioremap_err; | 207 | goto ioremap_err; |
203 | } | 208 | } |
204 | at91sam926x_pit_irq.irq = ret; | 209 | at91sam926x_pit_irq.irq = ret; |
@@ -230,6 +235,8 @@ void __init at91sam926x_pit_init(void) | |||
230 | unsigned bits; | 235 | unsigned bits; |
231 | int ret; | 236 | int ret; |
232 | 237 | ||
238 | mck = ERR_PTR(-ENOENT); | ||
239 | |||
233 | /* For device tree enabled device: initialize here */ | 240 | /* For device tree enabled device: initialize here */ |
234 | of_at91sam926x_pit_init(); | 241 | of_at91sam926x_pit_init(); |
235 | 242 | ||
@@ -237,7 +244,12 @@ void __init at91sam926x_pit_init(void) | |||
237 | * Use our actual MCK to figure out how many MCK/16 ticks per | 244 | * Use our actual MCK to figure out how many MCK/16 ticks per |
238 | * 1/HZ period (instead of a compile-time constant LATCH). | 245 | * 1/HZ period (instead of a compile-time constant LATCH). |
239 | */ | 246 | */ |
240 | pit_rate = clk_get_rate(clk_get(NULL, "mck")) / 16; | 247 | if (IS_ERR(mck)) |
248 | mck = clk_get(NULL, "mck"); | ||
249 | |||
250 | if (IS_ERR(mck)) | ||
251 | panic("AT91: PIT: Unable to get mck clk\n"); | ||
252 | pit_rate = clk_get_rate(mck) / 16; | ||
241 | pit_cycle = (pit_rate + HZ/2) / HZ; | 253 | pit_cycle = (pit_rate + HZ/2) / HZ; |
242 | WARN_ON(((pit_cycle - 1) & ~AT91_PIT_PIV) != 0); | 254 | WARN_ON(((pit_cycle - 1) & ~AT91_PIT_PIV) != 0); |
243 | 255 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 9405aa08b104..2f455ce35268 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -12,13 +12,13 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/clk/at91_pmc.h> | ||
15 | 16 | ||
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
19 | #include <asm/system_misc.h> | 20 | #include <asm/system_misc.h> |
20 | #include <mach/at91sam9g45.h> | 21 | #include <mach/at91sam9g45.h> |
21 | #include <mach/at91_pmc.h> | ||
22 | #include <mach/cpu.h> | 22 | #include <mach/cpu.h> |
23 | 23 | ||
24 | #include "at91_aic.h" | 24 | #include "at91_aic.h" |
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c index 388ec3aec4b9..4ef088c62eab 100644 --- a/arch/arm/mach-at91/at91sam9n12.c +++ b/arch/arm/mach-at91/at91sam9n12.c | |||
@@ -8,12 +8,12 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/dma-mapping.h> | 10 | #include <linux/dma-mapping.h> |
11 | #include <linux/clk/at91_pmc.h> | ||
11 | 12 | ||
12 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
13 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
14 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
15 | #include <mach/at91sam9n12.h> | 16 | #include <mach/at91sam9n12.h> |
16 | #include <mach/at91_pmc.h> | ||
17 | #include <mach/cpu.h> | 17 | #include <mach/cpu.h> |
18 | 18 | ||
19 | #include "board.h" | 19 | #include "board.h" |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 0750ffb7e6b1..3651517abedf 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/clk/at91_pmc.h> | ||
13 | 14 | ||
14 | #include <asm/proc-fns.h> | 15 | #include <asm/proc-fns.h> |
15 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
@@ -19,7 +20,6 @@ | |||
19 | #include <mach/cpu.h> | 20 | #include <mach/cpu.h> |
20 | #include <mach/at91_dbgu.h> | 21 | #include <mach/at91_dbgu.h> |
21 | #include <mach/at91sam9rl.h> | 22 | #include <mach/at91sam9rl.h> |
22 | #include <mach/at91_pmc.h> | ||
23 | 23 | ||
24 | #include "at91_aic.h" | 24 | #include "at91_aic.h" |
25 | #include "at91_rstc.h" | 25 | #include "at91_rstc.h" |
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index e8a2e075a1b8..3e8ec26e39dc 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c | |||
@@ -8,12 +8,12 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/dma-mapping.h> | 10 | #include <linux/dma-mapping.h> |
11 | #include <linux/clk/at91_pmc.h> | ||
11 | 12 | ||
12 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
13 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
14 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
15 | #include <mach/at91sam9x5.h> | 16 | #include <mach/at91sam9x5.h> |
16 | #include <mach/at91_pmc.h> | ||
17 | #include <mach/cpu.h> | 17 | #include <mach/cpu.h> |
18 | 18 | ||
19 | #include "board.h" | 19 | #include "board.h" |
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index bf00d15d954d..075ec0576ada 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/of_irq.h> | 16 | #include <linux/of_irq.h> |
17 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
18 | #include <linux/phy.h> | 18 | #include <linux/phy.h> |
19 | #include <linux/clk-provider.h> | ||
19 | 20 | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
@@ -26,6 +27,13 @@ | |||
26 | #include "at91_aic.h" | 27 | #include "at91_aic.h" |
27 | #include "generic.h" | 28 | #include "generic.h" |
28 | 29 | ||
30 | static void __init sama5_dt_timer_init(void) | ||
31 | { | ||
32 | #if defined(CONFIG_COMMON_CLK) | ||
33 | of_clk_init(NULL); | ||
34 | #endif | ||
35 | at91sam926x_pit_init(); | ||
36 | } | ||
29 | 37 | ||
30 | static const struct of_device_id irq_of_match[] __initconst = { | 38 | static const struct of_device_id irq_of_match[] __initconst = { |
31 | 39 | ||
@@ -72,7 +80,7 @@ static const char *sama5_dt_board_compat[] __initdata = { | |||
72 | 80 | ||
73 | DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") | 81 | DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") |
74 | /* Maintainer: Atmel */ | 82 | /* Maintainer: Atmel */ |
75 | .init_time = at91sam926x_pit_init, | 83 | .init_time = sama5_dt_timer_init, |
76 | .map_io = at91_map_io, | 84 | .map_io = at91_map_io, |
77 | .handle_irq = at91_aic5_handle_irq, | 85 | .handle_irq = at91_aic5_handle_irq, |
78 | .init_early = at91_dt_initialize, | 86 | .init_early = at91_dt_initialize, |
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 6b2630a92f71..72b257944733 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -24,9 +24,9 @@ | |||
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/of_address.h> | 26 | #include <linux/of_address.h> |
27 | #include <linux/clk/at91_pmc.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <mach/at91_pmc.h> | ||
30 | #include <mach/cpu.h> | 30 | #include <mach/cpu.h> |
31 | 31 | ||
32 | #include <asm/proc-fns.h> | 32 | #include <asm/proc-fns.h> |
@@ -884,6 +884,11 @@ static int __init at91_pmc_init(unsigned long main_clock) | |||
884 | #if defined(CONFIG_OF) | 884 | #if defined(CONFIG_OF) |
885 | static struct of_device_id pmc_ids[] = { | 885 | static struct of_device_id pmc_ids[] = { |
886 | { .compatible = "atmel,at91rm9200-pmc" }, | 886 | { .compatible = "atmel,at91rm9200-pmc" }, |
887 | { .compatible = "atmel,at91sam9260-pmc" }, | ||
888 | { .compatible = "atmel,at91sam9g45-pmc" }, | ||
889 | { .compatible = "atmel,at91sam9n12-pmc" }, | ||
890 | { .compatible = "atmel,at91sam9x5-pmc" }, | ||
891 | { .compatible = "atmel,sama5d3-pmc" }, | ||
887 | { /*sentinel*/ } | 892 | { /*sentinel*/ } |
888 | }; | 893 | }; |
889 | 894 | ||
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 26dee3ce9397..631fa3b8c16d 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -46,11 +46,12 @@ extern void at91sam926x_pit_init(void); | |||
46 | extern void at91x40_timer_init(void); | 46 | extern void at91x40_timer_init(void); |
47 | 47 | ||
48 | /* Clocks */ | 48 | /* Clocks */ |
49 | #ifdef CONFIG_AT91_PMC_UNIT | 49 | #ifdef CONFIG_OLD_CLK_AT91 |
50 | extern int __init at91_clock_init(unsigned long main_clock); | 50 | extern int __init at91_clock_init(unsigned long main_clock); |
51 | extern int __init at91_dt_clock_init(void); | 51 | extern int __init at91_dt_clock_init(void); |
52 | #else | 52 | #else |
53 | static int inline at91_clock_init(unsigned long main_clock) { return 0; } | 53 | static int inline at91_clock_init(unsigned long main_clock) { return 0; } |
54 | static int inline at91_dt_clock_init(void) { return 0; } | ||
54 | #endif | 55 | #endif |
55 | struct device; | 56 | struct device; |
56 | 57 | ||
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 9986542e8060..d43b79f56e94 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -19,13 +19,13 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/clk/at91_pmc.h> | ||
22 | 23 | ||
23 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
24 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
25 | #include <asm/mach/time.h> | 26 | #include <asm/mach/time.h> |
26 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
27 | 28 | ||
28 | #include <mach/at91_pmc.h> | ||
29 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
30 | 30 | ||
31 | #include "at91_aic.h" | 31 | #include "at91_aic.h" |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 098c28ddf025..20018779bae7 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -13,8 +13,8 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/clk/at91_pmc.h> | ||
16 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
17 | #include <mach/at91_pmc.h> | ||
18 | #include <mach/at91_ramc.h> | 18 | #include <mach/at91_ramc.h> |
19 | 19 | ||
20 | 20 | ||
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c index a28873fe3049..3d775d08de08 100644 --- a/arch/arm/mach-at91/sama5d3.c +++ b/arch/arm/mach-at91/sama5d3.c | |||
@@ -9,360 +9,19 @@ | |||
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-mapping.h> |
12 | #include <linux/clk/at91_pmc.h> | ||
12 | 13 | ||
13 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
16 | #include <mach/sama5d3.h> | 17 | #include <mach/sama5d3.h> |
17 | #include <mach/at91_pmc.h> | ||
18 | #include <mach/cpu.h> | 18 | #include <mach/cpu.h> |
19 | 19 | ||
20 | #include "soc.h" | 20 | #include "soc.h" |
21 | #include "generic.h" | 21 | #include "generic.h" |
22 | #include "clock.h" | ||
23 | #include "sam9_smc.h" | 22 | #include "sam9_smc.h" |
24 | 23 | ||
25 | /* -------------------------------------------------------------------- | 24 | /* -------------------------------------------------------------------- |
26 | * Clocks | ||
27 | * -------------------------------------------------------------------- */ | ||
28 | |||
29 | /* | ||
30 | * The peripheral clocks. | ||
31 | */ | ||
32 | |||
33 | static struct clk pioA_clk = { | ||
34 | .name = "pioA_clk", | ||
35 | .pid = SAMA5D3_ID_PIOA, | ||
36 | .type = CLK_TYPE_PERIPHERAL, | ||
37 | }; | ||
38 | static struct clk pioB_clk = { | ||
39 | .name = "pioB_clk", | ||
40 | .pid = SAMA5D3_ID_PIOB, | ||
41 | .type = CLK_TYPE_PERIPHERAL, | ||
42 | }; | ||
43 | static struct clk pioC_clk = { | ||
44 | .name = "pioC_clk", | ||
45 | .pid = SAMA5D3_ID_PIOC, | ||
46 | .type = CLK_TYPE_PERIPHERAL, | ||
47 | }; | ||
48 | static struct clk pioD_clk = { | ||
49 | .name = "pioD_clk", | ||
50 | .pid = SAMA5D3_ID_PIOD, | ||
51 | .type = CLK_TYPE_PERIPHERAL, | ||
52 | }; | ||
53 | static struct clk pioE_clk = { | ||
54 | .name = "pioE_clk", | ||
55 | .pid = SAMA5D3_ID_PIOE, | ||
56 | .type = CLK_TYPE_PERIPHERAL, | ||
57 | }; | ||
58 | static struct clk usart0_clk = { | ||
59 | .name = "usart0_clk", | ||
60 | .pid = SAMA5D3_ID_USART0, | ||
61 | .type = CLK_TYPE_PERIPHERAL, | ||
62 | .div = AT91_PMC_PCR_DIV2, | ||
63 | }; | ||
64 | static struct clk usart1_clk = { | ||
65 | .name = "usart1_clk", | ||
66 | .pid = SAMA5D3_ID_USART1, | ||
67 | .type = CLK_TYPE_PERIPHERAL, | ||
68 | .div = AT91_PMC_PCR_DIV2, | ||
69 | }; | ||
70 | static struct clk usart2_clk = { | ||
71 | .name = "usart2_clk", | ||
72 | .pid = SAMA5D3_ID_USART2, | ||
73 | .type = CLK_TYPE_PERIPHERAL, | ||
74 | .div = AT91_PMC_PCR_DIV2, | ||
75 | }; | ||
76 | static struct clk usart3_clk = { | ||
77 | .name = "usart3_clk", | ||
78 | .pid = SAMA5D3_ID_USART3, | ||
79 | .type = CLK_TYPE_PERIPHERAL, | ||
80 | .div = AT91_PMC_PCR_DIV2, | ||
81 | }; | ||
82 | static struct clk uart0_clk = { | ||
83 | .name = "uart0_clk", | ||
84 | .pid = SAMA5D3_ID_UART0, | ||
85 | .type = CLK_TYPE_PERIPHERAL, | ||
86 | .div = AT91_PMC_PCR_DIV2, | ||
87 | }; | ||
88 | static struct clk uart1_clk = { | ||
89 | .name = "uart1_clk", | ||
90 | .pid = SAMA5D3_ID_UART1, | ||
91 | .type = CLK_TYPE_PERIPHERAL, | ||
92 | .div = AT91_PMC_PCR_DIV2, | ||
93 | }; | ||
94 | static struct clk twi0_clk = { | ||
95 | .name = "twi0_clk", | ||
96 | .pid = SAMA5D3_ID_TWI0, | ||
97 | .type = CLK_TYPE_PERIPHERAL, | ||
98 | .div = AT91_PMC_PCR_DIV8, | ||
99 | }; | ||
100 | static struct clk twi1_clk = { | ||
101 | .name = "twi1_clk", | ||
102 | .pid = SAMA5D3_ID_TWI1, | ||
103 | .type = CLK_TYPE_PERIPHERAL, | ||
104 | .div = AT91_PMC_PCR_DIV8, | ||
105 | }; | ||
106 | static struct clk twi2_clk = { | ||
107 | .name = "twi2_clk", | ||
108 | .pid = SAMA5D3_ID_TWI2, | ||
109 | .type = CLK_TYPE_PERIPHERAL, | ||
110 | .div = AT91_PMC_PCR_DIV8, | ||
111 | }; | ||
112 | static struct clk mmc0_clk = { | ||
113 | .name = "mci0_clk", | ||
114 | .pid = SAMA5D3_ID_HSMCI0, | ||
115 | .type = CLK_TYPE_PERIPHERAL, | ||
116 | }; | ||
117 | static struct clk mmc1_clk = { | ||
118 | .name = "mci1_clk", | ||
119 | .pid = SAMA5D3_ID_HSMCI1, | ||
120 | .type = CLK_TYPE_PERIPHERAL, | ||
121 | }; | ||
122 | static struct clk mmc2_clk = { | ||
123 | .name = "mci2_clk", | ||
124 | .pid = SAMA5D3_ID_HSMCI2, | ||
125 | .type = CLK_TYPE_PERIPHERAL, | ||
126 | }; | ||
127 | static struct clk spi0_clk = { | ||
128 | .name = "spi0_clk", | ||
129 | .pid = SAMA5D3_ID_SPI0, | ||
130 | .type = CLK_TYPE_PERIPHERAL, | ||
131 | }; | ||
132 | static struct clk spi1_clk = { | ||
133 | .name = "spi1_clk", | ||
134 | .pid = SAMA5D3_ID_SPI1, | ||
135 | .type = CLK_TYPE_PERIPHERAL, | ||
136 | }; | ||
137 | static struct clk tcb0_clk = { | ||
138 | .name = "tcb0_clk", | ||
139 | .pid = SAMA5D3_ID_TC0, | ||
140 | .type = CLK_TYPE_PERIPHERAL, | ||
141 | .div = AT91_PMC_PCR_DIV2, | ||
142 | }; | ||
143 | static struct clk tcb1_clk = { | ||
144 | .name = "tcb1_clk", | ||
145 | .pid = SAMA5D3_ID_TC1, | ||
146 | .type = CLK_TYPE_PERIPHERAL, | ||
147 | .div = AT91_PMC_PCR_DIV2, | ||
148 | }; | ||
149 | static struct clk adc_clk = { | ||
150 | .name = "adc_clk", | ||
151 | .pid = SAMA5D3_ID_ADC, | ||
152 | .type = CLK_TYPE_PERIPHERAL, | ||
153 | .div = AT91_PMC_PCR_DIV2, | ||
154 | }; | ||
155 | static struct clk adc_op_clk = { | ||
156 | .name = "adc_op_clk", | ||
157 | .type = CLK_TYPE_PERIPHERAL, | ||
158 | .rate_hz = 5000000, | ||
159 | }; | ||
160 | static struct clk dma0_clk = { | ||
161 | .name = "dma0_clk", | ||
162 | .pid = SAMA5D3_ID_DMA0, | ||
163 | .type = CLK_TYPE_PERIPHERAL, | ||
164 | }; | ||
165 | static struct clk dma1_clk = { | ||
166 | .name = "dma1_clk", | ||
167 | .pid = SAMA5D3_ID_DMA1, | ||
168 | .type = CLK_TYPE_PERIPHERAL, | ||
169 | }; | ||
170 | static struct clk uhphs_clk = { | ||
171 | .name = "uhphs", | ||
172 | .pid = SAMA5D3_ID_UHPHS, | ||
173 | .type = CLK_TYPE_PERIPHERAL, | ||
174 | }; | ||
175 | static struct clk udphs_clk = { | ||
176 | .name = "udphs_clk", | ||
177 | .pid = SAMA5D3_ID_UDPHS, | ||
178 | .type = CLK_TYPE_PERIPHERAL, | ||
179 | }; | ||
180 | /* gmac only for sama5d33, sama5d34, sama5d35 */ | ||
181 | static struct clk macb0_clk = { | ||
182 | .name = "macb0_clk", | ||
183 | .pid = SAMA5D3_ID_GMAC, | ||
184 | .type = CLK_TYPE_PERIPHERAL, | ||
185 | }; | ||
186 | /* emac only for sama5d31, sama5d35 */ | ||
187 | static struct clk macb1_clk = { | ||
188 | .name = "macb1_clk", | ||
189 | .pid = SAMA5D3_ID_EMAC, | ||
190 | .type = CLK_TYPE_PERIPHERAL, | ||
191 | }; | ||
192 | /* lcd only for sama5d31, sama5d33, sama5d34 */ | ||
193 | static struct clk lcdc_clk = { | ||
194 | .name = "lcdc_clk", | ||
195 | .pid = SAMA5D3_ID_LCDC, | ||
196 | .type = CLK_TYPE_PERIPHERAL, | ||
197 | }; | ||
198 | /* isi only for sama5d33, sama5d35 */ | ||
199 | static struct clk isi_clk = { | ||
200 | .name = "isi_clk", | ||
201 | .pid = SAMA5D3_ID_ISI, | ||
202 | .type = CLK_TYPE_PERIPHERAL, | ||
203 | }; | ||
204 | static struct clk can0_clk = { | ||
205 | .name = "can0_clk", | ||
206 | .pid = SAMA5D3_ID_CAN0, | ||
207 | .type = CLK_TYPE_PERIPHERAL, | ||
208 | .div = AT91_PMC_PCR_DIV2, | ||
209 | }; | ||
210 | static struct clk can1_clk = { | ||
211 | .name = "can1_clk", | ||
212 | .pid = SAMA5D3_ID_CAN1, | ||
213 | .type = CLK_TYPE_PERIPHERAL, | ||
214 | .div = AT91_PMC_PCR_DIV2, | ||
215 | }; | ||
216 | static struct clk ssc0_clk = { | ||
217 | .name = "ssc0_clk", | ||
218 | .pid = SAMA5D3_ID_SSC0, | ||
219 | .type = CLK_TYPE_PERIPHERAL, | ||
220 | .div = AT91_PMC_PCR_DIV2, | ||
221 | }; | ||
222 | static struct clk ssc1_clk = { | ||
223 | .name = "ssc1_clk", | ||
224 | .pid = SAMA5D3_ID_SSC1, | ||
225 | .type = CLK_TYPE_PERIPHERAL, | ||
226 | .div = AT91_PMC_PCR_DIV2, | ||
227 | }; | ||
228 | static struct clk sha_clk = { | ||
229 | .name = "sha_clk", | ||
230 | .pid = SAMA5D3_ID_SHA, | ||
231 | .type = CLK_TYPE_PERIPHERAL, | ||
232 | .div = AT91_PMC_PCR_DIV8, | ||
233 | }; | ||
234 | static struct clk aes_clk = { | ||
235 | .name = "aes_clk", | ||
236 | .pid = SAMA5D3_ID_AES, | ||
237 | .type = CLK_TYPE_PERIPHERAL, | ||
238 | }; | ||
239 | static struct clk tdes_clk = { | ||
240 | .name = "tdes_clk", | ||
241 | .pid = SAMA5D3_ID_TDES, | ||
242 | .type = CLK_TYPE_PERIPHERAL, | ||
243 | }; | ||
244 | |||
245 | static struct clk *periph_clocks[] __initdata = { | ||
246 | &pioA_clk, | ||
247 | &pioB_clk, | ||
248 | &pioC_clk, | ||
249 | &pioD_clk, | ||
250 | &pioE_clk, | ||
251 | &usart0_clk, | ||
252 | &usart1_clk, | ||
253 | &usart2_clk, | ||
254 | &usart3_clk, | ||
255 | &uart0_clk, | ||
256 | &uart1_clk, | ||
257 | &twi0_clk, | ||
258 | &twi1_clk, | ||
259 | &twi2_clk, | ||
260 | &mmc0_clk, | ||
261 | &mmc1_clk, | ||
262 | &mmc2_clk, | ||
263 | &spi0_clk, | ||
264 | &spi1_clk, | ||
265 | &tcb0_clk, | ||
266 | &tcb1_clk, | ||
267 | &adc_clk, | ||
268 | &adc_op_clk, | ||
269 | &dma0_clk, | ||
270 | &dma1_clk, | ||
271 | &uhphs_clk, | ||
272 | &udphs_clk, | ||
273 | &macb0_clk, | ||
274 | &macb1_clk, | ||
275 | &lcdc_clk, | ||
276 | &isi_clk, | ||
277 | &can0_clk, | ||
278 | &can1_clk, | ||
279 | &ssc0_clk, | ||
280 | &ssc1_clk, | ||
281 | &sha_clk, | ||
282 | &aes_clk, | ||
283 | &tdes_clk, | ||
284 | }; | ||
285 | |||
286 | static struct clk pck0 = { | ||
287 | .name = "pck0", | ||
288 | .pmc_mask = AT91_PMC_PCK0, | ||
289 | .type = CLK_TYPE_PROGRAMMABLE, | ||
290 | .id = 0, | ||
291 | }; | ||
292 | |||
293 | static struct clk pck1 = { | ||
294 | .name = "pck1", | ||
295 | .pmc_mask = AT91_PMC_PCK1, | ||
296 | .type = CLK_TYPE_PROGRAMMABLE, | ||
297 | .id = 1, | ||
298 | }; | ||
299 | |||
300 | static struct clk pck2 = { | ||
301 | .name = "pck2", | ||
302 | .pmc_mask = AT91_PMC_PCK2, | ||
303 | .type = CLK_TYPE_PROGRAMMABLE, | ||
304 | .id = 2, | ||
305 | }; | ||
306 | |||
307 | static struct clk_lookup periph_clocks_lookups[] = { | ||
308 | /* lookup table for DT entries */ | ||
309 | CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck), | ||
310 | CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk), | ||
311 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk), | ||
312 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioC_clk), | ||
313 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioD_clk), | ||
314 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioE_clk), | ||
315 | CLKDEV_CON_DEV_ID("usart", "f001c000.serial", &usart0_clk), | ||
316 | CLKDEV_CON_DEV_ID("usart", "f0020000.serial", &usart1_clk), | ||
317 | CLKDEV_CON_DEV_ID("usart", "f8020000.serial", &usart2_clk), | ||
318 | CLKDEV_CON_DEV_ID("usart", "f8024000.serial", &usart3_clk), | ||
319 | CLKDEV_CON_DEV_ID(NULL, "f0014000.i2c", &twi0_clk), | ||
320 | CLKDEV_CON_DEV_ID(NULL, "f0018000.i2c", &twi1_clk), | ||
321 | CLKDEV_CON_DEV_ID(NULL, "f801c000.i2c", &twi2_clk), | ||
322 | CLKDEV_CON_DEV_ID("mci_clk", "f0000000.mmc", &mmc0_clk), | ||
323 | CLKDEV_CON_DEV_ID("mci_clk", "f8000000.mmc", &mmc1_clk), | ||
324 | CLKDEV_CON_DEV_ID("mci_clk", "f8004000.mmc", &mmc2_clk), | ||
325 | CLKDEV_CON_DEV_ID("spi_clk", "f0004000.spi", &spi0_clk), | ||
326 | CLKDEV_CON_DEV_ID("spi_clk", "f8008000.spi", &spi1_clk), | ||
327 | CLKDEV_CON_DEV_ID("t0_clk", "f0010000.timer", &tcb0_clk), | ||
328 | CLKDEV_CON_DEV_ID("t0_clk", "f8014000.timer", &tcb1_clk), | ||
329 | CLKDEV_CON_DEV_ID("tsc_clk", "f8018000.tsadcc", &adc_clk), | ||
330 | CLKDEV_CON_DEV_ID("dma_clk", "ffffe600.dma-controller", &dma0_clk), | ||
331 | CLKDEV_CON_DEV_ID("dma_clk", "ffffe800.dma-controller", &dma1_clk), | ||
332 | CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk), | ||
333 | CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk), | ||
334 | CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk), | ||
335 | CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk), | ||
336 | CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk), | ||
337 | CLKDEV_CON_DEV_ID("hclk", "f0028000.ethernet", &macb0_clk), | ||
338 | CLKDEV_CON_DEV_ID("pclk", "f0028000.ethernet", &macb0_clk), | ||
339 | CLKDEV_CON_DEV_ID("hclk", "f802c000.ethernet", &macb1_clk), | ||
340 | CLKDEV_CON_DEV_ID("pclk", "f802c000.ethernet", &macb1_clk), | ||
341 | CLKDEV_CON_DEV_ID("pclk", "f0008000.ssc", &ssc0_clk), | ||
342 | CLKDEV_CON_DEV_ID("pclk", "f000c000.ssc", &ssc1_clk), | ||
343 | CLKDEV_CON_DEV_ID("can_clk", "f000c000.can", &can0_clk), | ||
344 | CLKDEV_CON_DEV_ID("can_clk", "f8010000.can", &can1_clk), | ||
345 | CLKDEV_CON_DEV_ID("sha_clk", "f8034000.sha", &sha_clk), | ||
346 | CLKDEV_CON_DEV_ID("aes_clk", "f8038000.aes", &aes_clk), | ||
347 | CLKDEV_CON_DEV_ID("tdes_clk", "f803c000.tdes", &tdes_clk), | ||
348 | }; | ||
349 | |||
350 | static void __init sama5d3_register_clocks(void) | ||
351 | { | ||
352 | int i; | ||
353 | |||
354 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | ||
355 | clk_register(periph_clocks[i]); | ||
356 | |||
357 | clkdev_add_table(periph_clocks_lookups, | ||
358 | ARRAY_SIZE(periph_clocks_lookups)); | ||
359 | |||
360 | clk_register(&pck0); | ||
361 | clk_register(&pck1); | ||
362 | clk_register(&pck2); | ||
363 | } | ||
364 | |||
365 | /* -------------------------------------------------------------------- | ||
366 | * AT91SAM9x5 processor initialization | 25 | * AT91SAM9x5 processor initialization |
367 | * -------------------------------------------------------------------- */ | 26 | * -------------------------------------------------------------------- */ |
368 | 27 | ||
@@ -378,6 +37,5 @@ static void __init sama5d3_initialize(void) | |||
378 | 37 | ||
379 | AT91_SOC_START(sama5d3) | 38 | AT91_SOC_START(sama5d3) |
380 | .map_io = sama5d3_map_io, | 39 | .map_io = sama5d3_map_io, |
381 | .register_clocks = sama5d3_register_clocks, | ||
382 | .init = sama5d3_initialize, | 40 | .init = sama5d3_initialize, |
383 | AT91_SOC_END | 41 | AT91_SOC_END |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 094b3459c288..7d3f7cc61081 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | #include <linux/of_address.h> | 12 | #include <linux/of_address.h> |
13 | #include <linux/pinctrl/machine.h> | 13 | #include <linux/pinctrl/machine.h> |
14 | #include <linux/clk/at91_pmc.h> | ||
14 | 15 | ||
15 | #include <asm/system_misc.h> | 16 | #include <asm/system_misc.h> |
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
@@ -18,7 +19,6 @@ | |||
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
19 | #include <mach/cpu.h> | 20 | #include <mach/cpu.h> |
20 | #include <mach/at91_dbgu.h> | 21 | #include <mach/at91_dbgu.h> |
21 | #include <mach/at91_pmc.h> | ||
22 | 22 | ||
23 | #include "at91_shdwc.h" | 23 | #include "at91_shdwc.h" |
24 | #include "soc.h" | 24 | #include "soc.h" |
@@ -491,7 +491,8 @@ void __init at91rm9200_dt_initialize(void) | |||
491 | at91_dt_clock_init(); | 491 | at91_dt_clock_init(); |
492 | 492 | ||
493 | /* Register the processor-specific clocks */ | 493 | /* Register the processor-specific clocks */ |
494 | at91_boot_soc.register_clocks(); | 494 | if (at91_boot_soc.register_clocks) |
495 | at91_boot_soc.register_clocks(); | ||
495 | 496 | ||
496 | at91_boot_soc.init(); | 497 | at91_boot_soc.init(); |
497 | } | 498 | } |
@@ -506,7 +507,8 @@ void __init at91_dt_initialize(void) | |||
506 | at91_dt_clock_init(); | 507 | at91_dt_clock_init(); |
507 | 508 | ||
508 | /* Register the processor-specific clocks */ | 509 | /* Register the processor-specific clocks */ |
509 | at91_boot_soc.register_clocks(); | 510 | if (at91_boot_soc.register_clocks) |
511 | at91_boot_soc.register_clocks(); | ||
510 | 512 | ||
511 | if (at91_boot_soc.init) | 513 | if (at91_boot_soc.init) |
512 | at91_boot_soc.init(); | 514 | at91_boot_soc.init(); |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index c122bcff9f7c..0d1a89298ece 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -162,7 +162,7 @@ void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
162 | /***************************************************************************** | 162 | /***************************************************************************** |
163 | * SoC RTC | 163 | * SoC RTC |
164 | ****************************************************************************/ | 164 | ****************************************************************************/ |
165 | void __init dove_rtc_init(void) | 165 | static void __init dove_rtc_init(void) |
166 | { | 166 | { |
167 | orion_rtc_init(DOVE_RTC_PHYS_BASE, IRQ_DOVE_RTC); | 167 | orion_rtc_init(DOVE_RTC_PHYS_BASE, IRQ_DOVE_RTC); |
168 | } | 168 | } |
@@ -257,18 +257,9 @@ void __init dove_timer_init(void) | |||
257 | } | 257 | } |
258 | 258 | ||
259 | /***************************************************************************** | 259 | /***************************************************************************** |
260 | * Cryptographic Engines and Security Accelerator (CESA) | ||
261 | ****************************************************************************/ | ||
262 | void __init dove_crypto_init(void) | ||
263 | { | ||
264 | orion_crypto_init(DOVE_CRYPT_PHYS_BASE, DOVE_CESA_PHYS_BASE, | ||
265 | DOVE_CESA_SIZE, IRQ_DOVE_CRYPTO); | ||
266 | } | ||
267 | |||
268 | /***************************************************************************** | ||
269 | * XOR 0 | 260 | * XOR 0 |
270 | ****************************************************************************/ | 261 | ****************************************************************************/ |
271 | void __init dove_xor0_init(void) | 262 | static void __init dove_xor0_init(void) |
272 | { | 263 | { |
273 | orion_xor0_init(DOVE_XOR0_PHYS_BASE, DOVE_XOR0_HIGH_PHYS_BASE, | 264 | orion_xor0_init(DOVE_XOR0_PHYS_BASE, DOVE_XOR0_HIGH_PHYS_BASE, |
274 | IRQ_DOVE_XOR_00, IRQ_DOVE_XOR_01); | 265 | IRQ_DOVE_XOR_00, IRQ_DOVE_XOR_01); |
@@ -277,7 +268,7 @@ void __init dove_xor0_init(void) | |||
277 | /***************************************************************************** | 268 | /***************************************************************************** |
278 | * XOR 1 | 269 | * XOR 1 |
279 | ****************************************************************************/ | 270 | ****************************************************************************/ |
280 | void __init dove_xor1_init(void) | 271 | static void __init dove_xor1_init(void) |
281 | { | 272 | { |
282 | orion_xor1_init(DOVE_XOR1_PHYS_BASE, DOVE_XOR1_HIGH_PHYS_BASE, | 273 | orion_xor1_init(DOVE_XOR1_PHYS_BASE, DOVE_XOR1_HIGH_PHYS_BASE, |
283 | IRQ_DOVE_XOR_10, IRQ_DOVE_XOR_11); | 274 | IRQ_DOVE_XOR_10, IRQ_DOVE_XOR_11); |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index d50dc2dbfd89..cc1d3fe21c4e 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -63,6 +63,9 @@ | |||
63 | 63 | ||
64 | /* Base address to the AP system controller */ | 64 | /* Base address to the AP system controller */ |
65 | void __iomem *ap_syscon_base; | 65 | void __iomem *ap_syscon_base; |
66 | /* Base address to the external bus interface */ | ||
67 | static void __iomem *ebi_base; | ||
68 | |||
66 | 69 | ||
67 | /* | 70 | /* |
68 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx | 71 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx |
@@ -72,15 +75,11 @@ void __iomem *ap_syscon_base; | |||
72 | * just for now). | 75 | * just for now). |
73 | */ | 76 | */ |
74 | #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) | 77 | #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) |
75 | #define VA_EBI_BASE __io_address(INTEGRATOR_EBI_BASE) | ||
76 | #define VA_CMIC_BASE __io_address(INTEGRATOR_HDR_IC) | ||
77 | 78 | ||
78 | /* | 79 | /* |
79 | * Logical Physical | 80 | * Logical Physical |
80 | * ef000000 Cache flush | 81 | * ef000000 Cache flush |
81 | * f1000000 10000000 Core module registers | ||
82 | * f1100000 11000000 System controller registers | 82 | * f1100000 11000000 System controller registers |
83 | * f1200000 12000000 EBI registers | ||
84 | * f1300000 13000000 Counter/Timer | 83 | * f1300000 13000000 Counter/Timer |
85 | * f1400000 14000000 Interrupt controller | 84 | * f1400000 14000000 Interrupt controller |
86 | * f1600000 16000000 UART 0 | 85 | * f1600000 16000000 UART 0 |
@@ -91,16 +90,6 @@ void __iomem *ap_syscon_base; | |||
91 | 90 | ||
92 | static struct map_desc ap_io_desc[] __initdata __maybe_unused = { | 91 | static struct map_desc ap_io_desc[] __initdata __maybe_unused = { |
93 | { | 92 | { |
94 | .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), | ||
95 | .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), | ||
96 | .length = SZ_4K, | ||
97 | .type = MT_DEVICE | ||
98 | }, { | ||
99 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | ||
100 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | ||
101 | .length = SZ_4K, | ||
102 | .type = MT_DEVICE | ||
103 | }, { | ||
104 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), | 93 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), |
105 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), | 94 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), |
106 | .length = SZ_4K, | 95 | .length = SZ_4K, |
@@ -174,9 +163,6 @@ device_initcall(irq_syscore_init); | |||
174 | /* | 163 | /* |
175 | * Flash handling. | 164 | * Flash handling. |
176 | */ | 165 | */ |
177 | #define EBI_CSR1 (VA_EBI_BASE + INTEGRATOR_EBI_CSR1_OFFSET) | ||
178 | #define EBI_LOCK (VA_EBI_BASE + INTEGRATOR_EBI_LOCK_OFFSET) | ||
179 | |||
180 | static int ap_flash_init(struct platform_device *dev) | 166 | static int ap_flash_init(struct platform_device *dev) |
181 | { | 167 | { |
182 | u32 tmp; | 168 | u32 tmp; |
@@ -184,13 +170,15 @@ static int ap_flash_init(struct platform_device *dev) | |||
184 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, | 170 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, |
185 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | 171 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); |
186 | 172 | ||
187 | tmp = readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE; | 173 | tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) | |
188 | writel(tmp, EBI_CSR1); | 174 | INTEGRATOR_EBI_WRITE_ENABLE; |
175 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); | ||
189 | 176 | ||
190 | if (!(readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE)) { | 177 | if (!(readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) |
191 | writel(0xa05f, EBI_LOCK); | 178 | & INTEGRATOR_EBI_WRITE_ENABLE)) { |
192 | writel(tmp, EBI_CSR1); | 179 | writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); |
193 | writel(0, EBI_LOCK); | 180 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); |
181 | writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); | ||
194 | } | 182 | } |
195 | return 0; | 183 | return 0; |
196 | } | 184 | } |
@@ -202,13 +190,15 @@ static void ap_flash_exit(struct platform_device *dev) | |||
202 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, | 190 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, |
203 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | 191 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); |
204 | 192 | ||
205 | tmp = readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE; | 193 | tmp = readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) & |
206 | writel(tmp, EBI_CSR1); | 194 | ~INTEGRATOR_EBI_WRITE_ENABLE; |
195 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); | ||
207 | 196 | ||
208 | if (readl(EBI_CSR1) & INTEGRATOR_EBI_WRITE_ENABLE) { | 197 | if (readl(ebi_base + INTEGRATOR_EBI_CSR1_OFFSET) & |
209 | writel(0xa05f, EBI_LOCK); | 198 | INTEGRATOR_EBI_WRITE_ENABLE) { |
210 | writel(tmp, EBI_CSR1); | 199 | writel(0xa05f, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); |
211 | writel(0, EBI_LOCK); | 200 | writel(tmp, ebi_base + INTEGRATOR_EBI_CSR1_OFFSET); |
201 | writel(0, ebi_base + INTEGRATOR_EBI_LOCK_OFFSET); | ||
212 | } | 202 | } |
213 | } | 203 | } |
214 | 204 | ||
@@ -475,11 +465,17 @@ static const struct of_device_id ap_syscon_match[] = { | |||
475 | { }, | 465 | { }, |
476 | }; | 466 | }; |
477 | 467 | ||
468 | static const struct of_device_id ebi_match[] = { | ||
469 | { .compatible = "arm,external-bus-interface"}, | ||
470 | { }, | ||
471 | }; | ||
472 | |||
478 | static void __init ap_init_of(void) | 473 | static void __init ap_init_of(void) |
479 | { | 474 | { |
480 | unsigned long sc_dec; | 475 | unsigned long sc_dec; |
481 | struct device_node *root; | 476 | struct device_node *root; |
482 | struct device_node *syscon; | 477 | struct device_node *syscon; |
478 | struct device_node *ebi; | ||
483 | struct device *parent; | 479 | struct device *parent; |
484 | struct soc_device *soc_dev; | 480 | struct soc_device *soc_dev; |
485 | struct soc_device_attribute *soc_dev_attr; | 481 | struct soc_device_attribute *soc_dev_attr; |
@@ -495,10 +491,16 @@ static void __init ap_init_of(void) | |||
495 | syscon = of_find_matching_node(root, ap_syscon_match); | 491 | syscon = of_find_matching_node(root, ap_syscon_match); |
496 | if (!syscon) | 492 | if (!syscon) |
497 | return; | 493 | return; |
494 | ebi = of_find_matching_node(root, ebi_match); | ||
495 | if (!ebi) | ||
496 | return; | ||
498 | 497 | ||
499 | ap_syscon_base = of_iomap(syscon, 0); | 498 | ap_syscon_base = of_iomap(syscon, 0); |
500 | if (!ap_syscon_base) | 499 | if (!ap_syscon_base) |
501 | return; | 500 | return; |
501 | ebi_base = of_iomap(ebi, 0); | ||
502 | if (!ebi_base) | ||
503 | return; | ||
502 | 504 | ||
503 | ap_sc_id = readl(ap_syscon_base); | 505 | ap_sc_id = readl(ap_syscon_base); |
504 | 506 | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 4fc0a195de01..5e84149d1790 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -64,9 +64,6 @@ static void __iomem *intcp_con_base; | |||
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Logical Physical | 66 | * Logical Physical |
67 | * f1000000 10000000 Core module registers | ||
68 | * f1100000 11000000 System controller registers | ||
69 | * f1200000 12000000 EBI registers | ||
70 | * f1300000 13000000 Counter/Timer | 67 | * f1300000 13000000 Counter/Timer |
71 | * f1400000 14000000 Interrupt controller | 68 | * f1400000 14000000 Interrupt controller |
72 | * f1600000 16000000 UART 0 | 69 | * f1600000 16000000 UART 0 |
@@ -74,21 +71,10 @@ static void __iomem *intcp_con_base; | |||
74 | * f1a00000 1a000000 Debug LEDs | 71 | * f1a00000 1a000000 Debug LEDs |
75 | * fc900000 c9000000 GPIO | 72 | * fc900000 c9000000 GPIO |
76 | * fca00000 ca000000 SIC | 73 | * fca00000 ca000000 SIC |
77 | * fcb00000 cb000000 CP system control | ||
78 | */ | 74 | */ |
79 | 75 | ||
80 | static struct map_desc intcp_io_desc[] __initdata __maybe_unused = { | 76 | static struct map_desc intcp_io_desc[] __initdata __maybe_unused = { |
81 | { | 77 | { |
82 | .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), | ||
83 | .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), | ||
84 | .length = SZ_4K, | ||
85 | .type = MT_DEVICE | ||
86 | }, { | ||
87 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | ||
88 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | ||
89 | .length = SZ_4K, | ||
90 | .type = MT_DEVICE | ||
91 | }, { | ||
92 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), | 78 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), |
93 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), | 79 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), |
94 | .length = SZ_4K, | 80 | .length = SZ_4K, |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 9caa4fe95913..78188159484d 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -10,55 +10,21 @@ | |||
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/clk.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/of.h> | 16 | #include <linux/of.h> |
16 | #include <linux/of_address.h> | 17 | #include <linux/of_address.h> |
17 | #include <linux/of_net.h> | 18 | #include <linux/of_net.h> |
18 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
19 | #include <linux/clk-provider.h> | ||
20 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
21 | #include <linux/irqchip.h> | 21 | #include <linux/irqchip.h> |
22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/map.h> | ||
25 | #include <mach/bridge-regs.h> | 24 | #include <mach/bridge-regs.h> |
26 | #include <linux/platform_data/usb-ehci-orion.h> | ||
27 | #include <plat/irq.h> | ||
28 | #include <plat/common.h> | 25 | #include <plat/common.h> |
29 | #include "common.h" | 26 | #include "common.h" |
30 | 27 | ||
31 | /* | ||
32 | * There are still devices that doesn't know about DT yet. Get clock | ||
33 | * gates here and add a clock lookup alias, so that old platform | ||
34 | * devices still work. | ||
35 | */ | ||
36 | |||
37 | static void __init kirkwood_legacy_clk_init(void) | ||
38 | { | ||
39 | |||
40 | struct device_node *np = of_find_compatible_node( | ||
41 | NULL, NULL, "marvell,kirkwood-gating-clock"); | ||
42 | struct of_phandle_args clkspec; | ||
43 | struct clk *clk; | ||
44 | |||
45 | clkspec.np = np; | ||
46 | clkspec.args_count = 1; | ||
47 | |||
48 | /* | ||
49 | * The ethernet interfaces forget the MAC address assigned by | ||
50 | * u-boot if the clocks are turned off. Until proper DT support | ||
51 | * is available we always enable them for now. | ||
52 | */ | ||
53 | clkspec.args[0] = CGC_BIT_GE0; | ||
54 | clk = of_clk_get_from_provider(&clkspec); | ||
55 | clk_prepare_enable(clk); | ||
56 | |||
57 | clkspec.args[0] = CGC_BIT_GE1; | ||
58 | clk = of_clk_get_from_provider(&clkspec); | ||
59 | clk_prepare_enable(clk); | ||
60 | } | ||
61 | |||
62 | #define MV643XX_ETH_MAC_ADDR_LOW 0x0414 | 28 | #define MV643XX_ETH_MAC_ADDR_LOW 0x0414 |
63 | #define MV643XX_ETH_MAC_ADDR_HIGH 0x0418 | 29 | #define MV643XX_ETH_MAC_ADDR_HIGH 0x0418 |
64 | 30 | ||
@@ -140,7 +106,7 @@ eth_fixup_skip: | |||
140 | 106 | ||
141 | static void __init kirkwood_dt_init(void) | 107 | static void __init kirkwood_dt_init(void) |
142 | { | 108 | { |
143 | pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk); | 109 | pr_info("Kirkwood: %s.\n", kirkwood_id()); |
144 | 110 | ||
145 | /* | 111 | /* |
146 | * Disable propagation of mbus errors to the CPU local bus, | 112 | * Disable propagation of mbus errors to the CPU local bus, |
@@ -156,8 +122,6 @@ static void __init kirkwood_dt_init(void) | |||
156 | 122 | ||
157 | kirkwood_cpufreq_init(); | 123 | kirkwood_cpufreq_init(); |
158 | kirkwood_cpuidle_init(); | 124 | kirkwood_cpuidle_init(); |
159 | /* Setup clocks for legacy devices */ | ||
160 | kirkwood_legacy_clk_init(); | ||
161 | 125 | ||
162 | kirkwood_pm_init(); | 126 | kirkwood_pm_init(); |
163 | kirkwood_dt_eth_fixup(); | 127 | kirkwood_dt_eth_fixup(); |
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 58adf2fd9cfc..4e9d58148ca7 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/smp_plat.h> | 27 | #include <asm/smp_plat.h> |
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include "armada-370-xp.h" | 29 | #include "armada-370-xp.h" |
30 | #include "coherency.h" | ||
30 | 31 | ||
31 | unsigned long coherency_phys_base; | 32 | unsigned long coherency_phys_base; |
32 | static void __iomem *coherency_base; | 33 | static void __iomem *coherency_base; |
diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h index df33ad8a6c08..760226c41353 100644 --- a/arch/arm/mach-mvebu/coherency.h +++ b/arch/arm/mach-mvebu/coherency.h | |||
@@ -14,7 +14,9 @@ | |||
14 | #ifndef __MACH_370_XP_COHERENCY_H | 14 | #ifndef __MACH_370_XP_COHERENCY_H |
15 | #define __MACH_370_XP_COHERENCY_H | 15 | #define __MACH_370_XP_COHERENCY_H |
16 | 16 | ||
17 | int set_cpu_coherent(int cpu_id, int smp_group_id); | 17 | extern unsigned long coherency_phys_base; |
18 | |||
19 | int set_cpu_coherent(unsigned int cpu_id, int smp_group_id); | ||
18 | int coherency_init(void); | 20 | int coherency_init(void); |
19 | 21 | ||
20 | #endif /* __MACH_370_XP_COHERENCY_H */ | 22 | #endif /* __MACH_370_XP_COHERENCY_H */ |
diff --git a/arch/arm/mach-mvebu/common.h b/arch/arm/mach-mvebu/common.h index e366010e1d91..0e6016fadcc5 100644 --- a/arch/arm/mach-mvebu/common.h +++ b/arch/arm/mach-mvebu/common.h | |||
@@ -26,7 +26,6 @@ void armada_370_xp_handle_irq(struct pt_regs *regs); | |||
26 | 26 | ||
27 | void armada_xp_cpu_die(unsigned int cpu); | 27 | void armada_xp_cpu_die(unsigned int cpu); |
28 | int armada_370_xp_coherency_init(void); | 28 | int armada_370_xp_coherency_init(void); |
29 | int armada_370_xp_pmsu_init(void); | ||
30 | void armada_xp_secondary_startup(void); | 29 | void armada_xp_secondary_startup(void); |
31 | extern struct smp_operations armada_xp_smp_ops; | 30 | extern struct smp_operations armada_xp_smp_ops; |
32 | #endif | 31 | #endif |
diff --git a/arch/arm/mach-mvebu/hotplug.c b/arch/arm/mach-mvebu/hotplug.c index b228b6a80c85..d95e91047168 100644 --- a/arch/arm/mach-mvebu/hotplug.c +++ b/arch/arm/mach-mvebu/hotplug.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
18 | #include "common.h" | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * platform-specific code to shutdown a CPU | 21 | * platform-specific code to shutdown a CPU |
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index ff69c2df298b..a6da03f5b24e 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -46,7 +46,7 @@ static struct clk *__init get_cpu_clk(int cpu) | |||
46 | return cpu_clk; | 46 | return cpu_clk; |
47 | } | 47 | } |
48 | 48 | ||
49 | void __init set_secondary_cpus_clock(void) | 49 | static void __init set_secondary_cpus_clock(void) |
50 | { | 50 | { |
51 | int thiscpu, cpu; | 51 | int thiscpu, cpu; |
52 | unsigned long rate; | 52 | unsigned long rate; |
@@ -94,7 +94,7 @@ static void __init armada_xp_smp_init_cpus(void) | |||
94 | set_smp_cross_call(armada_mpic_send_doorbell); | 94 | set_smp_cross_call(armada_mpic_send_doorbell); |
95 | } | 95 | } |
96 | 96 | ||
97 | void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) | 97 | static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) |
98 | { | 98 | { |
99 | struct device_node *node; | 99 | struct device_node *node; |
100 | struct resource res; | 100 | struct resource res; |
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 27fc4f049474..d71ef53107c4 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | #include <asm/smp_plat.h> | 24 | #include <asm/smp_plat.h> |
25 | #include "pmsu.h" | ||
25 | 26 | ||
26 | static void __iomem *pmsu_mp_base; | 27 | static void __iomem *pmsu_mp_base; |
27 | static void __iomem *pmsu_reset_base; | 28 | static void __iomem *pmsu_reset_base; |
@@ -58,7 +59,7 @@ int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) | |||
58 | } | 59 | } |
59 | #endif | 60 | #endif |
60 | 61 | ||
61 | int __init armada_370_xp_pmsu_init(void) | 62 | static int __init armada_370_xp_pmsu_init(void) |
62 | { | 63 | { |
63 | struct device_node *np; | 64 | struct device_node *np; |
64 | 65 | ||
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c index 5175083cdb34..a7fb89a5b5d9 100644 --- a/arch/arm/mach-mvebu/system-controller.c +++ b/arch/arm/mach-mvebu/system-controller.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/reboot.h> | 29 | #include <linux/reboot.h> |
30 | #include "common.h" | ||
30 | 31 | ||
31 | static void __iomem *system_controller_base; | 32 | static void __iomem *system_controller_base; |
32 | 33 | ||
@@ -39,14 +40,14 @@ struct mvebu_system_controller { | |||
39 | }; | 40 | }; |
40 | static struct mvebu_system_controller *mvebu_sc; | 41 | static struct mvebu_system_controller *mvebu_sc; |
41 | 42 | ||
42 | const struct mvebu_system_controller armada_370_xp_system_controller = { | 43 | static const struct mvebu_system_controller armada_370_xp_system_controller = { |
43 | .rstoutn_mask_offset = 0x60, | 44 | .rstoutn_mask_offset = 0x60, |
44 | .system_soft_reset_offset = 0x64, | 45 | .system_soft_reset_offset = 0x64, |
45 | .rstoutn_mask_reset_out_en = 0x1, | 46 | .rstoutn_mask_reset_out_en = 0x1, |
46 | .system_soft_reset = 0x1, | 47 | .system_soft_reset = 0x1, |
47 | }; | 48 | }; |
48 | 49 | ||
49 | const struct mvebu_system_controller orion_system_controller = { | 50 | static const struct mvebu_system_controller orion_system_controller = { |
50 | .rstoutn_mask_offset = 0x108, | 51 | .rstoutn_mask_offset = 0x108, |
51 | .system_soft_reset_offset = 0x10c, | 52 | .system_soft_reset_offset = 0x10c, |
52 | .rstoutn_mask_reset_out_en = 0x4, | 53 | .rstoutn_mask_reset_out_en = 0x4, |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index cce2c9dfb5d1..4a1065e41e9c 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -110,38 +110,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects | ||
114 | * to simply request an IRQ passed as a resource. So the GPIO pin needs | ||
115 | * to be requested by this hog and set as input. | ||
116 | */ | ||
117 | static int __init cpu8815_eth_init(void) | ||
118 | { | ||
119 | struct device_node *eth; | ||
120 | int gpio, irq, err; | ||
121 | |||
122 | eth = of_find_node_by_path("/usb-s8815/ethernet-gpio"); | ||
123 | if (!eth) { | ||
124 | pr_info("could not find any ethernet GPIO\n"); | ||
125 | return 0; | ||
126 | } | ||
127 | gpio = of_get_gpio(eth, 0); | ||
128 | err = gpio_request(gpio, "eth_irq"); | ||
129 | if (err) { | ||
130 | pr_info("failed to request ethernet GPIO\n"); | ||
131 | return -ENODEV; | ||
132 | } | ||
133 | err = gpio_direction_input(gpio); | ||
134 | if (err) { | ||
135 | pr_info("failed to set ethernet GPIO as input\n"); | ||
136 | return -ENODEV; | ||
137 | } | ||
138 | irq = gpio_to_irq(gpio); | ||
139 | pr_info("enabled USB-S8815 ethernet GPIO %d, IRQ %d\n", gpio, irq); | ||
140 | return 0; | ||
141 | } | ||
142 | device_initcall(cpu8815_eth_init); | ||
143 | |||
144 | /* | ||
145 | * This GPIO pin turns on a line that is used to detect card insertion | 113 | * This GPIO pin turns on a line that is used to detect card insertion |
146 | * on this board. | 114 | * on this board. |
147 | */ | 115 | */ |
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c index b91002ca92f3..c134a826070a 100644 --- a/arch/arm/mach-orion5x/board-dt.c +++ b/arch/arm/mach-orion5x/board-dt.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <plat/irq.h> | 21 | #include <plat/irq.h> |
22 | #include "common.h" | 22 | #include "common.h" |
23 | 23 | ||
24 | struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { | 24 | static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = { |
25 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), | 25 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), |
26 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", | 26 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", |
27 | NULL), | 27 | NULL), |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 91a5852b44f3..3f1de1111e0f 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
26 | #include <asm/system_misc.h> | 26 | #include <asm/system_misc.h> |
27 | #include <asm/timex.h> | ||
28 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
30 | #include <asm/mach/time.h> | 29 | #include <asm/mach/time.h> |
@@ -135,7 +134,7 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) | |||
135 | /***************************************************************************** | 134 | /***************************************************************************** |
136 | * SPI | 135 | * SPI |
137 | ****************************************************************************/ | 136 | ****************************************************************************/ |
138 | void __init orion5x_spi_init() | 137 | void __init orion5x_spi_init(void) |
139 | { | 138 | { |
140 | orion_spi_init(SPI_PHYS_BASE); | 139 | orion_spi_init(SPI_PHYS_BASE); |
141 | } | 140 | } |
@@ -185,7 +184,7 @@ static void __init orion5x_crypto_init(void) | |||
185 | /***************************************************************************** | 184 | /***************************************************************************** |
186 | * Watchdog | 185 | * Watchdog |
187 | ****************************************************************************/ | 186 | ****************************************************************************/ |
188 | void __init orion5x_wdt_init(void) | 187 | static void __init orion5x_wdt_init(void) |
189 | { | 188 | { |
190 | orion_wdt_init(); | 189 | orion_wdt_init(); |
191 | } | 190 | } |
@@ -246,7 +245,7 @@ void orion5x_setup_wins(void) | |||
246 | 245 | ||
247 | int orion5x_tclk; | 246 | int orion5x_tclk; |
248 | 247 | ||
249 | int __init orion5x_find_tclk(void) | 248 | static int __init orion5x_find_tclk(void) |
250 | { | 249 | { |
251 | u32 dev, rev; | 250 | u32 dev, rev; |
252 | 251 | ||
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index 4b2aefd1d961..dc01c4ffc9a8 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -202,7 +202,7 @@ __initcall(db88f5281_7seg_init); | |||
202 | * PCI | 202 | * PCI |
203 | ****************************************************************************/ | 203 | ****************************************************************************/ |
204 | 204 | ||
205 | void __init db88f5281_pci_preinit(void) | 205 | static void __init db88f5281_pci_preinit(void) |
206 | { | 206 | { |
207 | int pin; | 207 | int pin; |
208 | 208 | ||
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index 30a192b9c517..9654b0cc5892 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <mach/bridge-regs.h> | 16 | #include <mach/bridge-regs.h> |
17 | #include <plat/orion-gpio.h> | 17 | #include <plat/orion-gpio.h> |
18 | #include <plat/irq.h> | 18 | #include <plat/irq.h> |
19 | #include "common.h" | ||
19 | 20 | ||
20 | static int __initdata gpio0_irqs[4] = { | 21 | static int __initdata gpio0_irqs[4] = { |
21 | IRQ_ORION5X_GPIO_0_7, | 22 | IRQ_ORION5X_GPIO_0_7, |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 7fab67053030..87a12d6930ff 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -240,11 +240,11 @@ static int __init pcie_setup(struct pci_sys_data *sys) | |||
240 | #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \ | 240 | #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \ |
241 | ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \ | 241 | ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \ |
242 | ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \ | 242 | ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \ |
243 | ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0) | 243 | ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : NULL) |
244 | #define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \ | 244 | #define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \ |
245 | ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \ | 245 | ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \ |
246 | ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \ | 246 | ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \ |
247 | ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0) | 247 | ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : NULL) |
248 | #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c) | 248 | #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c) |
249 | #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c) | 249 | #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c) |
250 | 250 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index b1cf68493ffc..b576ef5f18a1 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -108,7 +108,7 @@ static struct platform_device rd88f5182_gpio_leds = { | |||
108 | * PCI | 108 | * PCI |
109 | ****************************************************************************/ | 109 | ****************************************************************************/ |
110 | 110 | ||
111 | void __init rd88f5182_pci_preinit(void) | 111 | static void __init rd88f5182_pci_preinit(void) |
112 | { | 112 | { |
113 | int pin; | 113 | int pin; |
114 | 114 | ||
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 7e9064844698..6208d125c1b9 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -77,7 +77,7 @@ static struct platform_device tsp2_nor_flash = { | |||
77 | #define TSP2_PCI_SLOT0_OFFS 7 | 77 | #define TSP2_PCI_SLOT0_OFFS 7 |
78 | #define TSP2_PCI_SLOT0_IRQ_PIN 11 | 78 | #define TSP2_PCI_SLOT0_IRQ_PIN 11 |
79 | 79 | ||
80 | void __init tsp2_pci_preinit(void) | 80 | static void __init tsp2_pci_preinit(void) |
81 | { | 81 | { |
82 | int pin; | 82 | int pin; |
83 | 83 | ||
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index e90c0618fdad..9136797addb2 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -106,7 +106,7 @@ static struct platform_device qnap_ts209_nor_flash = { | |||
106 | #define QNAP_TS209_PCI_SLOT0_IRQ_PIN 6 | 106 | #define QNAP_TS209_PCI_SLOT0_IRQ_PIN 6 |
107 | #define QNAP_TS209_PCI_SLOT1_IRQ_PIN 7 | 107 | #define QNAP_TS209_PCI_SLOT1_IRQ_PIN 7 |
108 | 108 | ||
109 | void __init qnap_ts209_pci_preinit(void) | 109 | static void __init qnap_ts209_pci_preinit(void) |
110 | { | 110 | { |
111 | int pin; | 111 | int pin; |
112 | 112 | ||
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index e960855d32ac..db16dae441e2 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -57,7 +57,7 @@ static struct map_desc ts78xx_io_desc[] __initdata = { | |||
57 | }, | 57 | }, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | void __init ts78xx_map_io(void) | 60 | static void __init ts78xx_map_io(void) |
61 | { | 61 | { |
62 | orion5x_map_io(); | 62 | orion5x_map_io(); |
63 | iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc)); | 63 | iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc)); |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 58d46a3d7b78..97ae4703cb78 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -36,7 +36,9 @@ | |||
36 | #include <plat/devs.h> | 36 | #include <plat/devs.h> |
37 | #include <plat/fb.h> | 37 | #include <plat/fb.h> |
38 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 38 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
39 | #include <linux/platform_data/mmc-sdhci-s3c.h> | ||
39 | #include <plat/regs-serial.h> | 40 | #include <plat/regs-serial.h> |
41 | #include <plat/sdhci.h> | ||
40 | #include <linux/platform_data/touchscreen-s3c2410.h> | 42 | #include <linux/platform_data/touchscreen-s3c2410.h> |
41 | 43 | ||
42 | #include <video/platform_lcd.h> | 44 | #include <video/platform_lcd.h> |
@@ -214,6 +216,13 @@ static struct platform_device mini6410_lcd_powerdev = { | |||
214 | .dev.platform_data = &mini6410_lcd_power_data, | 216 | .dev.platform_data = &mini6410_lcd_power_data, |
215 | }; | 217 | }; |
216 | 218 | ||
219 | static struct s3c_sdhci_platdata mini6410_hsmmc1_pdata = { | ||
220 | .max_width = 4, | ||
221 | .cd_type = S3C_SDHCI_CD_GPIO, | ||
222 | .ext_cd_gpio = S3C64XX_GPN(10), | ||
223 | .ext_cd_gpio_invert = true, | ||
224 | }; | ||
225 | |||
217 | static struct platform_device *mini6410_devices[] __initdata = { | 226 | static struct platform_device *mini6410_devices[] __initdata = { |
218 | &mini6410_device_eth, | 227 | &mini6410_device_eth, |
219 | &s3c_device_hsmmc0, | 228 | &s3c_device_hsmmc0, |
@@ -321,6 +330,7 @@ static void __init mini6410_machine_init(void) | |||
321 | 330 | ||
322 | s3c_nand_set_platdata(&mini6410_nand_info); | 331 | s3c_nand_set_platdata(&mini6410_nand_info); |
323 | s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]); | 332 | s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]); |
333 | s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata); | ||
324 | s3c24xx_ts_set_platdata(NULL); | 334 | s3c24xx_ts_set_platdata(NULL); |
325 | 335 | ||
326 | /* configure nCS1 width to 16 bits */ | 336 | /* configure nCS1 width to 16 bits */ |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index a4a4b75109b2..aa9017bb750c 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -1,6 +1,10 @@ | |||
1 | config ARCH_SHMOBILE | ||
2 | bool | ||
3 | |||
1 | config ARCH_SHMOBILE_MULTI | 4 | config ARCH_SHMOBILE_MULTI |
2 | bool "SH-Mobile Series" if ARCH_MULTI_V7 | 5 | bool "SH-Mobile Series" if ARCH_MULTI_V7 |
3 | depends on MMU | 6 | depends on MMU |
7 | select ARCH_SHMOBILE | ||
4 | select CPU_V7 | 8 | select CPU_V7 |
5 | select GENERIC_CLOCKEVENTS | 9 | select GENERIC_CLOCKEVENTS |
6 | select HAVE_ARM_SCU if SMP | 10 | select HAVE_ARM_SCU if SMP |
@@ -30,7 +34,7 @@ config MACH_KZM9D | |||
30 | comment "SH-Mobile System Configuration" | 34 | comment "SH-Mobile System Configuration" |
31 | endif | 35 | endif |
32 | 36 | ||
33 | if ARCH_SHMOBILE | 37 | if ARCH_SHMOBILE_LEGACY |
34 | 38 | ||
35 | comment "SH-Mobile System Type" | 39 | comment "SH-Mobile System Type" |
36 | 40 | ||
@@ -97,18 +101,23 @@ config ARCH_R8A7790 | |||
97 | 101 | ||
98 | config ARCH_R8A7791 | 102 | config ARCH_R8A7791 |
99 | bool "R-Car M2 (R8A77910)" | 103 | bool "R-Car M2 (R8A77910)" |
104 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
100 | select ARM_GIC | 105 | select ARM_GIC |
101 | select CPU_V7 | 106 | select CPU_V7 |
102 | select SH_CLK_CPG | 107 | select SH_CLK_CPG |
108 | select RENESAS_IRQC | ||
103 | 109 | ||
104 | config ARCH_EMEV2 | 110 | config ARCH_EMEV2 |
105 | bool "Emma Mobile EV2" | 111 | bool "Emma Mobile EV2" |
106 | select ARCH_WANT_OPTIONAL_GPIOLIB | 112 | select ARCH_WANT_OPTIONAL_GPIOLIB |
107 | select ARM_GIC | 113 | select ARM_GIC |
108 | select CPU_V7 | 114 | select CPU_V7 |
115 | select USE_OF | ||
116 | select AUTO_ZRELADDR | ||
109 | 117 | ||
110 | config ARCH_R7S72100 | 118 | config ARCH_R7S72100 |
111 | bool "RZ/A1H (R7S72100)" | 119 | bool "RZ/A1H (R7S72100)" |
120 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
112 | select ARM_GIC | 121 | select ARM_GIC |
113 | select CPU_V7 | 122 | select CPU_V7 |
114 | select SH_CLK_CPG | 123 | select SH_CLK_CPG |
@@ -231,12 +240,6 @@ config MACH_KOELSCH | |||
231 | depends on ARCH_R8A7791 | 240 | depends on ARCH_R8A7791 |
232 | select USE_OF | 241 | select USE_OF |
233 | 242 | ||
234 | config MACH_KZM9D | ||
235 | bool "KZM9D board" | ||
236 | depends on ARCH_EMEV2 | ||
237 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
238 | select USE_OF | ||
239 | |||
240 | config MACH_KZM9G | 243 | config MACH_KZM9G |
241 | bool "KZM-A9-GT board" | 244 | bool "KZM-A9-GT board" |
242 | depends on ARCH_SH73A0 | 245 | depends on ARCH_SH73A0 |
@@ -274,7 +277,7 @@ source "drivers/sh/Kconfig" | |||
274 | 277 | ||
275 | endif | 278 | endif |
276 | 279 | ||
277 | if ARCH_SHMOBILE || ARCH_SHMOBILE_MULTI | 280 | if ARCH_SHMOBILE |
278 | 281 | ||
279 | menu "Timer and clock configuration" | 282 | menu "Timer and clock configuration" |
280 | 283 | ||
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 51db2bcafabf..c7e877499dc2 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -71,7 +71,6 @@ obj-$(CONFIG_MACH_LAGER_REFERENCE) += board-lager-reference.o | |||
71 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 71 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
72 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | 72 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o |
73 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o | 73 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o |
74 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o | ||
75 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o | 74 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o |
76 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o | 75 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o |
77 | endif | 76 | endif |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 391d72a5536c..4f30e3dc0919 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -8,7 +8,6 @@ loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 | |||
8 | loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 | 8 | loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 |
9 | loadaddr-$(CONFIG_MACH_GENMAI) += 0x8008000 | 9 | loadaddr-$(CONFIG_MACH_GENMAI) += 0x8008000 |
10 | loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 | 10 | loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 |
11 | loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 | ||
12 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 | 11 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 |
13 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | 12 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 |
14 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 | 13 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 |
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 0fa068e30a30..fe071a9130b7 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -168,7 +168,7 @@ static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = { | |||
168 | }; | 168 | }; |
169 | 169 | ||
170 | static const struct resource mmcif0_resources[] __initconst = { | 170 | static const struct resource mmcif0_resources[] __initconst = { |
171 | DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), | 171 | DEFINE_RES_MEM(0xee200000, 0x100), |
172 | DEFINE_RES_IRQ(gic_spi(169)), | 172 | DEFINE_RES_IRQ(gic_spi(169)), |
173 | }; | 173 | }; |
174 | 174 | ||
@@ -179,7 +179,7 @@ static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = { | |||
179 | }; | 179 | }; |
180 | 180 | ||
181 | static const struct resource sdhi0_resources[] __initconst = { | 181 | static const struct resource sdhi0_resources[] __initconst = { |
182 | DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), | 182 | DEFINE_RES_MEM(0xee100000, 0x100), |
183 | DEFINE_RES_IRQ(gic_spi(165)), | 183 | DEFINE_RES_IRQ(gic_spi(165)), |
184 | }; | 184 | }; |
185 | 185 | ||
@@ -191,7 +191,7 @@ static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = { | |||
191 | }; | 191 | }; |
192 | 192 | ||
193 | static const struct resource sdhi1_resources[] __initconst = { | 193 | static const struct resource sdhi1_resources[] __initconst = { |
194 | DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), | 194 | DEFINE_RES_MEM(0xee120000, 0x100), |
195 | DEFINE_RES_IRQ(gic_spi(166)), | 195 | DEFINE_RES_IRQ(gic_spi(166)), |
196 | }; | 196 | }; |
197 | 197 | ||
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index ae88fdad4b3a..875cf3f3f503 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/pinctrl/machine.h> | ||
23 | #include <mach/common.h> | 22 | #include <mach/common.h> |
24 | #include <mach/r8a7778.h> | 23 | #include <mach/r8a7778.h> |
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
@@ -28,14 +27,6 @@ | |||
28 | * see board-bock.c for checking detail of dip-switch | 27 | * see board-bock.c for checking detail of dip-switch |
29 | */ | 28 | */ |
30 | 29 | ||
31 | static const struct pinctrl_map bockw_pinctrl_map[] = { | ||
32 | /* SCIF0 */ | ||
33 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", | ||
34 | "scif0_data_a", "scif0"), | ||
35 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", | ||
36 | "scif0_ctrl", "scif0"), | ||
37 | }; | ||
38 | |||
39 | #define FPGA 0x18200000 | 30 | #define FPGA 0x18200000 |
40 | #define IRQ0MR 0x30 | 31 | #define IRQ0MR 0x30 |
41 | #define COMCTLR 0x101c | 32 | #define COMCTLR 0x101c |
@@ -45,10 +36,6 @@ static void __init bockw_init(void) | |||
45 | 36 | ||
46 | r8a7778_clock_init(); | 37 | r8a7778_clock_init(); |
47 | r8a7778_init_irq_extpin_dt(1); | 38 | r8a7778_init_irq_extpin_dt(1); |
48 | |||
49 | pinctrl_register_mappings(bockw_pinctrl_map, | ||
50 | ARRAY_SIZE(bockw_pinctrl_map)); | ||
51 | r8a7778_pinmux_init(); | ||
52 | r8a7778_add_dt_devices(); | 39 | r8a7778_add_dt_devices(); |
53 | 40 | ||
54 | fpga = ioremap_nocache(FPGA, SZ_1M); | 41 | fpga = ioremap_nocache(FPGA, SZ_1M); |
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c deleted file mode 100644 index 30c2cc695b12..000000000000 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * kzm9d board support | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2012 Magnus Damm | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/regulator/fixed.h> | ||
25 | #include <linux/regulator/machine.h> | ||
26 | #include <linux/smsc911x.h> | ||
27 | #include <mach/common.h> | ||
28 | #include <mach/emev2.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | |||
32 | /* Dummy supplies, where voltage doesn't matter */ | ||
33 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
34 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
35 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
36 | }; | ||
37 | |||
38 | /* Ether */ | ||
39 | static struct resource smsc911x_resources[] = { | ||
40 | [0] = { | ||
41 | .start = 0x20000000, | ||
42 | .end = 0x2000ffff, | ||
43 | .flags = IORESOURCE_MEM, | ||
44 | }, | ||
45 | [1] = { | ||
46 | .start = EMEV2_GPIO_IRQ(1), | ||
47 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static struct smsc911x_platform_config smsc911x_platdata = { | ||
52 | .flags = SMSC911X_USE_32BIT, | ||
53 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
54 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, | ||
55 | }; | ||
56 | |||
57 | static struct platform_device smsc91x_device = { | ||
58 | .name = "smsc911x", | ||
59 | .id = -1, | ||
60 | .dev = { | ||
61 | .platform_data = &smsc911x_platdata, | ||
62 | }, | ||
63 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
64 | .resource = smsc911x_resources, | ||
65 | }; | ||
66 | |||
67 | static struct platform_device *kzm9d_devices[] __initdata = { | ||
68 | &smsc91x_device, | ||
69 | }; | ||
70 | |||
71 | void __init kzm9d_add_standard_devices(void) | ||
72 | { | ||
73 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
74 | |||
75 | emev2_add_standard_devices(); | ||
76 | |||
77 | platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); | ||
78 | } | ||
79 | |||
80 | static const char *kzm9d_boards_compat_dt[] __initdata = { | ||
81 | "renesas,kzm9d", | ||
82 | NULL, | ||
83 | }; | ||
84 | |||
85 | DT_MACHINE_START(KZM9D_DT, "kzm9d") | ||
86 | .smp = smp_ops(emev2_smp_ops), | ||
87 | .map_io = emev2_map_io, | ||
88 | .init_early = emev2_init_delay, | ||
89 | .init_machine = kzm9d_add_standard_devices, | ||
90 | .init_late = shmobile_init_late, | ||
91 | .dt_compat = kzm9d_boards_compat_dt, | ||
92 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 1a1a4a888632..7df9ea0839db 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -20,16 +20,15 @@ | |||
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <mach/rcar-gen2.h> | ||
23 | #include <mach/r8a7790.h> | 24 | #include <mach/r8a7790.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | 26 | ||
26 | static void __init lager_add_standard_devices(void) | 27 | static void __init lager_add_standard_devices(void) |
27 | { | 28 | { |
28 | /* clocks are setup late during boot in the case of DT */ | ||
29 | r8a7790_clock_init(); | 29 | r8a7790_clock_init(); |
30 | |||
31 | r8a7790_add_dt_devices(); | 30 | r8a7790_add_dt_devices(); |
32 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 31 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
33 | } | 32 | } |
34 | 33 | ||
35 | static const char *lager_boards_compat_dt[] __initdata = { | 34 | static const char *lager_boards_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index a8d3ce646fb9..78a31b667988 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -148,7 +148,7 @@ static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = { | |||
148 | }; | 148 | }; |
149 | 149 | ||
150 | static const struct resource mmcif1_resources[] __initconst = { | 150 | static const struct resource mmcif1_resources[] __initconst = { |
151 | DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"), | 151 | DEFINE_RES_MEM(0xee220000, 0x80), |
152 | DEFINE_RES_IRQ(gic_spi(170)), | 152 | DEFINE_RES_IRQ(gic_spi(170)), |
153 | }; | 153 | }; |
154 | 154 | ||
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index da1352f5f71b..d832a4477b4b 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/leds.h> | 29 | #include <linux/leds.h> |
30 | #include <linux/dma-mapping.h> | 30 | #include <linux/dma-mapping.h> |
31 | #include <linux/pinctrl/machine.h> | 31 | #include <linux/pinctrl/machine.h> |
32 | #include <linux/platform_data/camera-rcar.h> | ||
32 | #include <linux/platform_data/gpio-rcar.h> | 33 | #include <linux/platform_data/gpio-rcar.h> |
33 | #include <linux/platform_data/rcar-du.h> | 34 | #include <linux/platform_data/rcar-du.h> |
34 | #include <linux/platform_data/usb-rcar-phy.h> | 35 | #include <linux/platform_data/usb-rcar-phy.h> |
@@ -259,10 +260,30 @@ static struct platform_device leds_device = { | |||
259 | }, | 260 | }, |
260 | }; | 261 | }; |
261 | 262 | ||
263 | /* VIN */ | ||
262 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | 264 | static struct rcar_vin_platform_data vin_platform_data __initdata = { |
263 | .flags = RCAR_VIN_BT656, | 265 | .flags = RCAR_VIN_BT656, |
264 | }; | 266 | }; |
265 | 267 | ||
268 | #define MARZEN_VIN(idx) \ | ||
269 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
270 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
271 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
272 | }; \ | ||
273 | \ | ||
274 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
275 | .parent = &platform_bus, \ | ||
276 | .name = "r8a7779-vin", \ | ||
277 | .id = idx, \ | ||
278 | .res = vin##idx##_resources, \ | ||
279 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
280 | .dma_mask = DMA_BIT_MASK(32), \ | ||
281 | .data = &vin_platform_data, \ | ||
282 | .size_data = sizeof(vin_platform_data), \ | ||
283 | } | ||
284 | MARZEN_VIN(1); | ||
285 | MARZEN_VIN(3); | ||
286 | |||
266 | #define MARZEN_CAMERA(idx) \ | 287 | #define MARZEN_CAMERA(idx) \ |
267 | static struct i2c_board_info camera##idx##_info = { \ | 288 | static struct i2c_board_info camera##idx##_info = { \ |
268 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ | 289 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ |
@@ -326,8 +347,6 @@ static const struct pinctrl_map marzen_pinctrl_map[] = { | |||
326 | "sdhi0_ctrl", "sdhi0"), | 347 | "sdhi0_ctrl", "sdhi0"), |
327 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | 348 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", |
328 | "sdhi0_cd", "sdhi0"), | 349 | "sdhi0_cd", "sdhi0"), |
329 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
330 | "sdhi0_wp", "sdhi0"), | ||
331 | /* SMSC */ | 350 | /* SMSC */ |
332 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", | 351 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", |
333 | "intc_irq1_b", "intc"), | 352 | "intc_irq1_b", "intc"), |
@@ -367,8 +386,8 @@ static void __init marzen_init(void) | |||
367 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ | 386 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ |
368 | 387 | ||
369 | r8a7779_add_standard_devices(); | 388 | r8a7779_add_standard_devices(); |
370 | r8a7779_add_vin_device(1, &vin_platform_data); | 389 | platform_device_register_full(&vin1_info); |
371 | r8a7779_add_vin_device(3, &vin_platform_data); | 390 | platform_device_register_full(&vin3_info); |
372 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 391 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
373 | marzen_add_du_device(); | 392 | marzen_add_du_device(); |
374 | } | 393 | } |
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c index 4aba20ca127e..7b457aed8253 100644 --- a/arch/arm/mach-shmobile/clock-r7s72100.c +++ b/arch/arm/mach-shmobile/clock-r7s72100.c | |||
@@ -170,6 +170,9 @@ static struct clk_lookup lookups[] = { | |||
170 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), | 170 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), |
171 | 171 | ||
172 | /* MSTP clocks */ | 172 | /* MSTP clocks */ |
173 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), | ||
174 | |||
175 | /* ICK */ | ||
173 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), | 176 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), |
174 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), | 177 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), |
175 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), | 178 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), |
@@ -178,6 +181,7 @@ static struct clk_lookup lookups[] = { | |||
178 | CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), | 181 | CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), |
179 | CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), | 182 | CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), |
180 | CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), | 183 | CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), |
184 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), | ||
181 | }; | 185 | }; |
182 | 186 | ||
183 | void __init r7s72100_clock_init(void) | 187 | void __init r7s72100_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index 571409b611d3..7348d58f500e 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c | |||
@@ -584,15 +584,15 @@ static struct clk_lookup lookups[] = { | |||
584 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 584 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
585 | CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]), | 585 | CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]), |
586 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), | 586 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), |
587 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), | 587 | CLKDEV_DEV_ID("ee220000.mmc", &mstp_clks[MSTP305]), |
588 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), | 588 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), |
589 | CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]), | 589 | CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP312]), |
590 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), | 590 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), |
591 | CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), | 591 | CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]), |
592 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), | 592 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), |
593 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), | 593 | CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]), |
594 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), | 594 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), |
595 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), | 595 | CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]), |
596 | CLKDEV_DEV_ID("e6550000.i2c", &mstp_clks[MSTP316]), | 596 | CLKDEV_DEV_ID("e6550000.i2c", &mstp_clks[MSTP316]), |
597 | CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]), | 597 | CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]), |
598 | CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]), | 598 | CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index c826bca4024e..dd989f93498f 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -585,22 +585,23 @@ static struct clk_lookup lookups[] = { | |||
585 | 585 | ||
586 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), | 586 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), |
587 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), | 587 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), |
588 | CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]), | ||
588 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), | 589 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), |
589 | CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]), | 590 | CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]), |
590 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]), | 591 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]), |
591 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), | 592 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), |
592 | CLKDEV_DEV_ID("e6850000.sdhi", &mstp_clks[MSTP314]), | 593 | CLKDEV_DEV_ID("e6850000.sd", &mstp_clks[MSTP314]), |
593 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), | 594 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), |
594 | CLKDEV_DEV_ID("e6860000.sdhi", &mstp_clks[MSTP313]), | 595 | CLKDEV_DEV_ID("e6860000.sd", &mstp_clks[MSTP313]), |
595 | CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]), | 596 | CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]), |
596 | CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), | 597 | CLKDEV_DEV_ID("e6bd0000.mmc", &mstp_clks[MSTP312]), |
597 | CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), | 598 | CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]), |
598 | CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]), | 599 | CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]), |
599 | CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]), | 600 | CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]), |
600 | CLKDEV_DEV_ID("e6600000.pwm", &mstp_clks[MSTP304]), | 601 | CLKDEV_DEV_ID("e6600000.pwm", &mstp_clks[MSTP304]), |
601 | 602 | ||
602 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), | 603 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), |
603 | CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), | 604 | CLKDEV_DEV_ID("e6870000.sd", &mstp_clks[MSTP415]), |
604 | 605 | ||
605 | /* ICK */ | 606 | /* ICK */ |
606 | CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]), | 607 | CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index fb6af83858e3..4b601bf4ede4 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c | |||
@@ -173,9 +173,13 @@ static struct clk_lookup lookups[] = { | |||
173 | 173 | ||
174 | /* MSTP32 clocks */ | 174 | /* MSTP32 clocks */ |
175 | CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */ | 175 | CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */ |
176 | CLKDEV_DEV_ID("ffe4e000.mmc", &mstp_clks[MSTP331]), /* MMC */ | ||
176 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | 177 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ |
178 | CLKDEV_DEV_ID("ffe4c000.sd", &mstp_clks[MSTP323]), /* SDHI0 */ | ||
177 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 179 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
180 | CLKDEV_DEV_ID("ffe4d000.sd", &mstp_clks[MSTP322]), /* SDHI1 */ | ||
178 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 181 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
182 | CLKDEV_DEV_ID("ffe4f000.sd", &mstp_clks[MSTP321]), /* SDHI2 */ | ||
179 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ | 183 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ |
180 | CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ | 184 | CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ |
181 | CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ | 185 | CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ |
@@ -183,9 +187,13 @@ static struct clk_lookup lookups[] = { | |||
183 | CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ | 187 | CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ |
184 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP100]), /* USB FUNC */ | 188 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP100]), /* USB FUNC */ |
185 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | 189 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ |
190 | CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ | ||
186 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ | 191 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ |
192 | CLKDEV_DEV_ID("ffc71000.i2c", &mstp_clks[MSTP029]), /* I2C1 */ | ||
187 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ | 193 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ |
194 | CLKDEV_DEV_ID("ffc72000.i2c", &mstp_clks[MSTP028]), /* I2C2 */ | ||
188 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | 195 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ |
196 | CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ | ||
189 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 197 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
190 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 198 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
191 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 199 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
@@ -195,8 +203,11 @@ static struct clk_lookup lookups[] = { | |||
195 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ | 203 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ |
196 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ | 204 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ |
197 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | 205 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ |
206 | CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ | ||
198 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | 207 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ |
208 | CLKDEV_DEV_ID("fffc8000.spi", &mstp_clks[MSTP007]), /* HSPI1 */ | ||
199 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ | 209 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ |
210 | CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */ | ||
200 | CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */ | 211 | CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */ |
201 | 212 | ||
202 | CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]), | 213 | CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 1f7080fab0a5..f1fb89b76786 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -184,9 +184,13 @@ static struct clk_lookup lookups[] = { | |||
184 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ | 184 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ |
185 | CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */ | 185 | CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */ |
186 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | 186 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ |
187 | CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ | ||
187 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ | 188 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ |
189 | CLKDEV_DEV_ID("ffc71000.i2c", &mstp_clks[MSTP029]), /* I2C1 */ | ||
188 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ | 190 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ |
191 | CLKDEV_DEV_ID("ffc72000.i2c", &mstp_clks[MSTP028]), /* I2C2 */ | ||
189 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | 192 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ |
193 | CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ | ||
190 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 194 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
191 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 195 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
192 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 196 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
@@ -194,12 +198,19 @@ static struct clk_lookup lookups[] = { | |||
194 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ | 198 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ |
195 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ | 199 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ |
196 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | 200 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ |
201 | CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ | ||
197 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | 202 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ |
203 | CLKDEV_DEV_ID("fffc8000.spi", &mstp_clks[MSTP007]), /* HSPI1 */ | ||
198 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ | 204 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ |
205 | CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */ | ||
199 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | 206 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ |
207 | CLKDEV_DEV_ID("ffe4c000.sd", &mstp_clks[MSTP323]), /* SDHI0 */ | ||
200 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 208 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
209 | CLKDEV_DEV_ID("ffe4d000.sd", &mstp_clks[MSTP322]), /* SDHI1 */ | ||
201 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 210 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
211 | CLKDEV_DEV_ID("ffe4e000.sd", &mstp_clks[MSTP321]), /* SDHI2 */ | ||
202 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ | 212 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ |
213 | CLKDEV_DEV_ID("ffe4f000.sd", &mstp_clks[MSTP320]), /* SDHI3 */ | ||
203 | CLKDEV_DEV_ID("rcar-du-r8a7779", &mstp_clks[MSTP103]), /* DU */ | 214 | CLKDEV_DEV_ID("rcar-du-r8a7779", &mstp_clks[MSTP103]), /* DU */ |
204 | }; | 215 | }; |
205 | 216 | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index a64f965c7da1..312376d2cfd1 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #define SMSTPCR7 0xe615014c | 53 | #define SMSTPCR7 0xe615014c |
54 | #define SMSTPCR8 0xe6150990 | 54 | #define SMSTPCR8 0xe6150990 |
55 | #define SMSTPCR9 0xe6150994 | 55 | #define SMSTPCR9 0xe6150994 |
56 | #define SMSTPCR10 0xe6150998 | ||
56 | 57 | ||
57 | #define SDCKCR 0xE6150074 | 58 | #define SDCKCR 0xE6150074 |
58 | #define SD2CKCR 0xE6150078 | 59 | #define SD2CKCR 0xE6150078 |
@@ -77,7 +78,7 @@ static struct sh_clk_ops followparent_clk_ops = { | |||
77 | }; | 78 | }; |
78 | 79 | ||
79 | static struct clk main_clk = { | 80 | static struct clk main_clk = { |
80 | /* .parent will be set r8a73a4_clock_init */ | 81 | /* .parent will be set r8a7790_clock_init */ |
81 | .ops = &followparent_clk_ops, | 82 | .ops = &followparent_clk_ops, |
82 | }; | 83 | }; |
83 | 84 | ||
@@ -182,10 +183,14 @@ static struct clk div6_clks[DIV6_NR] = { | |||
182 | 183 | ||
183 | /* MSTP */ | 184 | /* MSTP */ |
184 | enum { | 185 | enum { |
186 | MSTP1015, MSTP1014, MSTP1013, MSTP1012, MSTP1011, MSTP1010, | ||
187 | MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005, | ||
185 | MSTP931, MSTP930, MSTP929, MSTP928, | 188 | MSTP931, MSTP930, MSTP929, MSTP928, |
189 | MSTP917, | ||
186 | MSTP813, | 190 | MSTP813, |
187 | MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, | 191 | MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, |
188 | MSTP717, MSTP716, | 192 | MSTP717, MSTP716, |
193 | MSTP704, | ||
189 | MSTP522, | 194 | MSTP522, |
190 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, | 195 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, |
191 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, | 196 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, |
@@ -194,10 +199,22 @@ enum { | |||
194 | }; | 199 | }; |
195 | 200 | ||
196 | static struct clk mstp_clks[MSTP_NR] = { | 201 | static struct clk mstp_clks[MSTP_NR] = { |
197 | [MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */ | 202 | [MSTP1015] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 15, 0), /* SSI0 */ |
198 | [MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */ | 203 | [MSTP1014] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 14, 0), /* SSI1 */ |
199 | [MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */ | 204 | [MSTP1013] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 13, 0), /* SSI2 */ |
200 | [MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */ | 205 | [MSTP1012] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 12, 0), /* SSI3 */ |
206 | [MSTP1011] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 11, 0), /* SSI4 */ | ||
207 | [MSTP1010] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 10, 0), /* SSI5 */ | ||
208 | [MSTP1009] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 9, 0), /* SSI6 */ | ||
209 | [MSTP1008] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 8, 0), /* SSI7 */ | ||
210 | [MSTP1007] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 7, 0), /* SSI8 */ | ||
211 | [MSTP1006] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 6, 0), /* SSI9 */ | ||
212 | [MSTP1005] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 5, 0), /* SSI ALL */ | ||
213 | [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */ | ||
214 | [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */ | ||
215 | [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */ | ||
216 | [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */ | ||
217 | [MSTP917] = SH_CLK_MSTP32(&qspi_clk, SMSTPCR9, 17, 0), /* QSPI */ | ||
201 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ | 218 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ |
202 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ | 219 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ |
203 | [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ | 220 | [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ |
@@ -208,6 +225,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
208 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 225 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ |
209 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ | 226 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ |
210 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ | 227 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ |
228 | [MSTP704] = SH_CLK_MSTP32(&mp_clk, SMSTPCR7, 4, 0), /* HSUSB */ | ||
211 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | 229 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ |
212 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ | 230 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ |
213 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ | 231 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ |
@@ -262,11 +280,7 @@ static struct clk_lookup lookups[] = { | |||
262 | CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]), | 280 | CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]), |
263 | 281 | ||
264 | /* MSTP */ | 282 | /* MSTP */ |
265 | CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), | 283 | CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP1005]), |
266 | CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), | ||
267 | CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]), | ||
268 | CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]), | ||
269 | CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]), | ||
270 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), | 284 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), |
271 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), | 285 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), |
272 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), | 286 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), |
@@ -282,20 +296,42 @@ static struct clk_lookup lookups[] = { | |||
282 | CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]), | 296 | CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]), |
283 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), | 297 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), |
284 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), | 298 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), |
299 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | ||
285 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 300 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
286 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), | 301 | CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]), |
287 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), | 302 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), |
288 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), | 303 | CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]), |
289 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), | 304 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), |
290 | CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), | 305 | CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]), |
291 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), | 306 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), |
292 | CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP312]), | 307 | CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP312]), |
293 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), | 308 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]), |
294 | CLKDEV_DEV_ID("ee160000.sdhi", &mstp_clks[MSTP311]), | 309 | CLKDEV_DEV_ID("ee160000.sd", &mstp_clks[MSTP311]), |
295 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]), | 310 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]), |
296 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), | 311 | CLKDEV_DEV_ID("ee220000.mmc", &mstp_clks[MSTP305]), |
297 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), | 312 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), |
298 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | 313 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), |
314 | CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), | ||
315 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]), | ||
316 | |||
317 | /* ICK */ | ||
318 | CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]), | ||
319 | CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), | ||
320 | CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), | ||
321 | CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]), | ||
322 | CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]), | ||
323 | CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]), | ||
324 | CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]), | ||
325 | CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]), | ||
326 | CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]), | ||
327 | CLKDEV_ICK_ID("ssi.3", "rcar_sound", &mstp_clks[MSTP1012]), | ||
328 | CLKDEV_ICK_ID("ssi.4", "rcar_sound", &mstp_clks[MSTP1011]), | ||
329 | CLKDEV_ICK_ID("ssi.5", "rcar_sound", &mstp_clks[MSTP1010]), | ||
330 | CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP1009]), | ||
331 | CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP1008]), | ||
332 | CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP1007]), | ||
333 | CLKDEV_ICK_ID("ssi.9", "rcar_sound", &mstp_clks[MSTP1006]), | ||
334 | |||
299 | }; | 335 | }; |
300 | 336 | ||
301 | #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ | 337 | #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ |
@@ -321,10 +357,10 @@ void __init r8a7790_clock_init(void) | |||
321 | R8A7790_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66); | 357 | R8A7790_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66); |
322 | break; | 358 | break; |
323 | case MD(14): | 359 | case MD(14): |
324 | R8A7790_CLOCK_ROOT(26, &extal_div2_clk, 200, 240, 122, 102); | 360 | R8A7790_CLOCK_ROOT(26 / 2, &extal_div2_clk, 200, 240, 122, 102); |
325 | break; | 361 | break; |
326 | case MD(13) | MD(14): | 362 | case MD(13) | MD(14): |
327 | R8A7790_CLOCK_ROOT(30, &extal_div2_clk, 172, 208, 106, 88); | 363 | R8A7790_CLOCK_ROOT(30 / 2, &extal_div2_clk, 172, 208, 106, 88); |
328 | break; | 364 | break; |
329 | } | 365 | } |
330 | 366 | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c index c9a26f16ce5b..ff2d60d55bd5 100644 --- a/arch/arm/mach-shmobile/clock-r8a7791.c +++ b/arch/arm/mach-shmobile/clock-r8a7791.c | |||
@@ -103,6 +103,7 @@ SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12); | |||
103 | SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); | 103 | SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); |
104 | SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); | 104 | SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); |
105 | SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); | 105 | SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); |
106 | SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3); | ||
106 | 107 | ||
107 | static struct clk *main_clks[] = { | 108 | static struct clk *main_clks[] = { |
108 | &extal_clk, | 109 | &extal_clk, |
@@ -116,12 +117,14 @@ static struct clk *main_clks[] = { | |||
116 | &rclk_clk, | 117 | &rclk_clk, |
117 | &mp_clk, | 118 | &mp_clk, |
118 | &cp_clk, | 119 | &cp_clk, |
120 | &zx_clk, | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | /* MSTP */ | 123 | /* MSTP */ |
122 | enum { | 124 | enum { |
123 | MSTP721, MSTP720, | 125 | MSTP726, MSTP724, MSTP723, MSTP721, MSTP720, |
124 | MSTP719, MSTP718, MSTP715, MSTP714, | 126 | MSTP719, MSTP718, MSTP715, MSTP714, |
127 | MSTP522, | ||
125 | MSTP216, MSTP207, MSTP206, | 128 | MSTP216, MSTP207, MSTP206, |
126 | MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107, | 129 | MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107, |
127 | MSTP124, | 130 | MSTP124, |
@@ -129,12 +132,16 @@ enum { | |||
129 | }; | 132 | }; |
130 | 133 | ||
131 | static struct clk mstp_clks[MSTP_NR] = { | 134 | static struct clk mstp_clks[MSTP_NR] = { |
135 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ | ||
136 | [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */ | ||
137 | [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */ | ||
132 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ | 138 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ |
133 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 139 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ |
134 | [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */ | 140 | [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */ |
135 | [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ | 141 | [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ |
136 | [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ | 142 | [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ |
137 | [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ | 143 | [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ |
144 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | ||
138 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ | 145 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ |
139 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ | 146 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ |
140 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ | 147 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ |
@@ -164,6 +171,9 @@ static struct clk_lookup lookups[] = { | |||
164 | CLKDEV_CON_ID("peripheral_clk", &hp_clk), | 171 | CLKDEV_CON_ID("peripheral_clk", &hp_clk), |
165 | 172 | ||
166 | /* MSTP */ | 173 | /* MSTP */ |
174 | CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7791", &mstp_clks[MSTP726]), | ||
175 | CLKDEV_ICK_ID("du.0", "rcar-du-r8a7791", &mstp_clks[MSTP724]), | ||
176 | CLKDEV_ICK_ID("du.1", "rcar-du-r8a7791", &mstp_clks[MSTP723]), | ||
167 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 177 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
168 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 178 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
169 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */ | 179 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */ |
@@ -180,6 +190,8 @@ static struct clk_lookup lookups[] = { | |||
180 | CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */ | 190 | CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */ |
181 | CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */ | 191 | CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */ |
182 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | 192 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), |
193 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | ||
194 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | ||
183 | }; | 195 | }; |
184 | 196 | ||
185 | #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ | 197 | #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 5390c6bbbc02..28489978b09c 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -504,10 +504,6 @@ static struct clk_lookup lookups[] = { | |||
504 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | 504 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), |
505 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | 505 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), |
506 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), | 506 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), |
507 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
508 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
509 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
510 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
511 | 507 | ||
512 | /* MSTP32 clocks */ | 508 | /* MSTP32 clocks */ |
513 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 509 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
@@ -574,6 +570,11 @@ static struct clk_lookup lookups[] = { | |||
574 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 570 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
575 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | 571 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ |
576 | 572 | ||
573 | /* ICK */ | ||
574 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
575 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
576 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
577 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
577 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | 578 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", |
578 | &div6_reparent_clks[DIV6_HDMI]), | 579 | &div6_reparent_clks[DIV6_HDMI]), |
579 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 580 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index c92c023f0d27..30d88689a960 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -625,12 +625,6 @@ static struct clk_lookup lookups[] = { | |||
625 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), | 625 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), |
626 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), | 626 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), |
627 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), | 627 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), |
628 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
629 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
630 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
631 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
632 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
633 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
634 | 628 | ||
635 | /* MSTP32 clocks */ | 629 | /* MSTP32 clocks */ |
636 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ | 630 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ |
@@ -663,13 +657,13 @@ static struct clk_lookup lookups[] = { | |||
663 | CLKDEV_DEV_ID("e6822000.i2c", &mstp_clks[MSTP323]), /* I2C1 */ | 657 | CLKDEV_DEV_ID("e6822000.i2c", &mstp_clks[MSTP323]), /* I2C1 */ |
664 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP322]), /* USB */ | 658 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP322]), /* USB */ |
665 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ | 659 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ |
666 | CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), /* SDHI0 */ | 660 | CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]), /* SDHI0 */ |
667 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ | 661 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ |
668 | CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), /* SDHI1 */ | 662 | CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]), /* SDHI1 */ |
669 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ | 663 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ |
670 | CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMCIF0 */ | 664 | CLKDEV_DEV_ID("e6bd0000.mmc", &mstp_clks[MSTP312]), /* MMCIF0 */ |
671 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */ | 665 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */ |
672 | CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP311]), /* SDHI2 */ | 666 | CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP311]), /* SDHI2 */ |
673 | CLKDEV_DEV_ID("renesas-tpu-pwm.0", &mstp_clks[MSTP304]), /* TPU0 */ | 667 | CLKDEV_DEV_ID("renesas-tpu-pwm.0", &mstp_clks[MSTP304]), /* TPU0 */ |
674 | CLKDEV_DEV_ID("renesas-tpu-pwm.1", &mstp_clks[MSTP303]), /* TPU1 */ | 668 | CLKDEV_DEV_ID("renesas-tpu-pwm.1", &mstp_clks[MSTP303]), /* TPU1 */ |
675 | CLKDEV_DEV_ID("renesas-tpu-pwm.2", &mstp_clks[MSTP302]), /* TPU2 */ | 669 | CLKDEV_DEV_ID("renesas-tpu-pwm.2", &mstp_clks[MSTP302]), /* TPU2 */ |
@@ -680,6 +674,14 @@ static struct clk_lookup lookups[] = { | |||
680 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ | 674 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ |
681 | CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ | 675 | CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ |
682 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 676 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
677 | |||
678 | /* ICK */ | ||
679 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
680 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
681 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
682 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
683 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
684 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
683 | }; | 685 | }; |
684 | 686 | ||
685 | void __init sh73a0_clock_init(void) | 687 | void __init sh73a0_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h index c2eb7568d9be..fcb142a14e07 100644 --- a/arch/arm/mach-shmobile/include/mach/emev2.h +++ b/arch/arm/mach-shmobile/include/mach/emev2.h | |||
@@ -3,12 +3,7 @@ | |||
3 | 3 | ||
4 | extern void emev2_map_io(void); | 4 | extern void emev2_map_io(void); |
5 | extern void emev2_init_delay(void); | 5 | extern void emev2_init_delay(void); |
6 | extern void emev2_add_standard_devices(void); | ||
7 | extern void emev2_clock_init(void); | 6 | extern void emev2_clock_init(void); |
8 | |||
9 | #define EMEV2_GPIO_BASE 200 | ||
10 | #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) | ||
11 | |||
12 | extern struct smp_operations emev2_smp_ops; | 7 | extern struct smp_operations emev2_smp_ops; |
13 | 8 | ||
14 | #endif /* __ASM_EMEV2_H__ */ | 9 | #endif /* __ASM_EMEV2_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 441886c9714b..b497f932d04f 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -27,6 +27,24 @@ enum { | |||
27 | HPBDMA_SLAVE_DUMMY, | 27 | HPBDMA_SLAVE_DUMMY, |
28 | HPBDMA_SLAVE_SDHI0_TX, | 28 | HPBDMA_SLAVE_SDHI0_TX, |
29 | HPBDMA_SLAVE_SDHI0_RX, | 29 | HPBDMA_SLAVE_SDHI0_RX, |
30 | HPBDMA_SLAVE_HPBIF0_TX, | ||
31 | HPBDMA_SLAVE_HPBIF0_RX, | ||
32 | HPBDMA_SLAVE_HPBIF1_TX, | ||
33 | HPBDMA_SLAVE_HPBIF1_RX, | ||
34 | HPBDMA_SLAVE_HPBIF2_TX, | ||
35 | HPBDMA_SLAVE_HPBIF2_RX, | ||
36 | HPBDMA_SLAVE_HPBIF3_TX, | ||
37 | HPBDMA_SLAVE_HPBIF3_RX, | ||
38 | HPBDMA_SLAVE_HPBIF4_TX, | ||
39 | HPBDMA_SLAVE_HPBIF4_RX, | ||
40 | HPBDMA_SLAVE_HPBIF5_TX, | ||
41 | HPBDMA_SLAVE_HPBIF5_RX, | ||
42 | HPBDMA_SLAVE_HPBIF6_TX, | ||
43 | HPBDMA_SLAVE_HPBIF6_RX, | ||
44 | HPBDMA_SLAVE_HPBIF7_TX, | ||
45 | HPBDMA_SLAVE_HPBIF7_RX, | ||
46 | HPBDMA_SLAVE_HPBIF8_TX, | ||
47 | HPBDMA_SLAVE_HPBIF8_RX, | ||
30 | }; | 48 | }; |
31 | 49 | ||
32 | extern void r8a7778_add_standard_devices(void); | 50 | extern void r8a7778_add_standard_devices(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index 17af34ed89c8..5014145f272e 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/sh_clk.h> | 4 | #include <linux/sh_clk.h> |
5 | #include <linux/pm_domain.h> | 5 | #include <linux/pm_domain.h> |
6 | #include <linux/sh_eth.h> | ||
7 | #include <linux/platform_data/camera-rcar.h> | ||
8 | 6 | ||
9 | /* HPB-DMA slave IDs */ | 7 | /* HPB-DMA slave IDs */ |
10 | enum { | 8 | enum { |
@@ -40,9 +38,6 @@ extern void r8a7779_earlytimer_init(void); | |||
40 | extern void r8a7779_add_early_devices(void); | 38 | extern void r8a7779_add_early_devices(void); |
41 | extern void r8a7779_add_standard_devices(void); | 39 | extern void r8a7779_add_standard_devices(void); |
42 | extern void r8a7779_add_standard_devices_dt(void); | 40 | extern void r8a7779_add_standard_devices_dt(void); |
43 | extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); | ||
44 | extern void r8a7779_add_vin_device(int idx, | ||
45 | struct rcar_vin_platform_data *pdata); | ||
46 | extern void r8a7779_init_late(void); | 41 | extern void r8a7779_init_late(void); |
47 | extern void r8a7779_clock_init(void); | 42 | extern void r8a7779_clock_init(void); |
48 | extern void r8a7779_pinmux_init(void); | 43 | extern void r8a7779_pinmux_init(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h index 051ead3c286e..200fa699f730 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7791.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h | |||
@@ -4,6 +4,7 @@ | |||
4 | void r8a7791_add_standard_devices(void); | 4 | void r8a7791_add_standard_devices(void); |
5 | void r8a7791_add_dt_devices(void); | 5 | void r8a7791_add_dt_devices(void); |
6 | void r8a7791_clock_init(void); | 6 | void r8a7791_clock_init(void); |
7 | void r8a7791_pinmux_init(void); | ||
7 | void r8a7791_init_early(void); | 8 | void r8a7791_init_early(void); |
8 | extern struct smp_operations r8a7791_smp_ops; | 9 | extern struct smp_operations r8a7791_smp_ops; |
9 | 10 | ||
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c index 3ad531caf4f0..c8f2a1a69a52 100644 --- a/arch/arm/mach-shmobile/setup-emev2.c +++ b/arch/arm/mach-shmobile/setup-emev2.c | |||
@@ -16,24 +16,15 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
18 | */ | 18 | */ |
19 | #include <linux/clk-provider.h> | ||
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/platform_data/gpio-em.h> | ||
25 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
26 | #include <linux/delay.h> | ||
27 | #include <linux/input.h> | ||
28 | #include <linux/io.h> | ||
29 | #include <linux/irqchip/arm-gic.h> | ||
30 | #include <mach/common.h> | 23 | #include <mach/common.h> |
31 | #include <mach/emev2.h> | 24 | #include <mach/emev2.h> |
32 | #include <mach/irqs.h> | ||
33 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
36 | #include <asm/mach/time.h> | ||
37 | 28 | ||
38 | static struct map_desc emev2_io_desc[] __initdata = { | 29 | static struct map_desc emev2_io_desc[] __initdata = { |
39 | #ifdef CONFIG_SMP | 30 | #ifdef CONFIG_SMP |
@@ -52,150 +43,20 @@ void __init emev2_map_io(void) | |||
52 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); | 43 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); |
53 | } | 44 | } |
54 | 45 | ||
55 | /* UART */ | ||
56 | static struct resource uart0_resources[] = { | ||
57 | DEFINE_RES_MEM(0xe1020000, 0x38), | ||
58 | DEFINE_RES_IRQ(40), | ||
59 | }; | ||
60 | |||
61 | static struct resource uart1_resources[] = { | ||
62 | DEFINE_RES_MEM(0xe1030000, 0x38), | ||
63 | DEFINE_RES_IRQ(41), | ||
64 | }; | ||
65 | |||
66 | static struct resource uart2_resources[] = { | ||
67 | DEFINE_RES_MEM(0xe1040000, 0x38), | ||
68 | DEFINE_RES_IRQ(42), | ||
69 | }; | ||
70 | |||
71 | static struct resource uart3_resources[] = { | ||
72 | DEFINE_RES_MEM(0xe1050000, 0x38), | ||
73 | DEFINE_RES_IRQ(43), | ||
74 | }; | ||
75 | |||
76 | #define emev2_register_uart(idx) \ | ||
77 | platform_device_register_simple("serial8250-em", idx, \ | ||
78 | uart##idx##_resources, \ | ||
79 | ARRAY_SIZE(uart##idx##_resources)) | ||
80 | |||
81 | /* STI */ | ||
82 | static struct resource sti_resources[] = { | ||
83 | DEFINE_RES_MEM(0xe0180000, 0x54), | ||
84 | DEFINE_RES_IRQ(157), | ||
85 | }; | ||
86 | |||
87 | #define emev2_register_sti() \ | ||
88 | platform_device_register_simple("em_sti", 0, \ | ||
89 | sti_resources, \ | ||
90 | ARRAY_SIZE(sti_resources)) | ||
91 | |||
92 | /* GIO */ | ||
93 | static struct gpio_em_config gio0_config = { | ||
94 | .gpio_base = 0, | ||
95 | .irq_base = EMEV2_GPIO_IRQ(0), | ||
96 | .number_of_pins = 32, | ||
97 | }; | ||
98 | |||
99 | static struct resource gio0_resources[] = { | ||
100 | DEFINE_RES_MEM(0xe0050000, 0x2c), | ||
101 | DEFINE_RES_MEM(0xe0050040, 0x20), | ||
102 | DEFINE_RES_IRQ(99), | ||
103 | DEFINE_RES_IRQ(100), | ||
104 | }; | ||
105 | |||
106 | static struct gpio_em_config gio1_config = { | ||
107 | .gpio_base = 32, | ||
108 | .irq_base = EMEV2_GPIO_IRQ(32), | ||
109 | .number_of_pins = 32, | ||
110 | }; | ||
111 | |||
112 | static struct resource gio1_resources[] = { | ||
113 | DEFINE_RES_MEM(0xe0050080, 0x2c), | ||
114 | DEFINE_RES_MEM(0xe00500c0, 0x20), | ||
115 | DEFINE_RES_IRQ(101), | ||
116 | DEFINE_RES_IRQ(102), | ||
117 | }; | ||
118 | |||
119 | static struct gpio_em_config gio2_config = { | ||
120 | .gpio_base = 64, | ||
121 | .irq_base = EMEV2_GPIO_IRQ(64), | ||
122 | .number_of_pins = 32, | ||
123 | }; | ||
124 | |||
125 | static struct resource gio2_resources[] = { | ||
126 | DEFINE_RES_MEM(0xe0050100, 0x2c), | ||
127 | DEFINE_RES_MEM(0xe0050140, 0x20), | ||
128 | DEFINE_RES_IRQ(103), | ||
129 | DEFINE_RES_IRQ(104), | ||
130 | }; | ||
131 | |||
132 | static struct gpio_em_config gio3_config = { | ||
133 | .gpio_base = 96, | ||
134 | .irq_base = EMEV2_GPIO_IRQ(96), | ||
135 | .number_of_pins = 32, | ||
136 | }; | ||
137 | |||
138 | static struct resource gio3_resources[] = { | ||
139 | DEFINE_RES_MEM(0xe0050180, 0x2c), | ||
140 | DEFINE_RES_MEM(0xe00501c0, 0x20), | ||
141 | DEFINE_RES_IRQ(105), | ||
142 | DEFINE_RES_IRQ(106), | ||
143 | }; | ||
144 | |||
145 | static struct gpio_em_config gio4_config = { | ||
146 | .gpio_base = 128, | ||
147 | .irq_base = EMEV2_GPIO_IRQ(128), | ||
148 | .number_of_pins = 31, | ||
149 | }; | ||
150 | |||
151 | static struct resource gio4_resources[] = { | ||
152 | DEFINE_RES_MEM(0xe0050200, 0x2c), | ||
153 | DEFINE_RES_MEM(0xe0050240, 0x20), | ||
154 | DEFINE_RES_IRQ(107), | ||
155 | DEFINE_RES_IRQ(108), | ||
156 | }; | ||
157 | |||
158 | #define emev2_register_gio(idx) \ | ||
159 | platform_device_register_resndata(&platform_bus, "em_gio", \ | ||
160 | idx, gio##idx##_resources, \ | ||
161 | ARRAY_SIZE(gio##idx##_resources), \ | ||
162 | &gio##idx##_config, \ | ||
163 | sizeof(struct gpio_em_config)) | ||
164 | |||
165 | static struct resource pmu_resources[] = { | ||
166 | DEFINE_RES_IRQ(152), | ||
167 | DEFINE_RES_IRQ(153), | ||
168 | }; | ||
169 | |||
170 | #define emev2_register_pmu() \ | ||
171 | platform_device_register_simple("arm-pmu", -1, \ | ||
172 | pmu_resources, \ | ||
173 | ARRAY_SIZE(pmu_resources)) | ||
174 | |||
175 | void __init emev2_add_standard_devices(void) | ||
176 | { | ||
177 | if (!IS_ENABLED(CONFIG_COMMON_CLK)) | ||
178 | emev2_clock_init(); | ||
179 | |||
180 | emev2_register_uart(0); | ||
181 | emev2_register_uart(1); | ||
182 | emev2_register_uart(2); | ||
183 | emev2_register_uart(3); | ||
184 | emev2_register_sti(); | ||
185 | emev2_register_gio(0); | ||
186 | emev2_register_gio(1); | ||
187 | emev2_register_gio(2); | ||
188 | emev2_register_gio(3); | ||
189 | emev2_register_gio(4); | ||
190 | emev2_register_pmu(); | ||
191 | } | ||
192 | |||
193 | void __init emev2_init_delay(void) | 46 | void __init emev2_init_delay(void) |
194 | { | 47 | { |
195 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ | 48 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ |
196 | } | 49 | } |
197 | 50 | ||
198 | #ifdef CONFIG_USE_OF | 51 | static void __init emev2_add_standard_devices_dt(void) |
52 | { | ||
53 | #ifdef CONFIG_COMMON_CLK | ||
54 | of_clk_init(NULL); | ||
55 | #else | ||
56 | emev2_clock_init(); | ||
57 | #endif | ||
58 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
59 | } | ||
199 | 60 | ||
200 | static const char *emev2_boards_compat_dt[] __initdata = { | 61 | static const char *emev2_boards_compat_dt[] __initdata = { |
201 | "renesas,emev2", | 62 | "renesas,emev2", |
@@ -206,7 +67,7 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") | |||
206 | .smp = smp_ops(emev2_smp_ops), | 67 | .smp = smp_ops(emev2_smp_ops), |
207 | .map_io = emev2_map_io, | 68 | .map_io = emev2_map_io, |
208 | .init_early = emev2_init_delay, | 69 | .init_early = emev2_init_delay, |
70 | .init_machine = emev2_add_standard_devices_dt, | ||
71 | .init_late = shmobile_init_late, | ||
209 | .dt_compat = emev2_boards_compat_dt, | 72 | .dt_compat = emev2_boards_compat_dt, |
210 | MACHINE_END | 73 | MACHINE_END |
211 | |||
212 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index d4eb509a1c87..55f0b9c7c482 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
25 | #include <linux/sh_timer.h> | ||
25 | #include <mach/common.h> | 26 | #include <mach/common.h> |
26 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
27 | #include <mach/r7s72100.h> | 28 | #include <mach/r7s72100.h> |
@@ -58,6 +59,26 @@ static inline void r7s72100_register_scif(int idx) | |||
58 | sizeof(struct plat_sci_port)); | 59 | sizeof(struct plat_sci_port)); |
59 | } | 60 | } |
60 | 61 | ||
62 | |||
63 | static struct sh_timer_config mtu2_0_platform_data __initdata = { | ||
64 | .name = "MTU2_0", | ||
65 | .timer_bit = 0, | ||
66 | .channel_offset = -0x80, | ||
67 | .clockevent_rating = 200, | ||
68 | }; | ||
69 | |||
70 | static struct resource mtu2_0_resources[] __initdata = { | ||
71 | DEFINE_RES_MEM(0xfcff0300, 0x27), | ||
72 | DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */ | ||
73 | }; | ||
74 | |||
75 | #define r7s72100_register_mtu2(idx) \ | ||
76 | platform_device_register_resndata(&platform_bus, "sh_mtu2", \ | ||
77 | idx, mtu2_##idx##_resources, \ | ||
78 | ARRAY_SIZE(mtu2_##idx##_resources), \ | ||
79 | &mtu2_##idx##_platform_data, \ | ||
80 | sizeof(struct sh_timer_config)) | ||
81 | |||
61 | void __init r7s72100_add_dt_devices(void) | 82 | void __init r7s72100_add_dt_devices(void) |
62 | { | 83 | { |
63 | r7s72100_register_scif(SCIF0); | 84 | r7s72100_register_scif(SCIF0); |
@@ -68,6 +89,7 @@ void __init r7s72100_add_dt_devices(void) | |||
68 | r7s72100_register_scif(SCIF5); | 89 | r7s72100_register_scif(SCIF5); |
69 | r7s72100_register_scif(SCIF6); | 90 | r7s72100_register_scif(SCIF6); |
70 | r7s72100_register_scif(SCIF7); | 91 | r7s72100_register_scif(SCIF7); |
92 | r7s72100_register_mtu2(0); | ||
71 | } | 93 | } |
72 | 94 | ||
73 | void __init r7s72100_init_early(void) | 95 | void __init r7s72100_init_early(void) |
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index b0f2749071be..cc94b64c2ef5 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
@@ -275,7 +275,7 @@ static const struct sh_dmae_pdata dma_pdata = { | |||
275 | 275 | ||
276 | static struct resource dma_resources[] = { | 276 | static struct resource dma_resources[] = { |
277 | DEFINE_RES_MEM(0xe6700020, 0x89e0), | 277 | DEFINE_RES_MEM(0xe6700020, 0x89e0), |
278 | DEFINE_RES_IRQ_NAMED(gic_spi(220), "error_irq"), | 278 | DEFINE_RES_IRQ(gic_spi(220)), |
279 | { | 279 | { |
280 | /* IRQ for channels 0-19 */ | 280 | /* IRQ for channels 0-19 */ |
281 | .start = gic_spi(200), | 281 | .start = gic_spi(200), |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 03fcc5974ef9..81701cfb6cc6 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -319,6 +319,29 @@ void __init r8a7778_add_dt_devices(void) | |||
319 | #define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE BIT(1) /* SDHI0 */ | 319 | #define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE BIT(1) /* SDHI0 */ |
320 | #define HPB_DMAE_ASYNCMDR_ASMD21_MULTI 0 /* SDHI0 */ | 320 | #define HPB_DMAE_ASYNCMDR_ASMD21_MULTI 0 /* SDHI0 */ |
321 | 321 | ||
322 | #define HPBDMA_HPBIF(_id) \ | ||
323 | { \ | ||
324 | .id = HPBDMA_SLAVE_HPBIF## _id ##_TX, \ | ||
325 | .addr = 0xffda0000 + (_id * 0x1000), \ | ||
326 | .dcr = HPB_DMAE_DCR_CT | \ | ||
327 | HPB_DMAE_DCR_DIP | \ | ||
328 | HPB_DMAE_DCR_SPDS_32BIT | \ | ||
329 | HPB_DMAE_DCR_DMDL | \ | ||
330 | HPB_DMAE_DCR_DPDS_32BIT, \ | ||
331 | .port = 0x1111, \ | ||
332 | .dma_ch = (28 + _id), \ | ||
333 | }, { \ | ||
334 | .id = HPBDMA_SLAVE_HPBIF## _id ##_RX, \ | ||
335 | .addr = 0xffda0000 + (_id * 0x1000), \ | ||
336 | .dcr = HPB_DMAE_DCR_CT | \ | ||
337 | HPB_DMAE_DCR_DIP | \ | ||
338 | HPB_DMAE_DCR_SMDL | \ | ||
339 | HPB_DMAE_DCR_SPDS_32BIT | \ | ||
340 | HPB_DMAE_DCR_DPDS_32BIT, \ | ||
341 | .port = 0x1111, \ | ||
342 | .dma_ch = (28 + _id), \ | ||
343 | } | ||
344 | |||
322 | static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { | 345 | static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { |
323 | { | 346 | { |
324 | .id = HPBDMA_SLAVE_SDHI0_TX, | 347 | .id = HPBDMA_SLAVE_SDHI0_TX, |
@@ -349,11 +372,39 @@ static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { | |||
349 | .flags = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE, | 372 | .flags = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE, |
350 | .dma_ch = 22, | 373 | .dma_ch = 22, |
351 | }, | 374 | }, |
375 | |||
376 | HPBDMA_HPBIF(0), | ||
377 | HPBDMA_HPBIF(1), | ||
378 | HPBDMA_HPBIF(2), | ||
379 | HPBDMA_HPBIF(3), | ||
380 | HPBDMA_HPBIF(4), | ||
381 | HPBDMA_HPBIF(5), | ||
382 | HPBDMA_HPBIF(6), | ||
383 | HPBDMA_HPBIF(7), | ||
384 | HPBDMA_HPBIF(8), | ||
352 | }; | 385 | }; |
353 | 386 | ||
354 | static const struct hpb_dmae_channel hpb_dmae_channels[] = { | 387 | static const struct hpb_dmae_channel hpb_dmae_channels[] = { |
355 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */ | 388 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */ |
356 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */ | 389 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */ |
390 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF0_TX), /* ch. 28 */ | ||
391 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF0_RX), /* ch. 28 */ | ||
392 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF1_TX), /* ch. 29 */ | ||
393 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF1_RX), /* ch. 29 */ | ||
394 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF2_TX), /* ch. 30 */ | ||
395 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF2_RX), /* ch. 30 */ | ||
396 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF3_TX), /* ch. 31 */ | ||
397 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF3_RX), /* ch. 31 */ | ||
398 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF4_TX), /* ch. 32 */ | ||
399 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF4_RX), /* ch. 32 */ | ||
400 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF5_TX), /* ch. 33 */ | ||
401 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF5_RX), /* ch. 33 */ | ||
402 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF6_TX), /* ch. 34 */ | ||
403 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF6_RX), /* ch. 34 */ | ||
404 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF7_TX), /* ch. 35 */ | ||
405 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF7_RX), /* ch. 35 */ | ||
406 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF8_TX), /* ch. 36 */ | ||
407 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF8_RX), /* ch. 36 */ | ||
357 | }; | 408 | }; |
358 | 409 | ||
359 | static struct hpb_dmae_pdata dma_platform_data __initdata = { | 410 | static struct hpb_dmae_pdata dma_platform_data __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 13049e9d691c..8f9453152fb9 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -598,45 +598,6 @@ static struct platform_device ohci1_device = { | |||
598 | .resource = ohci1_resources, | 598 | .resource = ohci1_resources, |
599 | }; | 599 | }; |
600 | 600 | ||
601 | /* Ether */ | ||
602 | static struct resource ether_resources[] __initdata = { | ||
603 | { | ||
604 | .start = 0xfde00000, | ||
605 | .end = 0xfde003ff, | ||
606 | .flags = IORESOURCE_MEM, | ||
607 | }, { | ||
608 | .start = gic_iid(0xb4), | ||
609 | .flags = IORESOURCE_IRQ, | ||
610 | }, | ||
611 | }; | ||
612 | |||
613 | #define R8A7779_VIN(idx) \ | ||
614 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
615 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
616 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
617 | }; \ | ||
618 | \ | ||
619 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
620 | .parent = &platform_bus, \ | ||
621 | .name = "r8a7779-vin", \ | ||
622 | .id = idx, \ | ||
623 | .res = vin##idx##_resources, \ | ||
624 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
625 | .dma_mask = DMA_BIT_MASK(32), \ | ||
626 | } | ||
627 | |||
628 | R8A7779_VIN(0); | ||
629 | R8A7779_VIN(1); | ||
630 | R8A7779_VIN(2); | ||
631 | R8A7779_VIN(3); | ||
632 | |||
633 | static struct platform_device_info *vin_info_table[] __initdata = { | ||
634 | &vin0_info, | ||
635 | &vin1_info, | ||
636 | &vin2_info, | ||
637 | &vin3_info, | ||
638 | }; | ||
639 | |||
640 | /* HPB-DMA */ | 601 | /* HPB-DMA */ |
641 | 602 | ||
642 | /* Asynchronous mode register bits */ | 603 | /* Asynchronous mode register bits */ |
@@ -825,24 +786,6 @@ void __init r8a7779_add_standard_devices(void) | |||
825 | r8a7779_register_hpb_dmae(); | 786 | r8a7779_register_hpb_dmae(); |
826 | } | 787 | } |
827 | 788 | ||
828 | void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata) | ||
829 | { | ||
830 | platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, | ||
831 | ether_resources, | ||
832 | ARRAY_SIZE(ether_resources), | ||
833 | pdata, sizeof(*pdata)); | ||
834 | } | ||
835 | |||
836 | void __init r8a7779_add_vin_device(int id, struct rcar_vin_platform_data *pdata) | ||
837 | { | ||
838 | BUG_ON(id < 0 || id > 3); | ||
839 | |||
840 | vin_info_table[id]->data = pdata; | ||
841 | vin_info_table[id]->size_data = sizeof(*pdata); | ||
842 | |||
843 | platform_device_register_full(vin_info_table[id]); | ||
844 | } | ||
845 | |||
846 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | 789 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ |
847 | void __init __weak r8a7779_register_twd(void) { } | 790 | void __init __weak r8a7779_register_twd(void) { } |
848 | 791 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index c47bcebbcb00..3543c3bacb75 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -34,6 +34,10 @@ static const struct resource pfc_resources[] __initconst = { | |||
34 | DEFINE_RES_MEM(0xe6060000, 0x250), | 34 | DEFINE_RES_MEM(0xe6060000, 0x250), |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #define r8a7790_register_pfc() \ | ||
38 | platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, \ | ||
39 | ARRAY_SIZE(pfc_resources)) | ||
40 | |||
37 | #define R8A7790_GPIO(idx) \ | 41 | #define R8A7790_GPIO(idx) \ |
38 | static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ | 42 | static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ |
39 | DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ | 43 | DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ |
@@ -65,8 +69,7 @@ R8A7790_GPIO(5); | |||
65 | 69 | ||
66 | void __init r8a7790_pinmux_init(void) | 70 | void __init r8a7790_pinmux_init(void) |
67 | { | 71 | { |
68 | platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, | 72 | r8a7790_register_pfc(); |
69 | ARRAY_SIZE(pfc_resources)); | ||
70 | r8a7790_register_gpio(0); | 73 | r8a7790_register_gpio(0); |
71 | r8a7790_register_gpio(1); | 74 | r8a7790_register_gpio(1); |
72 | r8a7790_register_gpio(2); | 75 | r8a7790_register_gpio(2); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index d9393d61ee27..cddca99b434f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/platform_data/gpio-rcar.h> | ||
25 | #include <linux/platform_data/irq-renesas-irqc.h> | 26 | #include <linux/platform_data/irq-renesas-irqc.h> |
26 | #include <linux/serial_sci.h> | 27 | #include <linux/serial_sci.h> |
27 | #include <linux/sh_timer.h> | 28 | #include <linux/sh_timer.h> |
@@ -31,6 +32,58 @@ | |||
31 | #include <mach/rcar-gen2.h> | 32 | #include <mach/rcar-gen2.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
33 | 34 | ||
35 | static const struct resource pfc_resources[] __initconst = { | ||
36 | DEFINE_RES_MEM(0xe6060000, 0x250), | ||
37 | }; | ||
38 | |||
39 | #define r8a7791_register_pfc() \ | ||
40 | platform_device_register_simple("pfc-r8a7791", -1, pfc_resources, \ | ||
41 | ARRAY_SIZE(pfc_resources)) | ||
42 | |||
43 | #define R8A7791_GPIO(idx, base, nr) \ | ||
44 | static const struct resource r8a7791_gpio##idx##_resources[] __initconst = { \ | ||
45 | DEFINE_RES_MEM((base), 0x50), \ | ||
46 | DEFINE_RES_IRQ(gic_spi(4 + (idx))), \ | ||
47 | }; \ | ||
48 | \ | ||
49 | static const struct gpio_rcar_config \ | ||
50 | r8a7791_gpio##idx##_platform_data __initconst = { \ | ||
51 | .gpio_base = 32 * (idx), \ | ||
52 | .irq_base = 0, \ | ||
53 | .number_of_pins = (nr), \ | ||
54 | .pctl_name = "pfc-r8a7791", \ | ||
55 | .has_both_edge_trigger = 1, \ | ||
56 | }; \ | ||
57 | |||
58 | R8A7791_GPIO(0, 0xe6050000, 32); | ||
59 | R8A7791_GPIO(1, 0xe6051000, 32); | ||
60 | R8A7791_GPIO(2, 0xe6052000, 32); | ||
61 | R8A7791_GPIO(3, 0xe6053000, 32); | ||
62 | R8A7791_GPIO(4, 0xe6054000, 32); | ||
63 | R8A7791_GPIO(5, 0xe6055000, 32); | ||
64 | R8A7791_GPIO(6, 0xe6055400, 32); | ||
65 | R8A7791_GPIO(7, 0xe6055800, 26); | ||
66 | |||
67 | #define r8a7791_register_gpio(idx) \ | ||
68 | platform_device_register_resndata(&platform_bus, "gpio_rcar", idx, \ | ||
69 | r8a7791_gpio##idx##_resources, \ | ||
70 | ARRAY_SIZE(r8a7791_gpio##idx##_resources), \ | ||
71 | &r8a7791_gpio##idx##_platform_data, \ | ||
72 | sizeof(r8a7791_gpio##idx##_platform_data)) | ||
73 | |||
74 | void __init r8a7791_pinmux_init(void) | ||
75 | { | ||
76 | r8a7791_register_pfc(); | ||
77 | r8a7791_register_gpio(0); | ||
78 | r8a7791_register_gpio(1); | ||
79 | r8a7791_register_gpio(2); | ||
80 | r8a7791_register_gpio(3); | ||
81 | r8a7791_register_gpio(4); | ||
82 | r8a7791_register_gpio(5); | ||
83 | r8a7791_register_gpio(6); | ||
84 | r8a7791_register_gpio(7); | ||
85 | } | ||
86 | |||
34 | #define SCIF_COMMON(scif_type, baseaddr, irq) \ | 87 | #define SCIF_COMMON(scif_type, baseaddr, irq) \ |
35 | .type = scif_type, \ | 88 | .type = scif_type, \ |
36 | .mapbase = baseaddr, \ | 89 | .mapbase = baseaddr, \ |
@@ -136,6 +189,17 @@ static struct resource irqc0_resources[] = { | |||
136 | &irqc##idx##_data, \ | 189 | &irqc##idx##_data, \ |
137 | sizeof(struct renesas_irqc_config)) | 190 | sizeof(struct renesas_irqc_config)) |
138 | 191 | ||
192 | static const struct resource thermal_resources[] __initconst = { | ||
193 | DEFINE_RES_MEM(0xe61f0000, 0x14), | ||
194 | DEFINE_RES_MEM(0xe61f0100, 0x38), | ||
195 | DEFINE_RES_IRQ(gic_spi(69)), | ||
196 | }; | ||
197 | |||
198 | #define r8a7791_register_thermal() \ | ||
199 | platform_device_register_simple("rcar_thermal", -1, \ | ||
200 | thermal_resources, \ | ||
201 | ARRAY_SIZE(thermal_resources)) | ||
202 | |||
139 | void __init r8a7791_add_dt_devices(void) | 203 | void __init r8a7791_add_dt_devices(void) |
140 | { | 204 | { |
141 | r8a7791_register_scif(SCIFA0); | 205 | r8a7791_register_scif(SCIFA0); |
@@ -160,6 +224,7 @@ void __init r8a7791_add_standard_devices(void) | |||
160 | { | 224 | { |
161 | r8a7791_add_dt_devices(); | 225 | r8a7791_add_dt_devices(); |
162 | r8a7791_register_irqc(0); | 226 | r8a7791_register_irqc(0); |
227 | r8a7791_register_thermal(); | ||
163 | } | 228 | } |
164 | 229 | ||
165 | void __init r8a7791_init_early(void) | 230 | void __init r8a7791_init_early(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 22de17417fd7..65151c48cbd4 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -273,7 +273,7 @@ static struct sh_timer_config tmu00_platform_data = { | |||
273 | }; | 273 | }; |
274 | 274 | ||
275 | static struct resource tmu00_resources[] = { | 275 | static struct resource tmu00_resources[] = { |
276 | [0] = DEFINE_RES_MEM_NAMED(0xfff60008, 0xc, "TMU00"), | 276 | [0] = DEFINE_RES_MEM(0xfff60008, 0xc), |
277 | [1] = { | 277 | [1] = { |
278 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ | 278 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ |
279 | .flags = IORESOURCE_IRQ, | 279 | .flags = IORESOURCE_IRQ, |
@@ -298,7 +298,7 @@ static struct sh_timer_config tmu01_platform_data = { | |||
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct resource tmu01_resources[] = { | 300 | static struct resource tmu01_resources[] = { |
301 | [0] = DEFINE_RES_MEM_NAMED(0xfff60014, 0xc, "TMU00"), | 301 | [0] = DEFINE_RES_MEM(0xfff60014, 0xc), |
302 | [1] = { | 302 | [1] = { |
303 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ | 303 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ |
304 | .flags = IORESOURCE_IRQ, | 304 | .flags = IORESOURCE_IRQ, |
@@ -316,7 +316,7 @@ static struct platform_device tmu01_device = { | |||
316 | }; | 316 | }; |
317 | 317 | ||
318 | static struct resource i2c0_resources[] = { | 318 | static struct resource i2c0_resources[] = { |
319 | [0] = DEFINE_RES_MEM_NAMED(0xe6820000, 0x426, "IIC0"), | 319 | [0] = DEFINE_RES_MEM(0xe6820000, 0x426), |
320 | [1] = { | 320 | [1] = { |
321 | .start = gic_spi(167), | 321 | .start = gic_spi(167), |
322 | .end = gic_spi(170), | 322 | .end = gic_spi(170), |
@@ -325,7 +325,7 @@ static struct resource i2c0_resources[] = { | |||
325 | }; | 325 | }; |
326 | 326 | ||
327 | static struct resource i2c1_resources[] = { | 327 | static struct resource i2c1_resources[] = { |
328 | [0] = DEFINE_RES_MEM_NAMED(0xe6822000, 0x426, "IIC1"), | 328 | [0] = DEFINE_RES_MEM(0xe6822000, 0x426), |
329 | [1] = { | 329 | [1] = { |
330 | .start = gic_spi(51), | 330 | .start = gic_spi(51), |
331 | .end = gic_spi(54), | 331 | .end = gic_spi(54), |
@@ -334,7 +334,7 @@ static struct resource i2c1_resources[] = { | |||
334 | }; | 334 | }; |
335 | 335 | ||
336 | static struct resource i2c2_resources[] = { | 336 | static struct resource i2c2_resources[] = { |
337 | [0] = DEFINE_RES_MEM_NAMED(0xe6824000, 0x426, "IIC2"), | 337 | [0] = DEFINE_RES_MEM(0xe6824000, 0x426), |
338 | [1] = { | 338 | [1] = { |
339 | .start = gic_spi(171), | 339 | .start = gic_spi(171), |
340 | .end = gic_spi(174), | 340 | .end = gic_spi(174), |
@@ -343,7 +343,7 @@ static struct resource i2c2_resources[] = { | |||
343 | }; | 343 | }; |
344 | 344 | ||
345 | static struct resource i2c3_resources[] = { | 345 | static struct resource i2c3_resources[] = { |
346 | [0] = DEFINE_RES_MEM_NAMED(0xe6826000, 0x426, "IIC3"), | 346 | [0] = DEFINE_RES_MEM(0xe6826000, 0x426), |
347 | [1] = { | 347 | [1] = { |
348 | .start = gic_spi(183), | 348 | .start = gic_spi(183), |
349 | .end = gic_spi(186), | 349 | .end = gic_spi(186), |
@@ -352,7 +352,7 @@ static struct resource i2c3_resources[] = { | |||
352 | }; | 352 | }; |
353 | 353 | ||
354 | static struct resource i2c4_resources[] = { | 354 | static struct resource i2c4_resources[] = { |
355 | [0] = DEFINE_RES_MEM_NAMED(0xe6828000, 0x426, "IIC4"), | 355 | [0] = DEFINE_RES_MEM(0xe6828000, 0x426), |
356 | [1] = { | 356 | [1] = { |
357 | .start = gic_spi(187), | 357 | .start = gic_spi(187), |
358 | .end = gic_spi(190), | 358 | .end = gic_spi(190), |
@@ -722,7 +722,7 @@ static struct platform_device pmu_device = { | |||
722 | 722 | ||
723 | /* an IPMMU module for ICB */ | 723 | /* an IPMMU module for ICB */ |
724 | static struct resource ipmmu_resources[] = { | 724 | static struct resource ipmmu_resources[] = { |
725 | DEFINE_RES_MEM_NAMED(0xfe951000, 0x100, "IPMMU"), | 725 | DEFINE_RES_MEM(0xfe951000, 0x100), |
726 | }; | 726 | }; |
727 | 727 | ||
728 | static const char * const ipmmu_dev_names[] = { | 728 | static const char * const ipmmu_dev_names[] = { |
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index 616b96e86ad4..d05ba759da30 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
@@ -2,10 +2,10 @@ | |||
2 | # Makefile for the linux kernel, U8500 machine. | 2 | # Makefile for the linux kernel, U8500 machine. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := cpu.o devices.o id.o timer.o pm.o | 5 | obj-y := cpu.o id.o timer.o pm.o |
6 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 6 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
7 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o | 7 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o |
8 | obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ | 8 | obj-$(CONFIG_MACH_MOP500) += board-mop500-sdi.o \ |
9 | board-mop500-regulators.o \ | 9 | board-mop500-regulators.o \ |
10 | board-mop500-pins.o \ | 10 | board-mop500-pins.o \ |
11 | board-mop500-audio.o | 11 | board-mop500-audio.o |
diff --git a/arch/arm/mach-ux500/board-mop500-audio.c b/arch/arm/mach-ux500/board-mop500-audio.c index 154e15f59702..dc7f90157766 100644 --- a/arch/arm/mach-ux500/board-mop500-audio.c +++ b/arch/arm/mach-ux500/board-mop500-audio.c | |||
@@ -7,16 +7,13 @@ | |||
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
10 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
11 | #include <linux/platform_data/dma-ste-dma40.h> | 10 | #include <linux/platform_data/dma-ste-dma40.h> |
12 | 11 | ||
13 | #include "devices.h" | ||
14 | #include "irqs.h" | 12 | #include "irqs.h" |
15 | #include <linux/platform_data/asoc-ux500-msp.h> | 13 | #include <linux/platform_data/asoc-ux500-msp.h> |
16 | 14 | ||
17 | #include "ste-dma40-db8500.h" | 15 | #include "ste-dma40-db8500.h" |
18 | #include "board-mop500.h" | 16 | #include "board-mop500.h" |
19 | #include "devices-db8500.h" | ||
20 | 17 | ||
21 | static struct stedma40_chan_cfg msp0_dma_rx = { | 18 | static struct stedma40_chan_cfg msp0_dma_rx = { |
22 | .high_priority = true, | 19 | .high_priority = true, |
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 0efb1560fc35..f63619b69113 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c | |||
@@ -10,94 +10,18 @@ | |||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/pinctrl/machine.h> | 11 | #include <linux/pinctrl/machine.h> |
12 | #include <linux/pinctrl/pinconf-generic.h> | 12 | #include <linux/pinctrl/pinconf-generic.h> |
13 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
14 | 13 | ||
15 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
16 | 15 | ||
17 | #include "board-mop500.h" | 16 | #include "board-mop500.h" |
18 | 17 | ||
19 | enum custom_pin_cfg_t { | ||
20 | PINS_FOR_DEFAULT, | ||
21 | PINS_FOR_U9500, | ||
22 | }; | ||
23 | |||
24 | static enum custom_pin_cfg_t pinsfor; | ||
25 | |||
26 | /* These simply sets bias for pins */ | 18 | /* These simply sets bias for pins */ |
27 | #define BIAS(a,b) static unsigned long a[] = { b } | 19 | #define BIAS(a,b) static unsigned long a[] = { b } |
28 | 20 | ||
29 | BIAS(pd, PIN_PULL_DOWN); | ||
30 | BIAS(in_nopull, PIN_INPUT_NOPULL); | ||
31 | BIAS(in_nopull_slpm_nowkup, PIN_INPUT_NOPULL|PIN_SLPM_WAKEUP_DISABLE); | ||
32 | BIAS(in_pu, PIN_INPUT_PULLUP); | ||
33 | BIAS(in_pd, PIN_INPUT_PULLDOWN); | ||
34 | BIAS(out_hi, PIN_OUTPUT_HIGH); | ||
35 | BIAS(out_lo, PIN_OUTPUT_LOW); | ||
36 | BIAS(out_lo_slpm_nowkup, PIN_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE); | ||
37 | |||
38 | BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0)); | 21 | BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0)); |
39 | BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); | 22 | BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); |
40 | BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0)); | 23 | BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0)); |
41 | 24 | ||
42 | /* These also force them into GPIO mode */ | ||
43 | BIAS(gpio_in_pu, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED); | ||
44 | BIAS(gpio_in_pd, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED); | ||
45 | BIAS(gpio_in_pu_slpm_gpio_nopull, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED|PIN_SLPM_GPIO|PIN_SLPM_INPUT_NOPULL); | ||
46 | BIAS(gpio_in_pd_slpm_gpio_nopull, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED|PIN_SLPM_GPIO|PIN_SLPM_INPUT_NOPULL); | ||
47 | BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED); | ||
48 | BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED); | ||
49 | /* Sleep modes */ | ||
50 | BIAS(slpm_in_wkup_pdis, PIN_SLEEPMODE_ENABLED| | ||
51 | PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
52 | BIAS(slpm_in_wkup_pdis_en, PIN_SLEEPMODE_ENABLED| | ||
53 | PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_ENABLED); | ||
54 | BIAS(slpm_wkup_pdis, PIN_SLEEPMODE_ENABLED| | ||
55 | PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
56 | BIAS(slpm_wkup_pdis_en, PIN_SLEEPMODE_ENABLED| | ||
57 | PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_ENABLED); | ||
58 | BIAS(slpm_out_lo_pdis, PIN_SLEEPMODE_ENABLED| | ||
59 | PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE|PIN_SLPM_PDIS_DISABLED); | ||
60 | BIAS(slpm_out_lo_wkup_pdis, PIN_SLEEPMODE_ENABLED| | ||
61 | PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
62 | BIAS(slpm_out_hi_wkup_pdis, PIN_SLEEPMODE_ENABLED|PIN_SLPM_OUTPUT_HIGH| | ||
63 | PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
64 | BIAS(slpm_in_nopull_wkup_pdis, PIN_SLEEPMODE_ENABLED| | ||
65 | PIN_SLPM_INPUT_NOPULL|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
66 | BIAS(slpm_in_pu_wkup_pdis_en, PIN_SLEEPMODE_ENABLED|PIN_SLPM_INPUT_PULLUP| | ||
67 | PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_ENABLED); | ||
68 | BIAS(slpm_out_wkup_pdis, PIN_SLEEPMODE_ENABLED| | ||
69 | PIN_SLPM_DIR_OUTPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
70 | BIAS(out_lo_wkup_pdis, PIN_SLPM_OUTPUT_LOW| | ||
71 | PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); | ||
72 | BIAS(in_wkup_pdis_en, PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE| | ||
73 | PIN_SLPM_PDIS_ENABLED); | ||
74 | BIAS(in_wkup_pdis, PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE| | ||
75 | PIN_SLPM_PDIS_DISABLED); | ||
76 | BIAS(out_wkup_pdis, PIN_SLPM_DIR_OUTPUT|PIN_SLPM_WAKEUP_ENABLE| | ||
77 | PIN_SLPM_PDIS_DISABLED); | ||
78 | |||
79 | /* We use these to define hog settings that are always done on boot */ | ||
80 | #define DB8500_MUX_HOG(group,func) \ | ||
81 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-db8500", group, func) | ||
82 | #define DB8500_PIN_HOG(pin,conf) \ | ||
83 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-db8500", pin, conf) | ||
84 | |||
85 | /* These are default states associated with device and changed runtime */ | ||
86 | #define DB8500_MUX(group,func,dev) \ | ||
87 | PIN_MAP_MUX_GROUP_DEFAULT(dev, "pinctrl-db8500", group, func) | ||
88 | #define DB8500_PIN(pin,conf,dev) \ | ||
89 | PIN_MAP_CONFIGS_PIN_DEFAULT(dev, "pinctrl-db8500", pin, conf) | ||
90 | #define DB8500_PIN_IDLE(pin, conf, dev) \ | ||
91 | PIN_MAP_CONFIGS_PIN(dev, PINCTRL_STATE_IDLE, "pinctrl-db8500", \ | ||
92 | pin, conf) | ||
93 | #define DB8500_PIN_SLEEP(pin, conf, dev) \ | ||
94 | PIN_MAP_CONFIGS_PIN(dev, PINCTRL_STATE_SLEEP, "pinctrl-db8500", \ | ||
95 | pin, conf) | ||
96 | #define DB8500_MUX_STATE(group, func, dev, state) \ | ||
97 | PIN_MAP_MUX_GROUP(dev, state, "pinctrl-db8500", group, func) | ||
98 | #define DB8500_PIN_STATE(pin, conf, dev, state) \ | ||
99 | PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-db8500", pin, conf) | ||
100 | |||
101 | #define AB8500_MUX_HOG(group, func) \ | 25 | #define AB8500_MUX_HOG(group, func) \ |
102 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8500.0", group, func) | 26 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8500.0", group, func) |
103 | #define AB8500_PIN_HOG(pin, conf) \ | 27 | #define AB8500_PIN_HOG(pin, conf) \ |
@@ -344,725 +268,8 @@ static struct pinctrl_map __initdata ab8505_pinmap[] = { | |||
344 | AB8505_PIN_HOG("GPIO53_D15", in_pd), | 268 | AB8505_PIN_HOG("GPIO53_D15", in_pd), |
345 | }; | 269 | }; |
346 | 270 | ||
347 | /* Pin control settings */ | ||
348 | static struct pinctrl_map __initdata mop500_family_pinmap[] = { | ||
349 | /* | ||
350 | * uMSP0, mux in 4 pins, regular placement of RX/TX | ||
351 | * explicitly set the pins to no pull | ||
352 | */ | ||
353 | DB8500_MUX_HOG("msp0txrx_a_1", "msp0"), | ||
354 | DB8500_MUX_HOG("msp0tfstck_a_1", "msp0"), | ||
355 | DB8500_PIN_HOG("GPIO12_AC4", in_nopull), /* TXD */ | ||
356 | DB8500_PIN_HOG("GPIO15_AC3", in_nopull), /* RXD */ | ||
357 | DB8500_PIN_HOG("GPIO13_AF3", in_nopull), /* TFS */ | ||
358 | DB8500_PIN_HOG("GPIO14_AE3", in_nopull), /* TCK */ | ||
359 | /* MSP2 for HDMI, pull down TXD, TCK, TFS */ | ||
360 | DB8500_MUX_HOG("msp2_a_1", "msp2"), | ||
361 | DB8500_PIN_HOG("GPIO193_AH27", in_pd), /* TXD */ | ||
362 | DB8500_PIN_HOG("GPIO194_AF27", in_pd), /* TCK */ | ||
363 | DB8500_PIN_HOG("GPIO195_AG28", in_pd), /* TFS */ | ||
364 | DB8500_PIN_HOG("GPIO196_AG26", out_lo), /* RXD */ | ||
365 | /* | ||
366 | * LCD, set TE0 (using LCD VSI0) and D14 (touch screen interrupt) to | ||
367 | * pull-up | ||
368 | * TODO: is this really correct? Snowball doesn't have a LCD. | ||
369 | */ | ||
370 | DB8500_MUX_HOG("lcdvsi0_a_1", "lcd"), | ||
371 | DB8500_PIN_HOG("GPIO68_E1", in_pu), | ||
372 | DB8500_PIN_HOG("GPIO84_C2", gpio_in_pu), | ||
373 | /* | ||
374 | * STMPE1601/tc35893 keypad IRQ GPIO 218 | ||
375 | * TODO: set for snowball and HREF really?? | ||
376 | */ | ||
377 | DB8500_PIN_HOG("GPIO218_AH11", gpio_in_pu), | ||
378 | /* | ||
379 | * UART0, we do not mux in u0 here. | ||
380 | * uart-0 pins gpio configuration should be kept intact to prevent | ||
381 | * a glitch in tx line when the tty dev is opened. Later these pins | ||
382 | * are configured by uart driver | ||
383 | */ | ||
384 | DB8500_PIN_HOG("GPIO0_AJ5", in_pu), /* CTS */ | ||
385 | DB8500_PIN_HOG("GPIO1_AJ3", out_hi), /* RTS */ | ||
386 | DB8500_PIN_HOG("GPIO2_AH4", in_pu), /* RXD */ | ||
387 | DB8500_PIN_HOG("GPIO3_AH3", out_hi), /* TXD */ | ||
388 | /* | ||
389 | * Mux in UART2 on altfunction C and set pull-ups. | ||
390 | * TODO: is this used on U8500 variants and Snowball really? | ||
391 | * The setting on GPIO31 conflicts with magnetometer use on hrefv60 | ||
392 | */ | ||
393 | /* default state for UART2 */ | ||
394 | DB8500_MUX("u2rxtx_c_1", "u2", "uart2"), | ||
395 | DB8500_PIN("GPIO29_W2", in_pu, "uart2"), /* RXD */ | ||
396 | DB8500_PIN("GPIO30_W3", out_hi, "uart2"), /* TXD */ | ||
397 | /* Sleep state for UART2 */ | ||
398 | DB8500_PIN_SLEEP("GPIO29_W2", in_wkup_pdis, "uart2"), | ||
399 | DB8500_PIN_SLEEP("GPIO30_W3", out_wkup_pdis, "uart2"), | ||
400 | /* | ||
401 | * The following pin sets were known as "runtime pins" before being | ||
402 | * converted to the pinctrl model. Here we model them as "default" | ||
403 | * states. | ||
404 | */ | ||
405 | /* Mux in UART0 after initialization */ | ||
406 | DB8500_MUX("u0_a_1", "u0", "uart0"), | ||
407 | DB8500_PIN("GPIO0_AJ5", in_pu, "uart0"), /* CTS */ | ||
408 | DB8500_PIN("GPIO1_AJ3", out_hi, "uart0"), /* RTS */ | ||
409 | DB8500_PIN("GPIO2_AH4", in_pu, "uart0"), /* RXD */ | ||
410 | DB8500_PIN("GPIO3_AH3", out_hi, "uart0"), /* TXD */ | ||
411 | /* Sleep state for UART0 */ | ||
412 | DB8500_PIN_SLEEP("GPIO0_AJ5", slpm_in_wkup_pdis, "uart0"), | ||
413 | DB8500_PIN_SLEEP("GPIO1_AJ3", slpm_out_hi_wkup_pdis, "uart0"), | ||
414 | DB8500_PIN_SLEEP("GPIO2_AH4", slpm_in_wkup_pdis, "uart0"), | ||
415 | DB8500_PIN_SLEEP("GPIO3_AH3", slpm_out_wkup_pdis, "uart0"), | ||
416 | /* Mux in UART1 after initialization */ | ||
417 | DB8500_MUX("u1rxtx_a_1", "u1", "uart1"), | ||
418 | DB8500_PIN("GPIO4_AH6", in_pu, "uart1"), /* RXD */ | ||
419 | DB8500_PIN("GPIO5_AG6", out_hi, "uart1"), /* TXD */ | ||
420 | /* Sleep state for UART1 */ | ||
421 | DB8500_PIN_SLEEP("GPIO4_AH6", slpm_in_wkup_pdis, "uart1"), | ||
422 | DB8500_PIN_SLEEP("GPIO5_AG6", slpm_out_wkup_pdis, "uart1"), | ||
423 | /* MSP1 for ALSA codec */ | ||
424 | DB8500_MUX_HOG("msp1txrx_a_1", "msp1"), | ||
425 | DB8500_MUX_HOG("msp1_a_1", "msp1"), | ||
426 | DB8500_PIN_HOG("GPIO33_AF2", out_lo_slpm_nowkup), | ||
427 | DB8500_PIN_HOG("GPIO34_AE1", in_nopull_slpm_nowkup), | ||
428 | DB8500_PIN_HOG("GPIO35_AE2", in_nopull_slpm_nowkup), | ||
429 | DB8500_PIN_HOG("GPIO36_AG2", in_nopull_slpm_nowkup), | ||
430 | /* Mux in LCD data lines 8 thru 11 and LCDA CLK for MCDE TVOUT */ | ||
431 | DB8500_MUX("lcd_d8_d11_a_1", "lcd", "mcde-tvout"), | ||
432 | DB8500_MUX("lcdaclk_b_1", "lcda", "mcde-tvout"), | ||
433 | /* Mux in LCD VSI1 and pull it up for MCDE HDMI output */ | ||
434 | DB8500_MUX("lcdvsi1_a_1", "lcd", "0-0070"), | ||
435 | DB8500_PIN("GPIO69_E2", in_pu, "0-0070"), | ||
436 | /* LCD VSI1 sleep state */ | ||
437 | DB8500_PIN_SLEEP("GPIO69_E2", slpm_in_wkup_pdis, "0-0070"), | ||
438 | /* Mux in i2c0 block, default state */ | ||
439 | DB8500_MUX("i2c0_a_1", "i2c0", "nmk-i2c.0"), | ||
440 | /* i2c0 sleep state */ | ||
441 | DB8500_PIN_SLEEP("GPIO147_C15", slpm_in_nopull_wkup_pdis, "nmk-i2c.0"), /* SDA */ | ||
442 | DB8500_PIN_SLEEP("GPIO148_B16", slpm_in_nopull_wkup_pdis, "nmk-i2c.0"), /* SCL */ | ||
443 | /* Mux in i2c1 block, default state */ | ||
444 | DB8500_MUX("i2c1_b_2", "i2c1", "nmk-i2c.1"), | ||
445 | /* i2c1 sleep state */ | ||
446 | DB8500_PIN_SLEEP("GPIO16_AD3", slpm_in_nopull_wkup_pdis, "nmk-i2c.1"), /* SDA */ | ||
447 | DB8500_PIN_SLEEP("GPIO17_AD4", slpm_in_nopull_wkup_pdis, "nmk-i2c.1"), /* SCL */ | ||
448 | /* Mux in i2c2 block, default state */ | ||
449 | DB8500_MUX("i2c2_b_2", "i2c2", "nmk-i2c.2"), | ||
450 | /* i2c2 sleep state */ | ||
451 | DB8500_PIN_SLEEP("GPIO10_AF5", slpm_in_nopull_wkup_pdis, "nmk-i2c.2"), /* SDA */ | ||
452 | DB8500_PIN_SLEEP("GPIO11_AG4", slpm_in_nopull_wkup_pdis, "nmk-i2c.2"), /* SCL */ | ||
453 | /* Mux in i2c3 block, default state */ | ||
454 | DB8500_MUX("i2c3_c_2", "i2c3", "nmk-i2c.3"), | ||
455 | /* i2c3 sleep state */ | ||
456 | DB8500_PIN_SLEEP("GPIO229_AG7", slpm_in_nopull_wkup_pdis, "nmk-i2c.3"), /* SDA */ | ||
457 | DB8500_PIN_SLEEP("GPIO230_AF7", slpm_in_nopull_wkup_pdis, "nmk-i2c.3"), /* SCL */ | ||
458 | /* Mux in SDI0 (here called MC0) used for removable MMC/SD/SDIO cards */ | ||
459 | DB8500_MUX("mc0_a_1", "mc0", "sdi0"), | ||
460 | DB8500_PIN("GPIO18_AC2", out_hi, "sdi0"), /* CMDDIR */ | ||
461 | DB8500_PIN("GPIO19_AC1", out_hi, "sdi0"), /* DAT0DIR */ | ||
462 | DB8500_PIN("GPIO20_AB4", out_hi, "sdi0"), /* DAT2DIR */ | ||
463 | DB8500_PIN("GPIO22_AA3", in_nopull, "sdi0"), /* FBCLK */ | ||
464 | DB8500_PIN("GPIO23_AA4", out_lo, "sdi0"), /* CLK */ | ||
465 | DB8500_PIN("GPIO24_AB2", in_pu, "sdi0"), /* CMD */ | ||
466 | DB8500_PIN("GPIO25_Y4", in_pu, "sdi0"), /* DAT0 */ | ||
467 | DB8500_PIN("GPIO26_Y2", in_pu, "sdi0"), /* DAT1 */ | ||
468 | DB8500_PIN("GPIO27_AA2", in_pu, "sdi0"), /* DAT2 */ | ||
469 | DB8500_PIN("GPIO28_AA1", in_pu, "sdi0"), /* DAT3 */ | ||
470 | /* SDI0 sleep state */ | ||
471 | DB8500_PIN_SLEEP("GPIO18_AC2", slpm_out_hi_wkup_pdis, "sdi0"), | ||
472 | DB8500_PIN_SLEEP("GPIO19_AC1", slpm_out_hi_wkup_pdis, "sdi0"), | ||
473 | DB8500_PIN_SLEEP("GPIO20_AB4", slpm_out_hi_wkup_pdis, "sdi0"), | ||
474 | DB8500_PIN_SLEEP("GPIO22_AA3", slpm_in_wkup_pdis, "sdi0"), | ||
475 | DB8500_PIN_SLEEP("GPIO23_AA4", slpm_out_lo_wkup_pdis, "sdi0"), | ||
476 | DB8500_PIN_SLEEP("GPIO24_AB2", slpm_in_wkup_pdis, "sdi0"), | ||
477 | DB8500_PIN_SLEEP("GPIO25_Y4", slpm_in_wkup_pdis, "sdi0"), | ||
478 | DB8500_PIN_SLEEP("GPIO26_Y2", slpm_in_wkup_pdis, "sdi0"), | ||
479 | DB8500_PIN_SLEEP("GPIO27_AA2", slpm_in_wkup_pdis, "sdi0"), | ||
480 | DB8500_PIN_SLEEP("GPIO28_AA1", slpm_in_wkup_pdis, "sdi0"), | ||
481 | |||
482 | /* Mux in SDI1 (here called MC1) used for SDIO for CW1200 WLAN */ | ||
483 | DB8500_MUX("mc1_a_1", "mc1", "sdi1"), | ||
484 | DB8500_PIN("GPIO208_AH16", out_lo, "sdi1"), /* CLK */ | ||
485 | DB8500_PIN("GPIO209_AG15", in_nopull, "sdi1"), /* FBCLK */ | ||
486 | DB8500_PIN("GPIO210_AJ15", in_pu, "sdi1"), /* CMD */ | ||
487 | DB8500_PIN("GPIO211_AG14", in_pu, "sdi1"), /* DAT0 */ | ||
488 | DB8500_PIN("GPIO212_AF13", in_pu, "sdi1"), /* DAT1 */ | ||
489 | DB8500_PIN("GPIO213_AG13", in_pu, "sdi1"), /* DAT2 */ | ||
490 | DB8500_PIN("GPIO214_AH15", in_pu, "sdi1"), /* DAT3 */ | ||
491 | /* SDI1 sleep state */ | ||
492 | DB8500_PIN_SLEEP("GPIO208_AH16", slpm_out_lo_wkup_pdis, "sdi1"), /* CLK */ | ||
493 | DB8500_PIN_SLEEP("GPIO209_AG15", slpm_in_wkup_pdis, "sdi1"), /* FBCLK */ | ||
494 | DB8500_PIN_SLEEP("GPIO210_AJ15", slpm_in_wkup_pdis, "sdi1"), /* CMD */ | ||
495 | DB8500_PIN_SLEEP("GPIO211_AG14", slpm_in_wkup_pdis, "sdi1"), /* DAT0 */ | ||
496 | DB8500_PIN_SLEEP("GPIO212_AF13", slpm_in_wkup_pdis, "sdi1"), /* DAT1 */ | ||
497 | DB8500_PIN_SLEEP("GPIO213_AG13", slpm_in_wkup_pdis, "sdi1"), /* DAT2 */ | ||
498 | DB8500_PIN_SLEEP("GPIO214_AH15", slpm_in_wkup_pdis, "sdi1"), /* DAT3 */ | ||
499 | |||
500 | /* Mux in SDI2 (here called MC2) used for for PoP eMMC */ | ||
501 | DB8500_MUX("mc2_a_1", "mc2", "sdi2"), | ||
502 | DB8500_PIN("GPIO128_A5", out_lo, "sdi2"), /* CLK */ | ||
503 | DB8500_PIN("GPIO129_B4", in_pu, "sdi2"), /* CMD */ | ||
504 | DB8500_PIN("GPIO130_C8", in_nopull, "sdi2"), /* FBCLK */ | ||
505 | DB8500_PIN("GPIO131_A12", in_pu, "sdi2"), /* DAT0 */ | ||
506 | DB8500_PIN("GPIO132_C10", in_pu, "sdi2"), /* DAT1 */ | ||
507 | DB8500_PIN("GPIO133_B10", in_pu, "sdi2"), /* DAT2 */ | ||
508 | DB8500_PIN("GPIO134_B9", in_pu, "sdi2"), /* DAT3 */ | ||
509 | DB8500_PIN("GPIO135_A9", in_pu, "sdi2"), /* DAT4 */ | ||
510 | DB8500_PIN("GPIO136_C7", in_pu, "sdi2"), /* DAT5 */ | ||
511 | DB8500_PIN("GPIO137_A7", in_pu, "sdi2"), /* DAT6 */ | ||
512 | DB8500_PIN("GPIO138_C5", in_pu, "sdi2"), /* DAT7 */ | ||
513 | /* SDI2 sleep state */ | ||
514 | DB8500_PIN_SLEEP("GPIO128_A5", out_lo_wkup_pdis, "sdi2"), /* CLK */ | ||
515 | DB8500_PIN_SLEEP("GPIO129_B4", in_wkup_pdis_en, "sdi2"), /* CMD */ | ||
516 | DB8500_PIN_SLEEP("GPIO130_C8", in_wkup_pdis_en, "sdi2"), /* FBCLK */ | ||
517 | DB8500_PIN_SLEEP("GPIO131_A12", in_wkup_pdis, "sdi2"), /* DAT0 */ | ||
518 | DB8500_PIN_SLEEP("GPIO132_C10", in_wkup_pdis, "sdi2"), /* DAT1 */ | ||
519 | DB8500_PIN_SLEEP("GPIO133_B10", in_wkup_pdis, "sdi2"), /* DAT2 */ | ||
520 | DB8500_PIN_SLEEP("GPIO134_B9", in_wkup_pdis, "sdi2"), /* DAT3 */ | ||
521 | DB8500_PIN_SLEEP("GPIO135_A9", in_wkup_pdis, "sdi2"), /* DAT4 */ | ||
522 | DB8500_PIN_SLEEP("GPIO136_C7", in_wkup_pdis, "sdi2"), /* DAT5 */ | ||
523 | DB8500_PIN_SLEEP("GPIO137_A7", in_wkup_pdis, "sdi2"), /* DAT6 */ | ||
524 | DB8500_PIN_SLEEP("GPIO138_C5", in_wkup_pdis, "sdi2"), /* DAT7 */ | ||
525 | |||
526 | /* Mux in SDI4 (here called MC4) used for for PCB-mounted eMMC */ | ||
527 | DB8500_MUX("mc4_a_1", "mc4", "sdi4"), | ||
528 | DB8500_PIN("GPIO197_AH24", in_pu, "sdi4"), /* DAT3 */ | ||
529 | DB8500_PIN("GPIO198_AG25", in_pu, "sdi4"), /* DAT2 */ | ||
530 | DB8500_PIN("GPIO199_AH23", in_pu, "sdi4"), /* DAT1 */ | ||
531 | DB8500_PIN("GPIO200_AH26", in_pu, "sdi4"), /* DAT0 */ | ||
532 | DB8500_PIN("GPIO201_AF24", in_pu, "sdi4"), /* CMD */ | ||
533 | DB8500_PIN("GPIO202_AF25", in_nopull, "sdi4"), /* FBCLK */ | ||
534 | DB8500_PIN("GPIO203_AE23", out_lo, "sdi4"), /* CLK */ | ||
535 | DB8500_PIN("GPIO204_AF23", in_pu, "sdi4"), /* DAT7 */ | ||
536 | DB8500_PIN("GPIO205_AG23", in_pu, "sdi4"), /* DAT6 */ | ||
537 | DB8500_PIN("GPIO206_AG24", in_pu, "sdi4"), /* DAT5 */ | ||
538 | DB8500_PIN("GPIO207_AJ23", in_pu, "sdi4"), /* DAT4 */ | ||
539 | /*SDI4 sleep state */ | ||
540 | DB8500_PIN_SLEEP("GPIO197_AH24", slpm_in_wkup_pdis, "sdi4"), /* DAT3 */ | ||
541 | DB8500_PIN_SLEEP("GPIO198_AG25", slpm_in_wkup_pdis, "sdi4"), /* DAT2 */ | ||
542 | DB8500_PIN_SLEEP("GPIO199_AH23", slpm_in_wkup_pdis, "sdi4"), /* DAT1 */ | ||
543 | DB8500_PIN_SLEEP("GPIO200_AH26", slpm_in_wkup_pdis, "sdi4"), /* DAT0 */ | ||
544 | DB8500_PIN_SLEEP("GPIO201_AF24", slpm_in_wkup_pdis, "sdi4"), /* CMD */ | ||
545 | DB8500_PIN_SLEEP("GPIO202_AF25", slpm_in_wkup_pdis, "sdi4"), /* FBCLK */ | ||
546 | DB8500_PIN_SLEEP("GPIO203_AE23", slpm_out_lo_wkup_pdis, "sdi4"), /* CLK */ | ||
547 | DB8500_PIN_SLEEP("GPIO204_AF23", slpm_in_wkup_pdis, "sdi4"), /* DAT7 */ | ||
548 | DB8500_PIN_SLEEP("GPIO205_AG23", slpm_in_wkup_pdis, "sdi4"), /* DAT6 */ | ||
549 | DB8500_PIN_SLEEP("GPIO206_AG24", slpm_in_wkup_pdis, "sdi4"), /* DAT5 */ | ||
550 | DB8500_PIN_SLEEP("GPIO207_AJ23", slpm_in_wkup_pdis, "sdi4"), /* DAT4 */ | ||
551 | |||
552 | /* Mux in USB pins, drive STP high */ | ||
553 | /* USB default state */ | ||
554 | DB8500_MUX("usb_a_1", "usb", "ab8500-usb.0"), | ||
555 | DB8500_PIN("GPIO257_AE29", out_hi, "ab8500-usb.0"), /* STP */ | ||
556 | /* USB sleep state */ | ||
557 | DB8500_PIN_SLEEP("GPIO256_AF28", slpm_wkup_pdis_en, "ab8500-usb.0"), /* NXT */ | ||
558 | DB8500_PIN_SLEEP("GPIO257_AE29", slpm_out_hi_wkup_pdis, "ab8500-usb.0"), /* STP */ | ||
559 | DB8500_PIN_SLEEP("GPIO258_AD29", slpm_wkup_pdis_en, "ab8500-usb.0"), /* XCLK */ | ||
560 | DB8500_PIN_SLEEP("GPIO259_AC29", slpm_wkup_pdis_en, "ab8500-usb.0"), /* DIR */ | ||
561 | DB8500_PIN_SLEEP("GPIO260_AD28", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT7 */ | ||
562 | DB8500_PIN_SLEEP("GPIO261_AD26", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT6 */ | ||
563 | DB8500_PIN_SLEEP("GPIO262_AE26", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT5 */ | ||
564 | DB8500_PIN_SLEEP("GPIO263_AG29", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT4 */ | ||
565 | DB8500_PIN_SLEEP("GPIO264_AE27", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT3 */ | ||
566 | DB8500_PIN_SLEEP("GPIO265_AD27", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT2 */ | ||
567 | DB8500_PIN_SLEEP("GPIO266_AC28", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT1 */ | ||
568 | DB8500_PIN_SLEEP("GPIO267_AC27", slpm_in_wkup_pdis_en, "ab8500-usb.0"), /* DAT0 */ | ||
569 | |||
570 | /* Mux in SPI2 pins on the "other C1" altfunction */ | ||
571 | DB8500_MUX("spi2_oc1_2", "spi2", "spi2"), | ||
572 | DB8500_PIN("GPIO216_AG12", gpio_out_hi, "spi2"), /* FRM */ | ||
573 | DB8500_PIN("GPIO218_AH11", in_pd, "spi2"), /* RXD */ | ||
574 | DB8500_PIN("GPIO215_AH13", out_lo, "spi2"), /* TXD */ | ||
575 | DB8500_PIN("GPIO217_AH12", out_lo, "spi2"), /* CLK */ | ||
576 | /* SPI2 idle state */ | ||
577 | DB8500_PIN_IDLE("GPIO218_AH11", slpm_in_wkup_pdis, "spi2"), /* RXD */ | ||
578 | DB8500_PIN_IDLE("GPIO215_AH13", slpm_out_lo_wkup_pdis, "spi2"), /* TXD */ | ||
579 | DB8500_PIN_IDLE("GPIO217_AH12", slpm_wkup_pdis, "spi2"), /* CLK */ | ||
580 | /* SPI2 sleep state */ | ||
581 | DB8500_PIN_SLEEP("GPIO216_AG12", slpm_in_wkup_pdis, "spi2"), /* FRM */ | ||
582 | DB8500_PIN_SLEEP("GPIO218_AH11", slpm_in_wkup_pdis, "spi2"), /* RXD */ | ||
583 | DB8500_PIN_SLEEP("GPIO215_AH13", slpm_out_lo_wkup_pdis, "spi2"), /* TXD */ | ||
584 | DB8500_PIN_SLEEP("GPIO217_AH12", slpm_wkup_pdis, "spi2"), /* CLK */ | ||
585 | |||
586 | /* ske default state */ | ||
587 | DB8500_MUX("kp_a_2", "kp", "nmk-ske-keypad"), | ||
588 | DB8500_PIN("GPIO153_B17", in_pd, "nmk-ske-keypad"), /* I7 */ | ||
589 | DB8500_PIN("GPIO154_C16", in_pd, "nmk-ske-keypad"), /* I6 */ | ||
590 | DB8500_PIN("GPIO155_C19", in_pd, "nmk-ske-keypad"), /* I5 */ | ||
591 | DB8500_PIN("GPIO156_C17", in_pd, "nmk-ske-keypad"), /* I4 */ | ||
592 | DB8500_PIN("GPIO161_D21", in_pd, "nmk-ske-keypad"), /* I3 */ | ||
593 | DB8500_PIN("GPIO162_D20", in_pd, "nmk-ske-keypad"), /* I2 */ | ||
594 | DB8500_PIN("GPIO163_C20", in_pd, "nmk-ske-keypad"), /* I1 */ | ||
595 | DB8500_PIN("GPIO164_B21", in_pd, "nmk-ske-keypad"), /* I0 */ | ||
596 | DB8500_PIN("GPIO157_A18", out_lo, "nmk-ske-keypad"), /* O7 */ | ||
597 | DB8500_PIN("GPIO158_C18", out_lo, "nmk-ske-keypad"), /* O6 */ | ||
598 | DB8500_PIN("GPIO159_B19", out_lo, "nmk-ske-keypad"), /* O5 */ | ||
599 | DB8500_PIN("GPIO160_B20", out_lo, "nmk-ske-keypad"), /* O4 */ | ||
600 | DB8500_PIN("GPIO165_C21", out_lo, "nmk-ske-keypad"), /* O3 */ | ||
601 | DB8500_PIN("GPIO166_A22", out_lo, "nmk-ske-keypad"), /* O2 */ | ||
602 | DB8500_PIN("GPIO167_B24", out_lo, "nmk-ske-keypad"), /* O1 */ | ||
603 | DB8500_PIN("GPIO168_C22", out_lo, "nmk-ske-keypad"), /* O0 */ | ||
604 | /* ske sleep state */ | ||
605 | DB8500_PIN_SLEEP("GPIO153_B17", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I7 */ | ||
606 | DB8500_PIN_SLEEP("GPIO154_C16", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I6 */ | ||
607 | DB8500_PIN_SLEEP("GPIO155_C19", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I5 */ | ||
608 | DB8500_PIN_SLEEP("GPIO156_C17", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I4 */ | ||
609 | DB8500_PIN_SLEEP("GPIO161_D21", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I3 */ | ||
610 | DB8500_PIN_SLEEP("GPIO162_D20", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I2 */ | ||
611 | DB8500_PIN_SLEEP("GPIO163_C20", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I1 */ | ||
612 | DB8500_PIN_SLEEP("GPIO164_B21", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I0 */ | ||
613 | DB8500_PIN_SLEEP("GPIO157_A18", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O7 */ | ||
614 | DB8500_PIN_SLEEP("GPIO158_C18", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O6 */ | ||
615 | DB8500_PIN_SLEEP("GPIO159_B19", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O5 */ | ||
616 | DB8500_PIN_SLEEP("GPIO160_B20", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O4 */ | ||
617 | DB8500_PIN_SLEEP("GPIO165_C21", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O3 */ | ||
618 | DB8500_PIN_SLEEP("GPIO166_A22", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O2 */ | ||
619 | DB8500_PIN_SLEEP("GPIO167_B24", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O1 */ | ||
620 | DB8500_PIN_SLEEP("GPIO168_C22", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O0 */ | ||
621 | |||
622 | /* STM APE pins states */ | ||
623 | DB8500_MUX_STATE("stmape_c_1", "stmape", | ||
624 | "stm", "ape_mipi34"), | ||
625 | DB8500_PIN_STATE("GPIO70_G5", in_nopull, | ||
626 | "stm", "ape_mipi34"), /* clk */ | ||
627 | DB8500_PIN_STATE("GPIO71_G4", in_nopull, | ||
628 | "stm", "ape_mipi34"), /* dat3 */ | ||
629 | DB8500_PIN_STATE("GPIO72_H4", in_nopull, | ||
630 | "stm", "ape_mipi34"), /* dat2 */ | ||
631 | DB8500_PIN_STATE("GPIO73_H3", in_nopull, | ||
632 | "stm", "ape_mipi34"), /* dat1 */ | ||
633 | DB8500_PIN_STATE("GPIO74_J3", in_nopull, | ||
634 | "stm", "ape_mipi34"), /* dat0 */ | ||
635 | |||
636 | DB8500_PIN_STATE("GPIO70_G5", slpm_out_lo_pdis, | ||
637 | "stm", "ape_mipi34_sleep"), /* clk */ | ||
638 | DB8500_PIN_STATE("GPIO71_G4", slpm_out_lo_pdis, | ||
639 | "stm", "ape_mipi34_sleep"), /* dat3 */ | ||
640 | DB8500_PIN_STATE("GPIO72_H4", slpm_out_lo_pdis, | ||
641 | "stm", "ape_mipi34_sleep"), /* dat2 */ | ||
642 | DB8500_PIN_STATE("GPIO73_H3", slpm_out_lo_pdis, | ||
643 | "stm", "ape_mipi34_sleep"), /* dat1 */ | ||
644 | DB8500_PIN_STATE("GPIO74_J3", slpm_out_lo_pdis, | ||
645 | "stm", "ape_mipi34_sleep"), /* dat0 */ | ||
646 | |||
647 | DB8500_MUX_STATE("stmape_oc1_1", "stmape", | ||
648 | "stm", "ape_microsd"), | ||
649 | DB8500_PIN_STATE("GPIO23_AA4", in_nopull, | ||
650 | "stm", "ape_microsd"), /* clk */ | ||
651 | DB8500_PIN_STATE("GPIO25_Y4", in_nopull, | ||
652 | "stm", "ape_microsd"), /* dat0 */ | ||
653 | DB8500_PIN_STATE("GPIO26_Y2", in_nopull, | ||
654 | "stm", "ape_microsd"), /* dat1 */ | ||
655 | DB8500_PIN_STATE("GPIO27_AA2", in_nopull, | ||
656 | "stm", "ape_microsd"), /* dat2 */ | ||
657 | DB8500_PIN_STATE("GPIO28_AA1", in_nopull, | ||
658 | "stm", "ape_microsd"), /* dat3 */ | ||
659 | |||
660 | DB8500_PIN_STATE("GPIO23_AA4", slpm_out_lo_wkup_pdis, | ||
661 | "stm", "ape_microsd_sleep"), /* clk */ | ||
662 | DB8500_PIN_STATE("GPIO25_Y4", slpm_in_wkup_pdis, | ||
663 | "stm", "ape_microsd_sleep"), /* dat0 */ | ||
664 | DB8500_PIN_STATE("GPIO26_Y2", slpm_in_wkup_pdis, | ||
665 | "stm", "ape_microsd_sleep"), /* dat1 */ | ||
666 | DB8500_PIN_STATE("GPIO27_AA2", slpm_in_wkup_pdis, | ||
667 | "stm", "ape_microsd_sleep"), /* dat2 */ | ||
668 | DB8500_PIN_STATE("GPIO28_AA1", slpm_in_wkup_pdis, | ||
669 | "stm", "ape_microsd_sleep"), /* dat3 */ | ||
670 | |||
671 | /* STM Modem pins states */ | ||
672 | DB8500_MUX_STATE("stmmod_oc3_2", "stmmod", | ||
673 | "stm", "mod_mipi34"), | ||
674 | DB8500_MUX_STATE("uartmodrx_oc3_1", "uartmod", | ||
675 | "stm", "mod_mipi34"), | ||
676 | DB8500_MUX_STATE("uartmodtx_oc3_1", "uartmod", | ||
677 | "stm", "mod_mipi34"), | ||
678 | DB8500_PIN_STATE("GPIO70_G5", in_nopull, | ||
679 | "stm", "mod_mipi34"), /* clk */ | ||
680 | DB8500_PIN_STATE("GPIO71_G4", in_nopull, | ||
681 | "stm", "mod_mipi34"), /* dat3 */ | ||
682 | DB8500_PIN_STATE("GPIO72_H4", in_nopull, | ||
683 | "stm", "mod_mipi34"), /* dat2 */ | ||
684 | DB8500_PIN_STATE("GPIO73_H3", in_nopull, | ||
685 | "stm", "mod_mipi34"), /* dat1 */ | ||
686 | DB8500_PIN_STATE("GPIO74_J3", in_nopull, | ||
687 | "stm", "mod_mipi34"), /* dat0 */ | ||
688 | DB8500_PIN_STATE("GPIO75_H2", in_pu, | ||
689 | "stm", "mod_mipi34"), /* uartmod rx */ | ||
690 | DB8500_PIN_STATE("GPIO76_J2", out_lo, | ||
691 | "stm", "mod_mipi34"), /* uartmod tx */ | ||
692 | |||
693 | DB8500_PIN_STATE("GPIO70_G5", slpm_out_lo_pdis, | ||
694 | "stm", "mod_mipi34_sleep"), /* clk */ | ||
695 | DB8500_PIN_STATE("GPIO71_G4", slpm_out_lo_pdis, | ||
696 | "stm", "mod_mipi34_sleep"), /* dat3 */ | ||
697 | DB8500_PIN_STATE("GPIO72_H4", slpm_out_lo_pdis, | ||
698 | "stm", "mod_mipi34_sleep"), /* dat2 */ | ||
699 | DB8500_PIN_STATE("GPIO73_H3", slpm_out_lo_pdis, | ||
700 | "stm", "mod_mipi34_sleep"), /* dat1 */ | ||
701 | DB8500_PIN_STATE("GPIO74_J3", slpm_out_lo_pdis, | ||
702 | "stm", "mod_mipi34_sleep"), /* dat0 */ | ||
703 | DB8500_PIN_STATE("GPIO75_H2", slpm_in_wkup_pdis, | ||
704 | "stm", "mod_mipi34_sleep"), /* uartmod rx */ | ||
705 | DB8500_PIN_STATE("GPIO76_J2", slpm_out_lo_wkup_pdis, | ||
706 | "stm", "mod_mipi34_sleep"), /* uartmod tx */ | ||
707 | |||
708 | DB8500_MUX_STATE("stmmod_b_1", "stmmod", | ||
709 | "stm", "mod_microsd"), | ||
710 | DB8500_MUX_STATE("uartmodrx_oc3_1", "uartmod", | ||
711 | "stm", "mod_microsd"), | ||
712 | DB8500_MUX_STATE("uartmodtx_oc3_1", "uartmod", | ||
713 | "stm", "mod_microsd"), | ||
714 | DB8500_PIN_STATE("GPIO23_AA4", in_nopull, | ||
715 | "stm", "mod_microsd"), /* clk */ | ||
716 | DB8500_PIN_STATE("GPIO25_Y4", in_nopull, | ||
717 | "stm", "mod_microsd"), /* dat0 */ | ||
718 | DB8500_PIN_STATE("GPIO26_Y2", in_nopull, | ||
719 | "stm", "mod_microsd"), /* dat1 */ | ||
720 | DB8500_PIN_STATE("GPIO27_AA2", in_nopull, | ||
721 | "stm", "mod_microsd"), /* dat2 */ | ||
722 | DB8500_PIN_STATE("GPIO28_AA1", in_nopull, | ||
723 | "stm", "mod_microsd"), /* dat3 */ | ||
724 | DB8500_PIN_STATE("GPIO75_H2", in_pu, | ||
725 | "stm", "mod_microsd"), /* uartmod rx */ | ||
726 | DB8500_PIN_STATE("GPIO76_J2", out_lo, | ||
727 | "stm", "mod_microsd"), /* uartmod tx */ | ||
728 | |||
729 | DB8500_PIN_STATE("GPIO23_AA4", slpm_out_lo_wkup_pdis, | ||
730 | "stm", "mod_microsd_sleep"), /* clk */ | ||
731 | DB8500_PIN_STATE("GPIO25_Y4", slpm_in_wkup_pdis, | ||
732 | "stm", "mod_microsd_sleep"), /* dat0 */ | ||
733 | DB8500_PIN_STATE("GPIO26_Y2", slpm_in_wkup_pdis, | ||
734 | "stm", "mod_microsd_sleep"), /* dat1 */ | ||
735 | DB8500_PIN_STATE("GPIO27_AA2", slpm_in_wkup_pdis, | ||
736 | "stm", "mod_microsd_sleep"), /* dat2 */ | ||
737 | DB8500_PIN_STATE("GPIO28_AA1", slpm_in_wkup_pdis, | ||
738 | "stm", "mod_microsd_sleep"), /* dat3 */ | ||
739 | DB8500_PIN_STATE("GPIO75_H2", slpm_in_wkup_pdis, | ||
740 | "stm", "mod_microsd_sleep"), /* uartmod rx */ | ||
741 | DB8500_PIN_STATE("GPIO76_J2", slpm_out_lo_wkup_pdis, | ||
742 | "stm", "mod_microsd_sleep"), /* uartmod tx */ | ||
743 | |||
744 | /* STM dual Modem/APE pins state */ | ||
745 | DB8500_MUX_STATE("stmmod_oc3_2", "stmmod", | ||
746 | "stm", "mod_mipi34_ape_mipi60"), | ||
747 | DB8500_MUX_STATE("stmape_c_2", "stmape", | ||
748 | "stm", "mod_mipi34_ape_mipi60"), | ||
749 | DB8500_MUX_STATE("uartmodrx_oc3_1", "uartmod", | ||
750 | "stm", "mod_mipi34_ape_mipi60"), | ||
751 | DB8500_MUX_STATE("uartmodtx_oc3_1", "uartmod", | ||
752 | "stm", "mod_mipi34_ape_mipi60"), | ||
753 | DB8500_PIN_STATE("GPIO70_G5", in_nopull, | ||
754 | "stm", "mod_mipi34_ape_mipi60"), /* clk */ | ||
755 | DB8500_PIN_STATE("GPIO71_G4", in_nopull, | ||
756 | "stm", "mod_mipi34_ape_mipi60"), /* dat3 */ | ||
757 | DB8500_PIN_STATE("GPIO72_H4", in_nopull, | ||
758 | "stm", "mod_mipi34_ape_mipi60"), /* dat2 */ | ||
759 | DB8500_PIN_STATE("GPIO73_H3", in_nopull, | ||
760 | "stm", "mod_mipi34_ape_mipi60"), /* dat1 */ | ||
761 | DB8500_PIN_STATE("GPIO74_J3", in_nopull, | ||
762 | "stm", "mod_mipi34_ape_mipi60"), /* dat0 */ | ||
763 | DB8500_PIN_STATE("GPIO75_H2", in_pu, | ||
764 | "stm", "mod_mipi34_ape_mipi60"), /* uartmod rx */ | ||
765 | DB8500_PIN_STATE("GPIO76_J2", out_lo, | ||
766 | "stm", "mod_mipi34_ape_mipi60"), /* uartmod tx */ | ||
767 | DB8500_PIN_STATE("GPIO155_C19", in_nopull, | ||
768 | "stm", "mod_mipi34_ape_mipi60"), /* clk */ | ||
769 | DB8500_PIN_STATE("GPIO156_C17", in_nopull, | ||
770 | "stm", "mod_mipi34_ape_mipi60"), /* dat3 */ | ||
771 | DB8500_PIN_STATE("GPIO157_A18", in_nopull, | ||
772 | "stm", "mod_mipi34_ape_mipi60"), /* dat2 */ | ||
773 | DB8500_PIN_STATE("GPIO158_C18", in_nopull, | ||
774 | "stm", "mod_mipi34_ape_mipi60"), /* dat1 */ | ||
775 | DB8500_PIN_STATE("GPIO159_B19", in_nopull, | ||
776 | "stm", "mod_mipi34_ape_mipi60"), /* dat0 */ | ||
777 | |||
778 | DB8500_PIN_STATE("GPIO70_G5", slpm_out_lo_pdis, | ||
779 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* clk */ | ||
780 | DB8500_PIN_STATE("GPIO71_G4", slpm_out_lo_pdis, | ||
781 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat3 */ | ||
782 | DB8500_PIN_STATE("GPIO72_H4", slpm_out_lo_pdis, | ||
783 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat2 */ | ||
784 | DB8500_PIN_STATE("GPIO73_H3", slpm_out_lo_pdis, | ||
785 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat1 */ | ||
786 | DB8500_PIN_STATE("GPIO74_J3", slpm_out_lo_pdis, | ||
787 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat0 */ | ||
788 | DB8500_PIN_STATE("GPIO75_H2", slpm_in_wkup_pdis, | ||
789 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* uartmod rx */ | ||
790 | DB8500_PIN_STATE("GPIO76_J2", slpm_out_lo_wkup_pdis, | ||
791 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* uartmod tx */ | ||
792 | DB8500_PIN_STATE("GPIO155_C19", slpm_in_wkup_pdis, | ||
793 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* clk */ | ||
794 | DB8500_PIN_STATE("GPIO156_C17", slpm_in_wkup_pdis, | ||
795 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat3 */ | ||
796 | DB8500_PIN_STATE("GPIO157_A18", slpm_in_wkup_pdis, | ||
797 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat2 */ | ||
798 | DB8500_PIN_STATE("GPIO158_C18", slpm_in_wkup_pdis, | ||
799 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat1 */ | ||
800 | DB8500_PIN_STATE("GPIO159_B19", slpm_in_wkup_pdis, | ||
801 | "stm", "mod_mipi34_ape_mipi60_sleep"), /* dat0 */ | ||
802 | }; | ||
803 | |||
804 | /* | ||
805 | * These are specifically for the MOP500 and HREFP (pre-v60) version of the | ||
806 | * board, which utilized a TC35892 GPIO expander instead of using a lot of | ||
807 | * on-chip pins as the HREFv60 and later does. | ||
808 | */ | ||
809 | static struct pinctrl_map __initdata mop500_pinmap[] = { | ||
810 | /* Mux in SSP0, pull down RXD pin */ | ||
811 | DB8500_MUX_HOG("ssp0_a_1", "ssp0"), | ||
812 | DB8500_PIN_HOG("GPIO145_C13", pd), | ||
813 | /* | ||
814 | * XENON Flashgun on image processor GPIO (controlled from image | ||
815 | * processor firmware), mux in these image processor GPIO lines 0 | ||
816 | * (XENON_FLASH_ID) and 1 (XENON_READY) on altfunction C and pull up | ||
817 | * the pins. | ||
818 | */ | ||
819 | DB8500_MUX_HOG("ipgpio0_c_1", "ipgpio"), | ||
820 | DB8500_MUX_HOG("ipgpio1_c_1", "ipgpio"), | ||
821 | DB8500_PIN_HOG("GPIO6_AF6", in_pu), | ||
822 | DB8500_PIN_HOG("GPIO7_AG5", in_pu), | ||
823 | /* TC35892 IRQ, pull up the line, let the driver mux in the pin */ | ||
824 | DB8500_PIN_HOG("GPIO217_AH12", gpio_in_pu), | ||
825 | /* Mux in UART1 and set the pull-ups */ | ||
826 | DB8500_MUX_HOG("u1rxtx_a_1", "u1"), | ||
827 | DB8500_PIN_HOG("GPIO4_AH6", in_pu), /* RXD */ | ||
828 | DB8500_PIN_HOG("GPIO5_AG6", out_hi), /* TXD */ | ||
829 | /* | ||
830 | * Runtime stuff: make it possible to mux in the SKE keypad | ||
831 | * and bias the pins | ||
832 | */ | ||
833 | /* ske default state */ | ||
834 | DB8500_MUX("kp_a_2", "kp", "nmk-ske-keypad"), | ||
835 | DB8500_PIN("GPIO153_B17", in_pu, "nmk-ske-keypad"), /* I7 */ | ||
836 | DB8500_PIN("GPIO154_C16", in_pu, "nmk-ske-keypad"), /* I6 */ | ||
837 | DB8500_PIN("GPIO155_C19", in_pu, "nmk-ske-keypad"), /* I5 */ | ||
838 | DB8500_PIN("GPIO156_C17", in_pu, "nmk-ske-keypad"), /* I4 */ | ||
839 | DB8500_PIN("GPIO161_D21", in_pu, "nmk-ske-keypad"), /* I3 */ | ||
840 | DB8500_PIN("GPIO162_D20", in_pu, "nmk-ske-keypad"), /* I2 */ | ||
841 | DB8500_PIN("GPIO163_C20", in_pu, "nmk-ske-keypad"), /* I1 */ | ||
842 | DB8500_PIN("GPIO164_B21", in_pu, "nmk-ske-keypad"), /* I0 */ | ||
843 | DB8500_PIN("GPIO157_A18", out_lo, "nmk-ske-keypad"), /* O7 */ | ||
844 | DB8500_PIN("GPIO158_C18", out_lo, "nmk-ske-keypad"), /* O6 */ | ||
845 | DB8500_PIN("GPIO159_B19", out_lo, "nmk-ske-keypad"), /* O5 */ | ||
846 | DB8500_PIN("GPIO160_B20", out_lo, "nmk-ske-keypad"), /* O4 */ | ||
847 | DB8500_PIN("GPIO165_C21", out_lo, "nmk-ske-keypad"), /* O3 */ | ||
848 | DB8500_PIN("GPIO166_A22", out_lo, "nmk-ske-keypad"), /* O2 */ | ||
849 | DB8500_PIN("GPIO167_B24", out_lo, "nmk-ske-keypad"), /* O1 */ | ||
850 | DB8500_PIN("GPIO168_C22", out_lo, "nmk-ske-keypad"), /* O0 */ | ||
851 | /* ske sleep state */ | ||
852 | DB8500_PIN_SLEEP("GPIO153_B17", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I7 */ | ||
853 | DB8500_PIN_SLEEP("GPIO154_C16", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I6 */ | ||
854 | DB8500_PIN_SLEEP("GPIO155_C19", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I5 */ | ||
855 | DB8500_PIN_SLEEP("GPIO156_C17", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I4 */ | ||
856 | DB8500_PIN_SLEEP("GPIO161_D21", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I3 */ | ||
857 | DB8500_PIN_SLEEP("GPIO162_D20", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I2 */ | ||
858 | DB8500_PIN_SLEEP("GPIO163_C20", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I1 */ | ||
859 | DB8500_PIN_SLEEP("GPIO164_B21", slpm_in_pu_wkup_pdis_en, "nmk-ske-keypad"), /* I0 */ | ||
860 | DB8500_PIN_SLEEP("GPIO157_A18", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O7 */ | ||
861 | DB8500_PIN_SLEEP("GPIO158_C18", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O6 */ | ||
862 | DB8500_PIN_SLEEP("GPIO159_B19", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O5 */ | ||
863 | DB8500_PIN_SLEEP("GPIO160_B20", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O4 */ | ||
864 | DB8500_PIN_SLEEP("GPIO165_C21", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O3 */ | ||
865 | DB8500_PIN_SLEEP("GPIO166_A22", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O2 */ | ||
866 | DB8500_PIN_SLEEP("GPIO167_B24", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O1 */ | ||
867 | DB8500_PIN_SLEEP("GPIO168_C22", slpm_out_lo_pdis, "nmk-ske-keypad"), /* O0 */ | ||
868 | |||
869 | /* Mux in and drive the SDI0 DAT31DIR line high at runtime */ | ||
870 | DB8500_MUX("mc0dat31dir_a_1", "mc0", "sdi0"), | ||
871 | DB8500_PIN("GPIO21_AB3", out_hi, "sdi0"), | ||
872 | }; | ||
873 | |||
874 | /* | ||
875 | * The HREFv60 series of platforms is using available pins on the DB8500 | ||
876 | * insteaf of the Toshiba I2C GPIO expander, reusing some pins like the SSP0 | ||
877 | * and SSP1 ports (previously connected to the AB8500) as generic GPIO lines. | ||
878 | */ | ||
879 | static struct pinctrl_map __initdata hrefv60_pinmap[] = { | ||
880 | /* Drive WLAN_ENA low */ | ||
881 | DB8500_PIN_HOG("GPIO85_D5", gpio_out_lo), /* WLAN_ENA */ | ||
882 | /* | ||
883 | * XENON Flashgun on image processor GPIO (controlled from image | ||
884 | * processor firmware), mux in these image processor GPIO lines 0 | ||
885 | * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant | ||
886 | * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias | ||
887 | * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output. | ||
888 | */ | ||
889 | DB8500_MUX_HOG("ipgpio0_c_1", "ipgpio"), | ||
890 | DB8500_MUX_HOG("ipgpio1_c_1", "ipgpio"), | ||
891 | DB8500_MUX_HOG("ipgpio4_c_1", "ipgpio"), | ||
892 | DB8500_PIN_HOG("GPIO6_AF6", in_pu), /* XENON_FLASH_ID */ | ||
893 | DB8500_PIN_HOG("GPIO7_AG5", in_pu), /* XENON_READY */ | ||
894 | DB8500_PIN_HOG("GPIO21_AB3", gpio_out_lo), /* XENON_EN1 */ | ||
895 | DB8500_PIN_HOG("GPIO64_F3", out_lo), /* XENON_EN2 */ | ||
896 | /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ | ||
897 | DB8500_PIN_HOG("GPIO31_V3", gpio_in_pu), /* EN1 */ | ||
898 | DB8500_PIN_HOG("GPIO32_V2", gpio_in_pd), /* DRDY */ | ||
899 | /* | ||
900 | * Display Interface 1 uses GPIO 65 for RST (reset). | ||
901 | * Display Interface 2 uses GPIO 66 for RST (reset). | ||
902 | * Drive DISP1 reset high (not reset), driver DISP2 reset low (reset) | ||
903 | */ | ||
904 | DB8500_PIN_HOG("GPIO65_F1", gpio_out_hi), /* DISP1 NO RST */ | ||
905 | DB8500_PIN_HOG("GPIO66_G3", gpio_out_lo), /* DISP2 RST */ | ||
906 | /* | ||
907 | * Touch screen uses GPIO 143 for RST1, GPIO 146 for RST2 and | ||
908 | * GPIO 67 for interrupts. Pull-up the IRQ line and drive both | ||
909 | * reset signals low. | ||
910 | */ | ||
911 | DB8500_PIN_HOG("GPIO143_D12", gpio_out_lo), /* TOUCH_RST1 */ | ||
912 | DB8500_PIN_HOG("GPIO67_G2", gpio_in_pu), /* TOUCH_INT2 */ | ||
913 | DB8500_PIN_HOG("GPIO146_D13", gpio_out_lo), /* TOUCH_RST2 */ | ||
914 | /* | ||
915 | * Drive D19-D23 for the ETM PTM trace interface low, | ||
916 | * (presumably pins are unconnected therefore grounded here, | ||
917 | * the "other alt C1" setting enables these pins) | ||
918 | */ | ||
919 | DB8500_PIN_HOG("GPIO70_G5", gpio_out_lo), | ||
920 | DB8500_PIN_HOG("GPIO71_G4", gpio_out_lo), | ||
921 | DB8500_PIN_HOG("GPIO72_H4", gpio_out_lo), | ||
922 | DB8500_PIN_HOG("GPIO73_H3", gpio_out_lo), | ||
923 | DB8500_PIN_HOG("GPIO74_J3", gpio_out_lo), | ||
924 | /* NAHJ CTRL on GPIO 76 to low, CTRL_INV on GPIO216 to high */ | ||
925 | DB8500_PIN_HOG("GPIO76_J2", gpio_out_lo), /* CTRL */ | ||
926 | DB8500_PIN_HOG("GPIO216_AG12", gpio_out_hi), /* CTRL_INV */ | ||
927 | /* NFC ENA and RESET to low, pulldown IRQ line */ | ||
928 | DB8500_PIN_HOG("GPIO77_H1", gpio_out_lo), /* NFC_ENA */ | ||
929 | DB8500_PIN_HOG("GPIO144_B13", gpio_in_pd), /* NFC_IRQ */ | ||
930 | DB8500_PIN_HOG("GPIO142_C11", gpio_out_lo), /* NFC_RESET */ | ||
931 | /* | ||
932 | * SKE keyboard partly on alt A and partly on "Other alt C1" | ||
933 | * Driver KP_O1,2,3,6,7 low and pull up KP_I 0,2,3 for three | ||
934 | * rows of 6 keys, then pull up force sensing interrup and | ||
935 | * drive reset and force sensing WU low. | ||
936 | */ | ||
937 | DB8500_MUX_HOG("kp_a_1", "kp"), | ||
938 | DB8500_MUX_HOG("kp_oc1_1", "kp"), | ||
939 | DB8500_PIN_HOG("GPIO90_A3", out_lo), /* KP_O1 */ | ||
940 | DB8500_PIN_HOG("GPIO87_B3", out_lo), /* KP_O2 */ | ||
941 | DB8500_PIN_HOG("GPIO86_C6", out_lo), /* KP_O3 */ | ||
942 | DB8500_PIN_HOG("GPIO96_D8", out_lo), /* KP_O6 */ | ||
943 | DB8500_PIN_HOG("GPIO94_D7", out_lo), /* KP_O7 */ | ||
944 | DB8500_PIN_HOG("GPIO93_B7", in_pu), /* KP_I0 */ | ||
945 | DB8500_PIN_HOG("GPIO89_E6", in_pu), /* KP_I2 */ | ||
946 | DB8500_PIN_HOG("GPIO88_C4", in_pu), /* KP_I3 */ | ||
947 | DB8500_PIN_HOG("GPIO91_B6", gpio_in_pu), /* FORCE_SENSING_INT */ | ||
948 | DB8500_PIN_HOG("GPIO92_D6", gpio_out_lo), /* FORCE_SENSING_RST */ | ||
949 | DB8500_PIN_HOG("GPIO97_D9", gpio_out_lo), /* FORCE_SENSING_WU */ | ||
950 | /* DiPro Sensor interrupt */ | ||
951 | DB8500_PIN_HOG("GPIO139_C9", gpio_in_pu), /* DIPRO_INT */ | ||
952 | /* Audio Amplifier HF enable */ | ||
953 | DB8500_PIN_HOG("GPIO149_B14", gpio_out_hi), /* VAUDIO_HF_EN, enable MAX8968 */ | ||
954 | /* GBF interface, pull low to reset state */ | ||
955 | DB8500_PIN_HOG("GPIO171_D23", gpio_out_lo), /* GBF_ENA_RESET */ | ||
956 | /* MSP : HDTV INTERFACE GPIO line */ | ||
957 | DB8500_PIN_HOG("GPIO192_AJ27", gpio_in_pd), | ||
958 | /* Accelerometer interrupt lines */ | ||
959 | DB8500_PIN_HOG("GPIO82_C1", gpio_in_pu), /* ACC_INT1 */ | ||
960 | DB8500_PIN_HOG("GPIO83_D3", gpio_in_pu), /* ACC_INT2 */ | ||
961 | /* SD card detect GPIO pin */ | ||
962 | DB8500_PIN_HOG("GPIO95_E8", gpio_in_pu), | ||
963 | /* | ||
964 | * Runtime stuff | ||
965 | * Pull up/down of some sensor GPIO pins, for proximity, HAL sensor | ||
966 | * etc. | ||
967 | */ | ||
968 | DB8500_PIN("GPIO217_AH12", gpio_in_pu_slpm_gpio_nopull, "gpio-keys.0"), | ||
969 | DB8500_PIN("GPIO145_C13", gpio_in_pd_slpm_gpio_nopull, "gpio-keys.0"), | ||
970 | DB8500_PIN("GPIO139_C9", gpio_in_pu_slpm_gpio_nopull, "gpio-keys.0"), | ||
971 | }; | ||
972 | |||
973 | static struct pinctrl_map __initdata u9500_pinmap[] = { | ||
974 | /* Mux in UART1 (just RX/TX) and set the pull-ups */ | ||
975 | DB8500_MUX_HOG("u1rxtx_a_1", "u1"), | ||
976 | DB8500_PIN_HOG("GPIO4_AH6", in_pu), | ||
977 | DB8500_PIN_HOG("GPIO5_AG6", out_hi), | ||
978 | /* WLAN_IRQ line */ | ||
979 | DB8500_PIN_HOG("GPIO144_B13", gpio_in_pu), | ||
980 | /* HSI */ | ||
981 | DB8500_MUX_HOG("hsir_a_1", "hsi"), | ||
982 | DB8500_MUX_HOG("hsit_a_2", "hsi"), | ||
983 | DB8500_PIN_HOG("GPIO219_AG10", in_pd), /* RX FLA0 */ | ||
984 | DB8500_PIN_HOG("GPIO220_AH10", in_pd), /* RX DAT0 */ | ||
985 | DB8500_PIN_HOG("GPIO221_AJ11", out_lo), /* RX RDY0 */ | ||
986 | DB8500_PIN_HOG("GPIO222_AJ9", out_lo), /* TX FLA0 */ | ||
987 | DB8500_PIN_HOG("GPIO223_AH9", out_lo), /* TX DAT0 */ | ||
988 | DB8500_PIN_HOG("GPIO224_AG9", in_pd), /* TX RDY0 */ | ||
989 | DB8500_PIN_HOG("GPIO225_AG8", in_pd), /* CAWAKE0 */ | ||
990 | DB8500_PIN_HOG("GPIO226_AF8", gpio_out_hi), /* ACWAKE0 */ | ||
991 | }; | ||
992 | |||
993 | static struct pinctrl_map __initdata u8500_pinmap[] = { | ||
994 | DB8500_PIN_HOG("GPIO226_AF8", gpio_out_lo), /* WLAN_PMU_EN */ | ||
995 | DB8500_PIN_HOG("GPIO4_AH6", gpio_in_pu), /* WLAN_IRQ */ | ||
996 | }; | ||
997 | |||
998 | static struct pinctrl_map __initdata snowball_pinmap[] = { | ||
999 | /* Mux in SSP0 connected to AB8500, pull down RXD pin */ | ||
1000 | DB8500_MUX_HOG("ssp0_a_1", "ssp0"), | ||
1001 | DB8500_PIN_HOG("GPIO145_C13", pd), | ||
1002 | /* Always drive the MC0 DAT31DIR line high on these boards */ | ||
1003 | DB8500_PIN_HOG("GPIO21_AB3", out_hi), | ||
1004 | /* Mux in "SM" which is used for the SMSC911x Ethernet adapter */ | ||
1005 | DB8500_MUX_HOG("sm_b_1", "sm"), | ||
1006 | /* User LED */ | ||
1007 | DB8500_PIN_HOG("GPIO142_C11", gpio_out_hi), | ||
1008 | /* Drive RSTn_LAN high */ | ||
1009 | DB8500_PIN_HOG("GPIO141_C12", gpio_out_hi), | ||
1010 | /* Accelerometer/Magnetometer */ | ||
1011 | DB8500_PIN_HOG("GPIO163_C20", gpio_in_pu), /* ACCEL_IRQ1 */ | ||
1012 | DB8500_PIN_HOG("GPIO164_B21", gpio_in_pu), /* ACCEL_IRQ2 */ | ||
1013 | DB8500_PIN_HOG("GPIO165_C21", gpio_in_pu), /* MAG_DRDY */ | ||
1014 | /* WLAN/GBF */ | ||
1015 | DB8500_PIN_HOG("GPIO161_D21", gpio_out_lo), /* WLAN_PMU_EN */ | ||
1016 | DB8500_PIN_HOG("GPIO171_D23", gpio_out_hi), /* GBF_ENA */ | ||
1017 | DB8500_PIN_HOG("GPIO215_AH13", gpio_out_lo), /* WLAN_ENA */ | ||
1018 | DB8500_PIN_HOG("GPIO216_AG12", gpio_in_pu), /* WLAN_IRQ */ | ||
1019 | }; | ||
1020 | |||
1021 | /* | ||
1022 | * passing "pinsfor=" in kernel cmdline allows for custom | ||
1023 | * configuration of GPIOs on u8500 derived boards. | ||
1024 | */ | ||
1025 | static int __init early_pinsfor(char *p) | ||
1026 | { | ||
1027 | pinsfor = PINS_FOR_DEFAULT; | ||
1028 | |||
1029 | if (strcmp(p, "u9500-21") == 0) | ||
1030 | pinsfor = PINS_FOR_U9500; | ||
1031 | |||
1032 | return 0; | ||
1033 | } | ||
1034 | early_param("pinsfor", early_pinsfor); | ||
1035 | |||
1036 | int pins_for_u9500(void) | ||
1037 | { | ||
1038 | if (pinsfor == PINS_FOR_U9500) | ||
1039 | return 1; | ||
1040 | |||
1041 | return 0; | ||
1042 | } | ||
1043 | |||
1044 | static void __init mop500_href_family_pinmaps_init(void) | ||
1045 | { | ||
1046 | switch (pinsfor) { | ||
1047 | case PINS_FOR_U9500: | ||
1048 | pinctrl_register_mappings(u9500_pinmap, | ||
1049 | ARRAY_SIZE(u9500_pinmap)); | ||
1050 | break; | ||
1051 | case PINS_FOR_DEFAULT: | ||
1052 | pinctrl_register_mappings(u8500_pinmap, | ||
1053 | ARRAY_SIZE(u8500_pinmap)); | ||
1054 | default: | ||
1055 | break; | ||
1056 | } | ||
1057 | } | ||
1058 | |||
1059 | void __init mop500_pinmaps_init(void) | 271 | void __init mop500_pinmaps_init(void) |
1060 | { | 272 | { |
1061 | pinctrl_register_mappings(mop500_family_pinmap, | ||
1062 | ARRAY_SIZE(mop500_family_pinmap)); | ||
1063 | pinctrl_register_mappings(mop500_pinmap, | ||
1064 | ARRAY_SIZE(mop500_pinmap)); | ||
1065 | mop500_href_family_pinmaps_init(); | ||
1066 | if (machine_is_u8520()) | 273 | if (machine_is_u8520()) |
1067 | pinctrl_register_mappings(ab8505_pinmap, | 274 | pinctrl_register_mappings(ab8505_pinmap, |
1068 | ARRAY_SIZE(ab8505_pinmap)); | 275 | ARRAY_SIZE(ab8505_pinmap)); |
@@ -1073,23 +280,12 @@ void __init mop500_pinmaps_init(void) | |||
1073 | 280 | ||
1074 | void __init snowball_pinmaps_init(void) | 281 | void __init snowball_pinmaps_init(void) |
1075 | { | 282 | { |
1076 | pinctrl_register_mappings(mop500_family_pinmap, | ||
1077 | ARRAY_SIZE(mop500_family_pinmap)); | ||
1078 | pinctrl_register_mappings(snowball_pinmap, | ||
1079 | ARRAY_SIZE(snowball_pinmap)); | ||
1080 | pinctrl_register_mappings(u8500_pinmap, | ||
1081 | ARRAY_SIZE(u8500_pinmap)); | ||
1082 | pinctrl_register_mappings(ab8500_pinmap, | 283 | pinctrl_register_mappings(ab8500_pinmap, |
1083 | ARRAY_SIZE(ab8500_pinmap)); | 284 | ARRAY_SIZE(ab8500_pinmap)); |
1084 | } | 285 | } |
1085 | 286 | ||
1086 | void __init hrefv60_pinmaps_init(void) | 287 | void __init hrefv60_pinmaps_init(void) |
1087 | { | 288 | { |
1088 | pinctrl_register_mappings(mop500_family_pinmap, | ||
1089 | ARRAY_SIZE(mop500_family_pinmap)); | ||
1090 | pinctrl_register_mappings(hrefv60_pinmap, | ||
1091 | ARRAY_SIZE(hrefv60_pinmap)); | ||
1092 | mop500_href_family_pinmaps_init(); | ||
1093 | pinctrl_register_mappings(ab8500_pinmap, | 289 | pinctrl_register_mappings(ab8500_pinmap, |
1094 | ARRAY_SIZE(ab8500_pinmap)); | 290 | ARRAY_SIZE(ab8500_pinmap)); |
1095 | } | 291 | } |
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 26600a1c5319..fcbf3a13a539 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -14,10 +14,8 @@ | |||
14 | #include <linux/platform_data/dma-ste-dma40.h> | 14 | #include <linux/platform_data/dma-ste-dma40.h> |
15 | 15 | ||
16 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
17 | #include "devices.h" | ||
18 | 17 | ||
19 | #include "db8500-regs.h" | 18 | #include "db8500-regs.h" |
20 | #include "devices-db8500.h" | ||
21 | #include "board-mop500.h" | 19 | #include "board-mop500.h" |
22 | #include "ste-dma40-db8500.h" | 20 | #include "ste-dma40-db8500.h" |
23 | 21 | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c deleted file mode 100644 index 514d40b625a4..000000000000 --- a/arch/arm/mach-ux500/board-mop500.c +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2012 ST-Ericsson | ||
3 | * | ||
4 | * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2, as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/clk.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/platform_data/db8500_thermal.h> | ||
18 | #include <linux/amba/bus.h> | ||
19 | #include <linux/amba/pl022.h> | ||
20 | #include <linux/mfd/abx500/ab8500.h> | ||
21 | #include <linux/regulator/ab8500.h> | ||
22 | #include <linux/regulator/fixed.h> | ||
23 | #include <linux/regulator/driver.h> | ||
24 | #include <linux/mfd/tps6105x.h> | ||
25 | #include <linux/platform_data/leds-lp55xx.h> | ||
26 | #include <linux/input.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/leds.h> | ||
29 | #include <linux/pinctrl/consumer.h> | ||
30 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
31 | #include <linux/platform_data/dma-ste-dma40.h> | ||
32 | |||
33 | #include <asm/mach-types.h> | ||
34 | |||
35 | #include "setup.h" | ||
36 | #include "devices.h" | ||
37 | #include "irqs.h" | ||
38 | |||
39 | #include "ste-dma40-db8500.h" | ||
40 | #include "db8500-regs.h" | ||
41 | #include "devices-db8500.h" | ||
42 | #include "board-mop500.h" | ||
43 | #include "board-mop500-regulators.h" | ||
44 | |||
45 | struct ab8500_platform_data ab8500_platdata = { | ||
46 | .irq_base = MOP500_AB8500_IRQ_BASE, | ||
47 | .regulator = &ab8500_regulator_plat_data, | ||
48 | }; | ||
49 | |||
50 | #ifdef CONFIG_STE_DMA40 | ||
51 | static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { | ||
52 | .mode = STEDMA40_MODE_LOGICAL, | ||
53 | .dir = DMA_DEV_TO_MEM, | ||
54 | .dev_type = DB8500_DMA_DEV8_SSP0, | ||
55 | }; | ||
56 | |||
57 | static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { | ||
58 | .mode = STEDMA40_MODE_LOGICAL, | ||
59 | .dir = DMA_MEM_TO_DEV, | ||
60 | .dev_type = DB8500_DMA_DEV8_SSP0, | ||
61 | }; | ||
62 | #endif | ||
63 | |||
64 | struct pl022_ssp_controller ssp0_plat = { | ||
65 | .bus_id = 0, | ||
66 | #ifdef CONFIG_STE_DMA40 | ||
67 | .enable_dma = 1, | ||
68 | .dma_filter = stedma40_filter, | ||
69 | .dma_rx_param = &ssp0_dma_cfg_rx, | ||
70 | .dma_tx_param = &ssp0_dma_cfg_tx, | ||
71 | #else | ||
72 | .enable_dma = 0, | ||
73 | #endif | ||
74 | /* on this platform, gpio 31,142,144,214 & | ||
75 | * 224 are connected as chip selects | ||
76 | */ | ||
77 | .num_chipselect = 5, | ||
78 | }; | ||
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 511d6febbe99..d48e8662c676 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h | |||
@@ -87,7 +87,6 @@ extern struct msp_i2s_platform_data msp0_platform_data; | |||
87 | extern struct msp_i2s_platform_data msp1_platform_data; | 87 | extern struct msp_i2s_platform_data msp1_platform_data; |
88 | extern struct msp_i2s_platform_data msp2_platform_data; | 88 | extern struct msp_i2s_platform_data msp2_platform_data; |
89 | extern struct msp_i2s_platform_data msp3_platform_data; | 89 | extern struct msp_i2s_platform_data msp3_platform_data; |
90 | extern struct pl022_ssp_controller ssp0_plat; | ||
91 | 90 | ||
92 | void __init mop500_pinmaps_init(void); | 91 | void __init mop500_pinmaps_init(void); |
93 | void __init snowball_pinmaps_init(void); | 92 | void __init snowball_pinmaps_init(void); |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 12c7e5c03ea4..d8f5ce430fa7 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -21,21 +21,32 @@ | |||
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <linux/regulator/machine.h> | 23 | #include <linux/regulator/machine.h> |
24 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
25 | #include <linux/random.h> | 24 | #include <linux/random.h> |
26 | 25 | ||
27 | #include <asm/pmu.h> | 26 | #include <asm/pmu.h> |
28 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
29 | 28 | ||
30 | #include "setup.h" | 29 | #include "setup.h" |
31 | #include "devices.h" | ||
32 | #include "irqs.h" | 30 | #include "irqs.h" |
33 | 31 | ||
34 | #include "devices-db8500.h" | 32 | #include "board-mop500-regulators.h" |
35 | #include "db8500-regs.h" | ||
36 | #include "board-mop500.h" | 33 | #include "board-mop500.h" |
34 | #include "db8500-regs.h" | ||
37 | #include "id.h" | 35 | #include "id.h" |
38 | 36 | ||
37 | struct ab8500_platform_data ab8500_platdata = { | ||
38 | .irq_base = MOP500_AB8500_IRQ_BASE, | ||
39 | .regulator = &ab8500_regulator_plat_data, | ||
40 | }; | ||
41 | |||
42 | struct prcmu_pdata db8500_prcmu_pdata = { | ||
43 | .ab_platdata = &ab8500_platdata, | ||
44 | .ab_irq = IRQ_DB8500_AB8500, | ||
45 | .irq_base = IRQ_PRCMU_BASE, | ||
46 | .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, | ||
47 | .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, | ||
48 | }; | ||
49 | |||
39 | /* minimum static i/o mapping required to boot U8500 platforms */ | 50 | /* minimum static i/o mapping required to boot U8500 platforms */ |
40 | static struct map_desc u8500_uart_io_desc[] __initdata = { | 51 | static struct map_desc u8500_uart_io_desc[] __initdata = { |
41 | __IO_DEV_DESC(U8500_UART0_BASE, SZ_4K), | 52 | __IO_DEV_DESC(U8500_UART0_BASE, SZ_4K), |
@@ -159,9 +170,6 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
159 | OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL), | 170 | OF_DEV_AUXDATA("stericsson,ux500-hash", 0xa03c2000, "hash1", NULL), |
160 | OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0", | 171 | OF_DEV_AUXDATA("stericsson,snd-soc-mop500", 0, "snd-soc-mop500.0", |
161 | NULL), | 172 | NULL), |
162 | /* Requires device name bindings. */ | ||
163 | OF_DEV_AUXDATA("stericsson,db8500-pinctrl", U8500_PRCMU_BASE, | ||
164 | "pinctrl-db8500", NULL), | ||
165 | {}, | 173 | {}, |
166 | }; | 174 | }; |
167 | 175 | ||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index f84d4397896b..d11ac4bf336c 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | 26 | ||
27 | #include "setup.h" | 27 | #include "setup.h" |
28 | #include "devices.h" | ||
29 | 28 | ||
30 | #include "board-mop500.h" | 29 | #include "board-mop500.h" |
31 | #include "db8500-regs.h" | 30 | #include "db8500-regs.h" |
@@ -64,12 +63,7 @@ void __init ux500_init_irq(void) | |||
64 | } else | 63 | } else |
65 | ux500_unknown_soc(); | 64 | ux500_unknown_soc(); |
66 | 65 | ||
67 | #ifdef CONFIG_OF | 66 | irqchip_init(); |
68 | if (of_have_populated_dt()) | ||
69 | irqchip_init(); | ||
70 | else | ||
71 | #endif | ||
72 | gic_init(0, 29, dist_base, cpu_base); | ||
73 | 67 | ||
74 | /* | 68 | /* |
75 | * Init clocks here so that they are available for system timer | 69 | * Init clocks here so that they are available for system timer |
@@ -79,16 +73,11 @@ void __init ux500_init_irq(void) | |||
79 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); | 73 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); |
80 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | 74 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); |
81 | 75 | ||
82 | if (of_have_populated_dt()) | 76 | u8500_of_clk_init(U8500_CLKRST1_BASE, |
83 | u8500_of_clk_init(U8500_CLKRST1_BASE, | 77 | U8500_CLKRST2_BASE, |
84 | U8500_CLKRST2_BASE, | 78 | U8500_CLKRST3_BASE, |
85 | U8500_CLKRST3_BASE, | 79 | U8500_CLKRST5_BASE, |
86 | U8500_CLKRST5_BASE, | 80 | U8500_CLKRST6_BASE); |
87 | U8500_CLKRST6_BASE); | ||
88 | else | ||
89 | u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, | ||
90 | U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, | ||
91 | U8500_CLKRST6_BASE); | ||
92 | } else if (cpu_is_u9540()) { | 81 | } else if (cpu_is_u9540()) { |
93 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); | 82 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); |
94 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | 83 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); |
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c deleted file mode 100644 index c59f89d058ff..000000000000 --- a/arch/arm/mach-ux500/devices-db8500.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/io.h> | ||
12 | #include <linux/amba/bus.h> | ||
13 | #include <linux/amba/pl022.h> | ||
14 | #include <linux/mfd/dbx500-prcmu.h> | ||
15 | |||
16 | #include "setup.h" | ||
17 | #include "irqs.h" | ||
18 | |||
19 | #include "db8500-regs.h" | ||
20 | #include "devices-db8500.h" | ||
21 | |||
22 | struct prcmu_pdata db8500_prcmu_pdata = { | ||
23 | .ab_platdata = &ab8500_platdata, | ||
24 | .ab_irq = IRQ_DB8500_AB8500, | ||
25 | .irq_base = IRQ_PRCMU_BASE, | ||
26 | .version_offset = DB8500_PRCMU_FW_VERSION_OFFSET, | ||
27 | .legacy_offset = DB8500_PRCMU_LEGACY_OFFSET, | ||
28 | }; | ||
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h deleted file mode 100644 index b8ffc9979bb2..000000000000 --- a/arch/arm/mach-ux500/devices-db8500.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL), version 2. | ||
6 | */ | ||
7 | |||
8 | #ifndef __DEVICES_DB8500_H | ||
9 | #define __DEVICES_DB8500_H | ||
10 | |||
11 | #include "irqs.h" | ||
12 | #include "db8500-regs.h" | ||
13 | |||
14 | struct platform_device; | ||
15 | |||
16 | extern struct ab8500_platform_data ab8500_platdata; | ||
17 | extern struct prcmu_pdata db8500_prcmu_pdata; | ||
18 | |||
19 | #endif | ||
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c deleted file mode 100644 index 0f9e52b95935..000000000000 --- a/arch/arm/mach-ux500/devices.c +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/io.h> | ||
12 | #include <linux/amba/bus.h> | ||
13 | |||
14 | #include "setup.h" | ||
15 | |||
16 | #include "db8500-regs.h" | ||
17 | |||
18 | void __init amba_add_devices(struct amba_device *devs[], int num) | ||
19 | { | ||
20 | int i; | ||
21 | |||
22 | for (i = 0; i < num; i++) { | ||
23 | struct amba_device *d = devs[i]; | ||
24 | amba_device_register(d, &iomem_resource); | ||
25 | } | ||
26 | } | ||
diff --git a/arch/arm/mach-ux500/devices.h b/arch/arm/mach-ux500/devices.h deleted file mode 100644 index 5bca7c605cd6..000000000000 --- a/arch/arm/mach-ux500/devices.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_DEVICES_H__ | ||
8 | #define __ASM_ARCH_DEVICES_H__ | ||
9 | |||
10 | struct platform_device; | ||
11 | struct amba_device; | ||
12 | |||
13 | extern struct amba_device ux500_pl031_device; | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h index bdb356498a74..7164cfd99710 100644 --- a/arch/arm/mach-ux500/setup.h +++ b/arch/arm/mach-ux500/setup.h | |||
@@ -19,17 +19,11 @@ | |||
19 | void ux500_restart(enum reboot_mode mode, const char *cmd); | 19 | void ux500_restart(enum reboot_mode mode, const char *cmd); |
20 | 20 | ||
21 | void __init ux500_map_io(void); | 21 | void __init ux500_map_io(void); |
22 | extern void __init u8500_map_io(void); | ||
23 | |||
24 | extern struct device * __init u8500_init_devices(void); | ||
25 | 22 | ||
26 | extern void __init ux500_init_irq(void); | 23 | extern void __init ux500_init_irq(void); |
27 | 24 | ||
28 | extern struct device *ux500_soc_device_init(const char *soc_id); | 25 | extern struct device *ux500_soc_device_init(const char *soc_id); |
29 | 26 | ||
30 | struct amba_device; | ||
31 | extern void __init amba_add_devices(struct amba_device *devs[], int num); | ||
32 | |||
33 | extern void ux500_timer_init(void); | 27 | extern void ux500_timer_init(void); |
34 | 28 | ||
35 | #define __IO_DEV_DESC(x, sz) { \ | 29 | #define __IO_DEV_DESC(x, sz) { \ |
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index 05a4ff78b3bd..87efda0aa348 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -10,40 +10,12 @@ | |||
10 | #include <linux/clocksource.h> | 10 | #include <linux/clocksource.h> |
11 | #include <linux/of.h> | 11 | #include <linux/of.h> |
12 | #include <linux/of_address.h> | 12 | #include <linux/of_address.h> |
13 | #include <linux/platform_data/clocksource-nomadik-mtu.h> | ||
14 | |||
15 | #include <asm/smp_twd.h> | ||
16 | 13 | ||
17 | #include "setup.h" | 14 | #include "setup.h" |
18 | #include "irqs.h" | ||
19 | 15 | ||
20 | #include "db8500-regs.h" | 16 | #include "db8500-regs.h" |
21 | #include "id.h" | 17 | #include "id.h" |
22 | 18 | ||
23 | #ifdef CONFIG_HAVE_ARM_TWD | ||
24 | static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, | ||
25 | U8500_TWD_BASE, IRQ_LOCALTIMER); | ||
26 | |||
27 | static void __init ux500_twd_init(void) | ||
28 | { | ||
29 | struct twd_local_timer *twd_local_timer; | ||
30 | int err; | ||
31 | |||
32 | /* Use this to switch local timer base if changed in new ASICs */ | ||
33 | twd_local_timer = &u8500_twd_local_timer; | ||
34 | |||
35 | if (of_have_populated_dt()) | ||
36 | clocksource_of_init(); | ||
37 | else { | ||
38 | err = twd_local_timer_register(twd_local_timer); | ||
39 | if (err) | ||
40 | pr_err("twd_local_timer_register failed %d\n", err); | ||
41 | } | ||
42 | } | ||
43 | #else | ||
44 | #define ux500_twd_init() do { } while(0) | ||
45 | #endif | ||
46 | |||
47 | const static struct of_device_id prcmu_timer_of_match[] __initconst = { | 19 | const static struct of_device_id prcmu_timer_of_match[] __initconst = { |
48 | { .compatible = "stericsson,db8500-prcmu-timer-4", }, | 20 | { .compatible = "stericsson,db8500-prcmu-timer-4", }, |
49 | { }, | 21 | { }, |
@@ -51,54 +23,26 @@ const static struct of_device_id prcmu_timer_of_match[] __initconst = { | |||
51 | 23 | ||
52 | void __init ux500_timer_init(void) | 24 | void __init ux500_timer_init(void) |
53 | { | 25 | { |
54 | void __iomem *mtu_timer_base; | ||
55 | void __iomem *prcmu_timer_base; | 26 | void __iomem *prcmu_timer_base; |
56 | void __iomem *tmp_base; | 27 | void __iomem *tmp_base; |
57 | struct device_node *np; | 28 | struct device_node *np; |
58 | 29 | ||
59 | if (cpu_is_u8500_family() || cpu_is_ux540_family()) { | 30 | if (cpu_is_u8500_family() || cpu_is_ux540_family()) |
60 | mtu_timer_base = __io_address(U8500_MTU0_BASE); | ||
61 | prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); | 31 | prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); |
62 | } else { | 32 | else |
63 | ux500_unknown_soc(); | 33 | ux500_unknown_soc(); |
64 | } | ||
65 | 34 | ||
66 | /* TODO: Once MTU has been DT:ed place code above into else. */ | 35 | np = of_find_matching_node(NULL, prcmu_timer_of_match); |
67 | if (of_have_populated_dt()) { | 36 | if (!np) |
68 | #ifdef CONFIG_OF | 37 | goto dt_fail; |
69 | np = of_find_matching_node(NULL, prcmu_timer_of_match); | ||
70 | if (!np) | ||
71 | #endif | ||
72 | goto dt_fail; | ||
73 | 38 | ||
74 | tmp_base = of_iomap(np, 0); | 39 | tmp_base = of_iomap(np, 0); |
75 | if (!tmp_base) | 40 | if (!tmp_base) |
76 | goto dt_fail; | 41 | goto dt_fail; |
77 | 42 | ||
78 | prcmu_timer_base = tmp_base; | 43 | prcmu_timer_base = tmp_base; |
79 | } | ||
80 | 44 | ||
81 | dt_fail: | 45 | dt_fail: |
82 | /* Doing it the old fashioned way. */ | ||
83 | |||
84 | /* | ||
85 | * Here we register the timerblocks active in the system. | ||
86 | * Localtimers (twd) is started when both cpu is up and running. | ||
87 | * MTU register a clocksource, clockevent and sched_clock. | ||
88 | * Since the MTU is located in the VAPE power domain | ||
89 | * it will be cleared in sleep which makes it unsuitable. | ||
90 | * We however need it as a timer tick (clockevent) | ||
91 | * during boot to calibrate delay until twd is started. | ||
92 | * RTC-RTT have problems as timer tick during boot since it is | ||
93 | * depending on delay which is not yet calibrated. RTC-RTT is in the | ||
94 | * always-on powerdomain and is used as clockevent instead of twd when | ||
95 | * sleeping. | ||
96 | * The PRCMU timer 4 register a clocksource and | ||
97 | * sched_clock with higher rating then MTU since is always-on. | ||
98 | * | ||
99 | */ | ||
100 | if (!of_have_populated_dt()) | ||
101 | nmdk_timer_init(mtu_timer_base, IRQ_MTU0); | ||
102 | clksrc_dbx500_prcmu_init(prcmu_timer_base); | 46 | clksrc_dbx500_prcmu_init(prcmu_timer_base); |
103 | ux500_twd_init(); | 47 | clocksource_of_init(); |
104 | } | 48 | } |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index c66d163d7a2a..830ff07f3385 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_data/dma-mv_xor.h> | 22 | #include <linux/platform_data/dma-mv_xor.h> |
23 | #include <linux/platform_data/usb-ehci-orion.h> | 23 | #include <linux/platform_data/usb-ehci-orion.h> |
24 | #include <mach/bridge-regs.h> | 24 | #include <mach/bridge-regs.h> |
25 | #include <plat/common.h> | ||
25 | 26 | ||
26 | /* Create a clkdev entry for a given device/clk */ | 27 | /* Create a clkdev entry for a given device/clk */ |
27 | void __init orion_clkdev_add(const char *con_id, const char *dev_id, | 28 | void __init orion_clkdev_add(const char *con_id, const char *dev_id, |
@@ -256,7 +257,7 @@ static __init void ge_complete( | |||
256 | /***************************************************************************** | 257 | /***************************************************************************** |
257 | * GE00 | 258 | * GE00 |
258 | ****************************************************************************/ | 259 | ****************************************************************************/ |
259 | struct mv643xx_eth_shared_platform_data orion_ge00_shared_data; | 260 | static struct mv643xx_eth_shared_platform_data orion_ge00_shared_data; |
260 | 261 | ||
261 | static struct resource orion_ge00_shared_resources[] = { | 262 | static struct resource orion_ge00_shared_resources[] = { |
262 | { | 263 | { |
@@ -322,7 +323,7 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | |||
322 | /***************************************************************************** | 323 | /***************************************************************************** |
323 | * GE01 | 324 | * GE01 |
324 | ****************************************************************************/ | 325 | ****************************************************************************/ |
325 | struct mv643xx_eth_shared_platform_data orion_ge01_shared_data; | 326 | static struct mv643xx_eth_shared_platform_data orion_ge01_shared_data; |
326 | 327 | ||
327 | static struct resource orion_ge01_shared_resources[] = { | 328 | static struct resource orion_ge01_shared_resources[] = { |
328 | { | 329 | { |
@@ -373,7 +374,7 @@ void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | |||
373 | /***************************************************************************** | 374 | /***************************************************************************** |
374 | * GE10 | 375 | * GE10 |
375 | ****************************************************************************/ | 376 | ****************************************************************************/ |
376 | struct mv643xx_eth_shared_platform_data orion_ge10_shared_data; | 377 | static struct mv643xx_eth_shared_platform_data orion_ge10_shared_data; |
377 | 378 | ||
378 | static struct resource orion_ge10_shared_resources[] = { | 379 | static struct resource orion_ge10_shared_resources[] = { |
379 | { | 380 | { |
@@ -422,7 +423,7 @@ void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | |||
422 | /***************************************************************************** | 423 | /***************************************************************************** |
423 | * GE11 | 424 | * GE11 |
424 | ****************************************************************************/ | 425 | ****************************************************************************/ |
425 | struct mv643xx_eth_shared_platform_data orion_ge11_shared_data; | 426 | static struct mv643xx_eth_shared_platform_data orion_ge11_shared_data; |
426 | 427 | ||
427 | static struct resource orion_ge11_shared_resources[] = { | 428 | static struct resource orion_ge11_shared_resources[] = { |
428 | { | 429 | { |
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index 9d2b2ac74938..15921a1839d7 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/sched_clock.h> | 19 | #include <linux/sched_clock.h> |
20 | #include <plat/time.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * MBus bridge block registers. | 23 | * MBus bridge block registers. |
@@ -174,7 +175,7 @@ static irqreturn_t orion_timer_interrupt(int irq, void *dev_id) | |||
174 | 175 | ||
175 | static struct irqaction orion_timer_irq = { | 176 | static struct irqaction orion_timer_irq = { |
176 | .name = "orion_tick", | 177 | .name = "orion_tick", |
177 | .flags = IRQF_DISABLED | IRQF_TIMER, | 178 | .flags = IRQF_TIMER, |
178 | .handler = orion_timer_interrupt | 179 | .handler = orion_timer_interrupt |
179 | }; | 180 | }; |
180 | 181 | ||
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h index 4afc32f90b6d..f48dc0a4736c 100644 --- a/arch/arm/plat-samsung/include/plat/uncompress.h +++ b/arch/arm/plat-samsung/include/plat/uncompress.h | |||
@@ -145,6 +145,8 @@ static inline void arch_enable_uart_fifo(void) | |||
145 | if (!(fifocon & S3C2410_UFCON_RESETBOTH)) | 145 | if (!(fifocon & S3C2410_UFCON_RESETBOTH)) |
146 | break; | 146 | break; |
147 | } | 147 | } |
148 | |||
149 | uart_wr(S3C2410_UFCON, S3C2410_UFCON_FIFOMODE); | ||
148 | } | 150 | } |
149 | } | 151 | } |
150 | #else | 152 | #else |
diff --git a/drivers/Makefile b/drivers/Makefile index 3cc8214f9b26..8e3b8b06c0b2 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -118,7 +118,7 @@ obj-$(CONFIG_SGI_SN) += sn/ | |||
118 | obj-y += firmware/ | 118 | obj-y += firmware/ |
119 | obj-$(CONFIG_CRYPTO) += crypto/ | 119 | obj-$(CONFIG_CRYPTO) += crypto/ |
120 | obj-$(CONFIG_SUPERH) += sh/ | 120 | obj-$(CONFIG_SUPERH) += sh/ |
121 | obj-$(CONFIG_ARCH_SHMOBILE) += sh/ | 121 | obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += sh/ |
122 | ifndef CONFIG_ARCH_USES_GETTIMEOFFSET | 122 | ifndef CONFIG_ARCH_USES_GETTIMEOFFSET |
123 | obj-y += clocksource/ | 123 | obj-y += clocksource/ |
124 | endif | 124 | endif |
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 7a10bc9a23e7..ace7309c4369 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile | |||
@@ -35,6 +35,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/ | |||
35 | obj-$(CONFIG_PLAT_SAMSUNG) += samsung/ | 35 | obj-$(CONFIG_PLAT_SAMSUNG) += samsung/ |
36 | obj-$(CONFIG_COMMON_CLK_XGENE) += clk-xgene.o | 36 | obj-$(CONFIG_COMMON_CLK_XGENE) += clk-xgene.o |
37 | obj-$(CONFIG_COMMON_CLK_KEYSTONE) += keystone/ | 37 | obj-$(CONFIG_COMMON_CLK_KEYSTONE) += keystone/ |
38 | obj-$(CONFIG_COMMON_CLK_AT91) += at91/ | ||
38 | 39 | ||
39 | obj-$(CONFIG_X86) += x86/ | 40 | obj-$(CONFIG_X86) += x86/ |
40 | 41 | ||
diff --git a/drivers/clk/at91/Makefile b/drivers/clk/at91/Makefile new file mode 100644 index 000000000000..0e92b716f934 --- /dev/null +++ b/drivers/clk/at91/Makefile | |||
@@ -0,0 +1,12 @@ | |||
1 | # | ||
2 | # Makefile for at91 specific clk | ||
3 | # | ||
4 | |||
5 | obj-y += pmc.o | ||
6 | obj-y += clk-main.o clk-pll.o clk-plldiv.o clk-master.o | ||
7 | obj-y += clk-system.o clk-peripheral.o | ||
8 | |||
9 | obj-$(CONFIG_AT91_PROGRAMMABLE_CLOCKS) += clk-programmable.o | ||
10 | obj-$(CONFIG_HAVE_AT91_UTMI) += clk-utmi.o | ||
11 | obj-$(CONFIG_HAVE_AT91_USB_CLK) += clk-usb.o | ||
12 | obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o | ||
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c new file mode 100644 index 000000000000..8e9e8cc0412d --- /dev/null +++ b/drivers/clk/at91/clk-main.c | |||
@@ -0,0 +1,187 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/delay.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/of_address.h> | ||
17 | #include <linux/of_irq.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/wait.h> | ||
23 | |||
24 | #include "pmc.h" | ||
25 | |||
26 | #define SLOW_CLOCK_FREQ 32768 | ||
27 | #define MAINF_DIV 16 | ||
28 | #define MAINFRDY_TIMEOUT (((MAINF_DIV + 1) * USEC_PER_SEC) / \ | ||
29 | SLOW_CLOCK_FREQ) | ||
30 | #define MAINF_LOOP_MIN_WAIT (USEC_PER_SEC / SLOW_CLOCK_FREQ) | ||
31 | #define MAINF_LOOP_MAX_WAIT MAINFRDY_TIMEOUT | ||
32 | |||
33 | struct clk_main { | ||
34 | struct clk_hw hw; | ||
35 | struct at91_pmc *pmc; | ||
36 | unsigned long rate; | ||
37 | unsigned int irq; | ||
38 | wait_queue_head_t wait; | ||
39 | }; | ||
40 | |||
41 | #define to_clk_main(hw) container_of(hw, struct clk_main, hw) | ||
42 | |||
43 | static irqreturn_t clk_main_irq_handler(int irq, void *dev_id) | ||
44 | { | ||
45 | struct clk_main *clkmain = (struct clk_main *)dev_id; | ||
46 | |||
47 | wake_up(&clkmain->wait); | ||
48 | disable_irq_nosync(clkmain->irq); | ||
49 | |||
50 | return IRQ_HANDLED; | ||
51 | } | ||
52 | |||
53 | static int clk_main_prepare(struct clk_hw *hw) | ||
54 | { | ||
55 | struct clk_main *clkmain = to_clk_main(hw); | ||
56 | struct at91_pmc *pmc = clkmain->pmc; | ||
57 | unsigned long halt_time, timeout; | ||
58 | u32 tmp; | ||
59 | |||
60 | while (!(pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_MOSCS)) { | ||
61 | enable_irq(clkmain->irq); | ||
62 | wait_event(clkmain->wait, | ||
63 | pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_MOSCS); | ||
64 | } | ||
65 | |||
66 | if (clkmain->rate) | ||
67 | return 0; | ||
68 | |||
69 | timeout = jiffies + usecs_to_jiffies(MAINFRDY_TIMEOUT); | ||
70 | do { | ||
71 | halt_time = jiffies; | ||
72 | tmp = pmc_read(pmc, AT91_CKGR_MCFR); | ||
73 | if (tmp & AT91_PMC_MAINRDY) | ||
74 | return 0; | ||
75 | usleep_range(MAINF_LOOP_MIN_WAIT, MAINF_LOOP_MAX_WAIT); | ||
76 | } while (time_before(halt_time, timeout)); | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | static int clk_main_is_prepared(struct clk_hw *hw) | ||
82 | { | ||
83 | struct clk_main *clkmain = to_clk_main(hw); | ||
84 | |||
85 | return !!(pmc_read(clkmain->pmc, AT91_PMC_SR) & AT91_PMC_MOSCS); | ||
86 | } | ||
87 | |||
88 | static unsigned long clk_main_recalc_rate(struct clk_hw *hw, | ||
89 | unsigned long parent_rate) | ||
90 | { | ||
91 | u32 tmp; | ||
92 | struct clk_main *clkmain = to_clk_main(hw); | ||
93 | struct at91_pmc *pmc = clkmain->pmc; | ||
94 | |||
95 | if (clkmain->rate) | ||
96 | return clkmain->rate; | ||
97 | |||
98 | tmp = pmc_read(pmc, AT91_CKGR_MCFR) & AT91_PMC_MAINF; | ||
99 | clkmain->rate = (tmp * parent_rate) / MAINF_DIV; | ||
100 | |||
101 | return clkmain->rate; | ||
102 | } | ||
103 | |||
104 | static const struct clk_ops main_ops = { | ||
105 | .prepare = clk_main_prepare, | ||
106 | .is_prepared = clk_main_is_prepared, | ||
107 | .recalc_rate = clk_main_recalc_rate, | ||
108 | }; | ||
109 | |||
110 | static struct clk * __init | ||
111 | at91_clk_register_main(struct at91_pmc *pmc, | ||
112 | unsigned int irq, | ||
113 | const char *name, | ||
114 | const char *parent_name, | ||
115 | unsigned long rate) | ||
116 | { | ||
117 | int ret; | ||
118 | struct clk_main *clkmain; | ||
119 | struct clk *clk = NULL; | ||
120 | struct clk_init_data init; | ||
121 | |||
122 | if (!pmc || !irq || !name) | ||
123 | return ERR_PTR(-EINVAL); | ||
124 | |||
125 | if (!rate && !parent_name) | ||
126 | return ERR_PTR(-EINVAL); | ||
127 | |||
128 | clkmain = kzalloc(sizeof(*clkmain), GFP_KERNEL); | ||
129 | if (!clkmain) | ||
130 | return ERR_PTR(-ENOMEM); | ||
131 | |||
132 | init.name = name; | ||
133 | init.ops = &main_ops; | ||
134 | init.parent_names = parent_name ? &parent_name : NULL; | ||
135 | init.num_parents = parent_name ? 1 : 0; | ||
136 | init.flags = parent_name ? 0 : CLK_IS_ROOT; | ||
137 | |||
138 | clkmain->hw.init = &init; | ||
139 | clkmain->rate = rate; | ||
140 | clkmain->pmc = pmc; | ||
141 | clkmain->irq = irq; | ||
142 | init_waitqueue_head(&clkmain->wait); | ||
143 | irq_set_status_flags(clkmain->irq, IRQ_NOAUTOEN); | ||
144 | ret = request_irq(clkmain->irq, clk_main_irq_handler, | ||
145 | IRQF_TRIGGER_HIGH, "clk-main", clkmain); | ||
146 | if (ret) | ||
147 | return ERR_PTR(ret); | ||
148 | |||
149 | clk = clk_register(NULL, &clkmain->hw); | ||
150 | if (IS_ERR(clk)) { | ||
151 | free_irq(clkmain->irq, clkmain); | ||
152 | kfree(clkmain); | ||
153 | } | ||
154 | |||
155 | return clk; | ||
156 | } | ||
157 | |||
158 | |||
159 | |||
160 | static void __init | ||
161 | of_at91_clk_main_setup(struct device_node *np, struct at91_pmc *pmc) | ||
162 | { | ||
163 | struct clk *clk; | ||
164 | unsigned int irq; | ||
165 | const char *parent_name; | ||
166 | const char *name = np->name; | ||
167 | u32 rate = 0; | ||
168 | |||
169 | parent_name = of_clk_get_parent_name(np, 0); | ||
170 | of_property_read_string(np, "clock-output-names", &name); | ||
171 | of_property_read_u32(np, "clock-frequency", &rate); | ||
172 | irq = irq_of_parse_and_map(np, 0); | ||
173 | if (!irq) | ||
174 | return; | ||
175 | |||
176 | clk = at91_clk_register_main(pmc, irq, name, parent_name, rate); | ||
177 | if (IS_ERR(clk)) | ||
178 | return; | ||
179 | |||
180 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
181 | } | ||
182 | |||
183 | void __init of_at91rm9200_clk_main_setup(struct device_node *np, | ||
184 | struct at91_pmc *pmc) | ||
185 | { | ||
186 | of_at91_clk_main_setup(np, pmc); | ||
187 | } | ||
diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c new file mode 100644 index 000000000000..bd313f7816a8 --- /dev/null +++ b/drivers/clk/at91/clk-master.c | |||
@@ -0,0 +1,270 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/of_irq.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/wait.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/irq.h> | ||
22 | |||
23 | #include "pmc.h" | ||
24 | |||
25 | #define MASTER_SOURCE_MAX 4 | ||
26 | |||
27 | #define MASTER_PRES_MASK 0x7 | ||
28 | #define MASTER_PRES_MAX MASTER_PRES_MASK | ||
29 | #define MASTER_DIV_SHIFT 8 | ||
30 | #define MASTER_DIV_MASK 0x3 | ||
31 | |||
32 | struct clk_master_characteristics { | ||
33 | struct clk_range output; | ||
34 | u32 divisors[4]; | ||
35 | u8 have_div3_pres; | ||
36 | }; | ||
37 | |||
38 | struct clk_master_layout { | ||
39 | u32 mask; | ||
40 | u8 pres_shift; | ||
41 | }; | ||
42 | |||
43 | #define to_clk_master(hw) container_of(hw, struct clk_master, hw) | ||
44 | |||
45 | struct clk_master { | ||
46 | struct clk_hw hw; | ||
47 | struct at91_pmc *pmc; | ||
48 | unsigned int irq; | ||
49 | wait_queue_head_t wait; | ||
50 | const struct clk_master_layout *layout; | ||
51 | const struct clk_master_characteristics *characteristics; | ||
52 | }; | ||
53 | |||
54 | static irqreturn_t clk_master_irq_handler(int irq, void *dev_id) | ||
55 | { | ||
56 | struct clk_master *master = (struct clk_master *)dev_id; | ||
57 | |||
58 | wake_up(&master->wait); | ||
59 | disable_irq_nosync(master->irq); | ||
60 | |||
61 | return IRQ_HANDLED; | ||
62 | } | ||
63 | static int clk_master_prepare(struct clk_hw *hw) | ||
64 | { | ||
65 | struct clk_master *master = to_clk_master(hw); | ||
66 | struct at91_pmc *pmc = master->pmc; | ||
67 | |||
68 | while (!(pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_MCKRDY)) { | ||
69 | enable_irq(master->irq); | ||
70 | wait_event(master->wait, | ||
71 | pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_MCKRDY); | ||
72 | } | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static int clk_master_is_prepared(struct clk_hw *hw) | ||
78 | { | ||
79 | struct clk_master *master = to_clk_master(hw); | ||
80 | |||
81 | return !!(pmc_read(master->pmc, AT91_PMC_SR) & AT91_PMC_MCKRDY); | ||
82 | } | ||
83 | |||
84 | static unsigned long clk_master_recalc_rate(struct clk_hw *hw, | ||
85 | unsigned long parent_rate) | ||
86 | { | ||
87 | u8 pres; | ||
88 | u8 div; | ||
89 | unsigned long rate = parent_rate; | ||
90 | struct clk_master *master = to_clk_master(hw); | ||
91 | struct at91_pmc *pmc = master->pmc; | ||
92 | const struct clk_master_layout *layout = master->layout; | ||
93 | const struct clk_master_characteristics *characteristics = | ||
94 | master->characteristics; | ||
95 | u32 tmp; | ||
96 | |||
97 | pmc_lock(pmc); | ||
98 | tmp = pmc_read(pmc, AT91_PMC_MCKR) & layout->mask; | ||
99 | pmc_unlock(pmc); | ||
100 | |||
101 | pres = (tmp >> layout->pres_shift) & MASTER_PRES_MASK; | ||
102 | div = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK; | ||
103 | |||
104 | if (characteristics->have_div3_pres && pres == MASTER_PRES_MAX) | ||
105 | rate /= 3; | ||
106 | else | ||
107 | rate >>= pres; | ||
108 | |||
109 | rate /= characteristics->divisors[div]; | ||
110 | |||
111 | if (rate < characteristics->output.min) | ||
112 | pr_warn("master clk is underclocked"); | ||
113 | else if (rate > characteristics->output.max) | ||
114 | pr_warn("master clk is overclocked"); | ||
115 | |||
116 | return rate; | ||
117 | } | ||
118 | |||
119 | static u8 clk_master_get_parent(struct clk_hw *hw) | ||
120 | { | ||
121 | struct clk_master *master = to_clk_master(hw); | ||
122 | struct at91_pmc *pmc = master->pmc; | ||
123 | |||
124 | return pmc_read(pmc, AT91_PMC_MCKR) & AT91_PMC_CSS; | ||
125 | } | ||
126 | |||
127 | static const struct clk_ops master_ops = { | ||
128 | .prepare = clk_master_prepare, | ||
129 | .is_prepared = clk_master_is_prepared, | ||
130 | .recalc_rate = clk_master_recalc_rate, | ||
131 | .get_parent = clk_master_get_parent, | ||
132 | }; | ||
133 | |||
134 | static struct clk * __init | ||
135 | at91_clk_register_master(struct at91_pmc *pmc, unsigned int irq, | ||
136 | const char *name, int num_parents, | ||
137 | const char **parent_names, | ||
138 | const struct clk_master_layout *layout, | ||
139 | const struct clk_master_characteristics *characteristics) | ||
140 | { | ||
141 | int ret; | ||
142 | struct clk_master *master; | ||
143 | struct clk *clk = NULL; | ||
144 | struct clk_init_data init; | ||
145 | |||
146 | if (!pmc || !irq || !name || !num_parents || !parent_names) | ||
147 | return ERR_PTR(-EINVAL); | ||
148 | |||
149 | master = kzalloc(sizeof(*master), GFP_KERNEL); | ||
150 | if (!master) | ||
151 | return ERR_PTR(-ENOMEM); | ||
152 | |||
153 | init.name = name; | ||
154 | init.ops = &master_ops; | ||
155 | init.parent_names = parent_names; | ||
156 | init.num_parents = num_parents; | ||
157 | init.flags = 0; | ||
158 | |||
159 | master->hw.init = &init; | ||
160 | master->layout = layout; | ||
161 | master->characteristics = characteristics; | ||
162 | master->pmc = pmc; | ||
163 | master->irq = irq; | ||
164 | init_waitqueue_head(&master->wait); | ||
165 | irq_set_status_flags(master->irq, IRQ_NOAUTOEN); | ||
166 | ret = request_irq(master->irq, clk_master_irq_handler, | ||
167 | IRQF_TRIGGER_HIGH, "clk-master", master); | ||
168 | if (ret) | ||
169 | return ERR_PTR(ret); | ||
170 | |||
171 | clk = clk_register(NULL, &master->hw); | ||
172 | if (IS_ERR(clk)) | ||
173 | kfree(master); | ||
174 | |||
175 | return clk; | ||
176 | } | ||
177 | |||
178 | |||
179 | static const struct clk_master_layout at91rm9200_master_layout = { | ||
180 | .mask = 0x31F, | ||
181 | .pres_shift = 2, | ||
182 | }; | ||
183 | |||
184 | static const struct clk_master_layout at91sam9x5_master_layout = { | ||
185 | .mask = 0x373, | ||
186 | .pres_shift = 4, | ||
187 | }; | ||
188 | |||
189 | |||
190 | static struct clk_master_characteristics * __init | ||
191 | of_at91_clk_master_get_characteristics(struct device_node *np) | ||
192 | { | ||
193 | struct clk_master_characteristics *characteristics; | ||
194 | |||
195 | characteristics = kzalloc(sizeof(*characteristics), GFP_KERNEL); | ||
196 | if (!characteristics) | ||
197 | return NULL; | ||
198 | |||
199 | if (of_at91_get_clk_range(np, "atmel,clk-output-range", &characteristics->output)) | ||
200 | goto out_free_characteristics; | ||
201 | |||
202 | of_property_read_u32_array(np, "atmel,clk-divisors", | ||
203 | characteristics->divisors, 4); | ||
204 | |||
205 | characteristics->have_div3_pres = | ||
206 | of_property_read_bool(np, "atmel,master-clk-have-div3-pres"); | ||
207 | |||
208 | return characteristics; | ||
209 | |||
210 | out_free_characteristics: | ||
211 | kfree(characteristics); | ||
212 | return NULL; | ||
213 | } | ||
214 | |||
215 | static void __init | ||
216 | of_at91_clk_master_setup(struct device_node *np, struct at91_pmc *pmc, | ||
217 | const struct clk_master_layout *layout) | ||
218 | { | ||
219 | struct clk *clk; | ||
220 | int num_parents; | ||
221 | int i; | ||
222 | unsigned int irq; | ||
223 | const char *parent_names[MASTER_SOURCE_MAX]; | ||
224 | const char *name = np->name; | ||
225 | struct clk_master_characteristics *characteristics; | ||
226 | |||
227 | num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); | ||
228 | if (num_parents <= 0 || num_parents > MASTER_SOURCE_MAX) | ||
229 | return; | ||
230 | |||
231 | for (i = 0; i < num_parents; ++i) { | ||
232 | parent_names[i] = of_clk_get_parent_name(np, i); | ||
233 | if (!parent_names[i]) | ||
234 | return; | ||
235 | } | ||
236 | |||
237 | of_property_read_string(np, "clock-output-names", &name); | ||
238 | |||
239 | characteristics = of_at91_clk_master_get_characteristics(np); | ||
240 | if (!characteristics) | ||
241 | return; | ||
242 | |||
243 | irq = irq_of_parse_and_map(np, 0); | ||
244 | if (!irq) | ||
245 | return; | ||
246 | |||
247 | clk = at91_clk_register_master(pmc, irq, name, num_parents, | ||
248 | parent_names, layout, | ||
249 | characteristics); | ||
250 | if (IS_ERR(clk)) | ||
251 | goto out_free_characteristics; | ||
252 | |||
253 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
254 | return; | ||
255 | |||
256 | out_free_characteristics: | ||
257 | kfree(characteristics); | ||
258 | } | ||
259 | |||
260 | void __init of_at91rm9200_clk_master_setup(struct device_node *np, | ||
261 | struct at91_pmc *pmc) | ||
262 | { | ||
263 | of_at91_clk_master_setup(np, pmc, &at91rm9200_master_layout); | ||
264 | } | ||
265 | |||
266 | void __init of_at91sam9x5_clk_master_setup(struct device_node *np, | ||
267 | struct at91_pmc *pmc) | ||
268 | { | ||
269 | of_at91_clk_master_setup(np, pmc, &at91sam9x5_master_layout); | ||
270 | } | ||
diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c new file mode 100644 index 000000000000..597fed423d7d --- /dev/null +++ b/drivers/clk/at91/clk-peripheral.c | |||
@@ -0,0 +1,410 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include "pmc.h" | ||
19 | |||
20 | #define PERIPHERAL_MAX 64 | ||
21 | |||
22 | #define PERIPHERAL_AT91RM9200 0 | ||
23 | #define PERIPHERAL_AT91SAM9X5 1 | ||
24 | |||
25 | #define PERIPHERAL_ID_MIN 2 | ||
26 | #define PERIPHERAL_ID_MAX 31 | ||
27 | #define PERIPHERAL_MASK(id) (1 << ((id) & PERIPHERAL_ID_MAX)) | ||
28 | |||
29 | #define PERIPHERAL_RSHIFT_MASK 0x3 | ||
30 | #define PERIPHERAL_RSHIFT(val) (((val) >> 16) & PERIPHERAL_RSHIFT_MASK) | ||
31 | |||
32 | #define PERIPHERAL_MAX_SHIFT 4 | ||
33 | |||
34 | struct clk_peripheral { | ||
35 | struct clk_hw hw; | ||
36 | struct at91_pmc *pmc; | ||
37 | u32 id; | ||
38 | }; | ||
39 | |||
40 | #define to_clk_peripheral(hw) container_of(hw, struct clk_peripheral, hw) | ||
41 | |||
42 | struct clk_sam9x5_peripheral { | ||
43 | struct clk_hw hw; | ||
44 | struct at91_pmc *pmc; | ||
45 | struct clk_range range; | ||
46 | u32 id; | ||
47 | u32 div; | ||
48 | bool auto_div; | ||
49 | }; | ||
50 | |||
51 | #define to_clk_sam9x5_peripheral(hw) \ | ||
52 | container_of(hw, struct clk_sam9x5_peripheral, hw) | ||
53 | |||
54 | static int clk_peripheral_enable(struct clk_hw *hw) | ||
55 | { | ||
56 | struct clk_peripheral *periph = to_clk_peripheral(hw); | ||
57 | struct at91_pmc *pmc = periph->pmc; | ||
58 | int offset = AT91_PMC_PCER; | ||
59 | u32 id = periph->id; | ||
60 | |||
61 | if (id < PERIPHERAL_ID_MIN) | ||
62 | return 0; | ||
63 | if (id > PERIPHERAL_ID_MAX) | ||
64 | offset = AT91_PMC_PCER1; | ||
65 | pmc_write(pmc, offset, PERIPHERAL_MASK(id)); | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | static void clk_peripheral_disable(struct clk_hw *hw) | ||
70 | { | ||
71 | struct clk_peripheral *periph = to_clk_peripheral(hw); | ||
72 | struct at91_pmc *pmc = periph->pmc; | ||
73 | int offset = AT91_PMC_PCDR; | ||
74 | u32 id = periph->id; | ||
75 | |||
76 | if (id < PERIPHERAL_ID_MIN) | ||
77 | return; | ||
78 | if (id > PERIPHERAL_ID_MAX) | ||
79 | offset = AT91_PMC_PCDR1; | ||
80 | pmc_write(pmc, offset, PERIPHERAL_MASK(id)); | ||
81 | } | ||
82 | |||
83 | static int clk_peripheral_is_enabled(struct clk_hw *hw) | ||
84 | { | ||
85 | struct clk_peripheral *periph = to_clk_peripheral(hw); | ||
86 | struct at91_pmc *pmc = periph->pmc; | ||
87 | int offset = AT91_PMC_PCSR; | ||
88 | u32 id = periph->id; | ||
89 | |||
90 | if (id < PERIPHERAL_ID_MIN) | ||
91 | return 1; | ||
92 | if (id > PERIPHERAL_ID_MAX) | ||
93 | offset = AT91_PMC_PCSR1; | ||
94 | return !!(pmc_read(pmc, offset) & PERIPHERAL_MASK(id)); | ||
95 | } | ||
96 | |||
97 | static const struct clk_ops peripheral_ops = { | ||
98 | .enable = clk_peripheral_enable, | ||
99 | .disable = clk_peripheral_disable, | ||
100 | .is_enabled = clk_peripheral_is_enabled, | ||
101 | }; | ||
102 | |||
103 | static struct clk * __init | ||
104 | at91_clk_register_peripheral(struct at91_pmc *pmc, const char *name, | ||
105 | const char *parent_name, u32 id) | ||
106 | { | ||
107 | struct clk_peripheral *periph; | ||
108 | struct clk *clk = NULL; | ||
109 | struct clk_init_data init; | ||
110 | |||
111 | if (!pmc || !name || !parent_name || id > PERIPHERAL_ID_MAX) | ||
112 | return ERR_PTR(-EINVAL); | ||
113 | |||
114 | periph = kzalloc(sizeof(*periph), GFP_KERNEL); | ||
115 | if (!periph) | ||
116 | return ERR_PTR(-ENOMEM); | ||
117 | |||
118 | init.name = name; | ||
119 | init.ops = &peripheral_ops; | ||
120 | init.parent_names = (parent_name ? &parent_name : NULL); | ||
121 | init.num_parents = (parent_name ? 1 : 0); | ||
122 | init.flags = 0; | ||
123 | |||
124 | periph->id = id; | ||
125 | periph->hw.init = &init; | ||
126 | periph->pmc = pmc; | ||
127 | |||
128 | clk = clk_register(NULL, &periph->hw); | ||
129 | if (IS_ERR(clk)) | ||
130 | kfree(periph); | ||
131 | |||
132 | return clk; | ||
133 | } | ||
134 | |||
135 | static void clk_sam9x5_peripheral_autodiv(struct clk_sam9x5_peripheral *periph) | ||
136 | { | ||
137 | struct clk *parent; | ||
138 | unsigned long parent_rate; | ||
139 | int shift = 0; | ||
140 | |||
141 | if (!periph->auto_div) | ||
142 | return; | ||
143 | |||
144 | if (periph->range.max) { | ||
145 | parent = clk_get_parent_by_index(periph->hw.clk, 0); | ||
146 | parent_rate = __clk_get_rate(parent); | ||
147 | if (!parent_rate) | ||
148 | return; | ||
149 | |||
150 | for (; shift < PERIPHERAL_MAX_SHIFT; shift++) { | ||
151 | if (parent_rate >> shift <= periph->range.max) | ||
152 | break; | ||
153 | } | ||
154 | } | ||
155 | |||
156 | periph->auto_div = false; | ||
157 | periph->div = shift; | ||
158 | } | ||
159 | |||
160 | static int clk_sam9x5_peripheral_enable(struct clk_hw *hw) | ||
161 | { | ||
162 | struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw); | ||
163 | struct at91_pmc *pmc = periph->pmc; | ||
164 | |||
165 | if (periph->id < PERIPHERAL_ID_MIN) | ||
166 | return 0; | ||
167 | |||
168 | pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID) | | ||
169 | AT91_PMC_PCR_CMD | | ||
170 | AT91_PMC_PCR_DIV(periph->div) | | ||
171 | AT91_PMC_PCR_EN); | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static void clk_sam9x5_peripheral_disable(struct clk_hw *hw) | ||
176 | { | ||
177 | struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw); | ||
178 | struct at91_pmc *pmc = periph->pmc; | ||
179 | |||
180 | if (periph->id < PERIPHERAL_ID_MIN) | ||
181 | return; | ||
182 | |||
183 | pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID) | | ||
184 | AT91_PMC_PCR_CMD); | ||
185 | } | ||
186 | |||
187 | static int clk_sam9x5_peripheral_is_enabled(struct clk_hw *hw) | ||
188 | { | ||
189 | struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw); | ||
190 | struct at91_pmc *pmc = periph->pmc; | ||
191 | int ret; | ||
192 | |||
193 | if (periph->id < PERIPHERAL_ID_MIN) | ||
194 | return 1; | ||
195 | |||
196 | pmc_lock(pmc); | ||
197 | pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID)); | ||
198 | ret = !!(pmc_read(pmc, AT91_PMC_PCR) & AT91_PMC_PCR_EN); | ||
199 | pmc_unlock(pmc); | ||
200 | |||
201 | return ret; | ||
202 | } | ||
203 | |||
204 | static unsigned long | ||
205 | clk_sam9x5_peripheral_recalc_rate(struct clk_hw *hw, | ||
206 | unsigned long parent_rate) | ||
207 | { | ||
208 | struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw); | ||
209 | struct at91_pmc *pmc = periph->pmc; | ||
210 | u32 tmp; | ||
211 | |||
212 | if (periph->id < PERIPHERAL_ID_MIN) | ||
213 | return parent_rate; | ||
214 | |||
215 | pmc_lock(pmc); | ||
216 | pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID)); | ||
217 | tmp = pmc_read(pmc, AT91_PMC_PCR); | ||
218 | pmc_unlock(pmc); | ||
219 | |||
220 | if (tmp & AT91_PMC_PCR_EN) { | ||
221 | periph->div = PERIPHERAL_RSHIFT(tmp); | ||
222 | periph->auto_div = false; | ||
223 | } else { | ||
224 | clk_sam9x5_peripheral_autodiv(periph); | ||
225 | } | ||
226 | |||
227 | return parent_rate >> periph->div; | ||
228 | } | ||
229 | |||
230 | static long clk_sam9x5_peripheral_round_rate(struct clk_hw *hw, | ||
231 | unsigned long rate, | ||
232 | unsigned long *parent_rate) | ||
233 | { | ||
234 | int shift = 0; | ||
235 | unsigned long best_rate; | ||
236 | unsigned long best_diff; | ||
237 | unsigned long cur_rate = *parent_rate; | ||
238 | unsigned long cur_diff; | ||
239 | struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw); | ||
240 | |||
241 | if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) | ||
242 | return *parent_rate; | ||
243 | |||
244 | if (periph->range.max) { | ||
245 | for (; shift < PERIPHERAL_MAX_SHIFT; shift++) { | ||
246 | cur_rate = *parent_rate >> shift; | ||
247 | if (cur_rate <= periph->range.max) | ||
248 | break; | ||
249 | } | ||
250 | } | ||
251 | |||
252 | if (rate >= cur_rate) | ||
253 | return cur_rate; | ||
254 | |||
255 | best_diff = cur_rate - rate; | ||
256 | best_rate = cur_rate; | ||
257 | for (; shift < PERIPHERAL_MAX_SHIFT; shift++) { | ||
258 | cur_rate = *parent_rate >> shift; | ||
259 | if (cur_rate < rate) | ||
260 | cur_diff = rate - cur_rate; | ||
261 | else | ||
262 | cur_diff = cur_rate - rate; | ||
263 | |||
264 | if (cur_diff < best_diff) { | ||
265 | best_diff = cur_diff; | ||
266 | best_rate = cur_rate; | ||
267 | } | ||
268 | |||
269 | if (!best_diff || cur_rate < rate) | ||
270 | break; | ||
271 | } | ||
272 | |||
273 | return best_rate; | ||
274 | } | ||
275 | |||
276 | static int clk_sam9x5_peripheral_set_rate(struct clk_hw *hw, | ||
277 | unsigned long rate, | ||
278 | unsigned long parent_rate) | ||
279 | { | ||
280 | int shift; | ||
281 | struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw); | ||
282 | if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) { | ||
283 | if (parent_rate == rate) | ||
284 | return 0; | ||
285 | else | ||
286 | return -EINVAL; | ||
287 | } | ||
288 | |||
289 | if (periph->range.max && rate > periph->range.max) | ||
290 | return -EINVAL; | ||
291 | |||
292 | for (shift = 0; shift < PERIPHERAL_MAX_SHIFT; shift++) { | ||
293 | if (parent_rate >> shift == rate) { | ||
294 | periph->auto_div = false; | ||
295 | periph->div = shift; | ||
296 | return 0; | ||
297 | } | ||
298 | } | ||
299 | |||
300 | return -EINVAL; | ||
301 | } | ||
302 | |||
303 | static const struct clk_ops sam9x5_peripheral_ops = { | ||
304 | .enable = clk_sam9x5_peripheral_enable, | ||
305 | .disable = clk_sam9x5_peripheral_disable, | ||
306 | .is_enabled = clk_sam9x5_peripheral_is_enabled, | ||
307 | .recalc_rate = clk_sam9x5_peripheral_recalc_rate, | ||
308 | .round_rate = clk_sam9x5_peripheral_round_rate, | ||
309 | .set_rate = clk_sam9x5_peripheral_set_rate, | ||
310 | }; | ||
311 | |||
312 | static struct clk * __init | ||
313 | at91_clk_register_sam9x5_peripheral(struct at91_pmc *pmc, const char *name, | ||
314 | const char *parent_name, u32 id, | ||
315 | const struct clk_range *range) | ||
316 | { | ||
317 | struct clk_sam9x5_peripheral *periph; | ||
318 | struct clk *clk = NULL; | ||
319 | struct clk_init_data init; | ||
320 | |||
321 | if (!pmc || !name || !parent_name) | ||
322 | return ERR_PTR(-EINVAL); | ||
323 | |||
324 | periph = kzalloc(sizeof(*periph), GFP_KERNEL); | ||
325 | if (!periph) | ||
326 | return ERR_PTR(-ENOMEM); | ||
327 | |||
328 | init.name = name; | ||
329 | init.ops = &sam9x5_peripheral_ops; | ||
330 | init.parent_names = (parent_name ? &parent_name : NULL); | ||
331 | init.num_parents = (parent_name ? 1 : 0); | ||
332 | init.flags = 0; | ||
333 | |||
334 | periph->id = id; | ||
335 | periph->hw.init = &init; | ||
336 | periph->div = 0; | ||
337 | periph->pmc = pmc; | ||
338 | periph->auto_div = true; | ||
339 | periph->range = *range; | ||
340 | |||
341 | clk = clk_register(NULL, &periph->hw); | ||
342 | if (IS_ERR(clk)) | ||
343 | kfree(periph); | ||
344 | else | ||
345 | clk_sam9x5_peripheral_autodiv(periph); | ||
346 | |||
347 | return clk; | ||
348 | } | ||
349 | |||
350 | static void __init | ||
351 | of_at91_clk_periph_setup(struct device_node *np, struct at91_pmc *pmc, u8 type) | ||
352 | { | ||
353 | int num; | ||
354 | u32 id; | ||
355 | struct clk *clk; | ||
356 | const char *parent_name; | ||
357 | const char *name; | ||
358 | struct device_node *periphclknp; | ||
359 | |||
360 | parent_name = of_clk_get_parent_name(np, 0); | ||
361 | if (!parent_name) | ||
362 | return; | ||
363 | |||
364 | num = of_get_child_count(np); | ||
365 | if (!num || num > PERIPHERAL_MAX) | ||
366 | return; | ||
367 | |||
368 | for_each_child_of_node(np, periphclknp) { | ||
369 | if (of_property_read_u32(periphclknp, "reg", &id)) | ||
370 | continue; | ||
371 | |||
372 | if (id >= PERIPHERAL_MAX) | ||
373 | continue; | ||
374 | |||
375 | if (of_property_read_string(np, "clock-output-names", &name)) | ||
376 | name = periphclknp->name; | ||
377 | |||
378 | if (type == PERIPHERAL_AT91RM9200) { | ||
379 | clk = at91_clk_register_peripheral(pmc, name, | ||
380 | parent_name, id); | ||
381 | } else { | ||
382 | struct clk_range range = CLK_RANGE(0, 0); | ||
383 | |||
384 | of_at91_get_clk_range(periphclknp, | ||
385 | "atmel,clk-output-range", | ||
386 | &range); | ||
387 | |||
388 | clk = at91_clk_register_sam9x5_peripheral(pmc, name, | ||
389 | parent_name, | ||
390 | id, &range); | ||
391 | } | ||
392 | |||
393 | if (IS_ERR(clk)) | ||
394 | continue; | ||
395 | |||
396 | of_clk_add_provider(periphclknp, of_clk_src_simple_get, clk); | ||
397 | } | ||
398 | } | ||
399 | |||
400 | void __init of_at91rm9200_clk_periph_setup(struct device_node *np, | ||
401 | struct at91_pmc *pmc) | ||
402 | { | ||
403 | of_at91_clk_periph_setup(np, pmc, PERIPHERAL_AT91RM9200); | ||
404 | } | ||
405 | |||
406 | void __init of_at91sam9x5_clk_periph_setup(struct device_node *np, | ||
407 | struct at91_pmc *pmc) | ||
408 | { | ||
409 | of_at91_clk_periph_setup(np, pmc, PERIPHERAL_AT91SAM9X5); | ||
410 | } | ||
diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c new file mode 100644 index 000000000000..cf6ed023504c --- /dev/null +++ b/drivers/clk/at91/clk-pll.c | |||
@@ -0,0 +1,531 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/of_irq.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/wait.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/irq.h> | ||
22 | |||
23 | #include "pmc.h" | ||
24 | |||
25 | #define PLL_STATUS_MASK(id) (1 << (1 + (id))) | ||
26 | #define PLL_REG(id) (AT91_CKGR_PLLAR + ((id) * 4)) | ||
27 | #define PLL_DIV_MASK 0xff | ||
28 | #define PLL_DIV_MAX PLL_DIV_MASK | ||
29 | #define PLL_DIV(reg) ((reg) & PLL_DIV_MASK) | ||
30 | #define PLL_MUL(reg, layout) (((reg) >> (layout)->mul_shift) & \ | ||
31 | (layout)->mul_mask) | ||
32 | #define PLL_ICPR_SHIFT(id) ((id) * 16) | ||
33 | #define PLL_ICPR_MASK(id) (0xffff << PLL_ICPR_SHIFT(id)) | ||
34 | #define PLL_MAX_COUNT 0x3ff | ||
35 | #define PLL_COUNT_SHIFT 8 | ||
36 | #define PLL_OUT_SHIFT 14 | ||
37 | #define PLL_MAX_ID 1 | ||
38 | |||
39 | struct clk_pll_characteristics { | ||
40 | struct clk_range input; | ||
41 | int num_output; | ||
42 | struct clk_range *output; | ||
43 | u16 *icpll; | ||
44 | u8 *out; | ||
45 | }; | ||
46 | |||
47 | struct clk_pll_layout { | ||
48 | u32 pllr_mask; | ||
49 | u16 mul_mask; | ||
50 | u8 mul_shift; | ||
51 | }; | ||
52 | |||
53 | #define to_clk_pll(hw) container_of(hw, struct clk_pll, hw) | ||
54 | |||
55 | struct clk_pll { | ||
56 | struct clk_hw hw; | ||
57 | struct at91_pmc *pmc; | ||
58 | unsigned int irq; | ||
59 | wait_queue_head_t wait; | ||
60 | u8 id; | ||
61 | u8 div; | ||
62 | u8 range; | ||
63 | u16 mul; | ||
64 | const struct clk_pll_layout *layout; | ||
65 | const struct clk_pll_characteristics *characteristics; | ||
66 | }; | ||
67 | |||
68 | static irqreturn_t clk_pll_irq_handler(int irq, void *dev_id) | ||
69 | { | ||
70 | struct clk_pll *pll = (struct clk_pll *)dev_id; | ||
71 | |||
72 | wake_up(&pll->wait); | ||
73 | disable_irq_nosync(pll->irq); | ||
74 | |||
75 | return IRQ_HANDLED; | ||
76 | } | ||
77 | |||
78 | static int clk_pll_prepare(struct clk_hw *hw) | ||
79 | { | ||
80 | struct clk_pll *pll = to_clk_pll(hw); | ||
81 | struct at91_pmc *pmc = pll->pmc; | ||
82 | const struct clk_pll_layout *layout = pll->layout; | ||
83 | const struct clk_pll_characteristics *characteristics = | ||
84 | pll->characteristics; | ||
85 | u8 id = pll->id; | ||
86 | u32 mask = PLL_STATUS_MASK(id); | ||
87 | int offset = PLL_REG(id); | ||
88 | u8 out = 0; | ||
89 | u32 pllr, icpr; | ||
90 | u8 div; | ||
91 | u16 mul; | ||
92 | |||
93 | pllr = pmc_read(pmc, offset); | ||
94 | div = PLL_DIV(pllr); | ||
95 | mul = PLL_MUL(pllr, layout); | ||
96 | |||
97 | if ((pmc_read(pmc, AT91_PMC_SR) & mask) && | ||
98 | (div == pll->div && mul == pll->mul)) | ||
99 | return 0; | ||
100 | |||
101 | if (characteristics->out) | ||
102 | out = characteristics->out[pll->range]; | ||
103 | if (characteristics->icpll) { | ||
104 | icpr = pmc_read(pmc, AT91_PMC_PLLICPR) & ~PLL_ICPR_MASK(id); | ||
105 | icpr |= (characteristics->icpll[pll->range] << | ||
106 | PLL_ICPR_SHIFT(id)); | ||
107 | pmc_write(pmc, AT91_PMC_PLLICPR, icpr); | ||
108 | } | ||
109 | |||
110 | pllr &= ~layout->pllr_mask; | ||
111 | pllr |= layout->pllr_mask & | ||
112 | (pll->div | (PLL_MAX_COUNT << PLL_COUNT_SHIFT) | | ||
113 | (out << PLL_OUT_SHIFT) | | ||
114 | ((pll->mul & layout->mul_mask) << layout->mul_shift)); | ||
115 | pmc_write(pmc, offset, pllr); | ||
116 | |||
117 | while (!(pmc_read(pmc, AT91_PMC_SR) & mask)) { | ||
118 | enable_irq(pll->irq); | ||
119 | wait_event(pll->wait, | ||
120 | pmc_read(pmc, AT91_PMC_SR) & mask); | ||
121 | } | ||
122 | |||
123 | return 0; | ||
124 | } | ||
125 | |||
126 | static int clk_pll_is_prepared(struct clk_hw *hw) | ||
127 | { | ||
128 | struct clk_pll *pll = to_clk_pll(hw); | ||
129 | struct at91_pmc *pmc = pll->pmc; | ||
130 | |||
131 | return !!(pmc_read(pmc, AT91_PMC_SR) & | ||
132 | PLL_STATUS_MASK(pll->id)); | ||
133 | } | ||
134 | |||
135 | static void clk_pll_unprepare(struct clk_hw *hw) | ||
136 | { | ||
137 | struct clk_pll *pll = to_clk_pll(hw); | ||
138 | struct at91_pmc *pmc = pll->pmc; | ||
139 | const struct clk_pll_layout *layout = pll->layout; | ||
140 | int offset = PLL_REG(pll->id); | ||
141 | u32 tmp = pmc_read(pmc, offset) & ~(layout->pllr_mask); | ||
142 | |||
143 | pmc_write(pmc, offset, tmp); | ||
144 | } | ||
145 | |||
146 | static unsigned long clk_pll_recalc_rate(struct clk_hw *hw, | ||
147 | unsigned long parent_rate) | ||
148 | { | ||
149 | struct clk_pll *pll = to_clk_pll(hw); | ||
150 | const struct clk_pll_layout *layout = pll->layout; | ||
151 | struct at91_pmc *pmc = pll->pmc; | ||
152 | int offset = PLL_REG(pll->id); | ||
153 | u32 tmp = pmc_read(pmc, offset) & layout->pllr_mask; | ||
154 | u8 div = PLL_DIV(tmp); | ||
155 | u16 mul = PLL_MUL(tmp, layout); | ||
156 | if (!div || !mul) | ||
157 | return 0; | ||
158 | |||
159 | return (parent_rate * (mul + 1)) / div; | ||
160 | } | ||
161 | |||
162 | static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate, | ||
163 | unsigned long parent_rate, | ||
164 | u32 *div, u32 *mul, | ||
165 | u32 *index) { | ||
166 | unsigned long maxrate; | ||
167 | unsigned long minrate; | ||
168 | unsigned long divrate; | ||
169 | unsigned long bestdiv = 1; | ||
170 | unsigned long bestmul; | ||
171 | unsigned long tmpdiv; | ||
172 | unsigned long roundup; | ||
173 | unsigned long rounddown; | ||
174 | unsigned long remainder; | ||
175 | unsigned long bestremainder; | ||
176 | unsigned long maxmul; | ||
177 | unsigned long maxdiv; | ||
178 | unsigned long mindiv; | ||
179 | int i = 0; | ||
180 | const struct clk_pll_layout *layout = pll->layout; | ||
181 | const struct clk_pll_characteristics *characteristics = | ||
182 | pll->characteristics; | ||
183 | |||
184 | /* Minimum divider = 1 */ | ||
185 | /* Maximum multiplier = max_mul */ | ||
186 | maxmul = layout->mul_mask + 1; | ||
187 | maxrate = (parent_rate * maxmul) / 1; | ||
188 | |||
189 | /* Maximum divider = max_div */ | ||
190 | /* Minimum multiplier = 2 */ | ||
191 | maxdiv = PLL_DIV_MAX; | ||
192 | minrate = (parent_rate * 2) / maxdiv; | ||
193 | |||
194 | if (parent_rate < characteristics->input.min || | ||
195 | parent_rate < characteristics->input.max) | ||
196 | return -ERANGE; | ||
197 | |||
198 | if (parent_rate < minrate || parent_rate > maxrate) | ||
199 | return -ERANGE; | ||
200 | |||
201 | for (i = 0; i < characteristics->num_output; i++) { | ||
202 | if (parent_rate >= characteristics->output[i].min && | ||
203 | parent_rate <= characteristics->output[i].max) | ||
204 | break; | ||
205 | } | ||
206 | |||
207 | if (i >= characteristics->num_output) | ||
208 | return -ERANGE; | ||
209 | |||
210 | bestmul = rate / parent_rate; | ||
211 | rounddown = parent_rate % rate; | ||
212 | roundup = rate - rounddown; | ||
213 | bestremainder = roundup < rounddown ? roundup : rounddown; | ||
214 | |||
215 | if (!bestremainder) { | ||
216 | if (div) | ||
217 | *div = bestdiv; | ||
218 | if (mul) | ||
219 | *mul = bestmul; | ||
220 | if (index) | ||
221 | *index = i; | ||
222 | return rate; | ||
223 | } | ||
224 | |||
225 | maxdiv = 255 / (bestmul + 1); | ||
226 | if (parent_rate / maxdiv < characteristics->input.min) | ||
227 | maxdiv = parent_rate / characteristics->input.min; | ||
228 | mindiv = parent_rate / characteristics->input.max; | ||
229 | if (parent_rate % characteristics->input.max) | ||
230 | mindiv++; | ||
231 | |||
232 | for (tmpdiv = mindiv; tmpdiv < maxdiv; tmpdiv++) { | ||
233 | divrate = parent_rate / tmpdiv; | ||
234 | |||
235 | rounddown = rate % divrate; | ||
236 | roundup = divrate - rounddown; | ||
237 | remainder = roundup < rounddown ? roundup : rounddown; | ||
238 | |||
239 | if (remainder < bestremainder) { | ||
240 | bestremainder = remainder; | ||
241 | bestmul = rate / divrate; | ||
242 | bestdiv = tmpdiv; | ||
243 | } | ||
244 | |||
245 | if (!remainder) | ||
246 | break; | ||
247 | } | ||
248 | |||
249 | rate = (parent_rate / bestdiv) * bestmul; | ||
250 | |||
251 | if (div) | ||
252 | *div = bestdiv; | ||
253 | if (mul) | ||
254 | *mul = bestmul; | ||
255 | if (index) | ||
256 | *index = i; | ||
257 | |||
258 | return rate; | ||
259 | } | ||
260 | |||
261 | static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate, | ||
262 | unsigned long *parent_rate) | ||
263 | { | ||
264 | struct clk_pll *pll = to_clk_pll(hw); | ||
265 | |||
266 | return clk_pll_get_best_div_mul(pll, rate, *parent_rate, | ||
267 | NULL, NULL, NULL); | ||
268 | } | ||
269 | |||
270 | static int clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, | ||
271 | unsigned long parent_rate) | ||
272 | { | ||
273 | struct clk_pll *pll = to_clk_pll(hw); | ||
274 | long ret; | ||
275 | u32 div; | ||
276 | u32 mul; | ||
277 | u32 index; | ||
278 | |||
279 | ret = clk_pll_get_best_div_mul(pll, rate, parent_rate, | ||
280 | &div, &mul, &index); | ||
281 | if (ret < 0) | ||
282 | return ret; | ||
283 | |||
284 | pll->range = index; | ||
285 | pll->div = div; | ||
286 | pll->mul = mul; | ||
287 | |||
288 | return 0; | ||
289 | } | ||
290 | |||
291 | static const struct clk_ops pll_ops = { | ||
292 | .prepare = clk_pll_prepare, | ||
293 | .unprepare = clk_pll_unprepare, | ||
294 | .is_prepared = clk_pll_is_prepared, | ||
295 | .recalc_rate = clk_pll_recalc_rate, | ||
296 | .round_rate = clk_pll_round_rate, | ||
297 | .set_rate = clk_pll_set_rate, | ||
298 | }; | ||
299 | |||
300 | static struct clk * __init | ||
301 | at91_clk_register_pll(struct at91_pmc *pmc, unsigned int irq, const char *name, | ||
302 | const char *parent_name, u8 id, | ||
303 | const struct clk_pll_layout *layout, | ||
304 | const struct clk_pll_characteristics *characteristics) | ||
305 | { | ||
306 | struct clk_pll *pll; | ||
307 | struct clk *clk = NULL; | ||
308 | struct clk_init_data init; | ||
309 | int ret; | ||
310 | int offset = PLL_REG(id); | ||
311 | u32 tmp; | ||
312 | |||
313 | if (id > PLL_MAX_ID) | ||
314 | return ERR_PTR(-EINVAL); | ||
315 | |||
316 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
317 | if (!pll) | ||
318 | return ERR_PTR(-ENOMEM); | ||
319 | |||
320 | init.name = name; | ||
321 | init.ops = &pll_ops; | ||
322 | init.parent_names = &parent_name; | ||
323 | init.num_parents = 1; | ||
324 | init.flags = CLK_SET_RATE_GATE; | ||
325 | |||
326 | pll->id = id; | ||
327 | pll->hw.init = &init; | ||
328 | pll->layout = layout; | ||
329 | pll->characteristics = characteristics; | ||
330 | pll->pmc = pmc; | ||
331 | pll->irq = irq; | ||
332 | tmp = pmc_read(pmc, offset) & layout->pllr_mask; | ||
333 | pll->div = PLL_DIV(tmp); | ||
334 | pll->mul = PLL_MUL(tmp, layout); | ||
335 | init_waitqueue_head(&pll->wait); | ||
336 | irq_set_status_flags(pll->irq, IRQ_NOAUTOEN); | ||
337 | ret = request_irq(pll->irq, clk_pll_irq_handler, IRQF_TRIGGER_HIGH, | ||
338 | id ? "clk-pllb" : "clk-plla", pll); | ||
339 | if (ret) | ||
340 | return ERR_PTR(ret); | ||
341 | |||
342 | clk = clk_register(NULL, &pll->hw); | ||
343 | if (IS_ERR(clk)) | ||
344 | kfree(pll); | ||
345 | |||
346 | return clk; | ||
347 | } | ||
348 | |||
349 | |||
350 | static const struct clk_pll_layout at91rm9200_pll_layout = { | ||
351 | .pllr_mask = 0x7FFFFFF, | ||
352 | .mul_shift = 16, | ||
353 | .mul_mask = 0x7FF, | ||
354 | }; | ||
355 | |||
356 | static const struct clk_pll_layout at91sam9g45_pll_layout = { | ||
357 | .pllr_mask = 0xFFFFFF, | ||
358 | .mul_shift = 16, | ||
359 | .mul_mask = 0xFF, | ||
360 | }; | ||
361 | |||
362 | static const struct clk_pll_layout at91sam9g20_pllb_layout = { | ||
363 | .pllr_mask = 0x3FFFFF, | ||
364 | .mul_shift = 16, | ||
365 | .mul_mask = 0x3F, | ||
366 | }; | ||
367 | |||
368 | static const struct clk_pll_layout sama5d3_pll_layout = { | ||
369 | .pllr_mask = 0x1FFFFFF, | ||
370 | .mul_shift = 18, | ||
371 | .mul_mask = 0x7F, | ||
372 | }; | ||
373 | |||
374 | |||
375 | static struct clk_pll_characteristics * __init | ||
376 | of_at91_clk_pll_get_characteristics(struct device_node *np) | ||
377 | { | ||
378 | int i; | ||
379 | int offset; | ||
380 | u32 tmp; | ||
381 | int num_output; | ||
382 | u32 num_cells; | ||
383 | struct clk_range input; | ||
384 | struct clk_range *output; | ||
385 | u8 *out = NULL; | ||
386 | u16 *icpll = NULL; | ||
387 | struct clk_pll_characteristics *characteristics; | ||
388 | |||
389 | if (of_at91_get_clk_range(np, "atmel,clk-input-range", &input)) | ||
390 | return NULL; | ||
391 | |||
392 | if (of_property_read_u32(np, "#atmel,pll-clk-output-range-cells", | ||
393 | &num_cells)) | ||
394 | return NULL; | ||
395 | |||
396 | if (num_cells < 2 || num_cells > 4) | ||
397 | return NULL; | ||
398 | |||
399 | if (!of_get_property(np, "atmel,pll-clk-output-ranges", &tmp)) | ||
400 | return NULL; | ||
401 | num_output = tmp / (sizeof(u32) * num_cells); | ||
402 | |||
403 | characteristics = kzalloc(sizeof(*characteristics), GFP_KERNEL); | ||
404 | if (!characteristics) | ||
405 | return NULL; | ||
406 | |||
407 | output = kzalloc(sizeof(*output) * num_output, GFP_KERNEL); | ||
408 | if (!output) | ||
409 | goto out_free_characteristics; | ||
410 | |||
411 | if (num_cells > 2) { | ||
412 | out = kzalloc(sizeof(*out) * num_output, GFP_KERNEL); | ||
413 | if (!out) | ||
414 | goto out_free_output; | ||
415 | } | ||
416 | |||
417 | if (num_cells > 3) { | ||
418 | icpll = kzalloc(sizeof(*icpll) * num_output, GFP_KERNEL); | ||
419 | if (!icpll) | ||
420 | goto out_free_output; | ||
421 | } | ||
422 | |||
423 | for (i = 0; i < num_output; i++) { | ||
424 | offset = i * num_cells; | ||
425 | if (of_property_read_u32_index(np, | ||
426 | "atmel,pll-clk-output-ranges", | ||
427 | offset, &tmp)) | ||
428 | goto out_free_output; | ||
429 | output[i].min = tmp; | ||
430 | if (of_property_read_u32_index(np, | ||
431 | "atmel,pll-clk-output-ranges", | ||
432 | offset + 1, &tmp)) | ||
433 | goto out_free_output; | ||
434 | output[i].max = tmp; | ||
435 | |||
436 | if (num_cells == 2) | ||
437 | continue; | ||
438 | |||
439 | if (of_property_read_u32_index(np, | ||
440 | "atmel,pll-clk-output-ranges", | ||
441 | offset + 2, &tmp)) | ||
442 | goto out_free_output; | ||
443 | out[i] = tmp; | ||
444 | |||
445 | if (num_cells == 3) | ||
446 | continue; | ||
447 | |||
448 | if (of_property_read_u32_index(np, | ||
449 | "atmel,pll-clk-output-ranges", | ||
450 | offset + 3, &tmp)) | ||
451 | goto out_free_output; | ||
452 | icpll[i] = tmp; | ||
453 | } | ||
454 | |||
455 | characteristics->input = input; | ||
456 | characteristics->num_output = num_output; | ||
457 | characteristics->output = output; | ||
458 | characteristics->out = out; | ||
459 | characteristics->icpll = icpll; | ||
460 | return characteristics; | ||
461 | |||
462 | out_free_output: | ||
463 | kfree(icpll); | ||
464 | kfree(out); | ||
465 | kfree(output); | ||
466 | out_free_characteristics: | ||
467 | kfree(characteristics); | ||
468 | return NULL; | ||
469 | } | ||
470 | |||
471 | static void __init | ||
472 | of_at91_clk_pll_setup(struct device_node *np, struct at91_pmc *pmc, | ||
473 | const struct clk_pll_layout *layout) | ||
474 | { | ||
475 | u32 id; | ||
476 | unsigned int irq; | ||
477 | struct clk *clk; | ||
478 | const char *parent_name; | ||
479 | const char *name = np->name; | ||
480 | struct clk_pll_characteristics *characteristics; | ||
481 | |||
482 | if (of_property_read_u32(np, "reg", &id)) | ||
483 | return; | ||
484 | |||
485 | parent_name = of_clk_get_parent_name(np, 0); | ||
486 | |||
487 | of_property_read_string(np, "clock-output-names", &name); | ||
488 | |||
489 | characteristics = of_at91_clk_pll_get_characteristics(np); | ||
490 | if (!characteristics) | ||
491 | return; | ||
492 | |||
493 | irq = irq_of_parse_and_map(np, 0); | ||
494 | if (!irq) | ||
495 | return; | ||
496 | |||
497 | clk = at91_clk_register_pll(pmc, irq, name, parent_name, id, layout, | ||
498 | characteristics); | ||
499 | if (IS_ERR(clk)) | ||
500 | goto out_free_characteristics; | ||
501 | |||
502 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
503 | return; | ||
504 | |||
505 | out_free_characteristics: | ||
506 | kfree(characteristics); | ||
507 | } | ||
508 | |||
509 | void __init of_at91rm9200_clk_pll_setup(struct device_node *np, | ||
510 | struct at91_pmc *pmc) | ||
511 | { | ||
512 | of_at91_clk_pll_setup(np, pmc, &at91rm9200_pll_layout); | ||
513 | } | ||
514 | |||
515 | void __init of_at91sam9g45_clk_pll_setup(struct device_node *np, | ||
516 | struct at91_pmc *pmc) | ||
517 | { | ||
518 | of_at91_clk_pll_setup(np, pmc, &at91sam9g45_pll_layout); | ||
519 | } | ||
520 | |||
521 | void __init of_at91sam9g20_clk_pllb_setup(struct device_node *np, | ||
522 | struct at91_pmc *pmc) | ||
523 | { | ||
524 | of_at91_clk_pll_setup(np, pmc, &at91sam9g20_pllb_layout); | ||
525 | } | ||
526 | |||
527 | void __init of_sama5d3_clk_pll_setup(struct device_node *np, | ||
528 | struct at91_pmc *pmc) | ||
529 | { | ||
530 | of_at91_clk_pll_setup(np, pmc, &sama5d3_pll_layout); | ||
531 | } | ||
diff --git a/drivers/clk/at91/clk-plldiv.c b/drivers/clk/at91/clk-plldiv.c new file mode 100644 index 000000000000..ea226562bb40 --- /dev/null +++ b/drivers/clk/at91/clk-plldiv.c | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include "pmc.h" | ||
19 | |||
20 | #define to_clk_plldiv(hw) container_of(hw, struct clk_plldiv, hw) | ||
21 | |||
22 | struct clk_plldiv { | ||
23 | struct clk_hw hw; | ||
24 | struct at91_pmc *pmc; | ||
25 | }; | ||
26 | |||
27 | static unsigned long clk_plldiv_recalc_rate(struct clk_hw *hw, | ||
28 | unsigned long parent_rate) | ||
29 | { | ||
30 | struct clk_plldiv *plldiv = to_clk_plldiv(hw); | ||
31 | struct at91_pmc *pmc = plldiv->pmc; | ||
32 | |||
33 | if (pmc_read(pmc, AT91_PMC_MCKR) & AT91_PMC_PLLADIV2) | ||
34 | return parent_rate / 2; | ||
35 | |||
36 | return parent_rate; | ||
37 | } | ||
38 | |||
39 | static long clk_plldiv_round_rate(struct clk_hw *hw, unsigned long rate, | ||
40 | unsigned long *parent_rate) | ||
41 | { | ||
42 | unsigned long div; | ||
43 | |||
44 | if (rate > *parent_rate) | ||
45 | return *parent_rate; | ||
46 | div = *parent_rate / 2; | ||
47 | if (rate < div) | ||
48 | return div; | ||
49 | |||
50 | if (rate - div < *parent_rate - rate) | ||
51 | return div; | ||
52 | |||
53 | return *parent_rate; | ||
54 | } | ||
55 | |||
56 | static int clk_plldiv_set_rate(struct clk_hw *hw, unsigned long rate, | ||
57 | unsigned long parent_rate) | ||
58 | { | ||
59 | struct clk_plldiv *plldiv = to_clk_plldiv(hw); | ||
60 | struct at91_pmc *pmc = plldiv->pmc; | ||
61 | u32 tmp; | ||
62 | |||
63 | if (parent_rate != rate && (parent_rate / 2) != rate) | ||
64 | return -EINVAL; | ||
65 | |||
66 | pmc_lock(pmc); | ||
67 | tmp = pmc_read(pmc, AT91_PMC_MCKR) & ~AT91_PMC_PLLADIV2; | ||
68 | if ((parent_rate / 2) == rate) | ||
69 | tmp |= AT91_PMC_PLLADIV2; | ||
70 | pmc_write(pmc, AT91_PMC_MCKR, tmp); | ||
71 | pmc_unlock(pmc); | ||
72 | |||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | static const struct clk_ops plldiv_ops = { | ||
77 | .recalc_rate = clk_plldiv_recalc_rate, | ||
78 | .round_rate = clk_plldiv_round_rate, | ||
79 | .set_rate = clk_plldiv_set_rate, | ||
80 | }; | ||
81 | |||
82 | static struct clk * __init | ||
83 | at91_clk_register_plldiv(struct at91_pmc *pmc, const char *name, | ||
84 | const char *parent_name) | ||
85 | { | ||
86 | struct clk_plldiv *plldiv; | ||
87 | struct clk *clk = NULL; | ||
88 | struct clk_init_data init; | ||
89 | |||
90 | plldiv = kzalloc(sizeof(*plldiv), GFP_KERNEL); | ||
91 | if (!plldiv) | ||
92 | return ERR_PTR(-ENOMEM); | ||
93 | |||
94 | init.name = name; | ||
95 | init.ops = &plldiv_ops; | ||
96 | init.parent_names = parent_name ? &parent_name : NULL; | ||
97 | init.num_parents = parent_name ? 1 : 0; | ||
98 | init.flags = CLK_SET_RATE_GATE; | ||
99 | |||
100 | plldiv->hw.init = &init; | ||
101 | plldiv->pmc = pmc; | ||
102 | |||
103 | clk = clk_register(NULL, &plldiv->hw); | ||
104 | |||
105 | if (IS_ERR(clk)) | ||
106 | kfree(plldiv); | ||
107 | |||
108 | return clk; | ||
109 | } | ||
110 | |||
111 | static void __init | ||
112 | of_at91_clk_plldiv_setup(struct device_node *np, struct at91_pmc *pmc) | ||
113 | { | ||
114 | struct clk *clk; | ||
115 | const char *parent_name; | ||
116 | const char *name = np->name; | ||
117 | |||
118 | parent_name = of_clk_get_parent_name(np, 0); | ||
119 | |||
120 | of_property_read_string(np, "clock-output-names", &name); | ||
121 | |||
122 | clk = at91_clk_register_plldiv(pmc, name, parent_name); | ||
123 | |||
124 | if (IS_ERR(clk)) | ||
125 | return; | ||
126 | |||
127 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
128 | return; | ||
129 | } | ||
130 | |||
131 | void __init of_at91sam9x5_clk_plldiv_setup(struct device_node *np, | ||
132 | struct at91_pmc *pmc) | ||
133 | { | ||
134 | of_at91_clk_plldiv_setup(np, pmc); | ||
135 | } | ||
diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c new file mode 100644 index 000000000000..fd792b203eaf --- /dev/null +++ b/drivers/clk/at91/clk-programmable.c | |||
@@ -0,0 +1,366 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/of_irq.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/wait.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/irq.h> | ||
22 | |||
23 | #include "pmc.h" | ||
24 | |||
25 | #define PROG_SOURCE_MAX 5 | ||
26 | #define PROG_ID_MAX 7 | ||
27 | |||
28 | #define PROG_STATUS_MASK(id) (1 << ((id) + 8)) | ||
29 | #define PROG_PRES_MASK 0x7 | ||
30 | #define PROG_MAX_RM9200_CSS 3 | ||
31 | |||
32 | struct clk_programmable_layout { | ||
33 | u8 pres_shift; | ||
34 | u8 css_mask; | ||
35 | u8 have_slck_mck; | ||
36 | }; | ||
37 | |||
38 | struct clk_programmable { | ||
39 | struct clk_hw hw; | ||
40 | struct at91_pmc *pmc; | ||
41 | unsigned int irq; | ||
42 | wait_queue_head_t wait; | ||
43 | u8 id; | ||
44 | u8 css; | ||
45 | u8 pres; | ||
46 | u8 slckmck; | ||
47 | const struct clk_programmable_layout *layout; | ||
48 | }; | ||
49 | |||
50 | #define to_clk_programmable(hw) container_of(hw, struct clk_programmable, hw) | ||
51 | |||
52 | |||
53 | static irqreturn_t clk_programmable_irq_handler(int irq, void *dev_id) | ||
54 | { | ||
55 | struct clk_programmable *prog = (struct clk_programmable *)dev_id; | ||
56 | |||
57 | wake_up(&prog->wait); | ||
58 | |||
59 | return IRQ_HANDLED; | ||
60 | } | ||
61 | |||
62 | static int clk_programmable_prepare(struct clk_hw *hw) | ||
63 | { | ||
64 | u32 tmp; | ||
65 | struct clk_programmable *prog = to_clk_programmable(hw); | ||
66 | struct at91_pmc *pmc = prog->pmc; | ||
67 | const struct clk_programmable_layout *layout = prog->layout; | ||
68 | u8 id = prog->id; | ||
69 | u32 mask = PROG_STATUS_MASK(id); | ||
70 | |||
71 | tmp = prog->css | (prog->pres << layout->pres_shift); | ||
72 | if (layout->have_slck_mck && prog->slckmck) | ||
73 | tmp |= AT91_PMC_CSSMCK_MCK; | ||
74 | |||
75 | pmc_write(pmc, AT91_PMC_PCKR(id), tmp); | ||
76 | |||
77 | while (!(pmc_read(pmc, AT91_PMC_SR) & mask)) | ||
78 | wait_event(prog->wait, pmc_read(pmc, AT91_PMC_SR) & mask); | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | static int clk_programmable_is_ready(struct clk_hw *hw) | ||
84 | { | ||
85 | struct clk_programmable *prog = to_clk_programmable(hw); | ||
86 | struct at91_pmc *pmc = prog->pmc; | ||
87 | |||
88 | return !!(pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_PCKR(prog->id)); | ||
89 | } | ||
90 | |||
91 | static unsigned long clk_programmable_recalc_rate(struct clk_hw *hw, | ||
92 | unsigned long parent_rate) | ||
93 | { | ||
94 | u32 tmp; | ||
95 | struct clk_programmable *prog = to_clk_programmable(hw); | ||
96 | struct at91_pmc *pmc = prog->pmc; | ||
97 | const struct clk_programmable_layout *layout = prog->layout; | ||
98 | |||
99 | tmp = pmc_read(pmc, AT91_PMC_PCKR(prog->id)); | ||
100 | prog->pres = (tmp >> layout->pres_shift) & PROG_PRES_MASK; | ||
101 | |||
102 | return parent_rate >> prog->pres; | ||
103 | } | ||
104 | |||
105 | static long clk_programmable_round_rate(struct clk_hw *hw, unsigned long rate, | ||
106 | unsigned long *parent_rate) | ||
107 | { | ||
108 | unsigned long best_rate = *parent_rate; | ||
109 | unsigned long best_diff; | ||
110 | unsigned long new_diff; | ||
111 | unsigned long cur_rate; | ||
112 | int shift = shift; | ||
113 | |||
114 | if (rate > *parent_rate) | ||
115 | return *parent_rate; | ||
116 | else | ||
117 | best_diff = *parent_rate - rate; | ||
118 | |||
119 | if (!best_diff) | ||
120 | return best_rate; | ||
121 | |||
122 | for (shift = 1; shift < PROG_PRES_MASK; shift++) { | ||
123 | cur_rate = *parent_rate >> shift; | ||
124 | |||
125 | if (cur_rate > rate) | ||
126 | new_diff = cur_rate - rate; | ||
127 | else | ||
128 | new_diff = rate - cur_rate; | ||
129 | |||
130 | if (!new_diff) | ||
131 | return cur_rate; | ||
132 | |||
133 | if (new_diff < best_diff) { | ||
134 | best_diff = new_diff; | ||
135 | best_rate = cur_rate; | ||
136 | } | ||
137 | |||
138 | if (rate > cur_rate) | ||
139 | break; | ||
140 | } | ||
141 | |||
142 | return best_rate; | ||
143 | } | ||
144 | |||
145 | static int clk_programmable_set_parent(struct clk_hw *hw, u8 index) | ||
146 | { | ||
147 | struct clk_programmable *prog = to_clk_programmable(hw); | ||
148 | const struct clk_programmable_layout *layout = prog->layout; | ||
149 | if (index > layout->css_mask) { | ||
150 | if (index > PROG_MAX_RM9200_CSS && layout->have_slck_mck) { | ||
151 | prog->css = 0; | ||
152 | prog->slckmck = 1; | ||
153 | return 0; | ||
154 | } else { | ||
155 | return -EINVAL; | ||
156 | } | ||
157 | } | ||
158 | |||
159 | prog->css = index; | ||
160 | return 0; | ||
161 | } | ||
162 | |||
163 | static u8 clk_programmable_get_parent(struct clk_hw *hw) | ||
164 | { | ||
165 | u32 tmp; | ||
166 | u8 ret; | ||
167 | struct clk_programmable *prog = to_clk_programmable(hw); | ||
168 | struct at91_pmc *pmc = prog->pmc; | ||
169 | const struct clk_programmable_layout *layout = prog->layout; | ||
170 | |||
171 | tmp = pmc_read(pmc, AT91_PMC_PCKR(prog->id)); | ||
172 | prog->css = tmp & layout->css_mask; | ||
173 | ret = prog->css; | ||
174 | if (layout->have_slck_mck) { | ||
175 | prog->slckmck = !!(tmp & AT91_PMC_CSSMCK_MCK); | ||
176 | if (prog->slckmck && !ret) | ||
177 | ret = PROG_MAX_RM9200_CSS + 1; | ||
178 | } | ||
179 | |||
180 | return ret; | ||
181 | } | ||
182 | |||
183 | static int clk_programmable_set_rate(struct clk_hw *hw, unsigned long rate, | ||
184 | unsigned long parent_rate) | ||
185 | { | ||
186 | struct clk_programmable *prog = to_clk_programmable(hw); | ||
187 | unsigned long best_rate = parent_rate; | ||
188 | unsigned long best_diff; | ||
189 | unsigned long new_diff; | ||
190 | unsigned long cur_rate; | ||
191 | int shift = 0; | ||
192 | |||
193 | if (rate > parent_rate) | ||
194 | return parent_rate; | ||
195 | else | ||
196 | best_diff = parent_rate - rate; | ||
197 | |||
198 | if (!best_diff) { | ||
199 | prog->pres = shift; | ||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | for (shift = 1; shift < PROG_PRES_MASK; shift++) { | ||
204 | cur_rate = parent_rate >> shift; | ||
205 | |||
206 | if (cur_rate > rate) | ||
207 | new_diff = cur_rate - rate; | ||
208 | else | ||
209 | new_diff = rate - cur_rate; | ||
210 | |||
211 | if (!new_diff) | ||
212 | break; | ||
213 | |||
214 | if (new_diff < best_diff) { | ||
215 | best_diff = new_diff; | ||
216 | best_rate = cur_rate; | ||
217 | } | ||
218 | |||
219 | if (rate > cur_rate) | ||
220 | break; | ||
221 | } | ||
222 | |||
223 | prog->pres = shift; | ||
224 | return 0; | ||
225 | } | ||
226 | |||
227 | static const struct clk_ops programmable_ops = { | ||
228 | .prepare = clk_programmable_prepare, | ||
229 | .is_prepared = clk_programmable_is_ready, | ||
230 | .recalc_rate = clk_programmable_recalc_rate, | ||
231 | .round_rate = clk_programmable_round_rate, | ||
232 | .get_parent = clk_programmable_get_parent, | ||
233 | .set_parent = clk_programmable_set_parent, | ||
234 | .set_rate = clk_programmable_set_rate, | ||
235 | }; | ||
236 | |||
237 | static struct clk * __init | ||
238 | at91_clk_register_programmable(struct at91_pmc *pmc, unsigned int irq, | ||
239 | const char *name, const char **parent_names, | ||
240 | u8 num_parents, u8 id, | ||
241 | const struct clk_programmable_layout *layout) | ||
242 | { | ||
243 | int ret; | ||
244 | struct clk_programmable *prog; | ||
245 | struct clk *clk = NULL; | ||
246 | struct clk_init_data init; | ||
247 | char irq_name[11]; | ||
248 | |||
249 | if (id > PROG_ID_MAX) | ||
250 | return ERR_PTR(-EINVAL); | ||
251 | |||
252 | prog = kzalloc(sizeof(*prog), GFP_KERNEL); | ||
253 | if (!prog) | ||
254 | return ERR_PTR(-ENOMEM); | ||
255 | |||
256 | init.name = name; | ||
257 | init.ops = &programmable_ops; | ||
258 | init.parent_names = parent_names; | ||
259 | init.num_parents = num_parents; | ||
260 | init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE; | ||
261 | |||
262 | prog->id = id; | ||
263 | prog->layout = layout; | ||
264 | prog->hw.init = &init; | ||
265 | prog->pmc = pmc; | ||
266 | prog->irq = irq; | ||
267 | init_waitqueue_head(&prog->wait); | ||
268 | irq_set_status_flags(prog->irq, IRQ_NOAUTOEN); | ||
269 | snprintf(irq_name, sizeof(irq_name), "clk-prog%d", id); | ||
270 | ret = request_irq(prog->irq, clk_programmable_irq_handler, | ||
271 | IRQF_TRIGGER_HIGH, irq_name, prog); | ||
272 | if (ret) | ||
273 | return ERR_PTR(ret); | ||
274 | |||
275 | clk = clk_register(NULL, &prog->hw); | ||
276 | if (IS_ERR(clk)) | ||
277 | kfree(prog); | ||
278 | |||
279 | return clk; | ||
280 | } | ||
281 | |||
282 | static const struct clk_programmable_layout at91rm9200_programmable_layout = { | ||
283 | .pres_shift = 2, | ||
284 | .css_mask = 0x3, | ||
285 | .have_slck_mck = 0, | ||
286 | }; | ||
287 | |||
288 | static const struct clk_programmable_layout at91sam9g45_programmable_layout = { | ||
289 | .pres_shift = 2, | ||
290 | .css_mask = 0x3, | ||
291 | .have_slck_mck = 1, | ||
292 | }; | ||
293 | |||
294 | static const struct clk_programmable_layout at91sam9x5_programmable_layout = { | ||
295 | .pres_shift = 4, | ||
296 | .css_mask = 0x7, | ||
297 | .have_slck_mck = 0, | ||
298 | }; | ||
299 | |||
300 | static void __init | ||
301 | of_at91_clk_prog_setup(struct device_node *np, struct at91_pmc *pmc, | ||
302 | const struct clk_programmable_layout *layout) | ||
303 | { | ||
304 | int num; | ||
305 | u32 id; | ||
306 | int i; | ||
307 | unsigned int irq; | ||
308 | struct clk *clk; | ||
309 | int num_parents; | ||
310 | const char *parent_names[PROG_SOURCE_MAX]; | ||
311 | const char *name; | ||
312 | struct device_node *progclknp; | ||
313 | |||
314 | num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); | ||
315 | if (num_parents <= 0 || num_parents > PROG_SOURCE_MAX) | ||
316 | return; | ||
317 | |||
318 | for (i = 0; i < num_parents; ++i) { | ||
319 | parent_names[i] = of_clk_get_parent_name(np, i); | ||
320 | if (!parent_names[i]) | ||
321 | return; | ||
322 | } | ||
323 | |||
324 | num = of_get_child_count(np); | ||
325 | if (!num || num > (PROG_ID_MAX + 1)) | ||
326 | return; | ||
327 | |||
328 | for_each_child_of_node(np, progclknp) { | ||
329 | if (of_property_read_u32(progclknp, "reg", &id)) | ||
330 | continue; | ||
331 | |||
332 | if (of_property_read_string(np, "clock-output-names", &name)) | ||
333 | name = progclknp->name; | ||
334 | |||
335 | irq = irq_of_parse_and_map(progclknp, 0); | ||
336 | if (!irq) | ||
337 | continue; | ||
338 | |||
339 | clk = at91_clk_register_programmable(pmc, irq, name, | ||
340 | parent_names, num_parents, | ||
341 | id, layout); | ||
342 | if (IS_ERR(clk)) | ||
343 | continue; | ||
344 | |||
345 | of_clk_add_provider(progclknp, of_clk_src_simple_get, clk); | ||
346 | } | ||
347 | } | ||
348 | |||
349 | |||
350 | void __init of_at91rm9200_clk_prog_setup(struct device_node *np, | ||
351 | struct at91_pmc *pmc) | ||
352 | { | ||
353 | of_at91_clk_prog_setup(np, pmc, &at91rm9200_programmable_layout); | ||
354 | } | ||
355 | |||
356 | void __init of_at91sam9g45_clk_prog_setup(struct device_node *np, | ||
357 | struct at91_pmc *pmc) | ||
358 | { | ||
359 | of_at91_clk_prog_setup(np, pmc, &at91sam9g45_programmable_layout); | ||
360 | } | ||
361 | |||
362 | void __init of_at91sam9x5_clk_prog_setup(struct device_node *np, | ||
363 | struct at91_pmc *pmc) | ||
364 | { | ||
365 | of_at91_clk_prog_setup(np, pmc, &at91sam9x5_programmable_layout); | ||
366 | } | ||
diff --git a/drivers/clk/at91/clk-smd.c b/drivers/clk/at91/clk-smd.c new file mode 100644 index 000000000000..144d47ecfe63 --- /dev/null +++ b/drivers/clk/at91/clk-smd.c | |||
@@ -0,0 +1,171 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include "pmc.h" | ||
19 | |||
20 | #define SMD_SOURCE_MAX 2 | ||
21 | |||
22 | #define SMD_DIV_SHIFT 8 | ||
23 | #define SMD_MAX_DIV 0xf | ||
24 | |||
25 | struct at91sam9x5_clk_smd { | ||
26 | struct clk_hw hw; | ||
27 | struct at91_pmc *pmc; | ||
28 | }; | ||
29 | |||
30 | #define to_at91sam9x5_clk_smd(hw) \ | ||
31 | container_of(hw, struct at91sam9x5_clk_smd, hw) | ||
32 | |||
33 | static unsigned long at91sam9x5_clk_smd_recalc_rate(struct clk_hw *hw, | ||
34 | unsigned long parent_rate) | ||
35 | { | ||
36 | u32 tmp; | ||
37 | u8 smddiv; | ||
38 | struct at91sam9x5_clk_smd *smd = to_at91sam9x5_clk_smd(hw); | ||
39 | struct at91_pmc *pmc = smd->pmc; | ||
40 | |||
41 | tmp = pmc_read(pmc, AT91_PMC_SMD); | ||
42 | smddiv = (tmp & AT91_PMC_SMD_DIV) >> SMD_DIV_SHIFT; | ||
43 | return parent_rate / (smddiv + 1); | ||
44 | } | ||
45 | |||
46 | static long at91sam9x5_clk_smd_round_rate(struct clk_hw *hw, unsigned long rate, | ||
47 | unsigned long *parent_rate) | ||
48 | { | ||
49 | unsigned long div; | ||
50 | unsigned long bestrate; | ||
51 | unsigned long tmp; | ||
52 | |||
53 | if (rate >= *parent_rate) | ||
54 | return *parent_rate; | ||
55 | |||
56 | div = *parent_rate / rate; | ||
57 | if (div > SMD_MAX_DIV) | ||
58 | return *parent_rate / (SMD_MAX_DIV + 1); | ||
59 | |||
60 | bestrate = *parent_rate / div; | ||
61 | tmp = *parent_rate / (div + 1); | ||
62 | if (bestrate - rate > rate - tmp) | ||
63 | bestrate = tmp; | ||
64 | |||
65 | return bestrate; | ||
66 | } | ||
67 | |||
68 | static int at91sam9x5_clk_smd_set_parent(struct clk_hw *hw, u8 index) | ||
69 | { | ||
70 | u32 tmp; | ||
71 | struct at91sam9x5_clk_smd *smd = to_at91sam9x5_clk_smd(hw); | ||
72 | struct at91_pmc *pmc = smd->pmc; | ||
73 | |||
74 | if (index > 1) | ||
75 | return -EINVAL; | ||
76 | tmp = pmc_read(pmc, AT91_PMC_SMD) & ~AT91_PMC_SMDS; | ||
77 | if (index) | ||
78 | tmp |= AT91_PMC_SMDS; | ||
79 | pmc_write(pmc, AT91_PMC_SMD, tmp); | ||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | static u8 at91sam9x5_clk_smd_get_parent(struct clk_hw *hw) | ||
84 | { | ||
85 | struct at91sam9x5_clk_smd *smd = to_at91sam9x5_clk_smd(hw); | ||
86 | struct at91_pmc *pmc = smd->pmc; | ||
87 | |||
88 | return pmc_read(pmc, AT91_PMC_SMD) & AT91_PMC_SMDS; | ||
89 | } | ||
90 | |||
91 | static int at91sam9x5_clk_smd_set_rate(struct clk_hw *hw, unsigned long rate, | ||
92 | unsigned long parent_rate) | ||
93 | { | ||
94 | u32 tmp; | ||
95 | struct at91sam9x5_clk_smd *smd = to_at91sam9x5_clk_smd(hw); | ||
96 | struct at91_pmc *pmc = smd->pmc; | ||
97 | unsigned long div = parent_rate / rate; | ||
98 | |||
99 | if (parent_rate % rate || div < 1 || div > (SMD_MAX_DIV + 1)) | ||
100 | return -EINVAL; | ||
101 | tmp = pmc_read(pmc, AT91_PMC_SMD) & ~AT91_PMC_SMD_DIV; | ||
102 | tmp |= (div - 1) << SMD_DIV_SHIFT; | ||
103 | pmc_write(pmc, AT91_PMC_SMD, tmp); | ||
104 | |||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | static const struct clk_ops at91sam9x5_smd_ops = { | ||
109 | .recalc_rate = at91sam9x5_clk_smd_recalc_rate, | ||
110 | .round_rate = at91sam9x5_clk_smd_round_rate, | ||
111 | .get_parent = at91sam9x5_clk_smd_get_parent, | ||
112 | .set_parent = at91sam9x5_clk_smd_set_parent, | ||
113 | .set_rate = at91sam9x5_clk_smd_set_rate, | ||
114 | }; | ||
115 | |||
116 | static struct clk * __init | ||
117 | at91sam9x5_clk_register_smd(struct at91_pmc *pmc, const char *name, | ||
118 | const char **parent_names, u8 num_parents) | ||
119 | { | ||
120 | struct at91sam9x5_clk_smd *smd; | ||
121 | struct clk *clk = NULL; | ||
122 | struct clk_init_data init; | ||
123 | |||
124 | smd = kzalloc(sizeof(*smd), GFP_KERNEL); | ||
125 | if (!smd) | ||
126 | return ERR_PTR(-ENOMEM); | ||
127 | |||
128 | init.name = name; | ||
129 | init.ops = &at91sam9x5_smd_ops; | ||
130 | init.parent_names = parent_names; | ||
131 | init.num_parents = num_parents; | ||
132 | init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE; | ||
133 | |||
134 | smd->hw.init = &init; | ||
135 | smd->pmc = pmc; | ||
136 | |||
137 | clk = clk_register(NULL, &smd->hw); | ||
138 | if (IS_ERR(clk)) | ||
139 | kfree(smd); | ||
140 | |||
141 | return clk; | ||
142 | } | ||
143 | |||
144 | void __init of_at91sam9x5_clk_smd_setup(struct device_node *np, | ||
145 | struct at91_pmc *pmc) | ||
146 | { | ||
147 | struct clk *clk; | ||
148 | int i; | ||
149 | int num_parents; | ||
150 | const char *parent_names[SMD_SOURCE_MAX]; | ||
151 | const char *name = np->name; | ||
152 | |||
153 | num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); | ||
154 | if (num_parents <= 0 || num_parents > SMD_SOURCE_MAX) | ||
155 | return; | ||
156 | |||
157 | for (i = 0; i < num_parents; i++) { | ||
158 | parent_names[i] = of_clk_get_parent_name(np, i); | ||
159 | if (!parent_names[i]) | ||
160 | return; | ||
161 | } | ||
162 | |||
163 | of_property_read_string(np, "clock-output-names", &name); | ||
164 | |||
165 | clk = at91sam9x5_clk_register_smd(pmc, name, parent_names, | ||
166 | num_parents); | ||
167 | if (IS_ERR(clk)) | ||
168 | return; | ||
169 | |||
170 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
171 | } | ||
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c new file mode 100644 index 000000000000..8f7c0434a09f --- /dev/null +++ b/drivers/clk/at91/clk-system.c | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include "pmc.h" | ||
19 | |||
20 | #define SYSTEM_MAX_ID 31 | ||
21 | |||
22 | #define SYSTEM_MAX_NAME_SZ 32 | ||
23 | |||
24 | #define to_clk_system(hw) container_of(hw, struct clk_system, hw) | ||
25 | struct clk_system { | ||
26 | struct clk_hw hw; | ||
27 | struct at91_pmc *pmc; | ||
28 | u8 id; | ||
29 | }; | ||
30 | |||
31 | static int clk_system_enable(struct clk_hw *hw) | ||
32 | { | ||
33 | struct clk_system *sys = to_clk_system(hw); | ||
34 | struct at91_pmc *pmc = sys->pmc; | ||
35 | |||
36 | pmc_write(pmc, AT91_PMC_SCER, 1 << sys->id); | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | static void clk_system_disable(struct clk_hw *hw) | ||
41 | { | ||
42 | struct clk_system *sys = to_clk_system(hw); | ||
43 | struct at91_pmc *pmc = sys->pmc; | ||
44 | |||
45 | pmc_write(pmc, AT91_PMC_SCDR, 1 << sys->id); | ||
46 | } | ||
47 | |||
48 | static int clk_system_is_enabled(struct clk_hw *hw) | ||
49 | { | ||
50 | struct clk_system *sys = to_clk_system(hw); | ||
51 | struct at91_pmc *pmc = sys->pmc; | ||
52 | |||
53 | return !!(pmc_read(pmc, AT91_PMC_SCSR) & (1 << sys->id)); | ||
54 | } | ||
55 | |||
56 | static const struct clk_ops system_ops = { | ||
57 | .enable = clk_system_enable, | ||
58 | .disable = clk_system_disable, | ||
59 | .is_enabled = clk_system_is_enabled, | ||
60 | }; | ||
61 | |||
62 | static struct clk * __init | ||
63 | at91_clk_register_system(struct at91_pmc *pmc, const char *name, | ||
64 | const char *parent_name, u8 id) | ||
65 | { | ||
66 | struct clk_system *sys; | ||
67 | struct clk *clk = NULL; | ||
68 | struct clk_init_data init; | ||
69 | |||
70 | if (!parent_name || id > SYSTEM_MAX_ID) | ||
71 | return ERR_PTR(-EINVAL); | ||
72 | |||
73 | sys = kzalloc(sizeof(*sys), GFP_KERNEL); | ||
74 | if (!sys) | ||
75 | return ERR_PTR(-ENOMEM); | ||
76 | |||
77 | init.name = name; | ||
78 | init.ops = &system_ops; | ||
79 | init.parent_names = &parent_name; | ||
80 | init.num_parents = 1; | ||
81 | /* | ||
82 | * CLK_IGNORE_UNUSED is used to avoid ddrck switch off. | ||
83 | * TODO : we should implement a driver supporting at91 ddr controller | ||
84 | * (see drivers/memory) which would request and enable the ddrck clock. | ||
85 | * When this is done we will be able to remove CLK_IGNORE_UNUSED flag. | ||
86 | */ | ||
87 | init.flags = CLK_IGNORE_UNUSED; | ||
88 | |||
89 | sys->id = id; | ||
90 | sys->hw.init = &init; | ||
91 | sys->pmc = pmc; | ||
92 | |||
93 | clk = clk_register(NULL, &sys->hw); | ||
94 | if (IS_ERR(clk)) | ||
95 | kfree(sys); | ||
96 | |||
97 | return clk; | ||
98 | } | ||
99 | |||
100 | static void __init | ||
101 | of_at91_clk_sys_setup(struct device_node *np, struct at91_pmc *pmc) | ||
102 | { | ||
103 | int num; | ||
104 | u32 id; | ||
105 | struct clk *clk; | ||
106 | const char *name; | ||
107 | struct device_node *sysclknp; | ||
108 | const char *parent_name; | ||
109 | |||
110 | num = of_get_child_count(np); | ||
111 | if (num > (SYSTEM_MAX_ID + 1)) | ||
112 | return; | ||
113 | |||
114 | for_each_child_of_node(np, sysclknp) { | ||
115 | if (of_property_read_u32(sysclknp, "reg", &id)) | ||
116 | continue; | ||
117 | |||
118 | if (of_property_read_string(np, "clock-output-names", &name)) | ||
119 | name = sysclknp->name; | ||
120 | |||
121 | parent_name = of_clk_get_parent_name(sysclknp, 0); | ||
122 | |||
123 | clk = at91_clk_register_system(pmc, name, parent_name, id); | ||
124 | if (IS_ERR(clk)) | ||
125 | continue; | ||
126 | |||
127 | of_clk_add_provider(sysclknp, of_clk_src_simple_get, clk); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | void __init of_at91rm9200_clk_sys_setup(struct device_node *np, | ||
132 | struct at91_pmc *pmc) | ||
133 | { | ||
134 | of_at91_clk_sys_setup(np, pmc); | ||
135 | } | ||
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c new file mode 100644 index 000000000000..7d1d26a4bd04 --- /dev/null +++ b/drivers/clk/at91/clk-usb.c | |||
@@ -0,0 +1,398 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/io.h> | ||
17 | |||
18 | #include "pmc.h" | ||
19 | |||
20 | #define USB_SOURCE_MAX 2 | ||
21 | |||
22 | #define SAM9X5_USB_DIV_SHIFT 8 | ||
23 | #define SAM9X5_USB_MAX_DIV 0xf | ||
24 | |||
25 | #define RM9200_USB_DIV_SHIFT 28 | ||
26 | #define RM9200_USB_DIV_TAB_SIZE 4 | ||
27 | |||
28 | struct at91sam9x5_clk_usb { | ||
29 | struct clk_hw hw; | ||
30 | struct at91_pmc *pmc; | ||
31 | }; | ||
32 | |||
33 | #define to_at91sam9x5_clk_usb(hw) \ | ||
34 | container_of(hw, struct at91sam9x5_clk_usb, hw) | ||
35 | |||
36 | struct at91rm9200_clk_usb { | ||
37 | struct clk_hw hw; | ||
38 | struct at91_pmc *pmc; | ||
39 | u32 divisors[4]; | ||
40 | }; | ||
41 | |||
42 | #define to_at91rm9200_clk_usb(hw) \ | ||
43 | container_of(hw, struct at91rm9200_clk_usb, hw) | ||
44 | |||
45 | static unsigned long at91sam9x5_clk_usb_recalc_rate(struct clk_hw *hw, | ||
46 | unsigned long parent_rate) | ||
47 | { | ||
48 | u32 tmp; | ||
49 | u8 usbdiv; | ||
50 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
51 | struct at91_pmc *pmc = usb->pmc; | ||
52 | |||
53 | tmp = pmc_read(pmc, AT91_PMC_USB); | ||
54 | usbdiv = (tmp & AT91_PMC_OHCIUSBDIV) >> SAM9X5_USB_DIV_SHIFT; | ||
55 | return parent_rate / (usbdiv + 1); | ||
56 | } | ||
57 | |||
58 | static long at91sam9x5_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate, | ||
59 | unsigned long *parent_rate) | ||
60 | { | ||
61 | unsigned long div; | ||
62 | unsigned long bestrate; | ||
63 | unsigned long tmp; | ||
64 | |||
65 | if (rate >= *parent_rate) | ||
66 | return *parent_rate; | ||
67 | |||
68 | div = *parent_rate / rate; | ||
69 | if (div >= SAM9X5_USB_MAX_DIV) | ||
70 | return *parent_rate / (SAM9X5_USB_MAX_DIV + 1); | ||
71 | |||
72 | bestrate = *parent_rate / div; | ||
73 | tmp = *parent_rate / (div + 1); | ||
74 | if (bestrate - rate > rate - tmp) | ||
75 | bestrate = tmp; | ||
76 | |||
77 | return bestrate; | ||
78 | } | ||
79 | |||
80 | static int at91sam9x5_clk_usb_set_parent(struct clk_hw *hw, u8 index) | ||
81 | { | ||
82 | u32 tmp; | ||
83 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
84 | struct at91_pmc *pmc = usb->pmc; | ||
85 | |||
86 | if (index > 1) | ||
87 | return -EINVAL; | ||
88 | tmp = pmc_read(pmc, AT91_PMC_USB) & ~AT91_PMC_USBS; | ||
89 | if (index) | ||
90 | tmp |= AT91_PMC_USBS; | ||
91 | pmc_write(pmc, AT91_PMC_USB, tmp); | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | static u8 at91sam9x5_clk_usb_get_parent(struct clk_hw *hw) | ||
96 | { | ||
97 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
98 | struct at91_pmc *pmc = usb->pmc; | ||
99 | |||
100 | return pmc_read(pmc, AT91_PMC_USB) & AT91_PMC_USBS; | ||
101 | } | ||
102 | |||
103 | static int at91sam9x5_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate, | ||
104 | unsigned long parent_rate) | ||
105 | { | ||
106 | u32 tmp; | ||
107 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
108 | struct at91_pmc *pmc = usb->pmc; | ||
109 | unsigned long div = parent_rate / rate; | ||
110 | |||
111 | if (parent_rate % rate || div < 1 || div >= SAM9X5_USB_MAX_DIV) | ||
112 | return -EINVAL; | ||
113 | |||
114 | tmp = pmc_read(pmc, AT91_PMC_USB) & ~AT91_PMC_OHCIUSBDIV; | ||
115 | tmp |= (div - 1) << SAM9X5_USB_DIV_SHIFT; | ||
116 | pmc_write(pmc, AT91_PMC_USB, tmp); | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | static const struct clk_ops at91sam9x5_usb_ops = { | ||
122 | .recalc_rate = at91sam9x5_clk_usb_recalc_rate, | ||
123 | .round_rate = at91sam9x5_clk_usb_round_rate, | ||
124 | .get_parent = at91sam9x5_clk_usb_get_parent, | ||
125 | .set_parent = at91sam9x5_clk_usb_set_parent, | ||
126 | .set_rate = at91sam9x5_clk_usb_set_rate, | ||
127 | }; | ||
128 | |||
129 | static int at91sam9n12_clk_usb_enable(struct clk_hw *hw) | ||
130 | { | ||
131 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
132 | struct at91_pmc *pmc = usb->pmc; | ||
133 | |||
134 | pmc_write(pmc, AT91_PMC_USB, | ||
135 | pmc_read(pmc, AT91_PMC_USB) | AT91_PMC_USBS); | ||
136 | return 0; | ||
137 | } | ||
138 | |||
139 | static void at91sam9n12_clk_usb_disable(struct clk_hw *hw) | ||
140 | { | ||
141 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
142 | struct at91_pmc *pmc = usb->pmc; | ||
143 | |||
144 | pmc_write(pmc, AT91_PMC_USB, | ||
145 | pmc_read(pmc, AT91_PMC_USB) & ~AT91_PMC_USBS); | ||
146 | } | ||
147 | |||
148 | static int at91sam9n12_clk_usb_is_enabled(struct clk_hw *hw) | ||
149 | { | ||
150 | struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw); | ||
151 | struct at91_pmc *pmc = usb->pmc; | ||
152 | |||
153 | return !!(pmc_read(pmc, AT91_PMC_USB) & AT91_PMC_USBS); | ||
154 | } | ||
155 | |||
156 | static const struct clk_ops at91sam9n12_usb_ops = { | ||
157 | .enable = at91sam9n12_clk_usb_enable, | ||
158 | .disable = at91sam9n12_clk_usb_disable, | ||
159 | .is_enabled = at91sam9n12_clk_usb_is_enabled, | ||
160 | .recalc_rate = at91sam9x5_clk_usb_recalc_rate, | ||
161 | .round_rate = at91sam9x5_clk_usb_round_rate, | ||
162 | .set_rate = at91sam9x5_clk_usb_set_rate, | ||
163 | }; | ||
164 | |||
165 | static struct clk * __init | ||
166 | at91sam9x5_clk_register_usb(struct at91_pmc *pmc, const char *name, | ||
167 | const char **parent_names, u8 num_parents) | ||
168 | { | ||
169 | struct at91sam9x5_clk_usb *usb; | ||
170 | struct clk *clk = NULL; | ||
171 | struct clk_init_data init; | ||
172 | |||
173 | usb = kzalloc(sizeof(*usb), GFP_KERNEL); | ||
174 | if (!usb) | ||
175 | return ERR_PTR(-ENOMEM); | ||
176 | |||
177 | init.name = name; | ||
178 | init.ops = &at91sam9x5_usb_ops; | ||
179 | init.parent_names = parent_names; | ||
180 | init.num_parents = num_parents; | ||
181 | init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE; | ||
182 | |||
183 | usb->hw.init = &init; | ||
184 | usb->pmc = pmc; | ||
185 | |||
186 | clk = clk_register(NULL, &usb->hw); | ||
187 | if (IS_ERR(clk)) | ||
188 | kfree(usb); | ||
189 | |||
190 | return clk; | ||
191 | } | ||
192 | |||
193 | static struct clk * __init | ||
194 | at91sam9n12_clk_register_usb(struct at91_pmc *pmc, const char *name, | ||
195 | const char *parent_name) | ||
196 | { | ||
197 | struct at91sam9x5_clk_usb *usb; | ||
198 | struct clk *clk = NULL; | ||
199 | struct clk_init_data init; | ||
200 | |||
201 | usb = kzalloc(sizeof(*usb), GFP_KERNEL); | ||
202 | if (!usb) | ||
203 | return ERR_PTR(-ENOMEM); | ||
204 | |||
205 | init.name = name; | ||
206 | init.ops = &at91sam9n12_usb_ops; | ||
207 | init.parent_names = &parent_name; | ||
208 | init.num_parents = 1; | ||
209 | init.flags = CLK_SET_RATE_GATE; | ||
210 | |||
211 | usb->hw.init = &init; | ||
212 | usb->pmc = pmc; | ||
213 | |||
214 | clk = clk_register(NULL, &usb->hw); | ||
215 | if (IS_ERR(clk)) | ||
216 | kfree(usb); | ||
217 | |||
218 | return clk; | ||
219 | } | ||
220 | |||
221 | static unsigned long at91rm9200_clk_usb_recalc_rate(struct clk_hw *hw, | ||
222 | unsigned long parent_rate) | ||
223 | { | ||
224 | struct at91rm9200_clk_usb *usb = to_at91rm9200_clk_usb(hw); | ||
225 | struct at91_pmc *pmc = usb->pmc; | ||
226 | u32 tmp; | ||
227 | u8 usbdiv; | ||
228 | |||
229 | tmp = pmc_read(pmc, AT91_CKGR_PLLBR); | ||
230 | usbdiv = (tmp & AT91_PMC_USBDIV) >> RM9200_USB_DIV_SHIFT; | ||
231 | if (usb->divisors[usbdiv]) | ||
232 | return parent_rate / usb->divisors[usbdiv]; | ||
233 | |||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | static long at91rm9200_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate, | ||
238 | unsigned long *parent_rate) | ||
239 | { | ||
240 | struct at91rm9200_clk_usb *usb = to_at91rm9200_clk_usb(hw); | ||
241 | unsigned long bestrate = 0; | ||
242 | int bestdiff = -1; | ||
243 | unsigned long tmprate; | ||
244 | int tmpdiff; | ||
245 | int i = 0; | ||
246 | |||
247 | for (i = 0; i < 4; i++) { | ||
248 | if (!usb->divisors[i]) | ||
249 | continue; | ||
250 | tmprate = *parent_rate / usb->divisors[i]; | ||
251 | if (tmprate < rate) | ||
252 | tmpdiff = rate - tmprate; | ||
253 | else | ||
254 | tmpdiff = tmprate - rate; | ||
255 | |||
256 | if (bestdiff < 0 || bestdiff > tmpdiff) { | ||
257 | bestrate = tmprate; | ||
258 | bestdiff = tmpdiff; | ||
259 | } | ||
260 | |||
261 | if (!bestdiff) | ||
262 | break; | ||
263 | } | ||
264 | |||
265 | return bestrate; | ||
266 | } | ||
267 | |||
268 | static int at91rm9200_clk_usb_set_rate(struct clk_hw *hw, unsigned long rate, | ||
269 | unsigned long parent_rate) | ||
270 | { | ||
271 | u32 tmp; | ||
272 | int i; | ||
273 | struct at91rm9200_clk_usb *usb = to_at91rm9200_clk_usb(hw); | ||
274 | struct at91_pmc *pmc = usb->pmc; | ||
275 | unsigned long div = parent_rate / rate; | ||
276 | |||
277 | if (parent_rate % rate) | ||
278 | return -EINVAL; | ||
279 | for (i = 0; i < RM9200_USB_DIV_TAB_SIZE; i++) { | ||
280 | if (usb->divisors[i] == div) { | ||
281 | tmp = pmc_read(pmc, AT91_CKGR_PLLBR) & | ||
282 | ~AT91_PMC_USBDIV; | ||
283 | tmp |= i << RM9200_USB_DIV_SHIFT; | ||
284 | pmc_write(pmc, AT91_CKGR_PLLBR, tmp); | ||
285 | return 0; | ||
286 | } | ||
287 | } | ||
288 | |||
289 | return -EINVAL; | ||
290 | } | ||
291 | |||
292 | static const struct clk_ops at91rm9200_usb_ops = { | ||
293 | .recalc_rate = at91rm9200_clk_usb_recalc_rate, | ||
294 | .round_rate = at91rm9200_clk_usb_round_rate, | ||
295 | .set_rate = at91rm9200_clk_usb_set_rate, | ||
296 | }; | ||
297 | |||
298 | static struct clk * __init | ||
299 | at91rm9200_clk_register_usb(struct at91_pmc *pmc, const char *name, | ||
300 | const char *parent_name, const u32 *divisors) | ||
301 | { | ||
302 | struct at91rm9200_clk_usb *usb; | ||
303 | struct clk *clk = NULL; | ||
304 | struct clk_init_data init; | ||
305 | |||
306 | usb = kzalloc(sizeof(*usb), GFP_KERNEL); | ||
307 | if (!usb) | ||
308 | return ERR_PTR(-ENOMEM); | ||
309 | |||
310 | init.name = name; | ||
311 | init.ops = &at91rm9200_usb_ops; | ||
312 | init.parent_names = &parent_name; | ||
313 | init.num_parents = 1; | ||
314 | init.flags = 0; | ||
315 | |||
316 | usb->hw.init = &init; | ||
317 | usb->pmc = pmc; | ||
318 | memcpy(usb->divisors, divisors, sizeof(usb->divisors)); | ||
319 | |||
320 | clk = clk_register(NULL, &usb->hw); | ||
321 | if (IS_ERR(clk)) | ||
322 | kfree(usb); | ||
323 | |||
324 | return clk; | ||
325 | } | ||
326 | |||
327 | void __init of_at91sam9x5_clk_usb_setup(struct device_node *np, | ||
328 | struct at91_pmc *pmc) | ||
329 | { | ||
330 | struct clk *clk; | ||
331 | int i; | ||
332 | int num_parents; | ||
333 | const char *parent_names[USB_SOURCE_MAX]; | ||
334 | const char *name = np->name; | ||
335 | |||
336 | num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); | ||
337 | if (num_parents <= 0 || num_parents > USB_SOURCE_MAX) | ||
338 | return; | ||
339 | |||
340 | for (i = 0; i < num_parents; i++) { | ||
341 | parent_names[i] = of_clk_get_parent_name(np, i); | ||
342 | if (!parent_names[i]) | ||
343 | return; | ||
344 | } | ||
345 | |||
346 | of_property_read_string(np, "clock-output-names", &name); | ||
347 | |||
348 | clk = at91sam9x5_clk_register_usb(pmc, name, parent_names, num_parents); | ||
349 | if (IS_ERR(clk)) | ||
350 | return; | ||
351 | |||
352 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
353 | } | ||
354 | |||
355 | void __init of_at91sam9n12_clk_usb_setup(struct device_node *np, | ||
356 | struct at91_pmc *pmc) | ||
357 | { | ||
358 | struct clk *clk; | ||
359 | const char *parent_name; | ||
360 | const char *name = np->name; | ||
361 | |||
362 | parent_name = of_clk_get_parent_name(np, 0); | ||
363 | if (!parent_name) | ||
364 | return; | ||
365 | |||
366 | of_property_read_string(np, "clock-output-names", &name); | ||
367 | |||
368 | clk = at91sam9n12_clk_register_usb(pmc, name, parent_name); | ||
369 | if (IS_ERR(clk)) | ||
370 | return; | ||
371 | |||
372 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
373 | } | ||
374 | |||
375 | void __init of_at91rm9200_clk_usb_setup(struct device_node *np, | ||
376 | struct at91_pmc *pmc) | ||
377 | { | ||
378 | struct clk *clk; | ||
379 | const char *parent_name; | ||
380 | const char *name = np->name; | ||
381 | u32 divisors[4] = {0, 0, 0, 0}; | ||
382 | |||
383 | parent_name = of_clk_get_parent_name(np, 0); | ||
384 | if (!parent_name) | ||
385 | return; | ||
386 | |||
387 | of_property_read_u32_array(np, "atmel,clk-divisors", divisors, 4); | ||
388 | if (!divisors[0]) | ||
389 | return; | ||
390 | |||
391 | of_property_read_string(np, "clock-output-names", &name); | ||
392 | |||
393 | clk = at91rm9200_clk_register_usb(pmc, name, parent_name, divisors); | ||
394 | if (IS_ERR(clk)) | ||
395 | return; | ||
396 | |||
397 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
398 | } | ||
diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c new file mode 100644 index 000000000000..ae3263bc1476 --- /dev/null +++ b/drivers/clk/at91/clk-utmi.c | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/irq.h> | ||
16 | #include <linux/of.h> | ||
17 | #include <linux/of_address.h> | ||
18 | #include <linux/of_irq.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/wait.h> | ||
22 | |||
23 | #include "pmc.h" | ||
24 | |||
25 | #define UTMI_FIXED_MUL 40 | ||
26 | |||
27 | struct clk_utmi { | ||
28 | struct clk_hw hw; | ||
29 | struct at91_pmc *pmc; | ||
30 | unsigned int irq; | ||
31 | wait_queue_head_t wait; | ||
32 | }; | ||
33 | |||
34 | #define to_clk_utmi(hw) container_of(hw, struct clk_utmi, hw) | ||
35 | |||
36 | static irqreturn_t clk_utmi_irq_handler(int irq, void *dev_id) | ||
37 | { | ||
38 | struct clk_utmi *utmi = (struct clk_utmi *)dev_id; | ||
39 | |||
40 | wake_up(&utmi->wait); | ||
41 | disable_irq_nosync(utmi->irq); | ||
42 | |||
43 | return IRQ_HANDLED; | ||
44 | } | ||
45 | |||
46 | static int clk_utmi_prepare(struct clk_hw *hw) | ||
47 | { | ||
48 | struct clk_utmi *utmi = to_clk_utmi(hw); | ||
49 | struct at91_pmc *pmc = utmi->pmc; | ||
50 | u32 tmp = at91_pmc_read(AT91_CKGR_UCKR) | AT91_PMC_UPLLEN | | ||
51 | AT91_PMC_UPLLCOUNT | AT91_PMC_BIASEN; | ||
52 | |||
53 | pmc_write(pmc, AT91_CKGR_UCKR, tmp); | ||
54 | |||
55 | while (!(pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_LOCKU)) { | ||
56 | enable_irq(utmi->irq); | ||
57 | wait_event(utmi->wait, | ||
58 | pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_LOCKU); | ||
59 | } | ||
60 | |||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | static int clk_utmi_is_prepared(struct clk_hw *hw) | ||
65 | { | ||
66 | struct clk_utmi *utmi = to_clk_utmi(hw); | ||
67 | struct at91_pmc *pmc = utmi->pmc; | ||
68 | |||
69 | return !!(pmc_read(pmc, AT91_PMC_SR) & AT91_PMC_LOCKU); | ||
70 | } | ||
71 | |||
72 | static void clk_utmi_unprepare(struct clk_hw *hw) | ||
73 | { | ||
74 | struct clk_utmi *utmi = to_clk_utmi(hw); | ||
75 | struct at91_pmc *pmc = utmi->pmc; | ||
76 | u32 tmp = at91_pmc_read(AT91_CKGR_UCKR) & ~AT91_PMC_UPLLEN; | ||
77 | |||
78 | pmc_write(pmc, AT91_CKGR_UCKR, tmp); | ||
79 | } | ||
80 | |||
81 | static unsigned long clk_utmi_recalc_rate(struct clk_hw *hw, | ||
82 | unsigned long parent_rate) | ||
83 | { | ||
84 | /* UTMI clk is a fixed clk multiplier */ | ||
85 | return parent_rate * UTMI_FIXED_MUL; | ||
86 | } | ||
87 | |||
88 | static const struct clk_ops utmi_ops = { | ||
89 | .prepare = clk_utmi_prepare, | ||
90 | .unprepare = clk_utmi_unprepare, | ||
91 | .is_prepared = clk_utmi_is_prepared, | ||
92 | .recalc_rate = clk_utmi_recalc_rate, | ||
93 | }; | ||
94 | |||
95 | static struct clk * __init | ||
96 | at91_clk_register_utmi(struct at91_pmc *pmc, unsigned int irq, | ||
97 | const char *name, const char *parent_name) | ||
98 | { | ||
99 | int ret; | ||
100 | struct clk_utmi *utmi; | ||
101 | struct clk *clk = NULL; | ||
102 | struct clk_init_data init; | ||
103 | |||
104 | utmi = kzalloc(sizeof(*utmi), GFP_KERNEL); | ||
105 | if (!utmi) | ||
106 | return ERR_PTR(-ENOMEM); | ||
107 | |||
108 | init.name = name; | ||
109 | init.ops = &utmi_ops; | ||
110 | init.parent_names = parent_name ? &parent_name : NULL; | ||
111 | init.num_parents = parent_name ? 1 : 0; | ||
112 | init.flags = CLK_SET_RATE_GATE; | ||
113 | |||
114 | utmi->hw.init = &init; | ||
115 | utmi->pmc = pmc; | ||
116 | utmi->irq = irq; | ||
117 | init_waitqueue_head(&utmi->wait); | ||
118 | irq_set_status_flags(utmi->irq, IRQ_NOAUTOEN); | ||
119 | ret = request_irq(utmi->irq, clk_utmi_irq_handler, | ||
120 | IRQF_TRIGGER_HIGH, "clk-utmi", utmi); | ||
121 | if (ret) | ||
122 | return ERR_PTR(ret); | ||
123 | |||
124 | clk = clk_register(NULL, &utmi->hw); | ||
125 | if (IS_ERR(clk)) | ||
126 | kfree(utmi); | ||
127 | |||
128 | return clk; | ||
129 | } | ||
130 | |||
131 | static void __init | ||
132 | of_at91_clk_utmi_setup(struct device_node *np, struct at91_pmc *pmc) | ||
133 | { | ||
134 | unsigned int irq; | ||
135 | struct clk *clk; | ||
136 | const char *parent_name; | ||
137 | const char *name = np->name; | ||
138 | |||
139 | parent_name = of_clk_get_parent_name(np, 0); | ||
140 | |||
141 | of_property_read_string(np, "clock-output-names", &name); | ||
142 | |||
143 | irq = irq_of_parse_and_map(np, 0); | ||
144 | if (!irq) | ||
145 | return; | ||
146 | |||
147 | clk = at91_clk_register_utmi(pmc, irq, name, parent_name); | ||
148 | if (IS_ERR(clk)) | ||
149 | return; | ||
150 | |||
151 | of_clk_add_provider(np, of_clk_src_simple_get, clk); | ||
152 | return; | ||
153 | } | ||
154 | |||
155 | void __init of_at91sam9x5_clk_utmi_setup(struct device_node *np, | ||
156 | struct at91_pmc *pmc) | ||
157 | { | ||
158 | of_at91_clk_utmi_setup(np, pmc); | ||
159 | } | ||
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c new file mode 100644 index 000000000000..7b9db603b936 --- /dev/null +++ b/drivers/clk/at91/pmc.c | |||
@@ -0,0 +1,397 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/clk-provider.h> | ||
12 | #include <linux/clkdev.h> | ||
13 | #include <linux/clk/at91_pmc.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/irqchip/chained_irq.h> | ||
20 | #include <linux/irqdomain.h> | ||
21 | #include <linux/of_irq.h> | ||
22 | |||
23 | #include <asm/proc-fns.h> | ||
24 | |||
25 | #include "pmc.h" | ||
26 | |||
27 | void __iomem *at91_pmc_base; | ||
28 | EXPORT_SYMBOL_GPL(at91_pmc_base); | ||
29 | |||
30 | void at91sam9_idle(void) | ||
31 | { | ||
32 | at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
33 | cpu_do_idle(); | ||
34 | } | ||
35 | |||
36 | int of_at91_get_clk_range(struct device_node *np, const char *propname, | ||
37 | struct clk_range *range) | ||
38 | { | ||
39 | u32 min, max; | ||
40 | int ret; | ||
41 | |||
42 | ret = of_property_read_u32_index(np, propname, 0, &min); | ||
43 | if (ret) | ||
44 | return ret; | ||
45 | |||
46 | ret = of_property_read_u32_index(np, propname, 1, &max); | ||
47 | if (ret) | ||
48 | return ret; | ||
49 | |||
50 | if (range) { | ||
51 | range->min = min; | ||
52 | range->max = max; | ||
53 | } | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | EXPORT_SYMBOL_GPL(of_at91_get_clk_range); | ||
58 | |||
59 | static void pmc_irq_mask(struct irq_data *d) | ||
60 | { | ||
61 | struct at91_pmc *pmc = irq_data_get_irq_chip_data(d); | ||
62 | |||
63 | pmc_write(pmc, AT91_PMC_IDR, 1 << d->hwirq); | ||
64 | } | ||
65 | |||
66 | static void pmc_irq_unmask(struct irq_data *d) | ||
67 | { | ||
68 | struct at91_pmc *pmc = irq_data_get_irq_chip_data(d); | ||
69 | |||
70 | pmc_write(pmc, AT91_PMC_IER, 1 << d->hwirq); | ||
71 | } | ||
72 | |||
73 | static int pmc_irq_set_type(struct irq_data *d, unsigned type) | ||
74 | { | ||
75 | if (type != IRQ_TYPE_LEVEL_HIGH) { | ||
76 | pr_warn("PMC: type not supported (support only IRQ_TYPE_LEVEL_HIGH type)\n"); | ||
77 | return -EINVAL; | ||
78 | } | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | static struct irq_chip pmc_irq = { | ||
84 | .name = "PMC", | ||
85 | .irq_disable = pmc_irq_mask, | ||
86 | .irq_mask = pmc_irq_mask, | ||
87 | .irq_unmask = pmc_irq_unmask, | ||
88 | .irq_set_type = pmc_irq_set_type, | ||
89 | }; | ||
90 | |||
91 | static struct lock_class_key pmc_lock_class; | ||
92 | |||
93 | static int pmc_irq_map(struct irq_domain *h, unsigned int virq, | ||
94 | irq_hw_number_t hw) | ||
95 | { | ||
96 | struct at91_pmc *pmc = h->host_data; | ||
97 | |||
98 | irq_set_lockdep_class(virq, &pmc_lock_class); | ||
99 | |||
100 | irq_set_chip_and_handler(virq, &pmc_irq, | ||
101 | handle_level_irq); | ||
102 | set_irq_flags(virq, IRQF_VALID); | ||
103 | irq_set_chip_data(virq, pmc); | ||
104 | |||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | static int pmc_irq_domain_xlate(struct irq_domain *d, | ||
109 | struct device_node *ctrlr, | ||
110 | const u32 *intspec, unsigned int intsize, | ||
111 | irq_hw_number_t *out_hwirq, | ||
112 | unsigned int *out_type) | ||
113 | { | ||
114 | struct at91_pmc *pmc = d->host_data; | ||
115 | const struct at91_pmc_caps *caps = pmc->caps; | ||
116 | |||
117 | if (WARN_ON(intsize < 1)) | ||
118 | return -EINVAL; | ||
119 | |||
120 | *out_hwirq = intspec[0]; | ||
121 | |||
122 | if (!(caps->available_irqs & (1 << *out_hwirq))) | ||
123 | return -EINVAL; | ||
124 | |||
125 | *out_type = IRQ_TYPE_LEVEL_HIGH; | ||
126 | |||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | static struct irq_domain_ops pmc_irq_ops = { | ||
131 | .map = pmc_irq_map, | ||
132 | .xlate = pmc_irq_domain_xlate, | ||
133 | }; | ||
134 | |||
135 | static irqreturn_t pmc_irq_handler(int irq, void *data) | ||
136 | { | ||
137 | struct at91_pmc *pmc = (struct at91_pmc *)data; | ||
138 | unsigned long sr; | ||
139 | int n; | ||
140 | |||
141 | sr = pmc_read(pmc, AT91_PMC_SR) & pmc_read(pmc, AT91_PMC_IMR); | ||
142 | if (!sr) | ||
143 | return IRQ_NONE; | ||
144 | |||
145 | for_each_set_bit(n, &sr, BITS_PER_LONG) | ||
146 | generic_handle_irq(irq_find_mapping(pmc->irqdomain, n)); | ||
147 | |||
148 | return IRQ_HANDLED; | ||
149 | } | ||
150 | |||
151 | static const struct at91_pmc_caps at91rm9200_caps = { | ||
152 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_LOCKB | | ||
153 | AT91_PMC_MCKRDY | AT91_PMC_PCK0RDY | | ||
154 | AT91_PMC_PCK1RDY | AT91_PMC_PCK2RDY | | ||
155 | AT91_PMC_PCK3RDY, | ||
156 | }; | ||
157 | |||
158 | static const struct at91_pmc_caps at91sam9260_caps = { | ||
159 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_LOCKB | | ||
160 | AT91_PMC_MCKRDY | AT91_PMC_PCK0RDY | | ||
161 | AT91_PMC_PCK1RDY, | ||
162 | }; | ||
163 | |||
164 | static const struct at91_pmc_caps at91sam9g45_caps = { | ||
165 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | | ||
166 | AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | | ||
167 | AT91_PMC_PCK1RDY, | ||
168 | }; | ||
169 | |||
170 | static const struct at91_pmc_caps at91sam9n12_caps = { | ||
171 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_LOCKB | | ||
172 | AT91_PMC_MCKRDY | AT91_PMC_PCK0RDY | | ||
173 | AT91_PMC_PCK1RDY | AT91_PMC_MOSCSELS | | ||
174 | AT91_PMC_MOSCRCS | AT91_PMC_CFDEV, | ||
175 | }; | ||
176 | |||
177 | static const struct at91_pmc_caps at91sam9x5_caps = { | ||
178 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | | ||
179 | AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | | ||
180 | AT91_PMC_PCK1RDY | AT91_PMC_MOSCSELS | | ||
181 | AT91_PMC_MOSCRCS | AT91_PMC_CFDEV, | ||
182 | }; | ||
183 | |||
184 | static const struct at91_pmc_caps sama5d3_caps = { | ||
185 | .available_irqs = AT91_PMC_MOSCS | AT91_PMC_LOCKA | AT91_PMC_MCKRDY | | ||
186 | AT91_PMC_LOCKU | AT91_PMC_PCK0RDY | | ||
187 | AT91_PMC_PCK1RDY | AT91_PMC_PCK2RDY | | ||
188 | AT91_PMC_MOSCSELS | AT91_PMC_MOSCRCS | | ||
189 | AT91_PMC_CFDEV, | ||
190 | }; | ||
191 | |||
192 | static struct at91_pmc *__init at91_pmc_init(struct device_node *np, | ||
193 | void __iomem *regbase, int virq, | ||
194 | const struct at91_pmc_caps *caps) | ||
195 | { | ||
196 | struct at91_pmc *pmc; | ||
197 | |||
198 | if (!regbase || !virq || !caps) | ||
199 | return NULL; | ||
200 | |||
201 | at91_pmc_base = regbase; | ||
202 | |||
203 | pmc = kzalloc(sizeof(*pmc), GFP_KERNEL); | ||
204 | if (!pmc) | ||
205 | return NULL; | ||
206 | |||
207 | spin_lock_init(&pmc->lock); | ||
208 | pmc->regbase = regbase; | ||
209 | pmc->virq = virq; | ||
210 | pmc->caps = caps; | ||
211 | |||
212 | pmc->irqdomain = irq_domain_add_linear(np, 32, &pmc_irq_ops, pmc); | ||
213 | |||
214 | if (!pmc->irqdomain) | ||
215 | goto out_free_pmc; | ||
216 | |||
217 | pmc_write(pmc, AT91_PMC_IDR, 0xffffffff); | ||
218 | if (request_irq(pmc->virq, pmc_irq_handler, IRQF_SHARED, "pmc", pmc)) | ||
219 | goto out_remove_irqdomain; | ||
220 | |||
221 | return pmc; | ||
222 | |||
223 | out_remove_irqdomain: | ||
224 | irq_domain_remove(pmc->irqdomain); | ||
225 | out_free_pmc: | ||
226 | kfree(pmc); | ||
227 | |||
228 | return NULL; | ||
229 | } | ||
230 | |||
231 | static const struct of_device_id pmc_clk_ids[] __initdata = { | ||
232 | /* Main clock */ | ||
233 | { | ||
234 | .compatible = "atmel,at91rm9200-clk-main", | ||
235 | .data = of_at91rm9200_clk_main_setup, | ||
236 | }, | ||
237 | /* PLL clocks */ | ||
238 | { | ||
239 | .compatible = "atmel,at91rm9200-clk-pll", | ||
240 | .data = of_at91rm9200_clk_pll_setup, | ||
241 | }, | ||
242 | { | ||
243 | .compatible = "atmel,at91sam9g45-clk-pll", | ||
244 | .data = of_at91sam9g45_clk_pll_setup, | ||
245 | }, | ||
246 | { | ||
247 | .compatible = "atmel,at91sam9g20-clk-pllb", | ||
248 | .data = of_at91sam9g20_clk_pllb_setup, | ||
249 | }, | ||
250 | { | ||
251 | .compatible = "atmel,sama5d3-clk-pll", | ||
252 | .data = of_sama5d3_clk_pll_setup, | ||
253 | }, | ||
254 | { | ||
255 | .compatible = "atmel,at91sam9x5-clk-plldiv", | ||
256 | .data = of_at91sam9x5_clk_plldiv_setup, | ||
257 | }, | ||
258 | /* Master clock */ | ||
259 | { | ||
260 | .compatible = "atmel,at91rm9200-clk-master", | ||
261 | .data = of_at91rm9200_clk_master_setup, | ||
262 | }, | ||
263 | { | ||
264 | .compatible = "atmel,at91sam9x5-clk-master", | ||
265 | .data = of_at91sam9x5_clk_master_setup, | ||
266 | }, | ||
267 | /* System clocks */ | ||
268 | { | ||
269 | .compatible = "atmel,at91rm9200-clk-system", | ||
270 | .data = of_at91rm9200_clk_sys_setup, | ||
271 | }, | ||
272 | /* Peripheral clocks */ | ||
273 | { | ||
274 | .compatible = "atmel,at91rm9200-clk-peripheral", | ||
275 | .data = of_at91rm9200_clk_periph_setup, | ||
276 | }, | ||
277 | { | ||
278 | .compatible = "atmel,at91sam9x5-clk-peripheral", | ||
279 | .data = of_at91sam9x5_clk_periph_setup, | ||
280 | }, | ||
281 | /* Programmable clocks */ | ||
282 | #if defined(CONFIG_AT91_PROGRAMMABLE_CLOCKS) | ||
283 | { | ||
284 | .compatible = "atmel,at91rm9200-clk-programmable", | ||
285 | .data = of_at91rm9200_clk_prog_setup, | ||
286 | }, | ||
287 | { | ||
288 | .compatible = "atmel,at91sam9g45-clk-programmable", | ||
289 | .data = of_at91sam9g45_clk_prog_setup, | ||
290 | }, | ||
291 | { | ||
292 | .compatible = "atmel,at91sam9x5-clk-programmable", | ||
293 | .data = of_at91sam9x5_clk_prog_setup, | ||
294 | }, | ||
295 | #endif | ||
296 | /* UTMI clock */ | ||
297 | #if defined(CONFIG_HAVE_AT91_UTMI) | ||
298 | { | ||
299 | .compatible = "atmel,at91sam9x5-clk-utmi", | ||
300 | .data = of_at91sam9x5_clk_utmi_setup, | ||
301 | }, | ||
302 | #endif | ||
303 | /* USB clock */ | ||
304 | #if defined(CONFIG_HAVE_AT91_USB_CLK) | ||
305 | { | ||
306 | .compatible = "atmel,at91rm9200-clk-usb", | ||
307 | .data = of_at91rm9200_clk_usb_setup, | ||
308 | }, | ||
309 | { | ||
310 | .compatible = "atmel,at91sam9x5-clk-usb", | ||
311 | .data = of_at91sam9x5_clk_usb_setup, | ||
312 | }, | ||
313 | { | ||
314 | .compatible = "atmel,at91sam9n12-clk-usb", | ||
315 | .data = of_at91sam9n12_clk_usb_setup, | ||
316 | }, | ||
317 | #endif | ||
318 | /* SMD clock */ | ||
319 | #if defined(CONFIG_HAVE_AT91_SMD) | ||
320 | { | ||
321 | .compatible = "atmel,at91sam9x5-clk-smd", | ||
322 | .data = of_at91sam9x5_clk_smd_setup, | ||
323 | }, | ||
324 | #endif | ||
325 | { /*sentinel*/ } | ||
326 | }; | ||
327 | |||
328 | static void __init of_at91_pmc_setup(struct device_node *np, | ||
329 | const struct at91_pmc_caps *caps) | ||
330 | { | ||
331 | struct at91_pmc *pmc; | ||
332 | struct device_node *childnp; | ||
333 | void (*clk_setup)(struct device_node *, struct at91_pmc *); | ||
334 | const struct of_device_id *clk_id; | ||
335 | void __iomem *regbase = of_iomap(np, 0); | ||
336 | int virq; | ||
337 | |||
338 | if (!regbase) | ||
339 | return; | ||
340 | |||
341 | virq = irq_of_parse_and_map(np, 0); | ||
342 | if (!virq) | ||
343 | return; | ||
344 | |||
345 | pmc = at91_pmc_init(np, regbase, virq, caps); | ||
346 | if (!pmc) | ||
347 | return; | ||
348 | for_each_child_of_node(np, childnp) { | ||
349 | clk_id = of_match_node(pmc_clk_ids, childnp); | ||
350 | if (!clk_id) | ||
351 | continue; | ||
352 | clk_setup = clk_id->data; | ||
353 | clk_setup(childnp, pmc); | ||
354 | } | ||
355 | } | ||
356 | |||
357 | static void __init of_at91rm9200_pmc_setup(struct device_node *np) | ||
358 | { | ||
359 | of_at91_pmc_setup(np, &at91rm9200_caps); | ||
360 | } | ||
361 | CLK_OF_DECLARE(at91rm9200_clk_pmc, "atmel,at91rm9200-pmc", | ||
362 | of_at91rm9200_pmc_setup); | ||
363 | |||
364 | static void __init of_at91sam9260_pmc_setup(struct device_node *np) | ||
365 | { | ||
366 | of_at91_pmc_setup(np, &at91sam9260_caps); | ||
367 | } | ||
368 | CLK_OF_DECLARE(at91sam9260_clk_pmc, "atmel,at91sam9260-pmc", | ||
369 | of_at91sam9260_pmc_setup); | ||
370 | |||
371 | static void __init of_at91sam9g45_pmc_setup(struct device_node *np) | ||
372 | { | ||
373 | of_at91_pmc_setup(np, &at91sam9g45_caps); | ||
374 | } | ||
375 | CLK_OF_DECLARE(at91sam9g45_clk_pmc, "atmel,at91sam9g45-pmc", | ||
376 | of_at91sam9g45_pmc_setup); | ||
377 | |||
378 | static void __init of_at91sam9n12_pmc_setup(struct device_node *np) | ||
379 | { | ||
380 | of_at91_pmc_setup(np, &at91sam9n12_caps); | ||
381 | } | ||
382 | CLK_OF_DECLARE(at91sam9n12_clk_pmc, "atmel,at91sam9n12-pmc", | ||
383 | of_at91sam9n12_pmc_setup); | ||
384 | |||
385 | static void __init of_at91sam9x5_pmc_setup(struct device_node *np) | ||
386 | { | ||
387 | of_at91_pmc_setup(np, &at91sam9x5_caps); | ||
388 | } | ||
389 | CLK_OF_DECLARE(at91sam9x5_clk_pmc, "atmel,at91sam9x5-pmc", | ||
390 | of_at91sam9x5_pmc_setup); | ||
391 | |||
392 | static void __init of_sama5d3_pmc_setup(struct device_node *np) | ||
393 | { | ||
394 | of_at91_pmc_setup(np, &sama5d3_caps); | ||
395 | } | ||
396 | CLK_OF_DECLARE(sama5d3_clk_pmc, "atmel,sama5d3-pmc", | ||
397 | of_sama5d3_pmc_setup); | ||
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h new file mode 100644 index 000000000000..ba8d14233f80 --- /dev/null +++ b/drivers/clk/at91/pmc.h | |||
@@ -0,0 +1,116 @@ | |||
1 | /* | ||
2 | * drivers/clk/at91/pmc.h | ||
3 | * | ||
4 | * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __PMC_H_ | ||
13 | #define __PMC_H_ | ||
14 | |||
15 | #include <linux/io.h> | ||
16 | #include <linux/irqdomain.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | |||
19 | struct clk_range { | ||
20 | unsigned long min; | ||
21 | unsigned long max; | ||
22 | }; | ||
23 | |||
24 | #define CLK_RANGE(MIN, MAX) {.min = MIN, .max = MAX,} | ||
25 | |||
26 | struct at91_pmc_caps { | ||
27 | u32 available_irqs; | ||
28 | }; | ||
29 | |||
30 | struct at91_pmc { | ||
31 | void __iomem *regbase; | ||
32 | int virq; | ||
33 | spinlock_t lock; | ||
34 | const struct at91_pmc_caps *caps; | ||
35 | struct irq_domain *irqdomain; | ||
36 | }; | ||
37 | |||
38 | static inline void pmc_lock(struct at91_pmc *pmc) | ||
39 | { | ||
40 | spin_lock(&pmc->lock); | ||
41 | } | ||
42 | |||
43 | static inline void pmc_unlock(struct at91_pmc *pmc) | ||
44 | { | ||
45 | spin_unlock(&pmc->lock); | ||
46 | } | ||
47 | |||
48 | static inline u32 pmc_read(struct at91_pmc *pmc, int offset) | ||
49 | { | ||
50 | return readl(pmc->regbase + offset); | ||
51 | } | ||
52 | |||
53 | static inline void pmc_write(struct at91_pmc *pmc, int offset, u32 value) | ||
54 | { | ||
55 | writel(value, pmc->regbase + offset); | ||
56 | } | ||
57 | |||
58 | int of_at91_get_clk_range(struct device_node *np, const char *propname, | ||
59 | struct clk_range *range); | ||
60 | |||
61 | extern void __init of_at91rm9200_clk_main_setup(struct device_node *np, | ||
62 | struct at91_pmc *pmc); | ||
63 | |||
64 | extern void __init of_at91rm9200_clk_pll_setup(struct device_node *np, | ||
65 | struct at91_pmc *pmc); | ||
66 | extern void __init of_at91sam9g45_clk_pll_setup(struct device_node *np, | ||
67 | struct at91_pmc *pmc); | ||
68 | extern void __init of_at91sam9g20_clk_pllb_setup(struct device_node *np, | ||
69 | struct at91_pmc *pmc); | ||
70 | extern void __init of_sama5d3_clk_pll_setup(struct device_node *np, | ||
71 | struct at91_pmc *pmc); | ||
72 | extern void __init of_at91sam9x5_clk_plldiv_setup(struct device_node *np, | ||
73 | struct at91_pmc *pmc); | ||
74 | |||
75 | extern void __init of_at91rm9200_clk_master_setup(struct device_node *np, | ||
76 | struct at91_pmc *pmc); | ||
77 | extern void __init of_at91sam9x5_clk_master_setup(struct device_node *np, | ||
78 | struct at91_pmc *pmc); | ||
79 | |||
80 | extern void __init of_at91rm9200_clk_sys_setup(struct device_node *np, | ||
81 | struct at91_pmc *pmc); | ||
82 | |||
83 | extern void __init of_at91rm9200_clk_periph_setup(struct device_node *np, | ||
84 | struct at91_pmc *pmc); | ||
85 | extern void __init of_at91sam9x5_clk_periph_setup(struct device_node *np, | ||
86 | struct at91_pmc *pmc); | ||
87 | |||
88 | #if defined(CONFIG_AT91_PROGRAMMABLE_CLOCKS) | ||
89 | extern void __init of_at91rm9200_clk_prog_setup(struct device_node *np, | ||
90 | struct at91_pmc *pmc); | ||
91 | extern void __init of_at91sam9g45_clk_prog_setup(struct device_node *np, | ||
92 | struct at91_pmc *pmc); | ||
93 | extern void __init of_at91sam9x5_clk_prog_setup(struct device_node *np, | ||
94 | struct at91_pmc *pmc); | ||
95 | #endif | ||
96 | |||
97 | #if defined(CONFIG_HAVE_AT91_UTMI) | ||
98 | extern void __init of_at91sam9x5_clk_utmi_setup(struct device_node *np, | ||
99 | struct at91_pmc *pmc); | ||
100 | #endif | ||
101 | |||
102 | #if defined(CONFIG_HAVE_AT91_USB_CLK) | ||
103 | extern void __init of_at91rm9200_clk_usb_setup(struct device_node *np, | ||
104 | struct at91_pmc *pmc); | ||
105 | extern void __init of_at91sam9x5_clk_usb_setup(struct device_node *np, | ||
106 | struct at91_pmc *pmc); | ||
107 | extern void __init of_at91sam9n12_clk_usb_setup(struct device_node *np, | ||
108 | struct at91_pmc *pmc); | ||
109 | #endif | ||
110 | |||
111 | #if defined(CONFIG_HAVE_AT91_SMD) | ||
112 | extern void __init of_at91sam9x5_clk_smd_setup(struct device_node *np, | ||
113 | struct at91_pmc *pmc); | ||
114 | #endif | ||
115 | |||
116 | #endif /* __PMC_H_ */ | ||
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index ad5ff50c5f28..d967571d305e 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c | |||
@@ -530,7 +530,8 @@ static struct samsung_div_clock exynos4_div_clks[] __initdata = { | |||
530 | DIV(sclk_i2s1, "sclk_i2s1", "sclk_audio1", DIV_PERIL5, 0, 6), | 530 | DIV(sclk_i2s1, "sclk_i2s1", "sclk_audio1", DIV_PERIL5, 0, 6), |
531 | DIV(sclk_i2s2, "sclk_i2s2", "sclk_audio2", DIV_PERIL5, 8, 6), | 531 | DIV(sclk_i2s2, "sclk_i2s2", "sclk_audio2", DIV_PERIL5, 8, 6), |
532 | DIV(none, "div_mmc4", "mout_mmc4", DIV_FSYS3, 0, 4), | 532 | DIV(none, "div_mmc4", "mout_mmc4", DIV_FSYS3, 0, 4), |
533 | DIV(none, "div_mmc_pre4", "div_mmc4", DIV_FSYS3, 8, 8), | 533 | DIV_F(none, "div_mmc_pre4", "div_mmc4", DIV_FSYS3, 8, 8, |
534 | CLK_SET_RATE_PARENT, 0), | ||
534 | DIV(none, "div_uart0", "mout_uart0", DIV_PERIL0, 0, 4), | 535 | DIV(none, "div_uart0", "mout_uart0", DIV_PERIL0, 0, 4), |
535 | DIV(none, "div_uart1", "mout_uart1", DIV_PERIL0, 4, 4), | 536 | DIV(none, "div_uart1", "mout_uart1", DIV_PERIL0, 4, 4), |
536 | DIV(none, "div_uart2", "mout_uart2", DIV_PERIL0, 8, 4), | 537 | DIV(none, "div_uart2", "mout_uart2", DIV_PERIL0, 8, 4), |
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 62b0de6a1837..48f76bc05da0 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c | |||
@@ -71,6 +71,10 @@ enum { | |||
71 | MCT_L1_IRQ, | 71 | MCT_L1_IRQ, |
72 | MCT_L2_IRQ, | 72 | MCT_L2_IRQ, |
73 | MCT_L3_IRQ, | 73 | MCT_L3_IRQ, |
74 | MCT_L4_IRQ, | ||
75 | MCT_L5_IRQ, | ||
76 | MCT_L6_IRQ, | ||
77 | MCT_L7_IRQ, | ||
74 | MCT_NR_IRQS, | 78 | MCT_NR_IRQS, |
75 | }; | 79 | }; |
76 | 80 | ||
diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c index ed7b73b508e0..f00b5c9ce8b6 100644 --- a/drivers/clocksource/nomadik-mtu.c +++ b/drivers/clocksource/nomadik-mtu.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/jiffies.h> | 20 | #include <linux/jiffies.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/platform_data/clocksource-nomadik-mtu.h> | ||
24 | #include <linux/sched_clock.h> | 23 | #include <linux/sched_clock.h> |
25 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
26 | 25 | ||
@@ -103,7 +102,7 @@ static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev) | |||
103 | return 0; | 102 | return 0; |
104 | } | 103 | } |
105 | 104 | ||
106 | void nmdk_clkevt_reset(void) | 105 | static void nmdk_clkevt_reset(void) |
107 | { | 106 | { |
108 | if (clkevt_periodic) { | 107 | if (clkevt_periodic) { |
109 | /* Timer: configure load and background-load, and fire it up */ | 108 | /* Timer: configure load and background-load, and fire it up */ |
@@ -144,7 +143,7 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode, | |||
144 | } | 143 | } |
145 | } | 144 | } |
146 | 145 | ||
147 | void nmdk_clksrc_reset(void) | 146 | static void nmdk_clksrc_reset(void) |
148 | { | 147 | { |
149 | /* Disable */ | 148 | /* Disable */ |
150 | writel(0, mtu_base + MTU_CR(0)); | 149 | writel(0, mtu_base + MTU_CR(0)); |
@@ -192,8 +191,8 @@ static struct irqaction nmdk_timer_irq = { | |||
192 | .dev_id = &nmdk_clkevt, | 191 | .dev_id = &nmdk_clkevt, |
193 | }; | 192 | }; |
194 | 193 | ||
195 | static void __init __nmdk_timer_init(void __iomem *base, int irq, | 194 | static void __init nmdk_timer_init(void __iomem *base, int irq, |
196 | struct clk *pclk, struct clk *clk) | 195 | struct clk *pclk, struct clk *clk) |
197 | { | 196 | { |
198 | unsigned long rate; | 197 | unsigned long rate; |
199 | 198 | ||
@@ -245,18 +244,6 @@ static void __init __nmdk_timer_init(void __iomem *base, int irq, | |||
245 | register_current_timer_delay(&mtu_delay_timer); | 244 | register_current_timer_delay(&mtu_delay_timer); |
246 | } | 245 | } |
247 | 246 | ||
248 | void __init nmdk_timer_init(void __iomem *base, int irq) | ||
249 | { | ||
250 | struct clk *clk0, *pclk0; | ||
251 | |||
252 | pclk0 = clk_get_sys("mtu0", "apb_pclk"); | ||
253 | BUG_ON(IS_ERR(pclk0)); | ||
254 | clk0 = clk_get_sys("mtu0", NULL); | ||
255 | BUG_ON(IS_ERR(clk0)); | ||
256 | |||
257 | __nmdk_timer_init(base, irq, pclk0, clk0); | ||
258 | } | ||
259 | |||
260 | static void __init nmdk_timer_of_init(struct device_node *node) | 247 | static void __init nmdk_timer_of_init(struct device_node *node) |
261 | { | 248 | { |
262 | struct clk *pclk; | 249 | struct clk *pclk; |
@@ -280,7 +267,7 @@ static void __init nmdk_timer_of_init(struct device_node *node) | |||
280 | if (irq <= 0) | 267 | if (irq <= 0) |
281 | panic("Can't parse IRQ"); | 268 | panic("Can't parse IRQ"); |
282 | 269 | ||
283 | __nmdk_timer_init(base, irq, pclk, clk); | 270 | nmdk_timer_init(base, irq, pclk, clk); |
284 | } | 271 | } |
285 | CLOCKSOURCE_OF_DECLARE(nomadik_mtu, "st,nomadik-mtu", | 272 | CLOCKSOURCE_OF_DECLARE(nomadik_mtu, "st,nomadik-mtu", |
286 | nmdk_timer_of_init); | 273 | nmdk_timer_of_init); |
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index b8c031b7de4e..00a2de957b23 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -2409,6 +2409,7 @@ static void d40_set_prio_realtime(struct d40_chan *d40c) | |||
2409 | #define D40_DT_FLAGS_DIR(flags) ((flags >> 1) & 0x1) | 2409 | #define D40_DT_FLAGS_DIR(flags) ((flags >> 1) & 0x1) |
2410 | #define D40_DT_FLAGS_BIG_ENDIAN(flags) ((flags >> 2) & 0x1) | 2410 | #define D40_DT_FLAGS_BIG_ENDIAN(flags) ((flags >> 2) & 0x1) |
2411 | #define D40_DT_FLAGS_FIXED_CHAN(flags) ((flags >> 3) & 0x1) | 2411 | #define D40_DT_FLAGS_FIXED_CHAN(flags) ((flags >> 3) & 0x1) |
2412 | #define D40_DT_FLAGS_HIGH_PRIO(flags) ((flags >> 4) & 0x1) | ||
2412 | 2413 | ||
2413 | static struct dma_chan *d40_xlate(struct of_phandle_args *dma_spec, | 2414 | static struct dma_chan *d40_xlate(struct of_phandle_args *dma_spec, |
2414 | struct of_dma *ofdma) | 2415 | struct of_dma *ofdma) |
@@ -2446,6 +2447,9 @@ static struct dma_chan *d40_xlate(struct of_phandle_args *dma_spec, | |||
2446 | cfg.use_fixed_channel = true; | 2447 | cfg.use_fixed_channel = true; |
2447 | } | 2448 | } |
2448 | 2449 | ||
2450 | if (D40_DT_FLAGS_HIGH_PRIO(flags)) | ||
2451 | cfg.high_priority = true; | ||
2452 | |||
2449 | return dma_request_channel(cap, stedma40_filter, &cfg); | 2453 | return dma_request_channel(cap, stedma40_filter, &cfg); |
2450 | } | 2454 | } |
2451 | 2455 | ||
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 7111c3b59130..983662e846a4 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (C) 2008,2009 STMicroelectronics | 4 | * Copyright (C) 2008,2009 STMicroelectronics |
5 | * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> | 5 | * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> |
6 | * Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.com> | 6 | * Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.com> |
7 | * Copyright (C) 2011 Linus Walleij <linus.walleij@linaro.org> | 7 | * Copyright (C) 2011-2013 Linus Walleij <linus.walleij@linaro.org> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/pinctrl/pinconf.h> | 33 | #include <linux/pinctrl/pinconf.h> |
34 | /* Since we request GPIOs from ourself */ | 34 | /* Since we request GPIOs from ourself */ |
35 | #include <linux/pinctrl/consumer.h> | 35 | #include <linux/pinctrl/consumer.h> |
36 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
37 | #include "pinctrl-nomadik.h" | 36 | #include "pinctrl-nomadik.h" |
38 | #include "core.h" | 37 | #include "core.h" |
39 | 38 | ||
@@ -45,6 +44,221 @@ | |||
45 | * Symbols in this file are called "nmk_gpio" for "nomadik gpio" | 44 | * Symbols in this file are called "nmk_gpio" for "nomadik gpio" |
46 | */ | 45 | */ |
47 | 46 | ||
47 | /* | ||
48 | * pin configurations are represented by 32-bit integers: | ||
49 | * | ||
50 | * bit 0.. 8 - Pin Number (512 Pins Maximum) | ||
51 | * bit 9..10 - Alternate Function Selection | ||
52 | * bit 11..12 - Pull up/down state | ||
53 | * bit 13 - Sleep mode behaviour | ||
54 | * bit 14 - Direction | ||
55 | * bit 15 - Value (if output) | ||
56 | * bit 16..18 - SLPM pull up/down state | ||
57 | * bit 19..20 - SLPM direction | ||
58 | * bit 21..22 - SLPM Value (if output) | ||
59 | * bit 23..25 - PDIS value (if input) | ||
60 | * bit 26 - Gpio mode | ||
61 | * bit 27 - Sleep mode | ||
62 | * | ||
63 | * to facilitate the definition, the following macros are provided | ||
64 | * | ||
65 | * PIN_CFG_DEFAULT - default config (0): | ||
66 | * pull up/down = disabled | ||
67 | * sleep mode = input/wakeup | ||
68 | * direction = input | ||
69 | * value = low | ||
70 | * SLPM direction = same as normal | ||
71 | * SLPM pull = same as normal | ||
72 | * SLPM value = same as normal | ||
73 | * | ||
74 | * PIN_CFG - default config with alternate function | ||
75 | */ | ||
76 | |||
77 | typedef unsigned long pin_cfg_t; | ||
78 | |||
79 | #define PIN_NUM_MASK 0x1ff | ||
80 | #define PIN_NUM(x) ((x) & PIN_NUM_MASK) | ||
81 | |||
82 | #define PIN_ALT_SHIFT 9 | ||
83 | #define PIN_ALT_MASK (0x3 << PIN_ALT_SHIFT) | ||
84 | #define PIN_ALT(x) (((x) & PIN_ALT_MASK) >> PIN_ALT_SHIFT) | ||
85 | #define PIN_GPIO (NMK_GPIO_ALT_GPIO << PIN_ALT_SHIFT) | ||
86 | #define PIN_ALT_A (NMK_GPIO_ALT_A << PIN_ALT_SHIFT) | ||
87 | #define PIN_ALT_B (NMK_GPIO_ALT_B << PIN_ALT_SHIFT) | ||
88 | #define PIN_ALT_C (NMK_GPIO_ALT_C << PIN_ALT_SHIFT) | ||
89 | |||
90 | #define PIN_PULL_SHIFT 11 | ||
91 | #define PIN_PULL_MASK (0x3 << PIN_PULL_SHIFT) | ||
92 | #define PIN_PULL(x) (((x) & PIN_PULL_MASK) >> PIN_PULL_SHIFT) | ||
93 | #define PIN_PULL_NONE (NMK_GPIO_PULL_NONE << PIN_PULL_SHIFT) | ||
94 | #define PIN_PULL_UP (NMK_GPIO_PULL_UP << PIN_PULL_SHIFT) | ||
95 | #define PIN_PULL_DOWN (NMK_GPIO_PULL_DOWN << PIN_PULL_SHIFT) | ||
96 | |||
97 | #define PIN_SLPM_SHIFT 13 | ||
98 | #define PIN_SLPM_MASK (0x1 << PIN_SLPM_SHIFT) | ||
99 | #define PIN_SLPM(x) (((x) & PIN_SLPM_MASK) >> PIN_SLPM_SHIFT) | ||
100 | #define PIN_SLPM_MAKE_INPUT (NMK_GPIO_SLPM_INPUT << PIN_SLPM_SHIFT) | ||
101 | #define PIN_SLPM_NOCHANGE (NMK_GPIO_SLPM_NOCHANGE << PIN_SLPM_SHIFT) | ||
102 | /* These two replace the above in DB8500v2+ */ | ||
103 | #define PIN_SLPM_WAKEUP_ENABLE (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT) | ||
104 | #define PIN_SLPM_WAKEUP_DISABLE (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT) | ||
105 | #define PIN_SLPM_USE_MUX_SETTINGS_IN_SLEEP PIN_SLPM_WAKEUP_DISABLE | ||
106 | |||
107 | #define PIN_SLPM_GPIO PIN_SLPM_WAKEUP_ENABLE /* In SLPM, pin is a gpio */ | ||
108 | #define PIN_SLPM_ALTFUNC PIN_SLPM_WAKEUP_DISABLE /* In SLPM, pin is altfunc */ | ||
109 | |||
110 | #define PIN_DIR_SHIFT 14 | ||
111 | #define PIN_DIR_MASK (0x1 << PIN_DIR_SHIFT) | ||
112 | #define PIN_DIR(x) (((x) & PIN_DIR_MASK) >> PIN_DIR_SHIFT) | ||
113 | #define PIN_DIR_INPUT (0 << PIN_DIR_SHIFT) | ||
114 | #define PIN_DIR_OUTPUT (1 << PIN_DIR_SHIFT) | ||
115 | |||
116 | #define PIN_VAL_SHIFT 15 | ||
117 | #define PIN_VAL_MASK (0x1 << PIN_VAL_SHIFT) | ||
118 | #define PIN_VAL(x) (((x) & PIN_VAL_MASK) >> PIN_VAL_SHIFT) | ||
119 | #define PIN_VAL_LOW (0 << PIN_VAL_SHIFT) | ||
120 | #define PIN_VAL_HIGH (1 << PIN_VAL_SHIFT) | ||
121 | |||
122 | #define PIN_SLPM_PULL_SHIFT 16 | ||
123 | #define PIN_SLPM_PULL_MASK (0x7 << PIN_SLPM_PULL_SHIFT) | ||
124 | #define PIN_SLPM_PULL(x) \ | ||
125 | (((x) & PIN_SLPM_PULL_MASK) >> PIN_SLPM_PULL_SHIFT) | ||
126 | #define PIN_SLPM_PULL_NONE \ | ||
127 | ((1 + NMK_GPIO_PULL_NONE) << PIN_SLPM_PULL_SHIFT) | ||
128 | #define PIN_SLPM_PULL_UP \ | ||
129 | ((1 + NMK_GPIO_PULL_UP) << PIN_SLPM_PULL_SHIFT) | ||
130 | #define PIN_SLPM_PULL_DOWN \ | ||
131 | ((1 + NMK_GPIO_PULL_DOWN) << PIN_SLPM_PULL_SHIFT) | ||
132 | |||
133 | #define PIN_SLPM_DIR_SHIFT 19 | ||
134 | #define PIN_SLPM_DIR_MASK (0x3 << PIN_SLPM_DIR_SHIFT) | ||
135 | #define PIN_SLPM_DIR(x) \ | ||
136 | (((x) & PIN_SLPM_DIR_MASK) >> PIN_SLPM_DIR_SHIFT) | ||
137 | #define PIN_SLPM_DIR_INPUT ((1 + 0) << PIN_SLPM_DIR_SHIFT) | ||
138 | #define PIN_SLPM_DIR_OUTPUT ((1 + 1) << PIN_SLPM_DIR_SHIFT) | ||
139 | |||
140 | #define PIN_SLPM_VAL_SHIFT 21 | ||
141 | #define PIN_SLPM_VAL_MASK (0x3 << PIN_SLPM_VAL_SHIFT) | ||
142 | #define PIN_SLPM_VAL(x) \ | ||
143 | (((x) & PIN_SLPM_VAL_MASK) >> PIN_SLPM_VAL_SHIFT) | ||
144 | #define PIN_SLPM_VAL_LOW ((1 + 0) << PIN_SLPM_VAL_SHIFT) | ||
145 | #define PIN_SLPM_VAL_HIGH ((1 + 1) << PIN_SLPM_VAL_SHIFT) | ||
146 | |||
147 | #define PIN_SLPM_PDIS_SHIFT 23 | ||
148 | #define PIN_SLPM_PDIS_MASK (0x3 << PIN_SLPM_PDIS_SHIFT) | ||
149 | #define PIN_SLPM_PDIS(x) \ | ||
150 | (((x) & PIN_SLPM_PDIS_MASK) >> PIN_SLPM_PDIS_SHIFT) | ||
151 | #define PIN_SLPM_PDIS_NO_CHANGE (0 << PIN_SLPM_PDIS_SHIFT) | ||
152 | #define PIN_SLPM_PDIS_DISABLED (1 << PIN_SLPM_PDIS_SHIFT) | ||
153 | #define PIN_SLPM_PDIS_ENABLED (2 << PIN_SLPM_PDIS_SHIFT) | ||
154 | |||
155 | #define PIN_LOWEMI_SHIFT 25 | ||
156 | #define PIN_LOWEMI_MASK (0x1 << PIN_LOWEMI_SHIFT) | ||
157 | #define PIN_LOWEMI(x) (((x) & PIN_LOWEMI_MASK) >> PIN_LOWEMI_SHIFT) | ||
158 | #define PIN_LOWEMI_DISABLED (0 << PIN_LOWEMI_SHIFT) | ||
159 | #define PIN_LOWEMI_ENABLED (1 << PIN_LOWEMI_SHIFT) | ||
160 | |||
161 | #define PIN_GPIOMODE_SHIFT 26 | ||
162 | #define PIN_GPIOMODE_MASK (0x1 << PIN_GPIOMODE_SHIFT) | ||
163 | #define PIN_GPIOMODE(x) (((x) & PIN_GPIOMODE_MASK) >> PIN_GPIOMODE_SHIFT) | ||
164 | #define PIN_GPIOMODE_DISABLED (0 << PIN_GPIOMODE_SHIFT) | ||
165 | #define PIN_GPIOMODE_ENABLED (1 << PIN_GPIOMODE_SHIFT) | ||
166 | |||
167 | #define PIN_SLEEPMODE_SHIFT 27 | ||
168 | #define PIN_SLEEPMODE_MASK (0x1 << PIN_SLEEPMODE_SHIFT) | ||
169 | #define PIN_SLEEPMODE(x) (((x) & PIN_SLEEPMODE_MASK) >> PIN_SLEEPMODE_SHIFT) | ||
170 | #define PIN_SLEEPMODE_DISABLED (0 << PIN_SLEEPMODE_SHIFT) | ||
171 | #define PIN_SLEEPMODE_ENABLED (1 << PIN_SLEEPMODE_SHIFT) | ||
172 | |||
173 | |||
174 | /* Shortcuts. Use these instead of separate DIR, PULL, and VAL. */ | ||
175 | #define PIN_INPUT_PULLDOWN (PIN_DIR_INPUT | PIN_PULL_DOWN) | ||
176 | #define PIN_INPUT_PULLUP (PIN_DIR_INPUT | PIN_PULL_UP) | ||
177 | #define PIN_INPUT_NOPULL (PIN_DIR_INPUT | PIN_PULL_NONE) | ||
178 | #define PIN_OUTPUT_LOW (PIN_DIR_OUTPUT | PIN_VAL_LOW) | ||
179 | #define PIN_OUTPUT_HIGH (PIN_DIR_OUTPUT | PIN_VAL_HIGH) | ||
180 | |||
181 | #define PIN_SLPM_INPUT_PULLDOWN (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_DOWN) | ||
182 | #define PIN_SLPM_INPUT_PULLUP (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_UP) | ||
183 | #define PIN_SLPM_INPUT_NOPULL (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_NONE) | ||
184 | #define PIN_SLPM_OUTPUT_LOW (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_LOW) | ||
185 | #define PIN_SLPM_OUTPUT_HIGH (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_HIGH) | ||
186 | |||
187 | #define PIN_CFG_DEFAULT (0) | ||
188 | |||
189 | #define PIN_CFG(num, alt) \ | ||
190 | (PIN_CFG_DEFAULT |\ | ||
191 | (PIN_NUM(num) | PIN_##alt)) | ||
192 | |||
193 | #define PIN_CFG_INPUT(num, alt, pull) \ | ||
194 | (PIN_CFG_DEFAULT |\ | ||
195 | (PIN_NUM(num) | PIN_##alt | PIN_INPUT_##pull)) | ||
196 | |||
197 | #define PIN_CFG_OUTPUT(num, alt, val) \ | ||
198 | (PIN_CFG_DEFAULT |\ | ||
199 | (PIN_NUM(num) | PIN_##alt | PIN_OUTPUT_##val)) | ||
200 | |||
201 | /* | ||
202 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving | ||
203 | * the "gpio" namespace for generic and cross-machine functions | ||
204 | */ | ||
205 | |||
206 | #define GPIO_BLOCK_SHIFT 5 | ||
207 | #define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT) | ||
208 | |||
209 | /* Register in the logic block */ | ||
210 | #define NMK_GPIO_DAT 0x00 | ||
211 | #define NMK_GPIO_DATS 0x04 | ||
212 | #define NMK_GPIO_DATC 0x08 | ||
213 | #define NMK_GPIO_PDIS 0x0c | ||
214 | #define NMK_GPIO_DIR 0x10 | ||
215 | #define NMK_GPIO_DIRS 0x14 | ||
216 | #define NMK_GPIO_DIRC 0x18 | ||
217 | #define NMK_GPIO_SLPC 0x1c | ||
218 | #define NMK_GPIO_AFSLA 0x20 | ||
219 | #define NMK_GPIO_AFSLB 0x24 | ||
220 | #define NMK_GPIO_LOWEMI 0x28 | ||
221 | |||
222 | #define NMK_GPIO_RIMSC 0x40 | ||
223 | #define NMK_GPIO_FIMSC 0x44 | ||
224 | #define NMK_GPIO_IS 0x48 | ||
225 | #define NMK_GPIO_IC 0x4c | ||
226 | #define NMK_GPIO_RWIMSC 0x50 | ||
227 | #define NMK_GPIO_FWIMSC 0x54 | ||
228 | #define NMK_GPIO_WKS 0x58 | ||
229 | /* These appear in DB8540 and later ASICs */ | ||
230 | #define NMK_GPIO_EDGELEVEL 0x5C | ||
231 | #define NMK_GPIO_LEVEL 0x60 | ||
232 | |||
233 | |||
234 | /* Pull up/down values */ | ||
235 | enum nmk_gpio_pull { | ||
236 | NMK_GPIO_PULL_NONE, | ||
237 | NMK_GPIO_PULL_UP, | ||
238 | NMK_GPIO_PULL_DOWN, | ||
239 | }; | ||
240 | |||
241 | /* Sleep mode */ | ||
242 | enum nmk_gpio_slpm { | ||
243 | NMK_GPIO_SLPM_INPUT, | ||
244 | NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT, | ||
245 | NMK_GPIO_SLPM_NOCHANGE, | ||
246 | NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE, | ||
247 | }; | ||
248 | |||
249 | /* | ||
250 | * Platform data to register a block: only the initial gpio/irq number. | ||
251 | */ | ||
252 | struct nmk_gpio_platform_data { | ||
253 | char *name; | ||
254 | int first_gpio; | ||
255 | int first_irq; | ||
256 | int num_gpio; | ||
257 | u32 (*get_secondary_status)(unsigned int bank); | ||
258 | void (*set_ioforce)(bool enable); | ||
259 | bool supports_sleepmode; | ||
260 | }; | ||
261 | |||
48 | struct nmk_gpio_chip { | 262 | struct nmk_gpio_chip { |
49 | struct gpio_chip chip; | 263 | struct gpio_chip chip; |
50 | struct irq_domain *domain; | 264 | struct irq_domain *domain; |
@@ -1026,7 +1240,7 @@ static const struct irq_domain_ops nmk_gpio_irq_simple_ops = { | |||
1026 | 1240 | ||
1027 | static int nmk_gpio_probe(struct platform_device *dev) | 1241 | static int nmk_gpio_probe(struct platform_device *dev) |
1028 | { | 1242 | { |
1029 | struct nmk_gpio_platform_data *pdata = dev->dev.platform_data; | 1243 | struct nmk_gpio_platform_data *pdata; |
1030 | struct device_node *np = dev->dev.of_node; | 1244 | struct device_node *np = dev->dev.of_node; |
1031 | struct nmk_gpio_chip *nmk_chip; | 1245 | struct nmk_gpio_chip *nmk_chip; |
1032 | struct gpio_chip *chip; | 1246 | struct gpio_chip *chip; |
@@ -1034,32 +1248,24 @@ static int nmk_gpio_probe(struct platform_device *dev) | |||
1034 | struct clk *clk; | 1248 | struct clk *clk; |
1035 | int secondary_irq; | 1249 | int secondary_irq; |
1036 | void __iomem *base; | 1250 | void __iomem *base; |
1037 | int irq_start = 0; | ||
1038 | int irq; | 1251 | int irq; |
1039 | int ret; | 1252 | int ret; |
1040 | 1253 | ||
1041 | if (!pdata && !np) { | 1254 | pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL); |
1042 | dev_err(&dev->dev, "No platform data or device tree found\n"); | 1255 | if (!pdata) |
1043 | return -ENODEV; | 1256 | return -ENOMEM; |
1044 | } | ||
1045 | |||
1046 | if (np) { | ||
1047 | pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL); | ||
1048 | if (!pdata) | ||
1049 | return -ENOMEM; | ||
1050 | |||
1051 | if (of_get_property(np, "st,supports-sleepmode", NULL)) | ||
1052 | pdata->supports_sleepmode = true; | ||
1053 | 1257 | ||
1054 | if (of_property_read_u32(np, "gpio-bank", &dev->id)) { | 1258 | if (of_get_property(np, "st,supports-sleepmode", NULL)) |
1055 | dev_err(&dev->dev, "gpio-bank property not found\n"); | 1259 | pdata->supports_sleepmode = true; |
1056 | return -EINVAL; | ||
1057 | } | ||
1058 | 1260 | ||
1059 | pdata->first_gpio = dev->id * NMK_GPIO_PER_CHIP; | 1261 | if (of_property_read_u32(np, "gpio-bank", &dev->id)) { |
1060 | pdata->num_gpio = NMK_GPIO_PER_CHIP; | 1262 | dev_err(&dev->dev, "gpio-bank property not found\n"); |
1263 | return -EINVAL; | ||
1061 | } | 1264 | } |
1062 | 1265 | ||
1266 | pdata->first_gpio = dev->id * NMK_GPIO_PER_CHIP; | ||
1267 | pdata->num_gpio = NMK_GPIO_PER_CHIP; | ||
1268 | |||
1063 | irq = platform_get_irq(dev, 0); | 1269 | irq = platform_get_irq(dev, 0); |
1064 | if (irq < 0) | 1270 | if (irq < 0) |
1065 | return irq; | 1271 | return irq; |
@@ -1107,10 +1313,7 @@ static int nmk_gpio_probe(struct platform_device *dev) | |||
1107 | clk_enable(nmk_chip->clk); | 1313 | clk_enable(nmk_chip->clk); |
1108 | nmk_chip->lowemi = readl_relaxed(nmk_chip->addr + NMK_GPIO_LOWEMI); | 1314 | nmk_chip->lowemi = readl_relaxed(nmk_chip->addr + NMK_GPIO_LOWEMI); |
1109 | clk_disable(nmk_chip->clk); | 1315 | clk_disable(nmk_chip->clk); |
1110 | |||
1111 | #ifdef CONFIG_OF_GPIO | ||
1112 | chip->of_node = np; | 1316 | chip->of_node = np; |
1113 | #endif | ||
1114 | 1317 | ||
1115 | ret = gpiochip_add(&nmk_chip->chip); | 1318 | ret = gpiochip_add(&nmk_chip->chip); |
1116 | if (ret) | 1319 | if (ret) |
@@ -1122,10 +1325,8 @@ static int nmk_gpio_probe(struct platform_device *dev) | |||
1122 | 1325 | ||
1123 | platform_set_drvdata(dev, nmk_chip); | 1326 | platform_set_drvdata(dev, nmk_chip); |
1124 | 1327 | ||
1125 | if (!np) | ||
1126 | irq_start = pdata->first_irq; | ||
1127 | nmk_chip->domain = irq_domain_add_simple(np, | 1328 | nmk_chip->domain = irq_domain_add_simple(np, |
1128 | NMK_GPIO_PER_CHIP, irq_start, | 1329 | NMK_GPIO_PER_CHIP, 0, |
1129 | &nmk_gpio_irq_simple_ops, nmk_chip); | 1330 | &nmk_gpio_irq_simple_ops, nmk_chip); |
1130 | if (!nmk_chip->domain) { | 1331 | if (!nmk_chip->domain) { |
1131 | dev_err(&dev->dev, "failed to create irqdomain\n"); | 1332 | dev_err(&dev->dev, "failed to create irqdomain\n"); |
@@ -1858,11 +2059,10 @@ static int nmk_pinctrl_resume(struct platform_device *pdev) | |||
1858 | 2059 | ||
1859 | static int nmk_pinctrl_probe(struct platform_device *pdev) | 2060 | static int nmk_pinctrl_probe(struct platform_device *pdev) |
1860 | { | 2061 | { |
1861 | const struct platform_device_id *platid = platform_get_device_id(pdev); | 2062 | const struct of_device_id *match; |
1862 | struct device_node *np = pdev->dev.of_node; | 2063 | struct device_node *np = pdev->dev.of_node; |
1863 | struct device_node *prcm_np; | 2064 | struct device_node *prcm_np; |
1864 | struct nmk_pinctrl *npct; | 2065 | struct nmk_pinctrl *npct; |
1865 | struct resource *res; | ||
1866 | unsigned int version = 0; | 2066 | unsigned int version = 0; |
1867 | int i; | 2067 | int i; |
1868 | 2068 | ||
@@ -1870,16 +2070,10 @@ static int nmk_pinctrl_probe(struct platform_device *pdev) | |||
1870 | if (!npct) | 2070 | if (!npct) |
1871 | return -ENOMEM; | 2071 | return -ENOMEM; |
1872 | 2072 | ||
1873 | if (platid) | 2073 | match = of_match_device(nmk_pinctrl_match, &pdev->dev); |
1874 | version = platid->driver_data; | 2074 | if (!match) |
1875 | else if (np) { | 2075 | return -ENODEV; |
1876 | const struct of_device_id *match; | 2076 | version = (unsigned int) match->data; |
1877 | |||
1878 | match = of_match_device(nmk_pinctrl_match, &pdev->dev); | ||
1879 | if (!match) | ||
1880 | return -ENODEV; | ||
1881 | version = (unsigned int) match->data; | ||
1882 | } | ||
1883 | 2077 | ||
1884 | /* Poke in other ASIC variants here */ | 2078 | /* Poke in other ASIC variants here */ |
1885 | if (version == PINCTRL_NMK_STN8815) | 2079 | if (version == PINCTRL_NMK_STN8815) |
@@ -1889,17 +2083,9 @@ static int nmk_pinctrl_probe(struct platform_device *pdev) | |||
1889 | if (version == PINCTRL_NMK_DB8540) | 2083 | if (version == PINCTRL_NMK_DB8540) |
1890 | nmk_pinctrl_db8540_init(&npct->soc); | 2084 | nmk_pinctrl_db8540_init(&npct->soc); |
1891 | 2085 | ||
1892 | if (np) { | 2086 | prcm_np = of_parse_phandle(np, "prcm", 0); |
1893 | prcm_np = of_parse_phandle(np, "prcm", 0); | 2087 | if (prcm_np) |
1894 | if (prcm_np) | 2088 | npct->prcm_base = of_iomap(prcm_np, 0); |
1895 | npct->prcm_base = of_iomap(prcm_np, 0); | ||
1896 | } | ||
1897 | |||
1898 | /* Allow platform passed information to over-write DT. */ | ||
1899 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
1900 | if (res) | ||
1901 | npct->prcm_base = devm_ioremap(&pdev->dev, res->start, | ||
1902 | resource_size(res)); | ||
1903 | if (!npct->prcm_base) { | 2089 | if (!npct->prcm_base) { |
1904 | if (version == PINCTRL_NMK_STN8815) { | 2090 | if (version == PINCTRL_NMK_STN8815) { |
1905 | dev_info(&pdev->dev, | 2091 | dev_info(&pdev->dev, |
@@ -1958,13 +2144,6 @@ static struct platform_driver nmk_gpio_driver = { | |||
1958 | .probe = nmk_gpio_probe, | 2144 | .probe = nmk_gpio_probe, |
1959 | }; | 2145 | }; |
1960 | 2146 | ||
1961 | static const struct platform_device_id nmk_pinctrl_id[] = { | ||
1962 | { "pinctrl-stn8815", PINCTRL_NMK_STN8815 }, | ||
1963 | { "pinctrl-db8500", PINCTRL_NMK_DB8500 }, | ||
1964 | { "pinctrl-db8540", PINCTRL_NMK_DB8540 }, | ||
1965 | { } | ||
1966 | }; | ||
1967 | |||
1968 | static struct platform_driver nmk_pinctrl_driver = { | 2147 | static struct platform_driver nmk_pinctrl_driver = { |
1969 | .driver = { | 2148 | .driver = { |
1970 | .owner = THIS_MODULE, | 2149 | .owner = THIS_MODULE, |
@@ -1972,7 +2151,6 @@ static struct platform_driver nmk_pinctrl_driver = { | |||
1972 | .of_match_table = nmk_pinctrl_match, | 2151 | .of_match_table = nmk_pinctrl_match, |
1973 | }, | 2152 | }, |
1974 | .probe = nmk_pinctrl_probe, | 2153 | .probe = nmk_pinctrl_probe, |
1975 | .id_table = nmk_pinctrl_id, | ||
1976 | #ifdef CONFIG_PM | 2154 | #ifdef CONFIG_PM |
1977 | .suspend = nmk_pinctrl_suspend, | 2155 | .suspend = nmk_pinctrl_suspend, |
1978 | .resume = nmk_pinctrl_resume, | 2156 | .resume = nmk_pinctrl_resume, |
diff --git a/drivers/pinctrl/pinctrl-nomadik.h b/drivers/pinctrl/pinctrl-nomadik.h index bcd4191e10ea..d8215f1e70c7 100644 --- a/drivers/pinctrl/pinctrl-nomadik.h +++ b/drivers/pinctrl/pinctrl-nomadik.h | |||
@@ -1,13 +1,23 @@ | |||
1 | #ifndef PINCTRL_PINCTRL_NOMADIK_H | 1 | #ifndef PINCTRL_PINCTRL_NOMADIK_H |
2 | #define PINCTRL_PINCTRL_NOMADIK_H | 2 | #define PINCTRL_PINCTRL_NOMADIK_H |
3 | 3 | ||
4 | #include <linux/platform_data/pinctrl-nomadik.h> | ||
5 | |||
6 | /* Package definitions */ | 4 | /* Package definitions */ |
7 | #define PINCTRL_NMK_STN8815 0 | 5 | #define PINCTRL_NMK_STN8815 0 |
8 | #define PINCTRL_NMK_DB8500 1 | 6 | #define PINCTRL_NMK_DB8500 1 |
9 | #define PINCTRL_NMK_DB8540 2 | 7 | #define PINCTRL_NMK_DB8540 2 |
10 | 8 | ||
9 | /* Alternate functions: function C is set in hw by setting both A and B */ | ||
10 | #define NMK_GPIO_ALT_GPIO 0 | ||
11 | #define NMK_GPIO_ALT_A 1 | ||
12 | #define NMK_GPIO_ALT_B 2 | ||
13 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | ||
14 | |||
15 | #define NMK_GPIO_ALT_CX_SHIFT 2 | ||
16 | #define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
17 | #define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
18 | #define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
19 | #define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
20 | |||
11 | #define PRCM_GPIOCR_ALTCX(pin_num,\ | 21 | #define PRCM_GPIOCR_ALTCX(pin_num,\ |
12 | altc1_used, altc1_ri, altc1_cb,\ | 22 | altc1_used, altc1_ri, altc1_cb,\ |
13 | altc2_used, altc2_ri, altc2_cb,\ | 23 | altc2_used, altc2_ri, altc2_cb,\ |
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 2cb52e0438df..9f71d9fdcc14 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -326,7 +326,7 @@ static int vbus_is_present(struct usba_udc *udc) | |||
326 | 326 | ||
327 | #if defined(CONFIG_ARCH_AT91SAM9RL) | 327 | #if defined(CONFIG_ARCH_AT91SAM9RL) |
328 | 328 | ||
329 | #include <mach/at91_pmc.h> | 329 | #include <linux/clk/at91_pmc.h> |
330 | 330 | ||
331 | static void toggle_bias(int is_on) | 331 | static void toggle_bias(int is_on) |
332 | { | 332 | { |
diff --git a/include/dt-bindings/clk/at91.h b/include/dt-bindings/clk/at91.h new file mode 100644 index 000000000000..0b4cb999a3f7 --- /dev/null +++ b/include/dt-bindings/clk/at91.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * This header provides constants for AT91 pmc status. | ||
3 | * | ||
4 | * The constants defined in this header are being used in dts. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef _DT_BINDINGS_CLK_AT91_H | ||
10 | #define _DT_BINDINGS_CLK_AT91_H | ||
11 | |||
12 | #define AT91_PMC_MOSCS 0 /* MOSCS Flag */ | ||
13 | #define AT91_PMC_LOCKA 1 /* PLLA Lock */ | ||
14 | #define AT91_PMC_LOCKB 2 /* PLLB Lock */ | ||
15 | #define AT91_PMC_MCKRDY 3 /* Master Clock */ | ||
16 | #define AT91_PMC_LOCKU 6 /* UPLL Lock */ | ||
17 | #define AT91_PMC_PCKRDY(id) (8 + (id)) /* Programmable Clock */ | ||
18 | #define AT91_PMC_MOSCSELS 16 /* Main Oscillator Selection */ | ||
19 | #define AT91_PMC_MOSCRCS 17 /* Main On-Chip RC */ | ||
20 | #define AT91_PMC_CFDEV 18 /* Clock Failure Detector Event */ | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/include/linux/clk/at91_pmc.h index c604cc69acb5..a6911ebbd02a 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/include/linux/clk/at91_pmc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-at91/include/mach/at91_pmc.h | 2 | * include/linux/clk/at91_pmc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -164,6 +164,8 @@ extern void __iomem *at91_pmc_base; | |||
164 | #define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */ | 164 | #define AT91_PMC_CFDEV (1 << 18) /* Clock Failure Detector Event [some SAM9] */ |
165 | #define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */ | 165 | #define AT91_PMC_IMR 0x6c /* Interrupt Mask Register */ |
166 | 166 | ||
167 | #define AT91_PMC_PLLICPR 0x80 /* PLL Charge Pump Current Register */ | ||
168 | |||
167 | #define AT91_PMC_PROT 0xe4 /* Write Protect Mode Register [some SAM9] */ | 169 | #define AT91_PMC_PROT 0xe4 /* Write Protect Mode Register [some SAM9] */ |
168 | #define AT91_PMC_WPEN (0x1 << 0) /* Write Protect Enable */ | 170 | #define AT91_PMC_WPEN (0x1 << 0) /* Write Protect Enable */ |
169 | #define AT91_PMC_WPKEY (0xffffff << 8) /* Write Protect Key */ | 171 | #define AT91_PMC_WPKEY (0xffffff << 8) /* Write Protect Key */ |
diff --git a/include/linux/platform_data/clocksource-nomadik-mtu.h b/include/linux/platform_data/clocksource-nomadik-mtu.h deleted file mode 100644 index 80088973b734..000000000000 --- a/include/linux/platform_data/clocksource-nomadik-mtu.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef __PLAT_MTU_H | ||
2 | #define __PLAT_MTU_H | ||
3 | |||
4 | void nmdk_timer_init(void __iomem *base, int irq); | ||
5 | void nmdk_clkevt_reset(void); | ||
6 | void nmdk_clksrc_reset(void); | ||
7 | |||
8 | #endif /* __PLAT_MTU_H */ | ||
9 | |||
diff --git a/include/linux/platform_data/pinctrl-nomadik.h b/include/linux/platform_data/pinctrl-nomadik.h deleted file mode 100644 index abf5bed84df3..000000000000 --- a/include/linux/platform_data/pinctrl-nomadik.h +++ /dev/null | |||
@@ -1,242 +0,0 @@ | |||
1 | /* | ||
2 | * Structures and registers for GPIO access in the Nomadik SoC | ||
3 | * | ||
4 | * Copyright (C) 2008 STMicroelectronics | ||
5 | * Author: Prafulla WADASKAR <prafulla.wadaskar@st.com> | ||
6 | * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __PLAT_NOMADIK_GPIO | ||
14 | #define __PLAT_NOMADIK_GPIO | ||
15 | |||
16 | /* | ||
17 | * pin configurations are represented by 32-bit integers: | ||
18 | * | ||
19 | * bit 0.. 8 - Pin Number (512 Pins Maximum) | ||
20 | * bit 9..10 - Alternate Function Selection | ||
21 | * bit 11..12 - Pull up/down state | ||
22 | * bit 13 - Sleep mode behaviour | ||
23 | * bit 14 - Direction | ||
24 | * bit 15 - Value (if output) | ||
25 | * bit 16..18 - SLPM pull up/down state | ||
26 | * bit 19..20 - SLPM direction | ||
27 | * bit 21..22 - SLPM Value (if output) | ||
28 | * bit 23..25 - PDIS value (if input) | ||
29 | * bit 26 - Gpio mode | ||
30 | * bit 27 - Sleep mode | ||
31 | * | ||
32 | * to facilitate the definition, the following macros are provided | ||
33 | * | ||
34 | * PIN_CFG_DEFAULT - default config (0): | ||
35 | * pull up/down = disabled | ||
36 | * sleep mode = input/wakeup | ||
37 | * direction = input | ||
38 | * value = low | ||
39 | * SLPM direction = same as normal | ||
40 | * SLPM pull = same as normal | ||
41 | * SLPM value = same as normal | ||
42 | * | ||
43 | * PIN_CFG - default config with alternate function | ||
44 | */ | ||
45 | |||
46 | typedef unsigned long pin_cfg_t; | ||
47 | |||
48 | #define PIN_NUM_MASK 0x1ff | ||
49 | #define PIN_NUM(x) ((x) & PIN_NUM_MASK) | ||
50 | |||
51 | #define PIN_ALT_SHIFT 9 | ||
52 | #define PIN_ALT_MASK (0x3 << PIN_ALT_SHIFT) | ||
53 | #define PIN_ALT(x) (((x) & PIN_ALT_MASK) >> PIN_ALT_SHIFT) | ||
54 | #define PIN_GPIO (NMK_GPIO_ALT_GPIO << PIN_ALT_SHIFT) | ||
55 | #define PIN_ALT_A (NMK_GPIO_ALT_A << PIN_ALT_SHIFT) | ||
56 | #define PIN_ALT_B (NMK_GPIO_ALT_B << PIN_ALT_SHIFT) | ||
57 | #define PIN_ALT_C (NMK_GPIO_ALT_C << PIN_ALT_SHIFT) | ||
58 | |||
59 | #define PIN_PULL_SHIFT 11 | ||
60 | #define PIN_PULL_MASK (0x3 << PIN_PULL_SHIFT) | ||
61 | #define PIN_PULL(x) (((x) & PIN_PULL_MASK) >> PIN_PULL_SHIFT) | ||
62 | #define PIN_PULL_NONE (NMK_GPIO_PULL_NONE << PIN_PULL_SHIFT) | ||
63 | #define PIN_PULL_UP (NMK_GPIO_PULL_UP << PIN_PULL_SHIFT) | ||
64 | #define PIN_PULL_DOWN (NMK_GPIO_PULL_DOWN << PIN_PULL_SHIFT) | ||
65 | |||
66 | #define PIN_SLPM_SHIFT 13 | ||
67 | #define PIN_SLPM_MASK (0x1 << PIN_SLPM_SHIFT) | ||
68 | #define PIN_SLPM(x) (((x) & PIN_SLPM_MASK) >> PIN_SLPM_SHIFT) | ||
69 | #define PIN_SLPM_MAKE_INPUT (NMK_GPIO_SLPM_INPUT << PIN_SLPM_SHIFT) | ||
70 | #define PIN_SLPM_NOCHANGE (NMK_GPIO_SLPM_NOCHANGE << PIN_SLPM_SHIFT) | ||
71 | /* These two replace the above in DB8500v2+ */ | ||
72 | #define PIN_SLPM_WAKEUP_ENABLE (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT) | ||
73 | #define PIN_SLPM_WAKEUP_DISABLE (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT) | ||
74 | #define PIN_SLPM_USE_MUX_SETTINGS_IN_SLEEP PIN_SLPM_WAKEUP_DISABLE | ||
75 | |||
76 | #define PIN_SLPM_GPIO PIN_SLPM_WAKEUP_ENABLE /* In SLPM, pin is a gpio */ | ||
77 | #define PIN_SLPM_ALTFUNC PIN_SLPM_WAKEUP_DISABLE /* In SLPM, pin is altfunc */ | ||
78 | |||
79 | #define PIN_DIR_SHIFT 14 | ||
80 | #define PIN_DIR_MASK (0x1 << PIN_DIR_SHIFT) | ||
81 | #define PIN_DIR(x) (((x) & PIN_DIR_MASK) >> PIN_DIR_SHIFT) | ||
82 | #define PIN_DIR_INPUT (0 << PIN_DIR_SHIFT) | ||
83 | #define PIN_DIR_OUTPUT (1 << PIN_DIR_SHIFT) | ||
84 | |||
85 | #define PIN_VAL_SHIFT 15 | ||
86 | #define PIN_VAL_MASK (0x1 << PIN_VAL_SHIFT) | ||
87 | #define PIN_VAL(x) (((x) & PIN_VAL_MASK) >> PIN_VAL_SHIFT) | ||
88 | #define PIN_VAL_LOW (0 << PIN_VAL_SHIFT) | ||
89 | #define PIN_VAL_HIGH (1 << PIN_VAL_SHIFT) | ||
90 | |||
91 | #define PIN_SLPM_PULL_SHIFT 16 | ||
92 | #define PIN_SLPM_PULL_MASK (0x7 << PIN_SLPM_PULL_SHIFT) | ||
93 | #define PIN_SLPM_PULL(x) \ | ||
94 | (((x) & PIN_SLPM_PULL_MASK) >> PIN_SLPM_PULL_SHIFT) | ||
95 | #define PIN_SLPM_PULL_NONE \ | ||
96 | ((1 + NMK_GPIO_PULL_NONE) << PIN_SLPM_PULL_SHIFT) | ||
97 | #define PIN_SLPM_PULL_UP \ | ||
98 | ((1 + NMK_GPIO_PULL_UP) << PIN_SLPM_PULL_SHIFT) | ||
99 | #define PIN_SLPM_PULL_DOWN \ | ||
100 | ((1 + NMK_GPIO_PULL_DOWN) << PIN_SLPM_PULL_SHIFT) | ||
101 | |||
102 | #define PIN_SLPM_DIR_SHIFT 19 | ||
103 | #define PIN_SLPM_DIR_MASK (0x3 << PIN_SLPM_DIR_SHIFT) | ||
104 | #define PIN_SLPM_DIR(x) \ | ||
105 | (((x) & PIN_SLPM_DIR_MASK) >> PIN_SLPM_DIR_SHIFT) | ||
106 | #define PIN_SLPM_DIR_INPUT ((1 + 0) << PIN_SLPM_DIR_SHIFT) | ||
107 | #define PIN_SLPM_DIR_OUTPUT ((1 + 1) << PIN_SLPM_DIR_SHIFT) | ||
108 | |||
109 | #define PIN_SLPM_VAL_SHIFT 21 | ||
110 | #define PIN_SLPM_VAL_MASK (0x3 << PIN_SLPM_VAL_SHIFT) | ||
111 | #define PIN_SLPM_VAL(x) \ | ||
112 | (((x) & PIN_SLPM_VAL_MASK) >> PIN_SLPM_VAL_SHIFT) | ||
113 | #define PIN_SLPM_VAL_LOW ((1 + 0) << PIN_SLPM_VAL_SHIFT) | ||
114 | #define PIN_SLPM_VAL_HIGH ((1 + 1) << PIN_SLPM_VAL_SHIFT) | ||
115 | |||
116 | #define PIN_SLPM_PDIS_SHIFT 23 | ||
117 | #define PIN_SLPM_PDIS_MASK (0x3 << PIN_SLPM_PDIS_SHIFT) | ||
118 | #define PIN_SLPM_PDIS(x) \ | ||
119 | (((x) & PIN_SLPM_PDIS_MASK) >> PIN_SLPM_PDIS_SHIFT) | ||
120 | #define PIN_SLPM_PDIS_NO_CHANGE (0 << PIN_SLPM_PDIS_SHIFT) | ||
121 | #define PIN_SLPM_PDIS_DISABLED (1 << PIN_SLPM_PDIS_SHIFT) | ||
122 | #define PIN_SLPM_PDIS_ENABLED (2 << PIN_SLPM_PDIS_SHIFT) | ||
123 | |||
124 | #define PIN_LOWEMI_SHIFT 25 | ||
125 | #define PIN_LOWEMI_MASK (0x1 << PIN_LOWEMI_SHIFT) | ||
126 | #define PIN_LOWEMI(x) (((x) & PIN_LOWEMI_MASK) >> PIN_LOWEMI_SHIFT) | ||
127 | #define PIN_LOWEMI_DISABLED (0 << PIN_LOWEMI_SHIFT) | ||
128 | #define PIN_LOWEMI_ENABLED (1 << PIN_LOWEMI_SHIFT) | ||
129 | |||
130 | #define PIN_GPIOMODE_SHIFT 26 | ||
131 | #define PIN_GPIOMODE_MASK (0x1 << PIN_GPIOMODE_SHIFT) | ||
132 | #define PIN_GPIOMODE(x) (((x) & PIN_GPIOMODE_MASK) >> PIN_GPIOMODE_SHIFT) | ||
133 | #define PIN_GPIOMODE_DISABLED (0 << PIN_GPIOMODE_SHIFT) | ||
134 | #define PIN_GPIOMODE_ENABLED (1 << PIN_GPIOMODE_SHIFT) | ||
135 | |||
136 | #define PIN_SLEEPMODE_SHIFT 27 | ||
137 | #define PIN_SLEEPMODE_MASK (0x1 << PIN_SLEEPMODE_SHIFT) | ||
138 | #define PIN_SLEEPMODE(x) (((x) & PIN_SLEEPMODE_MASK) >> PIN_SLEEPMODE_SHIFT) | ||
139 | #define PIN_SLEEPMODE_DISABLED (0 << PIN_SLEEPMODE_SHIFT) | ||
140 | #define PIN_SLEEPMODE_ENABLED (1 << PIN_SLEEPMODE_SHIFT) | ||
141 | |||
142 | |||
143 | /* Shortcuts. Use these instead of separate DIR, PULL, and VAL. */ | ||
144 | #define PIN_INPUT_PULLDOWN (PIN_DIR_INPUT | PIN_PULL_DOWN) | ||
145 | #define PIN_INPUT_PULLUP (PIN_DIR_INPUT | PIN_PULL_UP) | ||
146 | #define PIN_INPUT_NOPULL (PIN_DIR_INPUT | PIN_PULL_NONE) | ||
147 | #define PIN_OUTPUT_LOW (PIN_DIR_OUTPUT | PIN_VAL_LOW) | ||
148 | #define PIN_OUTPUT_HIGH (PIN_DIR_OUTPUT | PIN_VAL_HIGH) | ||
149 | |||
150 | #define PIN_SLPM_INPUT_PULLDOWN (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_DOWN) | ||
151 | #define PIN_SLPM_INPUT_PULLUP (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_UP) | ||
152 | #define PIN_SLPM_INPUT_NOPULL (PIN_SLPM_DIR_INPUT | PIN_SLPM_PULL_NONE) | ||
153 | #define PIN_SLPM_OUTPUT_LOW (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_LOW) | ||
154 | #define PIN_SLPM_OUTPUT_HIGH (PIN_SLPM_DIR_OUTPUT | PIN_SLPM_VAL_HIGH) | ||
155 | |||
156 | #define PIN_CFG_DEFAULT (0) | ||
157 | |||
158 | #define PIN_CFG(num, alt) \ | ||
159 | (PIN_CFG_DEFAULT |\ | ||
160 | (PIN_NUM(num) | PIN_##alt)) | ||
161 | |||
162 | #define PIN_CFG_INPUT(num, alt, pull) \ | ||
163 | (PIN_CFG_DEFAULT |\ | ||
164 | (PIN_NUM(num) | PIN_##alt | PIN_INPUT_##pull)) | ||
165 | |||
166 | #define PIN_CFG_OUTPUT(num, alt, val) \ | ||
167 | (PIN_CFG_DEFAULT |\ | ||
168 | (PIN_NUM(num) | PIN_##alt | PIN_OUTPUT_##val)) | ||
169 | |||
170 | /* | ||
171 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving | ||
172 | * the "gpio" namespace for generic and cross-machine functions | ||
173 | */ | ||
174 | |||
175 | #define GPIO_BLOCK_SHIFT 5 | ||
176 | #define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT) | ||
177 | |||
178 | /* Register in the logic block */ | ||
179 | #define NMK_GPIO_DAT 0x00 | ||
180 | #define NMK_GPIO_DATS 0x04 | ||
181 | #define NMK_GPIO_DATC 0x08 | ||
182 | #define NMK_GPIO_PDIS 0x0c | ||
183 | #define NMK_GPIO_DIR 0x10 | ||
184 | #define NMK_GPIO_DIRS 0x14 | ||
185 | #define NMK_GPIO_DIRC 0x18 | ||
186 | #define NMK_GPIO_SLPC 0x1c | ||
187 | #define NMK_GPIO_AFSLA 0x20 | ||
188 | #define NMK_GPIO_AFSLB 0x24 | ||
189 | #define NMK_GPIO_LOWEMI 0x28 | ||
190 | |||
191 | #define NMK_GPIO_RIMSC 0x40 | ||
192 | #define NMK_GPIO_FIMSC 0x44 | ||
193 | #define NMK_GPIO_IS 0x48 | ||
194 | #define NMK_GPIO_IC 0x4c | ||
195 | #define NMK_GPIO_RWIMSC 0x50 | ||
196 | #define NMK_GPIO_FWIMSC 0x54 | ||
197 | #define NMK_GPIO_WKS 0x58 | ||
198 | /* These appear in DB8540 and later ASICs */ | ||
199 | #define NMK_GPIO_EDGELEVEL 0x5C | ||
200 | #define NMK_GPIO_LEVEL 0x60 | ||
201 | |||
202 | /* Alternate functions: function C is set in hw by setting both A and B */ | ||
203 | #define NMK_GPIO_ALT_GPIO 0 | ||
204 | #define NMK_GPIO_ALT_A 1 | ||
205 | #define NMK_GPIO_ALT_B 2 | ||
206 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | ||
207 | |||
208 | #define NMK_GPIO_ALT_CX_SHIFT 2 | ||
209 | #define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
210 | #define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
211 | #define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
212 | #define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
213 | |||
214 | /* Pull up/down values */ | ||
215 | enum nmk_gpio_pull { | ||
216 | NMK_GPIO_PULL_NONE, | ||
217 | NMK_GPIO_PULL_UP, | ||
218 | NMK_GPIO_PULL_DOWN, | ||
219 | }; | ||
220 | |||
221 | /* Sleep mode */ | ||
222 | enum nmk_gpio_slpm { | ||
223 | NMK_GPIO_SLPM_INPUT, | ||
224 | NMK_GPIO_SLPM_WAKEUP_ENABLE = NMK_GPIO_SLPM_INPUT, | ||
225 | NMK_GPIO_SLPM_NOCHANGE, | ||
226 | NMK_GPIO_SLPM_WAKEUP_DISABLE = NMK_GPIO_SLPM_NOCHANGE, | ||
227 | }; | ||
228 | |||
229 | /* | ||
230 | * Platform data to register a block: only the initial gpio/irq number. | ||
231 | */ | ||
232 | struct nmk_gpio_platform_data { | ||
233 | char *name; | ||
234 | int first_gpio; | ||
235 | int first_irq; | ||
236 | int num_gpio; | ||
237 | u32 (*get_secondary_status)(unsigned int bank); | ||
238 | void (*set_ioforce)(bool enable); | ||
239 | bool supports_sleepmode; | ||
240 | }; | ||
241 | |||
242 | #endif /* __PLAT_NOMADIK_GPIO */ | ||