Commit 7c55a540 authored by Danh Doan's avatar Danh Doan Committed by Benjamin Cabé
Browse files

tests: drivers: pwm: Support RA2, RA4, RA6 to test pwm_loopback

Add overlay to support test pwm_loopback on boards: ek_ra2a1,
ek_ra4e2, ek_ra4m2, ek_ra4m3, ek_ra4w1, ek_ra6e2, ek_ra6m1,
ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, fpb_ra6e1, fpb_ra6e2.

Signed-off-by: default avatarDanh Doan <danh.doan.ue@bp.renesas.com>
parent 201a7c63
Loading
Loading
Loading
Loading
+35 −0
Changes for tests/drivers/pwm/pwm_loopback/boards/ek_ra2a1.overlay: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2024 Renesas Electronics Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

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

&pinctrl {
	pwm6_default: pwm6_default {
		group1 {
			/* GTIOC6A GTIOC6B */
			psels = <RA_PSEL(RA_PSEL_GPT1, 3, 4)>,
				<RA_PSEL(RA_PSEL_GPT1, 3, 3)>;
		};
	};
};

&pwm6 {
	pinctrl-0 = <&pwm6_default>;
	pinctrl-names = "default";
	interrupts = <20 1>, <21 1>;
	interrupt-names = "gtioca", "overflow";
	status = "okay";
};
+35 −0
Changes for tests/drivers/pwm/pwm_loopback/boards/ek_ra4e2.overlay: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2024 Renesas Electronics Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

/ {
	pwm_loopback_0 {
		compatible = "test-pwm-loopback";
		pwms = <&pwm1 0 0 PWM_POLARITY_NORMAL>,
			<&pwm4 0 0 PWM_POLARITY_NORMAL>;
	};
};

&pinctrl {
	pwm4_default: pwm4_default {
		group1 {
			/* GTIOC4A GTIOC4B */
			psels = <RA_PSEL(RA_PSEL_GPT1, 3, 2)>,
				<RA_PSEL(RA_PSEL_GPT1, 3, 1)>;
		};
	};
};

&pwm4 {
	pinctrl-0 = <&pwm4_default>;
	pinctrl-names = "default";
	interrupts = <65 1>, <66 1>;
	interrupt-names = "gtioca", "overflow";
	divider = <RA_PWM_SOURCE_DIV_256>;
	status = "okay";
};
+35 −0
Changes for tests/drivers/pwm/pwm_loopback/boards/ek_ra4m2.overlay: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2024 Renesas Electronics Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

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

&pinctrl {
	pwm4_default: pwm4_default {
		group1 {
			/* GTIOC4A GTIOC4B */
			psels = <RA_PSEL(RA_PSEL_GPT1, 3, 2)>,
				<RA_PSEL(RA_PSEL_GPT1, 3, 1)>;
		};
	};
};

&pwm4 {
	pinctrl-0 = <&pwm4_default>;
	pinctrl-names = "default";
	interrupts = <65 1>, <66 1>;
	interrupt-names = "gtioca", "overflow";
	status = "okay";
};
+35 −0
Changes for tests/drivers/pwm/pwm_loopback/boards/ek_ra4m3.overlay: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2024 Renesas Electronics Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

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

&pinctrl {
	pwm4_default: pwm4_default {
		group1 {
			/* GTIOC4A GTIOC4B */
			psels = <RA_PSEL(RA_PSEL_GPT1, 3, 2)>,
				<RA_PSEL(RA_PSEL_GPT1, 3, 1)>;
		};
	};
};

&pwm4 {
	pinctrl-0 = <&pwm4_default>;
	pinctrl-names = "default";
	interrupts = <65 1>, <66 1>;
	interrupt-names = "gtioca", "overflow";
	status = "okay";
};
+35 −0
Changes for tests/drivers/pwm/pwm_loopback/boards/ek_ra4w1.overlay: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2024 Renesas Electronics Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

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

&pinctrl {
	pwm4_default: pwm4_default {
		group1 {
			/* GTIOC4A GTIOC4B */
			psels = <RA_PSEL(RA_PSEL_GPT1, 2, 5)>,
				<RA_PSEL(RA_PSEL_GPT1, 2, 4)>;
		};
	};
};

&pwm4 {
	pinctrl-0 = <&pwm4_default>;
	pinctrl-names = "default";
	interrupts = <10 1>, <11 1>;
	interrupt-names = "gtioca", "overflow";
	status = "okay";
};
Loading