Skip to contentSkip to conversation

net: stmmac: Add support for Allwinner A523 GMAC200

PATCH Superseded Chen-Yu Tsai 4 participants 10 messages Sep 23, 2025 – Oct 13, 2025

Subsystems (6)

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Chen-Yu Tsai

author maintainer
#0 lore raw

v7 cover net: stmmac: Add support for Allwinner A523 GMAC200

From: Chen-Yu Tsai <[email protected]>

Hi everyone,

This is v7 of my Allwinner A523 GMAC200 support series. This is based on next-20250922.

Changes since v6:
- Collected acks for DT binding patch
- Rebased onto next-20250922

Changes since v5:
- Use plat->phy_interface instead of plat->mac_interface (Russell)
- Link to v5
https://lore.kernel.org/all/[email protected]/

Changes since v4:
- Moved clock-names list to main schema in DT binding (Rob)
- Dropped 4 patches that are already merged
- Link to v4
https://lore.kernel.org/all/[email protected]/

Changes since v3:
- driver
- Fixed printf format specifier warning
- Link to v3
https://lore.kernel.org/all/[email protected]/

Changes since v2:
- DT binding
- Added "select" to avoid matching against all dwmac entries
- driver
- Include "ps" unit in "... must be multiple of ..." error message
- Use FIELD_FIT to check if delay value is in range and FIELD_MAX to get the maximum value
- Reword error message for delay value exceeding maximum
- Drop MASK_TO_VAL
- Link to v2:
https://lore.kernel.org/all/[email protected]/

Changes since v1:
- Dropped RFT tag
- Switched to generic (tx|rx)-internal-delay-ps
- dwmac-sun55i driver bits
- Changed dev_err() + return to dev_err_probe()
- Added check of return value from syscon regmap write
- Changed driver name to match file name
- sram driver bits
- Fixed check on return value
- Expanded commit message
- dtsi
- Fixed typo in tx-queues-config
- cubie a5e
- Add PHY regulator delay
- Link to v1:
https://lore.kernel.org/all/[email protected]/

This series adds support for the second Ethernet controller found on the Allwinner A523 SoC family. This controller, dubbed GMAC200, is a DWMAC4 core with an integration layer around it. The integration layer is similar to older Allwinner generations, but with an extra memory bus gate and separate power domain.

Patch 1 adds a new compatible string combo to the existing Allwinner EMAC binding.

Patch 2 adds a new driver for this core and integration combo.

Patch 3 adds a device node and pinmux settings for the GMAC200.

Patches 4, 5, and 6 enable the GMAC200 on three boards. I only tested the Orangepi 4A and Radxa Cubie A5E.

Please have a look and help test on the Avaota A1. I don't expect any issues there though, since the PHY is always on, unlike on the Cubie A5E.

Patches 1 and 2 should go through net-next, and I will take all the other patches through the sunxi tree. Hopefully we can get this merged for v6.18.

Thanks
ChenYu

Chen-Yu Tsai (6):
dt-bindings: net: sun8i-emac: Add A523 GMAC200 compatible
net: stmmac: Add support for Allwinner A523 GMAC200
arm64: dts: allwinner: a523: Add GMAC200 ethernet controller
arm64: dts: allwinner: a527: cubie-a5e: Enable second Ethernet port
arm64: dts: allwinner: t527: avaota-a1: enable second Ethernet port
arm64: dts: allwinner: t527: orangepi-4a: Enable Ethernet port

 .../net/allwinner,sun8i-a83t-emac.yaml        |  95 ++++++++++-
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi |  55 ++++++
 .../dts/allwinner/sun55i-a527-cubie-a5e.dts   |  28 ++-
 .../dts/allwinner/sun55i-t527-avaota-a1.dts   |  26 ++-
 .../dts/allwinner/sun55i-t527-orangepi-4a.dts |  23 +++
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  12 ++
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 .../ethernet/stmicro/stmmac/dwmac-sun55i.c    | 159 ++++++++++++++++++
 8 files changed, 393 insertions(+), 6 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c
Signature · 1 line
2.47.3
author maintainer
#1 lore raw

PATCH v7 1/6 dt-bindings: net: sun8i-emac: Add A523 GMAC200 compatible

