本帖最后由 djh 于 2022-3-30 10:07 编辑
这样修改试试,之前的修改ENETC 的port口有问题;
修改uboot设备树:packages/firmware/u-boot/arch/arm/dts/fsl-ls1028a-rdb.dts
&enetc0 {
- status = "okay";
- phy-mode = "sgmii";
- phy-handle = <&rdb_phy0>;
+ status = "disabled";
};
ðsw_ports {
port@0 {
status = "okay";
- phy-mode = "qsgmii";
+ phy-mode = "sgmii";
phy-handle = <&sw_phy0>;
};
port@1 {
status = "okay";
- phy-mode = "qsgmii";
+ phy-mode = "sgmii";
phy-handle = <&sw_phy1>;
};
- port@2 {
- status = "okay";
- phy-mode = "qsgmii";
- phy-handle = <&sw_phy2>;
- };
- port@3 {
- status = "okay";
- phy-mode = "qsgmii";
- phy-mode = "sgmii";
- phy-handle = <&sw_phy3>;
- };
};
&mdio0 {
status = "okay";
- rdb_phy0: phy@2 {
- reg = <2>;
- };
- sw_phy0: phy@8 {
- reg = <0x08>;
+ sw_phy0: phy@1 {
+ reg = <0x01>;
};
- sw_phy1: phy@9 {
- reg = <0x09>;
+ sw_phy1: phy@2 {
+ reg = <0x02>;
};
- sw_phy2: phy@a {
- reg = <0x0a>;
};
- sw_phy3: phy@b {
- reg = <0x0b>;
};
};
修改内核设备树:packages/firmware/u-boot/arch/arm/dts/fsl-ls1028a-rdb.dts
-&enetc_port0 { - phy-handle = <&sgmii_phy0>; - phy-connection-type = "sgmii"; - mdio { - #address-cells = <1>; - #size-cells = <0>; - sgmii_phy0: ethernet-phy@2 { - reg = <0x2>; - }; - }; -}; &enetc_mdio_pf3 { - qsgmii_phy1: ethernet-phy@08 { - reg = <0x08>; - };
- qsgmii_phy2: ethernet-phy@09 { - reg = <0x09>; - };
- qsgmii_phy3: ethernet-phy@0a { - reg = <0x0a>; - };
- qsgmii_phy4: ethernet-phy@0b { - reg = <0x0b>; - };
sgmii_phy1: ethernet-phy@01 { reg = <0x01>; };
sgmii_phy2: ethernet-phy@02 { reg = <0x02>; };
}; /* l2switch ports */ &mscc_felix_ports { port@0 { status = "okay"; phy-handle = <&sgmii_phy1>; phy-mode = "sgmii"; managed = "in-band-status"; };
port@1 { status = "okay"; phy-handle = <&sgmii_phy2>; phy-mode = "sgmii"; managed = "in-band-status"; };
- port@2 { - status = "okay"; - phy-handle = <&qsgmii_phy3>; - phy-mode = "qsgmii"; - managed = "in-band-status"; - };
- port@3 { - status = "okay"; - phy-handle = <&qsgmii_phy4>; - phy-mode = "qsgmii"; - managed = "in-band-status"; - }; };
|