Skip to content

Commit a391fe6

Browse files
ananglcarlescufi
authored andcommitted
[nrf fromtree] boards: nrf: Fix sw_pwm channel definitions
This is a follow-up to commit f301dc2. Add missing GPIO_ACTIVE_LOW flag to sw_pwm channel definitions for nRF51 DK and nRF51 Dongle so that the initial state of their PWM outputs is properly set up. Add missing sw_pwm channel definition in the nrf52833dk_nrf52820 target that was modified in 793362a instead of in f301dc2. Add also the pwm-led0 alias for its PWM LED so that it can be used with standard samples. Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit fa48dbd)
1 parent 0a904d0 commit a391fe6

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

boards/arm/nrf51dk_nrf51422/nrf51dk_nrf51422.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
&sw_pwm {
8989
status ="okay";
90-
channel-gpios = <&gpio0 21 0>;
90+
channel-gpios = <&gpio0 21 PWM_POLARITY_INVERTED>;
9191
clock-prescaler = <8>;
9292
};
9393

boards/arm/nrf51dongle_nrf51422/nrf51dongle_nrf51422.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
&sw_pwm {
5959
status ="okay";
60-
channel-gpios = <&gpio0 21 0>;
60+
channel-gpios = <&gpio0 21 PWM_POLARITY_INVERTED>;
6161
clock-prescaler = <8>;
6262
};
6363

boards/arm/nrf52833dk_nrf52820/nrf52833dk_nrf52820.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
led1 = &led1;
7777
led2 = &led2;
7878
led3 = &led3;
79+
pwm-led0 = &pwm_led0;
7980
sw0 = &button0;
8081
sw1 = &button1;
8182
sw2 = &button2;
@@ -84,6 +85,12 @@
8485
};
8586
};
8687

88+
&sw_pwm {
89+
status ="okay";
90+
channel-gpios = <&gpio0 13 PWM_POLARITY_INVERTED>;
91+
clock-prescaler = <8>;
92+
};
93+
8794
&gpiote {
8895
status = "okay";
8996
};

0 commit comments

Comments
 (0)