arm64: renesas: Add-R-Car S4-8 GPIO support
Subsystems (3)
Geert Uytterhoeven
maintainercover arm64: renesas: Add-R-Car S4-8 GPIO support
Hi all,
This patch series adds GPIO support for the Renesas R-Car S4-8 Soc. It is marked as an RFC because of 2 reasons:
1. GPIO register banks 4-7 are disabled, as they do not seem to be accessible as-is using either the Control Domain (0xffd9....) or Application Domain (0xdfd9....) addresses.
How to make the Control Domain release the bus guard, so the registers become accessible?
2. This has been boot-tested, without using any actual GPIOs.
For testing, this series and its dependencies can be found at[1].
Thanks for your comments!
Geert Uytterhoeven (3):
dt-bindings: gpio: renesas,rcar-gpio: Add r8a779f0 support
gpio: rcar: Add R-Car Gen4 support
arm64: dts: renesas: r8a779f0: Add GPIO nodes
.../bindings/gpio/renesas,rcar-gpio.yaml | 5 + arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 124 ++++++++++++++++++ drivers/gpio/gpio-rcar.c | 7 +- 3 files changed, 134 insertions(+), 2 deletions(-)
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsGeert Uytterhoeven
maintainerPATCH 1/3 dt-bindings: gpio: renesas,rcar-gpio: Add r8a779f0 support
Document support for the GPIO controller blocks in the Renesas R-Car S4-8 (R8A779F0) SoC, including a new family-specific compatible value for the R-Car Gen4 family.
--- .../devicetree/bindings/gpio/renesas,rcar-gpio.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml +5 -0
@@ -51,6 +51,11 @@ properties: - items: - const: renesas,gpio-r8a779a0 # R-Car V3U + - items: + - enum: + - renesas,gpio-r8a779f0 # R-Car S4-8 + - const: renesas,rcar-gen4-gpio # R-Car Gen4 + reg: maxItems: 1
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 2/3 gpio: rcar: Add R-Car Gen4 support
In reply to Geert UytterhoevenR-Car V3U (R8A779A0) was the first member of the R-Car Gen4 family. Generalize the support for R-Car V3U to other SoCs in the R-Car Gen4 family by adding a family-specific compatible value.
--- drivers/gpio/gpio-rcar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpio/gpio-rcar.c +5 -2
@@ -461,7 +461,7 @@ static const struct gpio_rcar_info gpio_rcar_info_gen3 = { .has_inen = false, }; -static const struct gpio_rcar_info gpio_rcar_info_v3u = { +static const struct gpio_rcar_info gpio_rcar_info_gen4 = { .has_outdtsel = true, .has_both_edge_trigger = true, .has_always_in = true,
@@ -471,7 +471,7 @@ static const struct gpio_rcar_info gpio_rcar_info_v3u = {static const struct of_device_id gpio_rcar_of_table[] = { { .compatible ="renesas,gpio-r8a779a0" , - .data = &gpio_rcar_info_v3u, + .data = &gpio_rcar_info_gen4, }, { .compatible ="renesas,rcar-gen1-gpio" , .data = &gpio_rcar_info_gen1,
@@ -481,6 +481,9 @@ static const struct of_device_id gpio_rcar_of_table[] = { }, { .compatible = "renesas,rcar-gen3-gpio", .data = &gpio_rcar_info_gen3, + }, { + .compatible = "renesas,rcar-gen4-gpio", + .data = &gpio_rcar_info_gen4, }, { .compatible = "renesas,gpio-rcar", .data = &gpio_rcar_info_gen1,
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 3/3 arm64: dts: renesas: r8a779f0: Add GPIO nodes
In reply to Geert UytterhoevenAdd device nodes for the General Purpose Input/Output (GPIO) blocks on the Renesas R-Car S4-8 (R8A779F0) SoC.
Disable gpio4-7, as they do not seem to be accessible as-is using either the Control Domain (0xffd9....) or Application Domain (0xdfd9....) addresses.
---
How to make the Control Domain release the bus guard, so the registers become accessible?
--- arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 124 ++++++++++++++++++++++ 1 file changed, 124 insertions(+)
arch/arm64/boot/dts/renesas/r8a779f0.dtsi +124 -0
@@ -77,6 +77,130 @@ pfc: pinctrl@e6050000 { <0 0xffd91000 0 0x16c>, <0 0xffd91800 0 0x16c>; }; + gpio0: gpio@e6050180 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xe6050180 0 0x54>; + interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 0 21>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio1: gpio@e6050980 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xe6050980 0 0x54>; + interrupts = <GIC_SPI 823 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 32 25>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio@e6051180 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xe6051180 0 0x54>; + interrupts = <GIC_SPI 824 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 64 17>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio@e6051980 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xe6051980 0 0x54>; + interrupts = <GIC_SPI 825 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 96 19>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio4: gpio@ffd90180 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xffd90180 0 0x54>; + interrupts = <GIC_SPI 826 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 128 31>; + interrupt-controller; + #interrupt-cells = <2>; + status = "disabled"; + }; + + gpio5: gpio@ffd90980 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xffd90980 0 0x54>; + interrupts = <GIC_SPI 827 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 160 20>; + interrupt-controller; + #interrupt-cells = <2>; + status = "disabled"; + }; + + gpio6: gpio@ffd91180 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xffd91180 0 0x54>; + interrupts = <GIC_SPI 828 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 192 32>; + interrupt-controller; + #interrupt-cells = <2>; + status = "disabled"; + }; + + gpio7: gpio@ffd91980 { + compatible = "renesas,gpio-r8a779f0", + "renesas,rcar-gen4-gpio"; + reg = <0 0xffd91980 0 0x54>; + interrupts = <GIC_SPI 829 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 915>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + resets = <&cpg 915>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pfc 0 224 32>; + interrupt-controller; + #interrupt-cells = <2>; + status = "disabled"; + }; + cpg: clock-controller@e6150000 { compatible = "renesas,r8a779f0-cpg-mssr"; reg = <0 0xe6150000 0 0x4000>;
Signature · 1 line
2.25.1