LSM6DSV16X + IIS2MDC Sensor Integration on Android 10 (i.MX8MM)
We are currently working on integrating the LSM6DSV16X (IMU) and IIS2MDC (Magnetometer) sensors into our platform based on NXP’s i.MX8MM SoC running Android 10. As Android 10 uses the legacy HAL, we’ve followed the integration steps as per the README documentation.
Below are the key configurations and issues we are encountering:
Platform & Sensor Info
Android Version: 10 (AOSP)
SoC: NXP i.MX8MM
Sensor Drivers: LSM6DSV16X and IIS2MDC
HAL Version: 1.0 (Legacy)
What We've Done
Integrated device nodes into DTS as follows:
{
compatible = "st,iis2mdc_magn";
reg = <0x1e>;
pictrl-names = "default";
pinctrl-0 = <&pinctrl_st_magno>;
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
st,module_id = <1>;
status = "okay"; };
lsm6dsvx-imu@6b {
compatible = "st,lsm6dsv16x";
reg = <0x6b>;
pictrl-names = "default";
pinctrl-0 = <&pinctrl_st_acc_gyro_yo>;
interrupt-parent = <&gpio1>;
interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
st,int-pin = <2>;
mount-matrix = "1", "0", "0",
"0", "1", "0",
"0", "0", "1";
st,module_id = <1>;
status = "okay";
};
Enabled relevant sensor configurations in the kernel defconfig.
Disabled the time sync library at both HAL and kernel levels, as per recommendations.
Observed Behaviour
Sensor HAL is loading and initialising properly.
On launching the test application, the HAL shows the correct sensor activation and reports a polling rate (e.g., 15 Hz).
However, no sensor values are reported back to the app.
/proc/interrupts confirms that the IRQ count does not increment over time.
From the logs:
FIFO length is reported as 0, leading to no data being read.
If interrupts are disabled, we can successfully read data from sysfs, which confirms basic I2C communication is working.
Request
We are currently stuck as to what the next step should be:
Should we focus on debugging interrupt handling from the kernel driver side?
Is there a specific step required in the HAL or DTS that could enable proper FIFO/IRQ flow?
We would appreciate any insight or suggestions. For reference, I can provide the complete DTS and defconfig snippets if required.
Thanks in advance for your support.