From: Chen-Yu Tsai <[email protected]>

The Allwinner A523 SoC family has a second Ethernet controller, called the GMAC200 in the BSP and T527 datasheet, and referred to as GMAC1 for numbering. This controller, according to BSP sources, is fully compatible with a slightly newer version of the Synopsys DWMAC core. The glue layer around the controller is the same as found around older DWMAC cores on Allwinner SoCs. The only slight difference is that since this is the second controller on the SoC, the register for the clock delay controls is at a different offset. Last, the integration includes a dedicated clock gate for the memory bus and the whole thing is put in a separately controllable power domain.

Add a compatible string entry for it, and work in the requirements for a second clock and a power domain.

---
Changes since v6:
- Collected tags
Changes since v4:
- Move clock-names list to main schema (Rob) Changes since v2:
- Added "select" to avoid matching against all dwmac entries Changes since v1:
- Switch to generic (tx|rx)-internal-delay-ps properties

---
 .../net/allwinner,sun8i-a83t-emac.yaml        | 95 ++++++++++++++++++-
 1 file changed, 93 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml +93 -2
index 2ac709a4c472..fc62fb2a68ac 100644
@@ -10,6 +10,21 @@ maintainers:
   - Chen-Yu Tsai <[email protected]>
   - Maxime Ripard <[email protected]>
 
+# We need a select here so we don't match all nodes with 'snps,dwmac'
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - allwinner,sun8i-a83t-emac
+          - allwinner,sun8i-h3-emac
+          - allwinner,sun8i-r40-gmac
+          - allwinner,sun8i-v3s-emac
+          - allwinner,sun50i-a64-emac
+          - allwinner,sun55i-a523-gmac200
+  required:
+    - compatible
+
 properties:
   compatible:
     oneOf:
@@ -26,6 +41,9 @@ properties:
               - allwinner,sun50i-h616-emac0
               - allwinner,sun55i-a523-gmac0
           - const: allwinner,sun50i-a64-emac
+      - items:
+          - const: allwinner,sun55i-a523-gmac200
+          - const: snps,dwmac-4.20a
 
   reg:
     maxItems: 1
@@ -37,14 +55,21 @@ properties:
     const: macirq
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   clock-names:
-    const: stmmaceth
+    minItems: 1
+    items:
+      - const: stmmaceth
+      - const: mbus
 
   phy-supply:
     description: PHY regulator
 
+  power-domains:
+    maxItems: 1
+
   syscon:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -191,6 +216,42 @@ allOf:
             - mdio-parent-bus
             - mdio@1
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: allwinner,sun55i-a523-gmac200
+    then:
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+        tx-internal-delay-ps:
+          default: 0
+          minimum: 0
+          maximum: 700
+          multipleOf: 100
+          description:
+            External RGMII PHY TX clock delay chain value in ps.
+        rx-internal-delay-ps:
+          default: 0
+          minimum: 0
+          maximum: 3100
+          multipleOf: 100
+          description:
+            External RGMII PHY TX clock delay chain value in ps.
+      required:
+        - power-domains
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          maxItems: 1
+        power-domains: false
+
+
 unevaluatedProperties: false
 
 examples:
@@ -323,4 +384,34 @@ examples:
         };
     };
 
+  - |
+    ethernet@4510000 {
+        compatible = "allwinner,sun55i-a523-gmac200",
+                     "snps,dwmac-4.20a";
+        reg = <0x04510000 0x10000>;
+        clocks = <&ccu 117>, <&ccu 79>;
+        clock-names = "stmmaceth", "mbus";
+        resets = <&ccu 43>;
+        reset-names = "stmmaceth";
+        interrupts = <0 47 4>;
+        interrupt-names = "macirq";
+        pinctrl-names = "default";
+        pinctrl-0 = <&rgmii1_pins>;
+        power-domains = <&pck600 4>;
+        syscon = <&syscon>;
+        phy-handle = <&ext_rgmii_phy_1>;
+        phy-mode = "rgmii-id";
+        snps,fixed-burst;
+        snps,axi-config = <&gmac1_stmmac_axi_setup>;
+
+        mdio {
+            compatible = "snps,dwmac-mdio";
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            ext_rgmii_phy_1: ethernet-phy@1 {
+                reg = <1>;
+            };
+        };
+    };
 ...
