tps6594-pfsm.rst 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =====================================
  3. Texas Instruments TPS6594 PFSM driver
  4. =====================================
  5. Author: Julien Panis (jpanis@baylibre.com)
  6. Overview
  7. ========
  8. Strictly speaking, PFSM (Pre-configurable Finite State Machine) is not
  9. hardware. It is a piece of code.
  10. The TPS6594 PMIC (Power Management IC) integrates a state machine which
  11. manages operational modes. Depending on the current operational mode,
  12. some voltage domains remain energized while others can be off.
  13. The PFSM driver can be used to trigger transitions between configured
  14. states. It also provides R/W access to the device registers.
  15. Supported chips
  16. ---------------
  17. - tps6594-q1
  18. - tps6593-q1
  19. - lp8764-q1
  20. Driver location
  21. ===============
  22. drivers/misc/tps6594-pfsm.c
  23. Driver type definitions
  24. =======================
  25. include/uapi/linux/tps6594_pfsm.h
  26. Driver IOCTLs
  27. =============
  28. :c:macro::`PMIC_GOTO_STANDBY`
  29. All device resources are powered down. The processor is off, and
  30. no voltage domains are energized.
  31. :c:macro::`PMIC_GOTO_LP_STANDBY`
  32. The digital and analog functions of the PMIC, which are not
  33. required to be always-on, are turned off (low-power).
  34. :c:macro::`PMIC_UPDATE_PGM`
  35. Triggers a firmware update.
  36. :c:macro::`PMIC_SET_ACTIVE_STATE`
  37. One of the operational modes.
  38. The PMICs are fully functional and supply power to all PDN loads.
  39. All voltage domains are energized in both MCU and Main processor
  40. sections.
  41. :c:macro::`PMIC_SET_MCU_ONLY_STATE`
  42. One of the operational modes.
  43. Only the power resources assigned to the MCU Safety Island are on.
  44. :c:macro::`PMIC_SET_RETENTION_STATE`
  45. One of the operational modes.
  46. Depending on the triggers set, some DDR/GPIO voltage domains can
  47. remain energized, while all other domains are off to minimize
  48. total system power.
  49. Driver usage
  50. ============
  51. See available PFSMs::
  52. # ls /dev/pfsm*
  53. Dump the registers of pages 0 and 1::
  54. # hexdump -C /dev/pfsm-0-0x48
  55. See PFSM events::
  56. # cat /proc/interrupts
  57. Userspace code example
  58. ----------------------
  59. samples/pfsm/pfsm-wakeup.c