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