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:
committed by
Alberto Escolar
parent
cafc6a9c73
commit
12aa44edbd
@@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -22,4 +22,5 @@ supported:
|
||||
- spi
|
||||
- flash
|
||||
- input
|
||||
- pwm
|
||||
vendor: bflb
|
||||
|
||||
21
samples/basic/blinky_pwm/boards/ai_wb2_12f_kit.overlay
Normal file
21
samples/basic/blinky_pwm/boards/ai_wb2_12f_kit.overlay
Normal 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";
|
||||
};
|
||||
21
samples/basic/fade_led/boards/ai_wb2_12f_kit.overlay
Normal file
21
samples/basic/fade_led/boards/ai_wb2_12f_kit.overlay
Normal 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";
|
||||
};
|
||||
Reference in New Issue
Block a user