[PATCH] spi: dw: Use controller clock rate as maximum frequency
Kunihiko Hayashi
hayashi.kunihiko at socionext.com
Fri Apr 5 04:11:07 CEST 2024
Hi Jagan,
On 2023/12/18 20:40, Jagan Teki wrote:
> 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
Sorry for the old response,
I couldn't see this patch in the current master branch.
Could you please apply this if it is missing?
Thank you,
---
Best Regards
Kunihiko Hayashi
More information about the U-Boot
mailing list