Skip to content

Commit b95feb6

Browse files
committed
Add INA238 to i2c-sensors device tree overlay
1 parent fed8a09 commit b95feb6

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,27 @@
526526
};
527527
};
528528

529+
fragment@35 {
530+
target = <&i2cbus>;
531+
__dormant__ {
532+
#address-cells = <1>;
533+
#size-cells = <0>;
534+
status = "okay";
535+
536+
ina238: ina238@48 {
537+
compatible = "ti,ina238";
538+
#address-cells = <1>;
539+
#size-cells = <0>;
540+
reg = <0x40>;
541+
/* uOhms, uint32_t */
542+
shunt-resistor = <1000>;
543+
/* 1 or 4, (±40.96 mV or ±163.84 mV) */
544+
ti,shunt-gain = <1>;
545+
status = "okay";
546+
};
547+
};
548+
};
549+
529550
fragment@99 {
530551
target = <&gpio>;
531552
__dormant__ {
@@ -573,6 +594,7 @@
573594
bno055 = <0>,"+31";
574595
sht4x = <0>,"+32";
575596
adt7410 = <0>,"+34";
597+
ina238 = <0>,"+35";
576598

577599
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
578600
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
@@ -582,13 +604,15 @@
582604
<&ms5837>,"reg:0", <&ms8607>,"reg:0",
583605
<&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
584606
<&bno055>,"reg:0", <&sht4x>,"reg:0",
585-
<&bmp380>,"reg:0", <&adt7410>,"reg:0";
607+
<&bmp380>,"reg:0", <&adt7410>,"reg:0", <&ina238>,"reg:0";
586608
int_pin = <&int_pins>, "brcm,pins:0",
587609
<&int_pins>, "reg:0",
588610
<&max30102>, "interrupts:0",
589611
<&mpu6050>, "interrupts:0",
590612
<&mpu9250>, "interrupts:0";
591613
no_timeout = <&jc42>, "smbus-timeout-disable?";
592614
reset_pin = <&bno055>,"reset-gpios:4", <0>,"+30";
615+
shunt_resistor = <&ina238>,"shunt-resistor:0";
616+
gain = <&ina238>,"ti,shunt-gain:0";
593617
};
594618
};

0 commit comments

Comments
 (0)