[meta-xilinx] 2nd ethernet port not detected

Edward Wingate edwingate8 at gmail.com
Mon May 18 11:41:47 PDT 2015


Linux detects eth1, but I get an error "unable to generate target
frequency: 2500000 Hz" when trying to use eth1:
[    1.802333] libphy: MACB_mii_bus: probed
[    1.809374] macb e000b000.ps7-ethernet eth0: Cadence GEM at
0xe000b000 irq 54 (00:0a:35:00:01:22)
[    1.818257] macb e000b000.ps7-ethernet eth0: attached PHY driver
[Marvell 88E1510] (mii_bus:phy_addr=e000b000.ps7-eth:00, irq=-1)
[    1.831091] libphy: MACB_mii_bus: probed
[    1.914646] macb e000c000.ps7-ethernet eth1: Cadence GEM at
0xe000c000 irq 77 (00:0a:35:00:00:01)
[    1.923443] macb e000c000.ps7-ethernet eth1: attached PHY driver
[Generic PHY] (mii_bus:phy_addr=e000c000.ps7-eth:08, irq=-1)
[    5.914664] macb e000c000.ps7-ethernet eth1: unable to generate
target frequency: 2500000 Hz
[    8.804755] macb e000b000.ps7-ethernet eth0: link up (1000/Full)

