Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

66AK2H14: Issue to use 2 NOR flashes with chip select

$
0
0

Part Number: 66AK2H14

Hi,

We are currently developping our custom board using a 66AK2H14 SoC.

I am working on embedded linux and I am trying to use the 2 flashes available on SPI bus 0. The 2 flashes must be used using the chip select 0 and 1.

Basically, all my boot components (kernel, fs...) are located on flash with cs0. I added on my device tree source new partitions located on the second flash with cs1 as following:

    nor_flash2: mt25qu02g@1 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "Micron,mt25qu02g2", "jedec,spi-nor";
        spi-max-frequency = <1000000>;
        reg = <1>;

        partition@0 {
            label = "test1";
            reg = <0x0 0x2600000>;
        };

        partition@1 {
            label = "test2";
            reg = <0x2600000 0xDA00000>;
        };
    };

I detect the second flash during Linux boot phase:

[    1.462955] m25p80 spi0.1: JEDEC id bytes: 20, bb, 22                                                                                                                                 
[    1.469025] random: fast init done                                                                                                                                                    
[    1.472819] m25p80 spi0.1: mt25qu02g (262144 Kbytes)                                                                                                                                  
[    1.477832] 2 ofpart partitions found on MTD device spi0.1                                                                                                                            
[    1.483335] Creating 2 MTD partitions on "spi0.1":                                                                                                                                    
[    1.488159] 0x000000000000-0x000002600000 : "test1"                                                                                                                                    
[    1.493467] 0x000002600000-0x000010000000 : "test2" 

However, I must to put the second flash spi frequency  lower to get this result. My spi max frequency on flash0 is 54 000 000.

We can assume our custom hardware design force the second flash to work with lower spi frequency.

Doing this, Linux can read the ID of the flash and detect it well.

My problem now is to mount the partitions of second flash.

Indeed, I have no problem to mount partition of the first flash. However, when I try to mount partition on this flash, i got this:

command: mount -t jffs2 /dev/mtdblock16 /tmp/test

result:

mount: mounting /dev/mtdblock16 on /tmp/test/ failed: Input/output error

 

If I look in /var/log/messages, i can see many messages as following:

Jan  1 00:09:57 EVM_KEPLER kern.notice kernel: [  597.603443] jffs2: Further such events for this erase block will not be printed
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317269] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b0004: 0x4001 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317275] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b002c: 0x2000 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317280] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b0030: 0x3500 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317286] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b003c: 0x4001 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317290] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b0064: 0x2000 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317295] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b0068: 0x3500 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317299] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b0074: 0x4001 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317304] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b009c: 0x2000 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317308] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b00a0: 0x3500 instead
Jan  1 00:09:58 EVM_KEPLER kern.notice kernel: [  598.317312] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x024b00ac: 0x4001 instead

I did a flash_erase of the partition with the valid options before mount it, but it doesn't change anything.

Do you have any idea what happens? Is there anything to add more in device tree sources?

Thank you in advance for your help.

Best regards.

K.Luong

 

 


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>