Spansion QSPI S25FL256 in Vybrid VF65GS10

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Spansion QSPI S25FL256 in Vybrid VF65GS10

2,465 Views
almagest
Contributor III

Hello.

We are trying to use the Spansion QSPI S25FL256 chip in our Vybrid VF65GS10 based design but are struggling to get QSPI to work with Linux. We cannot read nor write to the QSPI chip.

We are using Yocto and Timesys BSP to build our custom Linux BSP. (Kernel 3.0.15)

The QSPI chip is connected to QSPI0_A. We have no QSPI chips on either QSPI0_B, QSPI1_A or QSPI1_B.

We have verified that the clock runs at 33MHz as intended.

We have employed the same iomux settings in U-boot, and there communication (read/write) to the QSPI chip works fine.

During boot we encounter this error message: (line 02). Apart from that, there are no error messages.

FSL NFC MTD nand Driver 1.0

cannot support 17 opcode

m25p80 spi0.0: s25fl256s1 (32768 Kbytes)

Creating 9 MTD partitions on "Spansion s25fl256s SPI Flash chip":

0x000000000000-0x000000080000 : "U-Boot"

0x000000080000-0x000000100000 : "Environment"

0x000000100000-0x000000200000 : "InitScripts"

0x000000200000-0x000000400000 : "hwApp"

0x000000400000-0x000000800000 : "FPGA_Main"

0x000000800000-0x000000c00000 : "FPGA_Backup"

0x000000c00000-0x000000e00000 : "CPU_Main"

0x000000e00000-0x000001000000 : "CPU_Backup"

0x000001000000-0x000001100000 : "Configuration"

mvf-qspi mvf-qspi.0: QSPI bus driver

DSPI: Coldfire master initialized

Iomuxing for the QSPI0 device;

#define MVF600_PAD79_PTD0_QSPI0_A_SCK                       \

    IOMUX_PAD(0x013C, 0x013c, 1, 0x0000, 0, \

    PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE)

#define MVF600_PAD80_PTD1_QSPI0_A_CS0                       \

    IOMUX_PAD(0x0140, 0x0140, 1, 0x0000, 0, \

    PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_20ohm | PAD_CTL_PUS_22K_UP | PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_OBE_IBE_ENABLE)

#define MVF600_PAD81_PTD2_QSPI0_A_D3                        \

    IOMUX_PAD(0x0144, 0x0144, 1, 0x0000, 0, \

    PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE)

#define MVF600_PAD82_PTD3_QSPI0_A_D2                        \

    IOMUX_PAD(0x0148, 0x0148, 1, 0x0000, 0, \

    PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE)

#define MVF600_PAD83_PTD4_QSPI0_A_D1                        \

    IOMUX_PAD(0x014C, 0x014c, 1, 0x0000, 0, \

    PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE)

#define MVF600_PAD84_PTD5_QSPI0_A_D0                        \

    IOMUX_PAD(0x0150, 0x0150, 1, 0x0000, 0, \

    PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE)

Chip settings in the board file;

static struct flash_platform_data s25fl256s_spi_flash_data = {

    .name = "Spansion s25fl256s SPI Flash chip",

    .parts = s25fl256s_partitions,

    .nr_parts = ARRAY_SIZE(s25fl256s_partitions),

    .type = "s25fl256s1",

};

static struct spi_board_info mvf_spi_board_info[] __initdata = {

    {

        /* The modalias must be the same as spi device driver name */

        .modalias = "m25p80",

        .max_speed_hz = 66000000,

        .bus_num = 0,

        .chip_select = 0,

