summaryrefslogtreecommitdiff
path: root/app/boards/arm
diff options
context:
space:
mode:
Diffstat (limited to 'app/boards/arm')
-rw-r--r--app/boards/arm/nrfmicro/Kconfig5
-rw-r--r--app/boards/arm/nrfmicro/Kconfig.defconfig9
-rw-r--r--app/boards/arm/nrfmicro/pinmux.c6
3 files changed, 18 insertions, 2 deletions
diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig
index 17a3347..3501972 100644
--- a/app/boards/arm/nrfmicro/Kconfig
+++ b/app/boards/arm/nrfmicro/Kconfig
@@ -3,3 +3,8 @@ config BOARD_ENABLE_DCDC
select SOC_DCDC_NRF52X
default y
depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13)
+
+config BOARD_NRFMICRO_CHARGER
+ bool "Enable battery charger"
+ default y
+ depends on (BOARD_NRFMICRO_13)
diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig
index 2212277..9cce5a9 100644
--- a/app/boards/arm/nrfmicro/Kconfig.defconfig
+++ b/app/boards/arm/nrfmicro/Kconfig.defconfig
@@ -29,5 +29,12 @@ config ZMK_USB
config PINMUX
default y
-
+
+if BOARD_NRFMICRO_13
+
+config BOARD_NRFMICRO_CHARGER
+ default y
+
+endif # BOARD_NRFMICRO_13
+
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c
index c02ca92..3792b59 100644
--- a/app/boards/arm/nrfmicro/pinmux.c
+++ b/app/boards/arm/nrfmicro/pinmux.c
@@ -23,10 +23,14 @@ static int pinmux_nrfmicro_init(struct device *port)
gpio_pin_configure(p1, 9, GPIO_OUTPUT);
gpio_pin_set(p1, 9, 0);
- // enable charger (nRFMicro 1.3 only)
+#if CONFIG_BOARD_NRFMICRO_CHARGER
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
gpio_pin_set(p0, 5, 0);
#else
+ gpio_pin_configure(p0, 5, GPIO_INPUT);
+#endif
+
+#else
// enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1)
gpio_pin_configure(p1, 9, GPIO_OUTPUT);
gpio_pin_set(p1, 9, 1);