Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C
@ 2025-03-05 21:41 Jonas Karlman
  2025-03-05 21:41 ` [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528 Jonas Karlman
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jonas Karlman @ 2025-03-05 21:41 UTC (permalink / raw)
  To: Heiko Stuebner, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Yao Zi, linux-rockchip, linux-mmc, devicetree, linux-arm-kernel,
	linux-kernel, Jonas Karlman

The Radxa E20C may come with an onboard eMMC (8GB / 16GB / 32GB / 64GB).

This series add dt-binding and SoC DT node for the SDHCI controller
and enable use of the SDCHI controller on the Radxa E20C.

This series add support for the onboard eMMC on Radxa E20C.

Driver changes to use different delay and tap num is needed to be able
to support HS400 modes, something for a future series. With this HS200
mode should work:

  mmc0: SDHCI controller on ffbf0000.mmc [ffbf0000.mmc] using ADMA
  mmc0: new HS200 MMC card at address 0001
  mmcblk0: mmc0:0001 TLi16G 14.7 GiB
   mmcblk0: p1 p2 p3
  mmcblk0boot0: mmc0:0001 TLi16G 4.00 MiB
  mmcblk0boot1: mmc0:0001 TLi16G 4.00 MiB
  mmcblk0rpmb: mmc0:0001 TLi16G 4.00 MiB, chardev (499:0)

  ~ # cat /sys/kernel/debug/mmc0/ios
  clock:          200000000 Hz
  actual clock:   198000000 Hz
  vdd:            21 (3.3 ~ 3.4V)
  bus mode:       2 (push-pull)
  chip select:    0 (don't care)
  power mode:     2 (on)
  bus width:      3 (8bits)
  timing spec:    9 (mmc HS200)
  signal voltage: 1 (1.80 V)
  driver type:    0 (driver type B)

  ~ # hdparm -t /dev/mmcblk0p1
  /dev/mmcblk0p1:
  Timing buffered disk reads:   64 MB in 0.37 seconds = 173154 kB/s

This series depends on v2 of the "Support SD/SDIO controllers on RK3528"
series for a clean apply.

Jonas Karlman (3):
  dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528
  arm64: dts: rockchip: Add SDHCI controller for RK3528
  arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C

 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      |  4 +++-
 .../boot/dts/rockchip/rk3528-radxa-e20c.dts   | 12 ++++++++++
 arch/arm64/boot/dts/rockchip/rk3528.dtsi      | 24 +++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

-- 
2.48.1


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

* [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528
  2025-03-05 21:41 [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C Jonas Karlman
@ 2025-03-05 21:41 ` Jonas Karlman
  2025-03-06  9:36   ` Krzysztof Kozlowski
  2025-03-12 11:24   ` Ulf Hansson
  2025-03-05 21:41 ` [PATCH 2/3] arm64: dts: rockchip: Add SDHCI controller " Jonas Karlman
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: Jonas Karlman @ 2025-03-05 21:41 UTC (permalink / raw)
  To: Heiko Stuebner, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jisheng Zhang
  Cc: Yao Zi, linux-rockchip, linux-mmc, devicetree, linux-arm-kernel,
	linux-kernel, Jonas Karlman

The SDHCI controller in Rockchip RK3528 is similar to the one included
in RK3588.

Add compatible string for the SDHCI controller in RK3528.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
index c3d5e0230af1..fb2115e805f5 100644
--- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
@@ -14,7 +14,9 @@ properties:
   compatible:
     oneOf:
       - items:
-          - const: rockchip,rk3576-dwcmshc
+          - enum:
+              - rockchip,rk3528-dwcmshc
+              - rockchip,rk3576-dwcmshc
           - const: rockchip,rk3588-dwcmshc
       - enum:
           - rockchip,rk3568-dwcmshc
-- 
2.48.1


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

* [PATCH 2/3] arm64: dts: rockchip: Add SDHCI controller for RK3528
  2025-03-05 21:41 [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C Jonas Karlman
  2025-03-05 21:41 ` [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528 Jonas Karlman
@ 2025-03-05 21:41 ` Jonas Karlman
  2025-03-05 21:41 ` [PATCH 3/3] arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C Jonas Karlman
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Jonas Karlman @ 2025-03-05 21:41 UTC (permalink / raw)
  To: Heiko Stuebner, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Yao Zi, linux-rockchip, linux-mmc, devicetree, linux-arm-kernel,
	linux-kernel, Jonas Karlman

The SDHCI controller in Rockchip RK3528 is similar to the one included
in RK3588.

Add device tree node for the SDHCI controller in RK3528.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 arch/arm64/boot/dts/rockchip/rk3528.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
index 363023314e9c..c1a71ea81e03 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
@@ -286,6 +286,30 @@ saradc: adc@ffae0000 {
 			#io-channel-cells = <1>;
 		};
 
+		sdhci: mmc@ffbf0000 {
+			compatible = "rockchip,rk3528-dwcmshc",
+				     "rockchip,rk3588-dwcmshc";
+			reg = <0x0 0xffbf0000 0x0 0x10000>;
+			assigned-clocks = <&cru BCLK_EMMC>, <&cru TCLK_EMMC>,
+					  <&cru CCLK_SRC_EMMC>;
+			assigned-clock-rates = <200000000>, <24000000>,
+					       <200000000>;
+			clocks = <&cru CCLK_SRC_EMMC>, <&cru HCLK_EMMC>,
+				 <&cru ACLK_EMMC>, <&cru BCLK_EMMC>,
+				 <&cru TCLK_EMMC>;
+			clock-names = "core", "bus", "axi", "block", "timer";
+			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+			max-frequency = <200000000>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>,
+				    <&emmc_strb>;
+			resets = <&cru SRST_C_EMMC>, <&cru SRST_H_EMMC>,
+				 <&cru SRST_A_EMMC>, <&cru SRST_B_EMMC>,
+				 <&cru SRST_T_EMMC>;
+			reset-names = "core", "bus", "axi", "block", "timer";
+			status = "disabled";
+		};
+
 		sdio0: mmc@ffc10000 {
 			compatible = "rockchip,rk3528-dw-mshc",
 				     "rockchip,rk3288-dw-mshc";
-- 
2.48.1


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

* [PATCH 3/3] arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C
  2025-03-05 21:41 [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C Jonas Karlman
  2025-03-05 21:41 ` [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528 Jonas Karlman
  2025-03-05 21:41 ` [PATCH 2/3] arm64: dts: rockchip: Add SDHCI controller " Jonas Karlman
@ 2025-03-05 21:41 ` Jonas Karlman
  2025-03-06  9:00 ` [PATCH 0/3] rockchip: Add support for " Chukun Pan
  2025-03-12 19:38 ` (subset) " Heiko Stuebner
  4 siblings, 0 replies; 10+ messages in thread
From: Jonas Karlman @ 2025-03-05 21:41 UTC (permalink / raw)
  To: Heiko Stuebner, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Yao Zi, linux-rockchip, linux-mmc, devicetree, linux-arm-kernel,
	linux-kernel, Jonas Karlman

The Radxa E20C may come with an onboard eMMC (8GB / 16GB / 32GB / 64GB).

Enable support for the onboard eMMC on Radxa E20C.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
index a52a7924bb75..a511e2a2d4a5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
@@ -16,6 +16,7 @@ / {
 	compatible = "radxa,e20c", "rockchip,rk3528";
 
 	aliases {
+		mmc0 = &sdhci;
 		mmc1 = &sdmmc;
 	};
 
@@ -155,6 +156,17 @@ &saradc {
 	status = "okay";
 };
 
+&sdhci {
+	bus-width = <8>;
+	cap-mmc-highspeed;
+	no-sd;
+	no-sdio;
+	non-removable;
+	vmmc-supply = <&vcc_3v3>;
+	vqmmc-supply = <&vcc_1v8>;
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
-- 
2.48.1


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

* Re: [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C
  2025-03-05 21:41 [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C Jonas Karlman
                   ` (2 preceding siblings ...)
  2025-03-05 21:41 ` [PATCH 3/3] arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C Jonas Karlman
@ 2025-03-06  9:00 ` Chukun Pan
  2025-03-06  9:16   ` Jonas Karlman
  2025-03-12 19:38 ` (subset) " Heiko Stuebner
  4 siblings, 1 reply; 10+ messages in thread
From: Chukun Pan @ 2025-03-06  9:00 UTC (permalink / raw)
  To: jonas
  Cc: conor+dt, devicetree, heiko, krzk+dt, linux-arm-kernel,
	linux-kernel, linux-mmc, linux-rockchip, Chukun Pan

Hi,

> Driver changes to use different delay and tap num is needed to be able
> to support HS400 modes, something for a future series. With this HS200
> mode should work:

I have tried HS200 mode on other rk3528 boards and it works fine,
so can we enable HS200 mode for Radxa E20C first?

Thanks,
Chukun

-- 
2.25.1


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

* Re: [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C
  2025-03-06  9:00 ` [PATCH 0/3] rockchip: Add support for " Chukun Pan
@ 2025-03-06  9:16   ` Jonas Karlman
  0 siblings, 0 replies; 10+ messages in thread
From: Jonas Karlman @ 2025-03-06  9:16 UTC (permalink / raw)
  To: Chukun Pan
  Cc: conor+dt, devicetree, heiko, krzk+dt, linux-arm-kernel,
	linux-kernel, linux-mmc, linux-rockchip

Hi Chukun,

On 2025-03-06 10:00, Chukun Pan wrote:
> Hi,
> 
>> Driver changes to use different delay and tap num is needed to be able
>> to support HS400 modes, something for a future series. With this HS200
>> mode should work:
> 
> I have tried HS200 mode on other rk3528 boards and it works fine,
> so can we enable HS200 mode for Radxa E20C first?

The host controller already report the HS200 mode, and as shown in cover
letter HS200 mode is being enabled/used with this series.

However, the driver must use different tap/delay num for HS400(ES) modes.
At top of [1] there is a commit that changes to use same tap/delay num
as vendor kernel and what I have tested worked in U-Boot. That commit
needs to be re-worked before it is ready. Also see [2] for pending work
before I plan to complete before moving on to the dwcmshc driver.

[1] https://github.com/Kwiboo/linux-rockchip/commits/next-20250227-rk3528-rk3506/
[2] https://github.com/Kwiboo/linux-rockchip/commits/next-20250305-rk3528/

Regards,
Jonas

> 
> Thanks,
> Chukun
> 


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

* Re: [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528
  2025-03-05 21:41 ` [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528 Jonas Karlman
@ 2025-03-06  9:36   ` Krzysztof Kozlowski
  2025-03-06 22:53     ` Jonas Karlman
  2025-03-12 11:24   ` Ulf Hansson
  1 sibling, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-06  9:36 UTC (permalink / raw)
  To: Jonas Karlman
  Cc: Heiko Stuebner, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jisheng Zhang, Yao Zi, linux-rockchip, linux-mmc,
	devicetree, linux-arm-kernel, linux-kernel

On Wed, Mar 05, 2025 at 09:41:02PM +0000, Jonas Karlman wrote:
> The SDHCI controller in Rockchip RK3528 is similar to the one included
> in RK3588.
> 
> Add compatible string for the SDHCI controller in RK3528.
> 
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---

No power domains here? Post complete support, so this won't have to be
changed in near future.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528
  2025-03-06  9:36   ` Krzysztof Kozlowski
@ 2025-03-06 22:53     ` Jonas Karlman
  0 siblings, 0 replies; 10+ messages in thread
From: Jonas Karlman @ 2025-03-06 22:53 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Heiko Stuebner, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jisheng Zhang, Yao Zi, linux-rockchip, linux-mmc,
	devicetree, linux-arm-kernel, linux-kernel

Hi Krzysztof,

On 2025-03-06 10:36, Krzysztof Kozlowski wrote:
> On Wed, Mar 05, 2025 at 09:41:02PM +0000, Jonas Karlman wrote:
>> The SDHCI controller in Rockchip RK3528 is similar to the one included
>> in RK3588.
>>
>> Add compatible string for the SDHCI controller in RK3528.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
> 
> No power domains here? Post complete support, so this won't have to be
> changed in near future.

To my knowledge this should be complete support. However, there are some
rx/tx tap num and strobe delay num configuration that needs to be tuned
to fully support the faster HS400/HS400ES transfer modes.

For that we could need something like the PHY output/input tap delays
described in mmc/sdhci-am654.yaml. Still unclear to me if the different
delayed used by vendor driver is SoC specific and can live in driver or
if they instead are reference board specific and could be part of the
device tree.

Regards,
Jonas

> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Best regards,
> Krzysztof
> 


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

* Re: [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528
  2025-03-05 21:41 ` [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528 Jonas Karlman
  2025-03-06  9:36   ` Krzysztof Kozlowski
@ 2025-03-12 11:24   ` Ulf Hansson
  1 sibling, 0 replies; 10+ messages in thread
From: Ulf Hansson @ 2025-03-12 11:24 UTC (permalink / raw)
  To: Jonas Karlman
  Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jisheng Zhang, Yao Zi, linux-rockchip, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel

On Wed, 5 Mar 2025 at 22:41, Jonas Karlman <jonas@kwiboo.se> wrote:
>
> The SDHCI controller in Rockchip RK3528 is similar to the one included
> in RK3588.
>
> Add compatible string for the SDHCI controller in RK3528.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> index c3d5e0230af1..fb2115e805f5 100644
> --- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> @@ -14,7 +14,9 @@ properties:
>    compatible:
>      oneOf:
>        - items:
> -          - const: rockchip,rk3576-dwcmshc
> +          - enum:
> +              - rockchip,rk3528-dwcmshc
> +              - rockchip,rk3576-dwcmshc
>            - const: rockchip,rk3588-dwcmshc
>        - enum:
>            - rockchip,rk3568-dwcmshc
> --
> 2.48.1
>

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

* Re: (subset) [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C
  2025-03-05 21:41 [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C Jonas Karlman
                   ` (3 preceding siblings ...)
  2025-03-06  9:00 ` [PATCH 0/3] rockchip: Add support for " Chukun Pan
@ 2025-03-12 19:38 ` Heiko Stuebner
  4 siblings, 0 replies; 10+ messages in thread
From: Heiko Stuebner @ 2025-03-12 19:38 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jonas Karlman
  Cc: Heiko Stuebner, Yao Zi, linux-rockchip, linux-mmc, devicetree,
	linux-arm-kernel, linux-kernel


On Wed, 05 Mar 2025 21:41:01 +0000, Jonas Karlman wrote:
> The Radxa E20C may come with an onboard eMMC (8GB / 16GB / 32GB / 64GB).
> 
> This series add dt-binding and SoC DT node for the SDHCI controller
> and enable use of the SDCHI controller on the Radxa E20C.
> 
> This series add support for the onboard eMMC on Radxa E20C.
> 
> [...]

Applied, thanks!

[2/3] arm64: dts: rockchip: Add SDHCI controller for RK3528
      commit: d62917b63e9f2c876bd9abf019a25313bd9cbc07
[3/3] arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C
      commit: f25c3b93f50387849db692891e2b2c6f9cc7d055

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

end of thread, other threads:[~2025-03-12 19:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 21:41 [PATCH 0/3] rockchip: Add support for onboard eMMC on Radxa E20C Jonas Karlman
2025-03-05 21:41 ` [PATCH 1/3] dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528 Jonas Karlman
2025-03-06  9:36   ` Krzysztof Kozlowski
2025-03-06 22:53     ` Jonas Karlman
2025-03-12 11:24   ` Ulf Hansson
2025-03-05 21:41 ` [PATCH 2/3] arm64: dts: rockchip: Add SDHCI controller " Jonas Karlman
2025-03-05 21:41 ` [PATCH 3/3] arm64: dts: rockchip: Enable onboard eMMC on Radxa E20C Jonas Karlman
2025-03-06  9:00 ` [PATCH 0/3] rockchip: Add support for " Chukun Pan
2025-03-06  9:16   ` Jonas Karlman
2025-03-12 19:38 ` (subset) " Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox