arm64: dts: ti: k3-j722s-evm: Fix USB2.0_MUX_SEL hog polarity for Type-C
Subsystems (2)
PATCH 1/1 arm64: dts: ti: k3-j722s-evm: Fix USB2.0_MUX_SEL hog polarity for Type-C
According to the "USB Type-C Mux" section of the J722S EVM Schematic within the Evaluation Module Design Files package [0], the Type-C connector is connected to USB0 when USB2.0_MUX_SEL, Pin P05 of GPIO Expander 1 (I2C0/0x23), is low.
Commit 65ba2a6e77e9 ("arm64: dts: ti: k3-j722s-evm: Fix USB gpio-hog level for Type-C") changed the p05-hog from output-high to output-low while keeping GPIO_ACTIVE_LOW. As the polarity flag is applied before the level, output-low with GPIO_ACTIVE_LOW drives the pin physically high. USB0 then does not work on the Type-C port: with the gadget bound, the UDC stays "not attached" and the host sees no device.
Use GPIO_ACTIVE_HIGH with output-low, so that P05 is driven physically low as the schematic requires to select Type-C, and the devicetree reads the same as the schematic.
[0]: https://www.ti.com/lit/zip/sprr495
--- arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-j722s-evm.dts +1 -1
@@ -586,7 +586,7 @@ exp1: gpio@23 { p05-hog { /* P05 - USB2.0_MUX_SEL */ gpio-hog; - gpios = <5 GPIO_ACTIVE_LOW>; + gpios = <5 GPIO_ACTIVE_HIGH>; output-low; };
base-commit: adcad7f4e6332cff3d6d7165f41584899f598534
Signature · 1 line
2.34.1
Quoted 12 lines · MD Danish Anwar
According to the "USB Type-C Mux" section of the J722S EVM Schematic within the Evaluation Module Design Files package [0], the Type-C connector is connected to USB0 when USB2.0_MUX_SEL, Pin P05 of GPIO Expander 1 (I2C0/0x23), is low.
Commit
65ba2a6e77e9("arm64: dts: ti: k3-j722s-evm: Fix USB gpio-hog level for Type-C") changed the p05-hog from output-high to output-low while keepingGPIO_ACTIVE_LOW. As the polarity flag is applied before the level, output-low withGPIO_ACTIVE_LOWdrives the pin physically high. USB0 then does not work on the Type-C port: with the gadget bound, the UDC stays "not attached" and the host sees no device.
Quoted 8 lines
Use
GPIO_ACTIVE_HIGHwith output-low, so that P05 is driven physically low as the schematic requires to select Type-C, and the devicetree reads the same as the schematic.[0]: https://www.ti.com/lit/zip/sprr495
Fixes 65ba2a6e77e9 ("arm64: dts: ti: k3-j722s-evm: Fix USB gpio-hog level for Type-C")Signed-off-by MD Danish Anwar <[email protected]>
Thank you for fixing this.
Regards,
Siddharth.
Quoted 19 lines
--- arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/ti/k3-j722s-evm.dts +1
-1@@ -586,7 +586,7 @@ exp1: gpio@23 { p05-hog { /* P05 - USB2.0_MUX_SEL */ gpio-hog; - gpios = <5 GPIO_ACTIVE_LOW>; + gpios = <5 GPIO_ACTIVE_HIGH>; output-low; };base-commit:
adcad7f4e6332cff3d6d7165f41584899f598534