boards: esp8684_devkitm: PWM sample and document update

Added sample for ESP32C2/ESP8684 SoC and updated document
indicating LEDC PWM support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This commit is contained in:
Raffael Rostagno 2024-08-06 11:06:06 -03:00 committed by Carles Cufí
commit 02af64400f
3 changed files with 37 additions and 0 deletions

View file

@ -61,6 +61,8 @@ Current Zephyr's ESP8684-Devkitm board supports the following features:
+------------+------------+-------------------------------------+
| Wi-Fi | on-chip | |
+------------+------------+-------------------------------------+
| LEDC | on-chip | pwm |
+------------+------------+-------------------------------------+
For a getting started user guide, please check `ESP8684 Devkitm User Guide`_.

View file

@ -10,6 +10,7 @@ supported:
- uart
- counter
- entropy
- pwm
testing:
ignore_tags:
- net

View file

@ -0,0 +1,34 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
*/
#include <zephyr/dt-bindings/pwm/pwm.h>
/ {
aliases {
pwm-0 = &ledc0;
};
};
&pinctrl {
ledc0_default: ledc0_default {
group1 {
pinmux = <LEDC_CH0_GPIO2>;
output-enable;
};
};
};
&ledc0 {
pinctrl-0 = <&ledc0_default>;
pinctrl-names = "default";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel0@0 {
reg = <0x0>;
timer = <0>;
};
};