Skip to content

Commit 41e6a32

Browse files
committed
boards: adafruit: esp32s2_feather: update documentation
add board support for adafruit_esp32s2_feather board series Signed-off-by: Philipp Steiner <[email protected]>
1 parent 27ddfce commit 41e6a32

File tree

3 files changed

+102
-32
lines changed

3 files changed

+102
-32
lines changed

boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2.rst

+55-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hardware
1616
- 320KB SRAM, 4MB flash + 2MB PSRAM
1717
- USB-C directly connected to the ESP32-S2 for USB
1818
- LiPo connector and built-in battery charging when powered via USB-C
19-
- LC709203 or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
19+
- LC709203F or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
2020
- Built-in NeoPixel indicator RGB LED
2121
- STEMMA QT connector for I2C devices, with switchable power for low-power mode
2222

@@ -28,12 +28,10 @@ Hardware
2828
overlay. All boards, except the `Adafruit ESP32-S2 Feather with BME280 Sensor`_ have a
2929
space for it, but will not be shipped with.
3030
- As of May 31, 2023 - Adafruit has changed the battery monitor chip from the
31-
now-discontinued LC709203 to the MAX17048. Check the back silkscreen of your Feather to
31+
now-discontinued LC709203F to the MAX17048. Check the back silkscreen of your Feather to
3232
see which chip you have.
33-
- For the MAX17048 a driver in zephyr exists and is supported, but needs to be added via
34-
a devicetree overlay.
35-
- For the LC709203 a driver does'nt exists yet and the fuel gauge for boards with this IC
36-
is not available.
33+
- For the MAX17048 and LC709203F a driver in zephyr exists and is supported, but needs to be
34+
added via a devicetree overlay.
3735
- For the `Adafruit ESP32-S2 Feather`_ there are two different Revisions ``rev B`` and
3836
``rev C``. The ``rev C`` board has revised the power circuitry for the NeoPixel and I2C
3937
QT port. Instead of a transistor the ``rev C`` has a LDO regulator. To enable the
@@ -304,19 +302,64 @@ functioning correctly with Zephyr:
304302
:board: adafruit_feather_esp32s2@C
305303
:goals: build flash
306304

307-
Testing the Fuel Gauge (MAX17048)
308-
*********************************
305+
Testing the Fuel Gauge
306+
**********************
309307

310-
There is a sample available to verify that the MAX17048 fuel gauge on the board are
311-
functioning correctly with Zephyr:
308+
There is a sample available to verify that the MAX17048 or LC709203F fuel gauge on the board are
309+
functioning correctly with Zephyr
312310

313311
.. note::
314-
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203
312+
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203F
315313
to the MAX17048.
316314

315+
**Rev B**
316+
317+
For the Rev B a devicetree overlay for the LC709203F fuel gauge already exists in the
318+
``samples/fuel_gauge/boards`` folder.
319+
320+
.. zephyr-app-commands::
321+
:zephyr-app: samples/fuel_gauge
322+
:board: adafruit_feather_esp32s2@B
323+
:goals: build flash
324+
325+
**Rev C**
326+
327+
For the Rev C a devicetree overlay for the MAX17048 fuel gauge already exists in the
328+
``samples/fuel_gauge/boards`` folder.
329+
330+
.. zephyr-app-commands::
331+
:zephyr-app: samples/fuel_gauge
332+
:board: adafruit_feather_esp32s2@C
333+
:goals: build flash
334+
335+
For the LC709203F a devicetree overlay needs to be added to the build.
336+
The overlay can be added via the ``--extra-dtc-overlay`` argument and should most likely includes
337+
the following:
338+
339+
.. code-block:: devicetree
340+
341+
/ {
342+
aliases {
343+
fuel-gauge0 = &lc709203f;
344+
};
345+
};
346+
347+
&i2c0 {
348+
lc709203f: lc709203f@0b {
349+
compatible = "onnn,lc709203f";
350+
status = "okay";
351+
reg = <0x0b>;
352+
power-domains = <&i2c_reg>;
353+
apa = "500mAh";
354+
battery-profile = <0x01>;
355+
};
356+
};
357+
358+
317359
.. zephyr-app-commands::
318-
:zephyr-app: samples/fuel_gauge/max17048/
360+
:zephyr-app: samples/fuel_gauge
319361
:board: adafruit_feather_esp32s2@C
362+
:west-args: --extra-dtc-overlay="boards/name_of_your.overlay"
320363
:goals: build flash
321364

322365
Testing Wi-Fi

boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2_tft.rst

