LS1028设置双SGMII
我们现在需要使用ls1028双SGMII,phy地址分别为1和3,我做了以下改动,编译后网卡可以正常启动,link状态也能正常识别但是两个网卡都无法进行ping操作,我试了将rcw中改动恢复默认8 5 11 14后eno0可以正常ping,这是不是哪里改的有问题?改动如下:
1. packages/firmware/u-boot/arch/arm/dts/fsl-ls1028a-rdb.dts中更改默认smii phy为1并且增加phy3
2. 更改packages/linux/linux/arch/arm64/boot/dts/freescale/OK1028A-C.dts中,仿照默认sgmii添加phy3相关3.改packages/firmware/rcw/ls1028ardb/R_SQPP_0x85bb/rcw_1500_gpu600.rcw中总线为 9911 11双SGMII模式
两个网口分别插拔网线,都能正常显示link状态。路由表看了没问题,为了避免冲突,也试了单独只启动一个网卡, 但是仍无法ping通。
本帖最后由 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";- };};
兄弟,你的问题后来解决了嘛?我在1012a的板子上也遇到了差不多这样的情况 jonker 发表于 2022-3-31 09:54
兄弟,你的问题后来解决了嘛?我在1012a的板子上也遇到了差不多这样的情况
解决了,得感谢上面的技术支持djh,解答很详细。步骤为:
1.修改rcw为 9 9 B B
2.修改设备树,路径:packages/firmware/u-boot/arch/arm/dts/fsl-ls1028a-rdb.dts
&enetc0 {
- status = "okay";
- phy-mode = "sgmii";
- phy-handle = <&rdb_phy0>;
+ status = "disabled";
};
esw_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>;
};
};3.修改内核设备树
内核设备树路径:packages/linux/linux/arch/arm64/boot/dts/freescale/OK1028A-C.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";
- };
};
页:
[1]