cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2MDL Magnetometer Probe failed and Vdd power supply not found, dummy regulator issue

Perumalsamy
Associate II

Hi,

I have successfully connected the LIS2MDL magnetometer to my reference board via I2C, and it is detected. However, after enabling the necessary kernel configurations and device tree, it indicates that the VDD supply is not found, and it resorts to using a dummy regulator supply. Additionally, there is a probing issue. I have provided the enabled configurations, device tree, and logs below.

kernel configuration

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

device tree

&i2c0 {
status = "okay";

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

regulators {
reg_3v3: regulator-3v3 {
compatible = "regulator-fixed";
regulator-name = "3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
};
};

boot log

[ 3.681279] st-magn-i2c 0-001e: supply vdd not found, using dummy regulator
[ 3.693564] st-magn-i2c 0-001e: supply vddio not found, using dummy regulator
[ 3.728755] st-magn-i2c: probe of 0-001e failed with error -22

Can I make any changes to the device tree or kernel configuration? Could someone kindly assist me in resolving this issue?

 

  

8 REPLIES 8
Federica Bossi
ST Employee

Hi @Perumalsamy ,

 

I can support you only if something related to the hardware, can you share your schematic?

Unfortunately, in case your issue is related to your own firmware we can't support you because it's not an ST product.

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.
Perumalsamy
Associate II

I think this is ST product
https://www.st.com/resource/en/datasheet/lis2mdl.pdf

I connected the sensor in the i2c bus of zcu106 Evaluation Board.

https://www.mouser.com/datasheet/2/903/ug1244-zcu106-eval-bd-1596082.pdf#page=122&zoom=100,122,349

I add my connection flow in the below document for your kind reference

Federica Bossi
ST Employee

Hi @Perumalsamy ,

From your schematic I don't see CS, SDO and VDDIO. How are they connected?

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.

I am connected these pins in the i2c. I need only these pins 3v3, GND, SDA and SCL. If the above mentioned pins are need to be connected, kindly assist me.

If there is a generic driver available for LIS2MDL, kindly assist me.

Federica Bossi
ST Employee

Hi @Perumalsamy ,

Yes, if you don't connect CS, SDO and VDDIO it will not work. Please, follow our guideline and connect them.

For the drivers you find those on our github.

 

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.

Hi @Federica Bossi 

Thank you for your help. Is there any changes I need to done on the device tree part. Can you give me a example device tree for LIS2MDL Magnetometer.

Hi @Federica Bossi 

I able to rectify the "unable to find the vdd supply

But now I got got into the below error.

[ 4.648014] st_lsm6dsx_i2c 0-006b: mounting matrix not found: using identity...
[ 4.661308] st-magn-i2c: probe of 0-001e failed with error -22

In my schematics the DRDY pin is connected to the pulldown resistor with value of 1K. Do I need to change to anything. Can you assist me to solve this error.