U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] mmc: k1: do not require max-frequency in the device tree
@ 2026-10-13  8:44 Hung-Chun Tseng
  2026-10-13  8:44 ` [RFC PATCH 1/2] mmc: k1: use the io clock rate when max-frequency is absent Hung-Chun Tseng
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hung-Chun Tseng @ 2026-10-13  8:44 UTC (permalink / raw)
  To: Yixun Lan, Eric Chung, Huan Zhou, Peng Fan, Jaehoon Chung
  Cc: E Shattow, Guodong Xu, Raymond Mao, u-boot-spacemit, u-boot

The K1 SDHCI driver sets the io clock to cfg.f_max, which is only
filled in from a "max-frequency" property, so each K1 board carries
max-frequency = <204800000> for the SD and eMMC nodes in its
-u-boot.dtsi. E Shattow pointed out that this property is unlikely to
be accepted in the upstream device tree and looks like a driver issue
[1]. The Linux driver indeed does not need it: it reports the current
io clock rate as the maximum.

Patch 1 makes the U-Boot driver do the same when max-frequency is
absent. Patch 2 drops the property from the BPI-F3 and MusePi Pro
overlays.

This is an RFC because I could only build-test it: spacemit_k1_defconfig
builds (SPL and u-boot.itb), and the resulting BPI-F3 and MusePi Pro
DTBs no longer carry max-frequency on the MMC nodes. I have not run it
on hardware. The open question is what rate the io clock runs at when
SPL and U-Boot probe the controllers: if the BootROM or SPL leaves it
well below 204.8 MHz, SD and eMMC will still work but run slower, and
the driver may need a default rate instead of the current one. A test
on a BPI-F3 or MusePi Pro, or a pointer to the expected clock setup,
would be very welcome.

[1] https://lore.kernel.org/u-boot/5d323a11-da4e-4071-bdeb-ab5c03e8f85e@freeshell.de/

Hung-Chun Tseng (2):
  mmc: k1: use the io clock rate when max-frequency is absent
  riscv: dts: k1: drop max-frequency from the SD and eMMC nodes

 arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi |  2 --
 arch/riscv/dts/k1-musepi-pro-u-boot.dtsi  |  2 --
 drivers/mmc/spacemit_sdhci.c              | 24 +++++++++++++++++++----
 3 files changed, 20 insertions(+), 8 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-10-14 13:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13  8:44 [RFC PATCH 0/2] mmc: k1: do not require max-frequency in the device tree Hung-Chun Tseng
2026-10-13  8:44 ` [RFC PATCH 1/2] mmc: k1: use the io clock rate when max-frequency is absent Hung-Chun Tseng
2026-10-14 12:15   ` Tanmay Kathpalia
2026-10-13  8:44 ` [RFC PATCH 2/2] riscv: dts: k1: drop max-frequency from the SD and eMMC nodes Hung-Chun Tseng
2026-10-13  8:56 ` [RFC PATCH 0/2] mmc: k1: do not require max-frequency in the device tree Yixun Lan

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