Commit c57d1a97 authored by Jimmy Hon's avatar Jimmy Hon Committed by Heiko Stuebner

arm64: dts: rockchip: add USB-C support to rk3588s-orangepi-5

Add support for using the Orange Pi 5 USB-C port for USB in OHCI, EHCI
or XHCI mode. Displayport AltMode is not yet supported.
Signed-off-by: default avatarJimmy Hon <honyuenkwun@gmail.com>
Link: https://lore.kernel.org/r/20240418035232.35344-2-honyuenkwun@gmail.comSigned-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 8beafb22
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <dt-bindings/leds/common.h> #include <dt-bindings/leds/common.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/rockchip.h> #include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/usb/pd.h>
#include "rk3588s.dtsi" #include "rk3588s.dtsi"
/ { / {
...@@ -217,6 +218,56 @@ &i2c6 { ...@@ -217,6 +218,56 @@ &i2c6 {
pinctrl-0 = <&i2c6m3_xfer>; pinctrl-0 = <&i2c6m3_xfer>;
status = "okay"; status = "okay";
usbc0: usb-typec@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usbc0_int>;
vbus-supply = <&vbus_typec>;
status = "okay";
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
op-sink-microwatt = <1000000>;
power-role = "dual";
sink-pdos =
<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
source-pdos =
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
try-power-role = "source";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc0_hs: endpoint {
remote-endpoint = <&usb_host0_xhci_drd_sw>;
};
};
port@1 {
reg = <1>;
usbc0_ss: endpoint {
remote-endpoint = <&usbdp_phy0_typec_ss>;
};
};
port@2 {
reg = <2>;
usbc0_sbu: endpoint {
remote-endpoint = <&usbdp_phy0_typec_sbu>;
};
};
};
};
};
hym8563: rtc@51 { hym8563: rtc@51 {
compatible = "haoyu,hym8563"; compatible = "haoyu,hym8563";
reg = <0x51>; reg = <0x51>;
...@@ -630,6 +681,14 @@ &tsadc { ...@@ -630,6 +681,14 @@ &tsadc {
status = "okay"; status = "okay";
}; };
&u2phy0 {
status = "okay";
};
&u2phy0_otg {
status = "okay";
};
&u2phy2 { &u2phy2 {
status = "okay"; status = "okay";
}; };
...@@ -651,6 +710,29 @@ &uart2 { ...@@ -651,6 +710,29 @@ &uart2 {
status = "okay"; status = "okay";
}; };
&usbdp_phy0 {
mode-switch;
orientation-switch;
sbu1-dc-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
usbdp_phy0_typec_ss: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_ss>;
};
usbdp_phy0_typec_sbu: endpoint@1 {
reg = <1>;
remote-endpoint = <&usbc0_sbu>;
};
};
};
&usb_host0_ehci { &usb_host0_ehci {
status = "okay"; status = "okay";
}; };
...@@ -659,6 +741,18 @@ &usb_host0_ohci { ...@@ -659,6 +741,18 @@ &usb_host0_ohci {
status = "okay"; status = "okay";
}; };
&usb_host0_xhci {
dr_mode = "otg";
usb-role-switch;
status = "okay";
port {
usb_host0_xhci_drd_sw: endpoint {
remote-endpoint = <&usbc0_hs>;
};
};
};
&usb_host1_ehci { &usb_host1_ehci {
status = "okay"; status = "okay";
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment