boards: renesas: Add configurations to support pwm on EK-RA8D1

Add support for PWM driver on EK-RA8D1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
This commit is contained in:
Quy Tran 2024-09-06 04:47:16 +00:00 committed by Carles Cufí
commit 4793e00ae8
4 changed files with 58 additions and 0 deletions

View file

@ -104,6 +104,8 @@ The below features are currently supported on Zephyr OS for EK-RA8D1 board:
+--------------+------------+------------------+
| FLASH | on-chip | flash |
+--------------+------------+------------------+
| PWM | on-chip | pwm |
+--------------+------------+------------------+
Other hardware features are currently not supported by the port.

View file

@ -25,4 +25,15 @@
<RA_PSEL(RA_PSEL_SPI, 7, 3)>;
};
};
pwm7_default: pwm7_default {
group1 {
/* GTIOC7A */
psels = <RA_PSEL(RA_PSEL_GPT1, 10, 7)>;
};
group2 {
/* GTIOC7B */
psels = <RA_PSEL(RA_PSEL_GPT1, 10, 6)>;
};
};
};

View file

@ -124,3 +124,11 @@
};
};
};
&pwm7 {
pinctrl-0 = <&pwm7_default>;
interrupts = <40 1>, <41 1>;
interrupt-names = "gtioca", "overflow";
pinctrl-names = "default";
status = "okay";
};

View file

@ -0,0 +1,37 @@
/*
* 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 = <&pwm7 0 0 PWM_POLARITY_NORMAL>,
<&pwm9 0 0 PWM_POLARITY_NORMAL>;
};
};
&pinctrl {
pwm9_default: pwm9_default {
group1 {
/* GTIOC9A */
psels = <RA_PSEL(RA_PSEL_GPT1, 4, 11)>;
};
group2 {
/* GTIOC9B */
psels = <RA_PSEL(RA_PSEL_GPT1, 4, 10)>;
};
};
};
&pwm9 {
pinctrl-0 = <&pwm9_default>;
pinctrl-names = "default";
interrupts = <50 1>, <51 1>;
interrupt-names = "gtioca", "overflow";
status = "okay";
};