cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2MDL Magnetometer unable to find vdd supply

Perumalsamy
Associate II

Hi 

I am using the LIS2MDL Magnetometer, which is connected to i2c0 on my custom board. I have enabled the respective kernel configuration for the magnetometer.

CONFIG_IIO_ST_SENSORS_I2C=y
CONFIG_IIO_ST_SENSORS_SPI=y
CONFIG_IIO_ST_SENSORS_CORE=y

CONFIG_IIO_ST_MAGN_3AXIS=y
CONFIG_IIO_ST_MAGN_I2C_3AXIS=y
CONFIG_IIO_ST_MAGN_SPI_3AXIS=y
 

The implemented device tree is provided below.

\{

regulator_1: regulator-1 {
compatible = "regulator-fixed";
regulator-name = "regulator.1";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

};

&i2c0 {
status = "okay";
lis2mdl: lis2mdl@1e {
compatible = "st,lis2mdl";
reg = <0x1e>;
vdd-supply = <&regulator_1>;
vddio-supply = <&regulator_1>;
};
};

When my board booted up, I checked whether the driver was probed or not. However, it did not get probed. I have attached my dmesg log below.

 

[ 4.624377] st-magn-i2c 0-001e: supply vdd not found, using dummy regulator
[ 4.631410] st-magn-i2c 0-001e: supply vddio not found, using dummy regulator
[ 4.638715] iio iio:device3: DRDY on pdata not valid.
[ 4.643880] st-magn-i2c: probe of 0-001e failed with error -22
[ 4.649725] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 38

The hardware connections that we checked are fine, but I don't know why this error is happening. Can anyone kindly assist me in debugging this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @Perumalsamy ,

Can you try to use our official drivers and let me know if the problem persists?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Federica Bossi
ST Employee

Hi @Perumalsamy ,

Can you try to use our official drivers and let me know if the problem persists?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank You @Federica Bossi