arm: dts: lpc32xx: move USB controller subdevices into own device node
authorVladimir Zapolskiy <vz@mleia.com>
Sat, 17 Oct 2015 21:35:57 +0000 (00:35 +0300)
committerVladimir Zapolskiy <vz@mleia.com>
Wed, 18 Nov 2015 16:01:27 +0000 (18:01 +0200)
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>
arch/arm/boot/dts/ea3250.dts
arch/arm/boot/dts/lpc32xx.dtsi
arch/arm/boot/dts/phy3250.dts

index 392430b25154db4e9254a68e24ee33034331834f..a4a281fe82af3698c89f23b13941796616b56bc3 100644 (file)
                        use-iram;
                };
 
-               /* Here, choose exactly one from: ohci, usbd */
-               ohci@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-
-/*
-               usbd@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-*/
-
                /* 128MB Flash via SLC NAND controller */
                slc: flash@20020000 {
                        status = "okay";
                                clock-frequency = <100000>;
                        };
 
-                       i2cusb: i2c@31020300 {
-                               clock-frequency = <100000>;
-
-                               isp1301: usb-transceiver@2d {
-                                       compatible = "nxp,isp1301";
-                                       reg = <0x2d>;
-                               };
-                       };
-
                        sd@20098000 {
                                wp-gpios = <&pca9532 5 0>;
                                cd-gpios = <&pca9532 4 0>;
                };
        };
 };
+
+/* Here, choose exactly one from: ohci, usbd */
+&ohci /* &usbd */ {
+       transceiver = <&isp1301>;
+       status = "okay";
+};
+
+&i2cusb {
+       clock-frequency = <100000>;
+
+       isp1301: usb-transceiver@2d {
+               compatible = "nxp,isp1301";
+               reg = <0x2d>;
+       };
+};
index ba91b203c8c1e9975a3653524492737a79bfafc0..c85cf979725e0c5f83c2570014605cc7da4ad096 100644 (file)
                        interrupts = <0x1c 0>;
                };
 
-               /*
-                * Enable either ohci or usbd (gadget)!
-                */
-               ohci: ohci@31020000 {
-                       compatible = "nxp,ohci-nxp", "usb-ohci";
-                       reg = <0x31020000 0x300>;
-                       interrupts = <0x3b 0>;
-                       status = "disabled";
-               };
+               usb {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       ranges = <0x0 0x31020000 0x00001000>;
 
-               usbd: usbd@31020000 {
-                       compatible = "nxp,lpc3220-udc";
-                       reg = <0x31020000 0x300>;
-                       interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>;
-                       status = "disabled";
+                       /*
+                        * Enable either ohci or usbd (gadget)!
+                        */
+                       ohci: ohci@0 {
+                               compatible = "nxp,ohci-nxp", "usb-ohci";
+                               reg = <0x0 0x300>;
+                               interrupts = <0x3b 0>;
+                               status = "disabled";
+                       };
+
+                       usbd: usbd@0 {
+                               compatible = "nxp,lpc3220-udc";
+                               reg = <0x0 0x300>;
+                               interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>;
+                               status = "disabled";
+                       };
+
+                       i2cusb: i2c@300 {
+                               compatible = "nxp,pnx-i2c";
+                               reg = <0x300 0x100>;
+                               interrupts = <0x3f 0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pnx,timeout = <0x64>;
+                       };
                };
 
                clcd: clcd@31040000 {
                                status = "disabled";
                                #pwm-cells = <2>;
                        };
-
-                       i2cusb: i2c@31020300 {
-                               compatible = "nxp,pnx-i2c";
-                               reg = <0x31020300 0x100>;
-                               interrupts = <0x3f 0>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               pnx,timeout = <0x64>;
-                       };
                };
 
                fab {
index 79a20f7730f333ecb1c3b288ed3f0052d64c0d27..7d253bb6265ac13e1e478e2f46270f2df1a63b5b 100644 (file)
                        use-iram;
                };
 
-               /* Here, choose exactly one from: ohci, usbd */
-               ohci@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-
-/*
-               usbd@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-*/
-
                clcd@31040000 {
                        status = "okay";
                };
                                clock-frequency = <100000>;
                        };
 
-                       i2cusb: i2c@31020300 {
-                               clock-frequency = <100000>;
-
-                               isp1301: usb-transceiver@2c {
-                                       compatible = "nxp,isp1301";
-                                       reg = <0x2c>;
-                               };
-                       };
-
                        ssp0: ssp@20084000 {
                                #address-cells = <1>;
                                #size-cells = <0>;
                };
        };
 };
+
+/* Here, choose exactly one from: ohci, usbd */
+&ohci /* &usbd */ {
+       transceiver = <&isp1301>;
+       status = "okay";
+};
+
+&i2cusb {
+       clock-frequency = <100000>;
+
+       isp1301: usb-transceiver@2c {
+               compatible = "nxp,isp1301";
+               reg = <0x2c>;
+       };
+};