修改设备树上的以太网端口

修改设备树上的以太网端口

我们想将 mpc8308erdb 上的 vitesse 开关更改为 ks8999 开关。并将 eTSEC0 和 eTSEC1 连接到两个独立的 ks8999 交换机。

我想知道我应该更改哪些文件才能使 linux 在这种新条件下工作。这些交换机是快速以太网交换机,并通过 mii 接口连接到主板。(其中没有 mdio 接口)

我们像这样更改了设备树,并通过检查其他端口来检查交换机功能,但网络无法正常工作。未更改的设备树:

        enet0: ethernet@24000 {
            cell-index = <0>;
            device_type = "network";
            model = "eTSEC";
            compatible = "gianfar";
            reg = <0x24000 0x1000>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <32 0x8 33 0x8 34 0x8>;
            interrupt-parent = <&ipic>;
            tbi-handle = <&tbi0>;
            phy-handle = < &phy0 >;
/*          sleep = <&pmc 0xc0000000>;  */
            fsl,magic-packet;
            fsl,lossless-flow-ctrl = <0>;
            ptimer-handle = < &ptp_timer >;
        };

        enet1: ethernet@25000 {
            cell-index = <1>;
            device_type = "network";
            model = "eTSEC";
            compatible = "gianfar";
            reg = <0x25000 0x1000>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <35 0x8 36 0x8 37 0x8>;
            interrupt-parent = <&ipic>;
            /* tbi-handle = <&tbi1>; */
            /* phy-handle = < &phy1 >; */
            /* Vitesse 7385 isn't on the MDIO bus */
            fixed-link = <1 1 1000 0 0>;
/*          sleep = <&pmc 0x30000000>;  */
            fsl,magic-packet;
            fsl,lossless-flow-ctrl = <0>;
            ptimer-handle = < &ptp_timer >;
            phy-connection-type = "rgmii-id";
        };

更改的设备树:

        enet0: ethernet@24000 {
            cell-index = <0>;
            device_type = "network";
            model = "eTSEC";
            compatible = "gianfar";
            reg = <0x24000 0x1000>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <32 0x8 33 0x8 34 0x8>;
            interrupt-parent = <&ipic>;
            fixed-link = <2 1 100 0 0>;         
/*          sleep = <&pmc 0xc0000000>;  */
            fsl,magic-packet;
            fsl,lossless-flow-ctrl = <0>;
            ptimer-handle = < &ptp_timer >;
            phy-connection-type = "mii";
        };

        enet1: ethernet@25000 {
            cell-index = <1>;
            device_type = "network";
            model = "eTSEC";
            compatible = "gianfar";
            reg = <0x25000 0x1000>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <35 0x8 36 0x8 37 0x8>;
            interrupt-parent = <&ipic>;
            fixed-link = <1 1 100 0 0>;
/*          sleep = <&pmc 0x30000000>;  */
            fsl,magic-packet;
            fsl,lossless-flow-ctrl = <0>;
            ptimer-handle = < &ptp_timer >;
            phy-connection-type = "mii";
        };

在参考板中,一个 eTSEC 连接到 phy,另一个 eTSEC 连接到千兆位以太网交换机。

相关内容