Hi.
I am trying to use the spi-nor device driver to communicate with a SPI flash chip (N25q032a). I enabled the driver in the device tree and in the kernel.
When the driver is probing the device, I can see the correct pulses coming out from the SCLK and MOSI lines , but I don’t see any change in CS.
I can manually force the probing with
echo spi0.0 > /sys/bus/spi/drivers/spi-nor/bind
But the driver, as expected, cannot identify the chip:
spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
spi-nor: probe of spi0.0 failed with error -2
spi_imx 2008000.spi: probed
I tested the hardware by enabling the spidev module and using spidev_test
to query the chip. The spidev driver activates the CS line, the chip responds and everything works fine. So I assume the hardware is OK.
Those are the lines I appended to the device tree, at the end of imx6ull-colibri-eval-v3.dts
:
&mcp2515 {
status = "disabled";
};
&spidev0 {
status = "disabled";
};
&ecspi1 {
spi_flash: n25q032a@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
status = "okay";
};
};
I don’t know what is happening. Am I missing something?
Thank you in advance,
Juan