arm64: dts: renesas: Add R-Car S4 Starter Kit support
v2 cover arm64: dts: renesas: Add R-Car S4 Starter Kit support
Hi Geert
This patch-set is v2 of R-Car S4 Starter Kit support. It needs Rswitch bug fix patch [1] which was posted to Ether ML. I hope it will be accepted for v6.6 Kernel.
[1] Link: https://lore.kernel.org/r/[email protected]
S4 Starter Kit is possible to setup details via config exe, but the DT will be more complex. This DT is assuming "default" settings to avoid confusion.
R-Car S4 Starter Kit is using new R8A779F4 SoC which is updated version of R8A779F0. This patch adds new r8a779f4.dtsi file but is using existing r8a779f0.dtsi internally.
v1 -> v2
- correct board name
- removed BSP specific device
- alphabetical order
- add missing compatibles
- add new r8a779f4.dtsi
Kuninori Morimoto (4):
dt-bindings: irqchip: renesas,irqc: Add r8a779f0 support
dt-bindings: soc: renesas: renesas.yaml: Add renesas,s4sk compatible
arm64: dts: renesas: Add Renesas R8A779F4 SoC support
arm64: dts: renesas: Add R-Car S4 Starter Kit support
.../interrupt-controller/renesas,irqc.yaml | 1 + .../bindings/soc/renesas/renesas.yaml | 1 + arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts | 243 ++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a779f4.dtsi | 12 + 5 files changed, 258 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts create mode 100644 arch/arm64/boot/dts/renesas/r8a779f4.dtsi
Signature · 1 line
2.25.1
PATCH v2 1/4 dt-bindings: irqchip: renesas,irqc: Add r8a779f0 support
Document support for the Interrupt Controller for External Devices (INT-EX) in the Renesas R-Car S4 (R8A779F0) SoC.
--- .../devicetree/bindings/interrupt-controller/renesas,irqc.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml +1 -0
@@ -37,6 +37,7 @@ properties: - renesas,intc-ex-r8a77990 # R-Car E3 - renesas,intc-ex-r8a77995 # R-Car D3 - renesas,intc-ex-r8a779a0 # R-Car V3U + - renesas,intc-ex-r8a779f0 # R-Car S4 - renesas,intc-ex-r8a779g0 # R-Car V4H - const: renesas,irqc
Signature · 1 line
2.25.1
Re: [PATCH v2 1/4] dt-bindings: irqchip: renesas,irqc: Add r8a779f0 support
Hi Morimoto-san,
Quoted 4 lines · Kuninori Morimoto
Document support for the Interrupt Controller for External Devices (INT-EX) in the Renesas R-Car S4 (R8A779F0) SoC.
Signed-off-by Kuninori Morimoto <[email protected]>
I posted a similar patch before: "[PATCH v2] dt-bindings: irqchip:
renesas,irqc: Add r8a779f0 support"
https://lore.kernel.org/r/9467a1c67d5d240211f88336973fa968d39cc860.1690446928.git.geert+renesas@glider.be
Marc: please take one or the other ;-)
Thanks!
Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml properties: · line 42
Quoted 9 lines
Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml +1
-0@@ -37,6 +37,7 @@ properties: - renesas,intc-ex-r8a77990 # R-Car E3 - renesas,intc-ex-r8a77995 # R-Car D3 - renesas,intc-ex-r8a779a0 # R-Car V3U + - renesas,intc-ex-r8a779f0 # R-Car S4 - renesas,intc-ex-r8a779g0 # R-Car V4H - const: renesas,irqc
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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 Torvalds
PATCH v2 2/4 dt-bindings: soc: renesas: renesas.yaml: Add renesas,s4sk compatible
In reply to Kuninori MorimotoThis patch adds "renesas,s4sk" which target the R-Car S4 Starter Kit board.
--- Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +1 -0
@@ -327,6 +327,7 @@ properties: items: - enum: - renesas,spider-cpu # Spider CPU board (RTP8A779F0ASKB0SC2S) + - renesas,s4sk # R-Car S4 Starter Kit board (Y-ASK-RCAR-S4-1000BASE-T#WS12) - const: renesas,r8a779f0 - items:
Signature · 1 line
2.25.1
Re: [PATCH v2 2/4] dt-bindings: soc: renesas: renesas.yaml: Add renesas,s4sk compatible
Hi Morimoto-san,
Quoted 2 lines · Kuninori Morimoto
This patch adds "renesas,s4sk" which target the R-Car S4 Starter Kit board.
Thanks for your patch!
Quoted 2 lines
Signed-off-by Yusuke Goda <[email protected]>Signed-off-by Kuninori Morimoto <[email protected]>
If this patch was developed by Goda-san, and you took it, and submitted it, there should be a "From: Yusuke Goda ..." line at the top. On the other hand, if you co-developed the patch with Goda-san, you can keep your From: line, being the first author, and there should be Co-developed-by tags, too:
https://elixir.bootlin.com/linux/v6.6-rc1/source/Documentation/process/submitting-patches.rst#L489
Documentation/devicetree/bindings/soc/renesas/renesas.yaml properties: · line 331
Quoted 8 lines
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +1
-0@@ -327,6 +327,7 @@ properties: items: - enum: - renesas,spider-cpu # Spider CPU board (RTP8A779F0ASKB0SC2S) + - renesas,s4sk # R-Car S4 Starter Kit board (Y-ASK-RCAR-S4-1000BASE-T#WS12) - const: renesas,r8a779f0
The above would be fine if the S4SK board would have had an R8A779F0 SoC. Instead, it has an R8A779F4 SoC. So please add a section for R8A779F4, and document the new "renesas,s4sk" and "renesas,r8a779f4" compatible values, and the fallback to "renesas,r8a779f0". You can have a look at the R-Car V3H2 section for an example.
Thanks!
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 Torvalds
Re: [PATCH v2 2/4] dt-bindings: soc: renesas: renesas.yaml: Add renesas,s4sk compatible
Hi Geert
Quoted 5 lines
If this patch was developed by Goda-san, and you took it, and submitted it, there should be a "From: Yusuke Goda ..." line at the top. On the other hand, if you co-developed the patch with Goda-san, you can keep your From: line, being the first author, and there should be Co-developed-by tags, too:
Not developed, Signed-off-by is enough in this case.
Quoted 5 lines
The above would be fine if the S4SK board would have had an R8A779F0 SoC. Instead, it has an R8A779F4 SoC. So please add a section for R8A779F4, and document the new "renesas,s4sk" and "renesas,r8a779f4" compatible values, and the fallback to "renesas,r8a779f0". You can have a look at the R-Car V3H2 section for an example.
Will check and fix in v3
Thank you for your help !!
Best regards
---
Kuninori Morimoto
PATCH v2 3/4 arm64: dts: renesas: Add Renesas R8A779F4 SoC support
In reply to Kuninori MorimotoR8A779F4 is update version of R8A779F0.
This patch adds its support, but is using r8a7799f0 dtsi internally.
--- arch/arm64/boot/dts/renesas/r8a779f4.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/r8a779f4.dtsi
arch/arm64/boot/dts/renesas/r8a779f4.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Device Tree Source for the R-Car S4-8 (R8A779F4) SoC + * + * Copyright (C) 2023 Renesas Electronics Corp. + */ + +#include "r8a779f0.dtsi" + +/ { + compatible = "renesas,r8a77f4", "renesas,r8a779f0"; +};
Signature · 1 line
2.25.1
Re: [PATCH v2 3/4] arm64: dts: renesas: Add Renesas R8A779F4 SoC support
Quoted 4 lines · Kuninori Morimoto
R8A779F4 is update version of R8A779F0.
This patch adds its support, but is using r8a7799f0 dtsi internally.Signed-off-by Kuninori Morimoto <[email protected]>
i.e. will queue in renesas-devel for v6.7.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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 Torvalds
Re: [PATCH v2 3/4] arm64: dts: renesas: Add Renesas R8A779F4 SoC support
Quoted 9 lines · Geert Uytterhoeven
Quoted 4 lines · Kuninori Morimoto
R8A779F4 is update version of R8A779F0.
This patch adds its support, but is using r8a7799f0 dtsi internally.Signed-off-by Kuninori Morimoto <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>i.e. will queue in renesas-devel for v6.7.
... with the silly typo s/r8a77f4/r8a779f4/ fixed, of course.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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 Torvalds
Re: [PATCH v2 3/4] arm64: dts: renesas: Add Renesas R8A779F4 SoC support
Hi Geert
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
R8A779F4 is update version of R8A779F0.
This patch adds its support, but is using r8a7799f0 dtsi internally.Signed-off-by Kuninori Morimoto <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>i.e. will queue in renesas-devel for v6.7.
... with the silly typo s/r8a77f4/r8a779f4/ fixed, of course.
Thanks, but will post v3 patch.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
PATCH v2 4/4 arm64: dts: renesas: Add R-Car S4 Starter Kit support
In reply to Kuninori MorimotoAdd initial support for the R-Car S4 Starter Kit support with R8A779F4 SoC. Based on a patch in the BSP.
--- arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts | 243 ++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
arch/arm64/boot/dts/renesas/Makefile +1 -0
@@ -61,6 +61,7 @@ dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb dtb-$(CONFIG_ARCH_R8A779A0) += r8a779a0-falcon.dtb dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f0-spider.dtb +dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f4-s4sk.dtb dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk.dtb dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtbo
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +243 -0
243 lines not on this page · raw message
Signature · 1 line
2.25.1
Hi Morimoto-san,
Quoted 2 lines · Kuninori Morimoto
Add initial support for the R-Car S4 Starter Kit support with R8A779F4 SoC. Based on a patch in the BSP.
Thanks for your patch!
Quoted 6 lines
Signed-off-by Michael Dege <[email protected]>Signed-off-by Yusuke Goda <[email protected]>Signed-off-by Tam Nguyen <[email protected]>Signed-off-by Hai Pham <[email protected]>Signed-off-by Yoshihiro Shimoda <[email protected]>Signed-off-by Kuninori Morimoto <[email protected]>
Just as with "[PATCH v2 2/4]", please consider the transfer chain, and add Co-developed-by when needed.
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 1
Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +1
-0@@ -0,0 +1,243 @@ +// SPDX-License-Identifier: (GPL-2.0 or MIT)
"OR", as per commit 05c618f39089d977 ("arm64: dts: use capital "OR" for multiple licenses in SPDX") in v6.6-rc2.
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 13
Quoted 12 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +12
-0+/* + * Device Tree Source for the R-Car S4 Starter Kit board + * + * Copyright (C) 2023 Renesas Electronics Corp. + */ + +/dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include "r8a779f4.dtsi" + +/ { + model = "R-Car S4 Starter Kit board";
Renesas R-Car ...
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 14
Quoted 1 line
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +1
-0+ compatible = "renesas,s4sk", "renesas,r8a779f4";
Missing "renesas,r8a779f0" fallback.
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 43
Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +5
-0+ vcc_sdhi: regulator-vcc-sdhi { + compatible = "regulator-fixed"; + regulator-name = "SDHI Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>;
It looks like this can switch between 1.8V and 3.3V using SDHI_PWR_SEL. But that is controlled through the FPGA, and according to the docs, only used for initialization. So I guess hardcoding 3.3V is OK.
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 59
Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +7
-0+ gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; +&extalr_clk { + clock-frequency = <32768>; +};
This clock (and scif_clk and ufs30_clk below) is generated by a programmable clock generator. Modelling it as a fixed-clock is fine for now. It can be replaced by an output of the clock generator later, when Linux has gained support for it.
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 101
Quoted 9 lines
+&i2c5 {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +8
-0+ pinctrl-0 = <&i2c5_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; + + eeprom@50 { + compatible = "atmel,24c16";
As the schematics say this is a genuine ST part:
"st,24c16", "atmel,24c16";
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 110
Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +9
-0+ reg = <0x50>; + pagesize = <16>; + }; +}; + +&mmc0 { + pinctrl-0 = <&sd_pins>; + pinctrl-1 = <&sd_pins>; + pinctrl-names = "default", "state_uhs";
Do you need two states if there is a single voltage? AFAIK, UHS needs 1.8V.
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 113
Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +3
-0+ + vmmc-supply = <&vcc_sdhi>; + vqmmc-supply = <&vcc_sdhi>;
Do you need vqmmc-supply if there is a single voltage? I'm not sure about this one...
Quoted 15 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +15
-0+ cd-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>; + bus-width = <4>; + status = "okay"; +}; + +&pfc { + pinctrl-0 = <&scif_clk_pins>; + pinctrl-names = "default"; + + i2c2_pins: i2c2 { + groups = "i2c2"; + function = "i2c2"; + }; + + i2c4_pins: i2c4 {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 138
Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +10
-0+ groups = "i2c4"; + function = "i2c4"; + }; + + i2c5_pins: i2c5 { + groups = "i2c5"; + function = "i2c5"; + }; + + sd_pins: sd {
Please sort alphabetically (everywhere).
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 147
Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +9
-0+ groups = "mmc_data4", "mmc_ctrl"; + function = "mmc"; + power-source = <3300>; + }; + + qspi0_pins: qspi0 { + groups = "qspi0_ctrl", "qspi0_data4"; + function = "qspi0"; + };
There is no reference to qspi0_pins.
Quoted 10 lines
+&rswitch {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +9
-0+ pinctrl-0 = <&tsn0_pins>, <&tsn1_pins>; + pinctrl-names = "default"; + status = "okay"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 198
Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +10
-0+ reg = <0>; + phy-handle = <&u101>; + phy-mode = "sgmii"; + phys = <ð_serdes 0>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + u101: ethernet-phy@1 {
This label seems to be copied from Spider?
On S4SK, the PHY is IC99, so perhaps "ic99"? Although I'm open for a different name like "gbe_phy0" or "sgmii_phy0"?
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
Quoted 2 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +2
-0+ reg = <1>; + compatible = "ethernet-phy-ieee802.3-c45";
Missing interrupt (GP3_10).
Quoted 5 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +5
-0+ }; + }; + }; + + port@1 {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 215
Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +10
-0+ reg = <1>; + phy-handle = <&u201>; + phy-mode = "sgmii"; + phys = <ð_serdes 1>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + u201: ethernet-phy@2 {
"ic102", or a better name...
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 217
Quoted 2 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +2
-0+ reg = <2>; + compatible = "ethernet-phy-ieee802.3-c45";
Missing interrupt (GP3_11).
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 226
Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +9
-0+ }; + }; + }; + + port@2 { + status = "disabled"; + }; + }; +};
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 Torvalds
Hi Geert
Quoted 9 lines
Quoted 6 lines
Signed-off-by Michael Dege <[email protected]>Signed-off-by Yusuke Goda <[email protected]>Signed-off-by Tam Nguyen <[email protected]>Signed-off-by Hai Pham <[email protected]>Signed-off-by Yoshihiro Shimoda <[email protected]>Signed-off-by Kuninori Morimoto <[email protected]>Just as with "[PATCH v2 2/4]", please consider the transfer chain, and add Co-developed-by when needed.
It is based on BSP, but not as-is.
It is following same style of your similar patch (Based on BSP). Co-developed with Shimoda-san. Will add it.
Quoted 4 lines
Quoted 1 line
+// SPDX-License-Identifier: (GPL-2.0 or MIT)
"OR", as per commit
05c618f39089d977("arm64: dts: use capital "OR" for multiple licenses in SPDX") in v6.6-rc2.
will fix in v3
Quoted 3 lines
Quoted 1 line
+ model = "R-Car S4 Starter Kit board";
Renesas R-Car ...
Offical S4 SK doesn't have "Renesas".
Quoted 12 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 101
Quoted 9 lines
+&i2c5 {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +8
-0+ pinctrl-0 = <&i2c5_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; + + eeprom@50 { + compatible = "atmel,24c16";As the schematics say this is a genuine ST part:
Quoted 1 line
"st,24c16", "atmel,24c16";
I have removed "st,24c16", but will add again in v3
Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 110
Quoted 4 lines
+&mmc0 {
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +3
-0+ pinctrl-0 = <&sd_pins>; + pinctrl-1 = <&sd_pins>; + pinctrl-names = "default", "state_uhs";Do you need two states if there is a single voltage? AFAIK, UHS needs 1.8V.
Quoted 6 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts line 113
Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts new file +3
-0+ + vmmc-supply = <&vcc_sdhi>; + vqmmc-supply = <&vcc_sdhi>;Do you need vqmmc-supply if there is a single voltage? I'm not sure about this one...
Shimoda-san has double-checked.
It can use UHS, but this FPGA can't handle 1.8v.
v3 will remove UHS / vqmmc.
Quoted 1 line
Quoted 1 line
+&pfc {
(snip)
Quoted 1 line
Please sort alphabetically (everywhere).
will do
Quoted 4 lines
This label seems to be copied from Spider?
On S4SK, the PHY is IC99, so perhaps "ic99"? Although I'm open for a different name like "gbe_phy0" or "sgmii_phy0"?
(snip)
Quoted 1 line
Missing interrupt (
GP3_10).
will fix in v3
Thank you for your help !!
Best regards
---
Kuninori Morimoto