[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251107114116.f2laylu5yziueyia@budget>
Date: Fri, 7 Nov 2025 05:41:16 -0600
From: Nishanth Menon <nm@...com>
To: "Thomas Richard (TI.com)" <thomas.richard@...tlin.com>
CC: Tero Kristo <kristo@...nel.org>, Santosh Shilimkar <ssantosh@...nel.org>,
Gregory CLEMENT <gregory.clement@...tlin.com>, <richard.genoud@...tlin.com>,
Udit Kumar <u-kumar1@...com>, Prasanth Mantena <p-mantena@...com>, "Abhash
Kumar" <a-kumar2@...com>, Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC 1/2] firmware: ti_sci: add BOARDCFG_MANAGED mode
support
On 16:44-20251017, Thomas Richard (TI.com) wrote:
> In BOARDCFG_MANAGED mode, the low power mode configuration is done
> statically for the DM via the boardcfg. Constraints are not supported, and
> prepare_sleep() is not needed.
Will be good to get pointed to some documentation around this..
>
> Signed-off-by: Thomas Richard (TI.com) <thomas.richard@...tlin.com>
> ---
> drivers/firmware/ti_sci.c | 10 +++++++---
> drivers/firmware/ti_sci.h | 14 ++++++++------
> 2 files changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index da134ada64e179b4b307f7e0de5ed0f7371a96f2..f9f1a67e8e66b0a4048fae04ce31be54ca5cba7a 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -3693,8 +3693,11 @@ static int ti_sci_prepare_system_suspend(struct ti_sci_info *info)
> return ti_sci_cmd_prepare_sleep(&info->handle,
> TISCI_MSG_VALUE_SLEEP_MODE_DM_MANAGED,
> 0, 0, 0);
> + } else if (info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED) {
> + /* Nothing to do in the BOARDCFG_MANAGED mode */
> + return 0;
> } else {
> - /* DM Managed is not supported by the firmware. */
> + /* DM Managed and BoardCfg Managed are not supported by the firmware. */
> dev_err(info->dev, "Suspend to memory is not supported by the firmware\n");
> return -EOPNOTSUPP;
> }
> @@ -3932,12 +3935,13 @@ static int ti_sci_probe(struct platform_device *pdev)
> }
>
> ti_sci_msg_cmd_query_fw_caps(&info->handle, &info->fw_caps);
> - dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s\n",
> + dev_dbg(dev, "Detected firmware capabilities: %s%s%s%s%s%s\n",
> info->fw_caps & MSG_FLAG_CAPS_GENERIC ? "Generic" : "",
> info->fw_caps & MSG_FLAG_CAPS_LPM_PARTIAL_IO ? " Partial-IO" : "",
> info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED ? " DM-Managed" : "",
> info->fw_caps & MSG_FLAG_CAPS_LPM_ABORT ? " LPM-Abort" : "",
> - info->fw_caps & MSG_FLAG_CAPS_IO_ISOLATION ? " IO-Isolation" : ""
> + info->fw_caps & MSG_FLAG_CAPS_IO_ISOLATION ? " IO-Isolation" : "",
> + info->fw_caps & MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED ? " BoardConfig-Managed" : ""
> );
>
> ti_sci_setup_ops(info);
> diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
> index 7559cde17b6ccfeeb1bc357fce5c5767c3f75c54..ac1cf6971b8678aa1277abb86d9ec672493f4c86 100644
> --- a/drivers/firmware/ti_sci.h
> +++ b/drivers/firmware/ti_sci.h
> @@ -150,6 +150,7 @@ struct ti_sci_msg_req_reboot {
> * MSG_FLAG_CAPS_LPM_DM_MANAGED: LPM can be managed by DM
> * MSG_FLAG_CAPS_LPM_ABORT: Abort entry to LPM
> * MSG_FLAG_CAPS_IO_ISOLATION: IO Isolation support
> + * MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED: LPM config done statically for the DM via boardcfg
> *
> * Response to a generic message with message type TI_SCI_MSG_QUERY_FW_CAPS
> * providing currently available SOC/firmware capabilities. SoC that don't
> @@ -157,12 +158,13 @@ struct ti_sci_msg_req_reboot {
> */
> struct ti_sci_msg_resp_query_fw_caps {
> struct ti_sci_msg_hdr hdr;
> -#define MSG_FLAG_CAPS_GENERIC TI_SCI_MSG_FLAG(0)
> -#define MSG_FLAG_CAPS_LPM_PARTIAL_IO TI_SCI_MSG_FLAG(4)
> -#define MSG_FLAG_CAPS_LPM_DM_MANAGED TI_SCI_MSG_FLAG(5)
> -#define MSG_FLAG_CAPS_LPM_ABORT TI_SCI_MSG_FLAG(9)
> -#define MSG_FLAG_CAPS_IO_ISOLATION TI_SCI_MSG_FLAG(7)
> -#define MSG_MASK_CAPS_LPM GENMASK_ULL(4, 1)
> +#define MSG_FLAG_CAPS_GENERIC TI_SCI_MSG_FLAG(0)
> +#define MSG_FLAG_CAPS_LPM_PARTIAL_IO TI_SCI_MSG_FLAG(4)
> +#define MSG_FLAG_CAPS_LPM_DM_MANAGED TI_SCI_MSG_FLAG(5)
> +#define MSG_FLAG_CAPS_LPM_ABORT TI_SCI_MSG_FLAG(9)
> +#define MSG_FLAG_CAPS_IO_ISOLATION TI_SCI_MSG_FLAG(7)
> +#define MSG_FLAG_CAPS_LPM_BOARDCFG_MANAGED TI_SCI_MSG_FLAG(10)
> +#define MSG_MASK_CAPS_LPM GENMASK_ULL(4, 1)
Driveby comment: let us not churn formatting..
> u64 fw_caps;
> } __packed;
>
>
> --
> 2.51.0
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
Powered by blists - more mailing lists