Discussion:
[PATCH 0/3] Add ethernet0 alias for several A64 boards
Icenowy Zheng
2017-07-22 02:28:49 UTC
Permalink
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.

The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the eFUSE
SID in the chip, and add the generated MAC address to the device
tree when booting.

The MAC address setting step is based on the device tree's aliases,
and device tree nodes prefixed "ethernet" will get the MAC address
added. However, in several A64 boards' device tree, the alias is not
set up, so that the U-Boot won't set the MAC address.

Add the ethernet0 aliases to these boards.

I hope this patchset can be queued in 4.13, otherwise 4.13 kernels
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.

Icenowy Zheng (3):
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC node

arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 1 +
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 1 +
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 1 +
3 files changed, 3 insertions(+)
--
2.13.0
Icenowy Zheng
2017-07-22 02:28:50 UTC
Permalink
The Banana Pi M64 board uses the A64 chip's EMAC to provide Ethernet
link.

Add the ethernet0 alias in the device tree, in order to let U-Boot
generate a MAC address from the chip's SID.

Signed-off-by: Icenowy Zheng <***@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 0d1f026d831a..ba2fde2909f9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -51,6 +51,7 @@
compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";

aliases {
+ ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
};
--
2.13.0
Icenowy Zheng
2017-07-22 02:28:51 UTC
Permalink
The Pine64 (including the Plus models) board uses the A64 chip's
EMAC to provide Ethernet link.

Add the ethernet0 alias in the device tree, in order to let U-Boot
generate a MAC address from the chip's SID.

Signed-off-by: Icenowy Zheng <***@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 64cce0d68cae..7a450dcb7a08 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -51,6 +51,7 @@
compatible = "pine64,pine64", "allwinner,sun50i-a64";

aliases {
+ ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
--
2.13.0
Icenowy Zheng
2017-07-22 02:28:52 UTC
Permalink
The SoPine official baseboard uses the A64 chip's EMAC to provide an
Ethernet link.

Add the ethernet0 alias in the device tree, in order to let U-Boot
generate a MAC address from the chip's SID.

Signed-off-by: Icenowy Zheng <***@aosc.io>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index 17eb1cc5bf6b..216e3a5dafae 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -53,6 +53,7 @@
"allwinner,sun50i-a64";

aliases {
+ ethernet0 = &emac;
serial0 = &uart0;
};
--
2.13.0
Maxime Ripard
2017-07-24 07:58:23 UTC
Permalink
Post by Icenowy Zheng
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.
The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the eFUSE
SID in the chip, and add the generated MAC address to the device
tree when booting.
The MAC address setting step is based on the device tree's aliases,
and device tree nodes prefixed "ethernet" will get the MAC address
added. However, in several A64 boards' device tree, the alias is not
set up, so that the U-Boot won't set the MAC address.
Add the ethernet0 aliases to these boards.
I hope this patchset can be queued in 4.13, otherwise 4.13 kernels
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC node
Applied all three, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
i***@aosc.io
2017-07-25 03:04:24 UTC
Permalink
在 2017-07-24 15:58,Maxime Ripard 写道:
Post by Maxime Ripard
Post by Icenowy Zheng
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.
The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the eFUSE
SID in the chip, and add the generated MAC address to the device
tree when booting.
The MAC address setting step is based on the device tree's aliases,
and device tree nodes prefixed "ethernet" will get the MAC address
added. However, in several A64 boards' device tree, the alias is not
set up, so that the U-Boot won't set the MAC address.
Add the ethernet0 aliases to these boards.
I hope this patchset can be queued in 4.13, otherwise 4.13 kernels
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC node
Applied all three, thanks!
Sorry, but could you queue them to 4.13?

Otherwise 4.13 kernel release will have annoying random MAC problem,
which heavily affects headless usages.
Post by Maxime Ripard
Maxime
_______________________________________________
linux-arm-kernel mailing list
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Adam Borowski
2017-07-25 03:18:19 UTC
Permalink
Post by i***@aosc.io
在 2017-07-24 15:58,Maxime Ripard 写道:
Post by Maxime Ripard
Post by Icenowy Zheng
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.
The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the eFUSE
SID in the chip, and add the generated MAC address to the device
tree when booting.
The MAC address setting step is based on the device tree's aliases,
and device tree nodes prefixed "ethernet" will get the MAC address
added. However, in several A64 boards' device tree, the alias is not
set up, so that the U-Boot won't set the MAC address.
Add the ethernet0 aliases to these boards.
I hope this patchset can be queued in 4.13, otherwise 4.13 kernels
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC node
Applied all three, thanks!
Sorry, but could you queue them to 4.13?
Otherwise 4.13 kernel release will have annoying random MAC problem,
which heavily affects headless usages.
Perhaps it would be better to reword the commit subject as "fix missing
ethernet0 alias ..."? That'd convey that the previous behaviour is a defect
that needs these patches as a fix.


Meow!
--
// If you believe in so-called "intellectual property", please immediately
// cease using counterfeit alphabets. Instead, contact the nearest temple
// of Amon, whose priests will provide you with scribal services for all
// your writing needs, for Reasonable and Non-Discriminatory prices.
Maxime Ripard
2017-07-25 14:31:27 UTC
Permalink
Post by Adam Borowski
圚 2017-07-24 15:58Maxime Ripard 写道
Post by Maxime Ripard
Post by Icenowy Zheng
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.
The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the eFUSE
SID in the chip, and add the generated MAC address to the device
tree when booting.
The MAC address setting step is based on the device tree's aliases,
and device tree nodes prefixed "ethernet" will get the MAC address
added. However, in several A64 boards' device tree, the alias is not
set up, so that the U-Boot won't set the MAC address.
Add the ethernet0 aliases to these boards.
I hope this patchset can be queued in 4.13, otherwise 4.13 kernels
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC node
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC node
Applied all three, thanks!
Sorry, but could you queue them to 4.13?
Otherwise 4.13 kernel release will have annoying random MAC problem,
which heavily affects headless usages.
Perhaps it would be better to reword the commit subject as "fix missing
ethernet0 alias ..."? That'd convey that the previous behaviour is a defect
that needs these patches as a fix.
Yes, definitely.

That and having a fixes: tag.

Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Icenowy Zheng
2017-07-25 23:54:31 UTC
Permalink
Post by Icenowy Zheng
Post by Adam Borowski
Post by i***@aosc.io
在 2017-07-24 15:58,Maxime Ripard 写道:
Post by Maxime Ripard
Post by Icenowy Zheng
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.
The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the
eFUSE
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
SID in the chip, and add the generated MAC address to the
device
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
tree when booting.
The MAC address setting step is based on the device tree's
aliases,
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
and device tree nodes prefixed "ethernet" will get the MAC
address
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
added. However, in several A64 boards' device tree, the alias
is not
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
set up, so that the U-Boot won't set the MAC address.
Add the ethernet0 aliases to these boards.
I hope this patchset can be queued in 4.13, otherwise 4.13
kernels
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC
node
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC
node
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC
node
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Applied all three, thanks!
Sorry, but could you queue them to 4.13?
Otherwise 4.13 kernel release will have annoying random MAC
problem,
Post by Adam Borowski
Post by i***@aosc.io
which heavily affects headless usages.
Perhaps it would be better to reword the commit subject as "fix
missing
Post by Adam Borowski
ethernet0 alias ..."? That'd convey that the previous behaviour is a
defect
Post by Adam Borowski
that needs these patches as a fix.
Yes, definitely.
That and having a fixes: tag.
Should I resend them with different commit message?
Post by Icenowy Zheng
Maxime
Chen-Yu Tsai
2017-07-26 04:12:21 UTC
Permalink
Post by Icenowy Zheng
Post by Icenowy Zheng
Post by Adam Borowski
Post by i***@aosc.io
在 2017-07-24 15:58,Maxime Ripard 写道:
Post by Maxime Ripard
Post by Icenowy Zheng
Allwinner A64 SoC has an EMAC which is used to provide Ethernet
function on several boards.
The EMAC itself doesn't have a fixed MAC address, but the sunxi
mainline U-Boot have the ability to generate one based on the
eFUSE
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
SID in the chip, and add the generated MAC address to the
device
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
tree when booting.
The MAC address setting step is based on the device tree's
aliases,
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
and device tree nodes prefixed "ethernet" will get the MAC
address
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
added. However, in several A64 boards' device tree, the alias
is not
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
set up, so that the U-Boot won't set the MAC address.
Add the ethernet0 aliases to these boards.
I hope this patchset can be queued in 4.13, otherwise 4.13
kernels
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
won't get non-volatile MAC addresses, and will use random ones
instead, which is annoying to many users.
arm64: allwinner: a64: add ethernet0 alias for BPi M64 EMAC
node
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
arm64: allwinner: a64: add ethernet0 alias for Pine64 EMAC
node
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Post by Icenowy Zheng
arm64: allwinner: a64: add ethernet0 alias for SoPine EMAC
node
Post by Adam Borowski
Post by i***@aosc.io
Post by Maxime Ripard
Applied all three, thanks!
Sorry, but could you queue them to 4.13?
Otherwise 4.13 kernel release will have annoying random MAC
problem,
Post by Adam Borowski
Post by i***@aosc.io
which heavily affects headless usages.
Perhaps it would be better to reword the commit subject as "fix
missing
Post by Adam Borowski
ethernet0 alias ..."? That'd convey that the previous behaviour is a
defect
Post by Adam Borowski
that needs these patches as a fix.
Yes, definitely.
That and having a fixes: tag.
Should I resend them with different commit message?
Yes please. And add the "Fixes:" tag.

ChenYu

Continue reading on narkive:
Loading...