linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support
@ 2023-09-25  0:53 Kuninori Morimoto
  2023-09-25  0:53 ` [PATCH 1/2] " Kuninori Morimoto
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2023-09-25  0:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Michael Dege, Yusuke Goda, Tam Nguyen, Hai Pham,
	Yoshihiro Shimoda


Hi Geert

This patches adds Renesas R8A779F0 S4 Starter Kit support.
It needs Rswitch bug fix patch [1] which is posted to Ether ML today.
I hope it will be accepted for v6.6 Kernel.
renesas_defconfig needs missing PHY to enable Rswitch [PATCH 2/2].

[1] Link: https://lore.kernel.org/r/20230925003416.3863560-1-yoshihiro.shimoda.uh@renesas.com

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.

Kuninori Morimoto (2):
  arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support
  arm64: renesas: defconfig: add MARVELL 10G PHY

 arch/arm64/boot/dts/renesas/Makefile          |   1 +
 arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts | 257 ++++++++++++++++++
 arch/arm64/configs/renesas_defconfig          |   1 +
 3 files changed, 259 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support
  2023-09-25  0:53 [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Kuninori Morimoto
@ 2023-09-25  0:53 ` Kuninori Morimoto
  2023-09-25  0:53 ` [PATCH 2/2] arm64: renesas: defconfig: add MARVELL 10G PHY Kuninori Morimoto
  2023-09-25  7:53 ` [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Geert Uytterhoeven
  2 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2023-09-25  0:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Michael Dege, Yusuke Goda, Tam Nguyen, Hai Pham,
	Yoshihiro Shimoda

Add initial support for the Renesas R8A779F0 Starter Kit support.
Based on a patch in the BSP

Signed-off-by: Michael Dege <michael.dege@renesas.com>
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm64/boot/dts/renesas/Makefile          |   1 +
 arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts | 257 ++++++++++++++++++
 2 files changed, 258 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 7114cbbd8713..33e7f2a827e7 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -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) += r8a779f0-s4sk.dtb
 
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk.dtb
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtbo
diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts b/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts
new file mode 100644
index 000000000000..26fda7d4f6b3
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts
@@ -0,0 +1,257 @@
+// SPDX-License-Identifier: (GPL-2.0 or MIT)
+/*
+ * Device Tree Source for the S4 Starter Kit board
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include "r8a779f0.dtsi"
+
+/ {
+	model = "Renesas S4 Starter Kit board";
+	compatible = "renesas,s4sk", "renesas,r8a779f0";
+
+	aliases {
+		serial0	= &hscif0;
+		serial1	= &hscif1;
+		eth0	= &rswitch;
+	};
+
+	chosen {
+		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
+		stdout-path = "serial0:921600n8";
+	};
+
+	memory@48000000 {
+		device_type = "memory";
+		/* first 128MB is reserved for secure area. */
+		/* The last 512MB is reserved for CR. */
+		reg = <0x0 0x48000000 0x0 0x58000000>;
+	};
+
+	memory@480000000 {
+		device_type = "memory";
+		reg = <0x4 0x80000000 0x0 0x80000000>;
+	};
+
+	vc7_xin: vc7_xin {
+		compatible = "fixed-clock";
+		clock-frequency = <25000000>;
+		#clock-cells = <0>;
+	};
+
+	vcc_sdhi: regulator-vcc-sdhi {
+		compatible = "regulator-fixed";
+		regulator-name = "SDHI Vcc";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+};
+
+&eth_serdes {
+	status = "okay";
+};
+
+&extal_clk {
+	clock-frequency = <20000000>;
+};
+
+&extalr_clk {
+	clock-frequency = <32768>;
+};
+
+&i2c2 {
+	pinctrl-0 = <&i2c2_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+	clock-frequency = <400000>;
+};
+
+&i2c4 {
+	pinctrl-0 = <&i2c4_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+	clock-frequency = <400000>;
+};
+
+&i2c5 {
+	pinctrl-0 = <&i2c5_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+	clock-frequency = <400000>;
+
+	vc7@9 {
+		compatible = "renesas,rc21012a";
+		reg = <0x9>;
+		#clock-cells = <1>;
+		clocks = <&vc7_xin>;
+		clock-names = "xin";
+	};
+
+	eeprom@50 {
+		compatible = "st,m24c16", "atmel,24c16";
+		reg = <0x50>;
+		pagesize = <16>;
+	};
+};
+
+&mmc0 {
+	pinctrl-0 = <&sd_pins>;
+	pinctrl-1 = <&sd_pins>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&vcc_sdhi>;
+	vqmmc-supply = <&vcc_sdhi>;
+	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 {
+		groups = "i2c4";
+		function = "i2c4";
+	};
+
+	i2c5_pins: i2c5 {
+		groups = "i2c5";
+		function = "i2c5";
+	};
+
+	sd_pins: sd {
+		groups = "mmc_data4", "mmc_ctrl";
+		function = "mmc";
+		power-source = <3300>;
+	};
+
+	qspi0_pins: qspi0 {
+		groups = "qspi0_ctrl", "qspi0_data4";
+		function = "qspi0";
+	};
+
+	hscif0_pins: hscif0 {
+		groups = "hscif0_data", "hscif0_ctrl";
+		function = "hscif0";
+	};
+
+	hscif1_pins: hscif1 {
+		groups = "hscif1_data", "hscif1_ctrl";
+		function = "hscif1";
+	};
+
+	scif_clk_pins: scif_clk {
+		groups = "scif_clk";
+		function = "scif_clk";
+	};
+
+	tsn0_pins: tsn0 {
+		groups = "tsn0_mdio_b", "tsn0_link_b";
+		function = "tsn0";
+		drive-strength = <18>;
+		power-source = <3300>;
+	};
+
+	tsn1_pins: tsn1 {
+		groups = "tsn1_mdio_b", "tsn1_link_b";
+		function = "tsn1";
+		drive-strength = <18>;
+		power-source = <3300>;
+	};
+};
+
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
+&hscif0 {
+	pinctrl-0 = <&hscif0_pins>;
+	pinctrl-names = "default";
+
+	uart-has-rtscts;
+	status = "okay";
+};
+
+&hscif1 {
+	pinctrl-0 = <&hscif1_pins>;
+	pinctrl-names = "default";
+
+	uart-has-rtscts;
+	status = "okay";
+};
+
+&scif_clk {
+	clock-frequency = <24000000>;
+};
+
+&ufs {
+	status = "okay";
+};
+
+&ufs30_clk {
+	clock-frequency = <38400000>;
+};
+
+&rswitch {
+	pinctrl-0 = <&tsn0_pins>, <&tsn1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	ethernet-ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			phy-handle = <&u101>;
+			phy-mode = "sgmii";
+			phys = <&eth_serdes 0>;
+
+			mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				u101: ethernet-phy@1 {
+					reg = <1>;
+					compatible = "ethernet-phy-ieee802.3-c45";
+				};
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			phy-handle = <&u201>;
+			phy-mode = "sgmii";
+			phys = <&eth_serdes 1>;
+
+			mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				u201: ethernet-phy@2 {
+					reg = <2>;
+					compatible = "ethernet-phy-ieee802.3-c45";
+				};
+			};
+		};
+
+		port@2 {
+			status = "disabled";
+		};
+	};
+};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm64: renesas: defconfig: add MARVELL 10G PHY
  2023-09-25  0:53 [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Kuninori Morimoto
  2023-09-25  0:53 ` [PATCH 1/2] " Kuninori Morimoto
@ 2023-09-25  0:53 ` Kuninori Morimoto
  2023-09-25  0:58   ` Yoshihiro Shimoda
  2023-09-25  7:53 ` [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Geert Uytterhoeven
  2 siblings, 1 reply; 5+ messages in thread
From: Kuninori Morimoto @ 2023-09-25  0:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Michael Dege, Yusuke Goda, Tam Nguyen, Hai Pham,
	Yoshihiro Shimoda

MARVELL 10G PHY is needed for S4 StarterKit board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm64/configs/renesas_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/renesas_defconfig b/arch/arm64/configs/renesas_defconfig
index 78d5d35ae9a1..185ee0ebe0ed 100644
--- a/arch/arm64/configs/renesas_defconfig
+++ b/arch/arm64/configs/renesas_defconfig
@@ -138,6 +138,7 @@ CONFIG_VIRTIO_NET=y
 CONFIG_SH_ETH=y
 CONFIG_RAVB=y
 CONFIG_RENESAS_ETHER_SWITCH=y
+CONFIG_BCM54140_PHY=y
 CONFIG_MARVELL_10G_PHY=y
 CONFIG_MICREL_PHY=y
 CONFIG_REALTEK_PHY=y
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH 2/2] arm64: renesas: defconfig: add MARVELL 10G PHY
  2023-09-25  0:53 ` [PATCH 2/2] arm64: renesas: defconfig: add MARVELL 10G PHY Kuninori Morimoto
@ 2023-09-25  0:58   ` Yoshihiro Shimoda
  0 siblings, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2023-09-25  0:58 UTC (permalink / raw)
  To: Kuninori Morimoto, Geert Uytterhoeven
  Cc: Linux-Renesas, Michael Dege, Yusuke Goda, Tam Nguyen, Hai Pham

Hello Morimoto-san,

> From: Kuninori Morimoto, Sent: Monday, September 25, 2023 9:53 AM
> 
> MARVELL 10G PHY is needed for S4 StarterKit board.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  arch/arm64/configs/renesas_defconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/configs/renesas_defconfig b/arch/arm64/configs/renesas_defconfig
> index 78d5d35ae9a1..185ee0ebe0ed 100644
> --- a/arch/arm64/configs/renesas_defconfig
> +++ b/arch/arm64/configs/renesas_defconfig
> @@ -138,6 +138,7 @@ CONFIG_VIRTIO_NET=y
>  CONFIG_SH_ETH=y
>  CONFIG_RAVB=y
>  CONFIG_RENESAS_ETHER_SWITCH=y
> +CONFIG_BCM54140_PHY=y
>  CONFIG_MARVELL_10G_PHY=y

The MARVELL 10G PHY (CONFIG_MARVELL_10G_PHY) has already been enabled.
So, CONFIG_BCM54140_PHY is not needed.

Best regards,
Yoshihiro Shimoda

>  CONFIG_MICREL_PHY=y
>  CONFIG_REALTEK_PHY=y
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support
  2023-09-25  0:53 [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Kuninori Morimoto
  2023-09-25  0:53 ` [PATCH 1/2] " Kuninori Morimoto
  2023-09-25  0:53 ` [PATCH 2/2] arm64: renesas: defconfig: add MARVELL 10G PHY Kuninori Morimoto
@ 2023-09-25  7:53 ` Geert Uytterhoeven
  2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-09-25  7:53 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Linux-Renesas, Michael Dege, Yusuke Goda, Tam Nguyen, Hai Pham,
	Yoshihiro Shimoda

Hi Morimoto-san,

On Mon, Sep 25, 2023 at 2:53 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> This patches adds Renesas R8A779F0 S4 Starter Kit support.
> It needs Rswitch bug fix patch [1] which is posted to Ether ML today.
> I hope it will be accepted for v6.6 Kernel.

OK.

> [1] Link: https://lore.kernel.org/r/20230925003416.3863560-1-yoshihiro.shimoda.uh@renesas.com

It also depends on DT binding documentation updates, and even on a
new clock driver...

scripts/checkpatch.pl tells me:

     WARNING: DT compatible string "renesas,s4sk" appears
un-documented -- check ./Documentation/devicetree/bindings/
    #57: FILE: arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts:14:
    + compatible = "renesas,s4sk", "renesas,r8a779f0";

    WARNING: DT compatible string "renesas,rc21012a" appears
un-documented -- check ./Documentation/devicetree/bindings/
    #134: FILE: arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts:91:
    + compatible = "renesas,rc21012a";

    WARNING: DT compatible string "st,m24c16" appears un-documented --
check ./Documentation/devicetree/bindings/
    #142: FILE: arch/arm64/boot/dts/renesas/r8a779f0-s4sk.dts:99:
    + compatible = "st,m24c16", "atmel,24c16";

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-25  7:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25  0:53 [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Kuninori Morimoto
2023-09-25  0:53 ` [PATCH 1/2] " Kuninori Morimoto
2023-09-25  0:53 ` [PATCH 2/2] arm64: renesas: defconfig: add MARVELL 10G PHY Kuninori Morimoto
2023-09-25  0:58   ` Yoshihiro Shimoda
2023-09-25  7:53 ` [PATCH 0/2] arm64: dts: renesas: Add Renesas R8A779F0 S4 Starter Kit support Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).