Hi,
We have an im8mp board (solidrun) based HW running yocto zeus. I am trying to configure the ecspi1 to use BME280 sensor.
Here is my device tree configuration:
From imx8mp.dtsi:
ecspi1: spi@30820000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx8mp-ecspi", "fsl,imx6ul-ecspi";
reg = <0x30820000 0x10000>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MP_CLK_ECSPI1_ROOT>,
<&clk IMX8MP_CLK_ECSPI1_ROOT>;
clock-names = "ipg", "per";
assigned-clock-rates = <80000000>;
assigned-clocks = <&clk IMX8MP_CLK_ECSPI1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
dma-names = "rx", "tx";
status = "disabled";
};
From imx8mp-hummingboard-pulse.dts
&ecspi1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
status = "okay";
spidev@0x00 {
compatible = "linux,spidev";
reg = <0>;
spi-max-frequency = <10000000>;
status = "okay";
};
pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX8MP_IOMUXC_ECSPI1_SCLK__ECSPI1_SCLK 0x06
MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI 0x06
MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO 0x06
MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x86
>;
};
I get the spidev
lrwxrwxrwx 1 root root 0 Nov 24 10:05 spidev1.0 -> ../../devices/platform/soc@0/30800000.bus/30820000.spi/spi_master/spi1/spi1.0/spidev/spidev1.0
root@vision-platform:~# ls /dev/spidev1.0
/dev/spidev1.0
root@vision-platform:~#
I am trying the spi_fdx.c adapted to the device address for BME280.
What i am seeing is that as soon as the address byte is sent out the SCLK is stopped, which makes the BME280 unable to send any data back.

What do i need to change in the device configuration so that the CLK is active as long as the CS is low?
regards
Arun