Commit 66e50104 authored by Bill Waters's avatar Bill Waters Committed by Benjamin Cabé
Browse files

drivers: pwm: Infineon: updates to PWM driver test files



* Adds overlay files for tests/drivers/pwm/pwm_api and
tests/drivers/pwm/pwm_gpio_loopback to run these tests on the
cyw920829 board.

Signed-off-by: default avatarBill Waters <bill.waters@infineon.com>
parent d18dd9d3
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Infineon Technologies AG,
 * or an affiliate of Infineon Technologies AG.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

/ {
	aliases {
		pwm-0 = &pwm0_0;
	};
};

&tcpwm0_0 {
	status = "okay";
	divider-type = <PWM_IFX_SYSCLK_DIV_16_BIT>;
	divider-sel = <1>;
	divider-val = <9599>;

	pwm0_0: pwm0_0 {
		status = "okay";
		pinctrl-0 = <&p3_4_pwm0_0>;
		pinctrl-names = "default";
	};
};

&pinctrl {
	p3_4_pwm0_0: p3_4_pwm0_0 {
		drive-push-pull;
	};
};
+54 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Infineon Technologies AG,
 * or an affiliate of Infineon Technologies AG.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

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

/ {
	zephyr,user {
		pwms = <&pwm0_1 0 PWM_MSEC(2) (PWM_POLARITY_NORMAL | PWM_IFX_TCPWM_OUTPUT_HIGHZ)>,
		       <&pwm1_0 1 PWM_MSEC(2) (PWM_POLARITY_NORMAL | PWM_IFX_TCPWM_OUTPUT_HIGHZ)>;
		gpios = <&gpio_prt3 7 GPIO_ACTIVE_HIGH>,
			<&gpio_prt0 0 GPIO_ACTIVE_HIGH>;
	};
};

&tcpwm0_1 {
	status = "okay";
	divider-type = <PWM_IFX_SYSCLK_DIV_16_BIT>;
	divider-sel = <1>;
	divider-val = <9599>;

	pwm0_1: pwm0_1 {
		status = "okay";
		pinctrl-0 = <&p3_6_pwm0_1>;
		pinctrl-names = "default";
	};
};

&tcpwm1_0 {
	status = "okay";
	divider-type = <PWM_IFX_SYSCLK_DIV_16_BIT>;
	divider-sel = <1>;
	divider-val = <9599>;

	pwm1_0: pwm1_0 {
		status = "okay";
		pinctrl-0 = <&p0_1_pwm1_0>;
		pinctrl-names = "default";
	};
};

&pinctrl {
	p3_6_pwm0_1: p3_6_pwm0_1 {
		drive-push-pull;
	};

	p0_1_pwm1_0: p0_1_pwm1_0 {
		drive-push-pull;
	};
};
+4 −0
Original line number Diff line number Diff line
@@ -27,3 +27,7 @@ tests:
    platform_allow:
      - xg29_rb4412a
      - bg29_rb4420a

  drivers.pwm.gpio_loopback.ifx:
    platform_allow:
      - cyw920829m2evk_02