Skip to content
Snippets Groups Projects
Commit b49c34f5 authored by Sebastian Reichel's avatar Sebastian Reichel Committed by Sebastian Reichel
Browse files

arm64: dts: rockchip: rk3588-rock5b: add USB-C support


Add support for using the Radxa Rock 5 Model B USB-C port for USB in
OHCI, EHCI or XHCI mode. Displayport AltMode is not yet supported.

Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 2603251d
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h> #include <dt-bindings/leds/common.h>
#include <dt-bindings/usb/pd.h>
#include "rk3588.dtsi" #include "rk3588.dtsi"
/ { / {
...@@ -57,6 +58,15 @@ fan: pwm-fan { ...@@ -57,6 +58,15 @@ fan: pwm-fan {
#cooling-cells = <2>; #cooling-cells = <2>;
}; };
vcc12v_dcin: vcc12v-dcin-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator { vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie2x1l0"; regulator-name = "vcc3v3_pcie2x1l0";
...@@ -115,6 +125,7 @@ vcc5v0_sys: vcc5v0-sys-regulator { ...@@ -115,6 +125,7 @@ vcc5v0_sys: vcc5v0-sys-regulator {
regulator-boot-on; regulator-boot-on;
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
vin-supply = <&vcc12v_dcin>;
}; };
vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator { vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
...@@ -220,6 +231,61 @@ regulator-state-mem { ...@@ -220,6 +231,61 @@ regulator-state-mem {
}; };
}; };
&i2c4 {
pinctrl-names = "default";
pinctrl-0 = <&i2c4m1_xfer>;
status = "okay";
usbc0: usb-typec@22 {
compatible = "fcs,fusb302";
reg = <0x22>;
interrupt-parent = <&gpio3>;
interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usbc0_int>;
vbus-supply = <&vcc12v_dcin>;
status = "okay";
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
power-role = "sink";
try-power-role = "sink";
op-sink-microwatt = <1000000>;
sink-pdos =
<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
<PDO_VAR(5000, 20000, 5000)>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc0_orien_sw: endpoint {
remote-endpoint = <&usbdp_phy0_orientation_switch>;
};
};
port@1 {
reg = <1>;
usbc0_role_sw: endpoint {
remote-endpoint = <&usb_host1_xhci_role_switch>;
};
};
port@2 {
reg = <2>;
dp_altmode_mux: endpoint {
remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
};
};
};
};
};
};
&i2c6 { &i2c6 {
status = "okay"; status = "okay";
...@@ -349,6 +415,10 @@ usb { ...@@ -349,6 +415,10 @@ usb {
vcc5v0_host_en: vcc5v0-host-en { vcc5v0_host_en: vcc5v0-host-en {
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
}; };
usbc0_int: usbc0-int {
rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
};
}; };
}; };
...@@ -713,6 +783,14 @@ &uart2 { ...@@ -713,6 +783,14 @@ &uart2 {
status = "okay"; status = "okay";
}; };
&u2phy0 {
status = "okay";
};
&u2phy0_otg {
status = "okay";
};
&u2phy1 { &u2phy1 {
status = "okay"; status = "okay";
}; };
...@@ -748,6 +826,33 @@ &usbdp_phy1_u3 { ...@@ -748,6 +826,33 @@ &usbdp_phy1_u3 {
status = "okay"; status = "okay";
}; };
&usbdp_phy0 {
orientation-switch;
mode-switch;
sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
usbdp_phy0_orientation_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_orien_sw>;
};
usbdp_phy0_dp_altmode_mux: endpoint@1 {
reg = <1>;
remote-endpoint = <&dp_altmode_mux>;
};
};
};
&usbdp_phy0_u3 {
status = "okay";
};
&usb_host0_ehci { &usb_host0_ehci {
status = "okay"; status = "okay";
}; };
...@@ -756,6 +861,21 @@ &usb_host0_ohci { ...@@ -756,6 +861,21 @@ &usb_host0_ohci {
status = "okay"; status = "okay";
}; };
&usb_host0_xhci {
usb-role-switch;
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
usb_host1_xhci_role_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc0_role_sw>;
};
};
};
&usb_host1_ehci { &usb_host1_ehci {
status = "okay"; status = "okay";
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment