[PATCH v2] mmc: msm_sdhci: Use max-frequency to get clock rate

Sumit Garg sumit.garg at kernel.org
Mon Apr 20 14:31:41 CEST 2026


On Thu, Apr 16, 2026 at 10:41:51AM +0530, Varadarajan Narayanan wrote:
> msm_sdc_clk_init() uses clock-frequency to get the clock rate for SDC
> clocks. However, the DT files seem to use max-frequency for the same.
> Since msm_sdc_clk_init() doesn't find clock-frequency in the DT, it sets
> 201500000 as the clock rate and this results in timeout errors on IPQ
> platforms.
> 
> Additionally, clock-frequency is not DT bindings compliant. Hence, get
> clock rate using DT bindings compliant max-frequency.
> 
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan at oss.qualcomm.com>
> ---
>  drivers/mmc/msm_sdhci.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Sumit Garg <sumit.garg at oss.qualcomm.com>

-Sumit

> 
> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
> index 66f3cf2de4f..aaa87923604 100644
> --- a/drivers/mmc/msm_sdhci.c
> +++ b/drivers/mmc/msm_sdhci.c
> @@ -71,8 +71,7 @@ static int msm_sdc_clk_init(struct udevice *dev)
>  
>  	var_info = (void *)dev_get_driver_data(dev);
>  
> -	ret = ofnode_read_u32(node, "clock-frequency", (uint *)(&clk_rate));
> -	if (ret)
> +	if (ofnode_read_u32(node, "max-frequency", (uint *)(&clk_rate)))
>  		clk_rate = 201500000;
>  
>  	ret = clk_get_bulk(dev, &prv->clks);
> -- 
> 2.34.1
> 


More information about the U-Boot mailing list