AnsweredAssumed Answered

BMP280 support for i.MX 6UltraLite / 6ULL

Question asked by Mathieu De Zutter on Jan 7, 2019
Latest reply on Jan 8, 2019 by Mathieu De Zutter

Hello,

 

I'm trying to get the BMP280 presure sensor from Bosch to work trough SPI at the i.MX 6UltraLite / 6ULL running kernel 4.9.88.

This is the part of my device tree:

 

&&ecspi4 {
     fsl,spi-num-chipselects = <1>;
     cs-gpios = <&gpio2 15 0>;
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_ecspi4_1>;
     status = "okay";
     
     // pressure sensor Bosch BMP280
         bmp280@0 {
            compatible = "bosch,bmp280";
            reg = <0>;
               #address-cells = <1>;
               #size-cells = <0>;
               spi-max-frequency = <500000>;
               default-oversampling = <1>;
        };
};

 

My config file looks like this:

 

CONFIG_BMP280=m
CONFIG_BMP280_SPI=m

 

This is the dmesg output:

 

[ 11.193138] bmp280 spi3.0: bad chip id: expected 58 got ff
[ 11.227348] bmp280: probe of spi3.0 failed with error -22

 

I triple-cheked the wiring before posting and the also I have a working setup with an Arduino using SPI.

 

Does anybody find what could cause the problem?

 

Thanks in advance,

Mathieu

Outcomes