dt-bindings: pinctrl: rockchip: document io-1v8-domains
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/3 dt-bindings: pinctrl: rockchip: document io-1v8-domains
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.
--- .../devicetree/bindings/pinctrl/rockchip,pinctrl.yaml | 9 +++++++++ 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml +9 -0
@@ -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#
Signature · 1 line
2.47.3
[email protected]
AI reviewThank 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 --
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 <[email protected]>
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.
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml +0
-0@@ -76,6 +76,15 @@ properties:
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml properties: · line 86
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml +8
-0ranges: 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.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Heiko Stuebner
maintainerAm Sonntag, 29. November 2026, 08:14:01 Mitteleuropäische Normalzeit schrieb Abduwaris Nurmemet:
Quoted 4 lines
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 <[email protected]>
v2 [0] sent 2 hours later, dropped this patch
[0] https://lore.kernel.org/linux-rockchip/[email protected]/
PATCH 2/3 pinctrl: rockchip: program RK3308 I/O domains before SDIO probes
In reply to a message not in the archiveThe 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.
--- drivers/pinctrl/pinctrl-rockchip.c | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
drivers/pinctrl/pinctrl-rockchip.c +37 -0
@@ -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)
Signature · 1 line
2.47.3
[email protected]
AI reviewRe: [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes
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…
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 <[email protected]>
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.
Quoted 18 lines
drivers/pinctrl/pinctrl-rockchip.c +10
-0@@ -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
drivers/pinctrl/pinctrl-rockchip.c static int rk3308_soc_data_init(struct rockchip_pinctrl *info) · line 4783
Quoted 10 lines
drivers/pinctrl/pinctrl-rockchip.c +10
-0+* 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.
drivers/pinctrl/pinctrl-rockchip.c static int rk3308_soc_data_init(struct rockchip_pinctrl *info) · line 4791
Quoted 8 lines
drivers/pinctrl/pinctrl-rockchip.c +8
-0+ +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.
Quoted 10 lines
drivers/pinctrl/pinctrl-rockchip.c +6
-0+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;
drivers/pinctrl/pinctrl-rockchip.c static int rockchip_pinctrl_probe(struct platform_device *pdev) · line 4866
Quoted 9 lines
drivers/pinctrl/pinctrl-rockchip.c +3
-0@@ -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.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Heiko Stuebner
maintainerRe: [PATCH 2/3] pinctrl: rockchip: program RK3308 I/O domains before SDIO probes
In reply to Abduwaris NurmemetAm Sonntag, 29. November 2026, 08:14:02 Mitteleuropäische Normalzeit schrieb Abduwaris Nurmemet:
Quoted 6 lines
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.
Quoted 8 lines
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 <[email protected]>
v2 [0] sent 2 hours later, dropped this patch
[0] https://lore.kernel.org/linux-rockchip/[email protected]/
PATCH 3/3 arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B
In reply to a message not in the archiveThe 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.
--- arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts +3 -0
@@ -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 {
Signature · 1 line
2.47.3
[email protected]
AI reviewRe: [PATCH 3/3] arm64: dts: rockchip: fix SDIO WiFi on the Sakura Pi RK3308B
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…
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 <[email protected]>
Quoted 7 lines
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.
Quoted 5 lines
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 <[email protected]>
[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:
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts &i2c1 { · line 142
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts +2
-0@@ -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().
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3