[PATCH] spi: dw: Use controller clock rate as maximum frequency
Jagan Teki
jagan at amarulasolutions.com
Mon Dec 18 12:40:47 CET 2023
On Wed, Oct 25, 2023 at 1:20 PM Kunihiko Hayashi
<hayashi.kunihiko at socionext.com> wrote:
>
> Currently the controller driver has maximum frequency in plat->frequency
> that is specified by "spi-max-frequency" DT property in the controller
> node. This is special to U-Boot and doesn't exist to Linux.
>
> spi {
> spi-max-frequency = <A>;
> };
>
> Usually the frequency should be specified by "spi-max-frequency" at the
> slave device node.
>
> spi {
> slave {
> spi-max-frequency = <B>;
> };
> };
>
> The final maximum frequency is set to the smaller value of the controller
> node (A) and the slave device node (B).
>
> Currently, if the property in the controller node is omitted, the default
> frequency is fixed at 500kHz. Even if the controller and the slave device
> allow the higher frequency than 500kHz, the maximum frequency can't exceed
> 500kHz.
>
> The upper limit of the maximum frequency should be determined by the clock
> rate of the controller clock. And this patch determines the maximum
> frequency based on the clock rate if the controller node property isn't
> specified.
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko at socionext.com>
> ---
Applied to u-boot-spi/master
More information about the U-Boot
mailing list