]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm64: zynqmp: Wire gpio-delay driver for USB hub reset
authorMichal Simek <michal.simek@amd.com>
Tue, 3 Feb 2026 07:52:32 +0000 (08:52 +0100)
committerMichal Simek <michal.simek@amd.com>
Fri, 13 Feb 2026 07:16:25 +0000 (08:16 +0100)
USB hub requires longer delay to get out of the reset to work properly
that's why use gpio-delay to ensure enough waiting time.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e206e3ab2ad266935b81f5e9d3af2ed47b866826.1770105146.git.michal.simek@amd.com
arch/arm/dts/zynqmp-sck-kd-g-revA.dtso
arch/arm/dts/zynqmp-sck-kr-g-revA.dtso
arch/arm/dts/zynqmp-sck-kr-g-revB.dtso
arch/arm/dts/zynqmp-sck-kv-g-revA.dtso
arch/arm/dts/zynqmp-sck-kv-g-revB.dtso

index 832dc5ab245802008da27607cc556c2aab94927c..8342479b108acdbf3844c36596f65b491ca46429 100644 (file)
@@ -3,7 +3,7 @@
  * dts file for KD240 revA Carrier Card
  *
  * Copyright (C) 2021 - 2022, Xilinx, Inc.
- * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc.
+ * Copyright (C) 2022 - 2026, Advanced Micro Devices, Inc.
  *
  * Michal Simek <michal.simek@amd.com>
  */
                #clock-cells = <0>;
                clock-frequency = <25000000>;
        };
+
+       slg_delay: enable-delay {
+               compatible = "gpio-delay";
+               #gpio-cells = <3>;
+               gpio-controller;
+               gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+       };
 };
 
 &can0 {
                reg = <1>;
                peer-hub = <&hub_3_0>;
                i2c-bus = <&hub>;
-               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                reg = <2>;
                peer-hub = <&hub_2_0>;
                i2c-bus = <&hub>;
-               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 };
 
index 532f6bf92bc5be0a7ad667f88b930b59e5538290..db042ffb4f3678d9a190de7ac34cf40139b108cd 100644 (file)
                        };
                };
        };
+
+       slg_delay: enable-delay {
+               compatible = "gpio-delay";
+               #gpio-cells = <3>;
+               gpio-controller;
+               gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>,
+                       <&slg7xl45106 4 GPIO_ACTIVE_LOW>;
+       };
 };
 
 &i2c1 { /* I2C_SCK C26/C27 - MIO from SOM */
                reg = <1>;
                peer-hub = <&hub_3_0>;
                i2c-bus = <&hub_1>;
-               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                reg = <2>;
                peer-hub = <&hub_2_0>;
                i2c-bus = <&hub_1>;
-               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 };
 
                reg = <1>;
                peer-hub = <&hub1_3_0>;
                i2c-bus = <&hub_2>;
-               reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 1 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                reg = <2>;
                peer-hub = <&hub1_2_0>;
                i2c-bus = <&hub_2>;
-               reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 1 10000 10000>;
        };
 };
 
index 458d79e8119226db71c098e54a534fc63987c72b..e3567d0abfe0a945f76ae501ebe6999e0f3137d0 100644 (file)
                        };
                };
        };
+
+       slg_delay: enable-delay {
+               compatible = "gpio-delay";
+               #gpio-cells = <3>;
+               gpio-controller;
+               gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>,
+                       <&slg7xl45106 4 GPIO_ACTIVE_LOW>;
+       };
 };
 
 &i2c1 { /* I2C_SCK C26/C27 - MIO from SOM */
                reg = <1>;
                peer-hub = <&hub_3_0>;
                i2c-bus = <&hub_1>;
-               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                reg = <2>;
                peer-hub = <&hub_2_0>;
                i2c-bus = <&hub_1>;
-               reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 };
 
                reg = <1>;
                peer-hub = <&hub1_3_0>;
                i2c-bus = <&hub_2>;
-               reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 1 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                reg = <2>;
                peer-hub = <&hub1_2_0>;
                i2c-bus = <&hub_2>;
-               reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 1 10000 10000>;
        };
 };
 
index e7417af8ae01c19ff101c0bb5b55c665aa420b43..f93c7460a5520ebaa567197fac1dc595a3d89f52 100644 (file)
@@ -3,7 +3,7 @@
  * dts file for KV260 revA Carrier Card
  *
  * (C) Copyright 2020 - 2022, Xilinx, Inc.
- * (C) Copyright 2022 - 2025, Advanced Micro Devices, Inc.
+ * (C) Copyright 2022 - 2026, Advanced Micro Devices, Inc.
  *
  * SD level shifter:
  * "A" - A01 board un-modified (NXP)
                        };
                };
        };
+
+       slg_delay: enable-delay {
+               compatible = "gpio-delay";
+               #gpio-cells = <3>;
+               gpio-controller;
+               gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+       };
 };
 
 &i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
                compatible = "usb424,2744";
                reg = <1>;
                peer-hub = <&hub_3_0>;
-               reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                compatible = "usb424,5744";
                reg = <2>;
                peer-hub = <&hub_2_0>;
-               reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 };
 
index 7a05180e58b40d926a0e63bce0faef444586d5af..70de6933600ea9b1be39ee06790047bc9b6d1f87 100644 (file)
                        };
                };
        };
+
+       slg_delay: enable-delay {
+               compatible = "gpio-delay";
+               #gpio-cells = <3>;
+               gpio-controller;
+               gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+       };
 };
 
 &i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
                reg = <1>;
                peer-hub = <&hub_3_0>;
                i2c-bus = <&hub>;
-               reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 
        /* 3.0 hub on port 2 */
                reg = <2>;
                peer-hub = <&hub_2_0>;
                i2c-bus = <&hub>;
-               reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&slg_delay 0 10000 10000>;
        };
 };