Rockpi 4 1.4B SPI

I got three pieces of those RockPi 4 v1.4B 4GB. I didn’t order a SPI flash built-in, but I received with this EEPROM chip on board. Now the problem is to have a SPI1 device, since the CS0 is already occupied by flash IC. I am searching to solve the problem by simply using a GPIO for CS1 , but unfortunately the RK3399 doesn’t support cs-gpios in the main linux kernel.

Is there any solution, there are also some custom patches for Linux system to add a cs-gpios, but isn’t up to Rockchip to make a version of their devices to add support for cs-gpios?

I didn’t order a SPI flash built-in, but I received with this EEPROM chip on board

I don’t get it. Can you take a picture of the board?

If you want to use SPI1 on GPIO header, I think the best way is to de-solder to SPI flash on board. The RK3399 only has one CS for each SPI bus.

I understand, but I don’t want to unsolder the EEPROM, because I am afraid I will burn the board. RK3399 has only one CS for each SPI bus - correct. As many other boards, the GPIO is used as second, third,…CS aka cs-gpios. As said, you could contact Rockchip to change their kernel driver to support this, there are also user patches, but all different and not merged into mainline kernel.

I have a solution. Patched kernel and dtb to add one additional CS, you can add them how many you want:

https://forum.armbian.com/topic/12227-httpsforumarmbiancomtopic12227-rockpi-4-spirockpi-4-spi/page/2/

https://forum.armbian.com/applications/core/interface/file/attachment.php?id=5552

You could ask Rockchip if they can merge the patch into mainline kernel.

Rockchip is not responsible for mainline kernel. IDK if there is any official paths and procedures. AFAIK Rockchip maintains 4.4.y only https://github.com/rockchip-linux/kernel

Prepare a patch for here https://github.com/armbian/build/tree/master/patch/kernel/rockchip64-current (and DEV 5.6.y branch) and it will be done in a matter of days and will once finds the way to the mainline. If this is generally desired and prepared by their (higher) standards.

I am a noob in this world, just learning. The patch comes from member of yours team, I guess: martinayotte . I don’t know if it’s a good idea to upload a patch on his behalf due to the intellectual property.

Ask him, but IMHO if you edit patches and send them under your name + adding a reference or claiming co-authorship its perfectly fine. Lots of patches came from the wilderness where we actually don’t know who is the author without high end forensics :slight_smile: Its might be his work or not. I don’t know …

That is fine and welcome.