Discussion:
[OpenWrt-Devel] openwrt support RTL8211CL Gigabit Driver?
ql li
2015-02-18 15:39:00 UTC
Permalink
hg255d RTL8211CL Gigabit chip integrated model, but without the
support of the official network openwrt

the following code can be used to start but it doesn't, where's the code error?

printk("Setting up RTL8211CL PHY...");
*(unsigned long *)(0xb0000060) &= ~(1 << 9); //set RGMII to Normal mode
*(unsigned long *)(0xb01100C8) &= ~(1<<29); //disable port 5auto-polling
*(unsigned long *)(0xb01100C8) |= 0x3fff; //force 1000M full duplex
*(unsigned long *)(0xb01100C8) &= ~(0xf<<20); //rxclk_skew,txclk_skew = 0

rt305x_mii_write(esw,0x1f, 0x0, 0xa9a0); /*Reset PHY*/
rt305x_mii_write(esw,0x1f, 0x0, 0x03e1); /*SoftReset PHY*/
rt305x_mii_write(esw,0x1f, 0x0, 0x3100); /*Auto negotiation*/
rt305x_mii_write(esw,0x1f, 0x4, 0x03e1);
rt305x_mii_write(esw,0x1f, 0x12, 0x6400);
rt305x_mii_write(esw,0x1f, 0x1f, 0x0);

Loading...