AnsweredAssumed Answered

imx6q EIM interface for FPGA 配置

Question asked by Sharp Jison on Feb 14, 2017
Latest reply on Feb 15, 2017 by igorpadykov

        现在FPGA接在imx6q的EIM接口上,现在做如下配置,才能从EIM接口获取到数据,配置哪些寄存器,怎么配置才能做好,才能达到同步模式读/写访问。

 内核:linux-4.1.15   所有的硬件信息都在设备树中配置

 硬件:imx6q

 使用的管脚:

            EIM_DA[15:0]

            EIM_EB0

            EIM_EB1

            EIM_OE

            EIM_RW

            EIM_LBA

            EIM_A[24:17]

            EIM_BCLK

            EIM_WAIT

你要做的配置是:
(1)配置为16位复用方式
(2)配置为25位地址线
(3)同步模式访问
(4)配置为CS0有效

测试EIM接口配置:在驱动程序中,现将eim接口的物理地址进行ioremap映射,然后使用printk将eim中的数据进行打印出来。

目前的寄存器配置如下:

linux-4.1.15/arch/arm/boot/dts/imx6qdl.dtsi

            weim: weim@021b8000 {
                compatible = "fsl,imx6q-weim";
                reg = <0x021b8000 0x4000>;
                clocks = <&clks 196>;
                #address-cells = <2>;
                #size-cells = <1>;
                ranges = <0 0 0x08000000 0x08000000>;
                fsl,weim-cs-gpr = <&gpr>;

                fpga@0,0 {
                    compatible = "cfi-flash";
                    reg = <0 0 0x02000000>;
                    #address-cells = <1>;
                    #size-cells = <1>;
                    bank-width = <2>;
                    fsl,weim-cs-timing = <0x00010CB1 0x00001010 0x0C015100
                                0x00000000 0xCC1C7640 0x00000000>;
              };
            };

斜体部分就是需要配置的寄存器!

Outcomes