External memory bus (EIM) on iMX6

Hi,

Do you provide sample code for EIM on iMX6 on linux please?

Hi

The WEIM interface is configured in the device-tree.
We configure it for a non multiplexed bus with 3 chip selects, each taking up a memory size of 32M.

http://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts?h=toradex_4.1-2.0.x-imx-next#n263

With this, and two banks of 128k SRAM on CS0/CS1 connected to the Evaluation Board’s X3 on can access that memory at physical address 0x0800000 and 0x0a000000.

root@colibri-imx6:~# memtester -p 0x08000000 128K 1                             
memtester version 4.3.0 (32-bit)
Copyright (C) 2001-2012 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffff000
want 0MB (131072 bytes)
Loop 1/1:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : ok         
  Bit Spread          : ok         
  Bit Flip            : ok         
  Walking Ones        : ok         
  Walking Zeroes      : ok         

Done.
root@colibri-imx6:~# devmem2 0x08000000
/dev/mem opened.
Memory mapped at address 0x76f73000.
Read at address  0x08000000 (0x76f73000): 0x00000001

You could use one of the mmap family systemcalls to get access to get access from within your program.

Max