summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.battery
Commit message (Collapse)AuthorAgeFilesLines
* zephyr: add missing charger KconfigMichał Barnaś2021-09-081-10/+14
| | | | | | | | | | | | | | | Add CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON to Kconfig BRANCH=main BUG=b:183544739 TEST=Define added configs to prj.conf file and verify that compilation takes them into account. Change-Id: I7672315a6938102878b5b3b87a9dcf96b0a71d46 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141561 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: add missing battery KconfigsMichał Barnaś2021-09-081-0/+32
| | | | | | | | | | | | | | | | | | | | | | Add missing Kconfigs for: - PLATFORM_EC_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF - PLATFORM_EC_BATTERY_CHECK_CHARGE_TEMP_LIMITS - PLATFORM_EC_BATTERY_MEASURE_IMBALANCE - PLATFORM_EC_BATTERY_MAX_IMBALANCE_MV Change help text in battery yamls to use Kconfigs instead of legacy CONFIGs BRANCH=main BUG=b:183544739 TEST=Define added configs to prj.conf file and verify that compilation takes them into account. Change-Id: I01716c1515350550c18bbfd4944638034a25c7b5 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3141598 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Add support for ISL9238 Rev CSimon Glass2021-06-151-0/+15
| | | | | | | | | | | | | | | This chip version cannot be detected at runtime. Add support for the Kconfig option to signal that this revision is on the board, needed for Asurada. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I3a86b94e4b4936dc6f6f071d6facd364555865a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941885 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Add support for MAINTAIN_VBATSimon Glass2021-06-111-0/+7
| | | | | | | | | | | | | | | Add a Kconfig for this feature so that it can be used on Zephyr. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I699fe81b3f4ad8c03b90a0c8371a927df5bc3e78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941819 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: Add support for OTG powerSimon Glass2021-06-111-2/+22
| | | | | | | | | | | | | | | | | Add Kconfigs for this feature so it can be enabled on Zephyr. The driver determines the availability of this feature but it must be specifically enabled by the board. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iaeae49039b8a76c2dd42804127644920480697a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941818 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: add I2C_VIRTUAL_BATTERY configDawid Niedzwiecki2021-05-271-0/+9
| | | | | | | | | | | | | | Add I2C_VIRTUAL_BATTERY config to use virtual battery driver. BUG=b:188885798 BRANCH=none TEST=zmake testall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I6d1a4bfd8c950aa569ee836d9d22e438eeaef67b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919906 Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* bq25720: Add VSYS_TH2 tuning supportCaveh Jalali2021-04-061-0/+22
| | | | | | | | | | | | | | | | | | This adds support for tuning the bq25720 VSYS_TH2 threshold so that a custom threshold voltage can be specified. The default 3.2v for 1S batteries and 5.9v for 2S (or more) batteries may need to be adjusted to improve system stability. When VSYS droops to this threshold, PROCHOT is asserted to reduce system power demand. BRANCH=none BUG=b:183474163 TEST=with rest of patch stack, booted brya to the OS without a battery Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I7f52a369371eb93860b14ad8438b790af231c450 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2798979 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Support the amonbmon commandSimon Glass2021-04-031-0/+8
| | | | | | | | | | | | | | | | Add support for this debugging command in Zephyr. BUG=b:183296099 BRANCH=none TEST=build for lazor and check the various options in in /tmp/z/trog/build-ro/zephyr/.config Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I0849eaf2652e74751ffe938fa6696362bfa34d75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789802 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Add support for PSYSSimon Glass2021-04-021-0/+21
| | | | | | | | | | | | | | | | Add support for reading the system-power value and enabling the 'psys' command. This feature is provided by some chargers, using the ADC on the EC. BUG=b:183296099 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I3acbb53f47e00a07b1de4d96bac05e65f13ce628 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788840 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Add support for overriding the charger profileSimon Glass2021-04-011-0/+13
| | | | | | | | | | | | | | | | | | | Add support for CONFIG_CHARGER_PROFILE_OVERRIDE so that this feature can be enabled for lazor. BUG=b:183296099 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I7f3f6e6448209614489ac0b3f607404c43dd9a43 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788835 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Add support for setting charger sense-resistorsSimon Glass2021-04-011-0/+14
| | | | | | | | | | | | | | | | | We need a different value for lazor, so move this to Kconfig. We may at some point move this to device tree. BUG=b:183296099, b:175881762 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present build config for volteer and make sure it has not changed Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I7b5fa6a03ba24028006f6a1a8516e9244308fe76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788833 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Add support for discharge testingSimon Glass2021-04-011-0/+41
| | | | | | | | | | | | | | | | | | | | | | | Add support for CHARGER_DISCHARGE_ON_AC and a choice for which method to use to implement it. This does not seem to be all that common, so leave it to default to off. Drop the existing hard-coded setting. This option is often implemented by the charger but the board should still select whether to use it or not as there may be multiple chargers. Enable it for volteer to keep things the same there. BUG=b:183296099, b:175881762 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present check volteer still has the option enabled Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I8b893441d7e780ff74de7778c294a3e712ed1f62 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788831 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Add support for BATTERY_REVIVE_DISCONNECTSimon Glass2021-04-011-0/+7
| | | | | | | | | | | | | | | | | | Add support for this option in Kconfig. BUG=b:183296099 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I2e77d72059ffe86f3d24f0a2bad3b0e3438dc08c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788830 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Add support for battery chemistrySimon Glass2021-04-011-0/+17
| | | | | | | | | | | | | | | | This is used in test code. Add a Kconfig option to enable the feature and another to set the string. BUG=b:183296099 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Idec38f3feefc76eb64710df79a36966bd072d490 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788829 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* common/battery: Provide function to lower input voltagePatryk Duda2021-03-291-0/+10
| | | | | | | | | | | | | | This patch introduces generic version of function that sets voltage limit when chipset is off and battery is fully charged. BUG=b:182546058 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ib7606c8d1ab3fe1dc650a3abcef9ebc207335ab5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2773218 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zephyr: Add BQ25710 and BQ25720 kconfigCaveh Jalali2021-03-241-0/+22
| | | | | | | | | | | | | | | This adds the BQ25710 and BQ25720 charger chips to zephyr's kconfig structure. BRANCH=none BUG=b:173575131 TEST=buildall passes Change-Id: I0fdd08d4104991bf630221efd11c9da932e7db38 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762527 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Tidy up BATTERY_PRESENT_GPIOSimon Glass2021-03-231-4/+14
| | | | | | | | | | | | | | | | | | | | | | This is not a boolean CONFIG in ECOS but it must be with Zephyr. There doesn't seem to be any advantage to allowing an arbitrary name here, since the mapping is controlled in the device tree anyway. So hard-code it to GPIO_BATT_PRES_ODL and document this in the Kconfig. Also drop the unnecessary logic in config_chip.h since Kconfig handles ensuring that only one option is set. This makes the code easier to follow and avoids errors. Fix the error that is there. BUG=b:183296099 BRANCH=none TEST=make BOARD=lazor -j4 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I55a9083ad01be2f6b1e9314f73fbbff1442e486c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2777633 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Add support for hardware charge-rampingSimon Glass2021-03-231-1/+31
| | | | | | | | | | | | | | | | | | | | | | | Allow this option to be selected, turning it into a choice between the two options. Make hardware ramping the default since it seems to be preferred. It was apparently not supported on volteer only due to a bug in the charger chip. Also move the software-ramp requirement for ISL9241 to Kconfig. We cannot 'select' a choice item like PLATFORM_EC_CHARGE_RAMP_SW in PLATFORM_EC_CHARGER_ISL9241, so use a 'depends on' instead. Update volteer to use software ramping since the default has changed. BUG=b:183296099 BRANCH=none TEST=build zephyr for lazor build for volteer and check that CONFIG_PLATFORM_EC_CHARGE_RAMP_SW=y Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ic3ffd21cd10aa896a4c6dbe1d98d75776c89aefe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774917 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Add support for ISL9237/8 chargersSimon Glass2021-03-221-2/+39
| | | | | | | | | | | | | | | | Enable the isl923x driver in the zephyr build. Update the volteer charger since the default has changed. This needs a Narrow VDC setting so add that as well. BUG=b:183296099 BRANCH=none TEST=build zephyr (no changes) Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I1991b78263c2311c3d1f8c4f30f8d3bd823a39ac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774915 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: fix Kconfig name for console commandsKeith Short2021-03-121-1/+1
| | | | | | | | | | | | | | | Cleanup Kconfig options to match the convention of starting with CONFIG_PLATFORM_EC_CONSOLE_CMD_*. BUG=b:181794644 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ibed3d0371483b26c17f8f8c05c088694b6f3728d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2756981 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: Add missing battery configDawid Niedzwiecki2021-01-281-0/+25
| | | | | | | | | | | | | | | | | | | There are 3 battery configs missing for Zephyr: -CONFIG_PLATFORM_EC_BATTERY_CUT_OFF -CONFIG_PLATFORM_EC_BATTERY_HW_PRESENT_CUSTOM -CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT Add them to the Kconfig.battery. BUG=b:177604307 BRANCH=none TEST=Build Zephyr with the configs enabled Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I4e3c834470b9f4977b3f779b4246868feaea4bd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645092 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: Enable the chgramp taskSimon Glass2021-01-091-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This task is used to ramp up charging from an external source. Add support for this along with required Kconfig options. Add one more stub in system to make it build. This is covered by the existing bug. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 build volteer on zephyr So far the output is not interesting (need more drivers): uart:~$ chgramp Chg Ramp: State: 0 Min ICL: 0 Active ICL: 0 Port 0: OC idx:0 OC 0: s-1 oc_det0 icl0 OC 1: s0 oc_det0 icl0 OC 2: s0 oc_det0 icl0 Port 1: OC idx:0 OC 0: s-1 oc_det0 icl0 OC 1: s0 oc_det0 icl0 OC 2: s0 oc_det0 icl0 Signed-off-by: Simon Glass <sjg@chromium.org> Cq-Depend: chromium:2613607 Change-Id: I603ba43d4384b62ed0c1a64b580599b42ae85e81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617039 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Connect HAS_TASK_CHARGER and PLATFORM_EC_BATTERYSimon Glass2021-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | These options are linked in that we cannot have one without the other. Select the charger task automatically if PLATFORM_EC_BATTERY is enabled, since that feature cannot work without the task. If PLATFORM_EC_BATTERY is not enabled there is no need for the task. BUG=b:176449230 BRANCH=none TEST=ninja -C /tmp/z/vol/build-ro menuconfig Check the operation of HAS_TASK_CHARGER and PLATFORM_EC_BATTERY Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I14ada8716053649ac13ea12a7b06c2ae1702df42 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606576 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Convert the sub-Kconfig files into menusSimon Glass2020-12-301-2/+2
| | | | | | | | | | | | | | | | | | | Use a menu for each of these since it produces a tidier top-level view for the EC. Put the function as the first word to make it easier to follow. For battery and USB-C, use menuconfig so that it works the same way as power sequencing. BUG=b:176449230 BRANCH=none TEST=ninja -C /tmp/z/vol/build-ro menuconfig See that the menus appear Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I57e58f94aeaa0783ca69b0c948b7760c2e42adbf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606571 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Enable building of the battery fuel gaugeSimon Glass2020-12-241-0/+8
| | | | | | | | | | | | | | Bring in this file needed for monitoring a battery. BUG=b:175248556 BRANCH=none TEST=build and run zephyr on volteer No visible change, except more code is compiled in Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I49a3960c62153ad0ea5c5f8121d0aa0d35e7ffe4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600228 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Add support for battery presenceSimon Glass2020-12-231-0/+30
| | | | | | | | | | | | | | | Add the battery-presence settings so that a battery can be detected. BUG=b:175248556 BRANCH=none TEST=build and run zephyr on volteer No visible change, except more code is compiled in Cq-Depend: chromium:2599491 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I9a7086e6df67f7e9fe3aedb6a15f891e71b58d49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600337 Reviewed-by: Keith Short <keithshort@chromium.org>
* Reland "zephyr: Add battery and smart battery options"Keith Short2020-12-141-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of ac4f512e60af42efe693e6955c110a7908090e56 Original change's description: > zephyr: Add battery and smart battery options > > Shim in battery and smart battery support. > > BUG=b:175248556 > BRANCH=none > TEST=boot on volteer, run 'battery' command. > TEST=run 'ninja menuconfig' and check KConfig help text. > 20-12-10 20:08:12.778 battery > 20-12-10 20:08:13.509 Status: 0x02c0 DCHG INIT RC > 20-12-10 20:08:13.529 Param flags:00000003 > 20-12-10 20:08:13.541 Temp: 0x0b63 = %.1d K (%.1d C) > 20-12-10 20:08:13.541 V: 0x2a1e = 10782 mV > 20-12-10 20:08:13.541 V-desired: 0x3390 = 13200 mV > 20-12-10 20:08:13.541 I: 0x0000 = 0 mA > 20-12-10 20:08:13.550 I-desired: 0x0a19 = 2585 mA > 20-12-10 20:08:13.550 Charging: Allowed > 20-12-10 20:08:13.550 Charge: 0 % > 20-12-10 20:08:13.550 Manuf: LG > 20-12-10 20:08:13.555 Device: AC17A8 > 20-12-10 20:08:13.573 Chem: LIO > 20-12-10 20:08:13.573 Serial: 0xb754 > 20-12-10 20:08:13.573 V-design: 0x2d1e = 11550 mV > 20-12-10 20:08:13.573 Mode: 0x6001 > 20-12-10 20:08:13.573 Abs charge:0 % > 20-12-10 20:08:13.573 Remaining: 0 mAh > 20-12-10 20:08:13.577 Cap-full: 4932 mAh (4833 mAh with 98 % compensation) > 20-12-10 20:08:13.585 Design: 5360 mAh > 20-12-10 20:08:13.594 Time-full: 0h:0 > 20-12-10 20:08:13.594 Empty: 0h:0 > > Change-Id: Ie782e75ee4027ab2a5c6a0ae7f4ad81e9c360711 > Signed-off-by: Simon Glass <sjg@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575199 Bug: b:175248556 TEST=make buildall, which fails with: /opt/coreboot-sdk/lib/gcc/nds32le-elf/8.3.0/../../../../nds32le-elf/bin/ld: __flash_dma_size < IT83XX_ILM_BLOCK_SIZE BRANCH=none Change-Id: I318fb13ba91485cd7d876b2294f20d748f47e0fd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2585931 Tested-by: Simon Glass <sjg@chromium.org> Auto-Submit: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* Revert "zephyr: Add battery and smart battery options"Eric Yilun Lin2020-12-141-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ac4f512e60af42efe693e6955c110a7908090e56. Reason for revert: This CL stops chipset_task forever, revert this to boot AP. Original change's description: > zephyr: Add battery and smart battery options > > Shim in battery and smart battery support. > > BUG=b:175248556 > BRANCH=none > TEST=boot on volteer, run 'battery' command. > TEST=run 'ninja menuconfig' and check KConfig help text. > 20-12-10 20:08:12.778 battery > 20-12-10 20:08:13.509 Status: 0x02c0 DCHG INIT RC > 20-12-10 20:08:13.529 Param flags:00000003 > 20-12-10 20:08:13.541 Temp: 0x0b63 = %.1d K (%.1d C) > 20-12-10 20:08:13.541 V: 0x2a1e = 10782 mV > 20-12-10 20:08:13.541 V-desired: 0x3390 = 13200 mV > 20-12-10 20:08:13.541 I: 0x0000 = 0 mA > 20-12-10 20:08:13.550 I-desired: 0x0a19 = 2585 mA > 20-12-10 20:08:13.550 Charging: Allowed > 20-12-10 20:08:13.550 Charge: 0 % > 20-12-10 20:08:13.550 Manuf: LG > 20-12-10 20:08:13.555 Device: AC17A8 > 20-12-10 20:08:13.573 Chem: LIO > 20-12-10 20:08:13.573 Serial: 0xb754 > 20-12-10 20:08:13.573 V-design: 0x2d1e = 11550 mV > 20-12-10 20:08:13.573 Mode: 0x6001 > 20-12-10 20:08:13.573 Abs charge:0 % > 20-12-10 20:08:13.573 Remaining: 0 mAh > 20-12-10 20:08:13.577 Cap-full: 4932 mAh (4833 mAh with 98 % compensation) > 20-12-10 20:08:13.585 Design: 5360 mAh > 20-12-10 20:08:13.594 Time-full: 0h:0 > 20-12-10 20:08:13.594 Empty: 0h:0 > > Change-Id: Ie782e75ee4027ab2a5c6a0ae7f4ad81e9c360711 > Signed-off-by: Simon Glass <sjg@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575199 Bug: b:175248556 Change-Id: I66086d8fee46d5fd02d26938468a7d76dab71c6e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2589140 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@chromium.org> Tested-by: Eric Yilun Lin <yllin@chromium.org>
* zephyr: Add battery and smart battery optionsKeith Short2020-12-111-0/+52
Shim in battery and smart battery support. BUG=b:175248556 BRANCH=none TEST=boot on volteer, run 'battery' command. TEST=run 'ninja menuconfig' and check KConfig help text. 20-12-10 20:08:12.778 battery 20-12-10 20:08:13.509 Status: 0x02c0 DCHG INIT RC 20-12-10 20:08:13.529 Param flags:00000003 20-12-10 20:08:13.541 Temp: 0x0b63 = %.1d K (%.1d C) 20-12-10 20:08:13.541 V: 0x2a1e = 10782 mV 20-12-10 20:08:13.541 V-desired: 0x3390 = 13200 mV 20-12-10 20:08:13.541 I: 0x0000 = 0 mA 20-12-10 20:08:13.550 I-desired: 0x0a19 = 2585 mA 20-12-10 20:08:13.550 Charging: Allowed 20-12-10 20:08:13.550 Charge: 0 % 20-12-10 20:08:13.550 Manuf: LG 20-12-10 20:08:13.555 Device: AC17A8 20-12-10 20:08:13.573 Chem: LIO 20-12-10 20:08:13.573 Serial: 0xb754 20-12-10 20:08:13.573 V-design: 0x2d1e = 11550 mV 20-12-10 20:08:13.573 Mode: 0x6001 20-12-10 20:08:13.573 Abs charge:0 % 20-12-10 20:08:13.573 Remaining: 0 mAh 20-12-10 20:08:13.577 Cap-full: 4932 mAh (4833 mAh with 98 % compensation) 20-12-10 20:08:13.585 Design: 5360 mAh 20-12-10 20:08:13.594 Time-full: 0h:0 20-12-10 20:08:13.594 Empty: 0h:0 Change-Id: Ie782e75ee4027ab2a5c6a0ae7f4ad81e9c360711 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575199