[PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1

Alexey Charkov posted 5 patches 2 weeks, 6 days ago
There is a newer version of this series
[PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1
Posted by Alexey Charkov 2 weeks, 6 days ago
Rockchip RK3576 EVB1 board has a Hynetek HUSB311 USB Type-C controller on
its Type-C OTG port, which also supports DisplayPort Alternate Mode.

Add the required DT nodes to enable basic HUSB311 operation.

Note that for full support of mode and orientation switching, the USBDP
PHY schema may need to be expanded, such as in [1]. This is left out for
now until the respective schema is finalized and merged.

[1] https://lore.kernel.org/linux-rockchip/20260313-rockchip-usbdp-cleanup-v3-1-3e8fe89a35b5@collabora.com/

Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
 arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts
index fb0dd1bc5148..df6c4b4b05f6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/soc/rockchip,vop2.h>
+#include <dt-bindings/usb/pd.h>
 #include "rk3576.dtsi"
 
 / {
@@ -769,6 +770,25 @@ regulator-state-mem {
 &i2c2 {
 	status = "okay";
 
+	usbc0: typec-portc@4e {
+		compatible = "hynetek,husb311", "richtek,rt1711h";
+		reg = <0x4e>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usbc0_int>;
+		vbus-supply = <&vbus5v0_typec>;
+
+		connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			data-role = "dual";
+			power-role = "source";
+			source-pdos = <PDO_FIXED(5000, 2000,
+						 PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;
+		};
+	};
+
 	hym8563: rtc@51 {
 		compatible = "haoyu,hym8563";
 		reg = <0x51>;

-- 
2.52.0
Re: [PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1
Posted by Krzysztof Kozlowski 2 weeks, 5 days ago
On Tue, Mar 17, 2026 at 10:08:02PM +0400, Alexey Charkov wrote:
> Rockchip RK3576 EVB1 board has a Hynetek HUSB311 USB Type-C controller on
> its Type-C OTG port, which also supports DisplayPort Alternate Mode.
> 
> Add the required DT nodes to enable basic HUSB311 operation.
> 
> Note that for full support of mode and orientation switching, the USBDP
> PHY schema may need to be expanded, such as in [1]. This is left out for
> now until the respective schema is finalized and merged.
> 
> [1] https://lore.kernel.org/linux-rockchip/20260313-rockchip-usbdp-cleanup-v3-1-3e8fe89a35b5@collabora.com/
> 
> Signed-off-by: Alexey Charkov <alchark@flipper.net>
> ---
>  arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)

DTS patch must not be in this patchset. Don't mix it.

Best regards,
Krzysztof
Re: [PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1
Posted by Krzysztof Kozlowski 2 weeks, 5 days ago
On 18/03/2026 09:17, Krzysztof Kozlowski wrote:
> On Tue, Mar 17, 2026 at 10:08:02PM +0400, Alexey Charkov wrote:
>> Rockchip RK3576 EVB1 board has a Hynetek HUSB311 USB Type-C controller on
>> its Type-C OTG port, which also supports DisplayPort Alternate Mode.
>>
>> Add the required DT nodes to enable basic HUSB311 operation.
>>
>> Note that for full support of mode and orientation switching, the USBDP
>> PHY schema may need to be expanded, such as in [1]. This is left out for
>> now until the respective schema is finalized and merged.
>>
>> [1] https://lore.kernel.org/linux-rockchip/20260313-rockchip-usbdp-cleanup-v3-1-3e8fe89a35b5@collabora.com/
>>
>> Signed-off-by: Alexey Charkov <alchark@flipper.net>
>> ---
>>  arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
> 
> DTS patch must not be in this patchset. Don't mix it.

In case I am too vague: by don't mix it, I mean - separate DTS changes
to independent patchset. They cannot be combined into USB posting.

Best regards,
Krzysztof
Re: [PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1
Posted by Alexey Charkov 2 weeks, 5 days ago
On Wed, Mar 18, 2026 at 12:19 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 18/03/2026 09:17, Krzysztof Kozlowski wrote:
> > On Tue, Mar 17, 2026 at 10:08:02PM +0400, Alexey Charkov wrote:
> >> Rockchip RK3576 EVB1 board has a Hynetek HUSB311 USB Type-C controller on
> >> its Type-C OTG port, which also supports DisplayPort Alternate Mode.
> >>
> >> Add the required DT nodes to enable basic HUSB311 operation.
> >>
> >> Note that for full support of mode and orientation switching, the USBDP
> >> PHY schema may need to be expanded, such as in [1]. This is left out for
> >> now until the respective schema is finalized and merged.
> >>
> >> [1] https://lore.kernel.org/linux-rockchip/20260313-rockchip-usbdp-cleanup-v3-1-3e8fe89a35b5@collabora.com/
> >>
> >> Signed-off-by: Alexey Charkov <alchark@flipper.net>
> >> ---
> >>  arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 20 ++++++++++++++++++++
> >>  1 file changed, 20 insertions(+)
> >
> > DTS patch must not be in this patchset. Don't mix it.
>
> In case I am too vague: by don't mix it, I mean - separate DTS changes
> to independent patchset. They cannot be combined into USB posting.

Thanks Krzysztof. I will split them out in the next submission. I
think it's important to first agree on the use of fallback compatibles
and the best way to handle the (already queued up in next) ET7304
patches this cycle before their bindings hit mainline. Then, I can
rebase and squash/split everything as required.

Best regards,
Alexey
Re: [PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1
Posted by Krzysztof Kozlowski 2 weeks, 5 days ago
On 18/03/2026 09:30, Alexey Charkov wrote:
> On Wed, Mar 18, 2026 at 12:19 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 18/03/2026 09:17, Krzysztof Kozlowski wrote:
>>> On Tue, Mar 17, 2026 at 10:08:02PM +0400, Alexey Charkov wrote:
>>>> Rockchip RK3576 EVB1 board has a Hynetek HUSB311 USB Type-C controller on
>>>> its Type-C OTG port, which also supports DisplayPort Alternate Mode.
>>>>
>>>> Add the required DT nodes to enable basic HUSB311 operation.
>>>>
>>>> Note that for full support of mode and orientation switching, the USBDP
>>>> PHY schema may need to be expanded, such as in [1]. This is left out for
>>>> now until the respective schema is finalized and merged.
>>>>
>>>> [1] https://lore.kernel.org/linux-rockchip/20260313-rockchip-usbdp-cleanup-v3-1-3e8fe89a35b5@collabora.com/
>>>>
>>>> Signed-off-by: Alexey Charkov <alchark@flipper.net>
>>>> ---
>>>>  arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 20 ++++++++++++++++++++
>>>>  1 file changed, 20 insertions(+)
>>>
>>> DTS patch must not be in this patchset. Don't mix it.
>>
>> In case I am too vague: by don't mix it, I mean - separate DTS changes
>> to independent patchset. They cannot be combined into USB posting.
> 
> Thanks Krzysztof. I will split them out in the next submission. I
> think it's important to first agree on the use of fallback compatibles
> and the best way to handle the (already queued up in next) ET7304
> patches this cycle before their bindings hit mainline. Then, I can
> rebase and squash/split everything as required.

These are independent problems. But if you want to connect them, then
here you have:
If I review the patch, Greg will take everything, defeating the purpose
of my comment. So as you can see, I should rather not review them to
achieve one of my goals.

Best regards,
Krzysztof
Re: [PATCH v2 5/5] arm64: dts: rockchip: Add HUSB311 Type-C controller on RK3576 EVB1
Posted by Alexey Charkov 2 weeks, 5 days ago
On Wed, Mar 18, 2026 at 12:39 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 18/03/2026 09:30, Alexey Charkov wrote:
> > On Wed, Mar 18, 2026 at 12:19 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >>
> >> On 18/03/2026 09:17, Krzysztof Kozlowski wrote:
> >>> On Tue, Mar 17, 2026 at 10:08:02PM +0400, Alexey Charkov wrote:
> >>>> Rockchip RK3576 EVB1 board has a Hynetek HUSB311 USB Type-C controller on
> >>>> its Type-C OTG port, which also supports DisplayPort Alternate Mode.
> >>>>
> >>>> Add the required DT nodes to enable basic HUSB311 operation.
> >>>>
> >>>> Note that for full support of mode and orientation switching, the USBDP
> >>>> PHY schema may need to be expanded, such as in [1]. This is left out for
> >>>> now until the respective schema is finalized and merged.
> >>>>
> >>>> [1] https://lore.kernel.org/linux-rockchip/20260313-rockchip-usbdp-cleanup-v3-1-3e8fe89a35b5@collabora.com/
> >>>>
> >>>> Signed-off-by: Alexey Charkov <alchark@flipper.net>
> >>>> ---
> >>>>  arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts | 20 ++++++++++++++++++++
> >>>>  1 file changed, 20 insertions(+)
> >>>
> >>> DTS patch must not be in this patchset. Don't mix it.
> >>
> >> In case I am too vague: by don't mix it, I mean - separate DTS changes
> >> to independent patchset. They cannot be combined into USB posting.
> >
> > Thanks Krzysztof. I will split them out in the next submission. I
> > think it's important to first agree on the use of fallback compatibles
> > and the best way to handle the (already queued up in next) ET7304
> > patches this cycle before their bindings hit mainline. Then, I can
> > rebase and squash/split everything as required.
>
> These are independent problems. But if you want to connect them, then
> here you have:
> If I review the patch, Greg will take everything, defeating the purpose
> of my comment. So as you can see, I should rather not review them to
> achieve one of my goals.

I thought that having the DTS user with the binding that introduces
its existence helps the initial discussion. With the DTS change being
as minimal as it is here, it's definitely no biggie though.

I appreciate your guidance on the fact that Greg applies a series as a
whole. Will split up.

Best regards,
Alexey