1. 概述
本章描述A311D 如何添加配置内置和外置以太网芯片内置以太网最大支持100M,外置以太网芯片最大支持1G。
2.A311D ETHERNET 驱动指南
2.1 Uboot 网卡配置
Configuration of bootloader
We can switch between internal and external phy in bootloader by define/undef specially macro.
E.G.
We want to set u200 as internal phy we can modify “” as
/* Choose One of Ethernet Type */
#undef CONFIG_ETHERNET_NONE
#define ETHERNET_INTERNAL_PHY
#undef ETHERNET_EXTERNAL_PHY
Then remake the dtb file
2.2 内核部分
2.2.1 内置网卡配置
internal phy configuration:
ðmac {
status = "okay";
pinctrl-names = "internal_eth_pins";
pinctrl-0 = <&internal_eth_pins>;
mc_val = <0x4be04>;
internal_phy=<1>;
};
2.2.2 外置以太网芯片配置
external phy configuration:
ðmac {
status = "okay";
pinctrl-names = "external_eth_pins";
pinctrl-0 = <&external_eth_pins>;
mc_val = <0x1621>;
internal_phy=<0>;
};
2.2.3 无有线网卡配置
NO ethernet configuration:
ðmac {
status = "disabled";
pinctrl-names = "internal_eth_pins";
pinctrl-0 = <&internal_eth_pins>;
mc_val = <0x4be04>;
internal_phy=<1>;
};