boards: st: nucleo_wb05kz: add PWM support and LED

Add the PWM LED to Nucleo-WB05KZ board and mark as compatible with PWM.
Also mark counters as supported (but don't enable by default).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit is contained in:
Mathieu Choplain 2025-01-08 15:37:00 +01:00 committed by Benjamin Cabé
parent ba212fdca6
commit 784629b815
3 changed files with 26 additions and 0 deletions

View file

@ -52,6 +52,8 @@ The Zephyr ``nucleo_wb05kz`` board target supports the following hardware featur
+-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+
| TIMER | on-chip | counter, pwm |
+-----------+------------+-------------------------------------+
| RADIO | on-chip | Bluetooth Low Energy |
+-----------+------------+-------------------------------------+

View file

@ -39,6 +39,14 @@
};
};
pwmleds: pwmleds {
compatible = "pwm-leds";
status = "okay";
pwm_red_led_1: pwm_led_1 {
pwms = <&pwm2 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_1: button_0 {
@ -62,6 +70,7 @@
led0 = &blue_led_1;
led1 = &green_led_1;
led2 = &red_led_1;
pwm-led0 = &pwm_red_led_1;
sw0 = &user_button_1;
sw1 = &user_button_2;
sw2 = &user_button_3;
@ -122,6 +131,19 @@
<&rcc STM32_SRC_SYSCLK SPI3_I2S3_SEL(3)>;
};
&timers2 {
status = "okay";
st,prescaler = <10000>;
pwm2: pwm {
/* PWM on red_led_1 */
pinctrl-0 = <&tim2_ch3_pb2>;
pinctrl-names = "default";
status = "okay";
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";

View file

@ -12,9 +12,11 @@ supported:
- adc
- arduino_i2c
- arduino_spi
- counter
- dma
- gpio
- i2c
- pwm
- spi
- bluetooth
vendor: st