Skip to contentSkip to conversation

net: stmmac: add renesas,rzn1-gmac support

PATCH In review Clément Léger 4 participants 12 messages Feb 9, 2023 – Feb 21, 2023

Subsystems (8)
lore
Share & tools
lore

Clément Léger

author maintainer
#0 lore raw

v3 cover net: stmmac: add renesas,rzn1-gmac support

The rzn1-gmac instance is connected to a PCS (MIIC). In order to use this pcs, add support in the sttmac driver to set a generic phylink pcs device instead of the xpcs only. Moreover, it adds support to provide a phylink pcs device from the stmmac platform data and use it with the driver. It also adds the bindings and the new rzn1-gmac driver that retrieve this pcs from the device-tree.

---
V3:
- Sort out the bindings compatible

V2:
- Remove patch that moves phylink_start() earlier in init
- Add miic_early_qsetup() which allows initializing some miic port earlier to provide a RX clock to stmmac IP
- Call miic_early_setup() in rzn1 stmmac driver
- Fix bindings

Clément Léger (6):
net: pcs: rzn1-miic: add pcs_early_setup() function
net: stmmac: add support to use a generic phylink_pcs as PCS
net: stmmac: add support to provide pcs from platform data
dt-bindings: net: renesas,rzn1-gmac: Document RZ/N1 GMAC support
net: stmmac: add support for RZ/N1 GMAC
ARM: dts: r9a06g032: describe GMAC1

 .../bindings/net/renesas,rzn1-gmac.yaml       |  67 ++++++++++
 arch/arm/boot/dts/r9a06g032.dtsi              |  18 +++
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  11 ++
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 drivers/net/ethernet/stmicro/stmmac/common.h  |   2 +
 .../net/ethernet/stmicro/stmmac/dwmac-rzn1.c  | 120 ++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |   8 +-
 .../net/ethernet/stmicro/stmmac/stmmac_mdio.c |   1 +
 drivers/net/pcs/pcs-rzn1-miic.c               |  12 ++
 include/linux/pcs-rzn1-miic.h                 |   3 +
 include/linux/stmmac.h                        |   1 +
 11 files changed, 240 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c
Signature · 1 line
2.39.0
author maintainer
#1 lore raw

PATCH v3 1/6 net: pcs: rzn1-miic: add pcs_early_setup() function

When using this PCS with the stmmac IP, if the pcs is not configured and enabled before setting up stmmac hardware, driver setup will fail due to the lack of input RGMII RX clock. Add pcs_early_setup() function which allows to configure the MIIC converter based on the "phy-mode" that is described in the device-tree.

---
 drivers/net/pcs/pcs-rzn1-miic.c | 12 ++++++++++++
 include/linux/pcs-rzn1-miic.h   |  3 +++
 2 files changed, 15 insertions(+)
drivers/net/pcs/pcs-rzn1-miic.c +12 -0
index c1424119e821..e2eaf789c4d2 100644
@@ -288,6 +288,18 @@ static const struct phylink_pcs_ops miic_phylink_ops = {
 	.pcs_link_up = miic_link_up,
 };
 
+int miic_early_setup(struct phylink_pcs *pcs, struct device *dev)
+{
+	int interface;
+
+	interface = device_get_phy_mode(dev);
+	if (interface < 0)
+		return interface;
+
+	return miic_config(pcs, 0, interface, NULL, false);
+}
+EXPORT_SYMBOL(miic_early_setup);
+
 struct phylink_pcs *miic_create(struct device *dev, struct device_node *np)
 {
 	struct platform_device *pdev;
include/linux/pcs-rzn1-miic.h +3 -0
index 56d12b21365d..84d7130b4b78 100644
@@ -9,8 +9,11 @@
 #define __LINUX_PCS_MIIC_H
 
 struct phylink;
+struct phylink_pcs;
 struct device_node;
 
+int miic_early_setup(struct phylink_pcs *pcs, struct device *dev);
+
 struct phylink_pcs *miic_create(struct device *dev, struct device_node *np);
 
 void miic_destroy(struct phylink_pcs *pcs);
Signature · 1 line
2.39.0
author maintainer
#2 lore raw

PATCH v3 2/6 net: stmmac: add support to use a generic phylink_pcs as PCS

In reply to Clément Léger

Currently, the PCS is set based on the presence of the xpcs field. In order to allow supporting other PCS, add a phylink_pcs pcs field to struct mac_device_info which is used in stmmac_mac_select_pcs() to select the correct PCS.

---
 drivers/net/ethernet/stmicro/stmmac/common.h      | 2 ++
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +----
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 +
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/stmicro/stmmac/common.h +2 -0
index 6b5d96bced47..79fd67e8ab90 100644
@@ -15,6 +15,7 @@
 #include <linux/netdevice.h>
 #include <linux/stmmac.h>
 #include <linux/phy.h>
+#include <linux/phylink.h>
 #include <linux/pcs/pcs-xpcs.h>
 #include <linux/module.h>
 #if IS_ENABLED(CONFIG_VLAN_8021Q)
@@ -518,6 +519,7 @@ struct mac_device_info {
 	const struct stmmac_tc_ops *tc;
 	const struct stmmac_mmc_ops *mmc;
 	struct dw_xpcs *xpcs;
+	struct phylink_pcs *phylink_pcs;
 	struct mii_regs mii;	/* MII register Addresses */
 	struct mac_link link;
 	void __iomem *pcsr;     /* vpointer to device CSRs */
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -4
index f44e4e4b4f16..9a8721227b17 100644
@@ -937,10 +937,7 @@ static struct phylink_pcs *stmmac_mac_select_pcs(struct phylink_config *config,
 {
 	struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev));
 
-	if (!priv->hw->xpcs)
-		return NULL;
-
-	return &priv->hw->xpcs->pcs;
+	return priv->hw->phylink_pcs;
 }
 
 static void stmmac_mac_config(struct phylink_config *config, unsigned int mode,
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 -0
index 21aaa2730ac8..68deda5c5fa9 100644
@@ -513,6 +513,7 @@ int stmmac_xpcs_setup(struct mii_bus *bus)
 		}
 
 		priv->hw->xpcs = xpcs;
+		priv->hw->phylink_pcs = &xpcs->pcs;
 		break;
 	}
 
Signature · 1 line
2.39.0
author maintainer
#3 lore raw

PATCH v3 3/6 net: stmmac: add support to provide pcs from platform data

In reply to Clément Léger

Add a pcs field in platform_data to allow providing platform data. This is going to be used by the "renesas,rzn1-gmac" compatible driver which can make use of a PCS.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
 include/linux/stmmac.h                            | 1 +
 2 files changed, 4 insertions(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 -0
index 9a8721227b17..8bf5f73eb4c8 100644
@@ -7295,6 +7295,9 @@ int stmmac_dvr_probe(struct device *device,
 			goto error_xpcs_setup;
 	}
 
+	if (priv->plat->pcs)
+		priv->hw->phylink_pcs = priv->plat->pcs;
+
 	ret = stmmac_phy_setup(priv);
 	if (ret) {
 		netdev_err(ndev, "failed to setup phy (%d)\n", ret);
include/linux/stmmac.h +1 -0
index a152678b82b7..104b3d1101c0 100644
@@ -273,5 +273,6 @@ struct plat_stmmacenet_data {
 	bool use_phy_wol;
 	bool sph_disable;
 	bool serdes_up_after_phy_linkup;
+	struct phylink_pcs *pcs;
 };
 #endif
Signature · 1 line
2.39.0
author maintainer
#4 lore raw

PATCH v3 4/6 dt-bindings: net: renesas,rzn1-gmac: Document RZ/N1 GMAC support

In reply to Clément Léger

Add "renesas,rzn1-gmac" binding documentation which is compatible with "snps,dwmac" compatible driver but uses a custom PCS to communicate with the phy.

---
 .../bindings/net/renesas,rzn1-gmac.yaml       | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +67 -0
new file mode 100644
index 000000000000..029ce758a29c
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/renesas,rzn1-gmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas GMAC
+
+maintainers:
+  - Clément Léger <[email protected]>
+
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - renesas,r9a06g032-gmac
+          - renesas,rzn1-gmac
+  required:
+    - compatible
+
+allOf:
+  - $ref: snps,dwmac.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - renesas,r9a06g032-gmac
+      - const: renesas,rzn1-gmac
+      - const: snps,dwmac
+
+  pcs-handle:
+    description:
+      phandle pointing to a PCS sub-node compatible with
+      renesas,rzn1-miic.yaml#
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/r9a06g032-sysctrl.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    ethernet@44000000 {
+      compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
+      reg = <0x44000000 0x2000>;
+      interrupt-parent = <&gic>;
+      interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+             <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
+             <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+      interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+      clock-names = "stmmaceth";
+      clocks = <&sysctrl R9A06G032_HCLK_GMAC0>;
+      snps,multicast-filter-bins = <256>;
+      snps,perfect-filter-entries = <128>;
+      tx-fifo-depth = <2048>;
+      rx-fifo-depth = <4096>;
+      pcs-handle = <&mii_conv1>;
+      phy-mode = "mii";
+    };
+
+...
Signature · 1 line
2.39.0
#5 lore raw

Re: [PATCH net-next v3 4/6] dt-bindings: net: renesas,rzn1-gmac: Document RZ/N1 GMAC support

Quoted 37 lines · Clément Léger

Add "renesas,rzn1-gmac" binding documentation which is compatible with "snps,dwmac" compatible driver but uses a custom PCS to communicate with the phy.

---
 .../bindings/net/renesas,rzn1-gmac.yaml       | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +21 -0
new file mode 100644
index 000000000000..029ce758a29c
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/renesas,rzn1-gmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas GMAC
+
+maintainers:
+  - Clément Léger <[email protected]>
+
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - renesas,r9a06g032-gmac
+          - renesas,rzn1-gmac
+  required:
+    - compatible
+

Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +10 -0
+allOf:
+  - $ref: snps,dwmac.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - renesas,r9a06g032-gmac
+      - const: renesas,rzn1-gmac
+      - const: snps,dwmac

Thanks, looks good now.

Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml line 37

Quoted 6 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +6 -0
+
+  pcs-handle:
+    description:
+      phandle pointing to a PCS sub-node compatible with
+      renesas,rzn1-miic.yaml#
+    $ref: /schemas/types.yaml#/definitions/phandle

you do not need ref here - it is coming from ethernet-controller.yaml via snps,dwmac.yaml. You actually could drop entire property, but it can also stay for the description.

Quoted 7 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +7 -0
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:

Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml line 54

Quoted 10 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +10 -0
+  - |
+    #include <dt-bindings/clock/r9a06g032-sysctrl.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    ethernet@44000000 {
+      compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
+      reg = <0x44000000 0x2000>;
+      interrupt-parent = <&gic>;
+      interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+             <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,

Please align with previous <

Best regards,
Krzysztof

author maintainer
#6 lore raw

Re: [PATCH net-next v3 4/6] dt-bindings: net: renesas,rzn1-gmac: Document RZ/N1 GMAC support

Quoted 58 lines · Krzysztof Kozlowski
Quoted 37 lines · Clément Léger

Add "renesas,rzn1-gmac" binding documentation which is compatible with "snps,dwmac" compatible driver but uses a custom PCS to communicate with the phy.

---
 .../bindings/net/renesas,rzn1-gmac.yaml       | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +21 -0
new file mode 100644
index 000000000000..029ce758a29c
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/renesas,rzn1-gmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas GMAC
+
+maintainers:
+  - Clément Léger <[email protected]>
+
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - renesas,r9a06g032-gmac
+          - renesas,rzn1-gmac
+  required:
+    - compatible
+

Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +10 -0
+allOf:
+  - $ref: snps,dwmac.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - renesas,r9a06g032-gmac
+      - const: renesas,rzn1-gmac
+      - const: snps,dwmac  

Thanks, looks good now.

Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml line 37

Quoted 6 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +6 -0
+
+  pcs-handle:
+    description:
+      phandle pointing to a PCS sub-node compatible with
+      renesas,rzn1-miic.yaml#
+    $ref: /schemas/types.yaml#/definitions/phandle  
Quoted 3 lines

you do not need ref here - it is coming from ethernet-controller.yaml via snps,dwmac.yaml. You actually could drop entire property, but it can also stay for the description.

Ok thanks for the tip. I will drop it since there will be a v4.

Quoted 25 lines
Quoted 8 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +7 -0
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:

Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml line 54

Quoted 10 lines
Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml new file +10 -0
+  - |
+    #include <dt-bindings/clock/r9a06g032-sysctrl.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    ethernet@44000000 {
+      compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
+      reg = <0x44000000 0x2000>;
+      interrupt-parent = <&gic>;
+      interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+             <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,  

Please align with previous <

Best regards,
Krzysztof

Signature · 3 lines
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com
author maintainer
#7 lore raw

PATCH v3 5/6 net: stmmac: add support for RZ/N1 GMAC

In reply to Clément Léger

Add support for Renesas RZ/N1 GMAC. This support uses a custom PCS (MIIC) which is handle by parsing the pcs-handle device tree property.

---
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  11 ++
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 .../net/ethernet/stmicro/stmmac/dwmac-rzn1.c  | 120 ++++++++++++++++++
 3 files changed, 132 insertions(+)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c
drivers/net/ethernet/stmicro/stmmac/Kconfig +11 -0
index f77511fe4e87..be5429b7e192 100644
@@ -153,6 +153,17 @@ config DWMAC_ROCKCHIP
 	  This selects the Rockchip RK3288 SoC glue layer support for
 	  the stmmac device driver.
 
+config DWMAC_RZN1
+	tristate "Renesas RZ/N1 dwmac support"
+	default ARCH_RZN1
+	depends on OF && (ARCH_RZN1 || COMPILE_TEST)
+	select PCS_RZN1_MIIC
+	help
+	  Support for Ethernet controller on Renesas RZ/N1 SoC family.
+
+	  This selects the Renesas RZ/N1 SoC glue layer support for
+	  the stmmac device driver.
+
 config DWMAC_SOCFPGA
 	tristate "SOCFPGA dwmac support"
 	default ARCH_INTEL_SOCFPGA
drivers/net/ethernet/stmicro/stmmac/Makefile +1 -0
index 057e4bab5c08..53a0f74c1cb5 100644
@@ -22,6 +22,7 @@ obj-$(CONFIG_DWMAC_MESON)	+= dwmac-meson.o dwmac-meson8b.o
 obj-$(CONFIG_DWMAC_OXNAS)	+= dwmac-oxnas.o
 obj-$(CONFIG_DWMAC_QCOM_ETHQOS)	+= dwmac-qcom-ethqos.o
 obj-$(CONFIG_DWMAC_ROCKCHIP)	+= dwmac-rk.o
+obj-$(CONFIG_DWMAC_RZN1)	+= dwmac-rzn1.o
 obj-$(CONFIG_DWMAC_SOCFPGA)	+= dwmac-altr-socfpga.o
 obj-$(CONFIG_DWMAC_STI)		+= dwmac-sti.o
 obj-$(CONFIG_DWMAC_STM32)	+= dwmac-stm32.o
drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c new file +120 -0

120 lines not on this page · raw message

Signature · 1 line
2.39.0
#8 lore raw

Re: [PATCH net-next v3 5/6] net: stmmac: add support for RZ/N1 GMAC

drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c line 18

Quoted 3 lines · Clément Léger
drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c new file +3 -0
+struct rzn1_dwmac {
+	struct phylink_pcs *pcs;
+};

Please see my comments on your previous patch series as to why I don't think you need this structure nor its associated memory allocations.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
#9 lore raw

Re: [PATCH net-next v3 5/6] net: stmmac: add support for RZ/N1 GMAC

In reply to Clément Léger

Hi Clément,

Quoted 4 lines · Clément Léger

Add support for Renesas RZ/N1 GMAC. This support uses a custom PCS (MIIC) which is handle by parsing the pcs-handle device tree property.

Thanks for your patch!

drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c line 94

Quoted 7 lines
drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c new file +4 -0
 
+static int rzn1_dwmac_remove(struct platform_device *pdev)
+{
+       struct rzn1_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
+       int ret = stmmac_dvr_remove(&pdev->dev);

This needs an update for commit ff0011cf56014b4d ("net: stmmac: Make stmmac_dvr_remove() return void") in net-next/master.

drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c line 89

Quoted 6 lines
drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c new file +6 -0
+
+       if (dwmac->pcs)
+               miic_destroy(dwmac->pcs);
+
+       return ret;
+}

Gr{oetje,eeting}s,

Geert

Signature · 10 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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#10 lore raw

PATCH v3 6/6 ARM: dts: r9a06g032: describe GMAC1

In reply to Clément Léger

RZ/N1 SoC includes two MAC named GMACx that are compatible with the "snps,dwmac" driver. GMAC1 is connected directly to the MII converter port 1. Since this MII converter is represented using a PCS driver, it uses the renesas specific compatible driver which uses this PCS.

---
 arch/arm/boot/dts/r9a06g032.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/r9a06g032.dtsi +18 -0
index 41e19c0986ce..ba32e4429b01 100644
@@ -304,6 +304,24 @@ dma1: dma-controller@40105000 {
 			data-width = <8>;
 		};
 
+		gmac1: ethernet@44000000 {
+			compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
+			reg = <0x44000000 0x2000>;
+			interrupt-parent = <&gic>;
+			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+			clock-names = "stmmaceth";
+			clocks = <&sysctrl R9A06G032_HCLK_GMAC0>;
+			snps,multicast-filter-bins = <256>;
+			snps,perfect-filter-entries = <128>;
+			tx-fifo-depth = <2048>;
+			rx-fifo-depth = <4096>;
+			pcs-handle = <&mii_conv1>;
+			status = "disabled";
+		};
+
 		gmac2: ethernet@44002000 {
 			compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
 			reg = <0x44002000 0x2000>;
Signature · 1 line
2.39.0
#11 lore raw

Re: [PATCH net-next v3 6/6] ARM: dts: r9a06g032: describe GMAC1

Hi Clément,

Quoted 6 lines · Clément Léger

RZ/N1 SoC includes two MAC named GMACx that are compatible with the "snps,dwmac" driver. GMAC1 is connected directly to the MII converter port 1. Since this MII converter is represented using a PCS driver, it uses the renesas specific compatible driver which uses this PCS.

Thanks for your patch!

Quoted 5 lines
arch/arm/boot/dts/r9a06g032.dtsi +0 -0
@@ -304,6 +304,24 @@ dma1: dma-controller@40105000 {
                        data-width = <8>;
                };

arch/arm/boot/dts/r9a06g032.dtsi dma1: dma-controller@40105000 { · line 315

Quoted 10 lines
arch/arm/boot/dts/r9a06g032.dtsi +9 -0
 
+               gmac1: ethernet@44000000 {
+                       compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
+                       reg = <0x44000000 0x2000>;
+                       interrupt-parent = <&gic>;
+                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+                       clock-names = "stmmaceth";

Please move clock-names below clocks, like in all other nodes.

arch/arm/boot/dts/r9a06g032.dtsi dma1: dma-controller@40105000 { · line 316

Quoted 1 line
arch/arm/boot/dts/r9a06g032.dtsi +1 -0
+                       clocks = <&sysctrl R9A06G032_HCLK_GMAC0>;

Missing power-domains property.

arch/arm/boot/dts/r9a06g032.dtsi dma1: dma-controller@40105000 { · line 327

Quoted 11 lines
arch/arm/boot/dts/r9a06g032.dtsi +8 -0
+                       snps,multicast-filter-bins = <256>;
+                       snps,perfect-filter-entries = <128>;
+                       tx-fifo-depth = <2048>;
+                       rx-fifo-depth = <4096>;
+                       pcs-handle = <&mii_conv1>;
+                       status = "disabled";
+               };
+
                gmac2: ethernet@44002000 {
                        compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac";
                        reg = <0x44002000 0x2000>;

Gr{oetje,eeting}s,

Geert

Signature · 10 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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel