Skip to content

Commit 303376a

Browse files
Hieu Nguyenkartben
authored andcommitted
drivers: pinctrl: Add support for RZ/T2M
This is the initial commit to support pinctrl driver for Renesas RZ/T2M Corrected space in the comment. Signed-off-by: Hieu Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]> Signed-off-by: Binh Nguyen <[email protected]>
1 parent df630d6 commit 303376a

File tree

8 files changed

+48
-5
lines changed

8 files changed

+48
-5
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/dt-bindings/gpio/gpio.h>
7+
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzt-common.h>
8+
9+
&pinctrl {
10+
/omit-if-no-ref/ sci0_default: sci0_default {
11+
sci0-pinmux {
12+
pinmux = <RZT_PINMUX(PORT_16, 5, 1)>, /* TXD */
13+
<RZT_PINMUX(PORT_16, 6, 2)>; /* RXD */
14+
};
15+
};
16+
17+
/omit-if-no-ref/ irq2_default: irq2_default{
18+
irq2-pinmux{
19+
pinmux = <RZT_PINMUX(PORT_10, 5, 0)>;
20+
input-enable;
21+
};
22+
};
23+
};

dts/arm/renesas/rz/rzt/r9a07g075.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,10 @@
9494
};
9595
};
9696
};
97+
98+
pinctrl: pinctrl@800a0000 {
99+
compatible = "renesas,rzt-pinctrl";
100+
reg = <0x800a0000 0x1000 0x81030c00 0x1000>;
101+
};
97102
};
98103
};

dts/bindings/pinctrl/renesas,rzt-pinctrl.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
description: |
5-
The Renesas RZ/T2L pin controller is a node responsible for controlling
5+
Renesas RZ/T pin controller
6+
7+
The Renesas RZ/T pin controller is a node responsible for controlling
68
pin function selection and pin properties, such as routing the TX and RX of UART0
79
to pin 5 and pin 6 of port 16.
810

include/zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzg-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@
101101

102102
#define RZG_FILTER_SET(filnum, filclksel) (((filnum) & 0x3) << 0x2) | (filclksel & 0x3)
103103

104-
#endif /*ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_RENESAS_PINCTRL_RZG_COMMON_H_*/
104+
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_RENESAS_PINCTRL_RZG_COMMON_H_ */

include/zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzt-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
*/
4343
#define RZT_PINMUX(port, pin, func) (port | pin | (func << 4))
4444

45-
#endif /*ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_RENESAS_PINCTRL_RZT_COMMON_H_*/
45+
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_RENESAS_PINCTRL_RZT_COMMON_H_ */

soc/renesas/rz/common/pinctrl_rzg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ typedef struct pinctrl_soc_pin_t {
101101
#ifdef __cplusplus
102102
}
103103
#endif
104-
#endif /*ZEPHYR_SOC_RENESAS_RZ_COMMON_PINCTRL_RZG_H_*/
104+
#endif /* ZEPHYR_SOC_RENESAS_RZ_COMMON_PINCTRL_RZG_H_ */

soc/renesas/rz/common/pinctrl_rzt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ typedef struct pinctrl_soc_pin_t {
6565
}
6666
#endif
6767

68-
#endif /*ZEPHYR_SOC_RENESAS_RZ_COMMON_PINCTRL_RZT_H_*/
68+
#endif /* ZEPHYR_SOC_RENESAS_RZ_COMMON_PINCTRL_RZT_H_ */

soc/renesas/rz/rzt2m/pinctrl_soc.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2023 Antmicro <www.antmicro.com>
3+
* Copyright (c) 2025 Renesas Electronics Corporation
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#ifndef ZEPHYR_SOC_RENESAS_RZ_RZT2M_PINCTRL_SOC_H_
9+
#define ZEPHYR_SOC_RENESAS_RZ_RZT2M_PINCTRL_SOC_H_
10+
11+
#include <pinctrl_rzt.h>
12+
13+
#endif /* ZEPHYR_SOC_RENESAS_RZ_RZT2M_PINCTRL_SOC_H_ */

0 commit comments

Comments
 (0)