Here's the corrected version of your paragraph for posting on the forum:
Hi @Chavira,
Thank you for your response.
After adding the changes to the DTS file, the spidev device is not created in the /dev/ partition, and I encountered the following error:
[ 2.654396] spi_slave spi1: /bus@5a000000/spi@5a000000/spi@0 is not called 'slave'
[ 2.662047] spi_slave spi1: Failed to create SPI device for /bus@5a000000/spi@5a000000/spi@0
Initially, my DTS configuration looked like this:
&lpspi0 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
assigned-clock-rates = <60000000>;
pinctrl-0 = <&pinctrl_lpspi0 &pinctrl_lpspi0_cs>;
cs-gpios = <&lsio_gpio1 8 GPIO_ACTIVE_LOW>;
spi-slave;
status = "okay";
spidev0: spi@0 {
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <8000000>;
};
};To resolve this, I made the following changes to the DTS file:
&lpspi0 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
assigned-clock-rates = <60000000>;
pinctrl-0 = <&pinctrl_lpspi0 &pinctrl_lpspi0_cs>;
cs-gpios = <&lsio_gpio1 8 GPIO_ACTIVE_LOW>;
status = "okay";
spidev0: spi@0 {
reg = <0>;
spi-slave;
compatible = "rohm,dh2228fv";
spi-max-frequency = <8000000>;
};
};After applying these changes, the error was resolved, and spidev1.0 was successfully created in the /dev/ partition.
I then wrote the SPI slave receive code for the i.MX8QXP side. Upon running the code, I checked the clock waveform with a logic analyzer. The clock signal is in the active high and low format, but for SPI slave mode, it needs to be in an active low state.
Could you please help me with how to configure the clock polarity to ensure it's in active low for SPI slave mode?
Best Regards!
Subash