apalis-imx8: add USBH_EN gpio hog
Subsystems (2)
PATCH 1/1 apalis-imx8: add USBH_EN gpio hog
From: Andrejs Cainikovs <[email protected]>
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.
--- arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi | 6 ++++++ configs/apalis-imx8_defconfig | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)
arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi +6 -0
@@ -93,6 +93,12 @@ &gpio4 { bootph-some-ram; + + usbh_en { + gpio-hog; + gpios = <4 GPIO_ACTIVE_HIGH>; + output-high; + }; }; &gpio5 {
configs/apalis-imx8_defconfig +2 -1
@@ -21,9 +21,9 @@ CONFIG_SYS_MEMTEST_END=0x89000000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y -CONFIG_OF_SYSTEM_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=1 +CONFIG_OF_SYSTEM_SETUP=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-apalis${variant}-${fdt_board}.dtb" CONFIG_LOG=y
@@ -65,6 +65,7 @@ CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y CONFIG_CLK_IMX8=y CONFIG_CPU=y +CONFIG_GPIO_HOG=y CONFIG_MXC_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_IMX_LPI2C=y
Signature · 1 line
2.34.1
Quoted 17 lines · Andrejs Cainikovs
From: Andrejs Cainikovs <[email protected]>
USB host interface is not working on some Apalis Toradex carrier boards with Apalis iMX8 SoM. This is due to
USBH_ENpin, which powers USB peripherals, having a strong pull-down on some boards, and a weak pull-down on the others. ThisUSBH_ENpin 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 onUSBH_ENhave this signal below the threshold needed to trigger USB power delivery.
This change configures theUSBH_ENpin as gpio hog, fixing this issue for all Apalis carrier boards regardless of pull-down resistor value.
Quoted 3 lines
Also, update apalis-imx8_defconfig via savedefconfig.
Signed-off-by Andrejs Cainikovs <[email protected]>
Quoted 17 lines · Andrejs Cainikovs
From: Andrejs Cainikovs <[email protected]>
USB host interface is not working on some Apalis Toradex carrier boards with Apalis iMX8 SoM. This is due to
USBH_ENpin, which powers USB peripherals, having a strong pull-down on some boards, and a weak pull-down on the others. ThisUSBH_ENpin 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 onUSBH_ENhave this signal below the threshold needed to trigger USB power delivery.
This change configures theUSBH_ENpin as gpio hog, fixing this issue for all Apalis carrier boards regardless of pull-down resistor value.
Quoted 3 lines
Also, update apalis-imx8_defconfig via savedefconfig.
Signed-off-by Andrejs Cainikovs <[email protected]>
Applied, thanks.