Signature · 1 line
2.47.3
author maintainer
#2 lore raw

PATCH v7 2/6 net: stmmac: Add support for Allwinner A523 GMAC200

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The Allwinner A523 SoC family has a second Ethernet controller, called the GMAC200 in the BSP and T527 datasheet, and referred to as GMAC1 for numbering. This controller, according to BSP sources, is fully compatible with a slightly newer version of the Synopsys DWMAC core. The glue layer around the controller is the same as found around older DWMAC cores on Allwinner SoCs. The only slight difference is that since this is the second controller on the SoC, the register for the clock delay controls is at a different offset. Last, the integration includes a dedicated clock gate for the memory bus and the whole thing is put in a separately controllable power domain.

Add a new driver for this hardware supporting the integration layer.

---
Changes since v5:
- Use plat->phy_interface instead of plat->mac_interface (Russell)

Changes since v3:
- Fixed printf format specifier warning

Changes since v2 (all suggested by Russell King):
- Include "ps" unit in "... must be multiple of ..." error message
- Use FIELD_FIT to check if delay value is in range and FIELD_MAX to get the maximum value
- Reword error message for delay value exceeding maximum
- Drop MASK_TO_VAL

Changes since v1:
- Switch to generic (tx|rx)-internal-delay-ps properties
- Change dev_err() + return to dev_err_probe()
- Check return value from syscon regmap write
- Change driver name to match file name

---
 drivers/net/ethernet/stmicro/stmmac/Kconfig   |  12 ++
 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 .../ethernet/stmicro/stmmac/dwmac-sun55i.c    | 159 ++++++++++++++++++
 3 files changed, 172 insertions(+)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c
drivers/net/ethernet/stmicro/stmmac/Kconfig +12 -0
index 91d9a14362bf..9507131875b2 100644
@@ -265,6 +265,18 @@ config DWMAC_SUN8I
 	  stmmac device driver. This driver is used for H3/A83T/A64
 	  EMAC ethernet controller.
 
+config DWMAC_SUN55I
+	tristate "Allwinner sun55i GMAC200 support"
+	default ARCH_SUNXI
+	depends on OF && (ARCH_SUNXI || COMPILE_TEST)
+	select MDIO_BUS_MUX
+	help
+	  Support for Allwinner A523/T527 GMAC200 ethernet controllers.
+
+	  This selects Allwinner SoC glue layer support for the
+	  stmmac device driver. This driver is used for A523/T527
+	  GMAC200 ethernet controller.
+
 config DWMAC_THEAD
 	tristate "T-HEAD dwmac support"
 	depends on OF && (ARCH_THEAD || COMPILE_TEST)
drivers/net/ethernet/stmicro/stmmac/Makefile +1 -0
index b591d93f8503..51e068e26ce4 100644
@@ -31,6 +31,7 @@ obj-$(CONFIG_DWMAC_STI)		+= dwmac-sti.o
 obj-$(CONFIG_DWMAC_STM32)	+= dwmac-stm32.o
 obj-$(CONFIG_DWMAC_SUNXI)	+= dwmac-sunxi.o
 obj-$(CONFIG_DWMAC_SUN8I)	+= dwmac-sun8i.o
+obj-$(CONFIG_DWMAC_SUN55I)	+= dwmac-sun55i.o
 obj-$(CONFIG_DWMAC_THEAD)	+= dwmac-thead.o
 obj-$(CONFIG_DWMAC_DWC_QOS_ETH)	+= dwmac-dwc-qos-eth.o
 obj-$(CONFIG_DWMAC_INTEL_PLAT)	+= dwmac-intel-plat.o
drivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c new file +159 -0

159 lines not on this page · raw message

Signature · 1 line
2.47.3
author maintainer
#4 lore raw

PATCH v7 3/6 arm64: dts: allwinner: a523: Add GMAC200 ethernet controller

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The A523 SoC family has a second ethernet controller, called the GMAC200. It is not exposed on all the SoCs in the family.

Add a device node for it. All the hardware specific settings are from the vendor BSP.

