Device Tree (.dts) configuration for eTSEC3 in SGMII

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Device Tree (.dts) configuration for eTSEC3 in SGMII

1,471 Views
gyosunshim
Contributor III

Hi All,

I use the same phy eTSEC2 and the P2020 boards has been added to the eTSEC3.
Set as follows were not working.

I have set the wrong part?

ethernet@24000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x0>;
device_type = "network";
model = "eTSEC";
compatible = "gianfar";
reg = <0x24000 0x1000>;
ranges = <0x0 0x24000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
interrupt-parent = <0x2>;
fixed-link = <0x1 0x1 0x3e8 0x0 0x0>;
phy-connection-type = "rgmii-id";
ptimer-handle = <0x3>;

mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-mdio";
reg = <0x520 0x20>;

ethernet-phy@0 {
interrupt-parent = <0x2>;
interrupts = <0x3 0x1>;
reg = <0x0>;
linux,phandle = <0x5>;
};

ethernet-phy@1 {
interrupt-parent = <0x2>;
interrupts = <0x3 0x1>;
reg = <0x1>;
linux,phandle = <0x6>;
};
};
};

ethernet@25000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x1>;
device_type = "network";
model = "eTSEC";
compatible = "gianfar";
reg = <0x25000 0x1000>;
ranges = <0x0 0x25000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
interrupt-parent = <0x2>;
tbi-handle = <0x4>;
phy-handle = <0x5>;
phy-connection-type = "sgmii";
ptimer-handle = <0x3>;

mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-tbi";
reg = <0x520 0x20>;

tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
linux,phandle = <0x4>;
};
};
};

ethernet@26000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x2>;
device_type = "network";
model = "eTSEC";
compatible = "gianfar";
reg = <0x26000 0x1000>;
ranges = <0x0 0x26000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x1f 0x2 0x20 0x2 0x21 0x2>;
interrupt-parent = <0x2>;
tbi-handle = <0x7>;
phy-handle = <0x6>;
phy-connection-type = "sgmii";
ptimer-handle = <0x3>;

mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-tbi";
reg = <0x520 0x20>;

tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
linux,phandle = <0x7>;
};
};
};

Thank you.
Best regards,

gyosun.

Labels (1)
0 Kudos
1 Reply

603 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hi gyosun,

I have following suggestions for you.

1. It seems that MDIO registers addresses are not correct in your dts file.

Please refer to the following CCS memory map.

0x2_4000 eTSEC 1
0x2_5000 eTSEC 2
0x2_6000 eTSEC 3

Please refer to the following definition provided in P2020RDB dts in Linux SDK.


        mdio@24520 {
                phy0: ethernet-phy@0 {
                        interrupts = <3 1 0 0>;
                        reg = <0x0>;
                        };
                phy1: ethernet-phy@1 {
                        interrupts = <2 1 0 0>;
                        reg = <0x1>;
                        };
        };
        mdio@25520 {
                tbi0: tbi-phy@11 {
                        reg = <0x11>;
                        device_type = "tbi-phy";
                };
        };
        mdio@26520 {
                status = "disabled";
        };

2. Please check whether eTSEC2 and eTSEC3 can work normally in u-boot.

3. Please provide the following information under u-boot, it could help to check PHY addresses information corresponding to eTSECx.

=> mii info
PHY 0x00: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, HDX
PHY 0x01: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, HDX
PHY 0x02: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, HDX
PHY 0x1F: OUI = 0x0000, Model = 0x00, Rev = 0x00, 1000baseX, HDX
=> mdio list
FSL_MDIO:
0 - AR8031/AR8033 <--> eTSEC2
1 - AR8031/AR8033 <--> eTSEC1
2 - AR8031/AR8033 <--> eTSEC3


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos