tests: pwm: Add overlay to support pwm on RX130

Add pwm property in tests/pwm to support PWM on RSK-RX130-512KB board.

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
This commit is contained in:
Phi Tran 2024-12-10 19:03:50 +07:00 committed by Benjamin Cabé
parent e771f0094c
commit 42b2624531
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,15 @@
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
aliases {
pwm-0 = &pwm1;
};
};
&pclkb {
div = <2>;
};

View File

@ -0,0 +1,39 @@
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/pwm/pwm.h>
#include <zephyr/dt-bindings/pwm/rx_mtu_pwm.h>
/ {
pwm_loopback_0 {
compatible = "test-pwm-loopback";
pwms =<&pwm4 RX_MTIOCxA 0 PWM_POLARITY_NORMAL>,
<&pwm1 RX_MTIOCxA 0 PWM_POLARITY_NORMAL>;
};
};
&pinctrl {
pwm4_default: pwm4_default {
group1 {
psels = <RX_PSEL(RX_PSEL_PAnPFS_MTIOC4A, 10, 0)>;
};
};
};
&mtu4 {
status = "okay";
pinctrl-0 = <&pwm4_default>;
pinctrl-names = "default";
pwm4: pwm {
status = "okay";
prescaler = <RX_MTU_PWM_SOURCE_DIV_16>;
};
};
&pclkb {
div = <4>;
};