[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yzmnjzndvqod6gdjlafvt23i3q7fq6dtzvevhhgs55eznl2uh7@tf6d2sxpp6gu>
Date: Fri, 9 May 2025 16:17:07 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Diederik de Haas <didi.debian@...ow.org>
Cc: Heiko Stuebner <heiko@...ech.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel@...labora.com
Subject: Re: [PATCH v2 5/5] arm64: dts: rockchip: add USB-C support for ROCK
5B+
Hi,
On Fri, May 09, 2025 at 03:18:04PM +0200, Diederik de Haas wrote:
> On Thu May 8, 2025 at 7:48 PM CEST, Sebastian Reichel wrote:
> > Add hardware description for the USB-C port in the Radxa ROCK 5 Model B+
> > This describes the OHCI, EHCI and XHCI USB parts, but not yet the DisplayPort
> > AltMode, since the bindings for that are not yet upstream.
> >
> > Support for the ROCK 5B is prepared, but not exposed at the moment,
> > since it results in unreliable boot behavior due to hard resets killing
> > the supply voltage. Some further investigation and fixes in the kernel's
> > Type-C Port Manager (TCPM) state machine is needed before exposing the
> > port. The ROCK 5B+ has a dedicated port for powering the board and thus
> > is not affected.
> >
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> > ---
> > .../boot/dts/rockchip/rk3588-rock-5b-plus.dts | 16 +++
> > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 23 ++++
> > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 137 +++++++++++++++++++++
> > 3 files changed, 176 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts
> > index 74c7b6502e4dda4b774f43c704ebaee350703c0d..4096cd853f9a909e4233d2c61a1fe5ee83904c4c 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts
> > @@ -99,12 +99,28 @@ pcie3x2_rst: pcie3x2-rst {
> > };
> >
> > usb {
> > + usbc_sbu_dc: usbc-sbu-dc {
> > + rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>,
> > + <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
> > + };
> > +
> > vcc5v0_host_en: vcc5v0-host-en {
> > rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
> > };
> > };
> > };
> >
> > +&usbc0 {
> > + status = "okay";
> > +};
> > +
> > +&usbdp_phy0 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&usbc_sbu_dc>;
> > + sbu1-dc-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
> > + sbu2-dc-gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
> > +};
> > +
> > &vcc5v0_host {
> > enable-active-high;
> > gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > index 9407a7c9910ada1f6c803d2e15785a9cbd9bd655..ab0c572ea9234f373af4a47db93fc1786f0e6fbf 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > @@ -36,8 +36,20 @@ &uart6 {
> > status = "okay";
> > };
> >
> > +&usbdp_phy0 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&usbc_sbu_dc>;
> > + sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
> > + sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
> > +};
> > +
> > &pinctrl {
> > usb {
> > + usbc_sbu_dc: usbc-sbu-dc {
> > + rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>,
> > + <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
>
> Shouldn't these be <4 RK_PA6 ...> and <4 RK_PA7 ...> ?
>
> In the rock5bp_v1.2 schematic they're (IIUC) GPIO0_C4 and _C5, but in
> rock_5b_v1450 schematic TYPEC0_SBU1_DC and TYPEC0_SBU2_DC are on
> GPIO4_A6 and GPIO4_A7.
>
> And in rock_5b_v1450 GPIO0_C4 and _C5 are connected to WIFI_REG_ON_H and
> BT_W AKE_HOST_H respectively.
Yes. I screwed that up when copying over the new pinctrl from the
5B+. FWIW I'm not very happy about the /delete-node/ hack anyways.
Let's postpone (drop) this patch adding USB-C support for now. Hopefully
I soon find a way to get the PD sink more stable.
Greetings,
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists