There is the typo in the property fsl,espi-num-chipselects - instead of fsl,spi-num-chipselects.
It prevents one to have 2 cs for the lpspi0 controller.
cs-gpios should be configured properly if one wants to use non-standard pins as csX signals. If cs-gpios has invalid gpio definitions, the corresponding spi devices are not registered at all.
If one wants to use standard pins as csX signals, these 2 pins should re-muxed as IMX8QM_SPI0_CS0_DMA_SPI0_CS0 and IMX8QM_SPI0_CS1_DMA_SPI0_CS1.
I suppose fixing the name of fsl,spi-num-chipselects property, converting pinmuxes IMX8QM_SPI0_CS0/CS1 to a native mode and removing away the cs-gpios property should fix your issue.
I see the root of the cs issue:
[ 0.473039] fsl_lpspi 5a000000.spi: cs1 >= max 1
I’m sorry to have misled you, the spi driver can’t use the native cs signals in the master mode. GPIO only.
So that there are working parts of DT for 2 spi channels on the same controller:
Thanks again for the support. Actually in the BSP3.0b3 we used to use the SPI1 as master with 2 native chip selects and it was working properly. Is it an issue in the BSP5.x ?
Although the SPI1 in the BSP5.x worked sofar with 1 native cs as master without problem too.
it worked thank you for your help. However the cs-gpios should actually be added. I tried without this property but the SPI couldnt work in the program.