KV260 petalinux BSP在u-boot device tree中disable了GEM3,也就是說(shuō)ethernet在u-boot中不建議使用ethernet。
如果有特殊需要在u-boot中使用ethernet,可以用以下方法來(lái)使能它。
1.在u-boot設(shè)備樹(shù)種enable GEM3和它的phy node
KV260 Petalinux BSP使能了這個(gè)配置, petalinux-config --> u-boot Configuration --> u-boot-ext-dtb
就是說(shuō)u-boot有自己?jiǎn)为?dú)的設(shè)備樹(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è)備樹(shù)里的配置外,要讓GEM3對(duì)應(yīng)的
phy正常工作
我們還要disable MIO 71/73/75的internal pullup/pulldown,使用MIO38來(lái)復(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)注
32文章
1794瀏覽量
131271 -
u-boot
+關(guān)注
關(guān)注
0文章
121瀏覽量
38228 -
Ethernet
+關(guān)注
關(guān)注
3文章
317瀏覽量
55948
原文標(biāo)題:開(kāi)發(fā)者分享|KV260-SOM: 如何在u-boot里使用ethernet
文章出處:【微信號(hào):gh_2d1c7e2d540e,微信公眾號(hào):XILINX開(kāi)發(fā)者社區(qū)】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
U-boot的基本介紹
![<b class='flag-5'>U-boot</b>的基本介紹](https://file1.elecfans.com/web2/M00/8C/C4/wKgaomSxDC-AIi1QAACKegMzhAU876.png)
嵌入式系統(tǒng)中U-Boot 基本特點(diǎn)及其移植方法
嵌入式系統(tǒng)中U-Boot 基本特點(diǎn)及其移植方法
U-Boot的啟動(dòng)及移植分析
Porting U-Boot to the Control
一種在U-BOOT中嵌入千兆網(wǎng)絡(luò)功能的方法
u-boot的Makefile分析
嵌入式U-BOOT的啟動(dòng)流程及移植
u-boot簡(jiǎn)介
U-Boot架構(gòu)淺析
![<b class='flag-5'>U-Boot</b>架構(gòu)淺析](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
Linux U-Boot開(kāi)發(fā)指南
![Linux <b class='flag-5'>U-Boot</b>開(kāi)發(fā)指南](https://file.elecfans.com//web2/M00/95/B6/poYBAGQFT7mAWRkKAAFz-Z4R0zY051.png)
U-boot的QSPI驅(qū)動(dòng)移植方法及驗(yàn)證方法
![<b class='flag-5'>U-boot</b>的QSPI驅(qū)動(dòng)移植<b class='flag-5'>方法</b>及驗(yàn)證<b class='flag-5'>方法</b>](https://file.elecfans.com/web2/M00/9F/06/poYBAGQ4uJyAR2S0AAFCsQC4t40453.png)
評(píng)論