Jump to content

Recommended Posts

Posted

I cannot get SPI working on my Nanopi Duo or rather there is no /dev/spi*.

I build a custom Kernel with the build process and Network and other stuff works. Loading the spi-spidev overlay in various ways did not help. (Loading via U-Boot, during runtime, combine the overlay and devicetree and compile it as whole)

 

By the way, the Images from https://www.armbian.com/nanopi-duo/ are not even booting through U-Boot for me.

 

Some Infos:

Quote

[15:52:42:733] find /sys | grep spi␍␊

[15:52:43:464] /sys/class/spi_master␍␊

[15:52:43:464] /sys/class/spi_slave␍␊

[15:52:43:491] /sys/firmware/devicetree/base/fragment@1/__overlay__/spidev␍␊

[15:52:43:493] /sys/firmware/devicetree/base/fragment@1/__overlay__/spidev/compatible␍␊

[15:52:43:502] /sys/firmware/devicetree/base/fragment@1/__overlay__/spidev/status␍␊

[15:52:43:507] /sys/firmware/devicetree/base/fragment@1/__overlay__/spidev/reg␍␊

[15:52:43:513] /sys/firmware/devicetree/base/fragment@1/__overlay__/spidev/spi-max-frequency␍␊

[15:52:43:518] /sys/firmware/devicetree/base/fragment@1/__overlay__/spidev/name␍␊

[15:52:43:524] /sys/firmware/devicetree/base/__symbols__/spi0␍␊

[15:52:43:529] /sys/firmware/devicetree/base/__symbols__/spi1_pins␍␊

[15:52:43:535] /sys/firmware/devicetree/base/__symbols__/spi0_pins␍␊

[15:52:43:538] /sys/firmware/devicetree/base/__symbols__/spi1␍␊

[15:52:43:543] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi0␍␊

[15:52:43:546] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi0/pins␍␊

[15:52:43:552] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi0/phandle␍␊

[15:52:43:557] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi0/function␍␊

[15:52:43:563] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi0/linux,phandle␍␊

[15:52:43:571] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi0/name␍␊

[15:52:43:577] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi1␍␊

[15:52:43:581] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi1/pins␍␊

[15:52:43:586] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi1/phandle␍␊

[15:52:43:590] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi1/function␍␊

[15:52:43:596] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi1/linux,phandle␍␊

[15:52:43:604] /sys/firmware/devicetree/base/soc/pinctrl@01c20800/spi1/name␍␊

[15:52:43:610] /sys/firmware/devicetree/base/soc/spi@01c69000␍␊

[15:52:43:613] /sys/firmware/devicetree/base/soc/spi@01c69000/compatible␍␊

[15:52:43:618] /sys/firmware/devicetree/base/soc/spi@01c69000/clocks␍␊

[15:52:43:624] /sys/firmware/devicetree/base/soc/spi@01c69000/resets␍␊

[15:52:43:627] /sys/firmware/devicetree/base/soc/spi@01c69000/clock-names␍␊

[15:52:43:632] /sys/firmware/devicetree/base/soc/spi@01c69000/status␍␊

[15:52:43:638] /sys/firmware/devicetree/base/soc/spi@01c69000/#address-cells␍␊

[15:52:43:643] /sys/firmware/devicetree/base/soc/spi@01c69000/interrupts␍␊

[15:52:43:649] /sys/firmware/devicetree/base/soc/spi@01c69000/#size-cells␍␊

[15:52:43:654] /sys/firmware/devicetree/base/soc/spi@01c69000/dma-names␍␊

[15:52:43:657] /sys/firmware/devicetree/base/soc/spi@01c69000/phandle␍␊

[15:52:43:662] /sys/firmware/devicetree/base/soc/spi@01c69000/reg␍␊

[15:52:43:668] /sys/firmware/devicetree/base/soc/spi@01c69000/pinctrl-0␍␊

[15:52:43:674] /sys/firmware/devicetree/base/soc/spi@01c69000/dmas␍␊

[15:52:43:677] /sys/firmware/devicetree/base/soc/spi@01c69000/linux,phandle␍␊

[15:52:43:682] /sys/firmware/devicetree/base/soc/spi@01c69000/name␍␊

