Skip to content

Commit 595f06c

Browse files
macromorganmmind
authored andcommitted
arm64: dts: rockchip: Add USB-C Support for rk3588s-indiedroid-nova
Add support for the USB-C port on the Indiedroid Nova board. This port supports USB-C DP Alt mode (not implemented yet in drivers), but works as a USB XHCI/EHCI/OHCI port. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20240418173627.1368494-1-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent 626a479 commit 595f06c

1 file changed

Lines changed: 70 additions & 1 deletion

File tree

arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
pinctrl-names = "default";
317317
vbus-supply = <&vbus5v0_typec>;
318318

319-
connector {
319+
usb_con: connector {
320320
compatible = "usb-c-connector";
321321
data-role = "dual";
322322
label = "USB-C";
@@ -325,6 +325,32 @@
325325
source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
326326
sink-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
327327
op-sink-microwatt = <1000000>;
328+
329+
ports {
330+
#address-cells = <1>;
331+
#size-cells = <0>;
332+
333+
port@0 {
334+
reg = <0>;
335+
usbc0_orien_sw: endpoint {
336+
remote-endpoint = <&usbdp_phy0_orientation_switch>;
337+
};
338+
};
339+
340+
port@1 {
341+
reg = <1>;
342+
usbc0_role_sw: endpoint {
343+
remote-endpoint = <&dwc3_0_role_switch>;
344+
};
345+
};
346+
347+
port@2 {
348+
reg = <2>;
349+
dp_altmode_mux: endpoint {
350+
remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
351+
};
352+
};
353+
};
328354
};
329355
};
330356

@@ -788,6 +814,14 @@
788814
status = "okay";
789815
};
790816

817+
&u2phy0 {
818+
status = "okay";
819+
};
820+
821+
&u2phy0_otg {
822+
status = "okay";
823+
};
824+
791825
&u2phy2 {
792826
status = "okay";
793827
};
@@ -839,6 +873,17 @@
839873
status = "okay";
840874
};
841875

876+
&usb_host0_xhci {
877+
usb-role-switch;
878+
status = "okay";
879+
880+
port {
881+
dwc3_0_role_switch: endpoint {
882+
remote-endpoint = <&usbc0_role_sw>;
883+
};
884+
};
885+
};
886+
842887
&usb_host1_ehci {
843888
status = "okay";
844889
};
@@ -850,3 +895,27 @@
850895
&usb_host2_xhci {
851896
status = "okay";
852897
};
898+
899+
&usbdp_phy0 {
900+
orientation-switch;
901+
mode-switch;
902+
sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
903+
sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
904+
rockchip,dp-lane-mux = <2 3>;
905+
status = "okay";
906+
907+
port {
908+
#address-cells = <1>;
909+
#size-cells = <0>;
910+
911+
usbdp_phy0_orientation_switch: endpoint@0 {
912+
reg = <0>;
913+
remote-endpoint = <&usbc0_orien_sw>;
914+
};
915+
916+
usbdp_phy0_dp_altmode_mux: endpoint@1 {
917+
reg = <1>;
918+
remote-endpoint = <&dp_altmode_mux>;
919+
};
920+
};
921+
};

0 commit comments

Comments
 (0)