1/* 2 * SPDX-License-Identifier: Apache-2.0 3 * 4 * Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. 5 */ 6 7#include <zephyr/dt-bindings/pwm/pwm.h> 8#include <zephyr/dt-bindings/gpio/gpio.h> 9#include <zephyr/dt-bindings/gpio/espressif-esp32-gpio.h> 10 11/ { 12 zephyr,user { 13 /* GPIO input pins order must match PWM pinctrl config */ 14 gpios = <&gpio0 2 ESP32_GPIO_PIN_OUT_EN>, 15 <&gpio0 3 ESP32_GPIO_PIN_OUT_EN>; 16 17 pwms = <&ledc0 0 160000 PWM_POLARITY_NORMAL>, 18 <&ledc0 5 80000 PWM_POLARITY_INVERTED>; 19 }; 20}; 21 22&pinctrl { 23 ledc0_default: ledc0_default { 24 group1 { 25 pinmux = <LEDC_CH0_GPIO2>, 26 <LEDC_CH5_GPIO3>; 27 input-enable; 28 }; 29 }; 30}; 31 32&ledc0 { 33 pinctrl-0 = <&ledc0_default>; 34 pinctrl-names = "default"; 35 status = "okay"; 36 #address-cells = <1>; 37 #size-cells = <0>; 38 39 channel0@0 { 40 reg = <0x0>; 41 timer = <0>; 42 }; 43 44 channel5@5 { 45 reg = <0x5>; 46 timer = <1>; 47 }; 48}; 49