Firefly开源社区

打印 上一主题 下一主题

[Pin-mux問題] RK3128 GPIO2與GMAC設定問題

14

积分

0

威望

0

贡献

游客

积分
14

[Pin-mux問題] RK3128 GPIO2與GMAC設定問題

发表于 2016-9-29 17:44:01      浏览:7006 | 回复:1        打印      只看该作者   [复制链接] 楼主
Hi All,
目前在rk3128的開發上屬於新手, 剛接觸此平台
在設定ethernet發生問題, 希望先進給予建議 (個人判斷Cannot attach to PHY應該是PIN MUX的部分沒處理好)
Ethernet燈號為綠燈及黃燈持續閃爍, 無法連網

Ethernet 是使用10/100M, 設定為rmii,
而GPIO2_B4, B5, B6, B7這些則設定給GMAC_MDIO_d, GMAX_TXEN_d, ..., etc
pinctrl中有開啟gpio2_gmac設定, 但查0x200080cc 卻是0x45

pinctrl debug message如下
cat pinmux-functions   
<17:18:30>  function: gpio2_gmac, groups = [ gmac-rxdv gmac-txclk gmac-crs gmac-rxclk gmac-mdio gmac-txen gmac-clk gmac-rxer gmac-rxd1 gmac-rxd0 gmac-txd1 gmac-txd0 gmac-rxd3 gmac-rxd2 gmac-txd2 gmac-txd3 gmac-col gmac-col-gpio gmac-mdc ]
<17:18:30>  function: gpio2_lcdc0, groups = [ lcdc0-lcdc lcdc0-gpio ]

cat pinmux-pins
<16:55:49>  pin 72 (gpio2-8): device (GPIO UNCLAIMED) function gpio2_lcdc0 group lcdc0-lcdc
<16:55:49>  pin 73 (gpio2-9): device (GPIO UNCLAIMED) function gpio2_lcdc0 group lcdc0-lcdc
<16:55:49>  pin 74 (gpio2-10): device gpio2:74 function gpio2_lcdc0 group lcdc0-lcdc
<16:55:49>  pin 75 (gpio2-11): device (GPIO UNCLAIMED) function gpio2_lcdc0 group lcdc0-lcdc
<16:55:49>  pin 76 (gpio2-12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 77 (gpio2-13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 78 (gpio2-14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 79 (gpio2-15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 80 (gpio2-16): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 81 (gpio2-17): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 82 (gpio2-18): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 83 (gpio2-19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
<16:55:49>  pin 84 (gpio2-20): 2005a000.i2c gpio2:84 function gpio1_i2c2 group i2c2-sda
<16:55:49>  pin 85 (gpio2-21): 2005a000.i2c gpio2:85 function gpio1_i2c2 group i2c2-scl

而在實際的PHY probe log
<17:21:06>  [   13.883660] phy_power_on: enable = 1
<17:21:06>  [   13.923239] Read the Ethernet MAC address from IDB:00:00:00:00:00:00
<17:21:06>  [   13.923434] eth0: device MAC address 42:df:90:78:6b:86
<17:21:07>  [   13.964757] libphy: stmmac: probed
<17:21:07>  [   13.964816] eth0: PHY ID 00000000 at 0 IRQ 0 (stmmac-0:00) active
<17:21:07>  [   13.964845] eth0: PHY ID 00000000 at 1 IRQ 0 (stmmac-0:01) active
<17:21:07>  [   13.964871] eth0: PHY ID 00000000 at 2 IRQ 0 (stmmac-0:02)
.............................
<17:21:07>  [   13.965577] eth0: PHY ID 00000000 at 31 IRQ 0 (stmmac-0:1f)
<17:21:07>  [   13.965732] stmmac_open: Cannot attach to PHY (error: -19)

回复

使用道具 举报

350

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
350
发表于 2016-9-30 17:19:43        只看该作者  沙发
感覺是 i2c 2 被啟用了
使得 GMAC_RXD3_d GMAC_RXD2_d 切換成 i2c2 使用
所以網路也就不能用了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表