RED HAT
RED HAT
DIIDevHeads IoT Integration Server
Created by UC GEE on 7/2/2024 in #middleware-and-os
Trying to interface the BMI088 IMU with an i2c multiplexer
@UC GEE you need to define the channels in your device tree by specifying each device under the appropriate mux channel. Here’s an example:
i2c1: i2c@40005400 {
mux {
compatible = "i2c-mux";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x70>; // I2C multiplexer address

channel0: chan0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

bmi088_acc: accelerometer@18 {
compatible = "bosch,bmi088-acc";
reg = <0x18>; // BMI088 accelerometer address
};
};

channel1: chan1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;

bmi088_gyro: gyroscope@68 {
compatible = "bosch,bmi088-gyro";
reg = <0x68>; // BMI088 gyroscope address
};
};
};
};
i2c1: i2c@40005400 {
mux {
compatible = "i2c-mux";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x70>; // I2C multiplexer address

channel0: chan0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

bmi088_acc: accelerometer@18 {
compatible = "bosch,bmi088-acc";
reg = <0x18>; // BMI088 accelerometer address
};
};

channel1: chan1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;

bmi088_gyro: gyroscope@68 {
compatible = "bosch,bmi088-gyro";
reg = <0x68>; // BMI088 gyroscope address
};
};
};
};
Ensure your mux node in the device tree matches your hardware setup. The addresses 0x18 and 0x68 are examples; you’ll need to use the correct addresses for your BMI088.
9 replies