+43-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hardware
1616
- 320KB SRAM, 4MB flash + 2MB PSRAM
1717
- USB-C directly connected to the ESP32-S2 for USB
1818
- LiPo connector and built-in battery charging when powered via USB-C
19-
- LC709203 or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
19+
- LC709203F or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
2020
- Charging indicator LED, user LED, reset and boot buttons.
2121
- Built-in NeoPixel indicator RGB LED
2222
- STEMMA QT connector for I2C devices, with switchable power for low-power mode
@@ -26,12 +26,10 @@ Hardware
2626

2727
- The board has a space for a BME280, but will not be shipped with.
2828
- As of May 31, 2023 - Adafruit has changed the battery monitor chip from the
29-
now-discontinued LC709203 to the MAX17048. Check the back silkscreen of your Feather to
29+
now-discontinued LC709203F to the MAX17048. Check the back silkscreen of your Feather to
3030
see which chip you have.
31-
- For the MAX17048 a driver in zephyr exists and is supported, but needs to be added via
32-
a devicetree overlay.
33-
- For the LC709203 a driver does'nt exists yet and the fuel gauge for boards with this IC
34-
is not available.
31+
- For the MAX17048 and LC709203F a driver in zephyr exists and is supported, but needs to be
32+
added via a devicetree overlay.
3533

3634
Supported Features
3735
==================
@@ -252,19 +250,52 @@ Testing the TFT
252250
:board: adafruit_feather_esp32s2_tft
253251
:goals: build flash
254252

255-
Testing the Fuel Gauge (MAX17048)
256-
*********************************
253+
Testing the Fuel Gauge
254+
**********************
257255

258-
There is a sample available to verify that the MAX17048 fuel gauge on the board are
259-
functioning correctly with Zephyr:
256+
There is a sample available to verify that the MAX17048 or LC709203F fuel gauge on the board are
257+
functioning correctly with Zephyr.
260258

261259
.. note::
262-
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203
260+
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203F
263261
to the MAX17048.
264262

263+
**LC709203F Fuel Gauge**
264+
265+
For the LC709203F a devicetree overlay already exists in the ``samples/fuel_gauge/boards`` folder.
266+
267+
.. zephyr-app-commands::
268+
:zephyr-app: samples/fuel_gauge
269+
:board: adafruit_feather_esp32s2_tft
270+
:goals: build flash
271+
272+
**MAX17048 Fuel Gauge**
273+
274+
For the MAX17048 a devicetree overlay needs to be added to the build.
275+
The overlay can be added via the ``--extra-dtc-overlay`` argument and should most likely includes
276+
the following:
277+
278+
.. code-block:: devicetree
279+
280+
/ {
281+
aliases {
282+
fuel-gauge0 = &max17048;
283+
};
284+
};
285+
286+
&i2c0 {
287+
max17048: max17048@36 {
288+
compatible = "maxim,max17048";
289+
status = "okay";
290+
reg = <0x36 >;
291+
power-domains = <&i2c_reg>;
292+
};
293+
};
294+
265295
.. zephyr-app-commands::
266-
:zephyr-app: samples/fuel_gauge/max17048/
296+
:zephyr-app: samples/fuel_gauge
267297
:board: adafruit_feather_esp32s2_tft
298+
:west-args: --extra-dtc-overlay="boards/name_of_your.overlay"
268299
:goals: build flash
269300

270301
Testing Wi-Fi

boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2_tft_reverse.rst

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hardware
1616
- 320KB SRAM, 4MB flash + 2MB PSRAM
1717
- USB-C directly connected to the ESP32-S2 for USB
1818
- LiPo connector and built-in battery charging when powered via USB-C
19-
- LC709203 or MAX17048 fuel gauge for battery voltage and state-of-charge reporting
19+
- MAX17048 fuel gauge for battery voltage and state-of-charge reporting
2020
- Charging indicator LED, user LED, reset and boot buttons and has 2 additional buttons.
2121
- Built-in NeoPixel indicator RGB LED
2222
- 240x135 pixel IPS TFT color display with 1.14" diagonal and ST7789 chipset.
@@ -249,18 +249,14 @@ functioning correctly with Zephyr:
249249
:board: adafruit_feather_esp32s2_tft_reverse
250250
:goals: build flash
251251

252-
Testing the Fuel Gauge (MAX17048)
253-
*********************************
252+
Testing the Fuel Gauge
253+
**********************
254254

255255
There is a sample available to verify that the MAX17048 fuel gauge on the board are
256256
functioning correctly with Zephyr:
257257

258-
.. note::
259-
As of May 31, 2023 Adafruit changed the battery monitor chip from the now-discontinued LC709203
260-
to the MAX17048.
261-
262258
.. zephyr-app-commands::
263-
:zephyr-app: samples/fuel_gauge/max17048/
259+
:zephyr-app: samples/fuel_gauge
264260
:board: adafruit_feather_esp32s2_tft_reverse
265261
:goals: build flash
266262

0 commit comments

Comments
 (0)