---

Changes since v1:
- Fixed typo in tx-queues-config

---
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +55 -0
index 7b36c47a3a13..a9e051a8bea3 100644
@@ -182,6 +182,16 @@ rgmii0_pins: rgmii0-pins {
 				bias-disable;
 			};
 
+			rgmii1_pins: rgmii1-pins {
+				pins = "PJ0", "PJ1", "PJ2", "PJ3", "PJ4",
+				       "PJ5", "PJ6", "PJ7", "PJ8", "PJ9",
+				       "PJ11", "PJ12", "PJ13", "PJ14", "PJ15";
+				allwinner,pinmux = <5>;
+				function = "gmac1";
+				drive-strength = <40>;
+				bias-disable;
+			};
+
 			uart0_pb_pins: uart0-pb-pins {
 				pins = "PB9", "PB10";
 				allwinner,pinmux = <2>;
@@ -603,6 +613,51 @@ mdio0: mdio {
 			};
 		};
 
+		gmac1: ethernet@4510000 {
+			compatible = "allwinner,sun55i-a523-gmac200",
+				     "snps,dwmac-4.20a";
+			reg = <0x04510000 0x10000>;
+			clocks = <&ccu CLK_BUS_EMAC1>, <&ccu CLK_MBUS_EMAC1>;
+			clock-names = "stmmaceth", "mbus";
+			resets = <&ccu RST_BUS_EMAC1>;
+			reset-names = "stmmaceth";
+			interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq";
+			pinctrl-names = "default";
+			pinctrl-0 = <&rgmii1_pins>;
+			power-domains = <&pck600 PD_VO1>;
+			syscon = <&syscon>;
+			snps,fixed-burst;
+			snps,axi-config = <&gmac1_stmmac_axi_setup>;
+			snps,mtl-rx-config = <&gmac1_mtl_rx_setup>;
+			snps,mtl-tx-config = <&gmac1_mtl_tx_setup>;
+			status = "disabled";
+
+			mdio1: mdio {
+				compatible = "snps,dwmac-mdio";
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+
+			gmac1_mtl_rx_setup: rx-queues-config {
+				snps,rx-queues-to-use = <1>;
+
+				queue0 {};
+			};
+
+			gmac1_stmmac_axi_setup: stmmac-axi-config {
+				snps,wr_osr_lmt = <0xf>;
+				snps,rd_osr_lmt = <0xf>;
+				snps,blen = <256 128 64 32 16 8 4>;
+			};
+
+			gmac1_mtl_tx_setup: tx-queues-config {
+				snps,tx-queues-to-use = <1>;
+
+				queue0 {};
+			};
+		};
+
 		ppu: power-controller@7001400 {
 			compatible = "allwinner,sun55i-a523-ppu";
 			reg = <0x07001400 0x400>;
Signature · 1 line
2.47.3
author maintainer
#5 lore raw

PATCH v7 4/6 arm64: dts: allwinner: a527: cubie-a5e: Enable second Ethernet port

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

On the Radxa Cubie A5E board, the second Ethernet controller, aka the GMAC200, is connected to a second external Maxio MAE0621A PHY. The PHY uses an external 25MHz crystal, and has the SoC's PJ16 pin connected to its reset pin.

Enable the second Ethernet port. Also fix up the label for the existing external PHY connected to the first Ethernet port. An enable delay for the PHY supply regulator is added to make sure the PHY's internal regulators are fully powered and the PHY is operational.

---

Changes since v1:
- Switch to generic (tx|rx)-internal-delay-ps properties
- Add PHY regulator delay

---
 .../dts/allwinner/sun55i-a527-cubie-a5e.dts   | 28 +++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +26 -2
index f82a8d121697..bfdf1728cd14 100644
@@ -14,6 +14,7 @@ / {
 
 	aliases {
 		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
 		serial0 = &uart0;
 	};
 
@@ -75,7 +76,7 @@ &ehci1 {
 
 &gmac0 {
 	phy-mode = "rgmii-id";
-	phy-handle = <&ext_rgmii_phy>;
+	phy-handle = <&ext_rgmii0_phy>;
 	phy-supply = <&reg_cldo3>;
 
 	allwinner,tx-delay-ps = <300>;
@@ -84,13 +85,24 @@ &gmac0 {
 	status = "okay";
 };
 
+&gmac1 {
+	phy-mode = "rgmii-id";
+	phy-handle = <&ext_rgmii1_phy>;
+	phy-supply = <&reg_cldo4>;
+
+	tx-internal-delay-ps = <300>;
+	rx-internal-delay-ps = <400>;
+
+	status = "okay";
+};
+
 &gpu {
 	mali-supply = <&reg_dcdc2>;
 	status = "okay";
 };
 
 &mdio0 {
-	ext_rgmii_phy: ethernet-phy@1 {
+	ext_rgmii0_phy: ethernet-phy@1 {
 		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <1>;
 		reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
@@ -99,6 +111,16 @@ ext_rgmii_phy: ethernet-phy@1 {
 	};
 };
 
+&mdio1 {
+	ext_rgmii1_phy: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+		reset-gpios = <&pio 9 16 GPIO_ACTIVE_LOW>; /* PJ16 */
+		reset-assert-us = <10000>;
+		reset-deassert-us = <150000>;
+	};
+};
+
 &mmc0 {
 	vmmc-supply = <&reg_cldo3>;
 	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
@@ -250,6 +272,8 @@ reg_cldo4: cldo4 {
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
 				regulator-name = "vcc-pj-phy";
+				/* enough time for the PHY to fully power on */
+				regulator-enable-ramp-delay = <150000>;
 			};
 
 			reg_cpusldo: cpusldo {
Signature · 1 line
2.47.3
author maintainer
#6 lore raw

PATCH v7 5/6 arm64: dts: allwinner: t527: avaota-a1: enable second Ethernet port

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

On the Avaota A1 board, the second Ethernet controller, aka the GMAC200, is connected to a second external RTL8211F-CG PHY. The PHY uses an external 25MHz crystal, and has the SoC's PJ16 pin connected to its reset pin.

Enable the second Ethernet port. Also fix up the label for the existing external PHY connected to the first Ethernet port.

---

Changes since v1:
- Switch to generic (tx|rx)-internal-delay-ps properties

---
 .../dts/allwinner/sun55i-t527-avaota-a1.dts   | 26 +++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +24 -2
index 1b054fa8ef74..054d0357c139 100644
@@ -13,6 +13,7 @@ / {
 
 	aliases {
 		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
 		serial0 = &uart0;
 	};
 
@@ -73,7 +74,7 @@ &ehci1 {
 
 &gmac0 {
 	phy-mode = "rgmii-id";
-	phy-handle = <&ext_rgmii_phy>;
+	phy-handle = <&ext_rgmii0_phy>;
 	phy-supply = <&reg_dcdc4>;
 
 	allwinner,tx-delay-ps = <100>;
@@ -82,13 +83,24 @@ &gmac0 {
 	status = "okay";
 };
 
+&gmac1 {
+	phy-mode = "rgmii-id";
+	phy-handle = <&ext_rgmii1_phy>;
+	phy-supply = <&reg_dcdc4>;
+
+	tx-internal-delay-ps = <100>;
+	rx-internal-delay-ps = <100>;
+
+	status = "okay";
+};
+
 &gpu {
 	mali-supply = <&reg_dcdc2>;
 	status = "okay";
 };
 
 &mdio0 {
-	ext_rgmii_phy: ethernet-phy@1 {
+	ext_rgmii0_phy: ethernet-phy@1 {
 		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <1>;
 		reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
@@ -97,6 +109,16 @@ ext_rgmii_phy: ethernet-phy@1 {
 	};
 };
 
+&mdio1 {
+	ext_rgmii1_phy: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+		reset-gpios = <&pio 9 16 GPIO_ACTIVE_LOW>; /* PJ16 */
+		reset-assert-us = <10000>;
+		reset-deassert-us = <150000>;
+	};
+};
+
 &mmc0 {
 	vmmc-supply = <&reg_cldo3>;
 	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
Signature · 1 line
2.47.3
author maintainer
#7 lore raw

PATCH v7 6/6 arm64: dts: allwinner: t527: orangepi-4a: Enable Ethernet port

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

On the Orangepi 4A board, the second Ethernet controller, aka the GMAC200, is connected to an external Motorcomm YT8531 PHY. The PHY uses an external 25MHz crystal, has the SoC's PI15 pin connected to its reset pin, and the PI16 pin for its interrupt pin.

Enable it.

---

Changes since v1:
- Switch to generic (tx|rx)-internal-delay-ps properties

---
 .../dts/allwinner/sun55i-t527-orangepi-4a.dts | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts +23 -0
index 39a4e194712a..9e6b21cf293e 100644
@@ -15,6 +15,7 @@ / {
 	compatible = "xunlong,orangepi-4a", "allwinner,sun55i-t527";
 
 	aliases {
+		ethernet0 = &gmac1;
 		serial0 = &uart0;
 	};
 
@@ -102,11 +103,33 @@ &ehci1 {
 	status = "okay";
 };
 
+&gmac1 {
+	phy-mode = "rgmii-id";
+	phy-handle = <&ext_rgmii_phy>;
+	phy-supply = <&reg_cldo4>;
+
+	tx-internal-delay-ps = <0>;
+	rx-internal-delay-ps = <300>;
+
+	status = "okay";
+};
+
 &gpu {
 	mali-supply = <&reg_dcdc2>;
 	status = "okay";
 };
 
+&mdio1 {
+	ext_rgmii_phy: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+		interrupts-extended = <&pio 8 16 IRQ_TYPE_LEVEL_LOW>; /* PI16 */
+		reset-gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */
+		reset-assert-us = <10000>;
+		reset-deassert-us = <150000>;
+	};
+};
+
 &mmc0 {
 	vmmc-supply = <&reg_cldo3>;
 	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
Signature · 1 line
2.47.3
maintainer Reviewed-by on v7 2/6
#3 lore raw
In reply to Chen-Yu Tsai

Dne torek, 23. september 2025 ob 16:02:42 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):

Quoted 13 lines

From: Chen-Yu Tsai <[email protected]>

The Allwinner A523 SoC family has a second Ethernet controller, called the GMAC200 in the BSP and T527 datasheet, and referred to as GMAC1 for numbering. This controller, according to BSP sources, is fully compatible with a slightly newer version of the Synopsys DWMAC core. The glue layer around the controller is the same as found around older DWMAC cores on Allwinner SoCs. The only slight difference is that since this is the second controller on the SoC, the register for the clock delay controls is at a different offset. Last, the integration includes a dedicated clock gate for the memory bus and the whole thing is put in a separately controllable power domain.

Quoted 3 lines

Add a new driver for this hardware supporting the integration layer.

Best regards,
Jernej

maintainer
#8 lore raw
In reply to Chen-Yu Tsai
Quoted 2 lines · On Tue, 23 Sep 2025 22:02:40 +0800 Chen-Yu Tsai wrote:

This is v7 of my Allwinner A523 GMAC200 support series. This is based on next-20250922.

The dts patches don't apply to net-next which prevents our test bots from processing the series. Could you repost just patches 1 and 2 as a standalone series for net-next, without the dts changes?

Signature · 1 line
pw-bot: cr
#9 lore raw

Re: (subset) [PATCH net-next v7 0/6] net: stmmac: Add support for Allwinner A523 GMAC200

In reply to Chen-Yu Tsai
Quoted 8 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

Hi everyone,

This is v7 of my Allwinner A523 GMAC200 support series. This is based on next-20250922.

[...]

Applied to sunxi/dt-for-6.19 in local tree, thanks!

[3/6] arm64: dts: allwinner: a523: Add GMAC200 ethernet controller

      commit: 460a71b5642a60574809032f0a21afff0f942474
[4/6] arm64: dts: allwinner: a527: cubie-a5e: Enable second Ethernet port
      commit: 7076938d20d22d5f75641f417f11edeee192e3cf
[5/6] arm64: dts: allwinner: t527: avaota-a1: enable second Ethernet port
      commit: 2e5d147ba90e887271297f69721d2d88122c7c4f
[6/6] arm64: dts: allwinner: t527: orangepi-4a: Enable Ethernet port
      commit: a3606e8a7819534026b46e2b8c7b0e156e292f13

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>