<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/firmware/ti_sci.c, branch v7.0-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-13T19:03:55+00:00</updated>
<entry>
<title>firmware: ti_sci: Partial-IO support</title>
<updated>2025-11-13T19:03:55+00:00</updated>
<author>
<name>Markus Schneider-Pargmann (TI.com)</name>
<email>msp@baylibre.com</email>
</author>
<published>2025-11-03T12:42:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e0431ff998bd32dcc1e591a45b4e156fcb0325a3'/>
<id>urn:sha1:e0431ff998bd32dcc1e591a45b4e156fcb0325a3</id>
<content type='text'>
Add support for Partial-IO poweroff. In Partial-IO pins of a few
hardware units can generate system wakeups while DDR memory is not
powered resulting in a fresh boot of the system. These hardware units in
the SoC are always powered so that some logic can detect pin activity.

If the system supports Partial-IO as described in the fw capabilities, a
sys_off handler is added. This sys_off handler decides if the poweroff
is executed by entering normal poweroff or Partial-IO instead. The
decision is made by checking if wakeup is enabled on all devices that
may wake up the SoC from Partial-IO.

The possible wakeup devices are found by checking which devices
reference a "Partial-IO" system state in the list of wakeup-source
system states. Only devices that are actually enabled by the user will
be considered as an active wakeup source. If none of the wakeup sources
is enabled the system will do a normal poweroff. If at least one wakeup
source is enabled it will instead send a TI_SCI_MSG_PREPARE_SLEEP
message from the sys_off handler. Sending this message will result in an
immediate shutdown of the system. No execution is expected after this
point. The code will wait for 5s and do an emergency_restart afterwards
if Partial-IO wasn't entered at that point.

A short documentation about Partial-IO can be found in section 6.2.4.5
of the TRM at
  https://www.ti.com/lit/pdf/spruiv7

Signed-off-by: Markus Schneider-Pargmann (TI.com) &lt;msp@baylibre.com&gt;
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Reviewed-by: Kendall Willis &lt;k-willis@ti.com&gt;
Reviewed-by: Sebin Francis &lt;sebin.francis@ti.com&gt;
Link: https://patch.msgid.link/20251103-topic-am62-partialio-v6-12-b4-v10-2-0557e858d747@baylibre.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Support transfers without response</title>
<updated>2025-11-13T19:03:55+00:00</updated>
<author>
<name>Markus Schneider-Pargmann (TI.com)</name>
<email>msp@baylibre.com</email>
</author>
<published>2025-11-03T12:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=170a3ef6052cfa2462b3bb572a6bb985bf83d21e'/>
<id>urn:sha1:170a3ef6052cfa2462b3bb572a6bb985bf83d21e</id>
<content type='text'>
Check the header flags if an response is expected or not. If it is not
expected skip the receive part of ti_sci_do_xfer(). This prepares the
driver for one-way messages as prepare_sleep for Partial-IO.

Reviewed-by: Kendall Willis &lt;k-willis@ti.com&gt;
Signed-off-by: Markus Schneider-Pargmann (TI.com) &lt;msp@baylibre.com&gt;
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Reviewed-by: Sebin Francis &lt;sebin.francis@ti.com&gt;
Link: https://patch.msgid.link/20251103-topic-am62-partialio-v6-12-b4-v10-1-0557e858d747@baylibre.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Set IO Isolation only if the firmware is capable</title>
<updated>2025-11-03T15:09:02+00:00</updated>
<author>
<name>Thomas Richard (TI.com)</name>
<email>thomas.richard@bootlin.com</email>
</author>
<published>2025-10-31T12:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=999e9bc953e321651d69556fdd5dfd178f96f128'/>
<id>urn:sha1:999e9bc953e321651d69556fdd5dfd178f96f128</id>
<content type='text'>
Prevent calling ti_sci_cmd_set_io_isolation() on firmware
that does not support the IO_ISOLATION capability. Add the
MSG_FLAG_CAPS_IO_ISOLATION capability flag and check it before
attempting to set IO isolation during suspend/resume operations.

Without this check, systems with older firmware may experience
undefined behavior or errors when entering/exiting suspend states.

Fixes: ec24643bdd62 ("firmware: ti_sci: Add system suspend and resume call")
Signed-off-by: Thomas Richard (TI.com) &lt;thomas.richard@bootlin.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Link: https://patch.msgid.link/20251031-ti-sci-io-isolation-v2-1-60d826b65949@bootlin.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Replace ifdeffery by pm_sleep_ptr() macro</title>
<updated>2025-11-03T15:08:53+00:00</updated>
<author>
<name>Thomas Richard (TI.com)</name>
<email>thomas.richard@bootlin.com</email>
</author>
<published>2025-10-14T08:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a4cd87e76fb4547d7843e3124611bf13004b18b'/>
<id>urn:sha1:7a4cd87e76fb4547d7843e3124611bf13004b18b</id>
<content type='text'>
Using pm_sleep_ptr() macro allows to remove ifdeffery and
'__maybe_unused' annotations.

