IMX6Q EIM问题!
/** For EIM General Configuration registers.
* CS0GCR1:
* GBC = 0; CSREC = 6; DSZ = 2; BL = 0;
* CREP = 1; CSEN = 1;
* EIM Operation Mode: MUM = 1
SRD = SWR = 0.
* (Async write/Async page read, multiplexed)
* CS0GCR2:
* ADH = 1
*/
writel(0x00610099, nor_reg);
writel(0x00000001, nor_reg + 0x00000004);
/*
* For EIM Read Configuration registers.
* CS0RCR1:
* RWSC = 1C;
* RADVA = 0; RADVN = 2;
* OEA = 2; OEN = 0;
* RCSA = 0; RCSN = 0
* CS0RCR2:
* APR = 1 (Async Page Read);
* PAT = 4 (6 EIM clock sycles)
*/
writel(0x1C022000, nor_reg + 0x00000008);
writel(0x0000C000, nor_reg + 0x0000000C);
/*
* For EIM Write Configuration registers.
* CS0WCR1:
* WWSC = 20;
* WADVA = 0; WADVN = 1;
* WBEA = 1; WBEN = 2;
* WEA = 1; WEN = 6;
* WCSA = 1; WCSN = 2;
* CS0WCR2:
* WBCDD = 0
*/
writel(0x1404a38e, nor_reg + 0x00000010);
writel(0x00000000, nor_reg + 0x00000014);
EIM端口配置如上,DA数据线地址线复用。
配置之前用示波器测出 片选CS0恒为低电平,按如上配置之后,片选CS0恒为高电平,请问是什么原因?谢谢。
arch/arm/mach-mx6/board-mx6q_sabresd.c改这个文件,你改的auto文件 Marss 发表于 2018-7-4 16:25
arch/arm/mach-mx6/board-mx6q_sabresd.c改这个文件,你改的auto文件
我也没修改auto,我是根据auto文件里面的eim配置重新写了一个驱动程序,然后动态加载进去的。
页:
[1]