Skip to content

Commit 6504297

Browse files
fschrempfShawn Guo
authored andcommitted
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: 946ab10 ("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>
1 parent 1eb42ba commit 6504297

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

arch/arm64/boot/dts/freescale/imx8mp-kontron-bl-osm-s.dts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,20 @@
1616
ethernet1 = &eqos;
1717
};
1818

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";
2123
pinctrl-names = "default";
2224
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+
};
2433
};
2534

2635
leds {
@@ -244,9 +253,15 @@
244253
hnp-disable;
245254
srp-disable;
246255
dr_mode = "otg";
247-
extcon = <&extcon_usbc>;
248256
usb-role-switch;
257+
role-switch-default-mode = "peripheral";
249258
status = "okay";
259+
260+
port {
261+
usb3_dwc: endpoint {
262+
remote-endpoint = <&usb_dr_connector>;
263+
};
264+
};
250265
};
251266

252267
&usb_dwc3_1 {
@@ -273,7 +288,6 @@
273288
};
274289

275290
&usb3_phy0 {
276-
vbus-supply = <&reg_usb1_vbus>;
277291
status = "okay";
278292
};
279293

0 commit comments

Comments
 (0)