Signed-off-by: Thomas Richard (TI.com) &lt;thomas.richard@bootlin.com&gt;
Link: https://patch.msgid.link/20251014-ti-sci-pm-ops-cleanup-v1-1-70b50b73ac85@bootlin.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Enable abort handling of entry to LPM</title>
<updated>2025-08-22T18:22:00+00:00</updated>
<author>
<name>Kendall Willis</name>
<email>k-willis@ti.com</email>
</author>
<published>2025-08-19T19:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fdd3240fe5a9bf4785e40506bf86b7e16546b83'/>
<id>urn:sha1:0fdd3240fe5a9bf4785e40506bf86b7e16546b83</id>
<content type='text'>
The PM co-processor (device manager or DM) adds the ability to abort
entry to a low power mode by clearing the mode selection in the
latest version of its firmware (11.01.09) [1].

Enable the ti_sci driver to support the LPM abort call which clears the
low power mode selection of the DM. This fixes an issue where failed
system suspend attempts would cause subsequent suspends to fail.

After system suspend completes, regardless of if system suspend succeeds
or fails, the -&gt;complete() hook in TI SCI will be called. In the
-&gt;complete() hook, a message will be sent to the DM to clear the current
low power mode selection. Clearing the low power mode selection
unconditionally will not cause any error in the DM.

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html

Signed-off-by: Kendall Willis &lt;k-willis@ti.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Link: https://patch.msgid.link/20250819195453.1094520-1-k-willis@ti.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Convert CPU latency constraint from us to ms</title>
<updated>2025-05-06T12:25:51+00:00</updated>
<author>
<name>Kendall Willis</name>
<email>k-willis@ti.com</email>
</author>
<published>2025-04-28T20:53:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b808f7f395ae375a26e32046b680cf898dacc21'/>
<id>urn:sha1:9b808f7f395ae375a26e32046b680cf898dacc21</id>
<content type='text'>
Fix CPU resume latency constraint units sent to device manager through the
TI SCI API. The device manager expects CPU resume latency to be in msecs
which is passed in with the TI SCI API [1]. CPU latency constraints are
set in userspace using the PM QoS framework which uses usecs as the unit.
Since PM QoS uses usecs for units and the device manager expects msecs as
the unit, TI SCI needs to convert from usecs to msecs before passing to
device manager.

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#tisci-msg-lpm-set-latency-constraint

Cc: stable@vger.kernel.org
Fixes: a7a15754c7f7 ("firmware: ti_sci: add CPU latency constraint management")
Signed-off-by: Kendall Willis &lt;k-willis@ti.com&gt;
Link: https://lore.kernel.org/r/20250428205336.2947118-1-k-willis@ti.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Remove use of of_match_ptr() helper</title>
<updated>2024-10-25T17:56:37+00:00</updated>
<author>
<name>Andrew Davis</name>
<email>afd@ti.com</email>
</author>
<published>2024-10-15T21:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4c14f509509a6a24f25edb7619f55f204a8433f'/>
<id>urn:sha1:a4c14f509509a6a24f25edb7619f55f204a8433f</id>
<content type='text'>
When OF support is disabled the of_device_id struct match table can be
conditionally compiled out, this helper allows the assignment to also be
turned into a NULL conditionally. When the of_device_id struct is not
conditionally defined based on OF then the table will be unused causing a
warning. The two options are to either set the table as _maybe_unused, or
to just remove this helper since the table will always be defined.
Do the latter here.

Signed-off-by: Andrew Davis &lt;afd@ti.com&gt;
Link: https://lore.kernel.org/r/20241015213322.2649011-2-afd@ti.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: add CPU latency constraint management</title>
<updated>2024-10-25T15:45:07+00:00</updated>
<author>
<name>Kevin Hilman</name>
<email>khilman@baylibre.com</email>
</author>
<published>2024-10-07T06:08:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7a15754c7f70a833ffeb9ad996b358924f10305'/>
<id>urn:sha1:a7a15754c7f70a833ffeb9ad996b358924f10305</id>
<content type='text'>
During system-wide suspend, check if any of the CPUs have PM QoS
resume latency constraints set.  If so, set TI SCI constraint.

TI SCI has a single system-wide latency constraint, so use the max of
any of the CPU latencies as the system-wide value.

