Skip to content

Commit

Permalink
boards: update ina230 instances
Browse files Browse the repository at this point in the history
The configuration definition for the ina230 has been changed in
f0f7f8b and now the old config option is marked as deprecated, which
is failing two boards in CI, nrf5340_audio_dk_nrf5340 and
stm32g071b_disco.

Update the ina230 config format to the new one for both boards.

Signed-off-by: Fabio Baltieri <[email protected]>
  • Loading branch information
fabiobaltieri authored and nashif committed Aug 29, 2023
1 parent dff933c commit f0d0b54
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,43 +151,43 @@
vbat_sensor: ina231@44 {
compatible = "ti,ina230";
reg = <0x44>;
config = <INA230_CONFIG(INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT,
INA230_CONV_TIME_4156,
INA230_CONV_TIME_4156,
INA230_AVG_MODE_1024)>;
adc-mode = "Bus and shunt voltage continuous";
vbus-conversion-time-us = <4156>;
vshunt-conversion-time-us = <4156>;
avg-count = <1024>;
current-lsb-microamps = <1>;
rshunt-micro-ohms = <510000>;
};

vdd1_codec_sensor: ina231@45 {
compatible = "ti,ina230";
reg = <0x45>;
config = <INA230_CONFIG(INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT,
INA230_CONV_TIME_4156,
INA230_CONV_TIME_4156,
INA230_AVG_MODE_1024)>;
adc-mode = "Bus and shunt voltage continuous";
vbus-conversion-time-us = <4156>;
vshunt-conversion-time-us = <4156>;
avg-count = <1024>;
current-lsb-microamps = <1>;
rshunt-micro-ohms = <2200000>;
};

vdd2_codec_sensor: ina231@41 {
compatible = "ti,ina230";
reg = <0x41>;
config = <INA230_CONFIG(INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT,
INA230_CONV_TIME_4156,
INA230_CONV_TIME_4156,
INA230_AVG_MODE_1024)>;
adc-mode = "Bus and shunt voltage continuous";
vbus-conversion-time-us = <4156>;
vshunt-conversion-time-us = <4156>;
avg-count = <1024>;
current-lsb-microamps = <1>;
rshunt-micro-ohms = <2200000>;
};

vdd2_nrf_sensor: ina231@40 {
compatible = "ti,ina230";
reg = <0x40>;
config = <INA230_CONFIG(INA230_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT,
INA230_CONV_TIME_4156,
INA230_CONV_TIME_4156,
INA230_AVG_MODE_1024)>;
adc-mode = "Bus and shunt voltage continuous";
vbus-conversion-time-us = <4156>;
vshunt-conversion-time-us = <4156>;
avg-count = <1024>;
current-lsb-microamps = <1>;
rshunt-micro-ohms = <1000000>;
};
Expand Down
9 changes: 4 additions & 5 deletions boards/arm/stm32g071b_disco/stm32g071b_disco.dts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,10 @@
status = "okay";
compatible = "ti,ina230";
reg = <0x40>;
config = <INA230_CONFIG(
INA230_OPER_MODE_BUS_VOLTAGE_CONT,
INA230_CONV_TIME_1100,
INA230_CONV_TIME_1100,
INA230_AVG_MODE_1)>;
adc-mode = "Bus voltage continuous";
vbus-conversion-time-us = <1100>;
vshunt-conversion-time-us = <1100>;
avg-count = <1>;
current-lsb-microamps = <1000>;
rshunt-micro-ohms = <15000>;
};
Expand Down

0 comments on commit f0d0b54

Please sign in to comment.