Add Renesas RZ/G3L PINCONTROL support
Subsystems (7)
cover Add Renesas RZ/G3L PINCONTROL support
From: Biju Das <[email protected]>
Hi All,
This patch series aims to add basic pincontrol support for RZ/G3L SoC. The RZ/G3L pinctrl has OTHER_POC register compared to other SoCs for setting IO domain volage for AWO, ISO and WDT.
Document the reset-names as all SOCs has multiple resets.
Document the bindings for RZ/G3L SOC and add pinctrl definitions in driver.
Add pincontrol device node and add pincontrol support for SCIF0 and GBETH nodes.
Note:
Some IPs needs to set the register IPCONT_SEL_CLONECH in SYSC to control the clone channel of the IP. Plan to add clone channel control support later. The IP's involing clone channel needs to do the setup as per the below flow
(1) Set SYS_IPCONT_SEL_CLONECH register as necessary
(2) Set the PWPR register to allow writing to the PFC_m register. After setting the PWPR.B0WI bit to “0” (initial value = 1), set the PWPR.PFCWE bit to “1” (initial value = 0). Select the required function from Functions 0-15. (Hereafter, Function1 setting example)
(3) Set PFC_m = 0001b and switch to Function1.
(4) Set the PMC_m register to “1” (initial value = 0).
(5) Set the PFC_m register to write-protected. After setting the PWPR.PFCWE bit to “0”, set the PWPR.B0WI bit to “1”.
The clock and dtsi/dts patches depend upon [1]
[1] https://lore.kernel.org/all/[email protected]/
Biju Das (9):
dt-bindings: pinctrl: renesas: Document reset-names
dt-bindings: pinctrl: renesas: Document RZ/G3L SoC
clk: renesas: r9a08g046: Add GPIO clocks/resets
pinctrl: renesas: rzg2l: Add support for selecting power source for
{WDT,AWO,ISO} pinctrl: renesas: rzg2l: Add OEN support for RZ/G3L
pinctrl: renesas: rzg2l: Add support for RZ/G3L SoC
arm64: dts: renesas: r9a08g046: Add pincontrol node
arm64: dts: renesas: r9a08g046l48-smarc: Add SCIF0 pincontrol
arm64: dts: renesas: rzg3l-smarc-som: Enable eth1 (GBETH1) interface
.../pinctrl/renesas,rzg2l-pinctrl.yaml | 16 + arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 10 + .../boot/dts/renesas/r9a08g046l48-smarc.dts | 13 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + .../boot/dts/renesas/rzg3l-smarc-som.dtsi | 92 ++++++ drivers/clk/renesas/r9a08g046-cpg.c | 6 + drivers/pinctrl/renesas/pinctrl-rzg2l.c | 285 +++++++++++++++++- .../pinctrl/renesas,r9a08g046-pinctrl.h | 39 +++ 14 files changed, 465 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/pinctrl/renesas,r9a08g046-pinctrl.h
Signature · 1 line
2.43.0
PATCH RESEND 1/9 dt-bindings: pinctrl: renesas: Document reset-names
From: Biju Das <[email protected]>
All SoCs has multiple resets. Document reset-names property.
--- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + 8 files changed, 22 insertions(+)
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +15 -0
@@ -78,6 +78,16 @@ properties: - description: PFC main reset - description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins + reset-names: + oneOf: + - items: + - const: rstn + - const: port + - const: spare + - items: + - const: main + - const: error + additionalProperties: anyOf: - type: object
@@ -152,10 +162,14 @@ allOf: properties: resets: maxItems: 2 + reset-names: + maxItems: 2 else: properties: resets: minItems: 3 + reset-names: + maxItems: 3 required: - compatible
@@ -187,6 +201,7 @@ examples: resets = <&cpg R9A07G044_GPIO_RSTN>, <&cpg R9A07G044_GPIO_PORT_RESETN>, <&cpg R9A07G044_GPIO_SPARE_RESETN>; + reset-names = "rstn", "port", "spare"; power-domains = <&cpg>; scif0_pins: serial0 {
arch/arm64/boot/dts/renesas/r9a07g043.dtsi +1 -0
@@ -604,6 +604,7 @@ pinctrl: pinctrl@11030000 { resets = <&cpg R9A07G043_GPIO_RSTN>, <&cpg R9A07G043_GPIO_PORT_RESETN>, <&cpg R9A07G043_GPIO_SPARE_RESETN>; + reset-names = "rstn", "port", "spare"; }; dmac: dma-controller@11820000 {
arch/arm64/boot/dts/renesas/r9a07g044.dtsi +1 -0
@@ -1017,6 +1017,7 @@ pinctrl: pinctrl@11030000 { resets = <&cpg R9A07G044_GPIO_RSTN>, <&cpg R9A07G044_GPIO_PORT_RESETN>, <&cpg R9A07G044_GPIO_SPARE_RESETN>; + reset-names = "rstn", "port", "spare"; }; irqc: interrupt-controller@110a0000 {
arch/arm64/boot/dts/renesas/r9a07g054.dtsi +1 -0
@@ -1025,6 +1025,7 @@ pinctrl: pinctrl@11030000 { resets = <&cpg R9A07G054_GPIO_RSTN>, <&cpg R9A07G054_GPIO_PORT_RESETN>, <&cpg R9A07G054_GPIO_SPARE_RESETN>; + reset-names = "rstn", "port", "spare"; }; irqc: interrupt-controller@110a0000 {
arch/arm64/boot/dts/renesas/r9a08g045.dtsi +1 -0
@@ -533,6 +533,7 @@ pinctrl: pinctrl@11030000 { resets = <&cpg R9A08G045_GPIO_RSTN>, <&cpg R9A08G045_GPIO_PORT_RESETN>, <&cpg R9A08G045_GPIO_SPARE_RESETN>; + reset-names = "rstn", "port", "spare"; }; irqc: interrupt-controller@11050000 {
arch/arm64/boot/dts/renesas/r9a09g047.dtsi +1 -0
@@ -265,6 +265,7 @@ pinctrl: pinctrl@10410000 { interrupt-parent = <&icu>; power-domains = <&cpg>; resets = <&cpg 0xa5>, <&cpg 0xa6>; + reset-names = "main", "error"; }; cpg: clock-controller@10420000 {
arch/arm64/boot/dts/renesas/r9a09g056.dtsi +1 -0
@@ -288,6 +288,7 @@ pinctrl: pinctrl@10410000 { gpio-ranges = <&pinctrl 0 0 96>; power-domains = <&cpg>; resets = <&cpg 0xa5>, <&cpg 0xa6>; + reset-names = "main", "error"; }; cpg: clock-controller@10420000 {
arch/arm64/boot/dts/renesas/r9a09g057.dtsi +1 -0
@@ -270,6 +270,7 @@ pinctrl: pinctrl@10410000 { interrupt-parent = <&icu>; power-domains = <&cpg>; resets = <&cpg 0xa5>, <&cpg 0xa6>; + reset-names = "main", "error"; }; cpg: clock-controller@10420000 {
Signature · 1 line
2.43.0
Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-names
Quoted 39 lines · Biju
From: Biju Das <[email protected]>
All SoCs has multiple resets. Document reset-names property.
Signed-off-by Biju Das <[email protected]>--- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + 8 files changed, 22 insertions(+)Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +10
-0@@ -78,6 +78,16 @@ properties: - description: PFC main reset - description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins + reset-names: + oneOf: + - items: + - const: rstn + - const: port + - const: spare + - items: + - const: main + - const: error + additionalProperties: anyOf: - type: object@@ -152,10 +162,14 @@ allOf: properties:
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml allOf: · line 172
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +4
-0resets: maxItems: 2 + reset-names: + maxItems: 2 else: properties: resets: minItems: 3 + reset-names: + maxItems: 3
This is minItems, no?
RE: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-names
Hi Conor,
Thanks for the feedback.
Quoted 50 lines
-----Original Message-----
From: Conor Dooley <[email protected]>
Sent: 29 January 2026 17:41
Subject: Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-namesQuoted 16 lines · Biju
From: Biju Das <[email protected]>
All SoCs has multiple resets. Document reset-names property.
Signed-off-by Biju Das <[email protected]>--- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + 8 files changed, 22 insertions(+)Review
Quoted 1 line
(quoted diff) +0
-0
b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yamlQuoted 26 lines
index
00c05243b9a4..fbbba53cde9b100644Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +12
-0@@ -78,6 +78,16 @@ properties: - description: PFC main reset - description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins + reset-names: + oneOf: + - items: + - const: rstn + - const: port + - const: spare + - items: + - const: main + - const: error + additionalProperties: anyOf: - type: object@@ -152,10 +162,14 @@ allOf: properties: resets: maxItems: 2 + reset-names: + maxItems: 2
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml allOf: · line 172
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +2
-0else: properties: resets: minItems: 3 + reset-names: + maxItems: 3This is minItems, no?
Oops, Will fix it in next version.
Cheers,
Biju
Conor Dooley
Acked-byRe: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-names
Quoted 63 lines · Biju Das
Hi Conor,
Thanks for the feedback.
Quoted 50 lines
-----Original Message-----
From: Conor Dooley <[email protected]>
Sent: 29 January 2026 17:41
Subject: Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-namesQuoted 16 lines · Biju
From: Biju Das <[email protected]>
All SoCs has multiple resets. Document reset-names property.
Signed-off-by Biju Das <[email protected]>--- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + 8 files changed, 22 insertions(+)Review
Quoted 1 line
(quoted diff) +0
-0
b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yamlQuoted 26 lines
index
00c05243b9a4..fbbba53cde9b100644Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +12
-0@@ -78,6 +78,16 @@ properties: - description: PFC main reset - description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins + reset-names: + oneOf: + - items: + - const: rstn + - const: port + - const: spare + - items: + - const: main + - const: error + additionalProperties: anyOf: - type: object@@ -152,10 +162,14 @@ allOf: properties: resets: maxItems: 2 + reset-names: + maxItems: 2Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml allOf: · line 172
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +2
-0else: properties: resets: minItems: 3 + reset-names: + maxItems: 3This is minItems, no?
Quoted 1 line
Oops, Will fix it in next version.
w/ minItems
Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-names
Quoted 64 lines · Conor Dooley
Quoted 63 lines · Biju Das
Hi Conor,
Thanks for the feedback.
Quoted 58 lines
-----Original Message-----
From: Conor Dooley <[email protected]>
Sent: 29 January 2026 17:41
Subject: Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-namesQuoted 16 lines · Biju
From: Biju Das <[email protected]>
All SoCs has multiple resets. Document reset-names property.
Signed-off-by Biju Das <[email protected]>--- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + 8 files changed, 22 insertions(+)Review
Quoted 1 line
(quoted diff) +0
-0
b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yamlQuoted 22 lines
index
00c05243b9a4..fbbba53cde9b100644Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +10
-0@@ -78,6 +78,16 @@ properties: - description: PFC main reset - description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins + reset-names: + oneOf: + - items: + - const: rstn + - const: port + - const: spare + - items: + - const: main + - const: error + additionalProperties: anyOf: - type: object@@ -152,10 +162,14 @@ allOf: properties:Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml allOf: · line 172
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +4
-0resets: maxItems: 2 + reset-names: + maxItems: 2 else: properties: resets: minItems: 3 + reset-names: + maxItems: 3This is minItems, no?
Quoted 4 lines
Quoted 1 line
Oops, Will fix it in next version.
w/ minItems
Acked-by Conor Dooley <[email protected]>
Actually, can you remove the dtsi changes from the binding patch? I forgot they were in here.
RE: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-names
Hi Conor,
Quoted 78 lines
-----Original Message-----
From: Conor Dooley <[email protected]>
Sent: 29 January 2026 17:47
Subject: Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas: Document reset-namesQuoted 72 lines · Conor Dooley
Quoted 71 lines · Biju Das
Hi Conor,
Thanks for the feedback.
Quoted 66 lines
-----Original Message-----
From: Conor Dooley <[email protected]>
Sent: 29 January 2026 17:41
Subject: Re: [PATCH RESEND 1/9] dt-bindings: pinctrl: renesas:
Document reset-namesQuoted 16 lines · Biju
From: Biju Das <[email protected]>
All SoCs has multiple resets. Document reset-names property.
Signed-off-by Biju Das <[email protected]>--- .../bindings/pinctrl/renesas,rzg2l-pinctrl.yaml | 15 +++++++++++++++ arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g047.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 1 + arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 1 + 8 files changed, 22 insertions(+)Quoted 3 lines
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctr
l.yamlb/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl. yaml
Quoted 26 lines
index
00c05243b9a4..fbbba53cde9b100644
---
a/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pi +++nctrl.yaml(quoted diff) +0
-0@@ -78,6 +78,16 @@ properties: - description: PFC main reset - description: Reset for the control register relatedto WDTUDFCA and WDTUDFFCM pins
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +10
-0+ reset-names: + oneOf: + - items: + - const: rstn + - const: port + - const: spare + - items: + - const: main + - const: error + additionalProperties: anyOf: - type: object@@ -152,10 +162,14 @@ allOf: properties:Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml allOf: · line 172
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +4
-0resets: maxItems: 2 + reset-names: + maxItems: 2 else: properties: resets: minItems: 3 + reset-names: + maxItems: 3This is minItems, no?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Oops, Will fix it in next version.
w/ minItems
Acked-by Conor Dooley <[email protected]>Actually, can you remove the dtsi changes from the binding patch? I forgot they were in here.
OK, I will make it separate in next version
Cheers,
Biju
PATCH RESEND 2/9 dt-bindings: pinctrl: renesas: Document RZ/G3L SoC
In reply to BijuFrom: Biju Das <[email protected]>
Add documentation for the pin controller found on the Renesas RZ/G3L (R9A08G046) SoC. The RZ/G3L PFC is similar to the RZ/G3S SoC but has more pins.
Also add header file similar to RZ/G3E and RZ/V2H as it has alpha numeric ports.
--- .../pinctrl/renesas,rzg2l-pinctrl.yaml | 1 + .../pinctrl/renesas,r9a08g046-pinctrl.h | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 include/dt-bindings/pinctrl/renesas,r9a08g046-pinctrl.h
Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml +1 -0
@@ -26,6 +26,7 @@ properties: - renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five - renesas,r9a07g044-pinctrl # RZ/G2{L,LC} - renesas,r9a08g045-pinctrl # RZ/G3S + - renesas,r9a08g046-pinctrl # RZ/G3L - renesas,r9a09g047-pinctrl # RZ/G3E - renesas,r9a09g056-pinctrl # RZ/V2N - renesas,r9a09g057-pinctrl # RZ/V2H(P)
include/dt-bindings/pinctrl/renesas,r9a08g046-pinctrl.h new file +39 -0
@@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* This header provides constants for Renesas RZ/G3L family pinctrl bindings. +* +* Copyright (C) 2026 Renesas Electronics Corp. +* +*/ + +#ifndef __DT_BINDINGS_PINCTRL_RENESAS_R9A08G046_PINCTRL_H__ +#define __DT_BINDINGS_PINCTRL_RENESAS_R9A08G046_PINCTRL_H__ + +#include <dt-bindings/pinctrl/rzg2l-pinctrl.h> + +/* RZG3L_Px = Offset address of PFC_P_mn - 0x22 */ +#define RZG3L_P2 2 +#define RZG3L_P3 3 +#define RZG3L_P4 4 +#define RZG3L_P5 5 +#define RZG3L_P6 6 +#define RZG3L_P7 7 +#define RZG3L_P8 8 +#define RZG3L_PA 10 +#define RZG3L_PB 11 +#define RZG3L_PC 12 +#define RZG3L_PD 13 +#define RZG3L_PE 14 +#define RZG3L_PF 15 +#define RZG3L_PG 16 +#define RZG3L_PH 17 +#define RZG3L_PJ 19 +#define RZG3L_PK 20 +#define RZG3L_PL 21 +#define RZG3L_PM 22 +#define RZG3L_PS 28 + +#define RZG3L_PORT_PINMUX (b, p, f) RZG2L_PORT_PINMUX(RZG3L_P##b, p, f) +#define RZG3L_GPIO (port, pin) RZG2L_GPIO(RZG3L_P##port, pin) + +#endif /* __DT_BINDINGS_PINCTRL_RENESAS_R9A08G046_PINCTRL_H__ */
Signature · 1 line
2.43.0
Re: [PATCH RESEND 2/9] dt-bindings: pinctrl: renesas: Document RZ/G3L SoC
pw-bot: not-applicable
PATCH RESEND 3/9 clk: renesas: r9a08g046: Add GPIO clocks/resets
In reply to BijuFrom: Biju Das <[email protected]>
Add GPIO clock and reset entries.
--- drivers/clk/renesas/r9a08g046-cpg.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/clk/renesas/r9a08g046-cpg.c +6 -0
@@ -174,6 +174,7 @@ static const struct cpg_core_clk r9a08g046_core_clks[] __initconst = {DEF_FIXED ("ETHRM1" ,R9A08G046_CLK_ETHRM1 ,CLK_ETH1_RM ,1 ,1 ),DEF_FIXED ("ETHTX12" ,R9A08G046_CLK_ETHTX12 ,CLK_SEL_ETH1_TX ,1 ,1 ),DEF_FIXED ("ETHRX12" ,R9A08G046_CLK_ETHRX12 ,CLK_SEL_ETH1_RX ,1 ,1 ), + DEF_FIXED("OSCCLK", R9A08G046_OSCCLK, CLK_EXTAL, 1, 1), }; static const struct rzg2l_mod_clk r9a08g046_mod_clks[] = {
@@ -221,6 +222,8 @@ static const struct rzg2l_mod_clk r9a08g046_mod_clks[] = { MSTOP(BUS_PERI_COM, BIT(3))),DEF_MOD ("scif0_clk_pck" ,R9A08G046_SCIF0_CLK_PCK ,R9A08G046_CLK_P0 ,0x584 ,0 ,MSTOP (BUS_MCPU2 ,BIT (1 ))), +DEF_MOD ("gpio_hclk" ,R9A08G046_GPIO_HCLK ,R9A08G046_OSCCLK ,0x598 ,0 , + MSTOP(BUS_PERI_CPU, BIT(6))), }; static const struct rzg2l_reset r9a08g046_resets[] = {
@@ -232,6 +235,9 @@ static const struct rzg2l_reset r9a08g046_resets[] = {DEF_RST (R9A08G046_ETH0_ARESET_N ,0x87c ,0 ),DEF_RST (R9A08G046_ETH1_ARESET_N ,0x87c ,1 ),DEF_RST (R9A08G046_SCIF0_RST_SYSTEM_N ,0x884 ,0 ), +DEF_RST (R9A08G046_GPIO_RSTN ,0x898 ,0 ), +DEF_RST (R9A08G046_GPIO_PORT_RESETN ,0x898 ,1 ), + DEF_RST(R9A08G046_GPIO_SPARE_RESETN, 0x898, 2), }; static const unsigned int r9a08g046_crit_mod_clks[] __initconst = {
Signature · 1 line
2.43.0
PATCH RESEND 4/9 pinctrl: renesas: rzg2l: Add support for selecting power source for {WDT,AWO,ISO}
In reply to BijuFrom: Biju Das <[email protected]>
The RZ/G3L SoC has support for setting power source that are not controlled by the following voltage control registers:
- SD_CH{0,1,2}_POC, XSPI_POC, ETH{0,1}_POC, I3C_SET.POC
Add support for selecting voltages using OTHER_POC register for setting I/O domain voltage for WDT, ISO and AWO.
--- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 40 +++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +37 -3
@@ -63,10 +63,18 @@#define PIN_CFG_SMT BIT(16)/* Schmitt-trigger input control */ #define PIN_CFG_ELC BIT(17)#define PIN_CFG_IOLH_RZV2H BIT(18) +#define PIN_CFG_PVDD1833_OTH_AWO_POC BIT(19)/* known on RZ/G3L only */ +#define PIN_CFG_PVDD1833_OTH_ISO_POC BIT(20)/* known on RZ/G3L only */ +#define PIN_CFG_WDTOVF_N_POC BIT(21)/* known on RZ/G3L only */ #define RZG2L_SINGLE_PIN BIT_ULL(63)/* Dedicated pin */ #define RZG2L_VARIABLE_CFG BIT_ULL(62)/* Variable cfg for port pins */ +#define PIN_CFG_OTHER_POC_MASK \ + (PIN_CFG_PVDD1833_OTH_AWO_POC | \ + PIN_CFG_PVDD1833_OTH_ISO_POC | \ + PIN_CFG_WDTOVF_N_POC) +#define RZG2L_MPXED_COMMON_PIN_FUNCS (group) \ (PIN_CFG_IOLH_##group | \ PIN_CFG_PUPD | \
@@ -146,6 +154,7 @@#define SD_CH (off, ch) ((off) + (ch) * 4)#define ETH_POC (off, ch) ((off) + (ch) * 4)#define QSPI (0x3008) +#define OTHER_POC (0x3028)/* known on RZ/G3L only */ #define PVDD_2500 2/* I/O domain voltage 2.5V */ #define PVDD_1800 1/* I/O domain voltage <= 1.8V */
@@ -906,6 +915,12 @@ static int rzg2l_caps_to_pwr_reg(const struct rzg2l_register_offsets *regs, u32return ETH_POC (regs->eth_poc,1 );if (caps &PIN_CFG_IO_VMC_QSPI )return QSPI ; +if (caps &PIN_CFG_PVDD1833_OTH_AWO_POC ) +return OTHER_POC ; +if (caps &PIN_CFG_PVDD1833_OTH_ISO_POC ) +return OTHER_POC ; +if (caps &PIN_CFG_WDTOVF_N_POC ) +return OTHER_POC ;return -EINVAL ; }
@@ -925,6 +940,13 @@ static int rzg2l_get_power_source(struct rzg2l_pinctrl *pctrl, u32 pin, u32 capsreturn pwr_reg; val =readb (pctrl->base + pwr_reg); +if (pwr_reg ==OTHER_POC ) { +u32 poc =FIELD_GET (PIN_CFG_OTHER_POC_MASK , caps); +u8 offs =ffs (poc) -1 ; + + val = (val >> offs) &0x1 ; + } +switch (val) {case PVDD_1800 :return 1800 ;
@@ -943,6 +965,7 @@ static int rzg2l_set_power_source(struct rzg2l_pinctrl *pctrl, u32 pin, u32 capsconst struct rzg2l_hwcfg *hwcfg = pctrl->data->hwcfg;const struct rzg2l_register_offsets *regs = &hwcfg->regs;int pwr_reg; +u8 poc_val;u8 val;if (caps &PIN_CFG_SOFT_PS ) {
@@ -952,15 +975,15 @@ static int rzg2l_set_power_source(struct rzg2l_pinctrl *pctrl, u32 pin, u32 capsswitch (ps) {case 1800 : - val =PVDD_1800 ; + poc_val =PVDD_1800 ;break ;case 2500 :if (!(caps & (PIN_CFG_IO_VMC_ETH0 |PIN_CFG_IO_VMC_ETH1 )))return -EINVAL ; - val =PVDD_2500 ; + poc_val =PVDD_2500 ;break ;case 3300 : - val =PVDD_3300 ; + poc_val =PVDD_3300 ;break ;default :return -EINVAL ;
@@ -970,6 +993,17 @@ static int rzg2l_set_power_source(struct rzg2l_pinctrl *pctrl, u32 pin, u32 capsif (pwr_reg <0 )return pwr_reg; +if (pwr_reg ==OTHER_POC ) { +u32 poc =FIELD_GET (PIN_CFG_OTHER_POC_MASK , caps); +u8 offs =ffs (poc) -1 ; + + val =readb (pctrl->base + pwr_reg); + val &= ~BIT (offs); + val |= (poc_val << offs); + }else { + val = poc_val; + } +writeb (val, pctrl->base + pwr_reg); pctrl->settings[pin].power_source = ps;
Signature · 1 line
2.43.0
PATCH RESEND 5/9 pinctrl: renesas: rzg2l: Add OEN support for RZ/G3L
In reply to BijuFrom: Biju Das <[email protected]>
Add support for configuring the ETH_MODE register on the RZ/G3L SoC to enable output-enable control for specific pins. On this SoC, certain pins such as P{B,E}1_ISO need to support switching between input and output modes depending on the PHY interface mode (e.g., RMII vs RGMII). This functionality maps to the 'output-enable' property in the device tree and requires explicit control via the ETH_MODE register.
--- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +17 -0
@@ -1198,6 +1198,23 @@ static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oereturn 0 ; } +static int rzg3l_pin_to_oen_bit (struct rzg2l_pinctrl *pctrl,unsigned int _pin) +{ +u64 *pin_data = pctrl->desc.pins[_pin].drv_data; +u8 port, pin; + +if (*pin_data &RZG2L_SINGLE_PIN ) +return -EINVAL ; + + pin =RZG2L_PIN_ID_TO_PIN (_pin); +if (pin != pctrl->data->hwcfg->oen_max_pin) +return -EINVAL ; + + port =RZG2L_PIN_ID_TO_PORT (_pin); + +return (port == pctrl->data->hwcfg->oen_max_port) ?1 :0 ; +} +static int rzg3s_pin_to_oen_bit (struct rzg2l_pinctrl *pctrl,unsigned int _pin) {u64 *pin_data = pctrl->desc.pins[_pin].drv_data;
Signature · 1 line
2.43.0
PATCH RESEND 6/9 pinctrl: renesas: rzg2l: Add support for RZ/G3L SoC
In reply to BijuFrom: Biju Das <[email protected]>
Add pinctrl driver support for RZ/G3L SoC.
--- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 228 ++++++++++++++++++++++++ 1 file changed, 228 insertions(+)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +228 -0
@@ -26,6 +26,7 @@#include <linux/pinctrl/pinctrl.h> #include <linux/pinctrl/pinmux.h> +#include <dt-bindings/pinctrl/renesas,r9a08g046-pinctrl.h> #include <dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h> #include <dt-bindings/pinctrl/renesas,r9a09g057-pinctrl.h> #include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
@@ -93,6 +94,17 @@#define RZG2L_MPXED_ETH_PIN_FUNCS (x) ((x) | PIN_CFG_NF) +#define RZG3L_MPXED_ETH_PIN_FUNCS (ether) \ + (PIN_CFG_IO_VMC_##ether | \ + PIN_CFG_IOLH_C | \ + PIN_CFG_NF) + +#define RZG3L_MPXED_PIN_FUNCS (group) (RZG2L_MPXED_COMMON_PIN_FUNCS(group) | \ + PIN_CFG_SOFT_PS) + +#define RZG3L_MPXED_PIN_FUNCS_POC (grp, poc) (RZG3L_MPXED_PIN_FUNCS(grp) | \ + PIN_CFG_PVDD1833_OTH_##poc##_POC) +#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(61, 54)#define PIN_CFG_PIN_REG_MASK GENMASK_ULL(53, 46)#define PIN_CFG_MASK GENMASK_ULL(31, 0)
@@ -229,12 +241,14 @@ static const struct pin_config_item renesas_rzv2h_conf_items[] = {* @sd_ch: SD_CH register offset * @eth_poc: ETH_POC register offset * @oen: OEN register offset +* @other_poc: OTHER_POC register offset */ struct rzg2l_register_offsets {u16 pwpr;u16 sd_ch;u16 eth_poc;u16 oen; +u16 other_poc; };/**
@@ -333,6 +347,7 @@ struct rzg2l_pinctrl_pin_settings {* @smt: SMT registers cache * @sd_ch: SD_CH registers cache * @eth_poc: ET_POC registers cache +* @other_poc: OTHER_POC register cache * @oen: Output Enable register cache * @qspi: QSPI registers cache */
@@ -348,6 +363,7 @@ struct rzg2l_pinctrl_reg_cache {u8 sd_ch[2 ];u8 eth_poc[2 ];u8 oen; +u8 other_poc;u8 qspi; };
@@ -397,6 +413,60 @@ static u64 rzg2l_pinctrl_get_variable_pin_cfg(struct rzg2l_pinctrl *pctrl,return 0 ; } +static const u64 r9a08g046_variable_pin_cfg[] = { +RZG2L_VARIABLE_PIN_CF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_PIN_FUNCS (ETH1 )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PE ,4 ,RZG3L_MPXED_ETH_PIN_FUNCS (ETH1 )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PE ,5 ,RZG3L_MPXED_ETH_PIN_FUNCS (ETH1 )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PE ,6 ,RZG3L_MPXED_ETH_PIN_FUNCS (ETH1 )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PE ,7 ,RZG3L_MPXED_ETH_PIN_FUNCS (ETH1 )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,0 ,RZG3L_MPXED_PIN_FUNCS (B )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,1 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,2 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,3 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,4 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,5 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,6 ,RZG3L_MPXED_PIN_FUNCS_POC (B ,ISO )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PG ,7 ,RZG3L_MPXED_PIN_FUNCS_POC (B ,ISO )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PH ,0 ,RZG3L_MPXED_PIN_FUNCS (B )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PH ,1 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PH ,2 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PH ,3 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PH ,4 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PH ,5 ,RZG3L_MPXED_PIN_FUNCS (B ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PJ ,0 ,RZG3L_MPXED_PIN_FUNCS (A ) |PIN_CFG_IEN ), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PJ ,1 ,RZG3L_MPXED_PIN_FUNCS (A )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PJ ,2 ,RZG3L_MPXED_PIN_FUNCS (A )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PJ ,3 ,RZG3L_MPXED_PIN_FUNCS (A )), +RZG2L_VARIABLE_PIN_CFG_PACK (RZG3L_PJ ,4 ,RZG3L_MPXED_PIN_FUNCS (A )), +}; +static const u64 r9a09g047_variable_pin_cfg[] = {RZG2L_VARIABLE_PIN_CFG_PACK (RZG3E_PA ,0 ,RZV2H_MPXED_PIN_FUNCS |PIN_CFG_IEN ),RZG2L_VARIABLE_PIN_CFG_PACK (RZG3E_PA ,1 ,RZV2H_MPXED_PIN_FUNCS ),
@@ -2141,6 +2211,70 @@ static const u64 r9a09g047_gpio_configs[] = { RZG2L_GPIO_PORT_PACK(4, 0x3c, RZV2H_MPXED_PIN_FUNCS), /* PS */ }; +static const char *const rzg3l_gpio_names[] = { +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"P20" 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"PM3" ,"PM4" ,"PM5" ,"PM6" ,"PM7" , +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" , +"PS0" ,"PS1" ,"PS2" ,"PS3" ,"PS4" ,"PS5" ,"PS6" ,"PS7" , +}; + +static const u64 r9a08g046_gpio_configs[] = { +0x0 , +0x0 , +RZG2L_GPIO_PORT_PACK (2 ,0x22 ,PIN_CFG_NF |PIN_CFG_IEN ),/* P2 */ +RZG2L_GPIO_PORT_PACK (7 ,0x23 ,RZG3L_MPXED_PIN_FUNCS_POC (A ,AWO )),/* P3 */ +0x0 , +RZG2L_GPIO_PORT_PACK (7 ,0x25 ,RZG3L_MPXED_PIN_FUNCS_POC (A ,AWO )),/* P5 */ +RZG2L_GPIO_PORT_PACK (7 ,0x26 ,RZG3L_MPXED_PIN_FUNCS_POC (A ,AWO )),/* P6 */ +RZG2L_GPIO_PORT_PACK (8 ,0x27 ,RZG3L_MPXED_PIN_FUNCS_POC (A ,AWO )),/* P7 */ +RZG2L_GPIO_PORT_PACK (6 ,0x28 ,RZG3L_MPXED_PIN_FUNCS_POC (A ,AWO )),/* P8 */ +0x0 , +RZG2L_GPIO_PORT_PACK_VARIABLE (8 ,0x2a ),/* PA */ +RZG2L_GPIO_PORT_PACK_VARIABLE (8 ,0x2b ),/* PB */ +RZG2L_GPIO_PORT_PACK (3 ,0x2c ,RZG3L_MPXED_ETH_PIN_FUNCS (ETH0 )),/* PC */ +RZG2L_GPIO_PORT_PACK_VARIABLE (8 ,0x2d ),/* PD */ +RZG2L_GPIO_PORT_PACK_VARIABLE (8 ,0x2e ),/* PE */ +RZG2L_GPIO_PORT_PACK (3 ,0x2f ,RZG3L_MPXED_ETH_PIN_FUNCS (ETH1 )),/* PF */ +RZG2L_GPIO_PORT_PACK_VARIABLE (8 ,0x30 ),/* PG */ +RZG2L_GPIO_PORT_PACK_VARIABLE (6 ,0x31 ),/* PH */ +0x0 , +RZG2L_GPIO_PORT_PACK_VARIABLE (5 ,0x33 ),/* PJ */ +RZG2L_GPIO_PORT_PACK (4 ,0x34 ,RZG3L_MPXED_PIN_FUNCS_POC (B ,AWO )),/* PK */ +RZG2L_GPIO_PORT_PACK (5 ,0x35 ,RZG3L_MPXED_PIN_FUNCS (C )),/* PL */ +RZG2L_GPIO_PORT_PACK (8 ,0x36 ,RZG3L_MPXED_PIN_FUNCS (C )),/* PM */ +0x0 , +0x0 , +0x0 , +0x0 , +0x0 , +RZG2L_GPIO_PORT_PACK (2 ,0x3c ,RZG3L_MPXED_PIN_FUNCS (A )),/* PS */ +}; +static const char *const rzv2h_gpio_names[] = {"P00" ,"P01" ,"P02" ,"P03" ,"P04" ,"P05" ,"P06" ,"P07" ,"P10" ,"P11" ,"P12" ,"P13" ,"P14" ,"P15" ,"P16" ,"P17" ,
@@ -2479,6 +2613,37 @@ static struct rzg2l_dedicated_configs rzg3e_dedicated_pins[] = { (PIN_CFG_IOLH_RZV2H | PIN_CFG_SR | PIN_CFG_IEN | PIN_CFG_PUPD)) }, }; +static const struct rzg2l_dedicated_configs rzg3l_dedicated_pins[] = { + {"WDTOVF_N" ,RZG2L_SINGLE_PIN_PACK (0x5 ,0 , + (PIN_CFG_IOLH_A |PIN_CFG_WDTOVF_N_POC )) }, + {"SCIF_RXD" ,RZG2L_SINGLE_PIN_PACK (0x6 ,0 , + (PIN_CFG_IOLH_A |PIN_CFG_PUPD |PIN_CFG_PVDD1833_OTH_AWO_POC )) }, + {"SCIF_TXD" ,RZG2L_SINGLE_PIN_PACK (0x6 ,1 , + (PIN_CFG_IOLH_A |PIN_CFG_PUPD |PIN_CFG_PVDD1833_OTH_AWO_POC )) }, + {"SD0_CLK" ,RZG2L_SINGLE_PIN_PACK (0x9 ,0 ,PIN_CFG_IOLH_B ) }, + {"SD0_CMD" ,RZG2L_SINGLE_PIN_PACK (0x9 ,1 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_RST#" ,RZG2L_SINGLE_PIN_PACK (0x9 ,2 ,PIN_CFG_IOLH_B ) }, + {"SD0_DS" ,RZG2L_SINGLE_PIN_PACK (0x9 ,5 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA0" ,RZG2L_SINGLE_PIN_PACK (0x0a ,0 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA1" ,RZG2L_SINGLE_PIN_PACK (0x0a ,1 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA2" ,RZG2L_SINGLE_PIN_PACK (0x0a ,2 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA3" ,RZG2L_SINGLE_PIN_PACK (0x0a ,3 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA4" ,RZG2L_SINGLE_PIN_PACK (0x0a ,4 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA5" ,RZG2L_SINGLE_PIN_PACK (0x0a ,5 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA6" ,RZG2L_SINGLE_PIN_PACK (0x0a ,6 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, + {"SD0_DATA7" ,RZG2L_SINGLE_PIN_PACK (0x0a ,7 , + (PIN_CFG_IOLH_B |PIN_CFG_IEN |PIN_CFG_PUPD )) }, +}; +static int rzg2l_gpio_get_gpioint (unsigned int virq,struct rzg2l_pinctrl *pctrl) {const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[virq];
@@ -3007,6 +3172,9 @@ static int rzg2l_pinctrl_probe(struct platform_device *pdev)BUILD_BUG_ON (ARRAY_SIZE (r9a08g045_gpio_configs) *RZG2L_PINS_PER_PORT >ARRAY_SIZE (rzg2l_gpio_names)); +BUILD_BUG_ON (ARRAY_SIZE (r9a08g046_gpio_configs) *RZG2L_PINS_PER_PORT > +ARRAY_SIZE (rzg3l_gpio_names)); +BUILD_BUG_ON (ARRAY_SIZE (r9a09g047_gpio_configs) *RZG2L_PINS_PER_PORT >ARRAY_SIZE (rzg3e_gpio_names));
@@ -3254,6 +3422,8 @@ static int rzg2l_pinctrl_suspend_noirq(struct device *dev) cache->qspi =readb (pctrl->base +QSPI ); cache->oen =readb (pctrl->base + pctrl->data->hwcfg->regs.oen); +if (regs->other_poc) + cache->other_poc =readb (pctrl->base + regs->other_poc);if (!atomic_read (&pctrl->wakeup_path))clk_disable_unprepare (pctrl->clk);
@@ -3279,6 +3449,8 @@ static int rzg2l_pinctrl_resume_noirq(struct device *dev) }writeb (cache->qspi, pctrl->base +QSPI ); +if (regs->other_poc) +writeb (cache->other_poc, pctrl->base + regs->other_poc);raw_spin_lock_irqsave (&pctrl->lock, flags);rzg2l_oen_write_with_pwpr (pctrl, cache->oen);
@@ -3380,6 +3552,41 @@ static const struct rzg2l_hwcfg rzg3s_hwcfg = { .oen_max_port = 7, /* P7_1 is the maximum OEN port. */ }; +static const struct rzg2l_hwcfg rzg3l_hwcfg = { + .regs = { + .pwpr =0x3000 , + .sd_ch =0x3004 , + .eth_poc =0x3010 , + .oen =0x3018 , + .other_poc =0x3028 , + }, + .iolh_groupa_ua = { +/* 1v8 power source */ + [RZG2L_IOLH_IDX_1V8 ] =2200 ,4400 ,9000 ,10000 , +/* 3v3 power source */ + [RZG2L_IOLH_IDX_3V3 ] =1900 ,4000 ,8000 ,9000 , + }, + .iolh_groupb_ua = { +/* 1v8 power source */ + [RZG2L_IOLH_IDX_1V8 ] =7000 ,8000 ,9000 ,10000 , +/* 3v3 power source */ + [RZG2L_IOLH_IDX_3V3 ] =4000 ,6000 ,8000 ,9000 , + }, + .iolh_groupc_ua = { +/* 1v8 power source */ + [RZG2L_IOLH_IDX_1V8 ] =5200 ,6000 ,6550 ,6800 , +/* 2v5 source */ + [RZG2L_IOLH_IDX_2V5 ] =4700 ,5300 ,5800 ,6100 , +/* 3v3 power source */ + [RZG2L_IOLH_IDX_3V3 ] =4500 ,5200 ,5700 ,6050 , + }, + .tint_start_index =17 , + .drive_strength_ua = true, + .func_base =0 , + .oen_max_pin =1 ,/* Pin 1 of PE1_ISO is the maximum OEN pin. */ + .oen_max_port =14 ,/* PE1_ISO is the maximum OEN port. */ +}; +static const struct rzg2l_hwcfg rzv2h_hwcfg = { .regs = { .pwpr =0x3c04 ,
@@ -3439,6 +3646,23 @@ static struct rzg2l_pinctrl_data r9a08g045_data = { .bias_param_to_hw = &rzg2l_bias_param_to_hw, }; +static struct rzg2l_pinctrl_data r9a08g046_data = { + .port_pins = rzg3l_gpio_names, + .port_pin_configs = r9a08g046_gpio_configs, + .n_ports =ARRAY_SIZE (r9a08g046_gpio_configs), + .variable_pin_cfg = r9a08g046_variable_pin_cfg, + .n_variable_pin_cfg =ARRAY_SIZE (r9a08g046_variable_pin_cfg), + .dedicated_pins = rzg3l_dedicated_pins, + .n_port_pins =ARRAY_SIZE (r9a08g046_gpio_configs) *RZG2L_PINS_PER_PORT , + .n_dedicated_pins =ARRAY_SIZE (rzg3l_dedicated_pins), + .hwcfg = &rzg3l_hwcfg, + .pwpr_pfc_lock_unlock = &rzg2l_pwpr_pfc_lock_unlock, + .pmc_writeb = &rzg2l_pmc_writeb, + .pin_to_oen_bit = &rzg3l_pin_to_oen_bit, + .hw_to_bias_param = &rzg2l_hw_to_bias_param, + .bias_param_to_hw = &rzg2l_bias_param_to_hw, +}; +static struct rzg2l_pinctrl_data r9a09g047_data = { .port_pins = rzg3e_gpio_names, .port_pin_configs = r9a09g047_gpio_configs,
@@ -3519,6 +3743,10 @@ static const struct of_device_id rzg2l_pinctrl_of_table[] = { .compatible = "renesas,r9a08g045-pinctrl", .data = &r9a08g045_data, }, + { + .compatible = "renesas,r9a08g046-pinctrl", + .data = &r9a08g046_data, + }, { .compatible = "renesas,r9a09g047-pinctrl", .data = &r9a09g047_data,
Signature · 1 line
2.43.0
PATCH RESEND 7/9 arm64: dts: renesas: r9a08g046: Add pincontrol node
In reply to BijuFrom: Biju Das <[email protected]>
Add pincontrol node to RZ/G3L ("R9A08G046") SoC DTSI.
--- arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/renesas/r9a08g046.dtsi +10 -0
@@ -181,9 +181,19 @@ sysc: system-controller@11020000 { }; pinctrl: pinctrl@11030000 { + compatible = "renesas,r9a08g046-pinctrl"; reg = <0 0x11030000 0 0x10000>; gpio-controller; #gpio-cells = <2>; + gpio-ranges = <&pinctrl 0 0 232>; + interrupt-controller; + #interrupt-cells = <2>; + clocks = <&cpg CPG_MOD R9A08G046_GPIO_HCLK>; + power-domains = <&cpg>; + resets = <&cpg R9A08G046_GPIO_RSTN>, + <&cpg R9A08G046_GPIO_PORT_RESETN>, + <&cpg R9A08G046_GPIO_SPARE_RESETN>; + reset-names = "rstn", "port", "spare"; }; dmac: dma-controller@11820000 {
Signature · 1 line
2.43.0
PATCH RESEND 8/9 arm64: dts: renesas: r9a08g046l48-smarc: Add SCIF0 pincontrol
In reply to BijuFrom: Biju Das <[email protected]>
Add device node for SCIF0 pincontrol.
--- arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts +12 -0
@@ -35,3 +35,15 @@ &keys { /delete-node/ key-2; /delete-node/ key-3; }; + +&pinctrl { + scif0_pins: scif0 { + pins = "SCIF_TXD", "SCIF_RXD"; + power-source = <1800>; + }; +}; + +&scif0 { + pinctrl-0 = <&scif0_pins>; + pinctrl-names = "default"; +};
Signature · 1 line
2.43.0
PATCH RESEND 9/9 arm64: dts: renesas: rzg3l-smarc-som: Enable eth1 (GBETH1) interface
In reply to BijuFrom: Biju Das <[email protected]>
Enable the Gigabit Ethernet Interface (GBETH1) populated on the RZ/G3L SMARC EVK. Also add pincontrol definitions for GBETH{0,1}.
--- .../boot/dts/renesas/r9a08g046l48-smarc.dts | 1 + .../boot/dts/renesas/rzg3l-smarc-som.dtsi | 92 +++++++++++++++++++ 2 files changed, 93 insertions(+)
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts +1 -0
@@ -14,6 +14,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> +#include <dt-bindings/pinctrl/renesas,r9a08g046-pinctrl.h> #include "r9a08g046l48.dtsi" #include "rzg3l-smarc-som.dtsi" #include "renesas-smarc2.dtsi"
arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi +92 -0
113 lines not on this page · raw message
Signature · 1 line
2.43.0