[15:52:43:687] /sys/firmware/devicetree/base/soc/spi@01c69000/pinctrl-names␍␊

[15:52:43:693] /sys/firmware/devicetree/base/soc/spi@01c68000␍␊

[15:52:43:696] /sys/firmware/devicetree/base/soc/spi@01c68000/compatible␍␊

[15:52:43:701] /sys/firmware/devicetree/base/soc/spi@01c68000/clocks␍␊

[15:52:43:707] /sys/firmware/devicetree/base/soc/spi@01c68000/resets␍␊

[15:52:43:712] /sys/firmware/devicetree/base/soc/spi@01c68000/clock-names␍␊

[15:52:43:718] /sys/firmware/devicetree/base/soc/spi@01c68000/status␍␊

[15:52:43:721] /sys/firmware/devicetree/base/soc/spi@01c68000/#address-cells␍␊

[15:52:43:726] /sys/firmware/devicetree/base/soc/spi@01c68000/interrupts␍␊

[15:52:43:732] /sys/firmware/devicetree/base/soc/spi@01c68000/#size-cells␍␊

[15:52:43:737] /sys/firmware/devicetree/base/soc/spi@01c68000/dma-names␍␊

[15:52:43:743] /sys/firmware/devicetree/base/soc/spi@01c68000/phandle␍␊

[15:52:43:746] /sys/firmware/devicetree/base/soc/spi@01c68000/reg␍␊

[15:52:43:751] /sys/firmware/devicetree/base/soc/spi@01c68000/pinctrl-0␍␊

[15:52:43:757] /sys/firmware/devicetree/base/soc/spi@01c68000/dmas␍␊

[15:52:43:762] /sys/firmware/devicetree/base/soc/spi@01c68000/linux,phandle␍␊

[15:52:43:769] /sys/firmware/devicetree/base/soc/spi@01c68000/name␍␊

[15:52:43:771] /sys/firmware/devicetree/base/soc/spi@01c68000/pinctrl-names␍␊

[15:52:43:776] /sys/firmware/devicetree/base/__fixups__/spi0␍␊

[15:52:43:782] /sys/firmware/devicetree/base/__fixups__/spi1␍␊

[15:52:43:785] /sys/firmware/devicetree/base/fragment@2/__overlay__/spidev␍␊

[15:52:43:790] /sys/firmware/devicetree/base/fragment@2/__overlay__/spidev/compatible␍␊

[15:52:43:796] /sys/firmware/devicetree/base/fragment@2/__overlay__/spidev/status␍␊

[15:52:43:801] /sys/firmware/devicetree/base/fragment@2/__overlay__/spidev/reg␍␊

[15:52:43:807] /sys/firmware/devicetree/base/fragment@2/__overlay__/spidev/spi-max-frequency␍␊

[15:52:43:815] /sys/firmware/devicetree/base/fragment@2/__overlay__/spidev/name␍␊

[15:52:43:821] /sys/firmware/devicetree/base/fragment@0/__overlay__/spi0␍␊

[15:52:43:826] /sys/firmware/devicetree/base/fragment@0/__overlay__/spi1␍␊

[15:52:43:832] /sys/bus/platform/drivers/sun6i-spi␍␊

[15:52:43:835] /sys/bus/platform/drivers/sun6i-spi/bind␍␊

[15:52:43:837] /sys/bus/platform/drivers/sun6i-spi/unbind␍␊

[15:52:43:840] /sys/bus/platform/drivers/sun6i-spi/uevent␍␊

[15:52:43:846] /sys/bus/platform/drivers/sun4i-spi␍␊

[15:52:43:848] /sys/bus/platform/drivers/sun4i-spi/bind␍␊

[15:52:43:851] /sys/bus/platform/drivers/sun4i-spi/unbind␍␊

[15:52:43:857] /sys/bus/platform/drivers/sun4i-spi/uevent␍␊

[15:52:43:859] /sys/bus/spi␍␊

[15:52:43:859] /sys/bus/spi/drivers_probe␍␊

[15:52:43:862] /sys/bus/spi/devices␍␊

[15:52:43:865] /sys/bus/spi/uevent␍␊

[15:52:43:868] /sys/bus/spi/drivers␍␊

