2024-01-14 08:28 AM
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 = <®_3v3>;
vddio-supply = <®_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?
2024-01-18 12:58 AM
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.
2024-01-18 01:27 AM
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
2024-02-01 01:33 AM
Hi @Perumalsamy ,
From your schematic I don't see CS, SDO and VDDIO. How are they connected?
2024-02-01 02:43 AM
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.
2024-02-04 06:57 AM
If there is a generic driver available for LIS2MDL, kindly assist me.
2024-02-05 02:44 AM
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.
2024-02-06 12:53 AM
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.
2024-02-09 04:49 AM
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.