diff --git a/app/boards/arm/ckp/bt60_v2.keymap b/app/boards/arm/ckp/bt60_v2.keymap index 4ee5489c..eeb5c96e 100644 --- a/app/boards/arm/ckp/bt60_v2.keymap +++ b/app/boards/arm/ckp/bt60_v2.keymap @@ -58,7 +58,7 @@ &trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG &trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &reset &bt BT_CLR + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; @@ -94,7 +94,7 @@ &trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &rgb_ug RGB_TOG &bootloader &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &reset &bt BT_CLR + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; @@ -129,7 +129,7 @@ &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &trans &bl BL_TOG &trans - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &reset &bt BT_CLR + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &sys_reset &bt BT_CLR >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; @@ -165,7 +165,7 @@ &trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG &trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG - &bt BT_PRV &bt BT_NXT &trans &trans &reset &trans &bt BT_CLR + &bt BT_PRV &bt BT_NXT &trans &trans &sys_reset &trans &bt BT_CLR >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; diff --git a/app/boards/arm/ckp/bt60_v2_defconfig b/app/boards/arm/ckp/bt60_v2_defconfig index 920eba1a..f6dc7e09 100644 --- a/app/boards/arm/ckp/bt60_v2_defconfig +++ b/app/boards/arm/ckp/bt60_v2_defconfig @@ -9,6 +9,7 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +CONFIG_PINCTRL=y # encoder CONFIG_EC11=y diff --git a/app/boards/arm/ckp/bt65_v1.keymap b/app/boards/arm/ckp/bt65_v1.keymap index 5691390b..27411a71 100644 --- a/app/boards/arm/ckp/bt65_v1.keymap +++ b/app/boards/arm/ckp/bt65_v1.keymap @@ -55,7 +55,7 @@ // -------------------------------------------------------------------------------------------------- bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG - &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &reset &kp PSCRN + &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp HOME &kp END &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR @@ -92,7 +92,7 @@ bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PSCRN - &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &reset &bootloader &kp PAUSE_BREAK + &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &kp PAUSE_BREAK &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &kp HOME &kp END &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR >; @@ -126,7 +126,7 @@ // -------------------------------------------------------------------------------------------------- bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG &trans - &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &reset &kp PSCRN + &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK &trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &kp INS &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR @@ -162,7 +162,7 @@ // -------------------------------------------------------------------------------------------------- bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG - &trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &reset &kp PSCRN + &trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN &trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp INS &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR diff --git a/app/boards/arm/ckp/bt65_v1_defconfig b/app/boards/arm/ckp/bt65_v1_defconfig index 2a069b9a..e40ae2db 100644 --- a/app/boards/arm/ckp/bt65_v1_defconfig +++ b/app/boards/arm/ckp/bt65_v1_defconfig @@ -9,6 +9,7 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +CONFIG_PINCTRL=y # encoder CONFIG_EC11=y diff --git a/app/boards/arm/ckp/bt75_v1.keymap b/app/boards/arm/ckp/bt75_v1.keymap index bf9df43f..5c95387a 100644 --- a/app/boards/arm/ckp/bt75_v1.keymap +++ b/app/boards/arm/ckp/bt75_v1.keymap @@ -55,7 +55,7 @@ bindings = < &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG - &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &reset &kp PAUSE_BREAK + &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PAUSE_BREAK &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR @@ -95,7 +95,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PAUSE_BREAK - &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &reset &bootloader &trans + &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans &trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR >; @@ -133,7 +133,7 @@ bindings = < &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG &trans - &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &reset &trans + &trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &trans &trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans &trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR diff --git a/app/boards/arm/ckp/bt75_v1_defconfig b/app/boards/arm/ckp/bt75_v1_defconfig index 494dcae9..510d6994 100644 --- a/app/boards/arm/ckp/bt75_v1_defconfig +++ b/app/boards/arm/ckp/bt75_v1_defconfig @@ -9,6 +9,7 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +CONFIG_PINCTRL=y # encoder CONFIG_EC11=y diff --git a/app/boards/arm/ckp/ckp-pinctrl.dtsi b/app/boards/arm/ckp/ckp-pinctrl.dtsi new file mode 100644 index 00000000..e654198d --- /dev/null +++ b/app/boards/arm/ckp/ckp-pinctrl.dtsi @@ -0,0 +1,31 @@ + +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + pwm0_default: pwm0_default { + group1 { + psels = ; + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/arm/ckp/ckp.dtsi index a7cacdbe..745a5cf9 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/arm/ckp/ckp.dtsi @@ -10,6 +10,8 @@ #include #include +#include "ckp-pinctrl.dtsi" + / { model = "CKP"; compatible = "polarityworks,ckp"; @@ -100,8 +102,7 @@ compatible = "pwm-leds"; label = "Backlight LEDs"; pwm_led_0 { - pwms = <&pwm0 17>; - label = "Backlight LED 0"; + pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>; }; }; @@ -128,7 +129,9 @@ &pwm0 { status = "okay"; - ch0-pin = <17>; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; }; &gpiote { @@ -191,10 +194,9 @@ &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <20>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <27>; - miso-pin = <8>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi";