* [PATCH v3 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
@ 2025-04-30 5:32 ` Yixun Lan
2025-04-30 6:35 ` Krzysztof Kozlowski
2025-04-30 5:32 ` [PATCH v3 2/5] dt-bindings: net: sun8i-emac: Add A523 EMAC0 compatible Yixun Lan
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Yixun Lan @ 2025-04-30 5:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev, Yixun Lan
The Allwinner A523 family of SoCs have their "system control" registers
compatible to the A64 SoC, so add the new SoC specific compatible string.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
.../devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
index a7236f7db4ec34d44c4e2268f76281ef8ed83189..e7f7cf72719ea884d48fff69620467ff2834913b 100644
--- a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
+++ b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
@@ -50,6 +50,7 @@ properties:
- enum:
- allwinner,sun50i-a100-system-control
- allwinner,sun50i-h6-system-control
+ - allwinner,sun55i-a523-system-control
- const: allwinner,sun50i-a64-system-control
reg:
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
2025-04-30 5:32 ` [PATCH v3 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
@ 2025-04-30 6:35 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-30 6:35 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev
On Wed, Apr 30, 2025 at 01:32:03PM GMT, Yixun Lan wrote:
> The Allwinner A523 family of SoCs have their "system control" registers
> compatible to the A64 SoC, so add the new SoC specific compatible string.
>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
> .../devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 2/5] dt-bindings: net: sun8i-emac: Add A523 EMAC0 compatible
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
2025-04-30 5:32 ` [PATCH v3 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
@ 2025-04-30 5:32 ` Yixun Lan
2025-04-30 5:32 ` [PATCH v3 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixun Lan @ 2025-04-30 5:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev, Yixun Lan, Krzysztof Kozlowski
Allwinner A523 SoC variant (A527/T527) contains an "EMAC0" Ethernet
MAC compatible to the A64 version.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
index 7fe0352dff0f8d74a08f3f6aac5450ad685e6a08..7b6a2fde8175353621367c8d8f7a956e4aac7177 100644
--- a/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
+++ b/Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml
@@ -23,6 +23,7 @@ properties:
- allwinner,sun20i-d1-emac
- allwinner,sun50i-h6-emac
- allwinner,sun50i-h616-emac0
+ - allwinner,sun55i-a523-emac0
- const: allwinner,sun50i-a64-emac
reg:
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v3 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
2025-04-30 5:32 ` [PATCH v3 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
2025-04-30 5:32 ` [PATCH v3 2/5] dt-bindings: net: sun8i-emac: Add A523 EMAC0 compatible Yixun Lan
@ 2025-04-30 5:32 ` Yixun Lan
2025-04-30 5:32 ` [PATCH v3 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board Yixun Lan
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixun Lan @ 2025-04-30 5:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev, Yixun Lan
Add EMAC0 ethernet MAC support which found on A523 variant SoCs,
including the A527/T527 chips. MAC0 is compatible to the A64 chip which
requires an external PHY. This patch only add RGMII pins for now.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 41 ++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index ee485899ba0af69f32727a53de20051a2e31be1d..8b7cbc2e78f500e1dc704e9a6bee87e70285509f 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -126,6 +126,16 @@ pio: pinctrl@2000000 {
interrupt-controller;
#interrupt-cells = <3>;
+ rgmii0_pins: rgmii0-pins {
+ pins = "PH0", "PH1", "PH2", "PH3", "PH4",
+ "PH5", "PH6", "PH7", "PH9", "PH10",
+ "PH14", "PH15", "PH16", "PH17", "PH18";
+ allwinner,pinmux = <5>;
+ function = "emac0";
+ drive-strength = <40>;
+ bias-disable;
+ };
+
mmc0_pins: mmc0-pins {
pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5";
allwinner,pinmux = <2>;
@@ -409,6 +419,15 @@ i2c5: i2c@2503400 {
#size-cells = <0>;
};
+ syscon: syscon@3000000 {
+ compatible = "allwinner,sun55i-a523-system-control",
+ "allwinner,sun50i-a64-system-control";
+ reg = <0x03000000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ };
+
gic: interrupt-controller@3400000 {
compatible = "arm,gic-v3";
#address-cells = <1>;
@@ -521,6 +540,28 @@ ohci1: usb@4200400 {
status = "disabled";
};
+ emac0: ethernet@4500000 {
+ compatible = "allwinner,sun55i-a523-emac0",
+ "allwinner,sun50i-a64-emac";
+ reg = <0x04500000 0x10000>;
+ clocks = <&ccu CLK_BUS_EMAC0>;
+ clock-names = "stmmaceth";
+ resets = <&ccu RST_BUS_EMAC0>;
+ reset-names = "stmmaceth";
+ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii0_pins>;
+ syscon = <&syscon>;
+ status = "disabled";
+
+ mdio0: mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
r_ccu: clock-controller@7010000 {
compatible = "allwinner,sun55i-a523-r-ccu";
reg = <0x7010000 0x250>;
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v3 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
` (2 preceding siblings ...)
2025-04-30 5:32 ` [PATCH v3 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
@ 2025-04-30 5:32 ` Yixun Lan
2025-04-30 5:32 ` [PATCH v3 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board Yixun Lan
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Yixun Lan @ 2025-04-30 5:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev, Yixun Lan
On Radxa A5E board, the EMAC0 connect to external Maxio MAE0621A PHY,
which features a 25MHz crystal, and using PH8 pin as PHY reset.
Tested on A5E board with schematic V1.20.
Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
.../boot/dts/allwinner/sun55i-a527-radxa-a5e.dts | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
index 912e1bda974ce5f64c425e371357b1a78b7c13dd..4ba01ea6f0db793b08fb0645226126535d91c43b 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
@@ -12,6 +12,7 @@ / {
compatible = "radxa,cubie-a5e", "allwinner,sun55i-a527";
aliases {
+ ethernet0 = &emac0;
serial0 = &uart0;
};
@@ -54,6 +55,24 @@ &ehci1 {
status = "okay";
};
+&emac0 {
+ phy-mode = "rgmii-id";
+ phy-handle = <&ext_rgmii_phy>;
+ phy-supply = <®_cldo3>;
+
+ allwinner,tx-delay-ps = <300>;
+ allwinner,rx-delay-ps = <400>;
+
+ status = "okay";
+};
+
+&mdio0 {
+ ext_rgmii_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+};
+
&mmc0 {
vmmc-supply = <®_cldo3>;
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v3 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
` (3 preceding siblings ...)
2025-04-30 5:32 ` [PATCH v3 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board Yixun Lan
@ 2025-04-30 5:32 ` Yixun Lan
2025-05-02 1:00 ` [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC patchwork-bot+netdevbpf
2025-05-03 15:56 ` (subset) " Chen-Yu Tsai
6 siblings, 0 replies; 9+ messages in thread
From: Yixun Lan @ 2025-04-30 5:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev, Yixun Lan
On Avaota A1 board, the EMAC0 connect to an external RTL8211F-CG PHY,
which features a 25MHz crystal, and using PH8 pin as PHY reset.
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
I don't own this board, only compose this patch according to the
schematics. Let me know if it works.
---
.../boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
index 85a546aecdbe149d6bad10327fca1fb7dafff6ad..4524a195e86d20089cc35610495424ed2dec7e95 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
@@ -12,6 +12,7 @@ / {
compatible = "yuzukihd,avaota-a1", "allwinner,sun55i-t527";
aliases {
+ ethernet0 = &emac0;
serial0 = &uart0;
};
@@ -64,6 +65,24 @@ &ehci1 {
status = "okay";
};
+&emac0 {
+ phy-mode = "rgmii-id";
+ phy-handle = <&ext_rgmii_phy>;
+ phy-supply = <®_dcdc4>;
+
+ allwinner,tx-delay-ps = <100>;
+ allwinner,rx-delay-ps = <300>;
+
+ status = "okay";
+};
+
+&mdio0 {
+ ext_rgmii_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+};
+
&mmc0 {
vmmc-supply = <®_cldo3>;
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
--
2.49.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
` (4 preceding siblings ...)
2025-04-30 5:32 ` [PATCH v3 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board Yixun Lan
@ 2025-05-02 1:00 ` patchwork-bot+netdevbpf
2025-05-03 15:56 ` (subset) " Chen-Yu Tsai
6 siblings, 0 replies; 9+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-02 1:00 UTC (permalink / raw)
To: Yixun Lan
Cc: robh, krzk+dt, conor+dt, wens, jernej.skrabec, samuel, mripard,
andrew+netdev, davem, edumazet, kuba, pabeni, andre.przywara,
clabbe.montjoie, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev, krzysztof.kozlowski
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 30 Apr 2025 13:32:02 +0800 you wrote:
> This patch series is trying to add EMAC0 ethernet MAC support
> to the A523 variant SoCs, including A523, A527/T527 chips.
>
> This MAC0 is compatible to previous A64 SoC, so introduce a new DT
> compatible but make it as a fallback to A64's compatible.
>
> In this version, the PHYRSTB pin which routed to external phy
> has not been populated in DT. It's kind of optional for now,
> but we probably should handle it well later.
>
> [...]
Here is the summary with links:
- [v3,1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
(no matching commit)
- [v3,2/5] dt-bindings: net: sun8i-emac: Add A523 EMAC0 compatible
https://git.kernel.org/netdev/net-next/c/0454b9057e98
- [v3,3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
(no matching commit)
- [v3,4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board
(no matching commit)
- [v3,5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: (subset) [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC
2025-04-30 5:32 [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
` (5 preceding siblings ...)
2025-05-02 1:00 ` [PATCH v3 0/5] allwinner: Add EMAC0 support to A523 variant SoC patchwork-bot+netdevbpf
@ 2025-05-03 15:56 ` Chen-Yu Tsai
6 siblings, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2025-05-03 15:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
Samuel Holland, Maxime Ripard, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Yixun Lan
Cc: Andre Przywara, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev, Krzysztof Kozlowski
On Wed, 30 Apr 2025 13:32:02 +0800, Yixun Lan wrote:
> This patch series is trying to add EMAC0 ethernet MAC support
> to the A523 variant SoCs, including A523, A527/T527 chips.
>
> This MAC0 is compatible to previous A64 SoC, so introduce a new DT
> compatible but make it as a fallback to A64's compatible.
>
> In this version, the PHYRSTB pin which routed to external phy
> has not been populated in DT. It's kind of optional for now,
> but we probably should handle it well later.
>
> [...]
Applied to sunxi/dt-for-6.16 in sunxi/linux.git, thanks!
[1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
https://git.kernel.org/sunxi/linux/c/02f27ea7fa02
[3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
https://git.kernel.org/sunxi/linux/c/56766ca6c4f6
[4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board
https://git.kernel.org/sunxi/linux/c/acca163f3f51
[5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board
https://git.kernel.org/sunxi/linux/c/c6800f15998b
Best regards,
--
Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 9+ messages in thread