From: Dhruva Gole <d-gole@ti.com>
To: Markus Schneider-Pargmann <msp@baylibre.com>
Cc: Nishanth Menon <nm@ti.com>, Tero Kristo <kristo@kernel.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Vibhore Vardhan <vibhore@ti.com>,
Kevin Hilman <khilman@baylibre.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 0/4] firmware: ti_sci: Introduce system suspend support
Date: Mon, 12 Aug 2024 11:13:36 +0530 [thread overview]
Message-ID: <20240812054336.db36hcp7faz23fdl@lcpd911> (raw)
In-Reply-To: <20240809135347.2112634-1-msp@baylibre.com>
On Aug 09, 2024 at 15:53:43 +0200, Markus Schneider-Pargmann wrote:
> Abstract
> ********
>
> This series introduces necessary ti_sci driver functionality to support
> various Suspend-to-RAM modes on TI AM62 family of devices. These Low
> Power Modes include Deep Sleep and MCU Only as described in section
> "6.2.4 Power Modes" of the AM62x Technical Reference Manual [0].
Since this code is common across AM62x, AM62A, AM62P, I think a more
suitable TRM link to give would be the AM62P TRM:
https://www.ti.com/lit/pdf/SPRUJ83
Reason: It covers more modes than the AM62x
>
> Summary
> *******
>
> This series is a restructuring and rebase of the patch series by
> Dave Gerlach [1] and Dhruva Gole [2]. It applies on top of Linux
> 6.11-rc1.
>
> The kernel triggers entry to Low Power Mode through the mem suspend
> transition with the following:
>
> * At the bootloader stage, one is expected to package the TIFS stub
> which then gets pulled into the Tightly coupled memory of the Device Mgr
> (DM) R5 when it starts up. If using U-Boot, then it requires tispl.bin
> to contain the TIFS stub. Refer to ti-u-boot patch [3] for further
Everything is now in upstream U-Boot, hence I prefer to share upstream
ie. non-vendor tree links at this point.
Documentation: https://source.denx.de/u-boot/u-boot/-/commit/962f60abca82bb11501bc0c627abacda15bed076
Sample TIFS Stub packaging patch:
https://source.denx.de/u-boot/u-boot/-/commit/93458ba599f753dcc5b6fea661cf71a50e8c5bd2
Patches that introduced the base support:
https://source.denx.de/u-boot/u-boot/-/commit/4a0067c8575c7c3b98f3fc0a689f53dc80700393
https://source.denx.de/u-boot/u-boot/-/commit/128f81290b7d4f20a11c7754798b1896575b7a29
> details. The supported firmware version is from TI Processor SDK
> >= 10.00 ie. tag 10.00.04 from ti-linux-firmware [4].
>
> * Use a TF-A binary that supports PSCI_SYSTEM_SUSPEND call. This causes
> system to use PSCI system suspend as last step of mem sleep.
>
> * We add support for the TISCI_MSG_QUERY_FW_CAPS message, used to retrieve
> the firmware capabilities of the currently running system firmware [6].
> Sysfw version >= 10.00.04 support LPM_DM_MANAGED capability, 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. (Patch 1)
>
> * The firmware requires that the OS sends a TISCI_MSG_PREPARE_SLEEP
> message in order to provide details about suspend. The ti_sci driver
> must send this message to firmware with the above information
> included, which it does during the driver suspend handler when
> PM_MEM_SUSPEND is the determined state being entered. The mode being
> sent depends on whether firmware capabilities have support for
> LPM_DM_MANAGED feature. Legacy firmware or those supporting other
> modes can extend the mode selection logic as needed. (Patch 2)
>
> * We also add the remaining TISCI Low Power Mode messages required for
> inquiring wake reason and managing LPM constraints as part of a new PM
> ops. These messages are part of the TISCI PM Low Power Mode API [5].
> (Patch 3)
>
> * Finally if any CPUs have PM QoS resume latency constraints set, we
> aggregate these and set the TISCI system-wide latency constraint.
> (Patch 4)
>
> Testing
> *******
>
> This series can for example be tested with a am62a-lp-sk board.
>
> For am62a-lp-sk all usb nodes have to be disabled at the moment (usbss0,
> usb0, usbss1 and usb1). There is currently an issue with USB Link Power
> Management and turning off the USB device which is being worked on.
>
> Once booted suspend/resume can be tested with rtcwake:
> $ rtcwake -m mem -s 10 -d /dev/rtc0
>
> Make sure /dev/rtc0 corresponds to rtc-ti-k3:
> $ dmesg | grep rtc-ti-k3
> rtc-ti-k3 2b1f0000.rtc: registered as rtc0
>
[...]
Do we need to add an alias here for this?
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+/refs/heads/master/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts#19
>
> References:
> ***********
>
> [0] https://www.ti.com/lit/pdf/spruiv7
> [1] https://lore.kernel.org/lkml/20220421203659.27853-1-d-gerlach@ti.com
> [2] https://lore.kernel.org/lkml/20230804115037.754994-1-d-gole@ti.com
> [3] https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2023.04&id=91886b68025c7ad121e62d1fc1fa4601eeb736cd
> [4] https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/commit/?h=10.00.06&id=193f7d7570583a41ddc50a221e37c32be6be583e
> [5] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html
> [6] https://downloads.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html#tisci-msg-query-fw-caps
>
> Dave Gerlach (1):
> firmware: ti_sci: Introduce Power Management Ops
>
> Georgi Vlaev (1):
> firmware: ti_sci: Add support for querying the firmware caps
>
> Kevin Hilman (1):
> firmware: ti_sci: add CPU latency constraint management
>
> Vibhore Vardhan (1):
> firmware: ti_sci: Add system suspend and resume call
>
> drivers/firmware/ti_sci.c | 452 ++++++++++++++++++++++++-
> drivers/firmware/ti_sci.h | 137 +++++++-
> include/linux/soc/ti/ti_sci_protocol.h | 46 +++
> 3 files changed, 633 insertions(+), 2 deletions(-)
--
Best regards,
Dhruva Gole <d-gole@ti.com>
prev parent reply other threads:[~2024-08-12 5:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 13:53 [PATCH v9 0/4] firmware: ti_sci: Introduce system suspend support Markus Schneider-Pargmann
2024-08-09 13:53 ` [PATCH v9 1/4] firmware: ti_sci: Add support for querying the firmware caps Markus Schneider-Pargmann
2024-08-09 13:53 ` [PATCH v9 2/4] firmware: ti_sci: Add system suspend and resume call Markus Schneider-Pargmann
2024-08-09 13:53 ` [PATCH v9 3/4] firmware: ti_sci: Introduce Power Management Ops Markus Schneider-Pargmann
2024-08-12 5:47 ` Dhruva Gole
2024-08-12 21:16 ` Kevin Hilman
2024-08-13 3:49 ` Dhruva Gole
2024-08-13 11:21 ` a0230503
2024-08-13 22:19 ` Kevin Hilman
2024-08-09 13:53 ` [PATCH v9 4/4] firmware: ti_sci: add CPU latency constraint management Markus Schneider-Pargmann
2024-08-12 10:11 ` Dhruva Gole
2024-08-12 20:51 ` Kevin Hilman
2024-08-12 5:43 ` Dhruva Gole [this message]
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=20240812054336.db36hcp7faz23fdl@lcpd911 \
--to=d-gole@ti.com \
--cc=khilman@baylibre.com \
--cc=kristo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=nm@ti.com \
--cc=ssantosh@kernel.org \
--cc=vibhore@ti.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