The amlogic MMC driver operate with the assumption that MMC clock
is configured to provide 24MHz. It uses this path for low
rates such as 400kHz.
This assumption did hold true until but it now, but it is 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 rate is 1GHz, if the MMC driver expects
24MHz, the clock should be properly assigned, so assign it.
Reported-by: Nick Xie <nick@khadas.com>
Closes: https://lore.kernel.org/linux-amlogic/20260113011931.40424-1-nick@khadas.com/
Fixes: 3ab9d54b5d84 ("arm64: dts: amlogic: enable some device nodes for S4")
Tested-by: Nick Xie <nick@khadas.com>
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 9d99ed2994df..62538fd9db6b 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
On 1/14/26 09:56, Jerome Brunet wrote:
> The amlogic MMC driver operate with the assumption that MMC clock
> is configured to provide 24MHz. It uses this path for low
> rates such as 400kHz.
>
> This assumption did hold true until but it now, but it is 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 rate is 1GHz, if the MMC driver expects
> 24MHz, the clock should be properly assigned, so assign it.
>
> Reported-by: Nick Xie <nick@khadas.com>
> Closes: https://lore.kernel.org/linux-amlogic/20260113011931.40424-1-nick@khadas.com/
> Fixes: 3ab9d54b5d84 ("arm64: dts: amlogic: enable some device nodes for S4")
> Tested-by: Nick Xie <nick@khadas.com>
> 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 9d99ed2994df..62538fd9db6b 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>;
In this case, assigned-clock-parents should be dropped.
Neil
> + assigned-clock-rates = <24000000>;
> };
>
> emmc: mmc@fe08c000 {
>
On mer. 14 janv. 2026 at 10:05, Neil Armstrong <neil.armstrong@linaro.org> wrote:
> On 1/14/26 09:56, Jerome Brunet wrote:
>> The amlogic MMC driver operate with the assumption that MMC clock
>> is configured to provide 24MHz. It uses this path for low
>> rates such as 400kHz.
>> This assumption did hold true until but it now, but it is 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 rate is 1GHz, if the MMC driver expects
>> 24MHz, the clock should be properly assigned, so assign it.
>> Reported-by: Nick Xie <nick@khadas.com>
>> Closes: https://lore.kernel.org/linux-amlogic/20260113011931.40424-1-nick@khadas.com/
>> Fixes: 3ab9d54b5d84 ("arm64: dts: amlogic: enable some device nodes for S4")
>> Tested-by: Nick Xie <nick@khadas.com>
>> 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 9d99ed2994df..62538fd9db6b 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>;
>
> In this case, assigned-clock-parents should be dropped.
>
Dunno why I thought that was always required. I'll fix it and the other
instances
> Neil
>
>> + assigned-clock-rates = <24000000>;
>> };
>> emmc: mmc@fe08c000 {
>>
--
Jerome
© 2016 - 2026 Red Hat, Inc.