离线
;----------------------------------------------------------------------------------
;SPI controller configuration
;----------------------------------------------------------------------------------
[spi0]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PC19<3><1><default><default>
spi_sclk = port:PC02<3><default><default><default>
spi_mosi = port:PC00<3><default><default><default>
spi_miso = port:PC01<3><default><default><default>
[spi1]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 =
spi_sclk =
spi_mosi =
spi_miso =
[spi2]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PE04<3><1><default><default>
spi_sclk = port:PE05<3><default><default><default>
spi_mosi = port:PE06<3><default><default><default>
spi_miso = port:PE07<3><default><default><default>
[spi3]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PH17<2><1><default><default>
spi_cs1 = port:PH18<2><1><default><default>
spi_cs2 = port:PH12<3><1><default><default>
spi_cs3 = port:PH13<3><default><default><default>
spi_sclk = port:PH14<2><default><default><default>
spi_mosi = port:PH15<2><default><default><default>
spi_miso = port:PH16<2><default><default><default>
;----------------------------------------------------------------------------------
;SPI device configuration
;----------------------------------------------------------------------------------
[spi_devices]
spi_dev_num = 1
[spi_board0]
modalias = "m25p32"
max_speed_hz = 33000000
bus_num = 0
chip_select = 0
mode = 0
https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a80/cubieboard4.fex
离线
https://whycan.com/files/members/3907/A33-user-manual-release-1_1.pdf
https://whycan.com/files/members/3/Allwinner_S3_Datasheet_V0_2.pdf
https://whycan.com/files/members/3907/D1_Datasheet_V0.1_Draft_Version.pdf
https://whycan.com/files/members/3907/D1_User_Manual_V0.1_Draft_Version.pdf
https://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdf
https://linux-sunxi.org/images/a/a3/Allwinner_H5_Manual_v1.0.pdf
翻遍了这些都没找到多片选。
离线
A80啥价格啊?为了片选spi,值得吗?
不是用A80, 是看到手册和驱动都可以给每个SPI设置四个SPI_CS[0..3], 但是我能看到的芯片都只有一条片选腿, 所以非常奇怪,找到了早上的发现。
离线
这和普通io进行片选有什么区别
没有本质区别,上面这个片选方式用 SPI_TCR 寄存器的 SS_SEL 位控制片选引脚,可能效率更高?
离线