2857
- 收藏
- 点赞
- 分享
- 举报
雄迈3536C改为开发板使用
1.uboot修改内容
(1)FLASH(XM25QH128AHIG)
u-boot-2010.06\drivers\mtd\spi\hifmc100\hifmc_spi_nor_ids.c
static struct spi_nor_info hifmc_spi_nor_info_table[] = {
/* name id id_len chipsize(Bytes) erasesize */
{
"XM25QH128AHIG", {0X20, 0X70, 0X18},3,_16M, _64K, 3,
{
&READ_STD(0, INFINITE, 20),
&READ_FAST(1, INFINITE, 50),
0
},
{
&WRITE_STD(0, 256, 50),
0
},
{
&ERASE_SECTOR_64K(0, _64K, 0),
0
},
&spi_driver_general,
},
(2)网卡的支持(AR8305)
1)修改linux-3.18.y\arch\arm\boot\dts\hi3536c-demb.dts
&mdio {
ethphy: ethernet-phy@1 {
reg = <2>;
};
};
2)修改文件u-boot-2010.06\include\configs\hi3536c.h
把 CONFIG_HIGMAC_PHY1_ADDR 1改为2
3)添加内容u-boot-2010.06\drivers\net\higmacv300\higmac.c
#define PHY_ID_AR8035
static int ar8031_phy_fixup(char *devname, u32 phyaddr)
{
u16 val;
/* To enable AR8031 output a 125MHz clk from CLK_25M */
miiphy_write(devname, phyaddr, 0xd, 0x7);
miiphy_write(devname, phyaddr, 0xe, 0x8016);
miiphy_write(devname, phyaddr, 0xd, 0x4007);
miiphy_read(devname, phyaddr, 0xe, &val);
val &= 0xffe3;
val |= 0x18;
miiphy_write(devname, phyaddr, 0xe, val);
/* introduce tx clock delay */
miiphy_write(devname, phyaddr, 0x1d, 0x5);
miiphy_read(devname, phyaddr, 0x1e, &val);
val |= 0x0100;
miiphy_write(devname, phyaddr, 0x1e, val);
return 0;
}
#define BMCR_PDOWN 0x0800
static int ar8035_phy_fixup(char *devname, u32 phyaddr)
{
u16 val;
/* Ar803x phy SmartEEE feature cause link status generates glitch,
* which cause ethernet link down/up issue, so disable SmartEEE
*/
miiphy_write(devname, phyaddr, 0xd, 0x3);
miiphy_write(devname, phyaddr, 0xe, 0x805d);
miiphy_write(devname, phyaddr, 0xd, 0x4003);
miiphy_read(devname, phyaddr, 0xe, &val);
miiphy_write(devname, phyaddr, 0xe, val & ~(1 << 8));
/*
* Enable 125MHz clock from CLK_25M on the AR8031. This
* is fed in to the IMX6 on the ENET_REF_CLK (V22) pad.
* Also, introduce a tx clock delay.
*
* This is the same as is the AR8031 fixup.
*/
ar8031_phy_fixup(devname,phyaddr);
/*check phy power*/
miiphy_read(devname, phyaddr,0x0, &val);
if (val & BMCR_PDOWN)
miiphy_write(devname, phyaddr, 0x0, val & ~BMCR_PDOWN);
return 0;
}
2.kernel中修改
(1)在内核中添加flash的支持 路径:./drivers/mtd/spi-nor/spi-nor.c
添加以下内容
{ “XM25QH128AHIG”, INFO(0x207018, 0, 64 * 1024, 256,SECT_4K)},
(3) 在menuconfig中添加ar8035的支持 勾选STM
STMicroelectronics devices │ │
│ │ <*> STMicroelectronics 10/100/1000 Ethernet driver │ │
│ │ STMMAC Platform bus support │ │
│ │ STMMAC DMA arbitration scheme │ │
│ │ [ ] VIA devices │ │
osdrv/opensource/kernel/linux-3.18.y/drivers/net/phy/at803x.c 文件
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
phydev->interface == PHY_INTERFACE_MODE_RGMII) {
ret = phy_write(phydev, AT803X_DEBUG_ADDR,
AT803X_DEBUG_SYSTEM_MODE_CTRL);
if (ret)
return ret;
ret = phy_write(phydev, AT803X_DEBUG_DATA,
AT803X_DEBUG_RGMII_TX_CLK_DLY);
if (ret)
return ret;
}
修改为以上这样
(1)FLASH(XM25QH128AHIG)
u-boot-2010.06\drivers\mtd\spi\hifmc100\hifmc_spi_nor_ids.c
static struct spi_nor_info hifmc_spi_nor_info_table[] = {
/* name id id_len chipsize(Bytes) erasesize */
{
"XM25QH128AHIG", {0X20, 0X70, 0X18},3,_16M, _64K, 3,
{
&READ_STD(0, INFINITE, 20),
&READ_FAST(1, INFINITE, 50),
0
},
{
&WRITE_STD(0, 256, 50),
0
},
{
&ERASE_SECTOR_64K(0, _64K, 0),
0
},
&spi_driver_general,
},
(2)网卡的支持(AR8305)
1)修改linux-3.18.y\arch\arm\boot\dts\hi3536c-demb.dts
&mdio {
ethphy: ethernet-phy@1 {
reg = <2>;
};
};
2)修改文件u-boot-2010.06\include\configs\hi3536c.h
把 CONFIG_HIGMAC_PHY1_ADDR 1改为2
3)添加内容u-boot-2010.06\drivers\net\higmacv300\higmac.c
#define PHY_ID_AR8035
static int ar8031_phy_fixup(char *devname, u32 phyaddr)
{
u16 val;
/* To enable AR8031 output a 125MHz clk from CLK_25M */
miiphy_write(devname, phyaddr, 0xd, 0x7);
miiphy_write(devname, phyaddr, 0xe, 0x8016);
miiphy_write(devname, phyaddr, 0xd, 0x4007);
miiphy_read(devname, phyaddr, 0xe, &val);
val &= 0xffe3;
val |= 0x18;
miiphy_write(devname, phyaddr, 0xe, val);
/* introduce tx clock delay */
miiphy_write(devname, phyaddr, 0x1d, 0x5);
miiphy_read(devname, phyaddr, 0x1e, &val);
val |= 0x0100;
miiphy_write(devname, phyaddr, 0x1e, val);
return 0;
}
#define BMCR_PDOWN 0x0800
static int ar8035_phy_fixup(char *devname, u32 phyaddr)
{
u16 val;
/* Ar803x phy SmartEEE feature cause link status generates glitch,
* which cause ethernet link down/up issue, so disable SmartEEE
*/
miiphy_write(devname, phyaddr, 0xd, 0x3);
miiphy_write(devname, phyaddr, 0xe, 0x805d);
miiphy_write(devname, phyaddr, 0xd, 0x4003);
miiphy_read(devname, phyaddr, 0xe, &val);
miiphy_write(devname, phyaddr, 0xe, val & ~(1 << 8));
/*
* Enable 125MHz clock from CLK_25M on the AR8031. This
* is fed in to the IMX6 on the ENET_REF_CLK (V22) pad.
* Also, introduce a tx clock delay.
*
* This is the same as is the AR8031 fixup.
*/
ar8031_phy_fixup(devname,phyaddr);
/*check phy power*/
miiphy_read(devname, phyaddr,0x0, &val);
if (val & BMCR_PDOWN)
miiphy_write(devname, phyaddr, 0x0, val & ~BMCR_PDOWN);
return 0;
}
2.kernel中修改
(1)在内核中添加flash的支持 路径:./drivers/mtd/spi-nor/spi-nor.c
添加以下内容
{ “XM25QH128AHIG”, INFO(0x207018, 0, 64 * 1024, 256,SECT_4K)},
(3) 在menuconfig中添加ar8035的支持 勾选STM
│ │ <*> STMicroelectronics 10/100/1000 Ethernet driver │ │
│ │
│ │
│ │ [ ] VIA devices │ │
osdrv/opensource/kernel/linux-3.18.y/drivers/net/phy/at803x.c 文件
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
phydev->interface == PHY_INTERFACE_MODE_RGMII) {
ret = phy_write(phydev, AT803X_DEBUG_ADDR,
AT803X_DEBUG_SYSTEM_MODE_CTRL);
if (ret)
return ret;
ret = phy_write(phydev, AT803X_DEBUG_DATA,
AT803X_DEBUG_RGMII_TX_CLK_DLY);
if (ret)
return ret;
}
修改为以上这样
我来回答
回答7个
时间排序
认可量排序
认可0
认可0
认可0
认可0
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2016-09-09 17:43:12
-
2018-05-11 10:13:42
-
2019-04-17 14:18:40
-
2015-09-30 11:59:36
-
2016-07-29 15:51:26
-
2016-03-10 15:30:32
-
02019-03-29 11:02:27
-
2018-02-26 09:24:59
-
2019-06-19 11:43:32
-
2016-01-29 13:46:54
-
2018-07-24 14:26:21
-
2018-03-29 14:02:45
-
2017-10-20 18:06:43
-
2020-03-02 16:08:48
-
2020-09-22 22:59:20
-
2019-06-16 11:26:53
-
2014-11-29 12:41:25
-
2020-09-27 13:52:17
-
2019-12-10 19:04:13
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5Hi3516CV610 如何使用SD卡升级固件
-
5cat /dev/logmpp 报错 <3>[ vi] [func]:vi_send_frame_node [line]:99 [info]:vi pic queue is full!
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认