Hi,
We are using imx8qm in our custom hardware,with linux kernel version :5.4.24. Here SPI0 is to be configured as slave which communicates with a RH850 processor (master).In imx8qm spi0 is configured with spi mode as 1 and 1MHz master clock (tried with 2MHz clock also)
Spi connections is as below:
SPI0 Master
MOSI <------------------ M0SI
MISO ------------------> MISO
SS <------------------ SS
SCLK <------------------ SCLK
we made the following update in the dts file:
lpspi0 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi0 &pinctrl_lpspi0_cs>;
spi-slave;
status = "okay";
spidev0: slave@0 {
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <10000000>;
status = "okay";
};
};
pinctrl_lpspi0: lpspi0grp {
fsl,pins = <
IMX8QM_SPI0_SCK_DMA_SPI0_SCK 0x0600004c
IMX8QM_SPI0_SDO_DMA_SPI0_SDO 0x0600004c
IMX8QM_SPI0_SDI_DMA_SPI0_SDI 0x0600004c
IMX8QM_SPI0_CS0_DMA_SPI0_CS0 0x0600004c
>;
};
pinctrl_lpspi0_cs: lpspi0cs {
fsl,pins = <
IMX8QM_SPI0_CS0_LSIO_GPIO3_IO05 0x21
>;
};
when we try to recieve 2 bytes of data (from RH850), its getting hang. Can you check whether the dts configuration is correct or not.
Thanks in Advance!