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