Skip to content

Commit

Permalink
[nrf fromtree] samples: basic: add support for nRF54H20 cpuppr PWM
Browse files Browse the repository at this point in the history
Added support for nRF54H20 cpuppr PWM in blinky_pwm and
fade_led sample.

Signed-off-by: Michał Stasiak <[email protected]>
(cherry picked from commit 5b34d77d7b6d91861c14a8cda7858170d940bd13)
  • Loading branch information
mstasiaknordic committed Feb 17, 2025
1 parent bf64a31 commit 106f95b
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
21 changes: 21 additions & 0 deletions samples/basic/blinky_pwm/boards/nrf54h20dk_nrf54h20_cpuppr.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <zephyr/dt-bindings/pwm/pwm.h>

/ {
aliases {
pwm-led0 = &pwm_led2;
};

pwmleds {
compatible = "pwm-leds";
pwm_led2: pwm_led_2 {
pwms = <&pwm130 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
};

&pwm130 {
status = "okay";
pinctrl-0 = <&pwm130_default>;
pinctrl-1 = <&pwm130_sleep>;
pinctrl-names = "default", "sleep";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
&pwm130 {
status = "reserved";
interrupt-parent = <&cpuppr_clic>;
};
1 change: 1 addition & 0 deletions samples/basic/blinky_pwm/sysbuild/vpr_launcher/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# nothing here
21 changes: 21 additions & 0 deletions samples/basic/fade_led/boards/nrf54h20dk_nrf54h20_cpuppr.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <zephyr/dt-bindings/pwm/pwm.h>

/ {
aliases {
pwm-led0 = &pwm_led2;
};

pwmleds {
compatible = "pwm-leds";
pwm_led2: pwm_led_2 {
pwms = <&pwm130 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
};

&pwm130 {
status = "okay";
pinctrl-0 = <&pwm130_default>;
pinctrl-1 = <&pwm130_sleep>;
pinctrl-names = "default", "sleep";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
&pwm130 {
status = "reserved";
interrupt-parent = <&cpuppr_clic>;
};
1 change: 1 addition & 0 deletions samples/basic/fade_led/sysbuild/vpr_launcher/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# nothing here

0 comments on commit 106f95b

Please sign in to comment.