Skip to contentSkip to conversation

Add support for GBETH IPs found on RZ/G3E SoCs

PATCH In review John Madieu 3 participants 12 messages Jul 2, 2025

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

v4 cover Add support for GBETH IPs found on RZ/G3E SoCs

Hi all,

This series adds support for the two Gigabit Ethernet (GBETH) interfaces on the Renesas RZ/G3E (R9A09G047) SoCs and their enablement on the SMARC-II EVK. This is achieved by integrating the necessary clock/reset signals prior to defining common DTS nodes, and enabling both GBETH ports at the board level.

Some of the patches from the initial series have already been queued. As the node enablement required OEN support, this fourth series includes two patches that add support for OEN on RZ/G3E SoCs.

Changes in v2:
- Appart from resending the patches and some collected tags, there is no changes in V2.
- Separated binding patch sent as standalone patch can be found here [4]

Changes in v3:
- Fixed consistency with clock names, replacing dashes with underscores
- Labeled mdio nodes and used phandle-based override instead of node redefinition
- Minor typo fixes

Changes in v4:
- Added two patches to add OEN support on G3E for a better description of the hardware
- Enforced consistency in clock patch to match v2h definitions

OEN pin configuration check logs:

```
root@smarc-rzg3e:/sys/kernel/debug/pinctrl/10410000.pinctrl-pinctrl-rzg2l# cat pinconf-pins | grep PB1  
pin 89 (PB1): input bias disabled, output drive push pull, output enabled, slew rate (0x0), output-impedance (1 x)
root@smarc-rzg3e:/sys/kernel/debug/pinctrl/10410000.pinctrl-pinctrl-rzg2l# cat pinconf-pins | grep PE1
pin 113 (PE1): input bias disabled, output drive push pull, output enabled, slew rate (0x0), output-impedance (1 x)
root@smarc-rzg3e:/sys/kernel/debug/pinctrl/10410000.pinctrl-pinctrl-rzg2l#
```

[1] - https://lore.kernel.org/all/[email protected]/
[2] - https://lore.kernel.org/all/[email protected]/
[3] - https://lore.kernel.org/all/[email protected]/
[4] - https://lore.kernel.org/all/[email protected]/

Regards,
John Madieu

John Madieu (2):
clk: renesas: r9a09g047: Add clock and reset signals for the GBETH IPs
arm64: dts: renesas: rzg3e-smarc-som: Enable eth{0-1} (GBETH)
interfaces

Lad Prabhakar (2):
pinctrl: renesas: rzg2l: Pass OEN pin names
pinctrl: renesas: rzg2l: Add PFC_OEN support for RZ/G3E SoC

 .../boot/dts/renesas/rzg3e-smarc-som.dtsi     | 111 ++++++++++++++++++
 drivers/clk/renesas/r9a09g047-cpg.c           |  64 ++++++++++
 drivers/pinctrl/renesas/pinctrl-rzg2l.c       |  63 ++++++++--
 3 files changed, 229 insertions(+), 9 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v4 1/4 clk: renesas: r9a09g047: Add clock and reset signals for the GBETH IPs

Add clock and reset entries for the Gigabit Ethernet Interfaces (GBETH 0-1) IPs found on the RZ/G3E SoC. This includes various PLLs, dividers, and mux clocks needed by these two GBETH IPs.

---

Changes:

v2:
No changes but resending without dt-bindings patch

v3:
Uses underscores instead of dashes in clock names

v4:
- Renames clock names to match V2Hs
- Uses DEF_MOD_MUX_EXTERNAL instead of DEF_MOD for Tx and Rx clks
- Drops Tested-by tag from Biju

 drivers/clk/renesas/r9a09g047-cpg.c | 64 +++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
