Get SPI flash device node to appear on Edge-V

On Ubuntu on the Edge-V, how do I get the on-board SPI flash to appear as a /dev/spidevX.Y? There are some instructions around here to do it for the VIM SBCs and for, I think, the secondary SPI interface exposed through the GPIO pins, but none for the primary SPI flash. /sys/class/spidev is empty.

/dev/spidevX.Y is not for spi flash, it is for the spi interface on the 40 pin headers.

Then what device node does the on-board SPI flash use?

And what is the chip that is used for SPI flash?

How you get the on-board SPI flash to appear?

It seems need to modify the source code to enable the SPI Flash, could you tell me what you want to do with the SPI Flash?

I want to enable write protection.

Hello @Melab

Please follow the steps below to upgrade the kernel to enable mtd devices.

cd /tmp/
sudo dpkg -i linux-dtb-rockchip-4.4_1.4.2_arm64.deb linux-image-rockchip-4.4_1.4.2_arm64.deb linux-headers-rockchip-4.4_1.4.2_arm64.deb 
sudo reboot

After reboot you will find the spi flash mtd device node.

khadas@Khadas:~$ ls -al /dev/mtd*
crw------- 1 root root 90, 0 Feb 14 06:38 /dev/mtd0
crw------- 1 root root 90, 1 Feb 14 06:38 /dev/mtd0ro
brw-rw---- 1 root disk 31, 0 Feb 14 06:38 /dev/mtdblock0

I am on kernel version 5.17 and those devices exist. The problem is that I don’t think they provide the interface used to enable the SPI chip’s write protection.

We don’t maintain 5.17 anymore, we will enable spi flash in next 6.x release.

When can that be expected?

Hello @Melab

We will make it work for more recently 6.x kernel, but not 5.17.

I get that, but how long will the wait be? One month? Two months?