aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-07-05 08:51:33 -0400
committerFelipe Balbi <balbi@ti.com>2013-08-09 10:35:44 -0400
commit97238b35d5bbb5d5312d83c30a429824b777619f (patch)
tree0c2940aa58416bda0139de29f822b4eefd0cdecc /arch
parente96bdc3dafe471375e2e780e319e3ead2d9ad4a7 (diff)
usb: musb: dsps: use proper child nodes
This moves the two instances from the big node into two child nodes. The glue layer ontop does almost nothing. There is one devices containing the control module for USB (2) phy, (2) usb and later the dma engine. The usb device is the "glue device" which contains the musb device as a child. This is what we do ever since. The new file musb_am335x is just here to prob the new bus and populate child devices. There are a lot of changes to the dsps file as a result of the changes: - musb_core_offset This is gone. The device tree provides memory ressources information for the device there is no need to "fix" things - instances This is gone as well. If we have two instances then we have have two child enabled nodes in the device tree. For instance the SoC in beagle bone has two USB instances but only one has been wired up so there is no need to load and init the second instance since it won't be used. - dsps_glue is now per glue device In the past there was one of this structs but with an array of two and each instance accessed its variable depending on the platform device id. - no unneeded copy of structs I do not know why struct dsps_musb_wrapper is copied but it is not necessary. The same goes for musb_hdrc_platform_data which allocated on demand and then again by platform_device_add_data(). One copy is enough. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/am335x-bone.dts16
-rw-r--r--arch/arm/boot/dts/am335x-evm.dts24
-rw-r--r--arch/arm/boot/dts/am335x-evmsk.dts16
-rw-r--r--arch/arm/boot/dts/am33xx.dtsi97
4 files changed, 139 insertions, 14 deletions
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index 444b4ede0d60..a8907b57c75c 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -120,6 +120,22 @@
120 status = "okay"; 120 status = "okay";
121 }; 121 };
122 122
123 musb: usb@47400000 {
124 status = "okay";
125
126 control@44e10000 {
127 status = "okay";
128 };
129
130 phy@47401300 {
131 status = "okay";
132 };
133
134 usb@47401000 {
135 status = "okay";
136 };
137 };
138
123 i2c0: i2c@44e0b000 { 139 i2c0: i2c@44e0b000 {
124 pinctrl-names = "default"; 140 pinctrl-names = "default";
125 pinctrl-0 = <&i2c0_pins>; 141 pinctrl-0 = <&i2c0_pins>;
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 3aee1a43782d..b2987e03b19f 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -171,6 +171,30 @@
171 }; 171 };
172 }; 172 };
173 173
174 musb: usb@47400000 {
175 status = "okay";
176
177 control@44e10000 {
178 status = "okay";
179 };
180
181 phy@47401300 {
182 status = "okay";
183 };
184
185 phy@47401b00 {
186 status = "okay";
187 };
188
189 usb@47401000 {
190 status = "okay";
191 };
192
193 usb@47401800 {
194 status = "okay";
195 };
196 };
197
174 i2c1: i2c@4802a000 { 198 i2c1: i2c@4802a000 {
175 pinctrl-names = "default"; 199 pinctrl-names = "default";
176 pinctrl-0 = <&i2c1_pins>; 200 pinctrl-0 = <&i2c1_pins>;
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index 0c8ad173d2b0..e92446c6846e 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -207,6 +207,22 @@
207 }; 207 };
208 }; 208 };
209 209
210 musb: usb@47400000 {
211 status = "okay";
212
213 control@44e10000 {
214 status = "okay";
215 };
216
217 phy@47401300 {
218 status = "okay";
219 };
220
221 usb@47401000 {
222 status = "okay";
223 };
224 };
225
210 epwmss2: epwmss@48304000 { 226 epwmss2: epwmss@48304000 {
211 status = "okay"; 227 status = "okay";
212 228
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 38b446ba1ce1..e1e773cd2556 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -26,6 +26,10 @@
26 serial5 = &uart5; 26 serial5 = &uart5;
27 d_can0 = &dcan0; 27 d_can0 = &dcan0;
28 d_can1 = &dcan1; 28 d_can1 = &dcan1;
29 usb0 = &usb0;
30 usb1 = &usb1;
31 phy0 = &usb0_phy;
32 phy1 = &usb1_phy;
29 }; 33 };
30 34
31 cpus { 35 cpus {
@@ -333,21 +337,86 @@
333 status = "disabled"; 337 status = "disabled";
334 }; 338 };
335 339
336 usb@47400000 { 340 usb: usb@47400000 {
337 compatible = "ti,musb-am33xx"; 341 compatible = "ti,am33xx-usb";
338 reg = <0x47400000 0x1000 /* usbss */ 342 reg = <0x47400000 0x1000>;
339 0x47401000 0x800 /* musb instance 0 */ 343 ranges;
340 0x47401800 0x800>; /* musb instance 1 */ 344 #address-cells = <1>;
341 interrupts = <17 /* usbss */ 345 #size-cells = <1>;
342 18 /* musb instance 0 */
343 19>; /* musb instance 1 */
344 multipoint = <1>;
345 num-eps = <16>;
346 ram-bits = <12>;
347 port0-mode = <3>;
348 port1-mode = <3>;
349 power = <250>;
350 ti,hwmods = "usb_otg_hs"; 346 ti,hwmods = "usb_otg_hs";
347 status = "disabled";
348
349 ctrl_mod: control@44e10000 {
350 compatible = "ti,am335x-usb-ctrl-module";
351 reg = <0x44e10620 0x10
352 0x44e10648 0x4>;
353 reg-names = "phy_ctrl", "wakeup";
354 status = "disabled";
355 };
356
357 usb0_phy: phy@47401300 {
358 compatible = "ti,am335x-usb-phy";
359 reg = <0x47401300 0x100>;
360 reg-names = "phy";
361 status = "disabled";
362 ti,ctrl_mod = <&ctrl_mod>;
363 };
364
365 usb0: usb@47401000 {
366 compatible = "ti,musb-am33xx";
367 ranges;
368 #address-cells = <1>;
369 #size-cells = <1>;
370 reg = <0x47401000 0x200>;
371 reg-names = "control";
372 status = "disabled";
373
374 musb0: usb@47401400 {
375 compatible = "mg,musbmhdrc";
376 reg = <0x47401400 0x400>;
377 reg-names = "mc";
378 interrupts = <18>;
379 interrupt-names = "mc";
380 multipoint = <1>;
381 num-eps = <16>;
382 ram-bits = <12>;
383 port-mode = <3>;
384 power = <250>;
385 phys = <&usb0_phy>;
386 };
387 };
388
389 usb1_phy: phy@47401b00 {
390 compatible = "ti,am335x-usb-phy";
391 reg = <0x47401b00 0x100>;
392 reg-names = "phy";
393 status = "disabled";
394 ti,ctrl_mod = <&ctrl_mod>;
395 };
396
397 usb1: usb@47401800 {
398 compatible = "ti,musb-am33xx";
399 ranges;
400 #address-cells = <1>;
401 #size-cells = <1>;
402 reg = <0x47401800 0x200>;
403 reg-names = "control";
404 status = "disabled";
405
406 musb1: usb@47401c00 {
407 compatible = "mg,musbmhdrc";
408 reg = <0x47401c00 0x400>;
409 reg-names = "mc";
410 interrupts = <19>;
411 interrupt-names = "mc";
412 multipoint = <1>;
413 num-eps = <16>;
414 ram-bits = <12>;
415 port-mode = <3>;
416 power = <250>;
417 phys = <&usb1_phy>;
418 };
419 };
351 }; 420 };
352 421
353 epwmss0: epwmss@48300000 { 422 epwmss0: epwmss@48300000 {