blob: 3bcb88d1115c2697ed5fea987c467e04cca0d1ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config PLATFORM_EC_BATTERY
bool "Support batteries"
help
Enables battery support on the board. Requires selection of a battery
and a charger IC.
If using I2C batteries, you must define I2C_PORT_BATTERY in your
board's i2c_map.h file so that the EC code will know which I2C
port the battery is on.
if PLATFORM_EC_BATTERY
choice "Battery select"
prompt "Select the battery to use"
help
Select the battery used on the board. If you are ensure, select the
smart battery option.
config PLATFORM_EC_BATTERY_SMART
bool "Support a smart battery"
depends on PLATFORM_EC_I2C
help
Many batteries support the Smart Battery Specification and therefore
have common registers which can be accessed to control and monitor
the battery.
See here for the spec: http://sbs-forum.org/specs/sbdat110.pdf
endchoice
choice "Battery presence detection"
prompt "Method to use to detect the battery"
help
This selects the method to use to detect the presence of a battery.
Battery detection is important since it can be used to indicate that
the case is open, so security features can be disabled. It is also
useful to report to the user when the battery is missing, e.g. with
a desktop icon.
config PLATFORM_EC_BATTERY_PRESENT_CUSTOM
bool "Call a board-provided function"
help
Use this method to provide a board-provided battery_is_present()
function to determine whether the battery is currently present.
This should be implemented in the board code and can use any
reasonable method to detect the battery.
config PLATFORM_EC_BATTERY_PRESENT_GPIO
bool "Check a GPIO"
help
Use this method if a GPIO signals whether the battery is present. The
GPIO should read low if the battery is present, high if absent,
TODO:
The actual GPIO to use is not defined by this option. Perhaps this
needs to be placed in the devicetree.
endchoice # battery presence
choice "Charger select"
prompt "Select the charger to use"
help
Select the battery charger IC used on the board. Only one charger may
be selected.
config PLATFORM_EC_CHARGER_ISL9241
bool "Use the ISL9241 charger"
depends on PLATFORM_EC_I2C
help
Enables a driver for the ISL9241 VCD Battery Charger. This is a
digitally-configurable, buck-boost battery charger that can support
both Narrow Voltage Direct Charging (NVDC) and Hybrid Power Buck Boost
(HPBB/Bypass) charging and switch between the modes under firmware
control. It supports an input voltage range of 3.9-23.4V and output
of 3.9-18.3V. It provides an I2C interace for configuration.
endchoice
endif # PLATFORM_EC_BATTERY
|