Page 1 of 2

Gigabit ethernet ports

Posted: Wed Apr 19, 2017 6:42 pm
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

Re: Gigabit ethernet ports

Posted: Wed Apr 19, 2017 9:36 pm
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

Re: Gigabit ethernet ports

Posted: Wed Apr 19, 2017 10:05 pm
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)

Re: Gigabit ethernet ports

Posted: Sat Apr 22, 2017 11:12 am
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

Re: Gigabit ethernet ports

Posted: Sat Apr 22, 2017 11:27 am
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.

Re: Gigabit ethernet ports

Posted: Sat Apr 22, 2017 12:01 pm
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

Re: Gigabit ethernet ports

Posted: Mon Apr 24, 2017 5:45 pm
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

Re: Gigabit ethernet ports

Posted: Mon Apr 24, 2017 9:54 pm
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?

Re: Gigabit ethernet ports

Posted: Tue Apr 25, 2017 3:56 pm
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

Re: Gigabit ethernet ports

Posted: Tue Apr 25, 2017 7:29 pm
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