summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig
diff options
context:
space:
mode:
authorMichał Barnaś <mb@semihalf.com>2021-08-06 12:01:09 +0200
committerCommit Bot <commit-bot@chromium.org>2021-08-16 12:15:16 +0000
commit7c684a81a49c03cb5c8688c8607e883f7604dad8 (patch)
tree645ebdd3765d1dfac08c53d84101cd6e6f42fd15 /zephyr/Kconfig
parent8e7f105716a105173dc8af41cb76437fee62e91a (diff)
downloadchrome-ec-7c684a81a49c03cb5c8688c8607e883f7604dad8.tar.gz
zephyr: add support for switchcap in device tree
This commit adds support for switchcap definition in device tree. It will allow to remove board specific files which implemented the switchcap functionalities. This will unify the logic between different board in zephyr. BRANCH=main BUG=b:194211207 TEST=Use linked TEST commits to see example of definitions for lazor Use GPIO or LN9310 version, build and flash to lazor. Board should be able to boot correctly. Signed-off-by: Michał Barnaś <mb@semihalf.com> Change-Id: Ib80a73dcb2db95e2dcf48e33f876a39246fd506a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3085670 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig')
-rw-r--r--zephyr/Kconfig21
1 files changed, 20 insertions, 1 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 7041fd63ef..05b9d5d055 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -627,6 +627,22 @@ config PLATFORM_EC_SWITCH
This also enables the "mmapinfo" console command to report the current
state of all switches.
+choice PLATFORM_EC_SWITCHCAP_TYPE
+ prompt "Enable switchcap support"
+ optional
+ help
+ Enable support for switchcap used to power on the AP.
+ If enabled, type of switchcap must be selected and node in device
+ tree must be added that describes the driver and pins used to control
+ the switchcap.
+
+config PLATFORM_EC_SWITCHCAP_GPIO
+ bool "GPIO controlled switchcap"
+ help
+ Enable support for the GPIO controlled switchcap.
+ Pins used for controlling the switchcap must be defined in board's
+ device tree.
+
config PLATFORM_EC_SWITCHCAP_LN9310
bool "LN9310 switchcap driver"
depends on PLATFORM_EC_I2C
@@ -634,7 +650,10 @@ config PLATFORM_EC_SWITCHCAP_LN9310
Enable support for the LION Semiconductor LN9310 switched
capacitor converter. This will export definitions for
ln9310_init, ln9310_interrupt, and ln9310_power_good, which
- project-specific code should call appropriately.
+ project-specific code should call appropriately if there's
+ no switchcap node in device tree.
+
+endchoice
config PLATFORM_EC_SYSTEM_UNLOCKED
bool "System unlocked: allow dangerous commands while in development"