Skip to content

Commit

Permalink
rev41-1350: Move backlight to board from shield
Browse files Browse the repository at this point in the history
  • Loading branch information
cyril279 committed Mar 6, 2024
1 parent 72055bf commit 602951f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 39 deletions.
10 changes: 0 additions & 10 deletions config/boards/shields/rev1350/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,3 @@ config ZMK_KEYBOARD_NAME
default "rev1350"

endif # SHIELD_REV1350

if ZMK_BACKLIGHT

config PWM
default y

config LED_PWM
default y

endif # ZMK_BACKLIGHT
9 changes: 9 additions & 0 deletions config/boards/shields/rev1350/boards/nice_nano_v2.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if ZMK_BACKLIGHT

config PWM
default y

config LED_PWM
default y

endif # ZMK_BACKLIGHT
34 changes: 34 additions & 0 deletions config/boards/shields/rev1350/boards/nine_nano_v2.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
&pinctrl {
// Other pinctrl definitions for other hardware
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
low-power-enable;
};
};
};

&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};

/ {
chosen {
zmk,backlight = &backlight;
};

backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};
};
};
29 changes: 0 additions & 29 deletions config/boards/shields/rev1350/rev1350.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
zmk,backlight = &backlight;
};
backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};
};

default_transform: keymap_transform_0 {
Expand Down Expand Up @@ -57,25 +50,3 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3)
;
};
};

&pinctrl {
// Other pinctrl definitions for other hardware
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
low-power-enable;
};
};
};

&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};

0 comments on commit 602951f

Please sign in to comment.