Re: [PATCH v2 1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation
From: Adrian Hunter
Date: Mon Mar 16 2026 - 05:38:23 EST
On 16/03/2026 11:04, Iker Pedrosa wrote:
> El vie, 13 mar 2026 a las 14:04, Adrian Hunter
> (<adrian.hunter@xxxxxxxxx>) escribió:
>>
>> On 09/03/2026 13:40, Iker Pedrosa wrote:
>>> Ensure SD card pins receive clock signals by enabling pad clock
>>> generation and overriding automatic clock gating. Required for all SD
>>> operation modes.
>>
>> Need to say why update to "SPACEMIT_SDHC_LEGACY_CTRL_REG" is Ok for
>> non-SD
>
> After analyzing the reference driver implementation[1], the
> SDHC_LEGACY_CTRL_REG setting is applied to both eMMC and SD
> controllers.
>
> The reference driver sets GEN_PAD_CLK_ON for any controller with
> MMC_CAP2_NO_SDIO set (SDIO disabled). Since both our eMMC and SD
> controllers have no-sdio; in their device tree configurations, both
> should receive this setting.
>
> [1] https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.6-ky/drivers/mmc/host/sdhci-of-x1.c#L482
>
"I copied it from somewhere else" is not the best explanation,
but better than nothing I guess. However I meant add the
explanation to the commit message.