diff options
author | Maksim Kiselev <[email protected]> | 2023-05-10 11:11:10 +0300 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-05-12 13:07:44 +0900 |
commit | 8e886ac838ef12f6994ed9b13ab87784c4f0bc35 (patch) | |
tree | c04446605f6f10802e72b2c1bdba2d10b6184f29 /net/lapb/lapb_subr.c | |
parent | b00c0d8932f1e7e36570edf0f000c64399e985e0 (diff) |
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: Icenowy Zheng <[email protected]
Signed-off-by: Maksim Kiselev <[email protected]
Reviewed-by: Jernej Skrabec <[email protected]
Reviewed-by: Andre Przywara <[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions