Dear sunxi community,
I am writing to you because I am having difficulties configuring the SPI controller on my Lichee RV Dock board (based on the D1 processor). The core issue is that after booting a kernel with an updated Device Tree, the spidev device does not appear in /dev/.
I am trying to enable the SPI1 interface on the Lichee RV Dock. I made changes to the Device Tree, rebuilt the dtb, and flashed it. However, after the system boots, the /dev/spidev1.0 device (or similar) is missing. The driver does not seem to create the device node.
After adding the necessary entries to the spidev driver and enabling the node in the Device Tree, the driver loads, but the /dev/spidevX.X device node is not created. There are no messages from spidev in dmesg regarding success or failure.
My actions and configuration:
1. Modifying the spidev driver: Following the official documentation, I added the compatible string for my SoC to the spidev_spi_ids[] and spidev_dt_ids[] tables in the driver's source code
{ .compatible = "allwinner,sun20i-d1-spi", .data = &spidev_of_check}
2. Device Tree Configuration: In the decompiled .dts, the SPI1 node is enabled and looks like this:
spi@4025000 {
compatible = "allwinner,sun20i-d1-spi", "allwinner,sun50i-r329-spi";
reg = <0x4025000 0x1000>;
interrupts = <0x1f 0x04>;
clocks = <0x04 0x4a 0x04 0x48>;
clock-names = "ahb", "mod";
dmas = <0x08 0x16 0x08 0x16>;
dma-names = "rx", "tx";
resets = <0x04 0x1c>;
status = "okay";
#address-cells = <0x01>;
#size-cells = <0x00>;
};
3. After rebuilding and flashing the kernel with these changes:
The spidev driver is loaded (lsmod | grep spi confirms its presence).
The device does not appear in /dev/.
There are no spidev-related messages in dmesg (neither about successful device creation nor about probe errors).