README.fuse 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Fuse API functions and commands
  2. The fuse API allows to control a fusebox and how it is used by the upper
  3. hardware layers.
  4. A fuse corresponds to a single non-volatile memory bit that can be programmed
  5. (i.e. blown, set to 1) only once. The programming operation is irreversible. A
  6. fuse that has not been programmed reads 0.
  7. Fuses can be used by SoCs to store various permanent configuration and data,
  8. e.g. boot configuration, security configuration, MAC addresses, etc.
  9. A fuse word is the smallest group of fuses that can be read at once from the
  10. fusebox control IP registers. This is limited to 32 bits with the current API.
  11. A fuse bank is the smallest group of fuse words having a common ID, as defined
  12. by each SoC.
  13. Upon startup, the fusebox control IP reads the fuse values and stores them to a
  14. volatile shadow cache.
  15. See the README files of the drivers implementing this API in order to know the
  16. SoC- and implementation-specific details.
  17. Functions / commands:
  18. int fuse_read(u32 bank, u32 word, u32 *val);
  19. fuse read <bank> <word> [<cnt>]
  20. Read fuse words from the shadow cache.
  21. int fuse_sense(u32 bank, u32 word, u32 *val);
  22. fuse sense <bank> <word> [<cnt>]
  23. Sense - i.e. read directly from the fusebox, skipping the shadow cache -
  24. fuse words. This operation does not update the shadow cache.
  25. This is useful to know the true value of fuses if an override has been
  26. performed (see below).
  27. int fuse_prog(u32 bank, u32 word, u32 val);
  28. fuse prog [-y] <bank> <word> <hexval> [<hexval>...]
  29. Program fuse words. This operation directly affects the fusebox and is
  30. irreversible. The shadow cache is updated accordingly or not, depending on
  31. each IP.
  32. Only the bits to be programmed should be set in the input value (i.e. for
  33. fuse bits that have already been programmed and hence should be left
  34. unchanged by a further programming, it is preferable to clear the
  35. corresponding bits in the input value in order not to perform a new
  36. hardware programming operation on these fuse bits).
  37. int fuse_override(u32 bank, u32 word, u32 val);
  38. fuse override <bank> <word> <hexval> [<hexval>...]
  39. Override fuse words in the shadow cache.
  40. The fusebox is unaffected, so following this operation, the shadow cache
  41. may differ from the fusebox values. Read or sense operations can then be
  42. used to get the values from the shadow cache or from the fusebox.
  43. This is useful to change the behaviors linked to some cached fuse values,
  44. either because this is needed only temporarily, or because some of the
  45. fuses have already been programmed or are locked (if the SoC allows to
  46. override a locked fuse).
  47. Configuration:
  48. CONFIG_CMD_FUSE
  49. Define this to enable the fuse commands.