1/* 2 * Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <zephyr/dt-bindings/pwm/pwm.h> 8#include <dt-bindings/pinctrl/esp32s3-pinctrl.h> 9 10/ { 11 pwm_loopback_0 { 12 compatible = "test-pwm-loopback"; 13 /* first index must be a 32-Bit timer */ 14 pwms = <&mcpwm0 0 0 PWM_POLARITY_NORMAL>, 15 <&mcpwm0 6 0 PWM_POLARITY_NORMAL>; 16 }; 17}; 18 19&pinctrl { 20 mcpwm0_default: mcpwm0_default { 21 group1 { 22 pinmux = <MCPWM0_OUT0A_GPIO2>; 23 output-enable; 24 }; 25 group2 { 26 pinmux = <MCPWM0_CAP0_GPIO4>; 27 }; 28 }; 29}; 30 31&mcpwm0 { 32 pinctrl-0 = <&mcpwm0_default>; 33 pinctrl-names = "default"; 34 prescale = <255>; 35 prescale-timer0 = <103>; 36 status = "okay"; 37}; 38