diff --git a/app/boards/arm/puchi_ble/Kconfig.board b/app/boards/arm/puchi_ble/Kconfig.board index 0f5b7f96d84..7cf705adb4a 100644 --- a/app/boards/arm/puchi_ble/Kconfig.board +++ b/app/boards/arm/puchi_ble/Kconfig.board @@ -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 diff --git a/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi b/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi index 3037ea3e14b..84ae136e33e 100644 --- a/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi @@ -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 {}; \ No newline at end of file diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/boards/arm/puchi_ble/puchi_ble_v1.dts index 05aba8d3780..a6d207ec204 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/boards/arm/puchi_ble/puchi_ble_v1.dts @@ -6,7 +6,6 @@ /dts-v1/; #include -#include "arduino_pro_micro_pins.dtsi" #include "puchi_ble_v1-pinctrl.dtsi" / { @@ -19,6 +18,7 @@ zephyr,flash = &flash0; zephyr,console = &cdc_acm_uart; zmk,battery = &vbatt; + zmk,default-power-domain = &core_power_domain; }; leds { @@ -34,6 +34,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>; @@ -83,7 +91,7 @@ &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"; @@ -115,3 +123,6 @@ }; }; }; + +// Included at the end to ensure the power domain DTS node exists +#include "arduino_pro_micro_pins.dtsi"