AnsweredAssumed Answered

P2041 : Ethernet not working after changing device tree

Question asked by sameerarvikar on Aug 28, 2018
Latest reply on Sep 4, 2018 by sameerarvikar

We are using custom P2041 based board & using two VSC8572 chips. One of them is configured in SGMII mode & Other in RGMII mode. With 'mii' command in u-boot we wrote few initialization commands to both PHY chips & got them working.

The PHY Addresses are as follos:

DTSEC1 : PHY address 0x00     : SGMII (Chip 1 - Port 1)

DTSEC2 : PHY address 0x01     : SGMII (Chip 1 - Port 2)

DTSEC4 : PHY address 0x04     : RGMII (Chip 2 - Port 1)

DTSEC5 : PHY address 0x05     : RGMII (Chip 2 - Port 2)

 

These DTSECs are working fine in u-boot.

uboot arguments for mac id ->

 

ethaddr=00:04:9F:02:00:FD

eth1addr=00:04:9F:02:01:FD
eth2addr=00:04:9F:02:06:FD   // modified to check changes ,instead of 02 i kept it 06
eth3addr=00:04:9F:02:03:FD
eth4addr=00:04:9F:02:04:FD
eth5addr=00:04:9F:02:05:FD

 

so if i ping to all the interfaces in uboot and capture them using wireshark in my host pc and check mac id in captured ping packet

i get

for PHY address 0x0 -->MAC ID-->    ethaddr  =00:04:9F:02:00:FD

for PHY address 0x01 --> MAC ID--> eth1addr=00:04:9F:02:01:FD

 

for PHY address 0x04 --> MAC ID --> eth2addr=00:04:9F:02:06:FD //////////////////////////////////////

fpr PHT address 0x05 --> MAC ID --> eth3addr=00:04:9F:02:03:FD

 

 

but in linux only three interfaces is working. one rgmii is not working.

In kernel boot log i found -->


fsl_mac ffe4e0000.ethernet: FMan MAC address: 00:04:9f:02:00:fd

 

fsl_mac ffe4e2000.ethernet: FMan MAC address: 00:04:9f:02:01:fd

 

fsl_mac ffe4e6000.ethernet: FMan MAC address: 00:04:9f:02:03:fd

 

fsl_mac ffe4e8000.ethernet: FMan MAC address: 00:04:9f:02:04:fd   /// it was missing in uboot pings

above node should map to eth2addr of uboot rather than eth4addr

 

 

so i ran following commands in uboot

>tftp 1000000 dtbfile.dtb

>fdt a 0x1000000

>fdt boardsetup

ERROR: unable to create props for bman-portal@0: FDT_ERR_NOSPACE
ERROR: unable to create props for qman-portal@0: FDT_ERR_NOSPACE
WARNING: could not find compatible node: FDT_ERR_NOTFOUNDphy =phy_rgmii_1
phy =phy_rgmii_0

=> fdt p ethernet1
ethernet@e2000 {
        local-mac-address = [00 04 9f 02 01 fd];
        tbi-handle = <0x00000017>;
        phy-handle = <0x00000018>;
        phy-connection-type = "sgmii";
        cell-index = <0x00000001>;
        compatible = "fsl,fman-1g-mac";
        reg = <0x000e2000 0x00001000>;
        fsl,port-handles = <0x00000019 0x0000001a>;
        ptimer-handle = <0x00000016>;
        linux,phandle = <0x0000002f>;
        phandle = <0x0000002f>;
};
=> fdt p ethernet0
ethernet@e0000 {
        local-mac-address = [00 04 9f 02 00 fd];
        tbi-handle = <0x00000012>;
        phy-handle = <0x00000013>;
        phy-connection-type = "sgmii";
        cell-index = <0x00000000>;
        compatible = "fsl,fman-1g-mac";
        reg = <0x000e0000 0x00001000>;
        fsl,port-handles = <0x00000014 0x00000015>;
        ptimer-handle = <0x00000016>;
        linux,phandle = <0x0000002e>;
        phandle = <0x0000002e>;
};
=> fdt p ethernet2
ethernet@e4000 {
        status = "disabled";     //  why this is disabled
        local-mac-address = [00 04 9f 02 06 fd];
        tbi-handle = <0x0000001b>;
        phy-handle = <0x0000001c>;
        phy-connection-type = "sgmii";
        cell-index = <0x00000002>;
        compatible = "fsl,fman-1g-mac";
        reg = <0x000e4000 0x00001000>;
        fsl,port-handles = <0x0000001d 0x0000001e>;
        ptimer-handle = <0x00000016>;
        linux,phandle = <0x00000030>;
        phandle = <0x00000030>;
};
=> fdt p ethernet3
ethernet@e6000 {
        local-mac-address = [00 04 9f 02 03 fd];
        tbi-handle = <0x0000001f>;
        phy-handle = <0x00000020>;
        phy-connection-type = "rgmii";
        cell-index = <0x00000003>;
        compatible = "fsl,fman-1g-mac";
        reg = <0x000e6000 0x00001000>;
        fsl,port-handles = <0x00000021 0x00000022>;
        ptimer-handle = <0x00000016>;
        linux,phandle = <0x00000031>;
        phandle = <0x00000031>;
};
=> fdt p ethernet4
ethernet@e8000 {
        local-mac-address = [00 04 9f 02 04 fd];
        tbi-handle = <0x00000023>;
        phy-handle = <0x00000024>;
        phy-connection-type = "rgmii";
        cell-index = <0x00000004>;
        compatible = "fsl,fman-1g-mac";
        reg = <0x000e8000 0x00001000>;
        fsl,port-handles = <0x00000025 0x00000026>;
        ptimer-handle = <0x00000016>;
        linux,phandle = <0x00000032>;
        phandle = <0x00000032>;
};

As we can observe uboot is pinging from mac id local-mac-address = [00 04 9f 02 06 fd];

which is represented as ethernet@e4000 in device tree,but it shows as status = "disabled"

hence it doesn't comes up in linux boot log.whereas when i read dts file ,it doesn't shows any status disabled.

I put the dts file which comes with p2041rdb also shows status = disabled for above node.

 

Attached dts file

Can u tell me what i need to change in dts file to make it work

Attachments

Outcomes