[PATCH v11 08/19] spi: cadence-quadspi: add PHY tuning support

Mark Brown broonie at kernel.org
Sun Nov 15 11:02:20 PST 2026


> The Cadence QSPI controller supports a delay-line PHY for high-speed
> operation. Without calibration the PHY is unused and read capture relies
> on a fixed delay, limiting throughput at frequencies above the base
> operating speed.

> +static int cqspi_am654_ospi_execute_tuning(struct spi_mem *mem,
> +					   struct spi_mem_op *read_op,
> +					   struct spi_mem_op *write_op)
> +{

> +	f_pdata->phy_read_op.max_freq = mem->spi->post_config_max_speed_hz;

Do we need to validate with the reference clock here?  AIUI in PHY mode
we bypass the divider we set in cqspi_configure() so we might be
overclocking things.  There's also an awful lot of Sashiko reports on
this, some of which looked plausible.

> @@ -1587,9 +3308,15 @@ static int cqspi_of_get_flash_pdata(struct platform_device *pdev,
>  		return -ENXIO;
>  	}
>  
> -	if (of_property_read_u32(np, "spi-max-frequency", &f_pdata->clk_rate)) {
> -		dev_err(&pdev->dev, "couldn't determine spi-max-frequency\n");
> -		return -ENXIO;

This is a bit surprising?

-- 
Mark Brown <broonie at kernel.org>



More information about the linux-mtd mailing list