This is the device tree for the ethernet ports (It is a combination of
the zedboard's device tree and the device tree Mike pointed me to):

ps7_ethernet_0: ps7-ethernet at e000b000 {
    phy-handle = <&phy0>;
    phy-mode = "rgmii-id";
    phy0: phy at 0 {
        compatible = "marvell,88e1518";
        device_type = "ethernet-phy";
        reg = <0>;
    } ;
} ;
ps7_ethernet_1: ps7-ethernet at e000c000 {
    status = "okay";
    phy-mode = "gmii";  /* I also tried "rgmii-id" here, but didn't
work either */
    phy-handle = <&phy1>;
    gmii2rgmii-phy-handle = <&phy_fpga>;
    phy1: phy at 3 {
        compatible = "marvell,88e1518";
        device_type = "ethernet-phy";
        reg = <0x3>;
    } ;
    phy_fpga: phy at 8 {
        /* Internal GMII to RGMII adapter PHY */
        reg = <0x8>;
    } ;
} ;

I understand the PHY address of 0 is for broadcast, but from what I
understand of the custom Zynq board I am using, each PHY is on its own
bus, so it shouldn't matter in this case that I'm using the broadcast
address (at least for my purposes at the moment).

For ethernet_1, the Internal GMII to RGMII adapter (phy_fpga) does
have a PHY address of 8.  But for phy1 (arbitrarily set to 3), does it
need to match a hardware value?  Or is it set here just for Linux to
use?

Mike, the config you provided has these lines for phy1:
    interrupt-parent = <&gpio>;
    interrupts = <65 0x8>; /* GPIO 65 (EMIO 11), IRQ_TYPE_LEVEL_LOW */

I left these out because I wasn't sure if these specific to your
hardware, or if they're generally used with the GMII to RGMII adapter.
The only gpio related entry in the device tree is this (unchanged from
the Zedboard device tree):
    ps7_gpio_0: ps7-gpio at e000a000 {
        gpio-mask-high = <0xc0000>;
        gpio-mask-low = <0xfe81>;
    } ;

Is the "unable to generate target frequency" error because of a
misconfiguration in my device tree?

Thanks for your help.



On Sun, May 17, 2015 at 11:49 PM, Mike Looijmans
<mike.looijmans at topic.nl> wrote:
> For the GMII-to-RGMII conversion, we have this in the devicetree (search for
> the "&eth" label:
>
> https://github.com/topic-embedded-products/linux/blob/topic-miami/arch/arm/boot/dts/topic-miami-florida.dtsi
>
> Apparently the driver needs a "gmii2rgmii-phy-handle" property. Note that
> the logic has a hidden internal PHY, which defaults to ID 8, which you'll
> need to supply so the driver forwards the right clock settings to it. The
> external PHY must have a different ID, so ID 8 may clash with that.
>
> On another note, ID 0 is not a valid PHY ID (it's the broadcast address, so
> it will only work if there's only one PHY, but you really should not use
> it).
>
>
>
> On 15-05-15 06:11, Nathan Rossi wrote:
>>
>> On Fri, May 15, 2015 at 8:41 AM, Edward Wingate <edwingate8 at gmail.com>
>> wrote:
>>>
>>> Just to give more infomation on this, ps7_ethernet_0 goes out MDIO to
>>> the PHY chip, while ps7_ethernet_1 goes out EMIO to a GMII to RGMII IP
>>> block and then to another PHY chip.  Both PHY are the Marvell 88E1518.
>>> Is my device tree for ethernet_1 incorrect for this hardware
>>> configuration?
>>
>>
>> Hi Edward,
>>
>> So one thing to note here is that the macb driver might not support
>> the GMII->RGMII wrapper, I believe there was some additional code
>> paths in the linux-xlnx emacps driver for it and at least one
>> additional device tree binding you might need.
>>
>>
>> https://github.com/Xilinx/linux-xlnx/blob/xlnx_3.14/drivers/net/ethernet/xilinx/xilinx_emacps.c#L2810
>>
>> (If you need the linux-xlnx emacps driver there was a earlier thread
>> where disabling the macb driver was described:
>> https://lists.yoctoproject.org/pipermail/meta-xilinx/2015-May/000970.html)
>>
>>>
>>> On Thu, May 14, 2015 at 3:10 PM, Edward Wingate <edwingate8 at gmail.com>
>>> wrote:
>>>>
>>>> I have 2 ethernet devices on my custom Zynq board, but Linux only
>>>> detects 1 of them.
>>>>
>>>> [    1.832276] macb e000b000.ps7-ethernet eth0: Cadence GEM at
>>>> 0xe000b000 irq 54 (00:0a:35:00:01:22)
>>>> [    1.841161] macb e000b000.ps7-ethernet eth0: attached PHY driver
>>>> [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ps7-eth:00, irq=-1)
>>>>
>>>> eth0 seems to work fine. I can ssh into the board.
>>>> There are no corresponding messages for eth1.
>>>>
>>>> My device tree for the ethernet devices looks like this:
>>>>
>>>> ps7_ethernet_0: ps7-ethernet at e000b000 {
>>>>      phy-handle = <&phy0>;
>>>>      phy-mode = "rgmii-id";
>>>>      phy0: phy at 0 {
>>>>          compatible = "marvell,88e1518";
>>>>          device_type = "ethernet-phy";
>>>>          reg = <0>;
>>>>      } ;
>>>> } ;
>>>>
>>>> ps7_ethernet_1: ps7-ethernet at e000c000 {
>>>>      phy-handle = <&phy1>;
>>>>      phy-mode = "rgmii-id";
>>>>      phy1: phy at 8 {
>>>>          compatible = "marvell,88e1518";
>>>>          device_type = "ethernet-phy";
>>>>          reg = <8>;
>>>>      } ;
>>>> } ;
>>
>>
>> So I am going to assume here that you are relying on the
>> zynq7-base.dtsi from the meta-xilinx layer. If that is the case the
>> above bindings will work as expected, however you might have copied
>> the following line from one of the other boards where "ps7_ethernet_1:
>> ps7-ethernet at e000c000 { compatible = "invalid"; };" that will cause
>> the kernel to ignore the ps7_ethernet_1 node entirely so you will need
>> to delete that line. That should get the kernel to probe the second
>> device.
>>
>> If your still getting issues with the kernel not probing the device it
>> is worth providing the full device tree content to further debug the
>> issue.
>>
>> Regards,
>> Nathan
>>
>>>>
>>>> Is putting this information in the device tree all that's needed?  The
>>>> PHY address of 8 is what is configured in Vivado for the 2nd ethernet
>>>> port.
>>>>
>>>> Thanks for your help.
>>>
>>> --
>>>
>
> Kind regards,
>
> Mike Looijmans
> System Expert
>
> TOPIC Embedded Products
> Eindhovenseweg 32-C, NL-5683 KH Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79
> Telefax: +31 (0) 499 33 69 70
> E-mail: mike.looijmans at topicproducts.com
> Website: www.topicproducts.com
>
> Please consider the environment before printing this e-mail
>
>
>
>
>
>
> _______________________________________________
>>>
>>> meta-xilinx mailing list
>>> meta-xilinx at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
>



More information about the meta-xilinx mailing list