4.9 网口的定制与使能
答:核心板直接出来的是eth0, 如使用一个以太网口,可以在dts 中disable 不用的eth, 同时把dts中mdio 的设置移到要用eth下面。
开发板上2个RJ45端口: CN2 为eth0; CN1 为eth1。
一个网口dts 修改:
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-mode = "rmii";
phy-handle = <ðphy0>;
phy-reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
phy-reset-duration = <26>;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
smsc,disable-energy-detect;
reg = <0>;
};
};
说明:本帖子源于米尔微信公众号【i.MX6UL/i.MX6ULL开发常见问题】专题文章,是由米尔电子工程师基于米尔电子i.MX6UL/i.MX6ULL产品对i.MX6UL/i.MX6ULL开发中常见问题整理, 希望对您有帮助。