diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard84x.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard84x.dtsi index b48d2dd56ef7..907fbc545a21 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard84x.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard84x.dtsi @@ -50,6 +50,11 @@ rtc_onboard_txco = &rtc_onboard_txco; }; + extcon_debug_console: usbc-det { + compatible = "linux,extcon-usb-gpio"; + id-gpios = <&pio PD 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + }; + wirenboard { adc-type = <3>; pwm-buzzer = <1>; @@ -692,7 +697,7 @@ "", "", "", "", /* 24-27 */ "", "", "", "", /* 28-31 */ /* PD */ - "", "", "", "", /* 0-3 */ + "DEBUG CONSOLE DET", "", "", "", /* 0-3 */ "", "", "", "", /* 4-7 */ "", "", "MOD3 RTS", "MOD1 RX", /* 8-11 */ "CAN TXRX ON", "BAT SDA", "MOD4 RX", "RS-485-2 RTS", /* 12-15 */ @@ -1237,7 +1242,6 @@ wirenboard,mux-on-id-pin; dr_mode = "otg"; - status = "okay"; }; @@ -1251,6 +1255,7 @@ &usbotg { dr_mode = "peripheral"; + extcon = <&extcon_debug_console>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard85x.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard85x.dtsi index 7f05ce927b4d..5f9a4697fa3e 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard85x.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard85x.dtsi @@ -49,6 +49,11 @@ rtc_onboard_txco = &rtc_onboard_txco; }; + extcon_debug_console: usbc-det { + compatible = "linux,extcon-usb-gpio"; + id-gpios = <&pio PD 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + }; + wirenboard { adc-type = <3>; pwm-buzzer = <0>; @@ -654,7 +659,7 @@ "", "", "", "", /* 24-27 */ "", "", "", "", /* 28-31 */ /* PD */ - "", "", "", "", /* 0-3 */ + "DEBUG CONSOLE DET", "", "", "", /* 0-3 */ "", "", "", "", /* 4-7 */ "", "", "MOD4 RTS", "", /* 8-11 */ "W1", "BAT SDA", "", "RS-485-2 RTS", /* 12-15 */ @@ -1208,6 +1213,7 @@ &usbotg { dr_mode = "peripheral"; + extcon = <&extcon_debug_console>; status = "okay"; }; diff --git a/arch/arm64/configs/wb8-bootlet.config b/arch/arm64/configs/wb8-bootlet.config index e03ed4262929..cf5af3fc1118 100644 --- a/arch/arm64/configs/wb8-bootlet.config +++ b/arch/arm64/configs/wb8-bootlet.config @@ -92,6 +92,9 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6 # USB CONFIG_USB_CONN_GPIO=y +# EXTCON USB +CONFIG_EXTCON_USB_GPIO=y + # PWM CONFIG_PWM_SUN20I=y diff --git a/arch/arm64/configs/wb8.config b/arch/arm64/configs/wb8.config index e38ef2862085..48bdb476bb29 100644 --- a/arch/arm64/configs/wb8.config +++ b/arch/arm64/configs/wb8.config @@ -160,6 +160,10 @@ CONFIG_PINCTRL_MCP23S08=m # USB CONFIG_USB_CONN_GPIO=y +# EXTCON USB +CONFIG_EXTCON=y +CONFIG_EXTCON_USB_GPIO=y + # PWM CONFIG_PWM_SUN20I=y