Skip to contentSkip to conversation

iio: add support for Bosch BMX055 IMU

PATCH Superseded Jun Yan 2 participants 8 messages Feb 2 – Feb 3

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jun Yan

author
#0 lore raw

v2 cover iio: add support for Bosch BMX055 IMU

The BMX055[1] is a Bosch 9-axis IMU integrating a 3-axis accelerometer, gyroscope and geomagnetic sensor.

It supports SPI/I²C interfaces, and existing compatible drivers can be reused by simply adding the corresponding device IDs as follows:

- accelerometer: bmc150-accel
- gyroscope: bmg160
- magnetometer: bmc150_magn

Changes in v2:
- Use fallback compatibles instead of introducing a new device ID in the driver.

Link to v1: https://lore.kernel.org/linux-iio/[email protected]/T/#u

[1] https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Jun Yan (3):
dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding
dt-bindings: iio: magnetometer: bosch,bmc150_magn: add bmx055
magnetometer binding
dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope
binding

 .../bindings/iio/accel/bosch,bma255.yaml      | 43 +++++++++++--------
 .../bindings/iio/gyroscope/bosch,bmg160.yaml  | 12 ++++--
 .../iio/magnetometer/bosch,bmc150_magn.yaml   | 14 +++---
 3 files changed, 41 insertions(+), 28 deletions(-)
Signature · 1 line
2.52.0
author
#1 lore raw

PATCH v2 1/3 dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding

Add the device-tree binding for the Bosch BMX055 IMU (accelerometer part), which is compatible with bmc150_accel.

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 .../bindings/iio/accel/bosch,bma255.yaml      | 43 +++++++++++--------
 1 file changed, 24 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +24 -19
index c1387e02eb82..5c44b8cf156a 100644
@@ -16,25 +16,30 @@ description:
 
 properties:
   compatible:
-    enum:
-      # bmc150-accel driver in Linux
-      - bosch,bma222
-      - bosch,bma222e
-      - bosch,bma250e
-      - bosch,bma253
-      - bosch,bma254
-      - bosch,bma255
-      - bosch,bma280
-      - bosch,bmc150_accel
-      - bosch,bmc156_accel
-      - bosch,bmi055_accel
-
-      # bma180 driver in Linux
-      - bosch,bma023
-      - bosch,bma150
-      - bosch,bma180
-      - bosch,bma250
-      - bosch,smb380
+    oneOf:
+      - enum:
+          # bmc150-accel driver in Linux
+          - bosch,bma222
+          - bosch,bma222e
+          - bosch,bma250e
+          - bosch,bma253
+          - bosch,bma254
+          - bosch,bma255
+          - bosch,bma280
+          - bosch,bmc150_accel
+          - bosch,bmc156_accel
+          - bosch,bmi055_accel
+          - bosch,bmx055_accel
+
+          # bma180 driver in Linux
+          - bosch,bma023
+          - bosch,bma150
+          - bosch,bma180
+          - bosch,bma250
+          - bosch,smb380
+      - items:
+          - const: bosch,bmx055
+          - const: bosch,bmc150_accel
 
   reg:
     maxItems: 1
Signature · 1 line
2.52.0
#2 lore raw

Re: [PATCH v2 1/3] dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding

Hi Jun,

thanks for your patch!

Quoted 7 lines · Jun Yan

Add the device-tree binding for the Bosch BMX055 IMU (accelerometer part), which is compatible with bmc150_accel.

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 .../bindings/iio/accel/bosch,bma255.yaml      | 43 +++++++++++--------

DT bindings must be posted to [email protected], please resend.

Quoted 43 lines
 1 file changed, 24 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +14 -19
index c1387e02eb82..5c44b8cf156a 100644
@@ -16,25 +16,30 @@ description:
 
 properties:
   compatible:
-    enum:
-      # bmc150-accel driver in Linux
-      - bosch,bma222
-      - bosch,bma222e
-      - bosch,bma250e
-      - bosch,bma253
-      - bosch,bma254
-      - bosch,bma255
-      - bosch,bma280
-      - bosch,bmc150_accel
-      - bosch,bmc156_accel
-      - bosch,bmi055_accel
-
-      # bma180 driver in Linux
-      - bosch,bma023
-      - bosch,bma150
-      - bosch,bma180
-      - bosch,bma250
-      - bosch,smb380
+    oneOf:
+      - enum:
+          # bmc150-accel driver in Linux
+          - bosch,bma222
+          - bosch,bma222e
+          - bosch,bma250e
+          - bosch,bma253
+          - bosch,bma254
+          - bosch,bma255
+          - bosch,bma280
+          - bosch,bmc150_accel
+          - bosch,bmc156_accel
+          - bosch,bmi055_accel
+          - bosch,bmx055_accel

Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml description: · line 42

Quoted 10 lines
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +10 -0
+
+          # bma180 driver in Linux
+          - bosch,bma023
+          - bosch,bma150
+          - bosch,bma180
+          - bosch,bma250
+          - bosch,smb380
+      - items:
+          - const: bosch,bmx055
+          - const: bosch,bmc150_accel

Maybe drop the Linux-related comments because DT people seem not to like this. But it's not your fault because these comments were there before.

Yours,
Linus Walleij

author
#3 lore raw

