Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Abduwaris Nurmemet" <daabu@qq.com>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B
Date: Sun, 29 Nov 2026 07:25:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-239360@kernel.org> (raw)
In-Reply-To: <tencent_6C8F4D1FC13C132AAC5E8C52495606EEB208@qq.com>

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] arm64: dts: rockchip: io-1v8-domains duplicates
  rockchip-io-domain binding
- [Medium] pinctrl: rockchip: rk3308_io_voltage_domains() omits
  RK3308_SOC_CON0_VCCIO3
- [Low] pinctrl: rockchip: rk3308_io_voltage_domains() skipped on
  RK3308B re-probe
- [Low] arm64: dts: rockchip: missing Fixes trailer for commit
  79f2a1702441
--

commit f8e62c4d74aa8aebe6ba5cff7d03a7e2c8622004
Author: Abduwaris Nurmemet <daabu@qq.com>

> arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B
>
> The AP6255 (BCM43455) SDIO WiFi module is connected to I/O domain 4,
> which is supplied with 1.8V on this board.  Without describing that,
> the bus is left at 3.3V and either fails to enumerate (mmc2: error
> -84) or only works at a very low clock.
>
> Describe the 1.8V domain in the pinctrl node so the Rockchip pinctrl
> driver programs it before the SDIO controller probes, and allow the
> bus to run at 50 MHz.
>
> Signed-off-by: Abduwaris Nurmemet <daabu@qq.com>

[Severity: Low]
This fixes broken SDIO WiFi enumeration on the Sakura Pi RK3308B board
introduced in 79f2a1702441 ("arm64: dts: rockchip: add DTs for Sakura Pi
RK3308B").  Should the commit message include:

  Fixes: 79f2a1702441 ("arm64: dts: rockchip: add DTs for Sakura Pi RK3308B")

> diff --git a/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
> index 3473db08b9b26..e0c1c8ee6527a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
> @@ -135,6 +135,8 @@ &i2c1 {
>  &pinctrl {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&rtc_32k>;
> +	/* I/O domain 4 (SDIO) is supplied with 1.8V on this board */
> +	io-1v8-domains = <0x10>;
>  
>  	bluetooth {
>  		bt_reg_on: bt-reg-on {

[Severity: Medium]
Why add a custom io-1v8-domains bitmask property on &pinctrl instead of
enabling the existing &io_domains node from rk3308.dtsi?

RK3308 I/O voltage domains are already described by
rockchip,rk3308-io-voltage-domain and managed by
drivers/soc/rockchip/io-domain.c, which programs RK3308_SOC_CON0 from
vccio0-supply through vccio5-supply and tracks regulator voltage changes.
Duplicating RK3308_SOC_CON0 programming in rk3308_io_voltage_domains() in
commit "pinctrl: rockchip: program RK3308 I/O domains before SDIO probes"
creates two drivers writing the same GRF register and forces every unset bit
in RK3308_SOC_CON0_DOMAINS to 3.3V, overwriting any earlier configuration for
unspecified domains.

Other mainline RK3308 boards with 1.8V SDIO WiFi enable &io_domains with
vccio4-supply = <&vcc_1v8> (and vccio0/1/2/3/5-supply = <&vcc_io>) and wire
vmmc-supply = <&vcc_io> and vqmmc-supply = <&vcc_1v8> on &sdio, using the
vcc_1v8 and vcc_io regulators already defined in this board's DT.

[Severity: Medium]
In commit "pinctrl: rockchip: program RK3308 I/O domains before SDIO probes",
does rk3308_io_voltage_domains() leave domain 3 (VCCIO3) under external GPIO
control when bit 3 is set in io-1v8-domains?

drivers/pinctrl/pinctrl-rockchip.c:rk3308_io_voltage_domains() {
	...
	ret = regmap_write(info->regmap_base, RK3308_SOC_CON0,
			   io_volt_select | (RK3308_SOC_CON0_DOMAINS << 16));
	...
}

As seen in rk3308_iodomain_init() in drivers/soc/rockchip/io-domain.c,
RK3308_SOC_CON0_VCCIO3 (BIT(8) with write-enable BIT(24)) must also be set in
RK3308_SOC_CON0 before VCCIO3 obeys the GRF voltage selection bit rather than
a dedicated GPIO pin.

[Severity: Low]
In commit "pinctrl: rockchip: program RK3308 I/O domains before SDIO probes",
can rk3308_io_voltage_domains() be skipped if rockchip_pinctrl_probe() is
re-run after a deferred probe or rebind on an RK3308B?

drivers/pinctrl/pinctrl-rockchip.c:rockchip_pinctrl_probe() {
	...
	if (ctrl->type == RK3308)
		rk3308_io_voltage_domains(info);

	if (ctrl->type == RK3308) {
		ret = rk3308_soc_data_init(info);
	...
}

rk3308_soc_data_init() mutates the static rk3308_pin_ctrl.type from RK3308 to
RK3308B on RK3308B SoCs.  If rockchip_pinctrl_probe() later fails or defers
(for example during rockchip_pinctrl_register() or of_platform_populate()), a
subsequent probe sees ctrl->type == RK3308B and skips
rk3308_io_voltage_domains().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_9AD984A6BE60BE89025645C689A413032507@qq.com?part=3

      reply	other threads:[~2026-11-29  7:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261129071403.4890-1-daabu@qq.com>
2026-11-29  7:14 ` [PATCH 1/3] dt-bindings: pinctrl: rockchip: document io-1v8-domains Abduwaris Nurmemet
2026-11-29  7:21   ` sashiko-bot
2026-11-29  7:14 ` [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes Abduwaris Nurmemet
2026-11-29  7:25   ` sashiko-bot
2026-11-29  7:14 ` [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B Abduwaris Nurmemet
2026-11-29  7:25   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-239360@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daabu@qq.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox