From 4e18782f00cbcf963be08abe053756de37102d9a Mon Sep 17 00:00:00 2001 From: Mohammed Rayan Date: Mon, 30 Nov 2026 00:25:18 +0530 Subject: [PATCH] overlays: Add ISM330DHCX support to i2c-sensor Add an ism330dhcx parameter to the i2c-sensor overlay so boards using the STMicroelectronics ISM330DHCX accelerometer and gyroscope can use the existing st_lsm6dsx I2C driver. Default to I2C address 0x6b and support the alternative address 0x6a through the existing addr parameter. Signed-off-by: Mohammed Rayan --- arch/arm/boot/dts/overlays/README | 11 +++++++---- .../boot/dts/overlays/i2c-sensor-common.dtsi | 19 ++++++++++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index eba94a49c2e049..b008c89568d394 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -2606,10 +2606,10 @@ Load: dtoverlay=i2c-sensor,= Params: addr Set the address for the AD799X, ADS7828, ADS7830, ADT7410, AS73211, AS7331, BH1750, BME280, BME680, BMP280, BMP380, BMP58x, CCS811, - DS1621, HDC100X, HDC3020, JC42, LM75, MCP980x, - MPU6050, MPU9250, MS5637, MS5803, MS5805, - MS5837, MS8607, SHT3x, STS3X, TMP102 or - VEML6030. + DS1621, HDC100X, HDC3020, ISM330DHCX, JC42, + LM75, MCP980x, MPU6050, MPU9250, MS5637, + MS5803, MS5805, MS5837, MS8607, SHT3x, STS3X, + TMP102 or VEML6030. i2c-bus Supports all the standard I2C bus selection parameters - see "dtoverlay -h i2c-bus" @@ -2722,6 +2722,9 @@ Params: addr Set the address for the AD799X, ADS7828, as7331, hdc3020, hts221, max30102, mpu6050, mpu9250, veml6030, veml6035 only) + ism330dhcx Select the STMicroelectronics ISM330DHCX IMU + Valid addresses 0x6a-0x6b, default 0x6b + jc42 Select any of the many JEDEC JC42.4-compliant temperature sensors, including: ADT7408, AT30TS00, CAT34TS02, CAT6095, diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi index 7aea55f042f8b8..b018d0aaac6d9e 100755 --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi @@ -908,6 +908,21 @@ }; }; + fragment@60 { + target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ism330dhcx: imu@6b { + compatible = "st,ism330dhcx"; + reg = <0x6b>; + status = "okay"; + }; + }; + }; + fragment@98 { target-path = "/"; __dormant__ { @@ -999,6 +1014,7 @@ ad7999 = <0>,"+56", <&ad799x>,"compatible=adi,ad7999", <&ad799x>,"reg:0=0x29"; sts3x = <0>,"+57"; sht85 = <0>,"+58"; + ism330dhcx = <0>,"+60"; addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0", @@ -1014,7 +1030,8 @@ <&ads7828>,"reg:0", <&ads7830>,"reg:0", <&adxl355>,"reg:0", <&bmp58x>,"reg:0", <&veml6030>,"reg:0", <&tmp117>,"reg:0", - <&ad799x>,"reg:0", <&sts3x>,"reg:0"; + <&ad799x>,"reg:0", <&sts3x>,"reg:0", + <&ism330dhcx>,"reg:0"; int_pin = <&int_pins>, "brcm,pins:0", <&int_pins>, "reg:0", <&max30102>, "interrupts:0",