Hi everyone,
I recently just built flashed the r3 with a nand image, using the sources from this repo.
cat /lib/modules/5.4.99/modules.builtin | grep spi
confirms the presence of the spidev module. However there isn't any
/dev/spi*
file. Looking at the contents of the file 'board/widora/mangopi/r3/devicetree/linux/devicetree.dts' I only find the device node for the first SPI controller (spi0) with child nodes spi-nor & spi-nand and none for the second SPI controller (spi1 ?). Do I need add another SPI device node to these file?? or is there something I'm missing??
Any help would be much appreciated
离线
please check CONFIG_SPI_SPIDEV=y
离线
Thank you @Lone Star Tears, for the quick response and sorry I'm only getting back now.
This is the section where CONFIG_SPI_SPIDEV is already set.
#
# SPI Protocol Masters
#
CONFIG_SPI_SPIDEV=y
# CONFIG_SPI_LOOPBACK_TEST is not set
# CONFIG_SPI_TLE62X0 is not set
# CONFIG_SPI_SLAVE is not set
# CONFIG_SPMI is not set
# CONFIG_HSI is not set
...
Do I need to set CONFIG_SPI_SLAVE??. And also what make target do I use to avoid recompiling everything.
离线
check the device tree compatible property, try "rohm,dh2228fv"
离线
Hi shaoxi2010,,
Checked board/allwinner/suniv-f1c100s/devicetree/linux/suniv-f1c100s.dtsi and board/widora/mangopi/r3/devicetree/linux/devicetree.dts. Got nothing
离线
the spidev need a device tree node, such as this.
&spi0 {
spidev@0 {
compatible = "rohm,dh2228fv";
reg = <0>;
spi-max-frequency = <24000000>;
};
};
离线
Yup I added it. Looking at the source (board/widora/mangopi/r3/devicetree/linux/devicetree.dts) there is no configuration for the second SPI controller (spi1), so I added one. Also the compatible string I use is 'linux,spidev'. I now get the device in /dev but it seems the a test program shows the SPI port isn't working. I'll keep trying..
最近编辑记录 droptop (2022-01-27 19:17:30)
离线