Skip to contentSkip to conversation

arm: dts: Pine64: add Ethernet alias

PATCH New Andre Przywara 4 participants 16 messages Oct 21, 2016 – Oct 30, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		ethernet0 = &emac;
 	};
 
 	soc {
Signature · 1 line
2.8.2
#1 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 15 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#2 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Hi,

Quoted 24 lines · Jagan Teki
Quoted 15 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 5 lines
Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

Yes, it just didn't work ;-) I don't have a board here, but can post the error message later tonight.
In fact I was wondering about that already, maybe it's worth investigating this further.

But aside from that I think the MAC address calculation based on the SID serial number does not get triggered without an alias, so we need this line anyway.

Cheers,
Andre.

#3 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Hi,

Quoted 33 lines · Andre Przywara

Hi,

Quoted 24 lines · Jagan Teki
Quoted 15 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 5 lines
Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

Quoted 8 lines

Yes, it just didn't work ;-) I don't have a board here, but can post the error message later tonight.
In fact I was wondering about that already, maybe it's worth investigating this further.

But aside from that I think the MAC address calculation based on the SID serial number does not get triggered without an alias, so we need this line anyway.

Correct, the MAC address code relies on the alias.

Regards,

Hans

#4 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 40 lines · Hans de Goede

Hi,

Quoted 37 lines · Andre Przywara

Hi,

Quoted 26 lines · Jagan Teki
Quoted 16 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 5 lines
Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

Yes, it just didn't work ;-) I don't have a board here, but can post the error message later tonight.

....
Net: phy interface7

Error: ethernet at 01c30000 address not set.
No ethernet found.
....

Quoted 2 lines
Quoted 2 lines

In fact I was wondering about that already, maybe it's worth investigating this further.

So the reason is that CONFIG_NET_RANDOM_ETHADDR isn't defined, so without the DT alias triggering the SID MAC generation there will be _no_ MAC address at all, which makes the driver give up. AFAIK on the A64 the MAC generation from the SID serial number works just fine, so we should in any case add the alias.

I can resend the patch with an amended commit message.

Cheers,
Andre.

Quoted 11 lines
Quoted 4 lines

But aside from that I think the MAC address calculation based on the SID serial number does not get triggered without an alias, so we need this line anyway.

Correct, the MAC address code relies on the alias.

Regards,

Hans

#5 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 49 lines · Andr? Przywara
Quoted 40 lines · Hans de Goede

Hi,

Quoted 37 lines · Andre Przywara

Hi,

Quoted 26 lines · Jagan Teki
Quoted 16 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 5 lines
Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

Yes, it just didn't work ;-) I don't have a board here, but can post the error message later tonight.

....
Net: phy interface7

Error: ethernet at 01c30000 address not set.
No ethernet found.
....

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

In fact I was wondering about that already, maybe it's worth investigating this further.

So the reason is that CONFIG_NET_RANDOM_ETHADDR isn't defined, so without the DT alias triggering the SID MAC generation there will be _no_ MAC address at all, which makes the driver give up. AFAIK on the A64 the MAC generation from the SID serial number works just fine, so we should in any case add the alias.

I wondered how the alias related to MAC generation, tried fec_mxc without ethernet0 alias but couldn't find the change/generation on MAC at-all.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#6 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Hi,

Quoted 53 lines · Jagan Teki
Quoted 52 lines · Andr? Przywara
Quoted 40 lines · Hans de Goede

Hi,

Quoted 37 lines · Andre Przywara

Hi,

Quoted 26 lines · Jagan Teki
Quoted 16 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 5 lines
Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

Yes, it just didn't work ;-) I don't have a board here, but can post the error message later tonight.

....
Net: phy interface7

Error: ethernet at 01c30000 address not set.
No ethernet found.
....

Quoted 2 lines
Quoted 2 lines

In fact I was wondering about that already, maybe it's worth investigating this further.

Quoted 7 lines
Quoted 5 lines

So the reason is that CONFIG_NET_RANDOM_ETHADDR isn't defined, so without the DT alias triggering the SID MAC generation there will be _no_ MAC address at all, which makes the driver give up. AFAIK on the A64 the MAC generation from the SID serial number works just fine, so we should in any case add the alias.

I wondered how the alias related to MAC generation,

See the setup_environment() function in board/sunxi/board.c, we use the alias-es to determine for which interface we need to generate a random MAC and set ethaddr / eth1addr in the environment.

Regards,

Hans

#7 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 77 lines · Hans de Goede

Hi,

Quoted 73 lines · Jagan Teki
Quoted 68 lines · Andr? Przywara
Quoted 48 lines · Hans de Goede

Hi,

Quoted 44 lines · Andre Przywara

Hi,

Quoted 29 lines · Jagan Teki
Quoted 17 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

I think alias doesn?t require for probing emac, it will straight away probed like

Quoted 6 lines
Quoted 1 line

dm tree

....
eth [ + ] ethernet at 01c30000

Did you find any issue while detecting eth?

Yes, it just didn't work ;-) I don't have a board here, but can post the
error message later tonight.

....
Net: phy interface7

Error: ethernet at 01c30000 address not set.
No ethernet found.
....

Quoted 2 lines
Quoted 2 lines

In fact I was wondering about that already, maybe it's worth investigating this further.

So the reason is that CONFIG_NET_RANDOM_ETHADDR isn't defined, so without the DT alias triggering the SID MAC generation there will be _no_ MAC address at all, which makes the driver give up. AFAIK on the A64 the MAC generation from the SID serial number works just fine, so we should in any case add the alias.

Quoted 6 lines
Quoted 1 line

I wondered how the alias related to MAC generation,

See the setup_environment() function in board/sunxi/board.c, we use the alias-es to determine for which interface we need to generate a random MAC and set ethaddr / eth1addr in the environment.

Ohh,OK.
But not a good way of setting MAC on the board files. I think if we add .read_rom_hwaddr on the driver by placing SIM code on arch.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#8 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

In reply to Andre Przywara
Quoted 15 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 4 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
@@ -46,6 +46,7 @@
 
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#9 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

On 26/10/16 19:51, Jagan Teki wrote:
Hi,

Quoted 17 lines · Andre Przywara
Quoted 16 lines

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
Quoted 5 lines

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 3 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

Mmh, I find examples for both ways (.dtsi vs. .dts) in the kernel. I need to learn what's the best practice here.

But the U-Boot DTs need to get replaced anyway soon-ish, since the Linux DTs (which are WIP) have already diverged.
So what about we keep this alias here next to the existing one for the 2016.11 release and possibly fix this later once we replace the DTs anyway with what gets merged into the kernel eventually?

In the end of the day it's an easy and obvious fix which makes many people happy (since it allows TFTP boot of the Pine64).

Cheers,
Andre.

#10 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Hi Andr?,

Am 26.10.2016 um 22:50 schrieb Andr? Przywara:

Quoted 18 lines · Jagan Teki
Quoted 17 lines · Andre Przywara
Quoted 16 lines

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
Quoted 8 lines
Quoted 5 lines

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 3 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

Mmh, I find examples for both ways (.dtsi vs. .dts) in the kernel. I need to learn what's the best practice here.

Last I was told by kernel maintainers (in an Amlogic context) aliases should be in the board's .dts[i] so that only the enabled nodes get numbered. If they're enabled at .dtsi level then I guess nothing is wrong with having the alias there. So I'm guessing the patch is good.

Cheers,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#11 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

In reply to André Przywara
Quoted 26 lines · Andr? Przywara

On 26/10/16 19:51, Jagan Teki wrote:
Hi,

Quoted 17 lines · Andre Przywara
Quoted 16 lines

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
Quoted 5 lines

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 3 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

Quoted 8 lines

Mmh, I find examples for both ways (.dtsi vs. .dts) in the kernel. I need to learn what's the best practice here.

But the U-Boot DTs need to get replaced anyway soon-ish, since the Linux DTs (which are WIP) have already diverged.
So what about we keep this alias here next to the existing one for the 2016.11 release and possibly fix this later once we replace the DTs anyway with what gets merged into the kernel eventually?

OK, but please stick with the current discussion and still I see a good point to see alias on dtsi because the dts files which are using this dtsi shouldn't separately define the alias.

And also status on dtsi is showing "disabled" are you enabled it some other patches? or missed?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#12 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 36 lines · Jagan Teki
Quoted 26 lines · Andr? Przywara

On 26/10/16 19:51, Jagan Teki wrote:
Hi,

Quoted 17 lines · Andre Przywara
Quoted 16 lines

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
Quoted 5 lines

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 3 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

Quoted 8 lines

Mmh, I find examples for both ways (.dtsi vs. .dts) in the kernel. I need to learn what's the best practice here.

But the U-Boot DTs need to get replaced anyway soon-ish, since the Linux DTs (which are WIP) have already diverged.
So what about we keep this alias here next to the existing one for the 2016.11 release and possibly fix this later once we replace the DTs anyway with what gets merged into the kernel eventually?

Quoted 6 lines

OK, but please stick with the current discussion and still I see a good point to see alias on dtsi because the dts files which are using this dtsi shouldn't separately define the alias.

And also status on dtsi is showing "disabled" are you enabled it some other patches? or missed?

Any response for this?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#13 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 37 lines · Jagan Teki
Quoted 36 lines · Jagan Teki
Quoted 34 lines · Andr? Przywara

On 26/10/16 19:51, Jagan Teki wrote:
Hi,

Quoted 17 lines · Andre Przywara
Quoted 16 lines

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
Quoted 5 lines

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 3 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

Mmh, I find examples for both ways (.dtsi vs. .dts) in the kernel. I need to learn what's the best practice here.

But the U-Boot DTs need to get replaced anyway soon-ish, since the Linux DTs (which are WIP) have already diverged.
So what about we keep this alias here next to the existing one for the 2016.11 release and possibly fix this later once we replace the DTs anyway with what gets merged into the kernel eventually?

Quoted 6 lines
Quoted 6 lines

OK, but please stick with the current discussion and still I see a good point to see alias on dtsi because the dts files which are using this dtsi shouldn't separately define the alias.

And also status on dtsi is showing "disabled" are you enabled it some other patches? or missed?

We have the status = "okay" in sun50i-a64-pine64-plus.dts, which is the only dts that is used these days.
The non-plus board version has a different PHY (100 MBit only) and a quick test a while ago showed that this didn't work out of the box, so we just don't enable it there. It seems like that not many people have this version of the board and they would need to hack U-Boot to use it anyway (because defconfig select -plus.dts).
This will be revisited when the SPL FIT support introduces board detection and we actually choose the proper DT for each board.

Cheers,
Andre.

#14 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

Quoted 45 lines · Andr? Przywara
Quoted 37 lines · Jagan Teki
Quoted 36 lines · Jagan Teki
Quoted 34 lines · Andr? Przywara

On 26/10/16 19:51, Jagan Teki wrote:
Hi,

Quoted 17 lines · Andre Przywara
Quoted 16 lines

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +0 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
Quoted 5 lines

arch/arm/dts/sun50i-a64-pine64-common.dtsi line 49

Quoted 3 lines
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
        aliases {
                serial0 = &uart0;
+               ethernet0 = &emac;

Better to have this alias on sun50i-a64.dtsi since the node is defined there?

Mmh, I find examples for both ways (.dtsi vs. .dts) in the kernel. I need to learn what's the best practice here.

But the U-Boot DTs need to get replaced anyway soon-ish, since the Linux DTs (which are WIP) have already diverged.
So what about we keep this alias here next to the existing one for the 2016.11 release and possibly fix this later once we replace the DTs anyway with what gets merged into the kernel eventually?

Quoted 6 lines
Quoted 6 lines

OK, but please stick with the current discussion and still I see a good point to see alias on dtsi because the dts files which are using this dtsi shouldn't separately define the alias.

And also status on dtsi is showing "disabled" are you enabled it some other patches? or missed?

Quoted 9 lines

We have the status = "okay" in sun50i-a64-pine64-plus.dts, which is the only dts that is used these days.
The non-plus board version has a different PHY (100 MBit only) and a quick test a while ago showed that this didn't work out of the box, so we just don't enable it there. It seems like that not many people have this version of the board and they would need to hack U-Boot to use it anyway (because defconfig select -plus.dts).
This will be revisited when the SPL FIT support introduces board detection and we actually choose the proper DT for each board.

OK.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#15 lore raw

PATCH 1/1 arm: dts: Pine64: add Ethernet alias

In reply to Andre Przywara

Hi,

Quoted 6 lines · Andre Przywara

The sun8i-emac driver works fine with the A64 Ethernet IP, but we are missing an alias entry to trigger the driver instantiation by U-Boot. Add the line to point U-Boot to the Ethernet DT node.
This enables TFTP boot on the Pine64.

Thank you I've applied this to my tree and will
include it in my next pull-req.

Regards,

Hans

Quoted 17 lines
---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/sun50i-a64-pine64-common.dtsi +1 -0
index d5a7249..c0fde44 100644
@@ -46,6 +46,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		ethernet0 = &emac;
 	};
 
 	soc {