Skip to main content
Visitor II
April 18, 2025
Question

Using the STM drivers with kernel above 6.6 i.e 6.13

  • April 18, 2025
  • 1 reply
  • 545 views

Hi,
im currently working on interfacing the STM mems sensors with Beagle Vahead board, im using a kernel version of 6.13 and i tried patching the STM MEMS IIO drivers from link. Im aware that the STM has confirmed the testing of the driver with kernel 6.6.

While patching i faced few errors ie mis match in the headders and i have successfully resolved them.
im able to boot the device and able to get the device node in the /sys/bus/iio/device  when interfacing the lps22df sensor.
when any other sensors (lsm6dsox, lisduxs12,lsm6dsv32) are interfaced on the same bus, im not able to detect the device. i have the same hardware set for lps22df  also. but in that case i was able to get the raw pressure and temperature data.

I want to understand the issue why it happens so.
i have mentioned the mininal properties on the i2c bus node in DTS file. and have omitted all the optional parameters.

have a look at the STM driver booting errors

[ 1.143802] st_lsm6dsox_i2c 2-006b: supply vdd not found, using dummy regulator

[ 1.168768] st_lsm6dsox_i2c 2-006b: supply vddio not found, using dummy regulator

[ 1.177306] st_lsm6dsox_i2c 2-006b: probe with driver st_lsm6dsox_i2c failed with error -121

[ 1.186313] st_lsm6dsvx_i2c 2-006a: supply vdd not found, using dummy regulator

[ 1.194100] st_lsm6dsvx_i2c 2-006a: supply vddio not found, using dummy regulator

[ 1.202116] st_lsm6dsvx_set_page_access set page access error

[ 1.208680] st_lsm6dsvx_i2c 2-006a: probe with driver st_lsm6dsvx_i2c failed with error -121

[ 1.217828] st_lps22df_i2c 2-005c: failed to read Who-Am-I register

[ 1.224226] st_lps22df_i2c 2-005c: probe with driver st_lps22df_i2c failed with error -121

[ 1.235138] Legacy PMU implementation is available

copy of dts file where it is defined

 
&i2c2 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins>;
status = "okay";
 
lis2dux12@19 {
        compatible = "st,lis2duxs12";
        reg = <0x19>;
};
 
lsm6dsox@6b {
        compatible = "st,lsm6dsox";
        reg = <0x6b>;
 
};
 
lsm6dsvx@6a {
        compatible = "st,lsm6dsv16x";
        reg = <0x6a>;
};
 
lps28dfw@5c {
        compatible = "st,lps28dfw";
        reg = <0x5c>;
};
 
 
 
};
    This topic has been closed for replies.

    1 reply

    Technical Moderator
    April 28, 2025

    Hi @jayakrishnan_k ,

    Do you see the sensors on the i2c bus using i2c-tools (like i2cdetect, i2cdump, i2cget and i2cset)?
    Something like this:
    # i2cdetect -y 2

    Visitor II
    April 28, 2025

    @Federica Bossi 
    yes i was able to see the sensor connected at the bus and was able to see that the sensor names mentioned in the dtb file was reflected in devices of i2c device.

    but im not able to get the device in /sys/bus/iio/devices/ dir.

    jayakrishnan_k_0-1745823985947.png

     

    Technical Moderator
    April 28, 2025

    Hi @jayakrishnan_k ,

    Okay, can you try to use a logic analyzer and send us the tracking over I2C at boot? That way we can see if there are any problems at that stage.