drivers/clk/renesas/r9a09g047-cpg.c +64 -0
index 21699999cedd..c23cb434a218 100644
@@ -29,6 +29,7 @@ enum clk_ids {
 	CLK_PLLDTY,
 	CLK_PLLCA55,
 	CLK_PLLVDO,
+	CLK_PLLETH,
 
 	/* Internal Core Clocks */
 	CLK_PLLCM33_DIV3,
@@ -46,6 +47,15 @@ enum clk_ids {
 	CLK_PLLDTY_ACPU,
 	CLK_PLLDTY_ACPU_DIV2,
 	CLK_PLLDTY_ACPU_DIV4,
+	CLK_PLLDTY_DIV8,
+	CLK_PLLETH_DIV_250_FIX,
+	CLK_PLLETH_DIV_125_FIX,
+	CLK_CSDIV_PLLETH_GBE0,
+	CLK_CSDIV_PLLETH_GBE1,
+	CLK_SMUX2_GBE0_TXCLK,
+	CLK_SMUX2_GBE0_RXCLK,
+	CLK_SMUX2_GBE1_TXCLK,
+	CLK_SMUX2_GBE1_RXCLK,
 	CLK_PLLDTY_DIV16,
 	CLK_PLLVDO_CRU0,
 	CLK_PLLVDO_GPU,
@@ -85,7 +95,18 @@ static const struct clk_div_table dtable_2_64[] = {
 	{0, 0},
 };
 
+static const struct clk_div_table dtable_2_100[] = {
+	{0, 2},
+	{1, 10},
+	{2, 100},
+	{0, 0},
+};
+
 /* Mux clock tables */
+static const char * const smux2_gbe0_rxclk[] = { ".plleth_gbe0", "et0_rxclk" };
+static const char * const smux2_gbe0_txclk[] = { ".plleth_gbe0", "et0_rxclk" };
+static const char * const smux2_gbe1_rxclk[] = { ".plleth_gbe1", "et1_rxclk" };
+static const char * const smux2_gbe1_txclk[] = { ".plleth_gbe1", "et1_txclk" };
 static const char * const smux2_xspi_clk0[] = { ".pllcm33_div3", ".pllcm33_div4" };
 static const char * const smux2_xspi_clk1[] = { ".smux2_xspi_clk0", ".pllcm33_div5" };
 
@@ -100,6 +121,7 @@ static const struct cpg_core_clk r9a09g047_core_clks[] __initconst = {
 	DEF_FIXED(".pllcln", CLK_PLLCLN, CLK_QEXTAL, 200, 3),
 	DEF_FIXED(".plldty", CLK_PLLDTY, CLK_QEXTAL, 200, 3),
 	DEF_PLL(".pllca55", CLK_PLLCA55, CLK_QEXTAL, PLLCA55),
+	DEF_FIXED(".plleth", CLK_PLLETH, CLK_QEXTAL, 125, 3),
 	DEF_FIXED(".pllvdo", CLK_PLLVDO, CLK_QEXTAL, 105, 2),
 
 	/* Internal Core Clocks */
@@ -122,6 +144,18 @@ static const struct cpg_core_clk r9a09g047_core_clks[] __initconst = {
 	DEF_DDIV(".plldty_acpu", CLK_PLLDTY_ACPU, CLK_PLLDTY, CDDIV0_DIVCTL2, dtable_2_64),
 	DEF_FIXED(".plldty_acpu_div2", CLK_PLLDTY_ACPU_DIV2, CLK_PLLDTY_ACPU, 1, 2),
 	DEF_FIXED(".plldty_acpu_div4", CLK_PLLDTY_ACPU_DIV4, CLK_PLLDTY_ACPU, 1, 4),
+	DEF_FIXED(".plldty_div8", CLK_PLLDTY_DIV8, CLK_PLLDTY, 1, 8),
+
+	DEF_FIXED(".plleth_250_fix", CLK_PLLETH_DIV_250_FIX, CLK_PLLETH, 1, 4),
+	DEF_FIXED(".plleth_125_fix", CLK_PLLETH_DIV_125_FIX, CLK_PLLETH_DIV_250_FIX, 1, 2),
+	DEF_CSDIV(".plleth_gbe0", CLK_CSDIV_PLLETH_GBE0, CLK_PLLETH_DIV_250_FIX,
+		  CSDIV0_DIVCTL0, dtable_2_100),
+	DEF_CSDIV(".plleth_gbe1", CLK_CSDIV_PLLETH_GBE1, CLK_PLLETH_DIV_250_FIX,
+		  CSDIV0_DIVCTL1, dtable_2_100),
+	DEF_SMUX(".smux2_gbe0_txclk", CLK_SMUX2_GBE0_TXCLK, SSEL0_SELCTL2, smux2_gbe0_txclk),
+	DEF_SMUX(".smux2_gbe0_rxclk", CLK_SMUX2_GBE0_RXCLK, SSEL0_SELCTL3, smux2_gbe0_rxclk),
+	DEF_SMUX(".smux2_gbe1_txclk", CLK_SMUX2_GBE1_TXCLK, SSEL1_SELCTL0, smux2_gbe1_txclk),
+	DEF_SMUX(".smux2_gbe1_rxclk", CLK_SMUX2_GBE1_RXCLK, SSEL1_SELCTL1, smux2_gbe1_rxclk),
 	DEF_FIXED(".plldty_div16", CLK_PLLDTY_DIV16, CLK_PLLDTY, 1, 16),
 
 	DEF_DDIV(".pllvdo_cru0", CLK_PLLVDO_CRU0, CLK_PLLVDO, CDDIV3_DIVCTL3, dtable_2_4),
@@ -139,6 +173,10 @@ static const struct cpg_core_clk r9a09g047_core_clks[] __initconst = {
 		 CDDIV1_DIVCTL3, dtable_1_8),
 	DEF_FIXED("iotop_0_shclk", R9A09G047_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
 	DEF_FIXED("spi_clk_spi", R9A09G047_SPI_CLK_SPI, CLK_PLLCM33_XSPI, 1, 2),
+	DEF_FIXED("gbeth_0_clk_ptp_ref_i", R9A09G047_GBETH_0_CLK_PTP_REF_I,
+		  CLK_PLLETH_DIV_125_FIX, 1, 1),
+	DEF_FIXED("gbeth_1_clk_ptp_ref_i", R9A09G047_GBETH_1_CLK_PTP_REF_I,
+		  CLK_PLLETH_DIV_125_FIX, 1, 1),
 };
 
 static const struct rzv2h_mod_clk r9a09g047_mod_clks[] __initconst = {
@@ -214,6 +252,30 @@ static const struct rzv2h_mod_clk r9a09g047_mod_clks[] __initconst = {
 						BUS_MSTOP(8, BIT(4))),
 	DEF_MOD("sdhi_2_aclk",			CLK_PLLDTY_ACPU_DIV4, 10, 14, 5, 14,
 						BUS_MSTOP(8, BIT(4))),
+	DEF_MOD_MUX_EXTERNAL("gbeth_0_clk_tx_i", CLK_SMUX2_GBE0_TXCLK, 11, 8, 5, 24,
+						BUS_MSTOP(8, BIT(5)), 1),
+	DEF_MOD_MUX_EXTERNAL("gbeth_0_clk_rx_i", CLK_SMUX2_GBE0_RXCLK, 11, 9, 5, 25,
+						BUS_MSTOP(8, BIT(5)), 1),
+	DEF_MOD_MUX_EXTERNAL("gbeth_0_clk_tx_180_i", CLK_SMUX2_GBE0_TXCLK, 11, 10, 5, 26,
+						BUS_MSTOP(8, BIT(5)), 1),
+	DEF_MOD_MUX_EXTERNAL("gbeth_0_clk_rx_180_i", CLK_SMUX2_GBE0_RXCLK, 11, 11, 5, 27,
+						BUS_MSTOP(8, BIT(5)), 1),
+	DEF_MOD("gbeth_0_aclk_csr_i",		CLK_PLLDTY_DIV8, 11, 12, 5, 28,
+						BUS_MSTOP(8, BIT(5))),
+	DEF_MOD("gbeth_0_aclk_i",		CLK_PLLDTY_DIV8, 11, 13, 5, 29,
+						BUS_MSTOP(8, BIT(5))),
+	DEF_MOD_MUX_EXTERNAL("gbeth_1_clk_tx_i", CLK_SMUX2_GBE1_TXCLK, 11, 14, 5, 30,
+						BUS_MSTOP(8, BIT(6)), 1),
+	DEF_MOD_MUX_EXTERNAL("gbeth_1_clk_rx_i", CLK_SMUX2_GBE1_RXCLK, 11, 15, 5, 31,
+						BUS_MSTOP(8, BIT(6)), 1),
+	DEF_MOD_MUX_EXTERNAL("gbeth_1_clk_tx_180_i", CLK_SMUX2_GBE1_TXCLK, 12, 0, 6, 0,
+						BUS_MSTOP(8, BIT(6)), 1),
+	DEF_MOD_MUX_EXTERNAL("gbeth_1_clk_rx_180_i", CLK_SMUX2_GBE1_RXCLK, 12, 1, 6, 1,
+						BUS_MSTOP(8, BIT(6)), 1),
+	DEF_MOD("gbeth_1_aclk_csr_i",		CLK_PLLDTY_DIV8, 12, 2, 6, 2,
+						BUS_MSTOP(8, BIT(6))),
+	DEF_MOD("gbeth_1_aclk_i",		CLK_PLLDTY_DIV8, 12, 3, 6, 3,
+						BUS_MSTOP(8, BIT(6))),
 	DEF_MOD("cru_0_aclk",			CLK_PLLDTY_ACPU_DIV2, 13, 2, 6, 18,
 						BUS_MSTOP(9, BIT(4))),
 	DEF_MOD_NO_PM("cru_0_vclk",		CLK_PLLVDO_CRU0, 13, 3, 6, 19,
@@ -255,6 +317,8 @@ static const struct rzv2h_reset r9a09g047_resets[] __initconst = {
 	DEF_RST(10, 7, 4, 24),		/* SDHI_0_IXRST */
 	DEF_RST(10, 8, 4, 25),		/* SDHI_1_IXRST */
 	DEF_RST(10, 9, 4, 26),		/* SDHI_2_IXRST */
+	DEF_RST(11, 0, 5, 1),		/* GBETH_0_ARESETN_I */
+	DEF_RST(11, 1, 5, 2),		/* GBETH_1_ARESETN_I */
 	DEF_RST(12, 5, 5, 22),		/* CRU_0_PRESETN */
 	DEF_RST(12, 6, 5, 23),		/* CRU_0_ARESETN */
 	DEF_RST(12, 7, 5, 24),		/* CRU_0_S_RESETN */
Signature · 1 line
2.25.1
Reviewed-by on v4 1/4
#2 lore raw

Re: [PATCH v4 1/4] clk: renesas: r9a09g047: Add clock and reset signals for the GBETH IPs

Quoted 11 lines · John Madieu

Add clock and reset entries for the Gigabit Ethernet Interfaces (GBETH 0-1) IPs found on the RZ/G3E SoC. This includes various PLLs, dividers, and mux clocks needed by these two GBETH IPs.

v4:
- Renames clock names to match V2Hs
- Uses DEF_MOD_MUX_EXTERNAL instead of DEF_MOD for Tx and Rx clks
- Drops Tested-by tag from Biju

i.e. will queue in renesas-clk for v6.17.

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
#3 lore raw

PATCH v4 2/4 pinctrl: renesas: rzg2l: Pass OEN pin names

In reply to John Madieu

From: Lad Prabhakar <[email protected]>

Pass the OEN pin names via the SoC-specific hardware configuration structure to allow reuse of rzv2h_oen_read() and rzv2h_oen_write() on multiple SoCs.

On the RZ/V2H(P) and RZ/G3E SoCs, the PFC_OEN register is located at the same offset. However, the register controls different pins on each SoC. Hardcoding the pin names in the common logic prevents reusability.

Extend struct rzg2l_hwcfg to include an array of OEN pin names and its length. Use these values in rzv2h_pin_to_oen_bit() to determine the bit position dynamically based on the active SoC.

This enables shared handling of OEN register access while accounting for SoC-specific pin mappings.

---

Changes:

v4: new patch

 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +13 -5
index 78fa08ff0faa..792ca70bd9d1 100644
@@ -257,6 +257,8 @@ enum rzg2l_iolh_index {
  * @func_base: base number for port function (see register PFC)
  * @oen_max_pin: the maximum pin number supporting output enable
  * @oen_max_port: the maximum port number supporting output enable
+ * @oen_pin_names: array of pin names for output enable
+ * @oen_pin_names_len: length of the oen_pin_names array
  */
 struct rzg2l_hwcfg {
 	const struct rzg2l_register_offsets regs;
@@ -269,6 +271,8 @@ struct rzg2l_hwcfg {
 	u8 func_base;
 	u8 oen_max_pin;
 	u8 oen_max_port;
+	const char * const *oen_pin_names;
+	u8 oen_pin_names_len;
 };
 
 struct rzg2l_dedicated_configs {
@@ -1213,14 +1217,11 @@ static int rzv2h_bias_param_to_hw(enum pin_config_param param)
 
 static u8 rzv2h_pin_to_oen_bit(struct rzg2l_pinctrl *pctrl, unsigned int _pin)
 {
-	static const char * const pin_names[] = { "ET0_TXC_TXCLK", "ET1_TXC_TXCLK",
-						  "XSPI0_RESET0N", "XSPI0_CS0N",
-						  "XSPI0_CKN", "XSPI0_CKP" };
 	const struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[_pin];
 	unsigned int i;
 
-	for (i = 0; i < ARRAY_SIZE(pin_names); i++) {
-		if (!strcmp(pin_desc->name, pin_names[i]))
+	for (i = 0; i < pctrl->data->hwcfg->oen_pin_names_len; i++) {
+		if (!strcmp(pin_desc->name, pctrl->data->hwcfg->oen_pin_names[i]))
 			return i;
 	}
 
@@ -3277,11 +3278,18 @@ static const struct rzg2l_hwcfg rzg3s_hwcfg = {
 	.oen_max_port = 7, /* P7_1 is the maximum OEN port. */
 };
 
+static const char * const rzv2h_oen_pin_names[] = {
+	"ET0_TXC_TXCLK", "ET1_TXC_TXCLK", "XSPI0_RESET0N", "XSPI0_CS0N",
+	"XSPI0_CKN", "XSPI0_CKP"
+};
+
 static const struct rzg2l_hwcfg rzv2h_hwcfg = {
 	.regs = {
 		.pwpr = 0x3c04,
 	},
 	.tint_start_index = 17,
+	.oen_pin_names = rzv2h_oen_pin_names,
+	.oen_pin_names_len = ARRAY_SIZE(rzv2h_oen_pin_names),
 };
 
 static struct rzg2l_pinctrl_data r9a07g043_data = {
Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH v4 2/4] pinctrl: renesas: rzg2l: Pass OEN pin names

Hi John, Prabhakar,

Quoted 10 lines · John Madieu

From: Lad Prabhakar <[email protected]>

Pass the OEN pin names via the SoC-specific hardware configuration structure to allow reuse of rzv2h_oen_read() and rzv2h_oen_write() on multiple SoCs.

On the RZ/V2H(P) and RZ/G3E SoCs, the PFC_OEN register is located at the same offset. However, the register controls different pins on each SoC. Hardcoding the pin names in the common logic prevents reusability.

Quoted 8 lines

Extend struct rzg2l_hwcfg to include an array of OEN pin names and its length. Use these values in rzv2h_pin_to_oen_bit() to determine the bit position dynamically based on the active SoC.

This enables shared handling of OEN register access while accounting for SoC-specific pin mappings.

Thanks for your patch!

Quoted 12 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +2 -0
@@ -257,6 +257,8 @@ enum rzg2l_iolh_index {
  * @func_base: base number for port function (see register PFC)
  * @oen_max_pin: the maximum pin number supporting output enable
  * @oen_max_port: the maximum port number supporting output enable
+ * @oen_pin_names: array of pin names for output enable
+ * @oen_pin_names_len: length of the oen_pin_names array
  */
 struct rzg2l_hwcfg {
        const struct rzg2l_register_offsets regs;

drivers/pinctrl/renesas/pinctrl-rzg2l.c struct rzg2l_hwcfg { · line 275

Quoted 5 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +2 -0
@@ -269,6 +271,8 @@ struct rzg2l_hwcfg {
        u8 func_base;
        u8 oen_max_pin;
        u8 oen_max_port;
+       const char * const *oen_pin_names;
+       u8 oen_pin_names_len;

Please exchange the order of the members, so the u8 fits in the existing hole.

However, I think you better drop this patch, and use the existing rzg2l_pinctrl_data.oen_{read,write]() abstraction instead.

drivers/pinctrl/renesas/pinctrl-rzg2l.c struct rzg2l_hwcfg { · line 276

Quoted 1 line
drivers/pinctrl/renesas/pinctrl-rzg2l.c +0 -0
 };

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
#5 lore raw

Re: [PATCH v4 2/4] pinctrl: renesas: rzg2l: Pass OEN pin names

Hi Geert,

Thank you for the review.

Quoted 37 lines · Geert Uytterhoeven

Hi John, Prabhakar,

Quoted 10 lines · John Madieu

From: Lad Prabhakar <[email protected]>

Pass the OEN pin names via the SoC-specific hardware configuration structure to allow reuse of rzv2h_oen_read() and rzv2h_oen_write() on multiple SoCs.

On the RZ/V2H(P) and RZ/G3E SoCs, the PFC_OEN register is located at the same offset. However, the register controls different pins on each SoC. Hardcoding the pin names in the common logic prevents reusability.

Quoted 8 lines

Extend struct rzg2l_hwcfg to include an array of OEN pin names and its length. Use these values in rzv2h_pin_to_oen_bit() to determine the bit position dynamically based on the active SoC.

This enables shared handling of OEN register access while accounting for SoC-specific pin mappings.

Thanks for your patch!

Quoted 12 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +2 -0
@@ -257,6 +257,8 @@ enum rzg2l_iolh_index {
  * @func_base: base number for port function (see register PFC)
  * @oen_max_pin: the maximum pin number supporting output enable
  * @oen_max_port: the maximum port number supporting output enable
+ * @oen_pin_names: array of pin names for output enable
+ * @oen_pin_names_len: length of the oen_pin_names array
  */
 struct rzg2l_hwcfg {
        const struct rzg2l_register_offsets regs;
@@ -269,6 +271,8 @@ struct rzg2l_hwcfg {
Quoted 9 lines

drivers/pinctrl/renesas/pinctrl-rzg2l.c struct rzg2l_hwcfg { · line 275

Quoted 5 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +2 -0
        u8 func_base;
        u8 oen_max_pin;
        u8 oen_max_port;
+       const char * const *oen_pin_names;
+       u8 oen_pin_names_len;

Please exchange the order of the members, so the u8 fits in the existing hole.

OK.

Quoted 3 lines

However, I think you better drop this patch, and use the existing rzg2l_pinctrl_data.oen_{read,write]() abstraction instead.

Ok agreed, I will switch to that.

Cheers,
Prabhakar

#6 lore raw

PATCH v4 3/4 pinctrl: renesas: rzg2l: Add PFC_OEN support for RZ/G3E SoC

In reply to John Madieu

From: Lad Prabhakar <[email protected]>

Add support to configure the PFC_OEN register on the RZ/G3E SoC for specific pins that require direction control via output-enable.

On the RZ/G3E SoC, certain pins such as TXC_TXCLK must be switchable between input and output modes depending on the PHY interface mode (MII or RGMII). This behavior maps to the output-enable property in the device tree and requires configuring the PFC_OEN register.

Update the r9a09g047_variable_pin_cfg array to include PB1, PE1, PL0, PL1, PL2, and PL4 with PIN_CFG_OEN flags to indicate support for this feature. Define a new rzg3e_hwcfg structure with SoC-specific pin names used for OEN bit mapping.

---

Changes:

v4: new patch

 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 45 ++++++++++++++++++++++---
 1 file changed, 41 insertions(+), 4 deletions(-)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +41 -4
index 792ca70bd9d1..00847a743d1f 100644
@@ -398,6 +398,14 @@ static const u64 r9a09g047_variable_pin_cfg[] = {
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 5, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 6, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PA, 7, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 0, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_OEN),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 2, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 3, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 4, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 5, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 6, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PB, 7, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 0, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 1, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 2, RZV2H_MPXED_PIN_FUNCS),
@@ -406,6 +414,14 @@ static const u64 r9a09g047_variable_pin_cfg[] = {
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 5, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 6, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PD, 7, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 0, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_OEN),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 2, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 3, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 4, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 5, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 6, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PE, 7, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 0, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PG, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_IEN),
@@ -425,6 +441,14 @@ static const u64 r9a09g047_variable_pin_cfg[] = {
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 2, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 3, RZV2H_MPXED_PIN_FUNCS),
 	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PJ, 4, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 0, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_OEN),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 1, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_OEN),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 2, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_OEN),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 3, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 4, RZV2H_MPXED_PIN_FUNCS | PIN_CFG_OEN),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 5, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 6, RZV2H_MPXED_PIN_FUNCS),
+	RZG2L_VARIABLE_PIN_CFG_PACK(RZG3E_PL, 7, RZV2H_MPXED_PIN_FUNCS),
 };
 
 static const u64 r9a09g057_variable_pin_cfg[] = {
@@ -2052,17 +2076,17 @@ static const u64 r9a09g047_gpio_configs[] = {
 	RZG2L_GPIO_PORT_PACK(6, 0x28, RZV2H_MPXED_PIN_FUNCS),	/* P8 */
 	0x0,
 	RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x2a),			/* PA */
-	RZG2L_GPIO_PORT_PACK(8, 0x2b, RZV2H_MPXED_PIN_FUNCS),	/* PB */
+	RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x2b),			/* PB */
 	RZG2L_GPIO_PORT_PACK(3, 0x2c, RZV2H_MPXED_PIN_FUNCS),	/* PC */
 	RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x2d),			/* PD */
-	RZG2L_GPIO_PORT_PACK(8, 0x2e, RZV2H_MPXED_PIN_FUNCS),	/* PE */
+	RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x2e),			/* PE */
 	RZG2L_GPIO_PORT_PACK(3, 0x2f, RZV2H_MPXED_PIN_FUNCS),	/* 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, RZV2H_MPXED_PIN_FUNCS),	/* PK */
-	RZG2L_GPIO_PORT_PACK(8, 0x35, RZV2H_MPXED_PIN_FUNCS),	/* PL */
+	RZG2L_GPIO_PORT_PACK_VARIABLE(8, 0x35),			/* PL */
 	RZG2L_GPIO_PORT_PACK(8, 0x36, RZV2H_MPXED_PIN_FUNCS),	/* PM */
 	0x0,
 	0x0,
@@ -3283,6 +3307,19 @@ static const char * const rzv2h_oen_pin_names[] = {
 	"XSPI0_CKN", "XSPI0_CKP"
 };
 
+static const char * const rzg3e_oen_pin_names[] = {
+	"PB1", "PE1", "PL4", "PL1", "PL2", "PL0"
+};
+
+static const struct rzg2l_hwcfg rzg3e_hwcfg = {
+	.regs = {
+		.pwpr = 0x3c04,
+	},
+	.tint_start_index = 17,
+	.oen_pin_names = rzg3e_oen_pin_names,
+	.oen_pin_names_len = ARRAY_SIZE(rzg3e_oen_pin_names),
+};
+
 static const struct rzg2l_hwcfg rzv2h_hwcfg = {
 	.regs = {
 		.pwpr = 0x3c04,
@@ -3352,7 +3389,7 @@ static struct rzg2l_pinctrl_data r9a09g047_data = {
 	.dedicated_pins = rzg3e_dedicated_pins,
 	.n_port_pins = ARRAY_SIZE(r9a09g047_gpio_configs) * RZG2L_PINS_PER_PORT,
 	.n_dedicated_pins = ARRAY_SIZE(rzg3e_dedicated_pins),
-	.hwcfg = &rzv2h_hwcfg,
+	.hwcfg = &rzg3e_hwcfg,
 	.variable_pin_cfg = r9a09g047_variable_pin_cfg,
 	.n_variable_pin_cfg = ARRAY_SIZE(r9a09g047_variable_pin_cfg),
 	.num_custom_params = ARRAY_SIZE(renesas_rzv2h_custom_bindings),
Signature · 1 line
2.25.1
#7 lore raw

Re: [PATCH v4 3/4] pinctrl: renesas: rzg2l: Add PFC_OEN support for RZ/G3E SoC

Hi John, Prabhakar,

Quoted 10 lines · John Madieu

From: Lad Prabhakar <[email protected]>

Add support to configure the PFC_OEN register on the RZ/G3E SoC for specific pins that require direction control via output-enable.

On the RZ/G3E SoC, certain pins such as TXC_TXCLK must be switchable between input and output modes depending on the PHY interface mode (MII or RGMII). This behavior maps to the output-enable property in the device tree and requires configuring the PFC_OEN register.

Quoted 6 lines

Update the r9a09g047_variable_pin_cfg array to include PB1, PE1, PL0, PL1, PL2, and PL4 with PIN_CFG_OEN flags to indicate support for this feature. Define a new rzg3e_hwcfg structure with SoC-specific pin names used for OEN bit mapping.

Thanks for your patch!

Quoted 24 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +13 -0
@@ -3283,6 +3307,19 @@ static const char * const rzv2h_oen_pin_names[] = {
        "XSPI0_CKN", "XSPI0_CKP"
 };
 
+static const char * const rzg3e_oen_pin_names[] = {
+       "PB1", "PE1", "PL4", "PL1", "PL2", "PL0"
+};
+
+static const struct rzg2l_hwcfg rzg3e_hwcfg = {
+       .regs = {
+               .pwpr = 0x3c04,
+       },
+       .tint_start_index = 17,
+       .oen_pin_names = rzg3e_oen_pin_names,
+       .oen_pin_names_len = ARRAY_SIZE(rzg3e_oen_pin_names),
+};
+
 static const struct rzg2l_hwcfg rzv2h_hwcfg = {
        .regs = {
                .pwpr = 0x3c04,

drivers/pinctrl/renesas/pinctrl-rzg2l.c static struct rzg2l_pinctrl_data r9a09g047_data = { · line 3395

Quoted 8 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +1 -1
@@ -3352,7 +3389,7 @@ static struct rzg2l_pinctrl_data r9a09g047_data = {
        .dedicated_pins = rzg3e_dedicated_pins,
        .n_port_pins = ARRAY_SIZE(r9a09g047_gpio_configs) * RZG2L_PINS_PER_PORT,
        .n_dedicated_pins = ARRAY_SIZE(rzg3e_dedicated_pins),
-       .hwcfg = &rzv2h_hwcfg,
+       .hwcfg = &rzg3e_hwcfg,
        .variable_pin_cfg = r9a09g047_variable_pin_cfg,
        .n_variable_pin_cfg = ARRAY_SIZE(r9a09g047_variable_pin_cfg),
        .num_custom_params = ARRAY_SIZE(renesas_rzv2h_custom_bindings),

I would rather use the existing .oen_{read,write}() abstraction, and thus provide new rzg3e_oen_{read,write}() implementations:

    -    .oen_read = &rzv2h_oen_read,
    -    .oen_write = &rzv2h_oen_write,
    +    .oen_read = &rzg3e_oen_read,
    +    .oen_write = &rzg3e_oen_write,

Of course this requires refactoring the existing rzv2h_pin_to_oen_bit() and rzv2h_oen_{read,write}() functions to avoid duplication. Do you agree?

The actual pin parts LGTM.

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
#8 lore raw

Re: [PATCH v4 3/4] pinctrl: renesas: rzg2l: Add PFC_OEN support for RZ/G3E SoC

Hi Geert,

Thank you for the review.

Quoted 50 lines · Geert Uytterhoeven

Hi John, Prabhakar,

Quoted 10 lines · John Madieu

From: Lad Prabhakar <[email protected]>

Add support to configure the PFC_OEN register on the RZ/G3E SoC for specific pins that require direction control via output-enable.

On the RZ/G3E SoC, certain pins such as TXC_TXCLK must be switchable between input and output modes depending on the PHY interface mode (MII or RGMII). This behavior maps to the output-enable property in the device tree and requires configuring the PFC_OEN register.

Quoted 6 lines

Update the r9a09g047_variable_pin_cfg array to include PB1, PE1, PL0, PL1, PL2, and PL4 with PIN_CFG_OEN flags to indicate support for this feature. Define a new rzg3e_hwcfg structure with SoC-specific pin names used for OEN bit mapping.

Thanks for your patch!

Quoted 27 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +13 -0
@@ -3283,6 +3307,19 @@ static const char * const rzv2h_oen_pin_names[] = {
        "XSPI0_CKN", "XSPI0_CKP"
 };
 
+static const char * const rzg3e_oen_pin_names[] = {
+       "PB1", "PE1", "PL4", "PL1", "PL2", "PL0"
+};
+
+static const struct rzg2l_hwcfg rzg3e_hwcfg = {
+       .regs = {
+               .pwpr = 0x3c04,
+       },
+       .tint_start_index = 17,
+       .oen_pin_names = rzg3e_oen_pin_names,
+       .oen_pin_names_len = ARRAY_SIZE(rzg3e_oen_pin_names),
+};
+
 static const struct rzg2l_hwcfg rzv2h_hwcfg = {
        .regs = {
                .pwpr = 0x3c04,
@@ -3352,7 +3389,7 @@ static struct rzg2l_pinctrl_data r9a09g047_data = {
        .dedicated_pins = rzg3e_dedicated_pins,
        .n_port_pins = ARRAY_SIZE(r9a09g047_gpio_configs) * RZG2L_PINS_PER_PORT,
        .n_dedicated_pins = ARRAY_SIZE(rzg3e_dedicated_pins),
Quoted 9 lines

drivers/pinctrl/renesas/pinctrl-rzg2l.c static struct rzg2l_pinctrl_data r9a09g047_data = { · line 3395

Quoted 5 lines
drivers/pinctrl/renesas/pinctrl-rzg2l.c +1 -1
-       .hwcfg = &rzv2h_hwcfg,
+       .hwcfg = &rzg3e_hwcfg,
        .variable_pin_cfg = r9a09g047_variable_pin_cfg,
        .n_variable_pin_cfg = ARRAY_SIZE(r9a09g047_variable_pin_cfg),
        .num_custom_params = ARRAY_SIZE(renesas_rzv2h_custom_bindings),

I would rather use the existing .oen_{read,write}() abstraction, and thus provide new rzg3e_oen_{read,write}() implementations:

Ok.

Quoted 9 lines
    -    .oen_read = &rzv2h_oen_read,
    -    .oen_write = &rzv2h_oen_write,
    +    .oen_read = &rzg3e_oen_read,
    +    .oen_write = &rzg3e_oen_write,

Of course this requires refactoring the existing rzv2h_pin_to_oen_bit() and rzv2h_oen_{read,write}() functions to avoid duplication. Do you agree?

Agreed.

Cheers,
Prabhakar

#9 lore raw

PATCH v4 4/4 arm64: dts: renesas: rzg3e-smarc-som: Enable eth{0-1} (GBETH) interfaces

In reply to John Madieu

Enable the Gigabit Ethernet Interfaces (GBETH) populated on the RZ/G3E SMARC EVK

---

Changes:

v2:
No changes but resending without dt-bindings patch

v3:
Updates mdio separately, based on phandles instead of node redefinition

v4:
- Update pinmux to add OEN support
- Drops Tb and Rb tags initially collected

 .../boot/dts/renesas/rzg3e-smarc-som.dtsi     | 111 ++++++++++++++++++
 1 file changed, 111 insertions(+)
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +111 -0
index f99a09d04ddd..f930e98a7ea9 100644
@@ -26,6 +26,8 @@ / {
 	compatible = "renesas,rzg3e-smarcm", "renesas,r9a09g047e57", "renesas,r9a09g047";
 
 	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
 		i2c2 = &i2c2;
 		mmc0 = &sdhi0;
 		mmc2 = &sdhi2;
@@ -77,6 +79,24 @@ &audio_extal_clk {
 	clock-frequency = <48000000>;
 };
 
+&eth0 {
+	phy-handle = <&phy0>;
+	phy-mode = "rgmii-id";
+
+	pinctrl-0 = <&eth0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&eth1 {
+	phy-handle = <&phy1>;
+	phy-mode = "rgmii-id";
+
+	pinctrl-0 = <&eth1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &gpu {
 	status = "okay";
 	mali-supply = <&reg_vdd0p8v_others>;
@@ -102,7 +122,98 @@ raa215300: pmic@12 {
 	};
 };
 
+&mdio0 {
+	phy0: ethernet-phy@7 {
+		compatible = "ethernet-phy-id0022.1640",
+			     "ethernet-phy-ieee802.3-c22";
+		reg = <7>;
+		interrupts-extended = <&icu 3 IRQ_TYPE_LEVEL_LOW>;
+		rxc-skew-psec = <1400>;
+		txc-skew-psec = <1400>;
+		rxdv-skew-psec = <0>;
+		txdv-skew-psec = <0>;
+		rxd0-skew-psec = <0>;
+		rxd1-skew-psec = <0>;
+		rxd2-skew-psec = <0>;
+		rxd3-skew-psec = <0>;
+		txd0-skew-psec = <0>;
+		txd1-skew-psec = <0>;
+		txd2-skew-psec = <0>;
+		txd3-skew-psec = <0>;
+	};
+};
+
+&mdio1 {
+	phy1: ethernet-phy@7 {
+		compatible = "ethernet-phy-id0022.1640",
+			     "ethernet-phy-ieee802.3-c22";
+		reg = <7>;
+		interrupts-extended = <&icu 16 IRQ_TYPE_LEVEL_LOW>;
+		rxc-skew-psec = <1400>;
+		txc-skew-psec = <1400>;
+		rxdv-skew-psec = <0>;
+		txdv-skew-psec = <0>;
+		rxd0-skew-psec = <0>;
+		rxd1-skew-psec = <0>;
+		rxd2-skew-psec = <0>;
+		rxd3-skew-psec = <0>;
+		txd0-skew-psec = <0>;
+		txd1-skew-psec = <0>;
+		txd2-skew-psec = <0>;
+		txd3-skew-psec = <0>;
+	};
+};
+
 &pinctrl {
+	eth0_pins: eth0 {
+		clk0 {
+			pinmux = <RZG3E_PORT_PINMUX(B, 1, 1)>; /* TXC */
+			output-enable;
+		};
+
+		ctrl0 {
+			pinmux = <RZG3E_PORT_PINMUX(A, 1, 1)>, /* MDC */
+				 <RZG3E_PORT_PINMUX(A, 0, 1)>, /* MDIO */
+				 <RZG3E_PORT_PINMUX(C, 2, 15)>, /* PHY_INTR (IRQ2) */
+				 <RZG3E_PORT_PINMUX(C, 1, 1)>, /* RXD3 */
+				 <RZG3E_PORT_PINMUX(C, 0, 1)>, /* RXD2 */
+				 <RZG3E_PORT_PINMUX(B, 7, 1)>, /* RXD1 */
+				 <RZG3E_PORT_PINMUX(B, 6, 1)>, /* RXD0 */
+				 <RZG3E_PORT_PINMUX(B, 0, 1)>, /* RXC */
+				 <RZG3E_PORT_PINMUX(A, 2, 1)>, /* RX_CTL */
+				 <RZG3E_PORT_PINMUX(B, 5, 1)>, /* TXD3 */
+				 <RZG3E_PORT_PINMUX(B, 4, 1)>, /* TXD2 */
+				 <RZG3E_PORT_PINMUX(B, 3, 1)>, /* TXD1 */
+				 <RZG3E_PORT_PINMUX(B, 2, 1)>, /* TXD0 */
+				 <RZG3E_PORT_PINMUX(A, 3, 1)>; /* TX_CTL */
+		};
+	};
+
+	eth1_pins: eth1 {
+		clk1 {
+			pinmux = <RZG3E_PORT_PINMUX(E, 1, 1)>; /* TXC */
+			output-enable;
+		};
+
+		ctrl1 {
+
+			pinmux = <RZG3E_PORT_PINMUX(D, 1, 1)>, /* MDC */
+				 <RZG3E_PORT_PINMUX(D, 0, 1)>, /* MDIO */
+				 <RZG3E_PORT_PINMUX(F, 2, 15)>, /* PHY_INTR (IRQ15) */
+				 <RZG3E_PORT_PINMUX(F, 1, 1)>, /* RXD3 */
+				 <RZG3E_PORT_PINMUX(F, 0, 1)>, /* RXD2 */
+				 <RZG3E_PORT_PINMUX(E, 7, 1)>, /* RXD1 */
+				 <RZG3E_PORT_PINMUX(E, 6, 1)>, /* RXD0 */
+				 <RZG3E_PORT_PINMUX(E, 0, 1)>, /* RXC */
+				 <RZG3E_PORT_PINMUX(D, 2, 1)>, /* RX_CTL */
+				 <RZG3E_PORT_PINMUX(E, 5, 1)>, /* TXD3 */
+				 <RZG3E_PORT_PINMUX(E, 4, 1)>, /* TXD2 */
+				 <RZG3E_PORT_PINMUX(E, 3, 1)>, /* TXD1 */
+				 <RZG3E_PORT_PINMUX(E, 2, 1)>, /* TXD0 */
+				 <RZG3E_PORT_PINMUX(D, 3, 1)>; /* TX_CTL */
+		};
+	};
+
 	i2c2_pins: i2c {
 		pinmux = <RZG3E_PORT_PINMUX(3, 4, 1)>, /* SCL2 */
 			 <RZG3E_PORT_PINMUX(3, 5, 1)>; /* SDA2 */
Signature · 1 line
2.25.1
Reviewed-by on v4 4/4
#10 lore raw

Re: [PATCH v4 4/4] arm64: dts: renesas: rzg3e-smarc-som: Enable eth{0-1} (GBETH) interfaces

Hi John,

Quoted 7 lines · John Madieu

Enable the Gigabit Ethernet Interfaces (GBETH) populated on the RZ/G3E SMARC EVK

v4:
- Update pinmux to add OEN support
- Drops Tb and Rb tags initially collected

Thanks for the update!

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 169

Quoted 5 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +2 -0
 &pinctrl {
+       eth0_pins: eth0 {
+               clk0 {

No need for the 0 ...

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 174

Quoted 5 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +5 -0
+                       pinmux = <RZG3E_PORT_PINMUX(B, 1, 1)>; /* TXC */
+                       output-enable;
+               };
+
+               ctrl0 {

... suffixes...

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 193

Quoted 2 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +2 -0
+       eth1_pins: eth1 {
+               clk1 {

... or the 1...

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 198

Quoted 5 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +5 -0
+                       pinmux = <RZG3E_PORT_PINMUX(E, 1, 1)>; /* TXC */
+                       output-enable;
+               };
+
+               ctrl1 {

... suffixes.

i.e. will queue in renesas-devel for v6.17 with the above fixed.

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
#11 lore raw

RE: [PATCH v4 4/4] arm64: dts: renesas: rzg3e-smarc-som: Enable eth{0-1} (GBETH) interfaces

Hi Geert,

Thanks for your review.

Quoted 49 lines

-----Original Message-----
From: Geert Uytterhoeven <[email protected]>
Sent: Wednesday, July 2, 2025 11:03 AM
To: John Madieu <[email protected]>
Subject: Re: [PATCH v4 4/4] arm64: dts: renesas: rzg3e-smarc-som: Enable eth{0-1} (GBETH) interfaces

Hi John,

Quoted 8 lines · John Madieu

Enable the Gigabit Ethernet Interfaces (GBETH) populated on the RZ/G3E SMARC EVK

v4:
- Update pinmux to add OEN support
- Drops Tb and Rb tags initially collected

Thanks for the update!

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 169

Quoted 5 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +2 -0
 &pinctrl {
+       eth0_pins: eth0 {
+               clk0 {

No need for the 0 ...

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 174

Quoted 5 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +5 -0
+                       pinmux = <RZG3E_PORT_PINMUX(B, 1, 1)>; /* TXC */
+                       output-enable;
+               };
+
+               ctrl0 {

... suffixes...

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 193

Quoted 2 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +2 -0
+       eth1_pins: eth1 {
+               clk1 {

... or the 1...

arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi raa215300: pmic@12 { · line 198

Quoted 5 lines
arch/arm64/boot/dts/renesas/rzg3e-smarc-som.dtsi +5 -0
+                       pinmux = <RZG3E_PORT_PINMUX(E, 1, 1)>; /* TXC */
+                       output-enable;
+               };
+
+               ctrl1 {
Quoted 5 lines

... suffixes.

renesas-devel for v6.17 with the above fixed.

Thanks for taking care of that.

Quoted 5 lines

Gr{oetje,eeting}s,

Geert

Regards,
John

Quoted 8 lines

--
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