* [PATCH v6 0/2] Support SD/SDIO controllers on RK3528
@ 2025-05-08 23:48 Yao Zi
2025-05-08 23:48 ` [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 Yao Zi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Yao Zi @ 2025-05-08 23:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Jonas Karlman, Yao Zi, Chukun Pan
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
RK3528 features two SDIO controllers and one SD/MMC controller. This
series brings the SD/MMC one up on Radxa E20C board. Both HS and SDR104
modes are verified.
- Changed from v5
- Drop applied clock patches
- Rebase on top of linux-rockchip/for-next
- Link to v5: https://lore.kernel.org/all/20250506092206.46143-1-ziyao@disroot.org/
- Changed from v4
- rk3528 clock driver
- Switch to auxiliary GRF
- drop rockchip_clk_register_grf_branches
- Rename branch_mmc_grf to branch_grf_mmc to make style consistent
(with branch_grf_gate)
- Link to v4: https://lore.kernel.org/all/20250417143647.43860-1-ziyao@disroot.org/
- Changed from v3
- Drop applied binding patch of MMC controller
- Rebase on top of linux-rockchip/for-next
- Link to v3: https://lore.kernel.org/all/20250309055348.9299-1-ziyao@disroot.org/
- Changed from v2
- Apply review tags
- Rebase on top of linux-rockchip/for-next and drop applied patches
- RK3528 devicetree
- Fix accidentally dropped status property of saradc node
- drop det and pwren pinctrls for SDIO{0,1} according to the
reference design
- Correct max-frequency for SDIO{0,1}
- rk3528-radxa-e20c devicetree
- Don't disable sdio for sdmmc as claimed in the hw design guide
- Link to v2: https://lore.kernel.org/all/20250305194217.47052-1-ziyao@disroot.org/
- Changed from v1
- Apply review tags
- Rebase on top of linux-rockchip/for-next and saradc v2 series
- rk3528 clock driver:
- explicitly include minmax.h, replace MAX() with more robust max()
- readability improvements
- fix error checks: ERR_PTR(-ENODEV), instead of ERR_PTR(ENODEV), is
returned when syscon_regmap_lookup_by_compatible() fails for missing
such syscon
- RK3528 devicetree
- Add default pinctrl
- Move the per-SoC property, rockchip,default-sample-phase, into the
SoC devicetree
- rk3528-radxa-e20c devicetree
- Assign sdcard to mmc1
- Add missing regulators
- Apply no-sdio for the sdmmc controller
- Sort nodes
- Link to v1: https://lore.kernel.org/all/20250301104250.36295-1-ziyao@disroot.org/
Thanks for your time and review.
Yao Zi (2):
arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
.../boot/dts/rockchip/rk3528-radxa-e20c.dts | 30 ++++++++
arch/arm64/boot/dts/rockchip/rk3528.dtsi | 69 +++++++++++++++++++
2 files changed, 99 insertions(+)
--
2.49.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
2025-05-08 23:48 [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Yao Zi
@ 2025-05-08 23:48 ` Yao Zi
2025-05-09 6:38 ` Jonas Karlman
2025-05-08 23:48 ` [PATCH v6 2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C Yao Zi
2025-05-09 20:00 ` [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Heiko Stuebner
2 siblings, 1 reply; 6+ messages in thread
From: Yao Zi @ 2025-05-08 23:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Jonas Karlman, Yao Zi, Chukun Pan
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
RK3528 features two SDIO controllers and one SD/MMC controller, describe
them in devicetree. Since their sample and drive clocks are located in
the VO and VPU GRFs, corresponding syscons are added to make these
clocks available.
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
arch/arm64/boot/dts/rockchip/rk3528.dtsi | 69 ++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
index 923cff6bb103..193b84b5e912 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
@@ -329,6 +329,16 @@ qos_vpu: qos@ff280400 {
reg = <0x0 0xff280400 0x0 0x20>;
};
+ vpu_grf: syscon@ff340000 {
+ compatible = "rockchip,rk3528-vpu-grf", "syscon";
+ reg = <0x0 0xff340000 0x0 0x8000>;
+ };
+
+ vo_grf: syscon@ff360000 {
+ compatible = "rockchip,rk3528-vo-grf", "syscon";
+ reg = <0x0 0xff360000 0x0 0x10000>;
+ };
+
cru: clock-controller@ff4a0000 {
compatible = "rockchip,rk3528-cru";
reg = <0x0 0xff4a0000 0x0 0x30000>;
@@ -691,6 +701,65 @@ sdhci: mmc@ffbf0000 {
status = "disabled";
};
+ sdio0: mmc@ffc10000 {
+ compatible = "rockchip,rk3528-dw-mshc",
+ "rockchip,rk3288-dw-mshc";
+ reg = <0x0 0xffc10000 0x0 0x4000>;
+ clocks = <&cru HCLK_SDIO0>,
+ <&cru CCLK_SRC_SDIO0>,
+ <&cru SCLK_SDIO0_DRV>,
+ <&cru SCLK_SDIO0_SAMPLE>;
+ clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
+ fifo-depth = <0x100>;
+ interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+ max-frequency = <200000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>;
+ resets = <&cru SRST_H_SDIO0>;
+ reset-names = "reset";
+ status = "disabled";
+ };
+
+ sdio1: mmc@ffc20000 {
+ compatible = "rockchip,rk3528-dw-mshc",
+ "rockchip,rk3288-dw-mshc";
+ reg = <0x0 0xffc20000 0x0 0x4000>;
+ clocks = <&cru HCLK_SDIO1>,
+ <&cru CCLK_SRC_SDIO1>,
+ <&cru SCLK_SDIO1_DRV>,
+ <&cru SCLK_SDIO1_SAMPLE>;
+ clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
+ fifo-depth = <0x100>;
+ interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+ max-frequency = <200000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>;
+ resets = <&cru SRST_H_SDIO1>;
+ reset-names = "reset";
+ status = "disabled";
+ };
+
+ sdmmc: mmc@ffc30000 {
+ compatible = "rockchip,rk3528-dw-mshc",
+ "rockchip,rk3288-dw-mshc";
+ reg = <0x0 0xffc30000 0x0 0x4000>;
+ clocks = <&cru HCLK_SDMMC0>,
+ <&cru CCLK_SRC_SDMMC0>,
+ <&cru SCLK_SDMMC_DRV>,
+ <&cru SCLK_SDMMC_SAMPLE>;
+ clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
+ fifo-depth = <0x100>;
+ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+ max-frequency = <150000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_bus4>, <&sdmmc_clk>, <&sdmmc_cmd>,
+ <&sdmmc_det>;
+ resets = <&cru SRST_H_SDMMC0>;
+ reset-names = "reset";
+ rockchip,default-sample-phase = <90>;
+ status = "disabled";
+ };
+
dmac: dma-controller@ffd60000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x0 0xffd60000 0x0 0x4000>;
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v6 2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
2025-05-08 23:48 [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Yao Zi
2025-05-08 23:48 ` [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 Yao Zi
@ 2025-05-08 23:48 ` Yao Zi
2025-05-09 6:39 ` Jonas Karlman
2025-05-09 20:00 ` [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Heiko Stuebner
2 siblings, 1 reply; 6+ messages in thread
From: Yao Zi @ 2025-05-08 23:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Jonas Karlman, Yao Zi, Chukun Pan
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
SD-card is available on Radxa E20C board.
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
.../boot/dts/rockchip/rk3528-radxa-e20c.dts | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
index 0942baba6b8f..d45b6594b2de 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
@@ -18,6 +18,7 @@ / {
aliases {
mmc0 = &sdhci;
+ mmc1 = &sdmmc;
};
chosen {
@@ -130,6 +131,18 @@ vcc5v0_sys: regulator-5v0-vcc-sys {
regulator-max-microvolt = <5000000>;
};
+ vccio_sd: regulator-vccio-sd {
+ compatible = "regulator-gpio";
+ gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_vol_ctrl_h>;
+ regulator-name = "vccio_sd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ states = <1800000 0x0>, <3300000 0x1>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
vdd_arm: regulator-vdd-arm {
compatible = "pwm-regulator";
pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
@@ -205,6 +218,12 @@ wan_led_g: wan-led-g {
rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ sdmmc {
+ sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h {
+ rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pwm1 {
@@ -235,6 +254,17 @@ &sdhci {
status = "okay";
};
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0m0_xfer>;
--
2.49.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
2025-05-08 23:48 ` [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 Yao Zi
@ 2025-05-09 6:38 ` Jonas Karlman
0 siblings, 0 replies; 6+ messages in thread
From: Jonas Karlman @ 2025-05-09 6:38 UTC (permalink / raw)
To: Yao Zi, Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chukun Pan,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
On 2025-05-09 01:48, Yao Zi wrote:
> RK3528 features two SDIO controllers and one SD/MMC controller, describe
> them in devicetree. Since their sample and drive clocks are located in
> the VO and VPU GRFs, corresponding syscons are added to make these
> clocks available.
>
> Signed-off-by: Yao Zi <ziyao@disroot.org>
This has not changed since v4, so this is still [1]:
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
[1] https://lore.kernel.org/r/f0ef6679-7ddf-4deb-98a3-755ac2b61a57@kwiboo.se/
Regards,
Jonas
> ---
> arch/arm64/boot/dts/rockchip/rk3528.dtsi | 69 ++++++++++++++++++++++++
> 1 file changed, 69 insertions(+)
[snip]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v6 2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
2025-05-08 23:48 ` [PATCH v6 2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C Yao Zi
@ 2025-05-09 6:39 ` Jonas Karlman
0 siblings, 0 replies; 6+ messages in thread
From: Jonas Karlman @ 2025-05-09 6:39 UTC (permalink / raw)
To: Yao Zi, Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chukun Pan,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
On 2025-05-09 01:48, Yao Zi wrote:
> SD-card is available on Radxa E20C board.
>
> Signed-off-by: Yao Zi <ziyao@disroot.org>
This has not changed since v4, so this is still [1]:
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
[1] https://lore.kernel.org/r/f19f11f7-c020-44a3-84fa-eb9ca48ed11f@kwiboo.se/
Regards,
Jonas
> ---
> .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
[snip]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v6 0/2] Support SD/SDIO controllers on RK3528
2025-05-08 23:48 [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Yao Zi
2025-05-08 23:48 ` [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 Yao Zi
2025-05-08 23:48 ` [PATCH v6 2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C Yao Zi
@ 2025-05-09 20:00 ` Heiko Stuebner
2 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2025-05-09 20:00 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonas Karlman,
Chukun Pan, Yao Zi
Cc: Heiko Stuebner, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
On Thu, 08 May 2025 23:48:28 +0000, Yao Zi wrote:
> RK3528 features two SDIO controllers and one SD/MMC controller. This
> series brings the SD/MMC one up on Radxa E20C board. Both HS and SDR104
> modes are verified.
>
> - Changed from v5
> - Drop applied clock patches
> - Rebase on top of linux-rockchip/for-next
> - Link to v5: https://lore.kernel.org/all/20250506092206.46143-1-ziyao@disroot.org/
> - Changed from v4
> - rk3528 clock driver
> - Switch to auxiliary GRF
> - drop rockchip_clk_register_grf_branches
> - Rename branch_mmc_grf to branch_grf_mmc to make style consistent
> (with branch_grf_gate)
> - Link to v4: https://lore.kernel.org/all/20250417143647.43860-1-ziyao@disroot.org/
> - Changed from v3
> - Drop applied binding patch of MMC controller
> - Rebase on top of linux-rockchip/for-next
> - Link to v3: https://lore.kernel.org/all/20250309055348.9299-1-ziyao@disroot.org/
> - Changed from v2
> - Apply review tags
> - Rebase on top of linux-rockchip/for-next and drop applied patches
> - RK3528 devicetree
> - Fix accidentally dropped status property of saradc node
> - drop det and pwren pinctrls for SDIO{0,1} according to the
> reference design
> - Correct max-frequency for SDIO{0,1}
> - rk3528-radxa-e20c devicetree
> - Don't disable sdio for sdmmc as claimed in the hw design guide
> - Link to v2: https://lore.kernel.org/all/20250305194217.47052-1-ziyao@disroot.org/
> - Changed from v1
> - Apply review tags
> - Rebase on top of linux-rockchip/for-next and saradc v2 series
> - rk3528 clock driver:
> - explicitly include minmax.h, replace MAX() with more robust max()
> - readability improvements
> - fix error checks: ERR_PTR(-ENODEV), instead of ERR_PTR(ENODEV), is
> returned when syscon_regmap_lookup_by_compatible() fails for missing
> such syscon
> - RK3528 devicetree
> - Add default pinctrl
> - Move the per-SoC property, rockchip,default-sample-phase, into the
> SoC devicetree
> - rk3528-radxa-e20c devicetree
> - Assign sdcard to mmc1
> - Add missing regulators
> - Apply no-sdio for the sdmmc controller
> - Sort nodes
> - Link to v1: https://lore.kernel.org/all/20250301104250.36295-1-ziyao@disroot.org/
>
> [...]
Applied, thanks!
[1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
commit: 894a2640422208b1d3e4c238f126220d406e5fb1
[2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
commit: a2130d9123b23d74a717f52240fa3cb92bf8113c
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-05-09 21:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 23:48 [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Yao Zi
2025-05-08 23:48 ` [PATCH v6 1/2] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 Yao Zi
2025-05-09 6:38 ` Jonas Karlman
2025-05-08 23:48 ` [PATCH v6 2/2] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C Yao Zi
2025-05-09 6:39 ` Jonas Karlman
2025-05-09 20:00 ` [PATCH v6 0/2] Support SD/SDIO controllers on RK3528 Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).