[PATCH v1 3/3] colibri-imx8x: configure usb hub to bypass mode

Andrejs Cainikovs andrejs.cainikovs at gmail.com
Wed Dec 20 11:38:11 CET 2023


From: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>

This change configures Toradex Colibri iMX8X SoM USB
hub to bypass mode, and brings out of the reset state.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>
---
 arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi | 15 +++++++++++++++
 arch/arm/dts/fsl-imx8qxp-colibri.dts         |  2 --
 configs/colibri-imx8x_defconfig              |  1 +
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
index a6af4e5e2b7..6ab6b1f9ee6 100644
--- a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
+++ b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
@@ -84,6 +84,21 @@
 	bootph-some-ram;
 };
 
+&gpio_expander_43 {
+	usb-bypass-n-hog {
+		gpio-hog;
+		gpios = <5 GPIO_ACTIVE_LOW>;
+		line-name = "usb-bypass-n";
+		output-high;
+	};
+	usb-reset-n-hog {
+		gpio-hog;
+		gpios = <4 GPIO_ACTIVE_LOW>;
+		line-name = "usb-reset-n";
+		output-low;
+	};
+};
+
 &gpio0 {
 	bootph-some-ram;
 };
diff --git a/arch/arm/dts/fsl-imx8qxp-colibri.dts b/arch/arm/dts/fsl-imx8qxp-colibri.dts
index 295090ad711..b479921aff9 100644
--- a/arch/arm/dts/fsl-imx8qxp-colibri.dts
+++ b/arch/arm/dts/fsl-imx8qxp-colibri.dts
@@ -319,8 +319,6 @@
 		gpio-controller;
 		#gpio-cells = <2>;
 		reg = <0x43>;
-		initial_io_dir = <0xff>;
-		initial_output = <0x05>;
 	};
 };
 
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig
index 13c16bde3d8..ce60c509582 100644
--- a/configs/colibri-imx8x_defconfig
+++ b/configs/colibri-imx8x_defconfig
@@ -65,6 +65,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_ENV=y
 CONFIG_CLK_IMX8=y
 CONFIG_CPU=y
+CONFIG_GPIO_HOG=y
 CONFIG_FXL6408_GPIO=y
 CONFIG_MXC_GPIO=y
 CONFIG_DM_I2C=y
-- 
2.34.1



More information about the U-Boot mailing list