]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm64: zynqmp: Add i2c-bus property for usb5744
authorPiyush Mehta <piyush.mehta@xilinx.com>
Fri, 8 Oct 2021 07:58:48 +0000 (13:28 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 6 Dec 2021 12:32:48 +0000 (13:32 +0100)
Added "i2c-bus" property feature in usb5744 driver for I2C slaves
devices. Based on the I2C handler driver is initialize the I2C device
and trigger GPIO reset. If the property does not present then the
usb5744 driver acts as a non-I2C platform device.

Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
arch/arm/dts/zynqmp-sck-kr-g-revA.dts

index 998aaeef48979e3d5188943b1e9a2fa8ace47df7..7b8b8f195a6c02c51d5b9cbbdb0b339ede84c8fc 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x74>;
-               i2c@0 {
+               usbhub_i2c0: i2c@0 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0>;
-                       usbhub0: usb5744@2d { /* u43 */
-                               compatible = "microchip,usb5744";
-                               reg = <0x2d>;
-                               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_HIGH>;
-                       };
                };
-               i2c@1 {
+               usbhub_i2c1: i2c@1 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <1>;
-                       usbhub1: usb5744@2d { /* u84 */
-                               compatible = "microchip,usb5744";
-                               reg = <0x2d>;
-                               reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_HIGH>;
-                       };
                };
                /* Bus 2/3 are not connected */
        };
        phy-names = "usb3-phy";
        phys = <&psgtr 2 PHY_TYPE_USB3 0 2>;
        reset-gpio = <&gpio 76 0>;
+
+       usbhub0: usb5744@2d { /* u43 */
+               i2c-bus = <&usbhub_i2c0>;
+               compatible = "microchip,usb5744";
+               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_HIGH>;
+       };
+
        /* usb2244 - u38 - SD_RESET_B via u19 */
        usbsd: usb2244 {
                compatible = "microchip,usb2244";
        phy-names = "usb3-phy";
        phys = <&psgtr 3 PHY_TYPE_USB3 1 1>;
        reset-gpio = <&gpio 77 0>;
+
+       usbhub1: usb5744@2d { /* u84 */
+               i2c-bus = <&usbhub_i2c1>;
+               compatible = "microchip,usb5744";
+               reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &dwc3_1 {