How to use SPIBSC1 for data starage by single MX25L1633 SPI flash on RZA1H

Hello,

 

We are working on custom made RZA1H board with a dual QSPI S25FL512S on SPIBSC0, and we are using single  MX15L1633 macronix on SPIBSC1.

We want use SPIBSC1 as read/write  file system to store some mysql data base.

 

I have done the pin configuration in u-boot as:

/**/
        pfc_set_pin_function(8, 12, ALT3, 0, 0);        /* P8_12 = SPBCLK_0 */
        pfc_set_pin_function(8, 13, ALT3, 0, 0);        /* P8_13 = SPBSSL_0 */
        pfc_set_pin_function(8, 14, ALT3, 0, 1);        /* P8_14 = SPBIO00_0 (bi dir) */
        pfc_set_pin_function(8, 15, ALT3, 0, 1);        /* P8_15 = SPBIO10_0 (bi dir) */
        pfc_set_pin_function(8, 10, ALT3, 0, 1);        /* P8_10 = SPBIO20_0 (bi dir) */
        pfc_set_pin_function(8, 11, ALT3, 0, 1);        /* P8_11 = SPBIO30_0 (bi dir) */

 in the kernel i am calling platform_device_register_full(&spibsc1_info);


 Please tell me how do I go about creating single MTD  partition on SPI flash on SPIBSC1.

Thanks regards,

