TI大神们,
在下现在调试网络芯片DP83848K遇到问题,U-BOOT中调试修改如下:
默认ID为0x01
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 1,
},
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 0,
},
};
board_eth_init()函数中设置了模式为mii
writel(MII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
PHY_INTERFACE_MODE_MII;
ping_mux中初始化为:
configure_module_pin_mux(mii1_pin_mux);
打印如下:
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: mac_lo===========d5b1
mac_hi===========7cb824ec
<ethaddr> not set. Validating first E-fuse MAC
PHY_INTERFACE_MODE_MII=======
maria: ++++++++++++++++++++++++++++++++++++++
maria: ++++++++++++++++++++++++++++++++++++++
maria: ++++++++++++++++++++++++++++++++++++++
maria: ++++++++++++++++++++++++++++++++++++++
maria: ++++++++++++++++++++++++++++++++++++++
phy_id: ----> ffffffff
PHY reset timed out
cpsw, usb_ether
Hit any key to stop autoboot: 0
U-Boot#
U-Boot#
U-Boot#
U-Boot#
U-Boot#
U-Boot# set serverip 192.168.1.1
U-Boot# set ipaddr 192.168.1.200
U-Boot# set netmask 255.255.255.0
U-Boot# ping 192.168.1.200
link up on port 0, speed 1000, full duplex
Using cpsw device
ping failed; host 192.168.1.200 is not alive
请问在u-boot代码中怎么读取以下 PHY 寄存器的值打印出来。
BMCR
BMSR
PHYIDR1
PHYIDR2
ANAR
ANLPAR
ANER
ANNPTR
PHYSTS
FCSCR
RECR
PCSR
LEDCR
PHYCR
10BTSCR
CDCTRL1
EDCR