Skip to content

Commit

Permalink
arm64: dts: rockchip: pinetab2: Use Type-C extcon bridge
Browse files Browse the repository at this point in the history
Patch originally came from Ondrej Jirman (megous)

I decided to not reorder DTB property to make it readable.
  • Loading branch information
Danct12 committed Nov 23, 2024
1 parent ae98637 commit 885d9b9
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@
VCC-supply = <&vcc_bat>;
};

typec_extcon_bridge: typec-extcon {
compatible = "linux,typec-extcon-bridge";
usb-role-switch;
orientation-switch;
mode-switch;
};

vcc_3v3: vcc-3v3-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc_3v3";
Expand Down Expand Up @@ -593,30 +600,25 @@
interrupts = <RK_PC5 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usbcc_int_l>;
extcon = <&typec_extcon_bridge>;
usb-role-switch = <&typec_extcon_bridge>;
vbus-supply = <&vbus>;
usb-role-switch = <&usb_host0_xhci>;
extcon = <&usb2phy0>;

connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
power-role = "dual";
try-power-role = "source";
try-power-role = "sink";
op-sink-microwatt = <2500000>;
sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
source-pdos = <PDO_FIXED(5000, 500, PDO_FIXED_USB_COMM)>;
mode-switch = <&typec_extcon_bridge>;
orientation-switch = <&typec_extcon_bridge>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;

typec_hs_usb_host0_xhci: endpoint {
remote-endpoint = <&usb_host0_xhci_typec_hs>;
};
port {
typec_hs_usb_host0_xhci: endpoint {
remote-endpoint = <&usb_host0_xhci_typec_hs>;
};
};
};
Expand Down Expand Up @@ -989,7 +991,7 @@

/* OTG port controller */
&usb_host0_xhci {
usb-role-switch;
extcon = <&typec_extcon_bridge>;
status = "okay";

port {
Expand All @@ -1004,6 +1006,7 @@
};

&usb2phy0 {
extcon = <&typec_extcon_bridge>;
status = "okay";
};

Expand Down

0 comments on commit 885d9b9

Please sign in to comment.