AnsweredAssumed Answered

SRAM using EIM in a iMX6

Question asked by Jorge Fernandez on Apr 16, 2015
Latest reply on Jun 4, 2015 by Poussemousse

Hi all,

 

We're connecting a 4MB Static RAM using the EIM interface in a custom iMX6 board.

We are trying to set a filesystem in that SRAM.

 

The kernel version is from yocto 3.10.53. We're only using the pins:

 

- EIM_CS0_B

- EIM_OE_B

- EIM_RW

- EIM_DATA00 to EIM_DATA15

- EIM_AD00 to EIM_ADDR21

 

and in DTS we have:

 

/*https://www.kernel.org/doc/Documentation/devicetree/bindings/bus/imx-weim.txt*/

&weim {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_weim_ram_1 &pinctrl_weim_cs0_1>;

    #address-cells = <2>;

    #size-cells = <1>;

    /* <cs-number> 0 <physical address of mapping> <size> = size 64MB -> addr=22 pins*/

    ranges = <0 0 0x08000000 0x008000000>;

    status = "okay";

 

    sram@0,0 {

        compatible = "mtd-ram";

        reg = <0 0 0x00400000>;

        #address-cells = <1>;

        #size-cells = <1>;

        bank-width = <2>;

        /* EIM_CSnGCR1, EIM_CSnGCR2, EIM_CSnRCR1, EIM_CSnRCR2, EIM_CSnWCR1, EIM_CSnWCR2 */

        fsl,weim-cs-timing = <0x403184B1 0x00001010 0x14017000

                0x00000000 0x14000E00 0x00000000>;

    };

};

 

I have three question:

 

1) To use the SRAM as a block device where we can set a filesystem the "mtd-ram" is the correct choice?

With the next command we can see the device recognized

# cat /proc/mtd

2) With that configuration we can see signals in the scope but if we try to make a fs in the block device related

we get an error. Is this correct?

 

# mkfs.ext2 /dev/mtdblock0

# mount /dev/mtdblock0 kk/

 

We have a SPI device too and the previous commands works ok.

 

3) Are there very obvious mistakes in this weim DTS definition we are not catching?

 

Any info is welcome, thanks!

Outcomes