KV260 petalinux BSP在u-boot device tree中disable了GEM3,也就是說ethernet在u-boot中不建議使用ethernet。
如果有特殊需要在u-boot中使用ethernet,可以用以下方法來使能它。
1.在u-boot設(shè)備樹種enable GEM3和它的phy node
KV260 Petalinux BSP使能了這個配置, petalinux-config --> u-boot Configuration --> u-boot-ext-dtb
就是說u-boot有自己單獨的設(shè)備樹,我們需要在它的設(shè)備數(shù)里enable GEM3和phy node。
project-spec/meta-user/recipes-bsp/uboot-device-tree/files/system-user.dtsi
配置GEM3 node如下,
&gem3 { /* required by spec */
status = "okay";
local-mac-address = [00 0a 35 00 22 01];
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
phy0: ethernet-phy@1 {
reg = <1>;
ti,rx-internal-delay =;
ti,tx-internal-delay =;
ti,fifo-depth =;
ti,dp83867-rxctrl-strap-quirk;
};
};
2.除了設(shè)備樹里的配置外,要讓GEM3對應(yīng)的
phy正常工作
我們還要disable MIO 71/73/75的internal pullup/pulldown,使用MIO38來復(fù)位一下PHY。
可以在u-boot里這樣操作。
a. Check if MIO 71/73/75 internal pull up/down is disabled. With the value 0x0357ffff, it has been disabled by u-boot.
ZynqMP> md 0xFF180180 1
ff180180: 0357ffff
b. Check if MIO38 is set as output and enabled. U-boot configures MIO38 as input. We need change it manually.
ZynqMP> md 0xFF0A0244 1
ff0a0244: 00000000
ZynqMP> md 0xFF0A0248 1
ff0a0248: 00000000
c. Configure MIO38 as output and enable it. Assert MIO38 low and high. Then, gem3 will work with phy addr 0x1.
ZynqMP> mw 0xFF0A0244 0x1000
ZynqMP> mw 0xFF0A0248 0x1000
ZynqMP> mw 0xFF0A0008 0x0000
ZynqMP> mw 0xFF0A0008 0x1000
ZynqMP> setenv ipaddr 192.168.1.10
ZynqMP> ping 192.168.1.100
ZYNQ GEM: ff0e0000, mdio bus ff0e0000, phyaddr 1, interface rgmii-id
ethernet@ff0e0000 Waiting for PHY auto negotiation to complete....... done
Using ethernet@ff0e0000 device
host 192.168.1.100 is alive
ZynqMP>
-
賽靈思
+關(guān)注
關(guān)注
33文章
1795瀏覽量
132003 -
u-boot
+關(guān)注
關(guān)注
0文章
122瀏覽量
38634 -
Ethernet
+關(guān)注
關(guān)注
3文章
382瀏覽量
56544
原文標(biāo)題:開發(fā)者分享|KV260-SOM: 如何在u-boot里使用ethernet
文章出處:【微信號:gh_2d1c7e2d540e,微信公眾號:XILINX開發(fā)者社區(qū)】歡迎添加關(guān)注!文章轉(zhuǎn)載請注明出處。
發(fā)布評論請先 登錄
相關(guān)推薦
U-boot的基本介紹

嵌入式系統(tǒng)中U-Boot 基本特點及其移植方法
嵌入式系統(tǒng)中U-Boot 基本特點及其移植方法
U-Boot的啟動及移植分析
Porting U-Boot to the Control
一種在U-BOOT中嵌入千兆網(wǎng)絡(luò)功能的方法
u-boot的Makefile分析
嵌入式U-BOOT的啟動流程及移植
u-boot簡介
U-Boot架構(gòu)淺析

Linux U-Boot開發(fā)指南

U-boot的QSPI驅(qū)動移植方法及驗證方法

評論