We try to interface W5500 SPI Ethernet module to 32-bit SPI interface with our RISC-V development board, We’ve enabled driver support for W5500, But during the kernel boot time, while driver initialisation “w5100_hw_reset” function calling “w5100_read16” function in that function seeing 65535 (FFFF) when tried to print it. But its expecting 2000. Checked MISO and CLK signal in oscilloscope but the MISO value we are seeing other then FFFF but the same value is not reflecting in the driver, please find the logs below for reference.
[ 0.000000] Linux version 5.10.41-soc (riscv@riscv) (riscv64-unknown-linux-gnu-gcc (crosstool-NG 1.24.0) 8.3.0, GNU ld (crosstool-NG 1.24.0) 2.32) #4 SMP Wed May 24 14:48:10 IST 2023
[ 3.429923] riscv : priv value 36075584
[ 3.440282] riscv : w5100_read16 65535
My SPI controller only supports 32 Bit slave devices, and do not support 8 & 16 Bit slaves.
Reading rtr register, Its not initialising.
In driver code defined rtr register value 2000(0x07D0).
In driver code defined spi_read16 function, when we print that function we are observing 65535 (FFFF) value, when we probe MISO and MOSI we’ve observing other then FFFF in oscilloscope, above attached images for CLK and MISO signal.
Currently we are not using any library, enabled driver support for wiznet in 5.10.41 kernel, configured wiznet in device tree node. while booting wiznet driver is not loading it stopping in w5100_read16 () function.
is it mandatory to add ioLibrary?
Hi,
What did you write for the device tree code?
I was using the dts overlay file provided by version 5.10.x in the Raspberry Pi environment.
The code can be found in the link below.