1. Below is the pinctrl configuration from our device tree:
pinctrl_lpspi2: lpspi2grp {
fsl,pins = <
IMX8QM_SPI2_SCK_DMA_SPI2_SCK 0x06000040
IMX8QM_SPI2_SDO_DMA_SPI2_SDO 0x06000040
IMX8QM_SPI2_SDI_DMA_SPI2_SDI 0x06000040
>;
};
pinctrl_lpspi2_cs: lpspi2cs {
fsl,pins = <
IMX8QM_SPI2_CS0_LSIO_GPIO3_IO10 0x21
>;
};
2. I tested the SD card functionality using the spidev driver by changing the compatible property as shown below. During the write and read operations,
the data is written successfully, but no data is returned during the read operation.
&lpspi2 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi2 &pinctrl_lpspi2_cs>;
cs-gpios = <&lsio_gpio3 10 GPIO_ACTIVE_LOW>;
status = "okay";
mmc-slot@0 {
compatible = "rohm,dh2228fv";
reg = <0>;
voltage-ranges = <3300 3300>;
spi-max-frequency = <400000>;
};
};
Despite successful data writing, the read operation returns no data.
Is this what you expected to be confirmed? If not, could you please provide
guidance on how to properly test the SD card using spidev?
Any insights on this issue would be greatly appreciated.
Thanks & Regards,
Sujith Sajeev