Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: dts: imx8mp-kontron: Fix USB OTG role switching

The VBUS supply regulator is currently assigned to the PHY node.
This causes the VBUS to be always on, even when the controller
needs to be switched to peripheral mode.

Fix the OTG role switching by adding a connector node and moving
the VBUS supply regulator to that node. This way the VBUS gets
correctly switched according to the current role.

Fixes: 946ab10e3f40 ("arm64: dts: Add support for Kontron OSM-S i.MX8MP SoM and BL carrier board")
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Frieder Schrempf and committed by
Shawn Guo
65042978 1eb42bac

+19 -5
+19 -5
arch/arm64/boot/dts/freescale/imx8mp-kontron-bl-osm-s.dts
··· 16 16 ethernet1 = &eqos; 17 17 }; 18 18 19 - extcon_usbc: usbc { 20 - compatible = "linux,extcon-usb-gpio"; 19 + connector { 20 + compatible = "gpio-usb-b-connector", "usb-b-connector"; 21 + id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; 22 + label = "Type-C"; 21 23 pinctrl-names = "default"; 22 24 pinctrl-0 = <&pinctrl_usb1_id>; 23 - id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; 25 + type = "micro"; 26 + vbus-supply = <&reg_usb1_vbus>; 27 + 28 + port { 29 + usb_dr_connector: endpoint { 30 + remote-endpoint = <&usb3_dwc>; 31 + }; 32 + }; 24 33 }; 25 34 26 35 leds { ··· 253 244 hnp-disable; 254 245 srp-disable; 255 246 dr_mode = "otg"; 256 - extcon = <&extcon_usbc>; 257 247 usb-role-switch; 248 + role-switch-default-mode = "peripheral"; 258 249 status = "okay"; 250 + 251 + port { 252 + usb3_dwc: endpoint { 253 + remote-endpoint = <&usb_dr_connector>; 254 + }; 255 + }; 259 256 }; 260 257 261 258 &usb_dwc3_1 { ··· 288 273 }; 289 274 290 275 &usb3_phy0 { 291 - vbus-supply = <&reg_usb1_vbus>; 292 276 status = "okay"; 293 277 }; 294 278