boards: bflb: update ai_wb2_12f for PWM

Adds PWM nodes and samples

Signed-off-by: Camille BAUD <mail@massdriver.space>
This commit is contained in:
Camille BAUD
2025-11-11 10:59:55 +01:00
committed by Alberto Escolar
parent cafc6a9c73
commit 12aa44edbd
5 changed files with 73 additions and 0 deletions

View File

@@ -23,4 +23,13 @@
input-schmitt-enable;
};
};
blue_pwm_pinctrl: blue_pwm_pinctrl {
group1 {
pinmux = <GPIO3_PWM_CH3>;
bias-pull-up;
input-schmitt-enable;
drive-strength = <1>;
};
};
};

View File

@@ -14,6 +14,7 @@
aliases {
led0 = &blue_led;
pwm-led0 = &blue_pwm_led;
sw0 = &button_0;
};
@@ -36,6 +37,26 @@
};
};
pwmleds: pwmleds {
compatible = "pwm-leds";
status = "disabled";
blue_pwm_led: led_pwm_0 {
pwms = <&pwm0 3 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
label = "Blue - LED0 PWM";
};
green_pwm_led: led_pwm_1 {
pwms = <&pwm0 2 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
label = "Green - LED1 PWM";
};
red_pwm_led: led_pwm_2 {
pwms = <&pwm0 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
label = "Red - LED2 PWM";
};
};
buttons {
compatible = "gpio-keys";

View File

@@ -22,4 +22,5 @@ supported:
- spi
- flash
- input
- pwm
vendor: bflb

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
leds {
status = "disabled";
};
};
&pwmleds {
status = "okay";
};
&pwm0 {
status = "okay";
pinctrl-0 = <&blue_pwm_pinctrl>;
pinctrl-names = "default";
};

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
leds {
status = "disabled";
};
};
&pwmleds {
status = "okay";
};
&pwm0 {
status = "okay";
pinctrl-0 = <&blue_pwm_pinctrl>;
pinctrl-names = "default";
};