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			input-enable;
23		};
24		group2 {
25			pinmux = <MCPWM0_CAP0_GPIO2>;
26			output-enable;
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