From: Julien Panis <jpanis@baylibre.com>
To: lee@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, corbet@lwn.net, arnd@arndb.de,
gregkh@linuxfoundation.org, derek.kiernan@xilinx.com,
dragan.cvetic@xilinx.com
Cc: yi.l.liu@intel.com, jgg@ziepe.ca, razor@blackwall.org,
stephen@networkplumber.org, prabhakar.csengg@gmail.com,
contact@emersion.fr, macro@orcam.me.uk, dsahern@kernel.org,
alex.williamson@redhat.com, akrowiak@linux.ibm.com,
mark.rutland@arm.com, ye.xingchen@zte.com.cn, ojeda@kernel.org,
keescook@chromium.org, me@kloenk.de, mhiramat@kernel.org,
milan@mdaverde.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
sterzik@ti.com, u-kumar1@ti.com, eblanc@baylibre.com,
jneanne@baylibre.com
Subject: [PATCH v6 5/6] Documentation: Add TI TPS6594 PFSM
Date: Thu, 6 Apr 2023 09:56:21 +0200 [thread overview]
Message-ID: <20230406075622.8990-6-jpanis@baylibre.com> (raw)
In-Reply-To: <20230406075622.8990-1-jpanis@baylibre.com>
This patch adds documentation for the TPS6594 PFSM driver.
The PFSM controls the operational states of the TPS6594 PMIC.
Depending on the operational mode, some power domain networks
remain energized while others can be off.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
---
Documentation/misc-devices/index.rst | 1 +
Documentation/misc-devices/tps6594-pfsm.rst | 87 +++++++++++++++++++
.../userspace-api/ioctl/ioctl-number.rst | 1 +
3 files changed, 89 insertions(+)
create mode 100644 Documentation/misc-devices/tps6594-pfsm.rst
diff --git a/Documentation/misc-devices/index.rst b/Documentation/misc-devices/index.rst
index 756be15a49a4..ecc40fbbcfb8 100644
--- a/Documentation/misc-devices/index.rst
+++ b/Documentation/misc-devices/index.rst
@@ -28,5 +28,6 @@ fit into other categories.
oxsemi-tornado
pci-endpoint-test
spear-pcie-gadget
+ tps6594-pfsm
uacce
xilinx_sdfec
diff --git a/Documentation/misc-devices/tps6594-pfsm.rst b/Documentation/misc-devices/tps6594-pfsm.rst
new file mode 100644
index 000000000000..4ada37ccdcba
--- /dev/null
+++ b/Documentation/misc-devices/tps6594-pfsm.rst
@@ -0,0 +1,87 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=====================================
+Texas Instruments TPS6594 PFSM driver
+=====================================
+
+Author: Julien Panis (jpanis@baylibre.com)
+
+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
diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst
index 0a1882e296ae..e48c92be5807 100644
--- a/Documentation/userspace-api/ioctl/ioctl-number.rst
+++ b/Documentation/userspace-api/ioctl/ioctl-number.rst
@@ -180,6 +180,7 @@ Code Seq# Include File Comments
'P' 00-0F drivers/usb/class/usblp.c conflict!
'P' 01-09 drivers/misc/pci_endpoint_test.c conflict!
'P' 00-0F xen/privcmd.h conflict!
+'P' 00-05 linux/tps6594_pfsm.h conflict!
'Q' all linux/soundcard.h
'R' 00-1F linux/random.h conflict!
'R' 01 linux/rfkill.h conflict!
--
2.37.3
next prev parent reply other threads:[~2023-04-06 7:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 7:56 [PATCH v6 0/6] TI TPS6594 PMIC support (Core, ESM, PFSM) Julien Panis
2023-04-06 7:56 ` [PATCH v6 1/6] dt-bindings: mfd: Add TI TPS6594 PMIC Julien Panis
2023-04-06 7:56 ` [PATCH v6 2/6] mfd: tps6594: Add driver for " Julien Panis
2023-04-06 7:56 ` [PATCH v6 3/6] misc: tps6594-esm: Add driver for TI TPS6594 ESM Julien Panis
2023-04-06 7:56 ` [PATCH v6 4/6] misc: tps6594-pfsm: Add driver for TI TPS6594 PFSM Julien Panis
2023-04-06 7:56 ` Julien Panis [this message]
2023-04-06 7:56 ` [PATCH v6 6/6] samples: Add userspace example " Julien Panis
2023-06-16 13:39 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230406075622.8990-6-jpanis@baylibre.com \
--to=jpanis@baylibre.com \
--cc=akrowiak@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=arnd@arndb.de \
--cc=contact@emersion.fr \
--cc=corbet@lwn.net \
--cc=derek.kiernan@xilinx.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.cvetic@xilinx.com \
--cc=dsahern@kernel.org \
--cc=eblanc@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=jneanne@baylibre.com \
--cc=keescook@chromium.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=mark.rutland@arm.com \
--cc=me@kloenk.de \
--cc=mhiramat@kernel.org \
--cc=milan@mdaverde.com \
--cc=ojeda@kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=razor@blackwall.org \
--cc=robh+dt@kernel.org \
--cc=stephen@networkplumber.org \
--cc=sterzik@ti.com \
--cc=u-kumar1@ti.com \
--cc=ye.xingchen@zte.com.cn \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®