refactor(boards): Move puchi_ble to power domains

* Set a chosen `zmk,default-power-domain`
* Enable the relevant Kconfig settings for PDs.
This commit is contained in:
Peter Johanson 2023-09-12 19:47:41 -07:00
parent 15e7c43ec0
commit 6f17d9c5d5
3 changed files with 17 additions and 2 deletions

View file

@ -5,4 +5,6 @@
config BOARD_PUCHI_BLE_v1
bool "puchi_ble_v1"
imply ZMK_POWER_DOMAINS
imply ZMK_POWER_DOMAINS_DYNAMIC_DEFAULT
depends on SOC_NRF52840_QIAA

View file

@ -57,3 +57,5 @@ pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_serial: &uart0 {};
pro_micro_power_domain: &core_power_domain {};

View file

@ -6,7 +6,6 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "puchi_ble_v1-pinctrl.dtsi"
/ {
@ -18,6 +17,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,battery = &vbatt;
zmk,default-power-domain = &core_power_domain;
};
leds {
@ -33,6 +33,14 @@
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
core_power_domain: core_power_domain {
compatible = "power-domain-gpio", "power-domain";
startup-delay-us = <50000>;
off-on-delay-us = <50000>;
enable-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 2>;
@ -79,7 +87,7 @@ zephyr_udc0: &usbd {
&flash0 {
/*
* For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
* http: //docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/
partitions {
compatible = "fixed-partitions";
@ -111,3 +119,6 @@ zephyr_udc0: &usbd {
};
};
};
// Included at the end to ensure the power domain DTS node exists
#include "arduino_pro_micro_pins.dtsi"