PATCH v2 2/3 dt-bindings: iio: magnetometer: bosch,bmc150_magn: add bmx055 magnetometer binding

In reply to Jun Yan

Add the device-tree binding for the bosch BMX055 IMU (magnetometer part), which is compatible with bmc150_magn.

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 .../iio/magnetometer/bosch,bmc150_magn.yaml        | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/iio/magnetometer/bosch,bmc150_magn.yaml +9 -5
index a3838ab0c524..09d1dc861d4f 100644
@@ -21,11 +21,15 @@ properties:
     description:
       Note the bmm150_magn is a deprecated compatible as this part contains only
       a magnetometer.
-    enum:
-      - bosch,bmc150_magn
-      - bosch,bmc156_magn
-      - bosch,bmm150
-      - bosch,bmm150_magn
+    oneOf:
+      - enum:
+          - bosch,bmc150_magn
+          - bosch,bmc156_magn
+          - bosch,bmm150
+          - bosch,bmm150_magn
+      - items:
+          - const: bosch,bmx055_magn
+          - const: bosch,bmc150_magn
 
   reg:
     maxItems: 1
Signature · 1 line
2.52.0
#4 lore raw

Re: [PATCH v2 2/3] dt-bindings: iio: magnetometer: bosch,bmc150_magn: add bmx055 magnetometer binding

Quoted 5 lines · Jun Yan

Add the device-tree binding for the bosch BMX055 IMU (magnetometer part), which is compatible with bmc150_magn.

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

Also needs posting to [email protected] so resend the patch.

Other than that it looks fine!

Yours,
Linus Walleij

author
#5 lore raw

PATCH v2 3/3 dt-bindings: iio: gyroscope: bosch,bmg160: add bmx055 gyroscope binding

In reply to Jun Yan

Add the device-tree binding for the bosch BMX055 IMU (gyroscope part), which is compatible with bmg160.

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_datasheet.pdf

---
 .../bindings/iio/gyroscope/bosch,bmg160.yaml         | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml +8 -4
index 3c6fe74af0b8..e19aa1797f14 100644
@@ -11,10 +11,14 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - bosch,bmg160
-      - bosch,bmi055_gyro
-      - bosch,bmi088_gyro
+    oneOf:
+      - enum:
+          - bosch,bmg160
+          - bosch,bmi055_gyro
+          - bosch,bmi088_gyro
+      - items:
+          - const: bosch,bmx055_gyro
+          - const: bosch,bmg160
 
   reg:
     maxItems: 1
Signature · 1 line
2.52.0
author
#7 lore raw

Re: [PATCH v2 1/3] dt-bindings: iio: accel: bosch,bma255: add bmx055 accel binding

Quoted 11 lines

Hi Jun,

thanks for your patch!

Quoted 1 line · On Mon, Feb 2, 2026 at 12:03=E2=80=AFPM Jun Yan <[email protected]> =…

Add the device-tree binding for the Bosch BMX055 IMU (accelerometer part)=

,

Quoted 2 lines

which is compatible with bmc150_accel.

Quoted 7 lines
Quoted 1 line

Datasheet: https://cdn.sparkfun.com/assets/b/9/1/f/4/bst-bmx055-ds000_dat=

asheet.pdf

Quoted 3 lines
---
 .../bindings/iio/accel/bosch,bma255.yaml      | 43 +++++++++++--------

DT bindings must be posted to [email protected], please resend.

Acknowledged.

Quoted 51 lines

Review

Quoted 4 lines
 1 file changed, 24 insertions(+), 19 deletions(-)
(quoted diff) +0 -0

l b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml

Quoted 46 lines

index c1387e02eb82..5c44b8cf156a 100644

Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +20 -19
@@ -16,25 +16,30 @@ description:
 
 properties:
   compatible:
-    enum:
-      # bmc150-accel driver in Linux
-      - bosch,bma222
-      - bosch,bma222e
-      - bosch,bma250e
-      - bosch,bma253
-      - bosch,bma254
-      - bosch,bma255
-      - bosch,bma280
-      - bosch,bmc150_accel
-      - bosch,bmc156_accel
-      - bosch,bmi055_accel
-
-      # bma180 driver in Linux
-      - bosch,bma023
-      - bosch,bma150
-      - bosch,bma180
-      - bosch,bma250
-      - bosch,smb380
+    oneOf:
+      - enum:
+          # bmc150-accel driver in Linux
+          - bosch,bma222
+          - bosch,bma222e
+          - bosch,bma250e
+          - bosch,bma253
+          - bosch,bma254
+          - bosch,bma255
+          - bosch,bma280
+          - bosch,bmc150_accel
+          - bosch,bmc156_accel
+          - bosch,bmi055_accel
+          - bosch,bmx055_accel
+
+          # bma180 driver in Linux
+          - bosch,bma023
+          - bosch,bma150
+          - bosch,bma180
+          - bosch,bma250
Quoted 8 lines

Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml description: · line 42

Quoted 4 lines
Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +4 -0
+          - bosch,smb380
+      - items:
+          - const: bosch,bmx055
+          - const: bosch,bmc150_accel

Maybe drop the Linux-related comments because DT people seem not to like this. But it's not your fault because these comments were there before.

Thanks for the suggestion! I will remove the Linux-related comments as you recommended.

I will send the V3 patch shortly.

Quoted 2 lines

Yours,
Linus Walleij