[15:52:43:868] /sys/bus/spi/drivers/m25p80␍␊

[15:52:43:870] /sys/bus/spi/drivers/m25p80/bind␍␊

[15:52:43:873] /sys/bus/spi/drivers/m25p80/unbind␍␊

[15:52:43:876] /sys/bus/spi/drivers/m25p80/uevent␍␊

[15:52:43:882] /sys/bus/spi/drivers/mmc_spi␍␊

[15:52:43:884] /sys/bus/spi/drivers/mmc_spi/bind␍␊

[15:52:43:887] /sys/bus/spi/drivers/mmc_spi/unbind␍␊

[15:52:43:890] /sys/bus/spi/drivers/mmc_spi/uevent␍␊

[15:52:43:893] /sys/bus/spi/drivers_autoprobe␍␊

[15:52:43:925] bash-4.4# ␍␊

[15:52:43:955] bash-4.4# ls -l /dev/ | grep spi␍␊

[15:52:48:188] bash-4.4# ␍␊

[15:52:48:215] bash-4.4# ls -l /dev/ | grep -i spi␍␊

[15:52:59:458] bash-4.4# ␍␊

 

 

Posted
3 hours ago, Stefan Arnold said:

By the way, the Images from https://www.armbian.com/nanopi-duo/ are not even booting through U-Boot for me.


They are tested. Except the one labeled with nightly. Those are auto made from the trunk and sometimes are broken ... which is normal.

 

Can you provide:
- which image did you try

- serial console log

 

SPI. Check if all those USB ports that are enabled by default makes any troubles with SPI.

Posted

The Image I tried is "Armbian_5.38_Nanopiduo_Debian_stretch_next_4.14.15.img".

 

The issue with U-Boot was probably because of a defective card reader which I replaced now.

Now every time I dd an image I check it with cmp afterwards. So this way I can be sure the SD-Card has the correct content.

 

I have 2 Cards, a noname one with 16GB and a 32GB Sandisk.

 

The 16GB one freezes at some time with no error:

Quote

...

[13:49:56:181] [<0x1b>[0;32m  OK  <0x1b>[0m] Started WPA supplicant.␍␊
[13:49:56:214] [<0x1b>[0;32m  OK  <0x1b>[0m] Started Authorization Manager.␍␊
[13:49:57:284] [<0x1b>[0;32m  OK  <0x1b>[0m] Started Network Manager Wait Online.␍␊
[13:49:57:310] [<0x1b>[0;32m  OK  <0x1b>[0m] Reached target Network is Online.␍␊
[13:49:57:340]          Starting LSB: Start NTP daemon...␍␊
[13:49:57:370]          Starting LSB: disk temperature monitoring daemon...␍␊
[13:49:57:401]          Starting LSB: Advanced IEEE 802.11 management daemon...␍␊
[13:49:57:450]          Starting /etc/rc.local Compatibility...␍␊
[13:49:57:483] [<0x1b>[0;32m  OK  <0x1b>[0m] Started LSB: Advanced IEEE 802.11 management daemon.␍␊
[13:49:57:509] [<0x1b>[0;32m  OK  <0x1b>[0m] Started /etc/rc.local Compatibility.␍␊

 

The 32GB one gives strange filesystem errors:

Quote

...

[14:16:51:865] [ 19.877371] EXT4-fs error (device mmcblk0p1): ext4_find_entry:1436: inode #1447: comm kworker/u8:0: reading directory lblock 0␍␊

[14:16:51:887] See 'systemctl status networking.service' for details.␍␊

[14:16:51:890] [ 19.904558] EXT4-fs error (device mmcblk0p1): __ext4_get_inode_loc:4568: inode #36: block 108: comm systemd-journal: unable to read itable block␍␊

[14:16:51:913] [ 19.925645] EXT4-fs error (device mmcblk0p1): __ext4_get_inode_loc:4568: inode #36: block 108: comm systemd-journal: unable to read itable block␍␊

[14:16:51:934] [ 19.946976] EXT4-fs error (device mmcblk0p1)<0xfa><break>

 

badblocks shows no errors on both.

 

Using my custom created Image I have no problems except with SPI.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines