|
楼主 |
发表于 2021-5-12 13:39
|
显示全部楼层
结合了下这个帖子仔细研究了下,我感觉问题的关键还是在设备树里,一直没搞明白eth0、eth1对应的端口范围在设备树中是如何确定的?比如物理端口4为什么是怎么被标记到软件定义的eth0中而不是标记到eth1中?如下是19版本的设备树文件ar9330.dtsi中相关的代码段:- e0 {
- compatible = "qca,ar9330-eth", "syscon";
- pll-data = <0x00110000 0x00001099 0x00991099>;
- resets = <&rst 9>;
- reset-names = "mac";
- phy-mode = "mii";
- phy-handle = <&swphy4>;
- };
- &mdio1 {
- status = "okay";
- compatible = "qca,ar9330-mdio";
- resets = <&rst 23>;
- reset-names = "mdio";
- builtin-switch;
- builtin_switch: switch0@1f {
- compatible = "qca,ar7240sw";
- reg = <0x1f>;
- resets = <&rst 8>;
- reset-names = "switch";
- qca,mib-poll-interval = <500>;
- mdio-bus {
- #address-cells = <1>;
- #size-cells = <0>;
- swphy4: ethernet-phy@4 {
- reg = <4>;
- phy-mode = "mii";
- };
- };
- };
- };
- e1 {
- compatible = "qca,ar9330-eth", "syscon";
- pll-data = <0x00110000 0x00001099 0x00991099>;
- phy-mode = "gmii";
- resets = <&rst 13>;
- reset-names = "mac";
- fixed-link {
- speed = <1000>;
- full-duplex;
- };
- };
复制代码
|
|