boards: renesas: Add configurations to support pwm on MCK-RA8T1
Add support for PWM driver on MCK-RA8T1 Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
This commit is contained in:
parent
59dbbb347d
commit
1391355ac4
4 changed files with 58 additions and 0 deletions
|
|
@ -102,6 +102,8 @@ The below features are currently supported on Zephyr OS for MCB-RA8T1 board:
|
|||
+--------------+------------+----------------------+
|
||||
| FLASH | on-chip | flash |
|
||||
+--------------+------------+----------------------+
|
||||
| PWM | on-chip | pwm |
|
||||
+--------------+------------+----------------------+
|
||||
|
||||
Other hardware features are currently not supported by the port.
|
||||
|
||||
|
|
|
|||
|
|
@ -25,4 +25,15 @@
|
|||
<RA_PSEL(RA_PSEL_SPI, 2, 4)>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm2_default: pwm2_default {
|
||||
group1 {
|
||||
/* GTIOC2A */
|
||||
psels = <RA_PSEL(RA_PSEL_GPT1, 1, 13)>;
|
||||
};
|
||||
group2 {
|
||||
/* GTIOC2B */
|
||||
psels = <RA_PSEL(RA_PSEL_GPT1, 1, 14)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -118,3 +118,11 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm2 {
|
||||
pinctrl-0 = <&pwm2_default>;
|
||||
interrupts = <40 1>, <41 1>;
|
||||
interrupt-names = "gtioca", "overflow";
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
|||
37
tests/drivers/pwm/pwm_loopback/boards/mck_ra8t1.overlay
Normal file
37
tests/drivers/pwm/pwm_loopback/boards/mck_ra8t1.overlay
Normal 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 = <&pwm2 0 0 PWM_POLARITY_NORMAL>,
|
||||
<&pwm5 0 0 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pwm5_default: pwm5_default {
|
||||
group1 {
|
||||
/* GTIOC5A */
|
||||
psels = <RA_PSEL(RA_PSEL_GPT1, 1, 15)>;
|
||||
};
|
||||
group2 {
|
||||
/* GTIOC5B */
|
||||
psels = <RA_PSEL(RA_PSEL_GPT1, 6, 9)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm5 {
|
||||
pinctrl-0 = <&pwm5_default>;
|
||||
pinctrl-names = "default";
|
||||
interrupts = <50 1>, <51 1>;
|
||||
interrupt-names = "gtioca", "overflow";
|
||||
status = "okay";
|
||||
};
|
||||
Loading…
Reference in a new issue