Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug console: Add support for extcon for WB8 #254

Open
wants to merge 1 commit into
base: dev/v6.8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard84x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -1237,7 +1242,6 @@
wirenboard,mux-on-id-pin;

dr_mode = "otg";

status = "okay";
};

Expand All @@ -1251,6 +1255,7 @@

&usbotg {
dr_mode = "peripheral";
extcon = <&extcon_debug_console>;
status = "okay";
};

Expand Down
8 changes: 7 additions & 1 deletion arch/arm64/boot/dts/allwinner/sun50i-h616-wirenboard85x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -1208,6 +1213,7 @@

&usbotg {
dr_mode = "peripheral";
extcon = <&extcon_debug_console>;
status = "okay";
};

Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/configs/wb8-bootlet.config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/configs/wb8.config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down