28 Open SPI node in SD booting

V0.0.2

28.1 Histroy

  • 2014-09-18, rayoslee, release V0.0.2
  • 2014-09-17, rayoslee, release V0.0.1

28.2 FAQ

  1. How to mount spi flash in SD booting ?

    • To patch bsp_update.tar.xz
      • tar -Jxvf bsp_update.tar.xz
    • To use config file SkyEye_S605_32_2.6.35.4_kernel_config_spi_mt5931
      • cp SkyEye_S605_32_2.6.35.4_kernel_config_spi_mt5931 .config
        SD config

        Figure 28.1: SD config

    • To build a bootable sd
      • ./build sd
    • To mount spi flash in S605-32
      • cat /proc/mtd (we will mount partition name UserData_1)
      • mkdir /mnt/nand1-3
      • mount -t jffs2 /dev/mtdblock2 /mnt/nand1-3
  2. How to open spidev0.0 ?

    • The same patch way as 1.
    • To use config file SkyEye_S605_32_2.6.35.4_kernel_config_spi_mt5931
      • cp SkyEye_S605_32_2.6.35.4_kernel_config_spi_mt5931 .config
      • make menuconfig (to change spidev)
        spidev config

        Figure 28.2: spidev config

    • To build a bootable sd
      • ./build sd
    • To test spidev in S605-32

      cd applications/spidev
      make
      cp spidev_test SD card
      ./spidev_test in S605-32
      /mnt/nand1-1 # ./spidev_test
      Please connect SPI0_SO with SPI0_SI to test
      spi mode: 0
      bits per word: 8
      max speed: 500000 Hz (500 KHz)
      FF FF FF FF FF FF
      40 00 00 00 00 95
      FF FF FF FF FF FF
      FF FF FF FF FF FF
      FF FF FF FF FF FF
      DE AD BE EF BA AD
      F0 0D

  3. How to read spi flash data for checking ?

    • Please refer to spicheck.tar.xz