Embedded HI3518C Platform network card mode MII and rmii mode switch summary in Uboot and kernel

Source: Internet
Author: User

Due to the needs of the company's projects, we need to modify the original Mii based on the RMII model, for the HI3518C platform, my network card is LAN8701 need to modify the place has the following several:

First of all, my uboot in env is:

bootargs=mem=64m console=ttyama0,115200 root=/dev/mtdblock4 rootfstype=jffs2 mtdparts=hi_sfc:256k (boot) ro,128k (env ), 128k (config), 3072k (kernel), 11264k (ROOTFS)
BOOTCMD=SF probe 0;SF Read 0x82000000 0x80000 0x300000;bootm 0x82000000
Bootdelay=1
baudrate=115200
ipaddr=10.10.1.156
netmask=255.255.255.0
Bootfile= "Uimage"
Ethaddr=00:12:12:59:26:b5
hwid=8043420002748432
gatewayip=10.10.1.1
serverip=10.10.1.197
Stdin=serial
Stdout=serial
Stderr=serial
Verify=n
Ver=u-boot 2010.06NJQY-JOSEPH-IPNC Alter by Kongjun (Oct 09 2014-21:54:07)

Environment size:534/262140 bytes

1, the first is uboot, to switch into rmii mode

There are two places to change:

1.1. Source code:

1) uboot:include/configs/hi3518c.h File

#define Hieth_mii_rmii_mode_u Hisfv_rmii_mode//hisfv_mii_mode

#define HIETH_MII_RMII_MODE_D Hisfv_rmii_mode//hisfv_mii_mode

1.2. uboot Configuration table:

Modifications in the configuration table:

The bit3 of 200300cc is 1 (original 0):

200F005C is 3 (original 1):

Note: Registers with the address 0x200300cc need to add their own registers!

Configuration table: http://download.csdn.net/detail/skdkjxy/8018935

2, followed by the kernel to switch to the rmii mode, where you need to modify the kernel configuration, such as:

The. config file is modified directly:

# Config_eee_support is not set

config_hieth_monitor_timer=10
Config_hieth_hwq_xmit_depth=12
config_hieth_mdio_frqdiv=2
Config_hieth_mii_rmii_mode_u=1
Config_hieth_mii_rmii_mode_d=1
Config_hieth_phyid_u=1
config_hieth_phyid_d=2

# config_hieth_downport_en is not set

Then recompile it, and the kernel modifies it.

3, the last is hi3518 official driver added when modified to Rmii mode:

The file is "./load3518:102:source./pinmux_hi3518.sh mii >/dev/null"

Change to "./load3518:102:source./pinmux_hi3518.sh rmii i²c >/dev/null"

Then there is no accident, you can see this ping www.baidu.com!

from:http://blog.csdn.net/skdkjzz/article/details/39931915

Embedded HI3518C Platform network card mode MII and rmii mode switch summary in Uboot and kernel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.