Skip to content
Snippets Groups Projects
  1. May 01, 2020
  2. Apr 30, 2020
  3. Apr 25, 2020
  4. Apr 24, 2020
  5. Apr 22, 2020
    • sibradzic's avatar
      flashchips: port S25FS(128S) chip from chromiumos · a3519561
      sibradzic authored
      This may seem too big just to support yet another flash chip, but in
      reality it brings support for whole new family of S25FS
      Spansion/Cypress flash chips. These chips require handling of some
      special status registers for erasing or writing, with very specific
      timing checks in place.
      
      For example, WIP status bit will remain being set to 1 if erase or
      programming errors occur, and in that case chip 'software reset' has
      to be performed otherwise the chip will remain unresponsive to all
      further commands. Also, special CR3NV register (Configuration Register
      3 Nonvolatile) status bits needs to be read and set by using RDAR
      (ReaD Any Register) and WRAR (WRite Any Register) OP commands, and
      these states are needed to determine which type of reset feature is
      enabled at the time (legacy or S25FS type) in the first place,
      determine whether Uniform or Hybrid sector architecture is used
      at the time, or set programming buffer address wrap point (256 or 512
      bytes). Furthermore, S25FS chip status register has to be restored to
      its original state (hence that ugly CHIP_RESTORE_CALLBACK) following
      erasing or writing, failing to do so may result in host being unable
      to access data on the chip at all.
      
      Finally, although this brings support for the whole family of chips,
      I only have one such chip to do the actual testing, S25FS128S (Small
      Sectors), which I had fully tested on ch341a and FT4232H programmers,
      with confirmed working probe, read, erase and write.
      
      Full summary of changes are here:
      
      flashchips:
        add new flashchip sctructure property:
          .reset
        add chip definitions:
          S25FS128S Large Sectors
          S25FS128S Small Sectors
      
      flash:
        add macro (chip_restore_func_data call-back):
          CHIP_RESTORE_CALLBACK
      
      flashrom:
        add struct:
          chip_restore_func_data
        add call-back function:
          register_chip_restore
      
      spi:
        add OP codes:
          CMD_RDAR, CMD_WRAR, CMD_WRAR_LEN, CMD_RSTEN, CMD_RST
        add register bit function definitions:
          CR3NV_ADDR, CR3NV_20H_NV
        add timers:
          T_W, T_RPH, T_SE
      
      spi25:
        refactor (based on chromiumos implementation) function:
          spi_poll_wip
        port these functions from chromiumos:
          probe_spi_big_spansion
          s25fs_software_reset
          s25f_legacy_software_reset
          s25fs_block_erase_d8
      
      spi25_statusreg:
        port these functions from chromiumos:
          spi_restore_status
          s25fs_read_cr
          s25fs_write_cr
          s25fs_restore_cr3nv
      
      Most of the ported functions are originally from s25f.c found at
      https://chromium.googlesource.com/chromiumos/third_party/flashrom
      
      
      with exception of spi_restore_status which is defined in
      spi25_statusreg.c. The rest of macros and OP codes are defined in
      same files as in this commit.
      
      Change-Id: If659290874a4b9db6e71256bdef382d31b288e72
      Signed-off-by: default avatarSamir Ibradzic <sibradzic@gmail.com>
      Reviewed-on: https://review.coreboot.org/c/flashrom/+/39822
      
      
      Tested-by: default avatarbuild bot (Jenkins) <no-reply@coreboot.org>
      Reviewed-by: default avatarEdward O'Callaghan <quasisec@chromium.org>
      a3519561
  6. Apr 19, 2020
  7. Apr 17, 2020
  8. Apr 14, 2020
  9. Apr 09, 2020
  10. Apr 08, 2020
  11. Apr 01, 2020
  12. Mar 28, 2020
  13. Mar 27, 2020
  14. Mar 26, 2020
  15. Mar 25, 2020
  16. Mar 24, 2020
  17. Mar 19, 2020
  18. Mar 11, 2020
  19. Mar 09, 2020
  20. Mar 03, 2020
  21. Mar 02, 2020
  22. Feb 24, 2020
  23. Feb 23, 2020
    • David Hendricks's avatar
      ubertest: Add blackbox test uber-script · 7a7fee16
      David Hendricks authored
      This modifies CB:23025 further to work with upstream as it is now,
      without the syntax changes in the patch chain. I also gave it a new
      name since this script is, well, uber.
      
      Since flashrom currently only supports reading/writing ROM-sized files
      we can't easily determine a targeted region offset and size except
      when a layout file is used. Therefore, some extra arithmetic is needed
      in the partial write test and the only modes allowed are clobber mode
      and layout mode.
      
      A few other changes:
      - Update paths and script name
      - Remove write-protect testing support
      - Use ROM-sized files only, no region-sized files
      - Return error if flashmap or ifd mode are used
      
      Documentation is ported from https://goo.gl/3jNoL7
      
       into a markdown
      file and accompanying SVGs. Minor changes were made for clarity and
      formatting, and references to write protect testing have been removed
      for the time being.
      
      Tested using a Raspberry Pi with a W25Q16
      
      Change-Id: I1af55d5088c54ee33853009797adbd535a506b49
      Signed-off-by: default avatarDavid Hendricks <david.hendricks@gmail.com>
      Reviewed-on: https://review.coreboot.org/c/flashrom/+/38788
      
      
      Tested-by: default avatarbuild bot (Jenkins) <no-reply@coreboot.org>
      Reviewed-by: default avatarEdward O'Callaghan <quasisec@chromium.org>
      7a7fee16
  24. Feb 09, 2020
Loading