From: Chaoyi Chen <chaoyi.chen@rock-chips.com>
The RK3399 EVB IND board has a Type-C interface DisplayPort.
It use fusb302 chip as Type-C controller.
fusb302 chip ---> USB/DP PHY0 <----> CDN-DP controller
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
---
(no changes since v4)
Changes in v3:
- Fix wrong vdo value.
- Fix port node in usb-c-connector.
Changes in v2:
- Add endpoint to link DP PHY and DP controller.
- Fix devicetree coding style.
.../boot/dts/rockchip/rk3399-evb-ind.dts | 146 ++++++++++++++++++
1 file changed, 146 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts
index 70aee1ab904c..aeeee6bd2973 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dts
@@ -4,6 +4,7 @@
*/
/dts-v1/;
+#include <dt-bindings/usb/pd.h>
#include "rk3399.dtsi"
/ {
@@ -19,6 +20,21 @@ chosen {
stdout-path = "serial2:1500000n8";
};
+ sound: sound {
+ compatible = "rockchip,rk3399-gru-sound";
+ rockchip,cpu = <&i2s0 &spdif>;
+ };
+
+ vbus_typec: regulator-vbus-typec {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_typec0_en>;
+ regulator-name = "vbus_typec";
+ vin-supply = <&vcc5v0_sys>;
+ };
+
vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
enable-active-high;
@@ -31,6 +47,11 @@ vcc5v0_sys: regulator-vcc5v0-sys {
};
};
+&cdn_dp {
+ phys = <&tcphy0_dp>;
+ status = "okay";
+};
+
&cpu_b0 {
cpu-supply = <&vdd_cpu_b>;
};
@@ -55,6 +76,12 @@ &cpu_l3 {
cpu-supply = <&vdd_cpu_l>;
};
+&dp_out {
+ dp_controller_output: endpoint {
+ remote-endpoint = <&dp_phy_in>;
+ };
+};
+
&emmc_phy {
status = "okay";
};
@@ -341,6 +368,71 @@ regulator-state-mem {
};
};
+&i2c4 {
+ i2c-scl-rising-time-ns = <475>;
+ i2c-scl-falling-time-ns = <26>;
+ status = "okay";
+
+ usbc0: typec-portc@22 {
+ compatible = "fcs,fusb302";
+ reg = <0x22>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&usbc0_int>;
+ vbus-supply = <&vbus_typec>;
+
+ usb_con: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ data-role = "dual";
+ power-role = "dual";
+ try-power-role = "sink";
+ op-sink-microwatt = <1000000>;
+ sink-pdos =
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+ source-pdos =
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
+
+ altmodes {
+ displayport {
+ svid = /bits/ 16 <0xff01>;
+ vdo = <0x00001c46>;
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usbc_hs: endpoint {
+ remote-endpoint = <&u2phy0_typec_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usbc_ss: endpoint {
+ remote-endpoint = <&tcphy0_typec_ss>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usbc_dp: endpoint {
+ remote-endpoint = <&tcphy0_typec_dp>;
+ };
+ };
+ };
+ };
+ };
+};
+
&i2s2 {
status = "okay";
};
@@ -354,6 +446,16 @@ &io_domains {
};
&pinctrl {
+ usb-typec {
+ usbc0_int: usbc0-int {
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -400,10 +502,48 @@ &sdmmc {
status = "okay";
};
+&sound {
+ rockchip,codec = <&cdn_dp>;
+ status = "okay";
+};
+
+&spdif {
+ status = "okay";
+};
+
&tcphy0 {
status = "okay";
};
+&tcphy0_dp {
+ mode-switch;
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tcphy0_typec_dp: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&usbc_dp>;
+ };
+
+ dp_phy_in: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&dp_controller_output>;
+ };
+ };
+};
+
+&tcphy0_usb3 {
+ orientation-switch;
+
+ port {
+ tcphy0_typec_ss: endpoint {
+ remote-endpoint = <&usbc_ss>;
+ };
+ };
+};
+
&tcphy1 {
status = "okay";
};
@@ -418,6 +558,12 @@ &tsadc {
&u2phy0 {
status = "okay";
+
+ port {
+ u2phy0_typec_hs: endpoint {
+ remote-endpoint = <&usbc_hs>;
+ };
+ };
};
&u2phy0_host {
--
2.49.0
> +&i2c4 {
> + i2c-scl-rising-time-ns = <475>;
> + i2c-scl-falling-time-ns = <26>;
> + status = "okay";
> +
> + usbc0: typec-portc@22 {
> + compatible = "fcs,fusb302";
> + reg = <0x22>;
> + interrupt-parent = <&gpio1>;
> + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&usbc0_int>;
> + vbus-supply = <&vbus_typec>;
> +
> + usb_con: connector {
> + compatible = "usb-c-connector";
> + label = "USB-C";
> + data-role = "dual";
> + power-role = "dual";
> + try-power-role = "sink";
> + op-sink-microwatt = <1000000>;
> + sink-pdos =
> + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
> + source-pdos =
> + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
> +
> + altmodes {
> + displayport {
> + svid = /bits/ 16 <0xff01>;
> + vdo = <0x00001c46>;
> + };
> + };
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + usbc_hs: endpoint {
> + remote-endpoint = <&u2phy0_typec_hs>;
> + };
> + };
> +
Why USB2 PHY needs to be notified for Type-C connection?
> + port@1 {
> + reg = <1>;
> +
> + usbc_ss: endpoint {
> + remote-endpoint = <&tcphy0_typec_ss>;
> + };
> + };
> +
> + port@2 {
> + reg = <2>;
> +
> + usbc_dp: endpoint {
> + remote-endpoint = <&tcphy0_typec_dp>;
> + };
> + };
> + };
> + };
> + };
> +};
> +
.....
>
> &u2phy0 {
> status = "okay";
> +
> + port {
> + u2phy0_typec_hs: endpoint {
> + remote-endpoint = <&usbc_hs>;
> + };
> + };
> };
>
There is no switch and mux, how to co-work with Type-C?
Best regards,
Peter
Hi Peter,
On 10/29/2025 5:45 PM, Peter Chen wrote:
>> +&i2c4 {
>> + i2c-scl-rising-time-ns = <475>;
>> + i2c-scl-falling-time-ns = <26>;
>> + status = "okay";
>> +
>> + usbc0: typec-portc@22 {
>> + compatible = "fcs,fusb302";
>> + reg = <0x22>;
>> + interrupt-parent = <&gpio1>;
>> + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&usbc0_int>;
>> + vbus-supply = <&vbus_typec>;
>> +
>> + usb_con: connector {
>> + compatible = "usb-c-connector";
>> + label = "USB-C";
>> + data-role = "dual";
>> + power-role = "dual";
>> + try-power-role = "sink";
>> + op-sink-microwatt = <1000000>;
>> + sink-pdos =
>> + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
>> + source-pdos =
>> + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
>> +
>> + altmodes {
>> + displayport {
>> + svid = /bits/ 16 <0xff01>;
>> + vdo = <0x00001c46>;
>> + };
>> + };
>> +
>> + ports {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + port@0 {
>> + reg = <0>;
>> +
>> + usbc_hs: endpoint {
>> + remote-endpoint = <&u2phy0_typec_hs>;
>> + };
>> + };
>> +
> Why USB2 PHY needs to be notified for Type-C connection?
I think the USB-connector binding require a port@0 for High Speed. So I filled in USB2 PHY here. And I have looked up boards with the same usage, and some of the results are as follows:
- rk3399-firefly.dts
- rk3399-pinebook-pro.dts
- rk3399-eaidk-610.dts
>
>> + port@1 {
>> + reg = <1>;
>> +
>> + usbc_ss: endpoint {
>> + remote-endpoint = <&tcphy0_typec_ss>;
>> + };
>> + };
>> +
>> + port@2 {
>> + reg = <2>;
>> +
>> + usbc_dp: endpoint {
>> + remote-endpoint = <&tcphy0_typec_dp>;
>> + };
>> + };
>> + };
>> + };
>> + };
>> +};
>> +
> .....
>> &u2phy0 {
>> status = "okay";
>> +
>> + port {
>> + u2phy0_typec_hs: endpoint {
>> + remote-endpoint = <&usbc_hs>;
>> + };
>> + };
>> };
>>
> There is no switch and mux, how to co-work with Type-C?
I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
>
> Best regards,
> Peter
>
>
--
Best,
Chaoyi
On 10/29/2025 6:21 PM, Chaoyi Chen wrote:
> Hi Peter,
>
> On 10/29/2025 5:45 PM, Peter Chen wrote:
>>> +&i2c4 {
>>> + i2c-scl-rising-time-ns = <475>;
>>> + i2c-scl-falling-time-ns = <26>;
>>> + status = "okay";
>>> +
>>> + usbc0: typec-portc@22 {
>>> + compatible = "fcs,fusb302";
>>> + reg = <0x22>;
>>> + interrupt-parent = <&gpio1>;
>>> + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&usbc0_int>;
>>> + vbus-supply = <&vbus_typec>;
>>> +
>>> + usb_con: connector {
>>> + compatible = "usb-c-connector";
>>> + label = "USB-C";
>>> + data-role = "dual";
>>> + power-role = "dual";
>>> + try-power-role = "sink";
>>> + op-sink-microwatt = <1000000>;
>>> + sink-pdos =
>>> + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
>>> + source-pdos =
>>> + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
>>> +
>>> + altmodes {
>>> + displayport {
>>> + svid = /bits/ 16 <0xff01>;
>>> + vdo = <0x00001c46>;
>>> + };
>>> + };
>>> +
>>> + ports {
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> +
>>> + port@0 {
>>> + reg = <0>;
>>> +
>>> + usbc_hs: endpoint {
>>> + remote-endpoint = <&u2phy0_typec_hs>;
>>> + };
>>> + };
>>> +
>> Why USB2 PHY needs to be notified for Type-C connection?
>
> I think the USB-connector binding require a port@0 for High Speed. So I filled in USB2 PHY here. And I have looked up boards with the same usage, and some of the results are as follows:
>
> - rk3399-firefly.dts
>
> - rk3399-pinebook-pro.dts
>
> - rk3399-eaidk-610.dts
>
>
>>
>>> + port@1 {
>>> + reg = <1>;
>>> +
>>> + usbc_ss: endpoint {
>>> + remote-endpoint = <&tcphy0_typec_ss>;
>>> + };
>>> + };
>>> +
>>> + port@2 {
>>> + reg = <2>;
>>> +
>>> + usbc_dp: endpoint {
>>> + remote-endpoint = <&tcphy0_typec_dp>;
>>> + };
>>> + };
>>> + };
>>> + };
>>> + };
>>> +};
>>> +
>> .....
>>> &u2phy0 {
>>> status = "okay";
>>> +
>>> + port {
>>> + u2phy0_typec_hs: endpoint {
>>> + remote-endpoint = <&usbc_hs>;
>>> + };
>>> + };
>>> };
>>>
>> There is no switch and mux, how to co-work with Type-C?
>
> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
>
>
>>
>> Best regards,
>> Peter
>>
>>
--
Best,
Chaoyi
On Wed, Oct 29, 2025 at 6:32 PM Chaoyi Chen <chaoyi.chen@rock-chips.com> wrote:
>
> On 10/29/2025 6:21 PM, Chaoyi Chen wrote:
>
> > Hi Peter,
> >
> > On 10/29/2025 5:45 PM, Peter Chen wrote:
> >>> +&i2c4 {
> >>> + i2c-scl-rising-time-ns = <475>;
> >>> + i2c-scl-falling-time-ns = <26>;
> >>> + status = "okay";
> >>> +
> >>> + usbc0: typec-portc@22 {
> >>> + compatible = "fcs,fusb302";
> >>> + reg = <0x22>;
> >>> + interrupt-parent = <&gpio1>;
> >>> + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
> >>> + pinctrl-names = "default";
> >>> + pinctrl-0 = <&usbc0_int>;
> >>> + vbus-supply = <&vbus_typec>;
> >>> +
> >>> + usb_con: connector {
> >>> + compatible = "usb-c-connector";
> >>> + label = "USB-C";
> >>> + data-role = "dual";
> >>> + power-role = "dual";
> >>> + try-power-role = "sink";
> >>> + op-sink-microwatt = <1000000>;
> >>> + sink-pdos =
> >>> + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
> >>> + source-pdos =
> >>> + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
> >>> +
> >>> + altmodes {
> >>> + displayport {
> >>> + svid = /bits/ 16 <0xff01>;
> >>> + vdo = <0x00001c46>;
> >>> + };
> >>> + };
> >>> +
> >>> + ports {
> >>> + #address-cells = <1>;
> >>> + #size-cells = <0>;
> >>> +
> >>> + port@0 {
> >>> + reg = <0>;
> >>> +
> >>> + usbc_hs: endpoint {
> >>> + remote-endpoint = <&u2phy0_typec_hs>;
> >>> + };
> >>> + };
> >>> +
> >> Why USB2 PHY needs to be notified for Type-C connection?
> >
> > I think the USB-connector binding require a port@0 for High Speed. So I filled in USB2 PHY here. And I have looked up boards with the same usage, and some of the results are as follows:
> >
> > - rk3399-firefly.dts
> >
> > - rk3399-pinebook-pro.dts
> >
> > - rk3399-eaidk-610.dts
> >
Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is
short for Type-C connector,
and no control is needed for Type-C application.
Why is there a remote-endpoint connection between USB2 PHY and Type-C connector?
> >
> >>
> >>> + port@1 {
> >>> + reg = <1>;
> >>> +
> >>> + usbc_ss: endpoint {
> >>> + remote-endpoint = <&tcphy0_typec_ss>;
> >>> + };
> >>> + };
> >>> +
> >>> + port@2 {
> >>> + reg = <2>;
> >>> +
> >>> + usbc_dp: endpoint {
> >>> + remote-endpoint = <&tcphy0_typec_dp>;
> >>> + };
> >>> + };
> >>> + };
> >>> + };
> >>> + };
> >>> +};
> >>> +
> >> .....
> >>> &u2phy0 {
> >>> status = "okay";
> >>> +
> >>> + port {
> >>> + u2phy0_typec_hs: endpoint {
> >>> + remote-endpoint = <&usbc_hs>;
> >>> + };
> >>> + };
> >>> };
> >>>
> >> There is no switch and mux, how to co-work with Type-C?
> >
> > I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
>
> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
I assume the Micro-USB connector does not use Type-C/PD IC, is it
right? Does it relate to this patch?
Best regards,
Peter
Hi Peter,
On 10/30/2025 9:34 AM, Peter Chen wrote:
> On Wed, Oct 29, 2025 at 6:32 PM Chaoyi Chen <chaoyi.chen@rock-chips.com> wrote:
>> On 10/29/2025 6:21 PM, Chaoyi Chen wrote:
>>
>>> Hi Peter,
>>>
>>> On 10/29/2025 5:45 PM, Peter Chen wrote:
>>>>> +&i2c4 {
>>>>> + i2c-scl-rising-time-ns = <475>;
>>>>> + i2c-scl-falling-time-ns = <26>;
>>>>> + status = "okay";
>>>>> +
>>>>> + usbc0: typec-portc@22 {
>>>>> + compatible = "fcs,fusb302";
>>>>> + reg = <0x22>;
>>>>> + interrupt-parent = <&gpio1>;
>>>>> + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
>>>>> + pinctrl-names = "default";
>>>>> + pinctrl-0 = <&usbc0_int>;
>>>>> + vbus-supply = <&vbus_typec>;
>>>>> +
>>>>> + usb_con: connector {
>>>>> + compatible = "usb-c-connector";
>>>>> + label = "USB-C";
>>>>> + data-role = "dual";
>>>>> + power-role = "dual";
>>>>> + try-power-role = "sink";
>>>>> + op-sink-microwatt = <1000000>;
>>>>> + sink-pdos =
>>>>> + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
>>>>> + source-pdos =
>>>>> + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
>>>>> +
>>>>> + altmodes {
>>>>> + displayport {
>>>>> + svid = /bits/ 16 <0xff01>;
>>>>> + vdo = <0x00001c46>;
>>>>> + };
>>>>> + };
>>>>> +
>>>>> + ports {
>>>>> + #address-cells = <1>;
>>>>> + #size-cells = <0>;
>>>>> +
>>>>> + port@0 {
>>>>> + reg = <0>;
>>>>> +
>>>>> + usbc_hs: endpoint {
>>>>> + remote-endpoint = <&u2phy0_typec_hs>;
>>>>> + };
>>>>> + };
>>>>> +
>>>> Why USB2 PHY needs to be notified for Type-C connection?
>>> I think the USB-connector binding require a port@0 for High Speed. So I filled in USB2 PHY here. And I have looked up boards with the same usage, and some of the results are as follows:
>>>
>>> - rk3399-firefly.dts
>>>
>>> - rk3399-pinebook-pro.dts
>>>
>>> - rk3399-eaidk-610.dts
>>>
> Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is
> short for Type-C connector,
> and no control is needed for Type-C application.
> Why is there a remote-endpoint connection between USB2 PHY and Type-C connector?
From the perspective of Type-C, this should not be added. Is the approach in v2 correct [0] ?
[0]: https://lore.kernel.org/all/20250715112456.101-6-kernel@airkyi.com/
Or is the following approach correct?
port@0 {
reg = <0>;
usbc_hs: endpoint {
remote-endpoint = <&tcphy0>;
};
};
port@1 {
reg = <1>;
usbc_ss: endpoint {
remote-endpoint = <&tcphy0>;
};
};
port@2 {
reg = <2>;
usbc_dp: endpoint {
remote-endpoint = <&tcphy0_typec_dp>;
};
};
>
>>>>> + port@1 {
>>>>> + reg = <1>;
>>>>> +
>>>>> + usbc_ss: endpoint {
>>>>> + remote-endpoint = <&tcphy0_typec_ss>;
>>>>> + };
>>>>> + };
>>>>> +
>>>>> + port@2 {
>>>>> + reg = <2>;
>>>>> +
>>>>> + usbc_dp: endpoint {
>>>>> + remote-endpoint = <&tcphy0_typec_dp>;
>>>>> + };
>>>>> + };
>>>>> + };
>>>>> + };
>>>>> + };
>>>>> +};
>>>>> +
>>>> .....
>>>>> &u2phy0 {
>>>>> status = "okay";
>>>>> +
>>>>> + port {
>>>>> + u2phy0_typec_hs: endpoint {
>>>>> + remote-endpoint = <&usbc_hs>;
>>>>> + };
>>>>> + };
>>>>> };
>>>>>
>>>> There is no switch and mux, how to co-work with Type-C?
>>> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
>> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
> I assume the Micro-USB connector does not use Type-C/PD IC, is it
> right? Does it relate to this patch?
>
> Best regards,
> Peter
>
> > Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is
> > short for Type-C connector,
> > and no control is needed for Type-C application.
> > Why is there a remote-endpoint connection between USB2 PHY and Type-C connector?
>
> From the perspective of Type-C, this should not be added. Is the approach in v2 correct [0] ?
>
Have you tried debugging based on upstream code?
v2 is correct, but the dts needs to improve.
- There is a remote-endpoint connection for USB role switch between
Type-C connector
device and USB controller device
- There is a remote-endpoint connection for orientation and lane configuration
between Type-C connector device and USB/DP PHY device.
Peter
> [0]: https://lore.kernel.org/all/20250715112456.101-6-kernel@airkyi.com/
>
> Or is the following approach correct?
>
>
> port@0 {
> reg = <0>;
>
> usbc_hs: endpoint {
> remote-endpoint = <&tcphy0>;
> };
> };
>
> port@1 {
> reg = <1>;
>
> usbc_ss: endpoint {
> remote-endpoint = <&tcphy0>;
> };
> };
>
> port@2 {
> reg = <2>;
>
> usbc_dp: endpoint {
> remote-endpoint = <&tcphy0_typec_dp>;
> };
> };
>
>
> >
> >>>>> + port@1 {
> >>>>> + reg = <1>;
> >>>>> +
> >>>>> + usbc_ss: endpoint {
> >>>>> + remote-endpoint = <&tcphy0_typec_ss>;
> >>>>> + };
> >>>>> + };
> >>>>> +
> >>>>> + port@2 {
> >>>>> + reg = <2>;
> >>>>> +
> >>>>> + usbc_dp: endpoint {
> >>>>> + remote-endpoint = <&tcphy0_typec_dp>;
> >>>>> + };
> >>>>> + };
> >>>>> + };
> >>>>> + };
> >>>>> + };
> >>>>> +};
> >>>>> +
> >>>> .....
> >>>>> &u2phy0 {
> >>>>> status = "okay";
> >>>>> +
> >>>>> + port {
> >>>>> + u2phy0_typec_hs: endpoint {
> >>>>> + remote-endpoint = <&usbc_hs>;
> >>>>> + };
> >>>>> + };
> >>>>> };
> >>>>>
> >>>> There is no switch and mux, how to co-work with Type-C?
> >>> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
> >> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
> > I assume the Micro-USB connector does not use Type-C/PD IC, is it
> > right? Does it relate to this patch?
> >
> > Best regards,
> > Peter
> >
>
On 10/30/2025 10:50 AM, Peter Chen wrote:
>>> Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is
>>> short for Type-C connector,
>>> and no control is needed for Type-C application.
>>> Why is there a remote-endpoint connection between USB2 PHY and Type-C connector?
>> From the perspective of Type-C, this should not be added. Is the approach in v2 correct [0] ?
>>
> Have you tried debugging based on upstream code?
Yes, I have tried both the v2 and v8 approaches, and both can work.
> v2 is correct, but the dts needs to improve.
> - There is a remote-endpoint connection for USB role switch between
> Type-C connector
> device and USB controller device
> - There is a remote-endpoint connection for orientation and lane configuration
> between Type-C connector device and USB/DP PHY device.
In v8 patch5, we implemented typec_mux and typec_switch in the USB/DP PHY.
I think the current remote-endpoint connections are all child node of the USB/DP PHY. That is:
&tcphy0_dp {
mode-switch;
...
};
&tcphy0_usb3 {
orientation-switch;
...
};
Does this still need to be improved? Thank you.
>
> Peter
>
>> [0]: https://lore.kernel.org/all/20250715112456.101-6-kernel@airkyi.com/
>>
>> Or is the following approach correct?
>>
>>
>> port@0 {
>> reg = <0>;
>>
>> usbc_hs: endpoint {
>> remote-endpoint = <&tcphy0>;
>> };
>> };
>>
>> port@1 {
>> reg = <1>;
>>
>> usbc_ss: endpoint {
>> remote-endpoint = <&tcphy0>;
>> };
>> };
>>
>> port@2 {
>> reg = <2>;
>>
>> usbc_dp: endpoint {
>> remote-endpoint = <&tcphy0_typec_dp>;
>> };
>> };
>>
>>
>>>>>>> + port@1 {
>>>>>>> + reg = <1>;
>>>>>>> +
>>>>>>> + usbc_ss: endpoint {
>>>>>>> + remote-endpoint = <&tcphy0_typec_ss>;
>>>>>>> + };
>>>>>>> + };
>>>>>>> +
>>>>>>> + port@2 {
>>>>>>> + reg = <2>;
>>>>>>> +
>>>>>>> + usbc_dp: endpoint {
>>>>>>> + remote-endpoint = <&tcphy0_typec_dp>;
>>>>>>> + };
>>>>>>> + };
>>>>>>> + };
>>>>>>> + };
>>>>>>> + };
>>>>>>> +};
>>>>>>> +
>>>>>> .....
>>>>>>> &u2phy0 {
>>>>>>> status = "okay";
>>>>>>> +
>>>>>>> + port {
>>>>>>> + u2phy0_typec_hs: endpoint {
>>>>>>> + remote-endpoint = <&usbc_hs>;
>>>>>>> + };
>>>>>>> + };
>>>>>>> };
>>>>>>>
>>>>>> There is no switch and mux, how to co-work with Type-C?
>>>>> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
>>>> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
>>> I assume the Micro-USB connector does not use Type-C/PD IC, is it
>>> right? Does it relate to this patch?
>>>
>>> Best regards,
>>> Peter
>>>
>
--
Best,
Chaoyi
On Thu, Oct 30, 2025 at 11:14 AM Chaoyi Chen <chaoyi.chen@rock-chips.com> wrote:
>
> On 10/30/2025 10:50 AM, Peter Chen wrote:
>
> >>> Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is
> >>> short for Type-C connector,
> >>> and no control is needed for Type-C application.
> >>> Why is there a remote-endpoint connection between USB2 PHY and Type-C connector?
> >> From the perspective of Type-C, this should not be added. Is the approach in v2 correct [0] ?
> >>
> > Have you tried debugging based on upstream code?
>
> Yes, I have tried both the v2 and v8 approaches, and both can work.
>
>
> > v2 is correct, but the dts needs to improve.
> > - There is a remote-endpoint connection for USB role switch between
> > Type-C connector
> > device and USB controller device
> > - There is a remote-endpoint connection for orientation and lane configuration
> > between Type-C connector device and USB/DP PHY device.
>
> In v8 patch5, we implemented typec_mux and typec_switch in the USB/DP PHY.
>
> I think the current remote-endpoint connections are all child node of the USB/DP PHY. That is:
>
>
> &tcphy0_dp {
> mode-switch;
> ...
> };
>
>
> &tcphy0_usb3 {
> orientation-switch;
> ...
> };
>
>
> Does this still need to be improved? Thank you.
>
Hi Chaoyi,
There are two questions I have still not seen the answer to:
- Why USB2 PHY is related to your Type-C patch?
- How does the USB role switch event notify the USB controller driver, eg dwc3?
Peter
>
> >
> > Peter
> >
> >> [0]: https://lore.kernel.org/all/20250715112456.101-6-kernel@airkyi.com/
> >>
> >> Or is the following approach correct?
> >>
> >>
> >> port@0 {
> >> reg = <0>;
> >>
> >> usbc_hs: endpoint {
> >> remote-endpoint = <&tcphy0>;
> >> };
> >> };
> >>
> >> port@1 {
> >> reg = <1>;
> >>
> >> usbc_ss: endpoint {
> >> remote-endpoint = <&tcphy0>;
> >> };
> >> };
> >>
> >> port@2 {
> >> reg = <2>;
> >>
> >> usbc_dp: endpoint {
> >> remote-endpoint = <&tcphy0_typec_dp>;
> >> };
> >> };
> >>
> >>
> >>>>>>> + port@1 {
> >>>>>>> + reg = <1>;
> >>>>>>> +
> >>>>>>> + usbc_ss: endpoint {
> >>>>>>> + remote-endpoint = <&tcphy0_typec_ss>;
> >>>>>>> + };
> >>>>>>> + };
> >>>>>>> +
> >>>>>>> + port@2 {
> >>>>>>> + reg = <2>;
> >>>>>>> +
> >>>>>>> + usbc_dp: endpoint {
> >>>>>>> + remote-endpoint = <&tcphy0_typec_dp>;
> >>>>>>> + };
> >>>>>>> + };
> >>>>>>> + };
> >>>>>>> + };
> >>>>>>> + };
> >>>>>>> +};
> >>>>>>> +
> >>>>>> .....
> >>>>>>> &u2phy0 {
> >>>>>>> status = "okay";
> >>>>>>> +
> >>>>>>> + port {
> >>>>>>> + u2phy0_typec_hs: endpoint {
> >>>>>>> + remote-endpoint = <&usbc_hs>;
> >>>>>>> + };
> >>>>>>> + };
> >>>>>>> };
> >>>>>>>
> >>>>>> There is no switch and mux, how to co-work with Type-C?
> >>>>> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
> >>>> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
> >>> I assume the Micro-USB connector does not use Type-C/PD IC, is it
> >>> right? Does it relate to this patch?
> >>>
> >>> Best regards,
> >>> Peter
> >>>
> >
> --
> Best,
> Chaoyi
>
On 10/30/2025 2:13 PM, Peter Chen wrote:
> On Thu, Oct 30, 2025 at 11:14 AM Chaoyi Chen <chaoyi.chen@rock-chips.com> wrote:
>> On 10/30/2025 10:50 AM, Peter Chen wrote:
>>
>>>>> Okay. My question is basic: USB2 PHY supplies DP/DM, and the DP/DM is
>>>>> short for Type-C connector,
>>>>> and no control is needed for Type-C application.
>>>>> Why is there a remote-endpoint connection between USB2 PHY and Type-C connector?
>>>> From the perspective of Type-C, this should not be added. Is the approach in v2 correct [0] ?
>>>>
>>> Have you tried debugging based on upstream code?
>> Yes, I have tried both the v2 and v8 approaches, and both can work.
>>
>>
>>> v2 is correct, but the dts needs to improve.
>>> - There is a remote-endpoint connection for USB role switch between
>>> Type-C connector
>>> device and USB controller device
>>> - There is a remote-endpoint connection for orientation and lane configuration
>>> between Type-C connector device and USB/DP PHY device.
>> In v8 patch5, we implemented typec_mux and typec_switch in the USB/DP PHY.
>>
>> I think the current remote-endpoint connections are all child node of the USB/DP PHY. That is:
>>
>>
>> &tcphy0_dp {
>> mode-switch;
>> ...
>> };
>>
>>
>> &tcphy0_usb3 {
>> orientation-switch;
>> ...
>> };
>>
>>
>> Does this still need to be improved? Thank you.
>>
> Hi Chaoyi,
>
> There are two questions I have still not seen the answer to:
> - Why USB2 PHY is related to your Type-C patch?
I was just following other people's approach. Sorry, this should be removed from the dts.
> - How does the USB role switch event notify the USB controller driver, eg dwc3?
Sorry, I misunderstood what you said before. There is indeed a missing usb-role-switch now. I referred to the approach in rk3588-evb1-v10.dts. Is the following way of writing correct?
&usbc_connector {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usbc_orien_sw: endpoint {
remote-endpoint = <&tcphy0_typec_orien_sw>;
};
};
port@1 {
reg = <1>;
usbc_role_sw: endpoint {
remote-endpoint = <&dwc3_0_role_switch>;
};
};
port@2 {
reg = <2>;
usbc_dp: endpoint {
remote-endpoint = <&tcphy0_typec_dp>;
};
};
};
};
&usbdrd_dwc3_0 {
status = "okay";
usb-role-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
dwc3_0_role_switch: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc_role_sw>;
};
};
};
&tcphy0_usb3 {
orientation-switch;
port {
tcphy0_typec_orien_sw: endpoint {
remote-endpoint = <&usbc_orien_sw>;
};
};
};
&tcphy0_dp {
mode-switch;
port {
#address-cells = <1>;
#size-cells = <0>;
tcphy0_typec_dp: endpoint@0 {
reg = <0>;
remote-endpoint = <&usbc_dp>;
};
};
};
> Peter
>>> Peter
>>>
>>>> [0]: https://lore.kernel.org/all/20250715112456.101-6-kernel@airkyi.com/
>>>>
>>>> Or is the following approach correct?
>>>>
>>>>
>>>> port@0 {
>>>> reg = <0>;
>>>>
>>>> usbc_hs: endpoint {
>>>> remote-endpoint = <&tcphy0>;
>>>> };
>>>> };
>>>>
>>>> port@1 {
>>>> reg = <1>;
>>>>
>>>> usbc_ss: endpoint {
>>>> remote-endpoint = <&tcphy0>;
>>>> };
>>>> };
>>>>
>>>> port@2 {
>>>> reg = <2>;
>>>>
>>>> usbc_dp: endpoint {
>>>> remote-endpoint = <&tcphy0_typec_dp>;
>>>> };
>>>> };
>>>>
>>>>
>>>>>>>>> + port@1 {
>>>>>>>>> + reg = <1>;
>>>>>>>>> +
>>>>>>>>> + usbc_ss: endpoint {
>>>>>>>>> + remote-endpoint = <&tcphy0_typec_ss>;
>>>>>>>>> + };
>>>>>>>>> + };
>>>>>>>>> +
>>>>>>>>> + port@2 {
>>>>>>>>> + reg = <2>;
>>>>>>>>> +
>>>>>>>>> + usbc_dp: endpoint {
>>>>>>>>> + remote-endpoint = <&tcphy0_typec_dp>;
>>>>>>>>> + };
>>>>>>>>> + };
>>>>>>>>> + };
>>>>>>>>> + };
>>>>>>>>> + };
>>>>>>>>> +};
>>>>>>>>> +
>>>>>>>> .....
>>>>>>>>> &u2phy0 {
>>>>>>>>> status = "okay";
>>>>>>>>> +
>>>>>>>>> + port {
>>>>>>>>> + u2phy0_typec_hs: endpoint {
>>>>>>>>> + remote-endpoint = <&usbc_hs>;
>>>>>>>>> + };
>>>>>>>>> + };
>>>>>>>>> };
>>>>>>>>>
>>>>>>>> There is no switch and mux, how to co-work with Type-C?
>>>>>>> I checked the phy-rockchip-inno-usb2.c but did not find any switch or mux. Does this mean that we need to implement them? Thank you.
>>>>>> Wait a minute, actually we have multiple hardware interfaces, one of which is Type-C, eventually connected to USBDPPHY, and the other is micro-usb connected to U2PHY.
>>>>> I assume the Micro-USB connector does not use Type-C/PD IC, is it
>>>>> right? Does it relate to this patch?
>>>>>
>>>>> Best regards,
>>>>> Peter
>>>>>
>> --
>> Best,
>> Chaoyi
>>
>
--
Best,
Chaoyi
On 25-10-30 14:50:33, Chaoyi Chen wrote:
> > Hi Chaoyi,
> >
> > There are two questions I have still not seen the answer to:
> > - Why USB2 PHY is related to your Type-C patch?
>
> I was just following other people's approach. Sorry, this should be removed from the dts.
>
>
> > - How does the USB role switch event notify the USB controller driver, eg dwc3?
>
> Sorry, I misunderstood what you said before. There is indeed a missing usb-role-switch now. I referred to the approach in rk3588-evb1-v10.dts. Is the following way of writing correct?
>
> &usbc_connector {
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> reg = <0>;
>
> usbc_orien_sw: endpoint {
> remote-endpoint = <&tcphy0_typec_orien_sw>;
> };
> };
>
> port@1 {
> reg = <1>;
>
> usbc_role_sw: endpoint {
> remote-endpoint = <&dwc3_0_role_switch>;
> };
> };
>
>
> port@2 {
> reg = <2>;
>
> usbc_dp: endpoint {
> remote-endpoint = <&tcphy0_typec_dp>;
> };
> };
> };
> };
>
> &usbdrd_dwc3_0 {
> status = "okay";
> usb-role-switch;
>
> port {
> #address-cells = <1>;
> #size-cells = <0>;
> dwc3_0_role_switch: endpoint@0 {
> reg = <0>;
> remote-endpoint = <&usbc_role_sw>;
> };
> };
> };
>
> &tcphy0_usb3 {
> orientation-switch;
>
> port {
> tcphy0_typec_orien_sw: endpoint {
> remote-endpoint = <&usbc_orien_sw>;
> };
> };
> };
>
> &tcphy0_dp {
> mode-switch;
>
> port {
> #address-cells = <1>;
> #size-cells = <0>;
>
> tcphy0_typec_dp: endpoint@0 {
> reg = <0>;
> remote-endpoint = <&usbc_dp>;
> };
> };
> };
>
The general hierarchy is okay, just need to fix some dts coding
style issue.
--
Best regards,
Peter
Hi Peter,
On 10/31/2025 10:57 AM, Peter Chen (CIX) wrote:
> On 25-10-30 14:50:33, Chaoyi Chen wrote:
>>> Hi Chaoyi,
>>>
>>> There are two questions I have still not seen the answer to:
>>> - Why USB2 PHY is related to your Type-C patch?
>> I was just following other people's approach. Sorry, this should be removed from the dts.
>>
>>
>>> - How does the USB role switch event notify the USB controller driver, eg dwc3?
>> Sorry, I misunderstood what you said before. There is indeed a missing usb-role-switch now. I referred to the approach in rk3588-evb1-v10.dts. Is the following way of writing correct?
>>
>> &usbc_connector {
>> ports {
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> port@0 {
>> reg = <0>;
>>
>> usbc_orien_sw: endpoint {
>> remote-endpoint = <&tcphy0_typec_orien_sw>;
>> };
>> };
>>
>> port@1 {
>> reg = <1>;
>>
>> usbc_role_sw: endpoint {
>> remote-endpoint = <&dwc3_0_role_switch>;
>> };
>> };
>>
>>
>> port@2 {
>> reg = <2>;
>>
>> usbc_dp: endpoint {
>> remote-endpoint = <&tcphy0_typec_dp>;
>> };
>> };
>> };
>> };
>>
>> &usbdrd_dwc3_0 {
>> status = "okay";
>> usb-role-switch;
>>
>> port {
>> #address-cells = <1>;
>> #size-cells = <0>;
>> dwc3_0_role_switch: endpoint@0 {
>> reg = <0>;
>> remote-endpoint = <&usbc_role_sw>;
>> };
>> };
>> };
>>
>> &tcphy0_usb3 {
>> orientation-switch;
>>
>> port {
>> tcphy0_typec_orien_sw: endpoint {
>> remote-endpoint = <&usbc_orien_sw>;
>> };
>> };
>> };
>>
>> &tcphy0_dp {
>> mode-switch;
>>
>> port {
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> tcphy0_typec_dp: endpoint@0 {
>> reg = <0>;
>> remote-endpoint = <&usbc_dp>;
>> };
>> };
>> };
>>
> The general hierarchy is okay, just need to fix some dts coding
> style issue.
Thank you for your explanation. I will fix this in v9.
>
© 2016 - 2025 Red Hat, Inc.