Gigabit ethernet ports

AmigaOne X5000 platform specific issues related to Linux only.
marcus
Posts: 56
Joined: Wed Nov 07, 2012 8:07 pm

Gigabit ethernet ports

Post by marcus »

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: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Gigabit ethernet ports

Post by Spectre660 »

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
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
marcus
Posts: 56
Joined: Wed Nov 07, 2012 8:07 pm

Re: Gigabit ethernet ports

Post by marcus »

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)
daz
Beta Tester
Beta Tester
Posts: 329
Joined: Tue Dec 21, 2010 7:32 pm

Re: Gigabit ethernet ports

Post by daz »

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
marcus
Posts: 56
Joined: Wed Nov 07, 2012 8:07 pm

Re: Gigabit ethernet ports

Post by marcus »

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: 56
Joined: Wed Nov 07, 2012 8:07 pm

Re: Gigabit ethernet ports

Post by marcus »

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
daz
Beta Tester
Beta Tester
Posts: 329
Joined: Tue Dec 21, 2010 7:32 pm

Re: Gigabit ethernet ports

Post by daz »

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 550 times
Regards
Darren
marcus
Posts: 56
Joined: Wed Nov 07, 2012 8:07 pm

Re: Gigabit ethernet ports

Post by marcus »

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?
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Gigabit ethernet ports

Post by Spectre660 »

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
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
daz
Beta Tester
Beta Tester
Posts: 329
Joined: Tue Dec 21, 2010 7:32 pm

Re: Gigabit ethernet ports

Post by daz »

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
Post Reply