2023-02-07 14:53:07

by Clément Léger

[permalink] [raw]
Subject: [PATCH 0/2] ARM: dts: add device-tree and bindings for renesas,rzn1d400-eb

This short series adds support for the RZ/N1 Expansion Board. This board
is a carrier board on which a daughter board (either RZ/N1D or RZ/N1S)
can be plugged. The device-tree that is added by this series enables the
use to the 2 external switch ports that are present on this board.

Clément Léger (2):
dt-bindings: soc: renesas: renesas.yaml: add renesas,rzn1d400-eb
compatible
ARM: dts: r9a06g032: add EB board device-tree

.../bindings/soc/renesas/renesas.yaml | 6 ++
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts | 92 +++++++++++++++++++
3 files changed, 99 insertions(+)
create mode 100644 arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts

--
2.39.0



2023-02-07 14:53:11

by Clément Léger

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: soc: renesas: renesas.yaml: add renesas,rzn1d400-eb compatible

Add "renesas,rzn1d400-eb" which target the RZ/N1 EB board when a RZ/N1D-DB
daughter board is plugged on it.

Signed-off-by: Clément Léger <[email protected]>
---
Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/renesas/renesas.yaml b/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
index 2789022b52eb..c31b10e5f44e 100644
--- a/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
+++ b/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
@@ -431,6 +431,12 @@ properties:
- renesas,rzn1d400-db # RZN1D-DB (RZ/N1D Demo Board for the RZ/N1D 400 pins package)
- const: renesas,r9a06g032

+ - description: RZ/N1{D,S} EB
+ items:
+ - enum:
+ - renesas,rzn1d400-eb # RZN1D-EB (Expansion Board when using a RZN1D-DB)
+ - const: renesas,r9a06g032
+
- description: RZ/Five and RZ/G2UL (R9A07G043)
items:
- enum:
--
2.39.0


2023-02-07 14:53:13

by Clément Léger

[permalink] [raw]
Subject: [PATCH 2/2] ARM: dts: r9a06g032: add EB board device-tree

The EB board (Expansion board) supports both RZ/N1D and RZ-N1S. Since this
configuration targets only the RZ/N1D, it is named r9a06g032-rzn1d400-eb.
It adds support for the 2 additional switch ports (port C and D) that are
available on that board.

