* [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC
@ 2025-04-24 10:08 Yixun Lan
2025-04-24 10:08 ` [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
` (4 more replies)
0 siblings, 5 replies; 21+ messages in thread
From: Yixun Lan @ 2025-04-24 10:08 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
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.
I've tested only on Radxa A5E board.
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
Changes in v2:
- add ethernet alias node
- add phy-supply
- change to rgmii-id
- drop PH13, rename pin name
- drop bias-pull-up
- collect Review tags
- improve commit log
- Link to v1: https://lore.kernel.org/r/20250423-01-sun55i-emac0-v1-0-46ee4c855e0a@gentoo.org
---
Yixun Lan (5):
dt-bindings: sram: sunxi-sram: Add A523 compatible
dt-bindings: arm: sunxi: Add A523 EMAC0 compatible
arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board
arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board
.../bindings/net/allwinner,sun8i-a83t-emac.yaml | 1 +
.../sram/allwinner,sun4i-a10-system-control.yaml | 1 +
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++
.../boot/dts/allwinner/sun55i-a527-radxa-a5e.dts | 19 ++++++++++
.../boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 19 ++++++++++
5 files changed, 80 insertions(+)
---
base-commit: 69714722df19a7d9e81b7e8f208ca8f325af4502
change-id: 20250423-01-sun55i-emac0-5e395a80f6bf
Best regards,
--
Yixun Lan
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
2025-04-24 10:08 [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
@ 2025-04-24 10:08 ` Yixun Lan
2025-04-28 7:21 ` Krzysztof Kozlowski
2025-04-24 10:08 ` [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible Yixun Lan
` (3 subsequent siblings)
4 siblings, 1 reply; 21+ messages in thread
From: Yixun Lan @ 2025-04-24 10:08 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] 21+ messages in thread
* [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible
2025-04-24 10:08 [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
2025-04-24 10:08 ` [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
@ 2025-04-24 10:08 ` Yixun Lan
2025-04-27 5:43 ` Chen-Yu Tsai
2025-04-28 7:22 ` Krzysztof Kozlowski
2025-04-24 10:08 ` [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
` (2 subsequent siblings)
4 siblings, 2 replies; 21+ messages in thread
From: Yixun Lan @ 2025-04-24 10:08 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
Allwinner A523 SoC variant (A527/T527) contains an "EMAC0" Ethernet
MAC compatible to the A64 version.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
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] 21+ messages in thread
* [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-24 10:08 [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
2025-04-24 10:08 ` [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
2025-04-24 10:08 ` [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible Yixun Lan
@ 2025-04-24 10:08 ` Yixun Lan
2025-04-24 19:17 ` Corentin Labbe
` (2 more replies)
2025-04-24 10:08 ` [PATCH v2 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board Yixun Lan
2025-04-24 10:08 ` [PATCH v2 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board Yixun Lan
4 siblings, 3 replies; 21+ messages in thread
From: Yixun Lan @ 2025-04-24 10:08 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.
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -126,6 +126,15 @@ 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>;
+ };
+
mmc0_pins: mmc0-pins {
pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5";
allwinner,pinmux = <2>;
@@ -409,6 +418,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 +539,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] 21+ messages in thread
* [PATCH v2 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board
2025-04-24 10:08 [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
` (2 preceding siblings ...)
2025-04-24 10:08 ` [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
@ 2025-04-24 10:08 ` Yixun Lan
2025-04-24 19:15 ` Corentin Labbe
2025-04-24 10:08 ` [PATCH v2 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board Yixun Lan
4 siblings, 1 reply; 21+ messages in thread
From: Yixun Lan @ 2025-04-24 10:08 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 an external YT8531C PHY,
which features a 25MHz crystal, and using PH8 pin as PHY reset.
Tested on A5E board with schematic V1.20.
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] 21+ messages in thread
* [PATCH v2 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board
2025-04-24 10:08 [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
` (3 preceding siblings ...)
2025-04-24 10:08 ` [PATCH v2 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board Yixun Lan
@ 2025-04-24 10:08 ` Yixun Lan
4 siblings, 0 replies; 21+ messages in thread
From: Yixun Lan @ 2025-04-24 10:08 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] 21+ messages in thread
* Re: [PATCH v2 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board
2025-04-24 10:08 ` [PATCH v2 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board Yixun Lan
@ 2025-04-24 19:15 ` Corentin Labbe
0 siblings, 0 replies; 21+ messages in thread
From: Corentin Labbe @ 2025-04-24 19:15 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, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
Le Thu, Apr 24, 2025 at 06:08:42PM +0800, Yixun Lan a écrit :
> On Radxa A5E board, the EMAC0 connect to an external YT8531C 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>
Thanks
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-24 10:08 ` [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
@ 2025-04-24 19:17 ` Corentin Labbe
2025-04-24 23:19 ` Andre Przywara
2025-04-25 5:26 ` Chen-Yu Tsai
2 siblings, 0 replies; 21+ messages in thread
From: Corentin Labbe @ 2025-04-24 19:17 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, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
Le Thu, Apr 24, 2025 at 06:08:41PM +0800, Yixun Lan a écrit :
> 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.
>
Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Thanks
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-24 10:08 ` [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
2025-04-24 19:17 ` Corentin Labbe
@ 2025-04-24 23:19 ` Andre Przywara
2025-04-25 5:26 ` Chen-Yu Tsai
2 siblings, 0 replies; 21+ messages in thread
From: Andre Przywara @ 2025-04-24 23:19 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,
Corentin Labbe, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
On Thu, 24 Apr 2025 18:08:41 +0800
Yixun Lan <dlan@gentoo.org> wrote:
> 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.
>
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
Thanks, looks good now!
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
> arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> @@ -126,6 +126,15 @@ 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>;
> + };
> +
> mmc0_pins: mmc0-pins {
> pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5";
> allwinner,pinmux = <2>;
> @@ -409,6 +418,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 +539,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>;
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-24 10:08 ` [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
2025-04-24 19:17 ` Corentin Labbe
2025-04-24 23:19 ` Andre Przywara
@ 2025-04-25 5:26 ` Chen-Yu Tsai
2025-04-25 7:06 ` Yixun Lan
2025-04-25 9:41 ` Andre Przywara
2 siblings, 2 replies; 21+ messages in thread
From: Chen-Yu Tsai @ 2025-04-25 5:26 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, 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 Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
>
> 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.
>
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
> arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> @@ -126,6 +126,15 @@ 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>;
We should probably add
bias-disable;
to explicitly turn off pull-up and pull-down.
ChenYu
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-25 5:26 ` Chen-Yu Tsai
@ 2025-04-25 7:06 ` Yixun Lan
2025-04-25 9:41 ` Andre Przywara
1 sibling, 0 replies; 21+ messages in thread
From: Yixun Lan @ 2025-04-25 7:06 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, 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
Hi Chen-Yu,
On 13:26 Fri 25 Apr , Chen-Yu Tsai wrote:
> On Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
> >
> > 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.
> >
> > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > ---
> > arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
> > 1 file changed, 40 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > @@ -126,6 +126,15 @@ 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>;
>
> We should probably add
>
> bias-disable;
>
> to explicitly turn off pull-up and pull-down.
>
I will test this and address in v3
(saw your comment in v1, but I sent v2 too quickly)
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-25 5:26 ` Chen-Yu Tsai
2025-04-25 7:06 ` Yixun Lan
@ 2025-04-25 9:41 ` Andre Przywara
2025-04-25 14:35 ` Chen-Yu Tsai
1 sibling, 1 reply; 21+ messages in thread
From: Andre Przywara @ 2025-04-25 9:41 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Corentin Labbe, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
On Fri, 25 Apr 2025 13:26:25 +0800
Chen-Yu Tsai <wens@csie.org> wrote:
Hi Chen-Yu,
> On Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
> >
> > 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.
> >
> > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > ---
> > arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
> > 1 file changed, 40 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > @@ -126,6 +126,15 @@ 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>;
>
> We should probably add
>
> bias-disable;
>
> to explicitly turn off pull-up and pull-down.
Should we? I don't see this anywhere else for sunxi, probably because it is
the (reset) default (0b00).
I wonder if we have a hidden assumption about this? As in: if no bias is
specified, we assume bias-disable? Then we should maybe enforce this is in
the driver?
Cheers,
Andre
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-25 9:41 ` Andre Przywara
@ 2025-04-25 14:35 ` Chen-Yu Tsai
2025-04-25 15:05 ` Andre Przywara
0 siblings, 1 reply; 21+ messages in thread
From: Chen-Yu Tsai @ 2025-04-25 14:35 UTC (permalink / raw)
To: Andre Przywara
Cc: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Corentin Labbe, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
On Fri, Apr 25, 2025 at 5:41 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Fri, 25 Apr 2025 13:26:25 +0800
> Chen-Yu Tsai <wens@csie.org> wrote:
>
> Hi Chen-Yu,
>
> > On Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
> > >
> > > 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.
> > >
> > > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > > ---
> > > arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
> > > 1 file changed, 40 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > > index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > > @@ -126,6 +126,15 @@ 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>;
> >
> > We should probably add
> >
> > bias-disable;
> >
> > to explicitly turn off pull-up and pull-down.
>
> Should we? I don't see this anywhere else for sunxi, probably because it is
> the (reset) default (0b00).
> I wonder if we have a hidden assumption about this? As in: if no bias is
> specified, we assume bias-disable? Then we should maybe enforce this is in
> the driver?
There isn't any assumption, as in we were fine with either the reset
default or whatever the bootloader left it in. However in projects at
work I learned that it's better to have explicit settings despite
working defaults.
ChenYu
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-25 14:35 ` Chen-Yu Tsai
@ 2025-04-25 15:05 ` Andre Przywara
2025-05-09 11:50 ` Linus Walleij
0 siblings, 1 reply; 21+ messages in thread
From: Andre Przywara @ 2025-04-25 15:05 UTC (permalink / raw)
To: Chen-Yu Tsai, Linus Walleij
Cc: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jernej Skrabec, Samuel Holland, Maxime Ripard, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Corentin Labbe, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
On Fri, 25 Apr 2025 22:35:59 +0800
Chen-Yu Tsai <wens@csie.org> wrote:
adding LinusW for a more generic pinctrl question ...
> On Fri, Apr 25, 2025 at 5:41 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >
> > On Fri, 25 Apr 2025 13:26:25 +0800
> > Chen-Yu Tsai <wens@csie.org> wrote:
> >
> > Hi Chen-Yu,
> >
> > > On Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
> > > >
> > > > 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.
> > > >
> > > > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > > > ---
> > > > arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 40 ++++++++++++++++++++++++++
> > > > 1 file changed, 40 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > > > index ee485899ba0af69f32727a53de20051a2e31be1d..c9a9b9dd479af05ba22fe9d783e32f6d61a74ef7 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
> > > > @@ -126,6 +126,15 @@ 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>;
> > >
> > > We should probably add
> > >
> > > bias-disable;
> > >
> > > to explicitly turn off pull-up and pull-down.
> >
> > Should we? I don't see this anywhere else for sunxi, probably because it is
> > the (reset) default (0b00).
> > I wonder if we have a hidden assumption about this? As in: if no bias is
> > specified, we assume bias-disable? Then we should maybe enforce this is in
> > the driver?
>
> There isn't any assumption, as in we were fine with either the reset
> default or whatever the bootloader left it in. However in projects at
> work I learned that it's better to have explicit settings despite
> working defaults.
I totally agree, but my point was that this applies basically to every
pinctrl user. I usually think of the bias settings as "do we need
pull-ups or pull-downs", and if nothing is specified, I somewhat assume
bias-disable.
So I am fine with this being added here, but was wondering if we should
look at a more generic solution.
Linus: is bias-disable assumed to be the default, that pinctrl drivers
should set in absence of explicit properties? Or is this "whatever is in
the registers at boot" the default we have to live with?
Cheers,
Andre
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible
2025-04-24 10:08 ` [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible Yixun Lan
@ 2025-04-27 5:43 ` Chen-Yu Tsai
2025-04-28 12:31 ` Yixun Lan
2025-04-28 7:22 ` Krzysztof Kozlowski
1 sibling, 1 reply; 21+ messages in thread
From: Chen-Yu Tsai @ 2025-04-27 5:43 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, 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 Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
>
> Allwinner A523 SoC variant (A527/T527) contains an "EMAC0" Ethernet
> MAC compatible to the A64 version.
The patch subject prefix should be "dt-bindings: net: sun8i-emac: ".
And this needs an Ack from the DT binding maintainers.
ChenYu
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> 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 [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
2025-04-24 10:08 ` [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
@ 2025-04-28 7:21 ` Krzysztof Kozlowski
2025-04-28 12:21 ` Yixun Lan
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-28 7:21 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 Thu, Apr 24, 2025 at 06:08:39PM 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(+)
>
> 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
No update for the children (sram)?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible
2025-04-24 10:08 ` [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible Yixun Lan
2025-04-27 5:43 ` Chen-Yu Tsai
@ 2025-04-28 7:22 ` Krzysztof Kozlowski
1 sibling, 0 replies; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-28 7:22 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 Thu, Apr 24, 2025 at 06:08:40PM GMT, Yixun Lan wrote:
> Allwinner A523 SoC variant (A527/T527) contains an "EMAC0" Ethernet
> MAC compatible to the A64 version.
>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
> Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 1 +
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
2025-04-28 7:21 ` Krzysztof Kozlowski
@ 2025-04-28 12:21 ` Yixun Lan
2025-04-28 12:44 ` Andre Przywara
0 siblings, 1 reply; 21+ messages in thread
From: Yixun Lan @ 2025-04-28 12:21 UTC (permalink / raw)
To: Krzysztof Kozlowski
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
Hi Krzysztof,
On 09:21 Mon 28 Apr , Krzysztof Kozlowski wrote:
> On Thu, Apr 24, 2025 at 06:08:39PM 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(+)
> >
> > 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
>
> No update for the children (sram)?
>
No, I don't think there is sub node for sram
From address map of A527, there is total 4KB size space of
this section which unlikely has sram available.
but I do see some BROM/SRAM space from 0x0000 0000 - 0x0006 3FFF ..
(which should not be relavant to this patch series..)
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible
2025-04-27 5:43 ` Chen-Yu Tsai
@ 2025-04-28 12:31 ` Yixun Lan
0 siblings, 0 replies; 21+ messages in thread
From: Yixun Lan @ 2025-04-28 12:31 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, 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
Hi All,
On 13:43 Sun 27 Apr , Chen-Yu Tsai wrote:
> On Thu, Apr 24, 2025 at 6:09 PM Yixun Lan <dlan@gentoo.org> wrote:
> >
> > Allwinner A523 SoC variant (A527/T527) contains an "EMAC0" Ethernet
> > MAC compatible to the A64 version.
>
> The patch subject prefix should be "dt-bindings: net: sun8i-emac: ".
>
Ok, I can update in next version
> And this needs an Ack from the DT binding maintainers.
>
I'd assume Krzysztof Kozlowski also fine to have his ack kept in next version
with above subject updated, since I saw he already gave an ack to this patch.
Thanks
Yixun Lan
> ChenYu
>
>
> > Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> > 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 [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible
2025-04-28 12:21 ` Yixun Lan
@ 2025-04-28 12:44 ` Andre Przywara
0 siblings, 0 replies; 21+ messages in thread
From: Andre Przywara @ 2025-04-28 12:44 UTC (permalink / raw)
To: Yixun Lan, Krzysztof Kozlowski
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,
Corentin Labbe, devicetree, linux-arm-kernel, linux-sunxi,
linux-kernel, netdev
On Mon, 28 Apr 2025 12:21:56 +0000
Yixun Lan <dlan@gentoo.org> wrote:
> Hi Krzysztof,
>
> On 09:21 Mon 28 Apr , Krzysztof Kozlowski wrote:
> > On Thu, Apr 24, 2025 at 06:08:39PM 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(+)
> > >
> > > 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
> >
> > No update for the children (sram)?
> >
> No, I don't think there is sub node for sram
> From address map of A527, there is total 4KB size space of
> this section which unlikely has sram available.
That's something else, though. This system controller here *also* contains
a register to switch access to SRAM blocks between the CPU and the devices.
The actual SRAM blocks are somewhere else (hence the empty ranges;
property), check the H616 for instance:
syscon: syscon@3000000 {
compatible = "allwinner,sun50i-h616-system-control";
reg = <0x03000000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
sram_c: sram@28000 {
compatible = "mmio-sram";
reg = <0x00028000 0x30000>;
Krzysztof, we haven't worked out the SRAM regions yet, we typically add
them only when we need them. I think the display engine is a prominent
user, and support for that is quite a bit out at the moment.
From a compatibility standpoint it should be fine to leave this empty for
now, if I am not mistaken?
Cheers,
Andre
> but I do see some BROM/SRAM space from 0x0000 0000 - 0x0006 3FFF ..
> (which should not be relavant to this patch series..)
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC
2025-04-25 15:05 ` Andre Przywara
@ 2025-05-09 11:50 ` Linus Walleij
0 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2025-05-09 11:50 UTC (permalink / raw)
To: Andre Przywara
Cc: Chen-Yu Tsai, Yixun Lan, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Jernej Skrabec, Samuel Holland, Maxime Ripard,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Corentin Labbe, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, netdev
On Fri, Apr 25, 2025 at 5:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
> On Fri, 25 Apr 2025 22:35:59 +0800
> Chen-Yu Tsai <wens@csie.org> wrote:
>
> adding LinusW for a more generic pinctrl question ...
OK!
> > There isn't any assumption, as in we were fine with either the reset
> > default or whatever the bootloader left it in. However in projects at
> > work I learned that it's better to have explicit settings despite
> > working defaults.
>
> I totally agree, but my point was that this applies basically to every
> pinctrl user. I usually think of the bias settings as "do we need
> pull-ups or pull-downs", and if nothing is specified, I somewhat assume
> bias-disable.
>
> So I am fine with this being added here, but was wondering if we should
> look at a more generic solution.
>
> Linus: is bias-disable assumed to be the default, that pinctrl drivers
> should set in absence of explicit properties? Or is this "whatever is in
> the registers at boot" the default we have to live with?
We have never hammered down the semantics of that, so it's a bit
up to the specific driver how they implement it (yeah a grey area...)
There are many drivers that are carful to not touch register boot
values but others who set them to some default, and people
have different opinions on that.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2025-05-09 11:50 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 10:08 [PATCH v2 0/5] allwinner: Add EMAC0 support to A523 variant SoC Yixun Lan
2025-04-24 10:08 ` [PATCH v2 1/5] dt-bindings: sram: sunxi-sram: Add A523 compatible Yixun Lan
2025-04-28 7:21 ` Krzysztof Kozlowski
2025-04-28 12:21 ` Yixun Lan
2025-04-28 12:44 ` Andre Przywara
2025-04-24 10:08 ` [PATCH v2 2/5] dt-bindings: arm: sunxi: Add A523 EMAC0 compatible Yixun Lan
2025-04-27 5:43 ` Chen-Yu Tsai
2025-04-28 12:31 ` Yixun Lan
2025-04-28 7:22 ` Krzysztof Kozlowski
2025-04-24 10:08 ` [PATCH v2 3/5] arm64: dts: allwinner: a523: Add EMAC0 ethernet MAC Yixun Lan
2025-04-24 19:17 ` Corentin Labbe
2025-04-24 23:19 ` Andre Przywara
2025-04-25 5:26 ` Chen-Yu Tsai
2025-04-25 7:06 ` Yixun Lan
2025-04-25 9:41 ` Andre Przywara
2025-04-25 14:35 ` Chen-Yu Tsai
2025-04-25 15:05 ` Andre Przywara
2025-05-09 11:50 ` Linus Walleij
2025-04-24 10:08 ` [PATCH v2 4/5] arm64: dts: allwinner: a527: add EMAC0 to Radxa A5E board Yixun Lan
2025-04-24 19:15 ` Corentin Labbe
2025-04-24 10:08 ` [PATCH v2 5/5] arm64: dts: allwinner: t527: add EMAC0 to Avaota-A1 board Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).