summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Cainikovs <andrejs.cainikovs@toradex.com>2023-10-17 13:31:52 +0200
committerAndrejs Cainikovs <andrejs.cainikovs@toradex.com>2023-10-20 17:37:51 +0200
commite5b76f7d318e1b08c843fca206908c88af53603b (patch)
treef79ba135b5be4c8ef1383c649c860cdf6698c033
parent7234fc0743e32292de68a384c3d9880cba51d4c5 (diff)
apalis-imx8: add USBH_EN gpio hog
USB host interface is not working on some Apalis Toradex carrier boards with Apalis iMX8 SoM. This is due to USBH_EN pin, which powers USB peripherals, having a strong pull-down on some boards, and a weak pull-down on the others. This USBH_EN pin is left unconfigured, which means it is in its default state at cold boot: input with a strong pull-up. As a result, carrier boards with a weak pull-down have this signal high enough to trigger power delivery to USB peripherals, and opposite - boards with strong pull-down on USBH_EN have this signal below the threshold needed to trigger USB power delivery. This change configures the USBH_EN pin as gpio hog, fixing this issue for all Apalis carrier boards regardless of pull-down resistor value. Also, update apalis-imx8_defconfig via savedefconfig. Upstream-Status: Submitted [https://lore.kernel.org/all/20231020152516.57338-1-andrejs.cainikovs@gmail.com/] Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
-rw-r--r--arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi6
-rw-r--r--configs/apalis-imx8_defconfig1
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
index 29dd040240..2dad590d85 100644
--- a/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
+++ b/arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
@@ -135,6 +135,12 @@
&gpio4 {
u-boot,dm-pre-proper;
+
+ usbh_en {
+ gpio-hog;
+ gpios = <4 GPIO_ACTIVE_HIGH>;
+ output-high;
+ };
};
&gpio5 {
diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index 1e34fee578..8ff0792ccc 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -61,6 +61,7 @@ CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x82800000
CONFIG_FASTBOOT_BUF_SIZE=0x08000000
CONFIG_FASTBOOT_FLASH=y
+CONFIG_GPIO_HOG=y
CONFIG_MXC_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_IMX_LPI2C=y