Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm: dts: lpc32xx: move USB controller subdevices into own device node

NXP LPC32xx SoC has one USB OTG controller, which is supposed to work
with an external phy (default is NXP ISP1301).

Practically the USB controller contains 5 subdevices:
- host controller 0x3102 0000 -- 0x3102 00FF
- OTG controller 0x3102 0100 -- 0x3102 01FF
- device controller 0x3102 0200 -- 0x3102 02FF
- I2C controller 0x3102 0300 -- 0x3102 03FF
- clock controller 0x3102 0F00 -- 0x3102 0FFF

The USB controller can be considered as a "bus", because the
subdevices above are relatively independent, for example I2C
controller is the same as other two general purpose I2C controllers
found on SoC.

The change is not intended to modify any logic, but it rearranges
existing device nodes, in future it is planned to add a USB clock
controller device node into the same group.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

+60 -67
+15 -22
arch/arm/boot/dts/ea3250.dts
··· 31 31 use-iram; 32 32 }; 33 33 34 - /* Here, choose exactly one from: ohci, usbd */ 35 - ohci@31020000 { 36 - transceiver = <&isp1301>; 37 - status = "okay"; 38 - }; 39 - 40 - /* 41 - usbd@31020000 { 42 - transceiver = <&isp1301>; 43 - status = "okay"; 44 - }; 45 - */ 46 - 47 34 /* 128MB Flash via SLC NAND controller */ 48 35 slc: flash@20020000 { 49 36 status = "okay"; ··· 115 128 116 129 i2c2: i2c@400A8000 { 117 130 clock-frequency = <100000>; 118 - }; 119 - 120 - i2cusb: i2c@31020300 { 121 - clock-frequency = <100000>; 122 - 123 - isp1301: usb-transceiver@2d { 124 - compatible = "nxp,isp1301"; 125 - reg = <0x2d>; 126 - }; 127 131 }; 128 132 129 133 sd@20098000 { ··· 255 277 gpios = <&pca9532 15 0>; 256 278 default-state = "off"; 257 279 }; 280 + }; 281 + }; 282 + 283 + /* Here, choose exactly one from: ohci, usbd */ 284 + &ohci /* &usbd */ { 285 + transceiver = <&isp1301>; 286 + status = "okay"; 287 + }; 288 + 289 + &i2cusb { 290 + clock-frequency = <100000>; 291 + 292 + isp1301: usb-transceiver@2d { 293 + compatible = "nxp,isp1301"; 294 + reg = <0x2d>; 258 295 }; 259 296 };
+30 -23
arch/arm/boot/dts/lpc32xx.dtsi
··· 57 57 interrupts = <0x1c 0>; 58 58 }; 59 59 60 - /* 61 - * Enable either ohci or usbd (gadget)! 62 - */ 63 - ohci: ohci@31020000 { 64 - compatible = "nxp,ohci-nxp", "usb-ohci"; 65 - reg = <0x31020000 0x300>; 66 - interrupts = <0x3b 0>; 67 - status = "disabled"; 68 - }; 60 + usb { 61 + #address-cells = <1>; 62 + #size-cells = <1>; 63 + compatible = "simple-bus"; 64 + ranges = <0x0 0x31020000 0x00001000>; 69 65 70 - usbd: usbd@31020000 { 71 - compatible = "nxp,lpc3220-udc"; 72 - reg = <0x31020000 0x300>; 73 - interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>; 74 - status = "disabled"; 66 + /* 67 + * Enable either ohci or usbd (gadget)! 68 + */ 69 + ohci: ohci@0 { 70 + compatible = "nxp,ohci-nxp", "usb-ohci"; 71 + reg = <0x0 0x300>; 72 + interrupts = <0x3b 0>; 73 + status = "disabled"; 74 + }; 75 + 76 + usbd: usbd@0 { 77 + compatible = "nxp,lpc3220-udc"; 78 + reg = <0x0 0x300>; 79 + interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>; 80 + status = "disabled"; 81 + }; 82 + 83 + i2cusb: i2c@300 { 84 + compatible = "nxp,pnx-i2c"; 85 + reg = <0x300 0x100>; 86 + interrupts = <0x3f 0>; 87 + #address-cells = <1>; 88 + #size-cells = <0>; 89 + pnx,timeout = <0x64>; 90 + }; 75 91 }; 76 92 77 93 clcd: clcd@31040000 { ··· 222 206 reg = <0x400E8000 0x78>; 223 207 status = "disabled"; 224 208 #pwm-cells = <2>; 225 - }; 226 - 227 - i2cusb: i2c@31020300 { 228 - compatible = "nxp,pnx-i2c"; 229 - reg = <0x31020300 0x100>; 230 - interrupts = <0x3f 0>; 231 - #address-cells = <1>; 232 - #size-cells = <0>; 233 - pnx,timeout = <0x64>; 234 209 }; 235 210 }; 236 211
+15 -22
arch/arm/boot/dts/phy3250.dts
··· 31 31 use-iram; 32 32 }; 33 33 34 - /* Here, choose exactly one from: ohci, usbd */ 35 - ohci@31020000 { 36 - transceiver = <&isp1301>; 37 - status = "okay"; 38 - }; 39 - 40 - /* 41 - usbd@31020000 { 42 - transceiver = <&isp1301>; 43 - status = "okay"; 44 - }; 45 - */ 46 - 47 34 clcd@31040000 { 48 35 status = "okay"; 49 36 }; ··· 110 123 clock-frequency = <100000>; 111 124 }; 112 125 113 - i2cusb: i2c@31020300 { 114 - clock-frequency = <100000>; 115 - 116 - isp1301: usb-transceiver@2c { 117 - compatible = "nxp,isp1301"; 118 - reg = <0x2c>; 119 - }; 120 - }; 121 - 122 126 ssp0: ssp@20084000 { 123 127 #address-cells = <1>; 124 128 #size-cells = <0>; ··· 176 198 gpios = <&gpio 5 14 0>; /* GPO_P3 14, GPIO 93, active high */ 177 199 linux,default-trigger = "heartbeat"; 178 200 }; 201 + }; 202 + }; 203 + 204 + /* Here, choose exactly one from: ohci, usbd */ 205 + &ohci /* &usbd */ { 206 + transceiver = <&isp1301>; 207 + status = "okay"; 208 + }; 209 + 210 + &i2cusb { 211 + clock-frequency = <100000>; 212 + 213 + isp1301: usb-transceiver@2c { 214 + compatible = "nxp,isp1301"; 215 + reg = <0x2c>; 179 216 }; 180 217 };