RTL9010调试记录

1. 简介

rtl9010是一款100/1000BASE-T1的车载以太网PHY芯片

2. 手册解读

2.1 软复位

Page0,寄存器0x00,bit[15]=1,即BMCR寄存器。

Use the BMCR reset command at Page 0x0, Reg 0x00, bit[15] = 1, see 8.2.1, to reset the chip. When a

software reset is done, poll the value of Page 0x0 until Reg 0x00 is equal to 0x0140, or wait for at least

20ms before accessing the other registers of the PHY. Please note that after the software reset, the speed will return to 1000M.

A Software Reset is applied to allow some register settings to take effect, for example, Master/Slave setting

(page0x0, register 9, bit[11]), sleep capability (page0xA5A, register 20, bit [0]), PTP function enable

(address 0xe400, bit[0]), Enable PTP CLKIN function at PTP_GPIO pin (address0xe410, bit[4]) and PTP

CLKIN Frequency Select (address0xe410, bit[5]). A Software Reset can also be used to start a relink flow.

2.2 寄存器访问方法

存在三类寄存器,访问时参考手册

3.驱动配置

实现phy_driver相关接口

 比如PHY中断

 其中需要注意的rtl9010_read_status接口需要更新link状态。