Commit ffa676dd authored by Raffael Rostagno's avatar Raffael Rostagno Committed by Benjamin Cabé
Browse files

tests: pwm_loopback: esp32c6: Add test config

Add test config file to test MCPWM loopback on ESP32C6

Signed-off-by: default avatarRaffael Rostagno <raffael.rostagno@espressif.com>
parent 0cb755a0
Loading
Loading
Loading
Loading
+37 −0
Changes for tests/drivers/pwm/pwm_loopback/socs/esp32c6.overlay: 37 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/dt-bindings/pwm/pwm.h>

/ {
	pwm_loopback_0 {
		compatible = "test-pwm-loopback";
		/* first index must be a 32-Bit timer */
		pwms = <&mcpwm0 0 0 PWM_POLARITY_NORMAL>,
		       <&mcpwm0 6 0 PWM_POLARITY_NORMAL>;
	};
};

&pinctrl {
	mcpwm0_default: mcpwm0_default {
		group1 {
			pinmux = <MCPWM0_OUT0A_GPIO2>;
			input-enable;
		};
		group2 {
			pinmux = <MCPWM0_CAP0_GPIO2>;
			output-enable;
		};
	};
};

&mcpwm0 {
	pinctrl-0 = <&mcpwm0_default>;
	pinctrl-names = "default";
	prescale = <255>;
	prescale-timer0 = <103>;
	status = "okay";
};