Skip to content

Commit

Permalink
boards: thingy53: define composite fuel gauge
Browse files Browse the repository at this point in the history
Add a composite fuel-gauge device to the Thingy53 to enable converting
the raw voltage to a battery percentage.

(cherry picked from commit 6ad8ca9)

Original-Signed-off-by: Jordan Yates <jordan@embeint.com>
GitOrigin-RevId: 6ad8ca9
Cr-Build-Id: 8738238973287044049
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8738238973287044049
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I9ddc26346d85edd431f7f9fc8b8ff924e254e233
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5827658
Tested-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
  • Loading branch information
JordanYates authored and Chromeos LUCI committed Aug 30, 2024
1 parent d48d0a5 commit 6a27c9d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions boards/nordic/thingy53/thingy53_nrf5340_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
#include "thingy53_nrf5340_common-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/battery/battery.h>

/ {
chosen {
Expand Down Expand Up @@ -97,6 +98,14 @@
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 {
compatible = "regulator-fixed";
regulator-name = "ncp114";
Expand Down

0 comments on commit 6a27c9d

Please sign in to comment.