Signed-off-by: Clément Léger <[email protected]>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts | 92 +++++++++++++++++++++
2 files changed, 93 insertions(+)
create mode 100644 arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d08a3c450ce7..8938db01e939 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1123,6 +1123,7 @@ dtb-$(CONFIG_ARCH_RENESAS) += \
r8a7794-alt.dtb \
r8a7794-silk.dtb \
r9a06g032-rzn1d400-db.dtb \
+ r9a06g032-rzn1d400-eb.dtb \
sh73a0-kzm9g.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rv1108-elgin-r1.dtb \
diff --git a/arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts b/arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts
new file mode 100644
index 000000000000..e986b6d2fd6f
--- /dev/null
+++ b/arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the RZN1D-EB Board
+ *
+ * Copyright (C) 2023 Schneider-Electric
+ *
+ */
+
+#include "r9a06g032-rzn1d400-db.dts"
+
+/ {
+ model = "RZN1D-EB Board";
+ compatible = "renesas,rzn1d400-eb", "renesas,r9a06g032";
+};
+
+&mii_conv2 {
+ renesas,miic-input = <MIIC_SWITCH_PORTD>;
+ status = "okay";
+};
+
+&mii_conv3 {
+ renesas,miic-input = <MIIC_SWITCH_PORTC>;
+ status = "okay";
+};
+
+&pinctrl{
+ pins_eth1: pins_eth1 {
+ pinmux = <RZN1_PINMUX(12, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(13, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(14, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(15, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(16, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(17, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(18, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(19, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(20, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(21, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(22, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(23, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>;
+ drive-strength = <6>;
+ bias-disable;
+ };
+
+ pins_eth2: pins_eth2 {
+ pinmux = <RZN1_PINMUX(24, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(25, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(26, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(27, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(28, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(29, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(30, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(31, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(32, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(33, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(34, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>,
+ <RZN1_PINMUX(35, RZN1_FUNC_CLK_ETH_MII_RGMII_RMII)>;
+ drive-strength = <6>;
+ bias-disable;
+ };
+};
+
+&switch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pins_eth1>, <&pins_eth2>, <&pins_eth3>, <&pins_eth4>, <&pins_mdio1>;
+
+ mdio {
+ /* CN15 and CN16 switches must be configured in MDIO2 mode */
+ switch0phy1: ethernet-phy@1 {
+ reg = <1>;
+ marvell,reg-init = <3 16 0 0x1010>;
+ };
+
+ switch0phy10: ethernet-phy@10 {
+ reg = <10>;
+ marvell,reg-init = <3 16 0 0x1010>;
+ };
+ };
+};
+
+&switch_port2 {
+ label = "lan2";
+ phy-mode = "rgmii-id";
+ phy-handle = <&switch0phy10>;
+ status = "okay";
+};
+
+&switch_port3 {
+ label = "lan3";
+ phy-mode = "rgmii-id";
+ phy-handle = <&switch0phy1>;
+ status = "okay";
+};
--
2.39.0


2023-02-08 23:45:49

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: soc: renesas: renesas.yaml: add renesas,rzn1d400-eb compatible


On Tue, 07 Feb 2023 15:54:43 +0100, Cl?ment L?ger wrote:
> Add "renesas,rzn1d400-eb" which target the RZ/N1 EB board when a RZ/N1D-DB
> daughter board is plugged on it.
>
> Signed-off-by: Cl?ment L?ger <[email protected]>
> ---
> Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>

Acked-by: Rob Herring <[email protected]>


2023-02-09 08:48:28

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: soc: renesas: renesas.yaml: add renesas,rzn1d400-eb compatible

Hi Clément,

On Tue, Feb 7, 2023 at 3:52 PM Clément Léger <[email protected]> wrote:
> Add "renesas,rzn1d400-eb" which target the RZ/N1 EB board when a RZ/N1D-DB
> daughter board is plugged on it.
>
> Signed-off-by: Clément Léger <[email protected]>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
> @@ -431,6 +431,12 @@ properties:
> - renesas,rzn1d400-db # RZN1D-DB (RZ/N1D Demo Board for the RZ/N1D 400 pins package)
> - const: renesas,r9a06g032
>
> + - description: RZ/N1{D,S} EB
> + items:
> + - enum:
> + - renesas,rzn1d400-eb # RZN1D-EB (Expansion Board when using a RZN1D-DB)
> + - const: renesas,r9a06g032

Don't you want to have "renesas,rzn1d400-db", too, in between the two
other values?

> +
> - description: RZ/Five and RZ/G2UL (R9A07G043)
> items:
> - enum:

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

2023-02-09 08:56:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: dts: r9a06g032: add EB board device-tree

On 07/02/2023 15:54, Clément Léger wrote:
> The EB board (Expansion board) supports both RZ/N1D and RZ-N1S. Since this
> configuration targets only the RZ/N1D, it is named r9a06g032-rzn1d400-eb.
> It adds support for the 2 additional switch ports (port C and D) that are
> available on that board.
>
> Signed-off-by: Clément Léger <[email protected]>
> ---
> arch/arm/boot/dts/Makefile | 1 +
> arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts | 92 +++++++++++++++++++++
> 2 files changed, 93 insertions(+)
> create mode 100644 arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index d08a3c450ce7..8938db01e939 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1123,6 +1123,7 @@ dtb-$(CONFIG_ARCH_RENESAS) += \
> r8a7794-alt.dtb \
> r8a7794-silk.dtb \
> r9a06g032-rzn1d400-db.dtb \
> + r9a06g032-rzn1d400-eb.dtb \
> sh73a0-kzm9g.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += \
> rv1108-elgin-r1.dtb \
> diff --git a/arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts b/arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts
> new file mode 100644
> index 000000000000..e986b6d2fd6f
> --- /dev/null
> +++ b/arch/arm/boot/dts/r9a06g032-rzn1d400-eb.dts
> @@ -0,0 +1,92 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Device Tree Source for the RZN1D-EB Board
> + *
> + * Copyright (C) 2023 Schneider-Electric
> + *
> + */
> +
> +#include "r9a06g032-rzn1d400-db.dts"
> +
> +/ {
> + model = "RZN1D-EB Board";
> + compatible = "renesas,rzn1d400-eb", "renesas,r9a06g032";
> +};
> +
> +&mii_conv2 {
> + renesas,miic-input = <MIIC_SWITCH_PORTD>;
> + status = "okay";
> +};
> +
> +&mii_conv3 {
> + renesas,miic-input = <MIIC_SWITCH_PORTC>;
> + status = "okay";
> +};
> +
> +&pinctrl{
> + pins_eth1: pins_eth1 {

No underscores in node names, unless you override existing node with
such underscore.

Best regards,
Krzysztof


2023-02-09 13:13:57

by Clément Léger

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: soc: renesas: renesas.yaml: add renesas,rzn1d400-eb compatible

Le Thu, 9 Feb 2023 09:48:09 +0100,
Geert Uytterhoeven <[email protected]> a écrit :

> Hi Clément,
>
> On Tue, Feb 7, 2023 at 3:52 PM Clément Léger <[email protected]> wrote:
> > Add "renesas,rzn1d400-eb" which target the RZ/N1 EB board when a RZ/N1D-DB
> > daughter board is plugged on it.
> >
> > Signed-off-by: Clément Léger <[email protected]>
>
> Thanks for your patch!
>
> > --- a/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
> > +++ b/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
> > @@ -431,6 +431,12 @@ properties:
> > - renesas,rzn1d400-db # RZN1D-DB (RZ/N1D Demo Board for the RZ/N1D 400 pins package)
> > - const: renesas,r9a06g032
> >
> > + - description: RZ/N1{D,S} EB
> > + items:
> > + - enum:
> > + - renesas,rzn1d400-eb # RZN1D-EB (Expansion Board when using a RZN1D-DB)
> > + - const: renesas,r9a06g032
>
> Don't you want to have "renesas,rzn1d400-db", too, in between the two
> other values?

Do you mean like that ?

- enum:
- renesas,rzn1d400-eb # RZN1D-EB (Expansion Board when using a
RZN1D-DB)
- const: renesas,rzn1d400-db
- const: renesas,r9a06g032

And thus using compatible = "renesas,rzn1d400-eb",
"renesas,rzn1d400-db", "renesas,r9a06g032" in the EB dt I guess.

Thanks,

>
> > +
> > - description: RZ/Five and RZ/G2UL (R9A07G043)
> > items:
> > - enum:
>
> 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



--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

2023-02-09 13:16:15

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: soc: renesas: renesas.yaml: add renesas,rzn1d400-eb compatible

Hi Clément,

On Thu, Feb 9, 2023 at 2:13 PM Clément Léger <[email protected]> wrote:
> Le Thu, 9 Feb 2023 09:48:09 +0100,
> Geert Uytterhoeven <[email protected]> a écrit :
> > On Tue, Feb 7, 2023 at 3:52 PM Clément Léger <[email protected]> wrote:
> > > Add "renesas,rzn1d400-eb" which target the RZ/N1 EB board when a RZ/N1D-DB
> > > daughter board is plugged on it.
> > >
> > > Signed-off-by: Clément Léger <[email protected]>
> >
> > Thanks for your patch!
> >
> > > --- a/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
> > > +++ b/Documentation/devicetree/bindings/soc/renesas/renesas.yaml
> > > @@ -431,6 +431,12 @@ properties:
> > > - renesas,rzn1d400-db # RZN1D-DB (RZ/N1D Demo Board for the RZ/N1D 400 pins package)
> > > - const: renesas,r9a06g032
> > >
> > > + - description: RZ/N1{D,S} EB
> > > + items:
> > > + - enum:
> > > + - renesas,rzn1d400-eb # RZN1D-EB (Expansion Board when using a RZN1D-DB)
> > > + - const: renesas,r9a06g032
> >
> > Don't you want to have "renesas,rzn1d400-db", too, in between the two
> > other values?
>
> Do you mean like that ?
>
> - enum:
> - renesas,rzn1d400-eb # RZN1D-EB (Expansion Board when using a
> RZN1D-DB)
> - const: renesas,rzn1d400-db
> - const: renesas,r9a06g032
>
> And thus using compatible = "renesas,rzn1d400-eb",
> "renesas,rzn1d400-db", "renesas,r9a06g032" in the EB dt I guess.

Exactly!

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