Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: nordic: nrf54h20dk: add PWM to cpuppr #81880

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuppr.dts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,46 @@
zephyr,sram = &cpuppr_code_data;
zephyr,shell-uart = &uart135;
};

leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
label = "Green LED 0";
};
led1: led_1 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Green LED 1";
};
led2: led_2 {
gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
label = "Green LED 2";
};
led3: led_3 {
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
label = "Green LED 3";
};
};

pwmleds {
compatible = "pwm-leds";
/*
* LEDs are connected to GPIO Port 9 - pins 0-3. There is no valid hardware
* configuration to pass PWM signal on pis 0 and 1. First valid config is P9.2.
* Signal on PWM130's channel 0 can be passed directly on GPIO Port 9 pin 2.
*/
pwm_led2: pwm_led_2 {
pwms = <&pwm130 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};

aliases {
led0 = &led0;
led1 = &led1;
led2 = &led2;
led3 = &led3;
pwm-led0 = &pwm_led2;
};
};

&cpuapp_cpuppr_ipc {
Expand Down Expand Up @@ -56,3 +96,10 @@
pinctrl-1 = <&uart136_sleep>;
pinctrl-names = "default", "sleep";
};

&pwm130 {
status = "okay";
pinctrl-0 = <&pwm130_default>;
pinctrl-1 = <&pwm130_sleep>;
pinctrl-names = "default", "sleep";
};
5 changes: 5 additions & 0 deletions snippets/nordic-ppr/soc/nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
&uart135 {
status = "reserved";
};

&pwm130 {
status = "reserved";
interrupt-parent = <&cpuppr_clic>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&pinctrl {
pwm_default: pwm_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
};
};
pwm_sleep: pwm_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
low-power-enable;
};
};
};

&pwm130 {
status = "okay";
pinctrl-0 = <&pwm_default>;
pinctrl-1 = <&pwm_sleep>;
pinctrl-names = "default", "sleep";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&pinctrl {
pwm_default: pwm_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
};
};
pwm_sleep: pwm_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 0)>;
low-power-enable;
};
};
};

&pwm130 {
pinctrl-0 = <&pwm_default>;
pinctrl-1 = <&pwm_sleep>;
pinctrl-names = "default", "sleep";
};
1 change: 1 addition & 0 deletions tests/drivers/pwm/pwm_api/sysbuild/vpr_launcher/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# nothing here
Loading