Gigabit ethernet ports

AmigaOne X5000 platform specific issues related to Linux only.

Gigabit ethernet ports

Postby marcus » Wed Apr 19, 2017 7:42 pm

Hi.

The gigabit ethernet ports are usable from U-Boot, however in Linux they do not work because the DTS file does not declare the PHYs and their connections (RGMII/SGMII/??) to the MACs. (Compare e.g. p5020ds.dts which does this, but for a different board obviously.)

Does anyone have a device tree with the correct PHY config? Is the U-Boot source code available so that I can copy the config from there?

Thanks
marcus
 
Posts: 53
Joined: Wed Nov 07, 2012 9:07 pm

Re: Gigabit ethernet ports

Postby Spectre660 » Wed Apr 19, 2017 10:36 pm

I am Curious .
Is the following enabled in your kernel .config ?
CONFIG_GIANFAR=y

marcus wrote:Hi.

The gigabit ethernet ports are usable from U-Boot, however in Linux they do not work because the DTS file does not declare the PHYs and their connections (RGMII/SGMII/??) to the MACs. (Compare e.g. p5020ds.dts which does this, but for a different board obviously.)

Does anyone have a device tree with the correct PHY config? Is the U-Boot source code available so that I can copy the config from there?

Thanks
Spectre660
 
Posts: 1287
Joined: Sat Jun 18, 2011 3:16 pm
Location: Montserrat

Re: Gigabit ethernet ports

Postby marcus » Wed Apr 19, 2017 11:05 pm

Is the following enabled in your kernel .config ?
CONFIG_GIANFAR=y

Yes. Also CONFIG_FSL_FMAN=y, CONFIG_FSL_DPAA=y and CONFIG_FSL_DPAA_ETH=y.
I have eth0-eth5 available in ifconfig. Only problem is if I try to bring them up, I get
Code: Select all
SIOCSIFFLAGS: No such device

and in dmesg
Code: Select all
[11669.891742] fsl_dpa dpaa-ethernet.0 eth0: Could not connect to PHY
[11669.891749] fsl_dpa dpaa-ethernet.0 eth0: init_phy() failed

This seems logical since the phy-handle property is not set on the device tree nodes (soc@ffe000000/fman@400000/ethernet@e0000 etc)
marcus
 
Posts: 53
Joined: Wed Nov 07, 2012 9:07 pm

Re: Gigabit ethernet ports

Postby daz » Sat Apr 22, 2017 12:12 pm

marcus wrote:
Is the following enabled in your kernel .config ?
CONFIG_GIANFAR=y

Yes. Also CONFIG_FSL_FMAN=y, CONFIG_FSL_DPAA=y and CONFIG_FSL_DPAA_ETH=y.
I have eth0-eth5 available in ifconfig. Only problem is if I try to bring them up, I get
Code: Select all
SIOCSIFFLAGS: No such device

and in dmesg
Code: Select all
[11669.891742] fsl_dpa dpaa-ethernet.0 eth0: Could not connect to PHY
[11669.891749] fsl_dpa dpaa-ethernet.0 eth0: init_phy() failed

This seems logical since the phy-handle property is not set on the device tree nodes (soc@ffe000000/fman@400000/ethernet@e0000 etc)


Where are you getting your DTB from? I've using my onboard ethernet right now. You could try using the ones we provide.

Have you enabled CONFIG_VITESSE_PHY and the various CONFIG_MDIO_BUS options too, as thats how they are attached.

Regards
Darren
daz
Beta Tester
Beta Tester
 
Posts: 299
Joined: Tue Dec 21, 2010 8:32 pm

Re: Gigabit ethernet ports

Postby marcus » Sat Apr 22, 2017 12:27 pm

I'm using the upstreams kernel 4.10.10 sources, generating the DTB from arch/powerpc/boot/dts/fsl/cyrus_p5020.dts.

IIRC the DTB from the Ubuntu MATE Live USB did not give me working ethernet either, but I can try that one again. There were no DTBs (or Linux anything) delivered with the X5000 board.

All the MDIO_BUS configs seem to be on, but the VITESSE_PHY is off, so I'll try enabling that as well. I based my kernel config on the kernels posted by xeno74, which do not have VITESSE_PHY enabled.
marcus
 
Posts: 53
Joined: Wed Nov 07, 2012 9:07 pm

Re: Gigabit ethernet ports

Postby marcus » Sat Apr 22, 2017 1:01 pm

Nope, adding VITESSE_PHY made no difference, the dmesg error is the same as before. If I use the DTB from Ubuntu MATE Live USB the interfaces don't even show up in ifconfig.

If you have a working DTS/DTB then I would love to get it.

TIA
marcus
 
Posts: 53
Joined: Wed Nov 07, 2012 9:07 pm

Re: Gigabit ethernet ports

Postby daz » Mon Apr 24, 2017 6:45 pm

marcus wrote:Nope, adding VITESSE_PHY made no difference, the dmesg error is the same as before. If I use the DTB from Ubuntu MATE Live USB the interfaces don't even show up in ifconfig.

If you have a working DTS/DTB then I would love to get it.

TIA

Try this one, its the one we got with the initial linux install.

(It is compressed as forum needs it like that)
cyrus.dtb.zip
dtb with ethernet
(5.74 KiB) Downloaded 54 times

Regards
Darren
daz
Beta Tester
Beta Tester
 
Posts: 299
Joined: Tue Dec 21, 2010 8:32 pm

Re: Gigabit ethernet ports

Postby marcus » Mon Apr 24, 2017 10:54 pm

Well, that made a difference at least, but not to the better: now fman fails to init:
Code: Select all
[    7.313993] fsl-fman ffe400000.fman: read_dts_node: Failed to get FM0 clock structure
[    7.314155] fsl-fman: probe of ffe400000.fman failed with error -5

Which kernel version does this DTB work with?
marcus
 
Posts: 53
Joined: Wed Nov 07, 2012 9:07 pm

Re: Gigabit ethernet ports

Postby Spectre660 » Tue Apr 25, 2017 4:56 pm

This appears to be exactly the same as the original dtb which is on the Ubuntu MATE Live USB .
So maybe the issue is with the actual .configs used to compile the kernels.

1350d37eb24c3465d6e255f4f6883610 *cyrus_5020.dtb
1350d37eb24c3465d6e255f4f6883610 *cyrus_5020_ethernet.dtb

aa482967fb279e2cb457dc217bd6e5d2 *cyrus_5020-poweroff.dtb
Spectre660
 
Posts: 1287
Joined: Sat Jun 18, 2011 3:16 pm
Location: Montserrat

Re: Gigabit ethernet ports

Postby daz » Tue Apr 25, 2017 8:29 pm

Spectre660 wrote:This appears to be exactly the same as the original dtb which is on the Ubuntu MATE Live USB .
So maybe the issue is with the actual .configs used to compile the kernels.

1350d37eb24c3465d6e255f4f6883610 *cyrus_5020.dtb
1350d37eb24c3465d6e255f4f6883610 *cyrus_5020_ethernet.dtb

Yes, these are the ones supplied with the original fsl-sdk-1.7 kernel based on 3.8. It worked on quite a few later kernels too. Something has changed in the kernel source, I'm not sure what.

I am investigating.

Regards
Darren
daz
Beta Tester
Beta Tester
 
Posts: 299
Joined: Tue Dec 21, 2010 8:32 pm

Next

Return to Platform: AmigaOne X5000 - Linux Only

Who is online

Users browsing this forum: No registered users and 2 guests

cron