Skip to content

Commit

Permalink
arm64: dts: rk3566-pinetab2: Add Type-C controller node for USB OTG port
Browse files Browse the repository at this point in the history
Type-C port farthest from the buttons has HUSB Type-C controller connected
to it. Enable the controller.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
  • Loading branch information
Ondrej Jirman authored and Danct12 committed Jul 9, 2024
1 parent 519c518 commit 477eb02
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,43 @@
rockchip,sleep-filter-current-microamp = <100000>;
};
};

usbc0: usb-typec@4e {
compatible = "hynetek,husb311";
reg = <0x4e>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PC5 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usbcc_int_l>;
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";
op-sink-microwatt = <2500000>;
sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
source-pdos = <PDO_FIXED(5000, 500, PDO_FIXED_USB_COMM)>;

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

port@0 {
reg = <0>;

typec_hs_usb_host0_xhci: endpoint {
remote-endpoint = <&usb_host0_xhci_typec_hs>;
};
};
};
};
};

};

&i2c1 {
Expand Down Expand Up @@ -787,7 +824,7 @@

usb {
usbcc_int_l: usbcc-int-l {
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
};

usb_host_pwren1_h: usb-host-pwren1-h {
Expand Down Expand Up @@ -950,8 +987,16 @@
status = "okay";
};

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

port {
usb_host0_xhci_typec_hs: endpoint {
remote-endpoint = <&typec_hs_usb_host0_xhci>;
};
};
};

&usb_host1_xhci {
Expand All @@ -967,6 +1012,7 @@
status = "okay";
};

/* OTG port phy */
&usb2phy0_otg {
status = "okay";
};
Expand Down

0 comments on commit 477eb02

Please sign in to comment.