[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANAwSgTGJ5mqoieWOse3OCO3pFepwn1eQx-Hu+O1Pj6hkpdNXg@mail.gmail.com>
Date: Mon, 12 Jan 2026 01:01:34 +0530
From: Anand Moon <linux.amoon@...il.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Heiko Stuebner <heiko@...ech.de>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>, FUKAUMI Naoki <naoki@...xa.com>,
Diederik de Haas <didi.debian@...ow.org>, Yongbo Zhang <giraffesnn123@...il.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>,
"moderated list:ARM/Rockchip SoC support" <linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Rockchip SoC support" <linux-rockchip@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:USB TYPEC CLASS" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH v1 1/3] arm64: dts: rockchip: rk3588-rock-5b-5bp-5t:
Correct Type-C pin bias settings
Hi Sebastian,
I am having difficulty articulating my thoughts clearly right now;
please bear with me as I try to explain.
On Sat, 10 Jan 2026 at 04:41, Sebastian Reichel
<sebastian.reichel@...labora.com> wrote:
>
> Hi,
>
> On Thu, Jan 08, 2026 at 12:24:50PM +0530, Anand Moon wrote:
> > Hi Sebastian,
> >
> > Thanks for your review comments.
> >
> > On Sat, 3 Jan 2026 at 19:23, Sebastian Reichel
> > <sebastian.reichel@...labora.com> wrote:
> > >
> > > Hi,
> > >
> > > On Sat, Jan 03, 2026 at 02:01:17PM +0530, Anand Moon wrote:
> > > > As pre FUSB302 datasheet interrupt line (INT_N) is an open-drain,
> > > > active-low signal. It requires a pull-up resistor to maintain a stable
> > > > high state when deasserted. Similarly, the TYPEC5V_PWREN_H enable signal
> > > > requires a pull-down resistor to ensure it defaults to a low state,
> > > > preventing unintended power delivery during the boot sequence.
> > > >
> > > > Update the pinctrl entries to use pcfg_pull_up for usbc0_int and
> > > > pcfg_pull_down for vbus5v0_typec_en to align with the hardware's
> > > > electrical requirements.
> > > >
> > > > Cc: Sebastian Reichel <sebastian.reichel@...labora.com>
> > > > Fixes: 67b2c15d8fb3 ("arm64: dts: rockchip: add USB-C support for ROCK 5B/5B+/5T")
> > > > Signed-off-by: Anand Moon <linux.amoon@...il.com>
> > > > ---
> > > > v1: As per the shematics CC_INT_L interrupt pin is GPIO3_B4_u
> > > > As per the shematics TYPEC5V_PWREN_H pin is GPIO2_B6_d
> > > > ---
> > >
> > > Checking the schematics:
> > >
> > > 5B v1.45 - CC_INT_L - R2613 10K pull-up resistor
> > > 5B v1.45 - TYPEC5V_PWREN_H - GPIO is effectively unused because R95035 is NC
> > >
> > > 5B+ v1.2 - CC_INT_L - R2613 10K pull-up resistor
> > > 5B+ v1.2 - TYPEC5V_PWREN_H - R163 100K pull-down resistor
> > >
> > > 5T v1.2 - CC_INT_L - R2613 10K pull-up resistor
> > > 5T v1.2 - TYPEC5V_PWREN_H - R163 100K pull-down resistor
> > >
> > CC_INT_L is gpio interrupt pin to enable the I2C read operation.
> >
> > As per FUSB302 datasheet, here is the updated version of the commit message
> >
> > Configure CC_INT_L as an active-low, open-drain output. Per the hardware design,
> > this pin utilizes an external pull-up and is driven LOW by the Type-C
> > controller to
> > signal the processor to perform I2C register reads.
> >
> > The TYPEC5V_PWREN_H pull-down resistor is turned on as a signal to
> > the Type-C regulator, which has an active-enable-high property. In this context,
> > the regulator is used to set the polarity of the GPIO used to enable or disable
> > the regulator.
>
> I don't understand what you want to say here.
I'm sorry for not being clear here. Well, while investigating the bug crash,
I was looking for some more details on this issue.
Here is the datasheet for fuse302. It shares the interrupt pin details
[1} https://www.onsemi.com/download/data-sheet/pdf/fusb302b-d.pdf
SCL Input I2C serial clock signal to be
connected to the phone-based I2C master.
SDA Open-Drain I/O I2C serial data signal to be connected
to the phone-based I2C master
INT_N Open-Drain Output Active LOW open drain interrupt output used
to prompt the processor to
read the I2C register bits.
>
> > > TLDR: All GPIOs have pull resistors in discrete hardware and do not
> > > need them muxed in the SoC.
> > >
> > It depends on the GPIO, pinctrl PMU configuration.
>
> as I try to say it does not depend on pinctrl configuration for any
> of the GPIOs you are touching. The pull resistors for them exist as
> components on the board.
>
I understand this correctly, but these registers utilize a high-to-low
state change specifically
to prevent subthreshold leakage current.
Please check the RK3588 Datasheet V0.1-20210727.pdf (3.4 Electrical
Characteristics for General IO)
[2] https://gitlab.com/rock-chips/rk3588/rk3588-doc/-/raw/master/RK3588%20Datasheet%20V0.1-20210727.pdf?ref_type=heads&inline=true
> > I was thinking of converting the vbus5v0_typec regulator to 'regulator-gpio.'
> > to better reflect the hardware schematics. The TYPEC5V_PWREN_H signal
> > (GPIO2_B6_d) acts as a state controller rather than a simple enable pin,
> > and this change ensures the device tree aligns with that design
> >
> > [1] https://dl.radxa.com/rock5/5b/docs/hw/radxa_rock_5b_v1450_schematic.pdf
> > (page 28)
> >
> > $ git diff arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
> > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
> > index 5f58e339a052..387ff009ec76 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi
> > @@ -57,9 +57,10 @@ rfkill-bt {
> > };
> >
> > vbus5v0_typec: vbus5v0-typec {
> > - compatible = "regulator-fixed";
> > + compatible = "regulator-gpio";
> > enable-active-high;
> > - gpio = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
> > + gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
> > + states = <5000000 0x1>, <0 0x0>;
> > pinctrl-names = "default";
> > pinctrl-0 = <&vbus5v0_typec_en>;
> > regulator-name = "vbus5v0_typec";
> >
> > Could you please try this at your end?
>
> This is missing gpios-states, but I also see no point in testing
> that. Having one state as 0 effectively means this is a complicated
> version of regulator-fixed. The switch from "gpio" to "gpios" is
> valid though, since "gpio" is deprecated.
>
Typically, a regulator-fixed GPIO input pin is used as EN to enable
the regulator.
However, in this case, TYPEC5V_PWREN_H is being used to signal on/off
to the FUSB302.
As the GPIO-controlled interrupt pin is used to enable or disable i2C
controller.
This is the reason I want to switch from regulator-fixed to regulator-gpio.
ok I will add gpios-states= <1>;
That’s why I requested these changes to be reviewed and tested.
[2] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
Please let me know if these adjustments are incorrect; if so, we can
discard them.
Currently, I'm not making the desired progress.
> Greetings,
>
> -- Sebastian
Thanks
-Anand
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
Powered by blists - more mailing lists