From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: hyx0329 Date: Mon, 2 Jun 2025 07:33:51 +0000 Subject: Add dp alt mode to pinebook pro Signed-off-by: hyx0329 --- arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 36 +++++++++- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts index 111111111111..222222222222 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts @@ -373,6 +373,14 @@ mains_charger: dc-charger { pinctrl-names = "default"; pinctrl-0 = <&dc_det_pin>; }; + + typec_extcon_bridge: typec-extcon { + compatible = "linux,typec-extcon-bridge"; + usb-role-switch; + orientation-switch; + mode-switch; + svid = /bits/ 16 <0xff01>; + }; }; &cpu_b0 { @@ -399,6 +407,12 @@ &cpu_l3 { cpu-supply = <&vdd_cpu_l>; }; +&cdn_dp { + status = "okay"; + extcon = <&typec_extcon_bridge>; + phys = <&tcphy0_dp>; +}; + &edp { force-hpd; pinctrl-names = "default"; @@ -692,6 +706,8 @@ fusb0: fusb30x@22 { pinctrl-names = "default"; pinctrl-0 = <&fusb0_int_pin>; vbus-supply = <&vbus_typec>; + usb-role-switch = <&typec_extcon_bridge>; + extcon = <&typec_extcon_bridge>; connector { compatible = "usb-c-connector"; @@ -700,10 +716,19 @@ connector { op-sink-microwatt = <1000000>; power-role = "dual"; sink-pdos = - ; + ; source-pdos = - ; + ; try-power-role = "sink"; + mode-switch = <&typec_extcon_bridge>; + orientation-switch = <&typec_extcon_bridge>; + + altmodes { + dp { + svid = /bits/ 16 <0xff01>; + vdo = <0x1c46>; + }; + }; ports { #address-cells = <1>; @@ -970,6 +995,7 @@ spiflash: flash@0 { }; &tcphy0 { + extcon = <&typec_extcon_bridge>; status = "okay"; }; @@ -1003,6 +1029,8 @@ &tsadc { &u2phy0 { status = "okay"; + extcon = <&typec_extcon_bridge>; + extcon,ignore-usb; u2phy0_otg: otg-port { status = "okay"; @@ -1079,7 +1107,9 @@ &usbdrd3_0 { }; &usbdrd_dwc3_0 { - dr_mode = "host"; + dr_mode = "otg"; + extcon = <&typec_extcon_bridge>; + snps,usb3-phy-reset-quirk; status = "okay"; }; -- Armbian