diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-07-12 08:49:00 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-12 11:37:05 -0400 |
commit | 8d5776d5fed6c3d2d5b5bce9512faa41321d6a8a (patch) | |
tree | 4cbb5a92c3d6a8d340fc817b2afcd167f865f312 | |
parent | e95f2e790e98c61eb88caa5ee31a04e1dc7a8c59 (diff) | |
parent | 9d5f6b51bdaff83b85069a2eee7a89c562a5daba (diff) |
Merge branch 'imx/dt-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt
From Shawn Guo <shawn.guo@linaro.org>:
Here is the second (last) batch of imx device tree changes for 3.6.
* 'imx/dt-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6:
ARM: imx6q: ensure ANATOP controller is available
ARM: dts: imx6q-sabrelite: add ecspi1 pinctrl support
ARM: dts: imx6q-sabrelite: add usb devices
ARM: imx6q: disable usb charger detector
ARM: imx6q: add usbphy clocks
ARM: imx6q: add usb controller clock lookups
ARM: dts: imx: update #interrupt-cells for gpio nodes
bindings: update imx and mxs #gpio-cells
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt | 14 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-mxs.txt | 5 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx27.dtsi | 12 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx51.dtsi | 8 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx53.dtsi | 14 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx6q-sabrelite.dts | 33 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx6q.dtsi | 58 | ||||
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 41 |
10 files changed, 166 insertions, 31 deletions
diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt index 4363ae4b3c14..4f3929713ae4 100644 --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt | |||
@@ -8,8 +8,16 @@ Required properties: | |||
8 | by low 16 pins and the second one is for high 16 pins. | 8 | by low 16 pins and the second one is for high 16 pins. |
9 | - gpio-controller : Marks the device node as a gpio controller. | 9 | - gpio-controller : Marks the device node as a gpio controller. |
10 | - #gpio-cells : Should be two. The first cell is the pin number and | 10 | - #gpio-cells : Should be two. The first cell is the pin number and |
11 | the second cell is used to specify optional parameters (currently | 11 | the second cell is used to specify the gpio polarity: |
12 | unused). | 12 | 0 = active high |
13 | 1 = active low | ||
14 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
15 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | ||
16 | The second cell bits[3:0] is used to specify trigger type and level flags: | ||
17 | 1 = low-to-high edge triggered. | ||
18 | 2 = high-to-low edge triggered. | ||
19 | 4 = active high level-sensitive. | ||
20 | 8 = active low level-sensitive. | ||
13 | 21 | ||
14 | Example: | 22 | Example: |
15 | 23 | ||
@@ -19,4 +27,6 @@ gpio0: gpio@73f84000 { | |||
19 | interrupts = <50 51>; | 27 | interrupts = <50 51>; |
20 | gpio-controller; | 28 | gpio-controller; |
21 | #gpio-cells = <2>; | 29 | #gpio-cells = <2>; |
30 | interrupt-controller; | ||
31 | #interrupt-cells = <2>; | ||
22 | }; | 32 | }; |
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt index 0c35673f7a3e..1e677a47b836 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt | |||
@@ -13,8 +13,9 @@ Required properties for GPIO node: | |||
13 | - interrupts : Should be the port interrupt shared by all 32 pins. | 13 | - interrupts : Should be the port interrupt shared by all 32 pins. |
14 | - gpio-controller : Marks the device node as a gpio controller. | 14 | - gpio-controller : Marks the device node as a gpio controller. |
15 | - #gpio-cells : Should be two. The first cell is the pin number and | 15 | - #gpio-cells : Should be two. The first cell is the pin number and |
16 | the second cell is used to specify optional parameters (currently | 16 | the second cell is used to specify the gpio polarity: |
17 | unused). | 17 | 0 = active high |
18 | 1 = active low | ||
18 | - interrupt-controller: Marks the device node as an interrupt controller. | 19 | - interrupt-controller: Marks the device node as an interrupt controller. |
19 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. | 20 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. |
20 | The second cell bits[3:0] is used to specify trigger type and level flags: | 21 | The second cell bits[3:0] is used to specify trigger type and level flags: |
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi index 386c769c38d1..00bae3aad5ab 100644 --- a/arch/arm/boot/dts/imx27.dtsi +++ b/arch/arm/boot/dts/imx27.dtsi | |||
@@ -121,7 +121,7 @@ | |||
121 | gpio-controller; | 121 | gpio-controller; |
122 | #gpio-cells = <2>; | 122 | #gpio-cells = <2>; |
123 | interrupt-controller; | 123 | interrupt-controller; |
124 | #interrupt-cells = <1>; | 124 | #interrupt-cells = <2>; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | gpio2: gpio@10015100 { | 127 | gpio2: gpio@10015100 { |
@@ -131,7 +131,7 @@ | |||
131 | gpio-controller; | 131 | gpio-controller; |
132 | #gpio-cells = <2>; | 132 | #gpio-cells = <2>; |
133 | interrupt-controller; | 133 | interrupt-controller; |
134 | #interrupt-cells = <1>; | 134 | #interrupt-cells = <2>; |
135 | }; | 135 | }; |
136 | 136 | ||
137 | gpio3: gpio@10015200 { | 137 | gpio3: gpio@10015200 { |
@@ -141,7 +141,7 @@ | |||
141 | gpio-controller; | 141 | gpio-controller; |
142 | #gpio-cells = <2>; | 142 | #gpio-cells = <2>; |
143 | interrupt-controller; | 143 | interrupt-controller; |
144 | #interrupt-cells = <1>; | 144 | #interrupt-cells = <2>; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | gpio4: gpio@10015300 { | 147 | gpio4: gpio@10015300 { |
@@ -151,7 +151,7 @@ | |||
151 | gpio-controller; | 151 | gpio-controller; |
152 | #gpio-cells = <2>; | 152 | #gpio-cells = <2>; |
153 | interrupt-controller; | 153 | interrupt-controller; |
154 | #interrupt-cells = <1>; | 154 | #interrupt-cells = <2>; |
155 | }; | 155 | }; |
156 | 156 | ||
157 | gpio5: gpio@10015400 { | 157 | gpio5: gpio@10015400 { |
@@ -161,7 +161,7 @@ | |||
161 | gpio-controller; | 161 | gpio-controller; |
162 | #gpio-cells = <2>; | 162 | #gpio-cells = <2>; |
163 | interrupt-controller; | 163 | interrupt-controller; |
164 | #interrupt-cells = <1>; | 164 | #interrupt-cells = <2>; |
165 | }; | 165 | }; |
166 | 166 | ||
167 | gpio6: gpio@10015500 { | 167 | gpio6: gpio@10015500 { |
@@ -171,7 +171,7 @@ | |||
171 | gpio-controller; | 171 | gpio-controller; |
172 | #gpio-cells = <2>; | 172 | #gpio-cells = <2>; |
173 | interrupt-controller; | 173 | interrupt-controller; |
174 | #interrupt-cells = <1>; | 174 | #interrupt-cells = <2>; |
175 | }; | 175 | }; |
176 | 176 | ||
177 | cspi3: cspi@10017000 { | 177 | cspi3: cspi@10017000 { |
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi index bfa65abe8ef2..922adefdd291 100644 --- a/arch/arm/boot/dts/imx51.dtsi +++ b/arch/arm/boot/dts/imx51.dtsi | |||
@@ -133,7 +133,7 @@ | |||
133 | gpio-controller; | 133 | gpio-controller; |
134 | #gpio-cells = <2>; | 134 | #gpio-cells = <2>; |
135 | interrupt-controller; | 135 | interrupt-controller; |
136 | #interrupt-cells = <1>; | 136 | #interrupt-cells = <2>; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | gpio2: gpio@73f88000 { | 139 | gpio2: gpio@73f88000 { |
@@ -143,7 +143,7 @@ | |||
143 | gpio-controller; | 143 | gpio-controller; |
144 | #gpio-cells = <2>; | 144 | #gpio-cells = <2>; |
145 | interrupt-controller; | 145 | interrupt-controller; |
146 | #interrupt-cells = <1>; | 146 | #interrupt-cells = <2>; |
147 | }; | 147 | }; |
148 | 148 | ||
149 | gpio3: gpio@73f8c000 { | 149 | gpio3: gpio@73f8c000 { |
@@ -153,7 +153,7 @@ | |||
153 | gpio-controller; | 153 | gpio-controller; |
154 | #gpio-cells = <2>; | 154 | #gpio-cells = <2>; |
155 | interrupt-controller; | 155 | interrupt-controller; |
156 | #interrupt-cells = <1>; | 156 | #interrupt-cells = <2>; |
157 | }; | 157 | }; |
158 | 158 | ||
159 | gpio4: gpio@73f90000 { | 159 | gpio4: gpio@73f90000 { |
@@ -163,7 +163,7 @@ | |||
163 | gpio-controller; | 163 | gpio-controller; |
164 | #gpio-cells = <2>; | 164 | #gpio-cells = <2>; |
165 | interrupt-controller; | 165 | interrupt-controller; |
166 | #interrupt-cells = <1>; | 166 | #interrupt-cells = <2>; |
167 | }; | 167 | }; |
168 | 168 | ||
169 | wdog@73f98000 { /* WDOG1 */ | 169 | wdog@73f98000 { /* WDOG1 */ |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index e3e869470cd3..4e735edc78ed 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
@@ -135,7 +135,7 @@ | |||
135 | gpio-controller; | 135 | gpio-controller; |
136 | #gpio-cells = <2>; | 136 | #gpio-cells = <2>; |
137 | interrupt-controller; | 137 | interrupt-controller; |
138 | #interrupt-cells = <1>; | 138 | #interrupt-cells = <2>; |
139 | }; | 139 | }; |
140 | 140 | ||
141 | gpio2: gpio@53f88000 { | 141 | gpio2: gpio@53f88000 { |
@@ -145,7 +145,7 @@ | |||
145 | gpio-controller; | 145 | gpio-controller; |
146 | #gpio-cells = <2>; | 146 | #gpio-cells = <2>; |
147 | interrupt-controller; | 147 | interrupt-controller; |
148 | #interrupt-cells = <1>; | 148 | #interrupt-cells = <2>; |
149 | }; | 149 | }; |
150 | 150 | ||
151 | gpio3: gpio@53f8c000 { | 151 | gpio3: gpio@53f8c000 { |
@@ -155,7 +155,7 @@ | |||
155 | gpio-controller; | 155 | gpio-controller; |
156 | #gpio-cells = <2>; | 156 | #gpio-cells = <2>; |
157 | interrupt-controller; | 157 | interrupt-controller; |
158 | #interrupt-cells = <1>; | 158 | #interrupt-cells = <2>; |
159 | }; | 159 | }; |
160 | 160 | ||
161 | gpio4: gpio@53f90000 { | 161 | gpio4: gpio@53f90000 { |
@@ -165,7 +165,7 @@ | |||
165 | gpio-controller; | 165 | gpio-controller; |
166 | #gpio-cells = <2>; | 166 | #gpio-cells = <2>; |
167 | interrupt-controller; | 167 | interrupt-controller; |
168 | #interrupt-cells = <1>; | 168 | #interrupt-cells = <2>; |
169 | }; | 169 | }; |
170 | 170 | ||
171 | wdog@53f98000 { /* WDOG1 */ | 171 | wdog@53f98000 { /* WDOG1 */ |
@@ -203,7 +203,7 @@ | |||
203 | gpio-controller; | 203 | gpio-controller; |
204 | #gpio-cells = <2>; | 204 | #gpio-cells = <2>; |
205 | interrupt-controller; | 205 | interrupt-controller; |
206 | #interrupt-cells = <1>; | 206 | #interrupt-cells = <2>; |
207 | }; | 207 | }; |
208 | 208 | ||
209 | gpio6: gpio@53fe0000 { | 209 | gpio6: gpio@53fe0000 { |
@@ -213,7 +213,7 @@ | |||
213 | gpio-controller; | 213 | gpio-controller; |
214 | #gpio-cells = <2>; | 214 | #gpio-cells = <2>; |
215 | interrupt-controller; | 215 | interrupt-controller; |
216 | #interrupt-cells = <1>; | 216 | #interrupt-cells = <2>; |
217 | }; | 217 | }; |
218 | 218 | ||
219 | gpio7: gpio@53fe4000 { | 219 | gpio7: gpio@53fe4000 { |
@@ -223,7 +223,7 @@ | |||
223 | gpio-controller; | 223 | gpio-controller; |
224 | #gpio-cells = <2>; | 224 | #gpio-cells = <2>; |
225 | interrupt-controller; | 225 | interrupt-controller; |
226 | #interrupt-cells = <1>; | 226 | #interrupt-cells = <2>; |
227 | }; | 227 | }; |
228 | 228 | ||
229 | i2c@53fec000 { /* I2C3 */ | 229 | i2c@53fec000 { /* I2C3 */ |
diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index e0ec92973e7e..d42e851ceb97 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts | |||
@@ -27,6 +27,8 @@ | |||
27 | ecspi@02008000 { /* eCSPI1 */ | 27 | ecspi@02008000 { /* eCSPI1 */ |
28 | fsl,spi-num-chipselects = <1>; | 28 | fsl,spi-num-chipselects = <1>; |
29 | cs-gpios = <&gpio3 19 0>; | 29 | cs-gpios = <&gpio3 19 0>; |
30 | pinctrl-names = "default"; | ||
31 | pinctrl-0 = <&pinctrl_ecspi1_1>; | ||
30 | status = "okay"; | 32 | status = "okay"; |
31 | 33 | ||
32 | flash: m25p80@0 { | 34 | flash: m25p80@0 { |
@@ -42,9 +44,31 @@ | |||
42 | }; | 44 | }; |
43 | }; | 45 | }; |
44 | 46 | ||
47 | iomuxc@020e0000 { | ||
48 | pinctrl-names = "default"; | ||
49 | pinctrl-0 = <&pinctrl_gpio_hog>; | ||
50 | |||
51 | gpios { | ||
52 | pinctrl_gpio_hog: gpiohog { | ||
53 | fsl,pins = < | ||
54 | 144 0x80000000 /* MX6Q_PAD_EIM_D22__GPIO_3_22 */ | ||
55 | 121 0x80000000 /* MX6Q_PAD_EIM_D19__GPIO_3_19 */ | ||
56 | >; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
45 | }; | 60 | }; |
46 | 61 | ||
47 | aips-bus@02100000 { /* AIPS2 */ | 62 | aips-bus@02100000 { /* AIPS2 */ |
63 | usb@02184000 { /* USB OTG */ | ||
64 | vbus-supply = <®_usb_otg_vbus>; | ||
65 | status = "okay"; | ||
66 | }; | ||
67 | |||
68 | usb@02184200 { /* USB1 */ | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
48 | ethernet@02188000 { | 72 | ethernet@02188000 { |
49 | phy-mode = "rgmii"; | 73 | phy-mode = "rgmii"; |
50 | phy-reset-gpios = <&gpio3 23 0>; | 74 | phy-reset-gpios = <&gpio3 23 0>; |
@@ -111,6 +135,15 @@ | |||
111 | regulator-max-microvolt = <3300000>; | 135 | regulator-max-microvolt = <3300000>; |
112 | regulator-always-on; | 136 | regulator-always-on; |
113 | }; | 137 | }; |
138 | |||
139 | reg_usb_otg_vbus: usb_otg_vbus { | ||
140 | compatible = "regulator-fixed"; | ||
141 | regulator-name = "usb_otg_vbus"; | ||
142 | regulator-min-microvolt = <5000000>; | ||
143 | regulator-max-microvolt = <5000000>; | ||
144 | gpio = <&gpio3 22 0>; | ||
145 | enable-active-high; | ||
146 | }; | ||
114 | }; | 147 | }; |
115 | 148 | ||
116 | sound { | 149 | sound { |
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 16a3884ac9d7..c25d49584814 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi | |||
@@ -283,7 +283,7 @@ | |||
283 | gpio-controller; | 283 | gpio-controller; |
284 | #gpio-cells = <2>; | 284 | #gpio-cells = <2>; |
285 | interrupt-controller; | 285 | interrupt-controller; |
286 | #interrupt-cells = <1>; | 286 | #interrupt-cells = <2>; |
287 | }; | 287 | }; |
288 | 288 | ||
289 | gpio2: gpio@020a0000 { | 289 | gpio2: gpio@020a0000 { |
@@ -293,7 +293,7 @@ | |||
293 | gpio-controller; | 293 | gpio-controller; |
294 | #gpio-cells = <2>; | 294 | #gpio-cells = <2>; |
295 | interrupt-controller; | 295 | interrupt-controller; |
296 | #interrupt-cells = <1>; | 296 | #interrupt-cells = <2>; |
297 | }; | 297 | }; |
298 | 298 | ||
299 | gpio3: gpio@020a4000 { | 299 | gpio3: gpio@020a4000 { |
@@ -303,7 +303,7 @@ | |||
303 | gpio-controller; | 303 | gpio-controller; |
304 | #gpio-cells = <2>; | 304 | #gpio-cells = <2>; |
305 | interrupt-controller; | 305 | interrupt-controller; |
306 | #interrupt-cells = <1>; | 306 | #interrupt-cells = <2>; |
307 | }; | 307 | }; |
308 | 308 | ||
309 | gpio4: gpio@020a8000 { | 309 | gpio4: gpio@020a8000 { |
@@ -313,7 +313,7 @@ | |||
313 | gpio-controller; | 313 | gpio-controller; |
314 | #gpio-cells = <2>; | 314 | #gpio-cells = <2>; |
315 | interrupt-controller; | 315 | interrupt-controller; |
316 | #interrupt-cells = <1>; | 316 | #interrupt-cells = <2>; |
317 | }; | 317 | }; |
318 | 318 | ||
319 | gpio5: gpio@020ac000 { | 319 | gpio5: gpio@020ac000 { |
@@ -323,7 +323,7 @@ | |||
323 | gpio-controller; | 323 | gpio-controller; |
324 | #gpio-cells = <2>; | 324 | #gpio-cells = <2>; |
325 | interrupt-controller; | 325 | interrupt-controller; |
326 | #interrupt-cells = <1>; | 326 | #interrupt-cells = <2>; |
327 | }; | 327 | }; |
328 | 328 | ||
329 | gpio6: gpio@020b0000 { | 329 | gpio6: gpio@020b0000 { |
@@ -333,7 +333,7 @@ | |||
333 | gpio-controller; | 333 | gpio-controller; |
334 | #gpio-cells = <2>; | 334 | #gpio-cells = <2>; |
335 | interrupt-controller; | 335 | interrupt-controller; |
336 | #interrupt-cells = <1>; | 336 | #interrupt-cells = <2>; |
337 | }; | 337 | }; |
338 | 338 | ||
339 | gpio7: gpio@020b4000 { | 339 | gpio7: gpio@020b4000 { |
@@ -343,7 +343,7 @@ | |||
343 | gpio-controller; | 343 | gpio-controller; |
344 | #gpio-cells = <2>; | 344 | #gpio-cells = <2>; |
345 | interrupt-controller; | 345 | interrupt-controller; |
346 | #interrupt-cells = <1>; | 346 | #interrupt-cells = <2>; |
347 | }; | 347 | }; |
348 | 348 | ||
349 | kpp@020b8000 { | 349 | kpp@020b8000 { |
@@ -461,12 +461,14 @@ | |||
461 | }; | 461 | }; |
462 | }; | 462 | }; |
463 | 463 | ||
464 | usbphy@020c9000 { /* USBPHY1 */ | 464 | usbphy1: usbphy@020c9000 { |
465 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; | ||
465 | reg = <0x020c9000 0x1000>; | 466 | reg = <0x020c9000 0x1000>; |
466 | interrupts = <0 44 0x04>; | 467 | interrupts = <0 44 0x04>; |
467 | }; | 468 | }; |
468 | 469 | ||
469 | usbphy@020ca000 { /* USBPHY2 */ | 470 | usbphy2: usbphy@020ca000 { |
471 | compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; | ||
470 | reg = <0x020ca000 0x1000>; | 472 | reg = <0x020ca000 0x1000>; |
471 | interrupts = <0 45 0x04>; | 473 | interrupts = <0 45 0x04>; |
472 | }; | 474 | }; |
@@ -579,6 +581,14 @@ | |||
579 | 1517 0x17059>; /* MX6Q_PAD_SD4_DAT7__USDHC4_DAT7 */ | 581 | 1517 0x17059>; /* MX6Q_PAD_SD4_DAT7__USDHC4_DAT7 */ |
580 | }; | 582 | }; |
581 | }; | 583 | }; |
584 | |||
585 | ecspi1 { | ||
586 | pinctrl_ecspi1_1: ecspi1grp-1 { | ||
587 | fsl,pins = <101 0x100b1 /* MX6Q_PAD_EIM_D17__ECSPI1_MISO */ | ||
588 | 109 0x100b1 /* MX6Q_PAD_EIM_D18__ECSPI1_MOSI */ | ||
589 | 94 0x100b1>; /* MX6Q_PAD_EIM_D16__ECSPI1_SCLK */ | ||
590 | }; | ||
591 | }; | ||
582 | }; | 592 | }; |
583 | 593 | ||
584 | dcic@020e4000 { /* DCIC1 */ | 594 | dcic@020e4000 { /* DCIC1 */ |
@@ -614,6 +624,36 @@ | |||
614 | reg = <0x0217c000 0x4000>; | 624 | reg = <0x0217c000 0x4000>; |
615 | }; | 625 | }; |
616 | 626 | ||
627 | usb@02184000 { /* USB OTG */ | ||
628 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | ||
629 | reg = <0x02184000 0x200>; | ||
630 | interrupts = <0 43 0x04>; | ||
631 | fsl,usbphy = <&usbphy1>; | ||
632 | status = "disabled"; | ||
633 | }; | ||
634 | |||
635 | usb@02184200 { /* USB1 */ | ||
636 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | ||
637 | reg = <0x02184200 0x200>; | ||
638 | interrupts = <0 40 0x04>; | ||
639 | fsl,usbphy = <&usbphy2>; | ||
640 | status = "disabled"; | ||
641 | }; | ||
642 | |||
643 | usb@02184400 { /* USB2 */ | ||
644 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | ||
645 | reg = <0x02184400 0x200>; | ||
646 | interrupts = <0 41 0x04>; | ||
647 | status = "disabled"; | ||
648 | }; | ||
649 | |||
650 | usb@02184600 { /* USB3 */ | ||
651 | compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; | ||
652 | reg = <0x02184600 0x200>; | ||
653 | interrupts = <0 42 0x04>; | ||
654 | status = "disabled"; | ||
655 | }; | ||
656 | |||
617 | ethernet@02188000 { | 657 | ethernet@02188000 { |
618 | compatible = "fsl,imx6q-fec"; | 658 | compatible = "fsl,imx6q-fec"; |
619 | reg = <0x02188000 0x4000>; | 659 | reg = <0x02188000 0x4000>; |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 92d0ddd5f8d4..5f87f2e2ddae 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -842,6 +842,7 @@ config SOC_IMX6Q | |||
842 | select HAVE_IMX_MMDC | 842 | select HAVE_IMX_MMDC |
843 | select HAVE_IMX_SRC | 843 | select HAVE_IMX_SRC |
844 | select HAVE_SMP | 844 | select HAVE_SMP |
845 | select MFD_ANATOP | ||
845 | select PINCTRL | 846 | select PINCTRL |
846 | select PINCTRL_IMX6Q | 847 | select PINCTRL_IMX6Q |
847 | select USE_OF | 848 | select USE_OF |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 0bb855525fe8..d5e88c0d5e6c 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -152,7 +152,7 @@ enum mx6q_clks { | |||
152 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | 152 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, |
153 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | 153 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, |
154 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, | 154 | pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, |
155 | ssi2_ipg, ssi3_ipg, rom, | 155 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, |
156 | clk_max | 156 | clk_max |
157 | }; | 157 | }; |
158 | 158 | ||
@@ -198,6 +198,9 @@ int __init mx6q_clocks_init(void) | |||
198 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x2000, 0x3); | 198 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x2000, 0x3); |
199 | clk[pll8_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll8_enet", "osc", base + 0xe0, 0x182000, 0x3); | 199 | clk[pll8_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll8_enet", "osc", base + 0xe0, 0x182000, 0x3); |
200 | 200 | ||
201 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); | ||
202 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); | ||
203 | |||
201 | /* name parent_name reg idx */ | 204 | /* name parent_name reg idx */ |
202 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | 205 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); |
203 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); | 206 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); |
@@ -401,6 +404,12 @@ int __init mx6q_clocks_init(void) | |||
401 | clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand"); | 404 | clk_register_clkdev(clk[gpmi_bch], "gpmi_bch", "112000.gpmi-nand"); |
402 | clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand"); | 405 | clk_register_clkdev(clk[gpmi_apb], "gpmi_apb", "112000.gpmi-nand"); |
403 | clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand"); | 406 | clk_register_clkdev(clk[gpmi_io], "gpmi_io", "112000.gpmi-nand"); |
407 | clk_register_clkdev(clk[usboh3], NULL, "2184000.usb"); | ||
408 | clk_register_clkdev(clk[usboh3], NULL, "2184200.usb"); | ||
409 | clk_register_clkdev(clk[usboh3], NULL, "2184400.usb"); | ||
410 | clk_register_clkdev(clk[usboh3], NULL, "2184600.usb"); | ||
411 | clk_register_clkdev(clk[usbphy1], NULL, "20c9000.usbphy"); | ||
412 | clk_register_clkdev(clk[usbphy2], NULL, "20ca000.usbphy"); | ||
404 | clk_register_clkdev(clk[uart_serial], "per", "2020000.serial"); | 413 | clk_register_clkdev(clk[uart_serial], "per", "2020000.serial"); |
405 | clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial"); | 414 | clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial"); |
406 | clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial"); | 415 | clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial"); |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index b47e98b7d539..140f55010630 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pinctrl/machine.h> | 24 | #include <linux/pinctrl/machine.h> |
25 | #include <linux/phy.h> | 25 | #include <linux/phy.h> |
26 | #include <linux/micrel_phy.h> | 26 | #include <linux/micrel_phy.h> |
27 | #include <linux/mfd/anatop.h> | ||
27 | #include <asm/smp_twd.h> | 28 | #include <asm/smp_twd.h> |
28 | #include <asm/hardware/cache-l2x0.h> | 29 | #include <asm/hardware/cache-l2x0.h> |
29 | #include <asm/hardware/gic.h> | 30 | #include <asm/hardware/gic.h> |
@@ -113,6 +114,45 @@ static void __init imx6q_sabrelite_init(void) | |||
113 | imx6q_sabrelite_cko1_setup(); | 114 | imx6q_sabrelite_cko1_setup(); |
114 | } | 115 | } |
115 | 116 | ||
117 | static void __init imx6q_usb_init(void) | ||
118 | { | ||
119 | struct device_node *np; | ||
120 | struct platform_device *pdev = NULL; | ||
121 | struct anatop *adata = NULL; | ||
122 | |||
123 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); | ||
124 | if (np) | ||
125 | pdev = of_find_device_by_node(np); | ||
126 | if (pdev) | ||
127 | adata = platform_get_drvdata(pdev); | ||
128 | if (!adata) { | ||
129 | if (np) | ||
130 | of_node_put(np); | ||
131 | return; | ||
132 | } | ||
133 | |||
134 | #define HW_ANADIG_USB1_CHRG_DETECT 0x000001b0 | ||
135 | #define HW_ANADIG_USB2_CHRG_DETECT 0x00000210 | ||
136 | |||
137 | #define BM_ANADIG_USB_CHRG_DETECT_EN_B 0x00100000 | ||
138 | #define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B 0x00080000 | ||
139 | |||
140 | /* | ||
141 | * The external charger detector needs to be disabled, | ||
142 | * or the signal at DP will be poor | ||
143 | */ | ||
144 | anatop_write_reg(adata, HW_ANADIG_USB1_CHRG_DETECT, | ||
145 | BM_ANADIG_USB_CHRG_DETECT_EN_B | ||
146 | | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B, | ||
147 | ~0); | ||
148 | anatop_write_reg(adata, HW_ANADIG_USB2_CHRG_DETECT, | ||
149 | BM_ANADIG_USB_CHRG_DETECT_EN_B | | ||
150 | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B, | ||
151 | ~0); | ||
152 | |||
153 | of_node_put(np); | ||
154 | } | ||
155 | |||
116 | static void __init imx6q_init_machine(void) | 156 | static void __init imx6q_init_machine(void) |
117 | { | 157 | { |
118 | /* | 158 | /* |
@@ -127,6 +167,7 @@ static void __init imx6q_init_machine(void) | |||
127 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 167 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
128 | 168 | ||
129 | imx6q_pm_init(); | 169 | imx6q_pm_init(); |
170 | imx6q_usb_init(); | ||
130 | } | 171 | } |
131 | 172 | ||
132 | static void __init imx6q_map_io(void) | 173 | static void __init imx6q_map_io(void) |