Skip to content
Unverified Commit 8e886ac8 authored by Maksim Kiselev's avatar Maksim Kiselev Committed by Mark Brown
Browse files

spi: sun6i: add quirk for in-controller clock divider



Previously SPI controllers in Allwinner SoCs has a clock divider inside.
However now the clock divider is removed and to set the transfer clock
rate it's only needed to set the SPI module clock to the target value
and configure a proper work mode.

According to the datasheet there are three work modes:

| SPI Sample Mode         | SDM(bit13) | SDC(bit11) | Run Clock |
|-------------------------|------------|------------|-----------|
| normal sample           |      1     |      0     | <= 24 MHz |
| delay half cycle sample |      0     |      0     | <= 40 MHz |
| delay one cycle sample  |      0     |      1     | >= 80 MHz |

Add a quirk for this kind of SPI controllers.

Co-developed-by: default avatarIcenowy Zheng <icenowy@aosc.io>
Signed-off-by: default avatarMaksim Kiselev <bigunclemax@gmail.com>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: default avatarAndre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20230510081121.3463710-4-bigunclemax@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b00c0d89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment