我不确定您使用的具体电路板,但是必须配置 RGMII 引脚。如果将 PHY 连接到微控制器,则需要指定 TX 和 RX 时钟以及其他数据引脚的协商速度。类似的东西——
const IfxGeth_Eth_RgmiiPins Rgmiipins = {
//Set the reference clock
.txClk = &IfxGeth_TXCLK_P11_4_OUT ,
.txd0 = &IfxGeth_TXD0_P11_3_OUT ,
.txd1 = &IfxGeth_TXD1_P11_2_OUT ,
.txd2 = &IfxGeth_TXD2_P11_1_OUT ,
.txd3 = &IfxGeth_TXD3_P11_0_OUT ,
.txCtl = &IfxGeth_TXCTL_P11_6_OUT ,
.rxClk = &IfxGeth_RXCLKA_P11_12_IN ,
.rxd0 = &IfxGeth_RXD0A_P11_10_IN ,
.rxd1 = &IfxGeth_RXD1A_P11_9_IN ,
.rxd2 = &IfxGeth_RXD2A_P11_8_IN ,
.rxd3 = &IfxGeth_RXD3A_P11_7_IN ,
.rxCtl = &IfxGeth_RXCTLA_P11_11_IN ,
.mdc = &IfxGeth_MDC_P12_0_OUT ,
.mdio = &IfxGeth_MDIO_P12_1_INOUT ,
.grefClk = &IfxGeth_GREFCLK_P11_5_IN ,
};
现在您说您正在将其连接到笔记本电脑。我不完全理解你的问题,但是如果某处涉及到 linux 内核,那么是的,你需要修改设备树。这是您可以开始的链接。这是一个示例,取自同一来源-
ethernet@e000b000 {
compatible = "cdns,zynq-gem", "cdns,gem";
reg = <0xe000b000 0x1000>;
status = "okay";
interrupts = <0x0 0x16 0x4>;
clocks = <0x1 0x1e 0x1 0x1e 0x1 0xd>;
clock-names = "pclk", "hclk", "tx_clk";
#address-cells = <0x1>;
#size-cells = <0x0>;
local-mac-address = [00 0a 35 00 00 00];
phy-mode = "rgmii-id";
xlnx,ptp-enet-clock = <0x6750918>;
phy-handle = <0x4>;
mdio {
#address-cells = <0x1>;
#size-cells = <0x0>;
phy@1 {
compatible = "realtek,RTL8211E";
device_type = "ethernet-phy";
reg = <0x1>;
linux,phandle = <0x4>;
phandle = <0x4>;
};
};
};
希望这会让你开始。