boards: thingy53: define composite fuel gauge

Add a composite fuel-gauge device to the Thingy53 to enable converting
the raw voltage to a battery percentage.

Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
Jordan Yates 2024-08-25 11:37:28 +10:00 committed by Anas Nashif
commit 6ad8ca9c64

View file

@ -5,6 +5,7 @@
*/ */
#include "thingy53_nrf5340_common-pinctrl.dtsi" #include "thingy53_nrf5340_common-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h> #include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/battery/battery.h>
/ { / {
chosen { chosen {
@ -97,6 +98,14 @@
power-gpios = <&gpio0 16 0>; power-gpios = <&gpio0 16 0>;
}; };
fuel_gauge: fuel_gauge {
compatible = "zephyr,fuel-gauge-composite";
battery-voltage = <&vbatt>;
device-chemistry = "lithium-ion-polymer";
ocv-capacity-table-0 = <BATTERY_OCV_CURVE_LITHIUM_ION_POLYMER_DEFAULT>;
charge-full-design-microamp-hours = <1350000>;
};
regulator_3v3: regulator-3v3-ctrl { regulator_3v3: regulator-3v3-ctrl {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "ncp114"; regulator-name = "ncp114";