Note: DM firmware clears all constraints at resume time, so
constraints need to be checked/updated/sent at each system suspend.

Co-developed-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
Signed-off-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Tested-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Tested-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Tested-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Link: https://lore.kernel.org/r/20241007-tisci-syssuspendresume-v13-5-ed54cd659a49@baylibre.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Introduce Power Management Ops</title>
<updated>2024-10-25T15:45:07+00:00</updated>
<author>
<name>Dave Gerlach</name>
<email>d-gerlach@ti.com</email>
</author>
<published>2024-10-07T06:08:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=60357991f6b9d4bd4dc442a368da3f468cfa4903'/>
<id>urn:sha1:60357991f6b9d4bd4dc442a368da3f468cfa4903</id>
<content type='text'>
Introduce power management ops supported by the TISCI
Low Power Mode API [1].

1) TISCI_MSG_LPM_WAKE_REASON
Get which wake up source woke the SoC from Low Power Mode.
The wake up source IDs will be common for all K3 platforms.

2) TISCI_MSG_LPM_SET_DEVICE_CONSTRAINT
Set LPM constraint on behalf of a device. By setting a constraint, the
device ensures that it will not be powered off or reset in the selected
mode.

3) TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT
Set LPM resume latency constraint. By setting a constraint, the host
ensures that the resume time from selected mode will be less than the
constraint value.

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html

Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
[g-vlaev@ti.com: LPM_WAKE_REASON and IO_ISOLATION support]
Signed-off-by: Georgi Vlaev &lt;g-vlaev@ti.com&gt;
[a-kaur@ti.com: SET_DEVICE_CONSTRAINT support]
Signed-off-by: Akashdeep Kaur &lt;a-kaur@ti.com&gt;
[vibhore@ti.com: SET_LATENCY_CONSTRAINT support]
Signed-off-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Reviewed-by: Akashdeep Kaur &lt;a-kaur@ti.com&gt;
Tested-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Tested-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Tested-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Acked-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Link: https://lore.kernel.org/r/20241007-tisci-syssuspendresume-v13-4-ed54cd659a49@baylibre.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
<entry>
<title>firmware: ti_sci: Add system suspend and resume call</title>
<updated>2024-10-25T15:45:07+00:00</updated>
<author>
<name>Vibhore Vardhan</name>
<email>vibhore@ti.com</email>
</author>
<published>2024-10-07T06:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec24643bdd625971933451f22b8e33d364920f6e'/>
<id>urn:sha1:ec24643bdd625971933451f22b8e33d364920f6e</id>
<content type='text'>
Introduce system suspend call that enables the ti_sci driver to support
low power mode when the user space issues a suspend to mem.

The following power management operations defined in the TISCI
Low Power Mode API [1] are implemented to support suspend and resume:

1) TISCI_MSG_PREPARE_SLEEP
Prepare the SOC for entering into a low power mode and
provide details to firmware about the state being entered.

2) TISCI_MSG_SET_IO_ISOLATION
Control the IO isolation for Low Power Mode.

Also, write a ti_sci_prepare_system_suspend call to be used in the driver
suspend handler to allow the system to identify the low power mode being
entered and if necessary, send TISCI_MSG_PREPARE_SLEEP with information
about the mode being entered.

Sysfw version &gt;= 10.00.04 support LPM_DM_MANAGED capability [2], where
Device Mgr firmware now manages which low power mode is chosen. Going
forward, this is the default configuration supported for TI AM62 family
of devices. The state chosen by the DM can be influenced by sending
constraints using the new LPM constraint APIs.

In case the firmware does not support LPM_DM_MANAGED mode, the mode
selection logic can be extended as needed. If no suspend-to-RAM modes
are supported, return without taking any action.

We're using "pm_suspend_target_state" to map the kernel's target suspend
state to SysFW low power mode. Make sure this is available only when
CONFIG_SUSPEND is enabled.

Suspend has to be split into two parts, ti_sci_suspend() will send
the prepare sleep message to prepare suspend. ti_sci_suspend_noirq()
sets IO isolation which needs to be done as late as possible to avoid
any issues. On resume this has to be done as early as possible.

[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html

Co-developed-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
Signed-off-by: Georgi Vlaev &lt;g-vlaev@ti.com&gt;
Signed-off-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Vibhore Vardhan &lt;vibhore@ti.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Tested-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Tested-by: Roger Quadros &lt;rogerq@kernel.org&gt;
Link: https://lore.kernel.org/r/20241007-tisci-syssuspendresume-v13-3-ed54cd659a49@baylibre.com
Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
</content>
</entry>
</feed>
