Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: pinctrl: rockchip: document io-1v8-domains
       [not found] <20261129071403.4890-1-daabu@qq.com>
@ 2026-11-29  7:14 ` Abduwaris Nurmemet
  2026-11-29  7:21   ` sashiko-bot
  2026-11-29 16:14   ` Heiko Stuebner
  2026-11-29  7:14 ` [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes Abduwaris Nurmemet
  2026-11-29  7:14 ` [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B Abduwaris Nurmemet
  2 siblings, 2 replies; 8+ messages in thread
From: Abduwaris Nurmemet @ 2026-11-29  7:14 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Heiko Stuebner, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-gpio, linux-arm-kernel,
	linux-kernel

Add the io-1v8-domains bitmask property.  It tells the pinctrl driver
which I/O domains are supplied with 1.8V instead of 3.3V.

Signed-off-by: Abduwaris Nurmemet <daabu@qq.com>
---
 .../devicetree/bindings/pinctrl/rockchip,pinctrl.yaml    | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
index 81747bb..0aaea2c 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
@@ -76,6 +76,15 @@ properties:
 
   ranges: true
 
+  io-1v8-domains:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      Bitmask of I/O domains supplied with 1.8V instead of 3.3V.  Each set
+      bit selects the corresponding I/O domain (bit 0 is domain 0).  If
+      omitted, all domains are assumed to run at 3.3V.  Currently only
+      implemented for the RK3308, where the mask is programmed into
+      GRF_SOC_CON0 before the SDIO controller probes.
+
 allOf:
   - $ref: pinctrl.yaml#
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes
       [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:14 ` Abduwaris Nurmemet
  2026-11-29  7:25   ` sashiko-bot
  2026-11-29 16:15   ` Heiko Stuebner
  2026-11-29  7:14 ` [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B Abduwaris Nurmemet
  2 siblings, 2 replies; 8+ messages in thread
From: Abduwaris Nurmemet @ 2026-11-29  7:14 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Heiko Stuebner, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-gpio, linux-arm-kernel,
	linux-kernel

The RK3308 SDIO controller is only reliable at 50 MHz when the I/O
domain feeding its pins is switched to 1.8V.  The generic io-domain
driver probes after the MMC controllers, which is too late: the SDIO
card is already being enumerated, so the bus either fails with
-84 or stays at a very low clock.

Program the domain selection from the pinctrl driver instead, which
probes before the MMC host.  Boards opt in with an io-1v8-domains
bitmask property on the pinctrl node, where each set bit marks an I/O
domain that runs at 1.8V.

This follows the approach used for the Rock Pi-S by Brent Roman.

Signed-off-by: Abduwaris Nurmemet <daabu@qq.com>
---
 drivers/pinctrl/pinctrl-rockchip.c | 37 ++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index ba47b6f..c9c888b 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -4761,6 +4761,40 @@ static int rk3308_soc_data_init(struct rockchip_pinctrl *info)
 	return 0;
 }
 
+#define RK3308_SOC_CON0			0x300
+#define RK3308_SOC_CON0_DOMAINS		GENMASK(5, 0)
+
+/*
+ * The RK3308 SDIO controller is only reliable at high clock rates when the
+ * I/O domain feeding its pins is configured for 1.8V. That setup has to
+ * happen before the SDIO controller probes, so do it here from the pinctrl
+ * driver rather than from the (later probing) io-domain driver.
+ *
+ * Boards opt in with an "io-1v8-domains" bitmask property on the pinctrl
+ * node, where each set bit marks an I/O domain that runs at 1.8V.
+ */
+static void rk3308_io_voltage_domains(struct rockchip_pinctrl *info)
+{
+	struct device *dev = info->dev;
+	u32 io_volt_select;
+	int ret;
+
+	if (device_property_read_u32(dev, "io-1v8-domains", &io_volt_select))
+		return;
+
+	if (io_volt_select & ~RK3308_SOC_CON0_DOMAINS) {
+		dev_warn(dev, "ignored invalid io-1v8-domains\n");
+		return;
+	}
+
+	ret = regmap_write(info->regmap_base, RK3308_SOC_CON0,
+			   io_volt_select | (RK3308_SOC_CON0_DOMAINS << 16));
+	if (ret < 0)
+		dev_warn(dev, "Couldn't update 1.8V I/O domains\n");
+	else
+		dev_info(dev, "1.8V I/O domains assigned 0x%03x\n", io_volt_select);
+}
+
 static int rockchip_pinctrl_probe(struct platform_device *pdev)
 {
 	struct rockchip_pinctrl *info;
@@ -4824,6 +4858,9 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
 	/* try to find the optional reference to the ioc1 syscon */
 	info->regmap_ioc1 = syscon_regmap_lookup_by_phandle_optional(np, "rockchip,ioc1");
 
+	if (ctrl->type == RK3308)
+		rk3308_io_voltage_domains(info);
+
 	if (ctrl->type == RK3308) {
 		ret = rk3308_soc_data_init(info);
 		if (ret)
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B
       [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:14 ` [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes Abduwaris Nurmemet
@ 2026-11-29  7:14 ` Abduwaris Nurmemet
  2026-11-29  7:25   ` sashiko-bot
  2 siblings, 1 reply; 8+ messages in thread
From: Abduwaris Nurmemet @ 2026-11-29  7:14 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Heiko Stuebner, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-gpio, linux-arm-kernel,
	linux-kernel

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>
---
 arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
index 3473db0..e0c1c8e 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 @@
 &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 {
@@ -193,6 +195,7 @@
 	non-removable;
 	no-mmc;
 	no-sd;
+	max-frequency = <50000000>;
 	status = "okay";
 
 	brcmf: wifi@1 {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: pinctrl: rockchip: document io-1v8-domains
  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 16:14   ` Heiko Stuebner
  1 sibling, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-29  7:21 UTC (permalink / raw)
  To: Abduwaris Nurmemet; +Cc: devicetree, linux-gpio, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: pinctrl: rockchip: duplicate io-1v8-domains
  binding for RK3308
--

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

dt-bindings: pinctrl: rockchip: document io-1v8-domains

This commit documents an io-1v8-domains bitmask property in the Rockchip
pinctrl binding to select 1.8V I/O domains on RK3308.

> diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
> index 81747bb530569..0aaea2c690c7c 100644
> --- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
> @@ -76,6 +76,15 @@ properties:
>  
>    ranges: true
>  
> +  io-1v8-domains:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: |
> +      Bitmask of I/O domains supplied with 1.8V instead of 3.3V.  Each set
> +      bit selects the corresponding I/O domain (bit 0 is domain 0).  If
> +      omitted, all domains are assumed to run at 3.3V.  Currently only
> +      implemented for the RK3308, where the mask is programmed into
> +      GRF_SOC_CON0 before the SDIO controller probes.

[Severity: Medium]
Does io-1v8-domains duplicate the existing
rockchip,rk3308-io-voltage-domain binding in
Documentation/devicetree/bindings/power/rockchip-io-domain.yaml?

RK3308 I/O domains (vccio0-supply through vccio5-supply) and GRF_SOC_CON0
(offset 0x300) are already modeled in arch/arm64/boot/dts/rockchip/rk3308.dtsi
and managed by drivers/soc/rockchip/io-domain.c (soc_data_rk3308 and
rk3308_iodomain_init()), which queries the supplying regulators, registers
voltage-change notifiers, and sets RK3308_SOC_CON0_VCCIO3.  Adding a raw
register bitmask property on the pinctrl node creates conflicting ownership
of GRF_SOC_CON0 between pinctrl-rockchip and rockchip-iodomain and encodes a
driver probe-ordering workaround into the binding.

In addition, the property lacks a rockchip, vendor prefix and is exposed at
the top level across all Rockchip pinctrl compatibles rather than being
restricted to rockchip,rk3308-pinctrl.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes
  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 16:15   ` Heiko Stuebner
  1 sibling, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-29  7:25 UTC (permalink / raw)
  To: Abduwaris Nurmemet; +Cc: devicetree, linux-gpio, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] pinctrl: rockchip: duplicate I/O domain setup in
  rk3308_io_voltage_domains()
- [Medium] pinctrl: rockchip: missing VCCIO3 ctrl bit in
  rk3308_io_voltage_domains()
- [Medium] pinctrl: rockchip: RK3308B init skipped on retry in
  rockchip_pinctrl_probe()
--

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

pinctrl: rockchip: program RK3308 I/O domains before SDIO probes

This commit adds rk3308_io_voltage_domains() to program RK3308_SOC_CON0
for 1.8V I/O domains during rockchip_pinctrl_probe() based on an
"io-1v8-domains" bitmask property on the pinctrl node.

> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index ba47b6f323ccc..c9c888b796ec1 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -4761,6 +4761,40 @@ static int rk3308_soc_data_init(struct rockchip_pinctrl *info)
>  	return 0;
>  }
>  
> +#define RK3308_SOC_CON0			0x300
> +#define RK3308_SOC_CON0_DOMAINS		GENMASK(5, 0)
> +
> +/*
> + * The RK3308 SDIO controller is only reliable at high clock rates when the
> + * I/O domain feeding its pins is configured for 1.8V. That setup has to
> + * happen before the SDIO controller probes, so do it here from the pinctrl
> + * driver rather than from the (later probing) io-domain driver.
> + *
> + * Boards opt in with an "io-1v8-domains" bitmask property on the pinctrl
> + * node, where each set bit marks an I/O domain that runs at 1.8V.
> + */
> +static void rk3308_io_voltage_domains(struct rockchip_pinctrl *info)
> +{
> +	struct device *dev = info->dev;
> +	u32 io_volt_select;
> +	int ret;
> +
> +	if (device_property_read_u32(dev, "io-1v8-domains", &io_volt_select))
> +		return;

[Severity: Medium]
Should this I/O domain configuration be handled by the existing
rockchip-iodomain driver in drivers/soc/rockchip/io-domain.c instead of
duplicating GRF_SOC_CON0 management in the pinctrl driver?

Mainline already supports RK3308 I/O domains via soc_data_rk3308
("rockchip,rk3308-io-voltage-domain"), which queries each vccio0-supply
through vccio5-supply regulator, leaves unspecified domains untouched, and
registers regulator voltage-change notifiers.  Programming RK3308_SOC_CON0
from a raw bitmask here bypasses the regulator framework and unconditionally
forces all six domains in GENMASK(5, 0) to either 1.8V or 3.3V.  If the
io-domain driver probes after dw_mmc-rockchip, fixing the probe ordering or
device dependency in drivers/soc/rockchip/io-domain.c would avoid
introducing a second, uncoordinated path for the same register.

> +
> +	if (io_volt_select & ~RK3308_SOC_CON0_DOMAINS) {
> +		dev_warn(dev, "ignored invalid io-1v8-domains\n");
> +		return;
> +	}
> +
> +	ret = regmap_write(info->regmap_base, RK3308_SOC_CON0,
> +			   io_volt_select | (RK3308_SOC_CON0_DOMAINS << 16));

[Severity: Medium]
Does programming domain 3 (BIT(3)) in RK3308_SOC_CON0 take effect without
also setting RK3308_SOC_CON0_VCCIO3 (BIT(8))?

On RK3308, VCCIO3 voltage selection is controlled by an external GPIO unless
BIT(8) in RK3308_SOC_CON0 is set, as done in rk3308_iodomain_init():

drivers/soc/rockchip/io-domain.c:rk3308_iodomain_init() {
	...
	val = RK3308_SOC_CON0_VCCIO3 | (RK3308_SOC_CON0_VCCIO3 << 16);
	ret = regmap_write(iod->grf, RK3308_SOC_CON0, val);
	...
}

Because rk3308_io_voltage_domains() only writes bits 5:0, setting BIT(3) in
io-1v8-domains has no effect on hardware unless the rockchip-iodomain driver
also probes.

> +	if (ret < 0)
> +		dev_warn(dev, "Couldn't update 1.8V I/O domains\n");
> +	else
> +		dev_info(dev, "1.8V I/O domains assigned 0x%03x\n", io_volt_select);
> +}
> +
>  static int rockchip_pinctrl_probe(struct platform_device *pdev)
>  {
>  	struct rockchip_pinctrl *info;
> @@ -4824,6 +4858,9 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
>  	/* try to find the optional reference to the ioc1 syscon */
>  	info->regmap_ioc1 = syscon_regmap_lookup_by_phandle_optional(np, "rockchip,ioc1");
>  
> +	if (ctrl->type == RK3308)
> +		rk3308_io_voltage_domains(info);
> +
>  	if (ctrl->type == RK3308) {
>  		ret = rk3308_soc_data_init(info);
>  		if (ret)

[Severity: Medium]
Will rk3308_io_voltage_domains() and rk3308_soc_data_init() be skipped if
rockchip_pinctrl_probe() defers or is re-run on an RK3308B?

ctrl points to the static rk3308_pin_ctrl structure, and
rk3308_soc_data_init() mutates ctrl->type in place to RK3308B when it reads
chip_id 0x3308 or 0x3308c.  If probe later fails or defers (for example when
looking up per-bank rockchip,grf syscons or registering the pinctrl device),
the next probe attempt sees ctrl->type == RK3308B and skips both blocks.
Running rk3308_io_voltage_domains() before rk3308_soc_data_init() also
writes RK3308_SOC_CON0 before RK3308_GRF_CHIP_ID has been validated.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B
  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
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-29  7:25 UTC (permalink / raw)
  To: Abduwaris Nurmemet; +Cc: devicetree, linux-gpio, robh, conor+dt

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: pinctrl: rockchip: document io-1v8-domains
  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 16:14   ` Heiko Stuebner
  1 sibling, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2026-11-29 16:14 UTC (permalink / raw)
  To: linux-rockchip, Abduwaris Nurmemet
  Cc: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-gpio, linux-arm-kernel, linux-kernel

Am Sonntag, 29. November 2026, 08:14:01 Mitteleuropäische Normalzeit schrieb Abduwaris Nurmemet:
> Add the io-1v8-domains bitmask property.  It tells the pinctrl driver
> which I/O domains are supplied with 1.8V instead of 3.3V.
> 
> Signed-off-by: Abduwaris Nurmemet <daabu@qq.com>

v2 [0] sent 2 hours later, dropped this patch


[0] https://lore.kernel.org/linux-rockchip/tencent_8CBF26AEE0A30976D669C6FF243C03645907@qq.com/




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes
  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 16:15   ` Heiko Stuebner
  1 sibling, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2026-11-29 16:15 UTC (permalink / raw)
  To: linux-rockchip, Abduwaris Nurmemet
  Cc: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-gpio, linux-arm-kernel, linux-kernel

Am Sonntag, 29. November 2026, 08:14:02 Mitteleuropäische Normalzeit schrieb Abduwaris Nurmemet:
> The RK3308 SDIO controller is only reliable at 50 MHz when the I/O
> domain feeding its pins is switched to 1.8V.  The generic io-domain
> driver probes after the MMC controllers, which is too late: the SDIO
> card is already being enumerated, so the bus either fails with
> -84 or stays at a very low clock.
> 
> Program the domain selection from the pinctrl driver instead, which
> probes before the MMC host.  Boards opt in with an io-1v8-domains
> bitmask property on the pinctrl node, where each set bit marks an I/O
> domain that runs at 1.8V.
> 
> This follows the approach used for the Rock Pi-S by Brent Roman.
> 
> Signed-off-by: Abduwaris Nurmemet <daabu@qq.com>


v2 [0] sent 2 hours later, dropped this patch


[0] https://lore.kernel.org/linux-rockchip/tencent_8CBF26AEE0A30976D669C6FF243C03645907@qq.com/




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-29 16:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 16:14   ` Heiko Stuebner
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 16:15   ` Heiko Stuebner
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox