回复: [PATCH 1/2] arm64: dts: amlogic: s4: assign mmc b clock to 24MHz
From: Nick Xie <hidden>
Date: 2026-01-14 03:52:23
Also in:
linux-amlogic, linux-arm-kernel, lkml
Subsystem:
arm/amlogic meson soc support, the rest · Maintainers:
Neil Armstrong, Kevin Hilman, Linus Torvalds
Hello Jerome, I checked this patch on Amlogic S4 S905Y4, the SD card works. root@Khadas:~# uname -a Linux Khadas 6.19.0-rc5+ #26 SMP PREEMPT Tue Jan 13 16:01:18 CST 2026 aarch64 aarch64 aarch64 GNU/Linux root@Khadas:~# dmesg | grep mmc [ 0.297480] meson-gx-mmc fe08a000.mmc: Got CD GPIO [ 0.392463] mmc1: new UHS-I speed SDR104 SDHC card at address aaaa [ 0.393219] mmcblk1: mmc1:aaaa SP32G 29.7 GiB [ 0.395788] mmcblk1: p1 p2 [ 3.155360] EXT4-fs (mmcblk1p2): mounted filesystem 43b6881a-483c-4ca7-9dcd-f4575e665a8b r/w with writeback data mode. Quota mode: none. [ 4.640503] EXT4-fs (mmcblk1p2): re-mounted 43b6881a-483c-4ca7-9dcd-f4575e665a8b. [ 5.777682] EXT4-fs (mmcblk1p1): mounted filesystem f20cabae-bbc6-457e-9bb3-bac6eef01af5 r/w with ordered data mode. Quota mode: none. Tested-by: Nick Xie <redacted> -- Best Regards Nick 谢奇 Amazing Khadas, Always Amazes You ________________________________________ 发件人: Jerome Brunet [off-list ref] 已发送: 2026 年 1 月 13 日 星期二 18:39 收件人: Rob Herring [off-list ref]; Krzysztof Kozlowski [off-list ref]; Conor Dooley [off-list ref]; Neil Armstrong [off-list ref]; Kevin Hilman [off-list ref]; Martin Blumenstingl [off-list ref]; Xianwei Zhao [off-list ref]; Nick Xie [off-list ref] 抄送: devicetree@vger.kernel.org [off-list ref]; linux-arm-kernel@lists.infradead.org [off-list ref]; linux-amlogic@lists.infradead.org [off-list ref]; linux-kernel@vger.kernel.org [off-list ref]; Jerome Brunet [off-list ref] 主题: [PATCH 1/2] arm64: dts: amlogic: s4: assign mmc b clock to 24MHz The amlogic MMC operate with the assumption that MMC clock is configured to provide 24MHz. It uses that path for low rates such as 400kHz. This assumption did hold true until but it now, but it apparently not the case with s4. The clock has been reported to provide 1GHz instead. This is most likely due to how the bootloader is using the MMC clock on this platform. Regardless of why the MMC clock is set to 1GHz, if the MMC driver expects 24MHz, we should make sure it does get that, so assign the clock. Reported-by: Nick Xie <redacted> Closes: https://lore.kernel.org/linux-amlogic/20260113011931.40424-1-nick@khadas.com/ (local) Fixes: 3ab9d54b5d84 ("arm64: dts: amlogic: enable some device nodes for S4") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
index 9d99ed2994dfa27ca5808da7ae0825e9af255417..62538fd9db6b1ffb33a88e12628aadefbaa453ec 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
@@ -838,6 +838,10 @@ sd: mmc@fe08a000 {
clock-names = "core", "clkin0", "clkin1";
resets = <&reset RESET_SD_EMMC_B>;
status = "disabled";
+
+ assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_B>;
+ assigned-clock-parents = <0>;
+ assigned-clock-rates = <24000000>;
};
emmc: mmc@fe08c000 {
--
2.47.3