Nags

 

  • In the 3.14 BSP, you would edit the xxx-board.c file.
    For the 4.9 BSP, you would edit the Device Tree.

    What kernel version are you using?
  • In reply to Chris:

    Hi Chris ,
    I am using 3.14BSP
  • In reply to Chris:

    Hello Chris,

    Thanks for the reply, actually I am using 3.14 BSP and kernel 3.14.28lts.
    As I mailed you earlier we are using custom made RZA1H based board same as RSK board, only the difference is we are using additional single SPI Flash in SPIBCS1(MX25L1633E)32MB. The board is working fine but I am facing the problem while detecting and mount SPIBSC1 as a additional storage space.

    default SPIBSC0 is a dual QSPI Flash and is read only,Is it possible to make the other channel i.e SPIBSC1 with single flash as read/write , if possible what is the changes required in board.c file.

    I tried to use the bellow code but it is not detecting the flash.
    Please tell help us regarding this.


    The procedure I followed is this. in the kernel i made below changes:

    r7s72100_pfc_pin_assign(P8_10, ALT3, DIIO_PBDC_DIS); /* SPBIO20 */
    r7s72100_pfc_pin_assign(P8_11, ALT3, DIIO_PBDC_DIS); /* SPBIO30 */
    r7s72100_pfc_pin_assign(P8_12, ALT3, DIR_IN); /*SPBCLK */
    r7s72100_pfc_pin_assign(P8_13, ALT3, DIR_IN); /*SPBSSL */
    r7s72100_pfc_pin_assign(P8_14, ALT3, DIIO_PBDC_DIS); /* SPBIO00 */
    r7s72100_pfc_pin_assign(P8_15, ALT3, DIIO_PBDC_DIS); /* SPBIO10*/
    platform_device_register_full(&spibsc1_info);


    /* SPIBSC1 */
    static const struct sh_spibsc_info spibsc1_pdata = {
    .bus_num = 6,
    };

    static const struct resource spibsc1_resources[] __initconst = {
    DEFINE_RES_MEM(0x3fefb000, 0x100),
    };

    static const struct platform_device_info spibsc1_info __initconst = {
    .name = "spibsc",
    .id = 1,
    .data = &spibsc1_pdata,
    .size_data = sizeof(spibsc1_pdata),
    .num_res = ARRAY_SIZE(spibsc1_resources),
    .res = spibsc1_resources,
    };


    Thanks and regards,
    Nags.
  • In reply to nags:

    > Thanks for the reply, actually I am using 3.14 BSP and kernel 3.14.28lts.
    You should update to the latest version 3.14.79

    The data lines need to be bi-directional.
    This what you want:

    r7s72100_pfc_pin_assign(P8_10, ALT3, DIIO_PBDC_EN); /* SPBIO20_1 */
    r7s72100_pfc_pin_assign(P8_11, ALT3, DIIO_PBDC_EN); /* SPBIO30_1 */
    r7s72100_pfc_pin_assign(P8_12, ALT3, DIIO_PBDC_DIS); /* SPBCLK_1 */
    r7s72100_pfc_pin_assign(P8_13, ALT3, DIIO_PBDC_DIS); /* SPBSSL_1 */
    r7s72100_pfc_pin_assign(P8_14, ALT3, DIIO_PBDC_EN); /* SPBIO00_1 */
    r7s72100_pfc_pin_assign(P8_15, ALT3, DIIO_PBDC_EN); /* SPBIO10_1 */


    You have registered the device, but you need to create and register a MTD partition.


    static struct mtd_partition spibsc1_flash_partitions[] = {
    {
    .name = "spibsc1_data",
    .offset = 0x00000000,
    .size = MTDPART_SIZ_FULL,
    },
    };
    static struct flash_platform_data spibsc1_flash_pdata = {
    .name = "m25p80",
    .parts = spibsc1_flash_partitions,
    .nr_parts = ARRAY_SIZE(spibsc1_flash_partitions),
    .type = "s25fl512s",
    };

    /* Group the SPI flash devices so they can be reigstered */
    static struct spi_board_info rskrza1_spi_devices[] __initdata = {
    {
    /* SPIBSC1 */
    .modalias = "m25p80",
    .bus_num = 6,
    .chip_select = 0,
    .platform_data = &spibsc1_flash_pdata,
    },
    };



    static void __init rskrza1_add_standard_devices(void)
    {
    . . .
    . . .

    /* Register SPI device information */
    spi_register_board_info(rskrza1_spi_devices,
    ARRAY_SIZE(rskrza1_spi_devices));

    }
  • In reply to Chris:

    Hi Chris,

    Thanks for the reply, actually followed instruction that you have give now board.c looks like this.

    /* SPIBSC1 */
    static const struct sh_spibsc_info spibsc1_pdata = {
    .bus_num = 6,
    };

    static const struct resource spibsc1_resources[] __initconst = {
    DEFINE_RES_MEM(0x3fefb000, 0x100),
    };

    static const struct platform_device_info spibsc1_info __initconst = {
    .name = "spibsc",
    .id = 1,
    .data = &spibsc1_pdata,
    .size_data = sizeof(spibsc1_pdata),
    .num_res = ARRAY_SIZE(spibsc1_resources),
    .res = spibsc1_resources,
    };


    /* Enable SPIBSC1 Flash */
    r7s72100_pfc_pin_assign(P8_10, ALT3, DIIO_PBDC_EN); /* SPBIO20_1 */
    r7s72100_pfc_pin_assign(P8_11, ALT3, DIIO_PBDC_EN); /* SPBIO30_1 */
    r7s72100_pfc_pin_assign(P8_12, ALT3, DIIO_PBDC_DIS); /* SPBCLK_1 */
    r7s72100_pfc_pin_assign(P8_13, ALT3, DIIO_PBDC_DIS); /*SPBSSL_1 */
    r7s72100_pfc_pin_assign(P8_14, ALT3, DIIO_PBDC_EN); /* SPBIO00_1 */
    r7s72100_pfc_pin_assign(P8_15, ALT3, DIIO_PBDC_EN); /* SPBIO10_1 */

    platform_device_register_full(&spibsc1_info);

    /* Just for example, not populated on RSK */
    /* Dummy flash on SPIBSC1 */
    static struct mtd_partition spibsc1_flash_partitions[] = {
    {
    .name = "spibsc1_data",
    .offset = 0x00000000,
    .size = MTDPART_SIZ_FULL,
    },
    };
    static struct flash_platform_data spibsc1_flash_pdata = {
    .name = "m25p80",
    .parts = spibsc1_flash_partitions,
    .nr_parts = ARRAY_SIZE(spibsc1_flash_partitions),
    /* .type = "s25fl512s", */
    .type = "mx25l25635f",
    };
    /* Group the SPI flash devices so they can be reigstered */
    static struct spi_board_info smrza1h_spi_devices[] __initdata = {


    {
    /* SPI Flash1 */
    .modalias = "m25p80",
    .bus_num = 6,
    .chip_select = 0,
    .platform_data = &spibsc1_flash_pdata,
    },

    };

    /* Register SPI device information */
    spi_register_board_info(smrza1h_spi_devices,ARRAY_SIZE(smrza1h_spi_devices));



    But When I look into the kernel log I am not find any thing related to second SPI FLash, please tell me what am i missing here..

    Here is the kernel log:

    U-Boot 2015.01 (Mar 19 2018 - 17:21:04)

    I2C: ready
    DRAM: 10 MiB
    ENTER GLCD: SMRZA1H R7S72100
    EXIT GLCD: SMRZA1H R7S72100
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB
    In: serial
    Out: serial
    Err: serial
    riic_wait_for_icsr2: Timeout!(bit = 4 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 8 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 4 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 8 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 4 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 8 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 4 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 8 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 4 icsr2 = 0, iccr2 = 2)
    riic_wait_for_icsr2: Timeout!(bit = 8 icsr2 = 0, iccr2 = 2)
    SPI Flash Memory Map
    ------------------------------------
    Start Size SPI
    u-boot: 0x00000000 0x080000 0
    env: 0x00080000 0x040000 0
    DT: 0x000C0000 0x040000 0
    Kernel: 0x00100000 0x280000 0+1 (size*=2)
    rootfs: 0x00400000 0x1C00000 0+1 (size*=2)
    Net: sh_eth
    Hit any key to stop autoboot: 3 2 1 0
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB
    SF: 32768 bytes @ 0xc0000 Read: OK
    Current Mode: Read Mode (3-byte Addr) (RZ/A1 reset value)
    SF: Dual SPI mode
    SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB
    New Mode: Quad I/O Read Mode (4-byte Addr)
    Booting Linux...
    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 3.14.28-ltsi (nags@nags-ThinkPad-E470) (gcc version 4.8.3 20140203 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.02 - Linaro GCC 2014.02) ) #381 Wed Mar 21 19:30:30 IST 2018
    [ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: SMRZA1H
    [ 0.000000] debug: ignoring loglevel setting.
    [ 0.000000] debug: ignoring loglevel setting.
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] On node 0 totalpages: 2560
    [ 0.000000] free_area_init_node: node 0, pgdat c0037c64, node_mem_map c09d9000
    [ 0.000000] Normal zone: 20 pages used for memmap
    [ 0.000000] Normal zone: 0 pages reserved
    [ 0.000000] Normal zone: 2560 pages, LIFO batch:0
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [ 0.000000] pcpu-alloc: [0] 0
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 2540
    [ 0.000000] Kernel command line: console=ttySC3,115200 console=tty0 ignore_loglevel root=/dev/null rootflags=physaddr=0x18800000 earlyprintk ignore_loglevel
    [ 0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
    [ 0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Memory: 9628K/10240K available (3032K kernel code, 183K rwdata, 988K rodata, 135K init, 152K bss, 612K reserved)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    [ 0.000000] vmalloc : 0xc1000000 - 0xff000000 ( 992 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xc0a00000 ( 10 MB)
    [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    [ 0.000000] .text : 0xbf000000 - 0xbf3ed5f0 (4022 kB)
    [ 0.000000] .init : 0xc000a000 - 0xc0012000 ( 32 kB)
    [ 0.000000] .data : 0xc0008000 - 0xc003de40 ( 216 kB)
    [ 0.000000] .bss : 0xc003de40 - 0xc0063f64 ( 153 kB)
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 16777216000000000ns
    [ 0.000000] Console: colour dummy device 80x30
    [ 0.000000] Calibrating delay loop (skipped) preset value.. 266.09 BogoMIPS (lpj=1041666)
    [ 0.000000] pid_max: default: 32768 minimum: 301
    [ 0.000000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] CPU: Testing write buffer coherency: ok
    [ 0.000000] Setting up static identity map for 0x1f2d7a90 - 0x1f2d7ae8
    [ 0.000000] devtmpfs: initialized
    [ 0.000000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    [ 0.000000] pinctrl core: initialized pinctrl subsystem
    [ 0.000000] NET: Registered protocol family 16
    [ 0.000000] DMA: preallocated 16 KiB pool for atomic coherent allocations
    [ 0.000000] L310 cache controller enabled
    [ 0.000000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x42020000, Cache size: 128 kB
    [ 0.000000] No ATAGs?
    [ 0.000000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    [ 0.000000] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [ 0.000000] bio: create slab <bio-0> at 0
    [ 0.000000] SCSI subsystem initialized
    [ 0.000000] usbcore: registered new interface driver usbfs
    [ 0.000000] usbcore: registered new interface driver hub
    [ 0.000000] usbcore: registered new device driver usb
    [ 0.000000] sh_mtu2 sh-mtu2: no of_node; not parsing pinctrl DT
    [ 0.000000] sh_mtu2 sh-mtu2: ch0: used for clock events
    [ 0.000000] sh_mtu2 sh-mtu2: ch0: used for periodic clock events
    [ 0.164062] NET: Registered protocol family 2
    [ 0.171875] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.171875] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.171875] TCP: Hash tables configured (established 1024 bind 1024)
    [ 0.171875] TCP: reno registered
    [ 0.171875] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.171875] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.171875] NET: Registered protocol family 1
    [ 0.187500] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
    [ 0.195312] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.203125] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.203125] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    [ 0.203125] msgmni has been set to 18
    [ 0.218750] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    [ 0.218750] io scheduler noop registered (default)
    [ 0.218750] io scheduler deadline registered
    [ 0.218750] io scheduler cfq registered
    [ 0.242187] SuperH (H)SCI(F) driver initialized
    [ 0.242187] sh-sci sh-sci.3: no of_node; not parsing pinctrl DT
    [ 0.242187] sh-sci.3: ttySC3 at MMIO 0xe8008800 (irq = 235, base_baud = 0) is a scif
    [ 0.632812] console [ttySC3] enabled
    [ 0.640625] sh-sci sh-sci.1: no of_node; not parsing pinctrl DT
    [ 0.648437] sh-sci.1: ttySC1 at MMIO 0xe8007800 (irq = 227, base_baud = 0) is a scif
    [ 0.664062] sh-sci sh-sci.2: no of_node; not parsing pinctrl DT
    [ 0.664062] sh-sci.2: ttySC2 at MMIO 0xe8008000 (irq = 231, base_baud = 0) is a scif
    [ 0.679687] sh-sci sh-sci.4: no of_node; not parsing pinctrl DT
    [ 0.687500] sh-sci.4: ttySC4 at MMIO 0xe8009000 (irq = 239, base_baud = 0) is a scif
    [ 0.695312] sh-sci sh-sci.5: no of_node; not parsing pinctrl DT
    [ 0.703125] sh-sci.5: ttySC5 at MMIO 0xe8009800 (irq = 243, base_baud = 0) is a scif
    [ 0.718750] sh-sci sh-sci.6: no of_node; not parsing pinctrl DT
    [ 0.726562] sh-sci.6: ttySC6 at MMIO 0xe800a000 (irq = 247, base_baud = 0) is a scif
    [ 0.765625] r8a66597_hcd r8a66597_hcd.0: no of_node; not parsing pinctrl DT
    [ 0.898437] r8a66597_hcd r8a66597_hcd.0: USB Host Controller
    [ 0.898437] r8a66597_hcd r8a66597_hcd.0: new USB bus registered, assigned bus number 1
    [ 0.906250] r8a66597_hcd r8a66597_hcd.0: irq 73, io base 0xe8010000
    [ 0.976562] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.984375] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.984375] usb usb1: Product: USB Host Controller
    [ 0.992187] usb usb1: Manufacturer: Linux 3.14.28-ltsi r8a66597_hcd
    [ 1.000000] usb usb1: SerialNumber: r8a66597_hcd
    [ 1.007812] usb usb1: no of_node; not parsing pinctrl DT
    [ 1.023437] hub 1-0:1.0: no of_node; not parsing pinctrl DT
    [ 1.023437] hub 1-0:1.0: USB hub found
    [ 1.031250] hub 1-0:1.0: 1 port detected
    [ 1.039062] r8a66597_hcd r8a66597_hcd.1: no of_node; not parsing pinctrl DT
    [ 1.171875] r8a66597_hcd r8a66597_hcd.1: USB Host Controller
    [ 1.171875] r8a66597_hcd r8a66597_hcd.1: new USB bus registered, assigned bus number 2
    [ 1.179687] r8a66597_hcd r8a66597_hcd.1: irq 74, io base 0xe8207000
    [ 1.250000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [ 1.250000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 1.257812] usb usb2: Product: USB Host Controller
    [ 1.265625] usb usb2: Manufacturer: Linux 3.14.28-ltsi r8a66597_hcd
    [ 1.273437] usb usb2: SerialNumber: r8a66597_hcd
    [ 1.281250] usb usb2: no of_node; not parsing pinctrl DT
    [ 1.289062] hub 2-0:1.0: no of_node; not parsing pinctrl DT
    [ 1.296875] hub 2-0:1.0: USB hub found
    [ 1.304687] hub 2-0:1.0: 1 port detected
    [ 1.312500] usbcore: registered new interface driver usb-storage
    [ 1.320312] usbcore: registered new interface driver usbserial
    [ 1.328125] usbcore: registered new interface driver option
    [ 1.335937] usbserial: USB Serial support registered for GSM modem (1-port)
    [ 1.351562] i2c /dev entries driver
    [ 1.351562] i2c-riic i2c-riic.1: no of_node; not parsing pinctrl DT
    [ 1.375000] at24 1-0050: no of_node; not parsing pinctrl DT
    [ 1.382812] dummy 1-0051: no of_node; not parsing pinctrl DT
    [ 1.390625] dummy 1-0052: no of_node; not parsing pinctrl DT
    [ 1.398437] dummy 1-0053: no of_node; not parsing pinctrl DT
    [ 1.406250] dummy 1-0054: no of_node; not parsing pinctrl DT
    [ 1.421875] dummy 1-0055: no of_node; not parsing pinctrl DT
    [ 1.429687] dummy 1-0056: no of_node; not parsing pinctrl DT
    [ 1.437500] dummy 1-0057: no of_node; not parsing pinctrl DT
    [ 1.445312] at24 1-0050: 2048 byte at24 EEPROM, writable, 16 bytes/write
    [ 1.453125] rtc-ds1307 1-0032: no of_node; not parsing pinctrl DT
    [ 1.460937] rtc-ds1307 1-0032: rtc core: registered rx8025 as rtc0
    [ 1.468750] i2c-riic i2c-riic.1: version 2013-04-19: 100[kbps]
    [ 1.476562] sh_mobile_sdhi sh_mobile_sdhi.0: no of_node; not parsing pinctrl DT
    [ 1.648437] sh_mobile_sdhi sh_mobile_sdhi.0: mmc0 base at 0xe804e000 clock rate 66 MHz
    [ 1.664062] usbcore: registered new interface driver usbhid
    [ 1.671875] usbhid: USB HID core driver
    [ 1.671875] TCP: cubic registered
    [ 1.679687] NET: Registered protocol family 10
    [ 1.687500] sit: IPv6 over IPv4 tunneling driver
    [ 1.703125] NET: Registered protocol family 17
    [ 1.726562] rtc-ds1307 1-0032: hctosys: unable to read the hardware clock
    [ 1.734375] ### dt-test ### No testcase data in device tree; not running tests
    [ 1.750000] VFS: Mounted root (axfs filesystem) readonly on device 0:12.
    [ 1.757812] devtmpfs: mounted
    [ 1.757812] Freeing unused kernel memory: 32K (c000a000 - c0012000)
    Starting logging: OK
    Initializing random number generator... read-only file system detected...done
    Starting network...
    Initializing postgresql data base...
    su: can't change directory to '/var/lib/pgsql'
    The files belonging to this database system will be owned by user "postgres".
    This user must also own the server process.

    The database cluster will be initialized with locale "C".
    The default database encoding has accordingly been set to "SQL_ASCII".
    The default text search configuration will be set to "english".

    Data page checksums are disabled.

    initdb: could not access directory "/var/lib/pgsql": Permission denied
    pg_ctl: database system initialization failed
    done
    Starting postgresql: su: can't change directory to '/var/lib/pgsql'
    pg_ctl: could not open PID file "/var/lib/pgsql/postmaster.pid": Permission denied
    OK
    test shell script
    /etc/init.d/S99_rea_setup: line 56: alsactl: not found
    Open failed (null)
    [ 3.460937] matrix_keypad: Unknown symbol matrix_keypad_build_keymap (err 0)
    [ 3.468750] to klcd_init
    insmod: can't insert '/root/matrix_keypad.ko': unknown symbol in module, or unknown para[ 3.484375] To request GPIO pin 105
    meter
    [ 3.492187] ERR: Failed to request GPIO pin 105
    [ 3.492187] To request GPIO pin 104
    [ 3.500000] To request GPIO pin 102
    [ 3.515625] To request GPIO pin 106
    [ 3.515625] To request GPIO pin 78
    [ 3.531250] To request GPIO pin 103
    [ 3.539062] To request GPIO pin 81
    [ 3.546875] To request GPIO pin 82

    Welcome to Buildroot
    GST login: [ 3.562500] To request GPIO pin 83
    [ 3.578125] To request GPIO pin 84
    [ 3.578125] To request GPIO pin 85
    [ 3.593750] To request GPIO pin 86
    [ 3.593750] To request GPIO pin 89
    [ 3.609375] To request GPIO pin 90
    [ 3.703125] klcd Driver Initialized.
    [ 3.703125] out of klcd_init

    Welcome to Buildroot
    GST login: root



    IS any specific changes required in u-boot or How do I check h/w related issue in this.

    please help us.

    Thanks and regards,
    Nags.
  • In reply to nags:

    I would #define DEBUG at the top of the spibsc drive to see if it's even being called.

    I don't see the partitions getting registered.

    That would be done by this line:

    /* Register SPI device information */
    spi_register_board_info(smrza1h_spi_devices,ARRAY_SIZE(smrza1h_spi_devices));

    And, that registration should come after you've already registered the SPIBSC-1.


    Unfortunately, you are using the older 3.14 BSP. This is all much easier with the 4.9 BSP because it is done now in the Device Tree.
  • In reply to Chris:

    Dear Chris,

    Now I am using 4.14 Kernel , Please guide us the procedure( device tree entries) to mount and use the single SPI flash connected to SPIBSC1 channel as r/w partition in kernel to store the data base.

    Thanks.
    Nags
  • In reply to nags:

    Please see file:
    arch/arm/boot/dts/r7s72100-rskrza1_testing.dts

    Look for section:
    /* ========== SPIBSC (QSPI) Testing ========== */


    Note, you can NOT use XIP kernel if you are using SPIBSC for SPI flash r/w.
  • In reply to Chris:

    Dear Chris,

    Thanks for the info, actually we are using SPIBSC0 and connected Two qspi flash with XIP kernel This is Read-Only, , so we thought of using SPIBSC1 and connected single flash of size 64 MB and we want to make it read-write.

    That means we can not use SPIBSC1 as read-write when SPIBSC0 is read-only with XIP kernel, if that is the case . Is there any way we can make SPIBSC1 as read write, please guide us regarding this.


    We are in need of storage space where we can store data base and application, so we need read-write permission for that.

    Thanks and regards,
    Nags
  • In reply to nags:

    Nags,

    This is OK:
    SPIBSC-0: XIP mode, Read only (AXFS file system)
    SPIBSC-1: SPI mode, R/W (JFFS2 file system)

    Of course, instead of SPIBSC-1, if 1-bit SPI is OK, you can any SPI channel (RSPI) on the device. I see most people using SPIBSC0 for XIP (root file system, application, etc..) , then RSPI (1-bit SPI) for R/W storage (data, logs, etc...)