        .platform_data = &s25fl256s_spi_flash_data,

    },

...

Any help would be very much appreciated.

Thanks in advance.

Regards

Andreas L.

Labels (1)
Tags (4)
4 Replies

1,367 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport‌ can you help to review this case?

0 Kudos

1,367 Views
timesyssupport
Senior Contributor II

Hello Andreas,

Could you tell, how you are performing read and write cycle to the QSPI flash and also share the complete bootlog then it will be useful for us to sort out the cause for the issue.

Thanks,

Timesys Support

0 Kudos

1,367 Views
almagest
Contributor III

Hello!

The whole bootlog;

Starting kernel ...

Linux version 3.0.15+g50c4c84 (dr-admin@dr-linux) (gcc version 4.9.1 (GCC) ) #222 Fri Jul 15 15:28:38 CEST 2016

CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d

CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Freescale MVF TOWER VF700 Board

Memory policy: ECC disabled, Data cache writeback

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512

Kernel command line: console=ttyLP0,115200 ip=dhcp root=/nfs/rootfs rw nfsroot=192.168.100.61:/nfs/rootfs

PID hash table entries: 512 (order: -1, 2048 bytes)

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

Memory: 128MB = 128MB total

Memory: 125696k/125696k available, 5376k reserved, 0K highmem

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    DMA     : 0xf4600000 - 0xffe00000   ( 184 MB)

    vmalloc : 0x88800000 - 0xf2000000   (1688 MB)

    lowmem  : 0x80000000 - 0x88000000   ( 128 MB)

    modules : 0x7f000000 - 0x80000000   (  16 MB)

      .init : 0x80008000 - 0x80027000   ( 124 kB)

      .text : 0x80027000 - 0x803de000   (3804 kB)

      .data : 0x803de000 - 0x80402a20   ( 147 kB)

       .bss : 0x80402a44 - 0x8041c538   ( 103 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

NR_IRQS:432

MVF GPIO hardware

sched_clock: 64 bits at 132MHz, resolution 7ns, wraps every 34359ms

Console: colour dummy device 80x30

Calibrating delay loop... 262.96 BogoMIPS (lpj=1314816)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

devtmpfs: initialized

NET: Registered protocol family 16

mcf_edma: Initialized successfully

L310 cache controller enabled

l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02060000, Cache size: 524288 B

bio: create slab <bio-0> at 0

SCSI subsystem initialized

Switching to clocksource global_timer

NET: Registered protocol family 2

Switched to NOHz mode on CPU #0

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

Static Power Management for Freescale Vybrid

PM driver module loaded

JFFS2 version 2.2. (NAND) �   2001-2006 Red Hat, Inc.

msgmni has been set to 245

Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Serial: MVF driver

IMX UART EDMA enabled

IMX UART FIFO enabled

imx-uart.0: ttyLP0 at MMIO 0x40027000 (irq = 93) is a IMX

console [ttyLP0] enabled

IMX UART EDMA enabled

IMX UART FIFO enabled

imx-uart.3: ttyLP3 at MMIO 0x4002a000 (irq = 96) is a IMX

brd: module loaded

mvf-adc mvf-adc.0: attached adc driver

mvf-adc mvf-adc.1: attached adc driver

FSL NFC MTD nand Driver 1.0

cannot support 17 opcode

m25p80 spi0.0: s25fl256s1 (32768 Kbytes)

Creating 9 MTD partitions on "Spansion s25fl256s SPI Flash chip":

0x000000000000-0x000000080000 : "U-Boot"

0x000000080000-0x000000100000 : "Environment"

0x000000100000-0x000000200000 : "InitScripts"

0x000000200000-0x000000400000 : "hwApp"

0x000000400000-0x000000800000 : "FPGA_Main"

0x000000800000-0x000000c00000 : "FPGA_Backup"

0x000000c00000-0x000000e00000 : "CPU_Main"

0x000000e00000-0x000001000000 : "CPU_Backup"

0x000001000000-0x000001100000 : "Configuration"

mvf-qspi mvf-qspi.0: QSPI bus driver

DSPI: Coldfire master initialized

FEC Ethernet Driver

fec_enet_mii_bus: probed

mousedev: PS/2 mouse device common for all mice

snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc0

i2c /dev entries driver

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

sdhci sdhci-esdhc-imx.0: no write-protect pin available!

sdhci sdhci-esdhc-imx.0: no card-detect pin available!

mmc0: SDHCI controller on platform [sdhci-esdhc-imx.0] using ADMA

TCP cubic registered

NET: Registered protocol family 17

VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1

snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:03:07 UTC (187)

eth0: Freescale FEC PHY driver [Micrel KS8041] (mii_bus:phy_addr=2:01, irq=-1)

mmc0: new high speed MMC card at address 0001

mmcblk0: mmc0:0001 MMC08G 7.26 GiB

mmcblk0boot0: mmc0:0001 MMC08G partition 1 16.0 MiB

mmcblk0boot1: mmc0:0001 MMC08G partition 2 16.0 MiB

mmcblk0: p1 p2 p3

mmcblk0boot1: unknown partition table

mmcblk0boot0: unknown partition table

PHY: 2:01 - Link is Up - 100/Full

Sending DHCP requests ., OK

IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.100.72

IP-Config: Complete:

     device=eth0, addr=192.168.100.72, mask=255.255.255.0, gw=192.168.100.7,

     host=192.168.100.72, domain=data-respons.com, nis-domain=(none),

     bootserver=0.0.0.0, rootserver=192.168.100.61, rootpath=

VFS: Mounted root (nfs filesystem) on device 0:12.

Freeing init memory: 124K

Accessing the MTD from U-boot is okay;

// reading 1344 bytes from QSPI in U-boot

=> sf probe; sf read 0x80000000 0x0 0x540; md.b 0x80000000 0x540

SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB

SF: 1344 bytes @ 0x0 Read: OK

80000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

80000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01    ................

80000020: 00 00 00 00 00 00 00 01 00 00 00 00 01 00 00 00    ................

80000030: 00 00 00 00 04 00 00 00 00 00 00 00 00 00 6b 04    ..............k.

80000040: 18 08 08 0c 80 1e 00 24 00 00 00 00 00 00 00 00    .......$........

80000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

*

80000400: d1 00 20 40 00 80 40 3f 00 00 00 00 18 79 40 3f    .. @..@?.....y@?

80000410: 0c 79 40 3f ec 78 40 3f 00 00 00 00 00 00 00 00    .y@?.x@?........

80000420: ec 74 40 3f 00 60 03 00 00 00 00 00 d2 00 08 40    .t@?.`.........@

80000430: cc 00 04 04 00 00 00 00 00 00 00 00 00 00 00 00    ................

80000440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

*

80000530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

=>

While reading the block device in Linux (not mounted, not formatted) is different.

// reading 1344 bytes from QSPI in Linux

/ # dd if=/dev/mtdblock0 of=u-boot.bin bs=1 count=1344

1344+0 records in

1344+0 records out

1344 bytes (1.3KB) copied, 0.034308 seconds, 38.3KB/s

/ # hexdump -C u-boot.bin

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 01  |................|

00000020  00 00 00 00 00 00 00 01  00 00 00 00 01 00 00 00  |................|

00000030  00 00 00 00 04 00 00 00  00 00 00 00 00 00 6b 04  |..............k.|

00000040  18 08 08 0c 80 1e 00 24  00 00 00 00 00 00 00 00  |.......$........|

00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00000210  00 00 00 00 00 00 00 00  00 00 00 00 00 01 00 00  |................|

00000220  00 00 00 00 00 01 00 00  00 00 01 00 00 00 00 00  |................|

00000230  00 00 04 00 00 00 00 00  00 00 00 00 6b 04 18 08  |............k...|

00000240  08 0c 80 1e 00 24 00 00  00 00 00 00 00 00 00 00  |.....$..........|

00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00000410  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|

00000420  00 00 00 01 00 00 00 00  01 00 00 00 00 00 00 00  |................|

00000430  04 00 00 00 00 00 00 00  00 00 6b 04 18 08 08 0c  |..........k.....|

00000440  80 1e 00 24 00 00 00 00  00 00 00 00 00 00 00 00  |...$............|

00000450  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00000540

We really appreciate any help we can get!

Thank you.

0 Kudos

1,367 Views
SergioSolis
NXP Employee
NXP Employee

timesyssupport​ can you help us with this question?, thank you.

0 Kudos