Skip to contentSkip to conversation

arm64: dts: ti: k3-j722s-evm: Fix USB2.0_MUX_SEL hog polarity for Type-C

PATCH In review MD Danish Anwar 2 participants 2 messages Nov 20

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Fixes 65ba2a6e77e9 ("arm64: dts: ti: k3-j722s-evm: Fix USB gpio-hog level for Type-C")
---
 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
index c6486cf5a05c..80a915925c1c 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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 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.

Quoted 8 lines

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

Fixes 65ba2a6e77e9 ("arm64: dts: ti: k3-j722s-evm: Fix USB gpio-hog level for Type-C")

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
index c6486cf5a05c..80a915925c1c 100644
@@ -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