Forums › Reference, Evaluation, and Development Boards › OSD32MP1-RED › Integrating IMU Sensor on I2C5 Bus on OSD32MP1-RED board.
Tagged: I2C5 IMU Sensor
Hi, I need some help configuring interrupt and clock signal for an iNEMO sensor (lsm6dsrx) connecting on I2C5 bus.
Following are pin connections between sensor and baord.
iNEMO_I2C_SCL -> SiP-B:L17(PA11) I2C5_SCL
iNEMO_I2C_SDA -> SiP-B:L18(PA12) I2C5_SDA
iNEMO_INT1 -> SiP-B:C3(PD14)
iNEMO_INT2 -> SiP-B:A3(PD15)
OR
iNEMO_INT1 -> SiP-C:T4(PH8)
iNEMO_INT2 -> SiP-C:V3(PH9)
note: iNEMO_INT2 is used as the clock ref for iNEMO master I2C.
I’ve integrated the sensor driver in linux kernel and updated the osd32mp1-red.dts as follows:
&i2c5{
pinctrl-names = “default”, “sleep”;
pinctrl-0 = <&i2c5_pins_mx>;
pinctrl-1 = <&i2c5_sleep_pins_mx>;
status = “okay”;
/delete-property/dmas;
/delete-property/dma-names;
#address-cells = <0x1>;
#size-cells = <0x0>;
lsm6dsrx@6A {
compatible = “st,lsm6dsrx”;
reg = <0x6A>;
interrupt-parent = <&gpioi>; <*** This is temporary, needs correct value
interrupts = <26 IRQ_TYPE_LEVEL_HIGH>; <*** This is temporary, needs correct value
};
};
There are 9 gpio banks (gpioa to gpioi) defined in stm32mp157cac-pinctrl.dtsi but I couldn’t figure out which one to use here.
What are the correct values I should use for interrupt-parent and interrupts fileds above.
I looked into stm32mp157 datasheet and wiki but didn’t find the answer.
Any help is much appreciated.
Farid,
interrupt-parent and interrupt values depend on which pins you use for the interrupt. If you want to use PD14 as the interrupt pin, the interrupt-parent value is “gpiod” and interrupts value is “14 IRQ_TYPE_LEVEL_HIGH”.
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields