This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] DP83TC812R-Q1:对寄存器0x45d 的 MDIO 读取返回所有0&#39

Guru**** 1640390 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1133130/dp83tc812r-q1-mdio-read-of-register-0x45d-returns-all-0-s

器件型号:DP83TC812R-Q1

LED_0、LED_1和 RX_D2引脚通过外部2.49k 上拉电阻器进行引导、但 寄存器0x45D 的间接寄存器访问 返回错误-95

[1.951142]    --> DWC_ETH_QOS_MDIO_register
[1.951145]     
[1.951145]*********     PHY 寄存器转储
[1.951609]    PHY 控制寄存器(基本模式控制寄存器)(0x0)= 0x2100
[1.958026]    PHY 状态寄存器(基本模式状态寄存器)(0x1)= 0x61
[1.964105]    PHY ID (PHY ID 1)(0x2)= 0x2000
[1.969915]    PHY ID (PHY ID 2)(0x3)= 0xa271
[1.974345]    自动导航广播(广播控制寄存器)(0x4)= 0x1
[1.978599]    自动协商(链路伙伴能力寄存器)(0x5)= 0x0
[1.984589]    自动导航扩展寄存器(扩展寄存器)(0x6)= 0x0
[1.990230]    自动导航 NP (0x7)= 0x2001
[1.995349]    扩展状态寄存器(0xF)= 0x0
[1.998908]    1000 CTL 寄存器(1000BASE-T 控制寄存器)(0x9)= 0x0
[2.003078]    1000 STS 注册器(1000BASE-T 状态)(0xA)= 0x100
[2.008980]    PHY CTL 寄存器(0x10)= 0x4
[2.014273]    PHY STS 寄存器(0x11)= 0x10b
[2.017918]    PHY Intr 状态寄存器(0x13)= 0x0
[2.021479]    PHY Intr EN 寄存器(0x12)= 0x4000
[2.025905]    智能速度寄存器(0x14)= 0x0
[2.029398]     
[2.029398]     
[2.033984]    phyaddr 0 phy_reg_read_status 0 MII_status 61
[2.033987]    DWC_ETH_QoS:在 ID/ADDR 0上检测到 PHY
[2.033992]    libphy:__mdiobus_register
[2.035318]    libphy:__mdiobus_register I 0
[2.035321]    libphy:__mdiobus_register I 0  bus->phy_mask FFFFFFFE
[2.035324]    libphy:get_phy_device
[2.035325]    libphy:get_phy_id
[2.036151]    libphy:get_phy_id * phy_id 2000a271
[2.036153]    libphy:PHY_DEVICE_CREATE
[2.036436]    libphy:mdiobus_scan
[2.036518]    libphy:PHY_BUS_MATCH
[2.036522]    libphy:PHY_BUS_MATCH
[2.036524]    libphy:PHY_BUS_MATCH
[2.036526]    libphy:PHY_BUS_MATCH
[2.036528]    libphy:PHY_BUS_MATCH
[2.036530]    libphy:PHY_BUS_MATCH
[2.036532]    libphy:PHY_BUS_MATCH
[2.036571]    libphy:PHY_PROBE
[2.036588]    TI DP83TC812CS2.0:DWC_phy-1:00的探测失败、错误-95
[2.036592]    libphy:PHY_BUS_MATCH
[2.036594]    libphy:PHY_BUS_matc

假设 我们的内核版本4.9与812驱动器不兼容、TI 要求我们将 phy_read_md 命令替换为"phy_write_間 接"命令。

进行上述更改后、错误-95消失了、但寄存器0x45d 读取的是全0、而不是预期的0x2280 (引脚 LED_0 - LED_1 - RX_D2具有1.8V VDDIO 的外部2.49k 上拉电阻)