요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=====================================
Texas Instruments TPS6594 PFSM driver
=====================================
Author: Julien Panis ([email protected])
Overview
========
Strictly speaking, PFSM (Pre-configurable Finite State Machine) is not
hardware. It is a piece of code.
The TPS6594 PMIC (Power Management IC) integrates a state machine which
manages operational modes. Depending on the current operational mode,
some voltage domains remain energized while others can be off.
The PFSM driver can be used to trigger transitions between configured
states. It also provides R/W access to the device registers.
Supported chips
---------------
- tps6594-q1
- tps6593-q1
- lp8764-q1
Driver location
===============
drivers/misc/tps6594-pfsm.c
Driver type definitions
=======================
include/uapi/linux/tps6594_pfsm.h
Driver IOCTLs
=============
:c:macro::`PMIC_GOTO_STANDBY`
All device resources are powered down. The processor is off, and
no voltage domains are energized.
:c:macro::`PMIC_GOTO_LP_STANDBY`
The digital and analog functions of the PMIC, which are not
required to be always-on, are turned off (low-power).
:c:macro::`PMIC_UPDATE_PGM`
Triggers a firmware update.
:c:macro::`PMIC_SET_ACTIVE_STATE`
One of the operational modes.
The PMICs are fully functional and supply power to all PDN loads.
All voltage domains are energized in both MCU and Main processor
sections.
:c:macro::`PMIC_SET_MCU_ONLY_STATE`
One of the operational modes.
Only the power resources assigned to the MCU Safety Island are on.
:c:macro::`PMIC_SET_RETENTION_STATE`
One of the operational modes.
Depending on the triggers set, some DDR/GPIO voltage domains can
remain energized, while all other domains are off to minimize
total system power.
Driver usage
============
See available PFSMs::
# ls /dev/pfsm*
Dump the registers of pages 0 and 1::
# hexdump -C /dev/pfsm-0-0x48
See PFSM events::
# cat /proc/interrupts
Userspace code example
----------------------
samples/pfsm/pfsm-wakeup.c
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
문서 식별과 저자
1-8이 문서는 GPL-2.0 SPDX license를 따르며 Texas Instruments TPS6594 PFSM driver를 설명합니다. 저자는 Julien Panis <[email protected]>입니다.
.. SPDX-License-Identifier: GPL-2.0
=====================================
Texas Instruments TPS6594 PFSM driver
=====================================
Author: Julien Panis ([email protected])
PFSM과 PMIC state machine
9-20엄밀히 말해 PFSM(Pre-configurable Finite State Machine)은 hardware가 아니라 code 조각입니다.
TPS6594 PMIC(Power Management IC)는 operational mode를 관리하는 state machine을 통합합니다. 현재 mode에 따라 일부 voltage domain은 계속 powered 상태를 유지하고 나머지는 꺼질 수 있습니다.
PFSM driver는 미리 구성된 state 사이의 transition을 trigger하며 device register에 read/write access도 제공합니다.
Overview
========
Strictly speaking, PFSM (Pre-configurable Finite State Machine) is not
hardware. It is a piece of code.
The TPS6594 PMIC (Power Management IC) integrates a state machine which
manages operational modes. Depending on the current operational mode,
some voltage domains remain energized while others can be off.
The PFSM driver can be used to trigger transitions between configured
states. It also provides R/W access to the device registers.
지원 chip
21-28지원 chip은 `tps6594-q1`, `tps6593-q1`, `lp8764-q1`입니다.
Supported chips
---------------
- tps6594-q1
- tps6593-q1
- lp8764-q1
Source와 UAPI 정의
29-38Driver source는 `drivers/misc/tps6594-pfsm.c`, userspace-visible type 정의는 `include/uapi/linux/tps6594_pfsm.h`에 있습니다.
Driver location
===============
drivers/misc/tps6594-pfsm.c
Driver type definitions
=======================
include/uapi/linux/tps6594_pfsm.h
State 전이 IOCTL
39-67| IOCTL | 결과 state·동작 |
|---|---|
| `PMIC_GOTO_STANDBY` | 모든 device resource를 power down합니다. Processor가 꺼지고 energized voltage domain이 없습니다. |
| `PMIC_GOTO_LP_STANDBY` | Always-on일 필요가 없는 PMIC digital·analog function을 꺼 low-power 상태로 만듭니다. |
| `PMIC_UPDATE_PGM` | Firmware update를 trigger합니다. |
| `PMIC_SET_ACTIVE_STATE` | PMIC가 완전히 동작하며 모든 PDN load에 전원을 공급합니다. MCU와 Main processor section의 모든 voltage domain이 energized됩니다. |
| `PMIC_SET_MCU_ONLY_STATE` | MCU Safety Island에 할당된 power resource만 켭니다. |
| `PMIC_SET_RETENTION_STATE` | 설정된 trigger에 따라 일부 DDR/GPIO voltage domain만 유지하고 나머지를 꺼 전체 system power를 최소화합니다. |
Driver IOCTLs
=============
:c:macro::`PMIC_GOTO_STANDBY`
All device resources are powered down. The processor is off, and
no voltage domains are energized.
:c:macro::`PMIC_GOTO_LP_STANDBY`
The digital and analog functions of the PMIC, which are not
required to be always-on, are turned off (low-power).
:c:macro::`PMIC_UPDATE_PGM`
Triggers a firmware update.
:c:macro::`PMIC_SET_ACTIVE_STATE`
One of the operational modes.
The PMICs are fully functional and supply power to all PDN loads.
All voltage domains are energized in both MCU and Main processor
sections.
:c:macro::`PMIC_SET_MCU_ONLY_STATE`
One of the operational modes.
Only the power resources assigned to the MCU Safety Island are on.
:c:macro::`PMIC_SET_RETENTION_STATE`
One of the operational modes.
Depending on the triggers set, some DDR/GPIO voltage domains can
remain energized, while all other domains are off to minimize
total system power.
Device와 event 확인
68-83사용 가능한 PFSM device는 `ls /dev/pfsm*`로 확인합니다. Page 0과 1 register는 예제 device `/dev/pfsm-0-0x48`을 `hexdump -C`로 읽어 dump할 수 있고, PFSM event는 `/proc/interrupts`에서 확인합니다.
# ls /dev/pfsm*
# hexdump -C /dev/pfsm-0-0x48
# cat /proc/interrupts
Driver usage
============
See available PFSMs::
# ls /dev/pfsm*
Dump the registers of pages 0 and 1::
# hexdump -C /dev/pfsm-0-0x48
See PFSM events::
# cat /proc/interrupts
Userspace sample
84-87Userspace code 예제는 `samples/pfsm/pfsm-wakeup.c`에 있습니다.
Userspace code example
----------------------
samples/pfsm/pfsm-wakeup.c
요약·해설
tps6594-pfsm.rst:1-87PFSM ioctl은 PMIC를 active, MCU-only, retention, low-power standby, full standby 상태로 전이시키거나 firmware update를 시작합니다. 각 상태는 energized voltage domain의 범위를 다르게 정합니다.
더 많은 domain을 유지하는 상태부터 완전히 power-down하는 상태까지 비교합니다.