From patchwork Thu May 23 08:02:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB01BC25B75 for ; Thu, 23 May 2024 08:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+z1ye7LI72JU/CZgaTxatZ96Qs3JRy3serJHOZKK8g8=; b=TkxksqS8oe8bkI 9cJH2X8gBRSWqr/Ee7PnRQdjFGJ9otRu+dyXT6yS0tCcm8tgcqxni2NRGjXZGLnDcwI7sdJ+3QBvV 085EN0+ZdhrDYv4JGBljLSHuGdNlN6Vu+NysKPuqA069cR7G7ZSOp1iFRDp+g5F3gjA+VgOfJhgpc ynFmt9qw/+GZKVVO5SbgO9bplSzB2rp2jHv9gWXcp+ZF+9EttdmcAUA7nJOgcWu+H9VmF6g8BRsH6 YRqVss04b5y8a8/q1MwsOqKfh1QhomUjzjV1r+c1/jChH6yfqYw+qXpOqxZm7rp6HdgYNuAbZBC1a XQXf+MeYmVjltkl98IHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PN-00000005Q8p-0rxp; Thu, 23 May 2024 08:02:41 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PE-00000005Q5V-39GO for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:34 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-354f69934feso337649f8f.0 for ; Thu, 23 May 2024 01:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451351; x=1717056151; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hvk4HIZY8LHEcAUwcSCVMUiBIBW/hN1J4i9rPXs1rgU=; b=H4VP3Oqgy3TxsX2a5iyzq3WSsdG3uaJPxCVhRzlIZ7Rm2uAa8D0Xbe7BjnQLcDaCJL wSJ5iEGSFkDVKfeuXEsus1k2VDSf/X3WPq9LbtK0H1sywSQ+GggcEFEc8yQkzYpubA0O vV1uTN3nlh5A/HLBk6hqTmEes8EkfGM+tyAVVpYuHRZ9cTStcNFyDxi19WDvt0r+06Uo /PJhL6oSgdrPHwb8vcdeCRynm+cqCd4Z0LDO9CbzPqjG+zQRHPub+M7zidZQWU5FlN0t XurxEhq6BDQqGfluRQBofILBaJinv4bVGl/y4zN+eSLtdvg1gQJNT5euC4cYoLMRx2ty WAkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451351; x=1717056151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hvk4HIZY8LHEcAUwcSCVMUiBIBW/hN1J4i9rPXs1rgU=; b=rUO1HipZN7Ivx5uAQHwcVsuYxQojJiAoJFGWtAc6EfovRJ8PR/XW0dF3Ex8w85s5wo LIqZmD2Epotb76nXu3ysQT7Q5B+uv4et8o2T4yHQki5OPRKD/PJllQFDasvGobvC/3F1 vgt5qv28Ljqt5TgjMAN+Xw37Ez9YDJltd/5w6ucdm+Jb0rByXfiyq+7CyIT86a91hqlv j0lt6utviLiUyK/8BtWmund+GzgiFB4lFffpzVRtacFXj9KcxEfvZqvqzjWFF+xIbJ9O Lb6XdceFjod8fL0JG8kqNInJlPFo3HCAKClDtKF8ueEFJ7CqW8uEcy212OxeGj6EiJxp HgNA== X-Forwarded-Encrypted: i=1; AJvYcCVj3O6Btq+qY9Bc4WywCCjR1HoiJcVj8pX+zWDK4gN/fcRT9flt7riz5NNHDHMoZ+jaAdd1nbYLJClHz3EmKhdq2QIq4++IsZb8705Uh0dDhBQOoss= X-Gm-Message-State: AOJu0Yz0ptuWZT7e90K1f9jxw4fKHSjrRNyApeI0KxAdgYO86wNRizAB OmABkWOpH8Ug69dShKebaSoRzyRdG1y2Y69XXojjrTjnD6MO+V+hAl13Uvvyf7k= X-Google-Smtp-Source: AGHT+IHIDpueviEXVOQCfyMIdb4MDOW3f6eAQ8UhH17w3HoGPfjSwbQa24Vo8LaaSg9UtVgFg6tSMQ== X-Received: by 2002:a5d:456f:0:b0:354:f46c:856b with SMTP id ffacd0b85a97d-354f757c1c3mr1444427f8f.28.1716451350801; Thu, 23 May 2024 01:02:30 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35501abfdddsm93637f8f.110.2024.05.23.01.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:30 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 1/6] dt-bindings: ti, sci: Add property for partial-io-wakeup-sources Date: Thu, 23 May 2024 10:02:20 +0200 Message-ID: <20240523080225.1288617-2-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523080225.1288617-1-msp@baylibre.com> References: <20240523080225.1288617-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010232_830621_1D42B0FB X-CRM114-Status: GOOD ( 10.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a property with an array of phandles to devices that have pins that are capable to wakeup the SoC from Partial-IO. In Partial-IO everything is powered off including the DDR. Only pins belonging to a couple of devices are active and wakeup the system on activity. Signed-off-by: Markus Schneider-Pargmann --- Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml index 7f06b1080244..c8ed0dd4fee4 100644 --- a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml +++ b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml @@ -61,6 +61,12 @@ properties: mboxes: minItems: 2 + ti,partial-io-wakeup-sources: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + List of phandles to devicetree nodes that can wakeup the SoC from the + Partial IO poweroff mode. + ti,host-id: $ref: /schemas/types.yaml#/definitions/uint32 description: | From patchwork Thu May 23 08:02:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53F78C25B79 for ; Thu, 23 May 2024 08:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7U4yF9q3YFHEBqJpXP+jul90ibPdzjwh9eLNswDtKrg=; b=zBU2TF6cqh9Pa9 gKmHCQ3RdiAPsfNzs0fl620fW3eR49x+lQkINBGtKFipjfN8QaUDrUN5t10vyR3Dc/YZ9q1bIw1nk bcHMG1Fk2GJIfD9OEAXDhDOw8TRG/LtlFKUTO4bF28msMNeMwHWU+v/79R+o4yEN5Fr+mYnAOZZWp CsLym4LBYmarkSfsA4B0DaD9ywHd9/YiGkDBqB0zWKDqetipBQMwrGt+hEPghKyg7braltUMMXj6i iShVKtoOtY40VNzwmLse/1FvNmR5BdY/IcbDV32F8A4Gt36dE6YZpD/cH0TuL2Dix7+6KZQ9kX0sE eiHn107z7z8LtuzcqAcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PO-00000005Q9b-1Gom; Thu, 23 May 2024 08:02:42 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PH-00000005Q6D-0GZ5 for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:36 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-352129e3c8eso5052153f8f.2 for ; Thu, 23 May 2024 01:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451353; x=1717056153; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CKfwfIlswqj+NeWyOeSXupSHhvK+FlBEhFYxTgaPgZg=; b=QH0do6EF0tJMzC9nvWCadd4fofoes4K53u9o9V0PrhQ6KW+8MlfqHy2n3TbyBRvMmR hlVxY77sncsKMMxYIoLktrHKRiSN7GMbV6X+vJJP9a6vee/uBI7sgXR2y3MbjRkTv1KC aCmMzepBVfzcTxEuc6eTU8RndeZMEQ/Qh7PAJ5F9IFp89WACck28qU2UUlMPMCXtwXvH 4jJobCDhodiFno0eguL3CvNKfCro4IIisfgupSPoxaX01Ibjjd2rXpsfB+wFtd9v+Bhc vwLnLAzsDcnLhNyfIdAJ87/fsdCYsGe5eUTQIUzsZ4ldlup1dufU/rxaupGaah2+PxFS bUOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451353; x=1717056153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CKfwfIlswqj+NeWyOeSXupSHhvK+FlBEhFYxTgaPgZg=; b=TcoJMdDwGIbl1HtWOKFo/Kzqe5cpdYVHfBuB/QlB4vwuTRdSArqBR9L1BW0PObvxuL VVcsO65BJfPhGe3NUk9QIznFKf3sF43olI31rddQ3N0zcXl0C8KYSKlszbWpjNOMyI55 CX6JCUil8J6uE+XjRfjwRdGT/GGpjXGepo5BNMwrTsOFQdzSxSLU2ZBi64diKYPE6u61 HSqisW43ddoH8cRZ23V1EM8ZDKI8xqbMsuKAG59cj6zkROcgYM2+Rt98M8AXRXU4Fdym r7hNHMYixEFcokSXfkrLzgF14ocAkhhgAzlL3gHrrYEMvuAzGHS/BW3QQOSQaCu0J3g1 SNJw== X-Forwarded-Encrypted: i=1; AJvYcCXKYvl/OFk3jlwVCm4GGJLqiXfAeEgumuRJ/PAf7ME4Th1XSroTJs8CD0C9rrhumlOAjhVIR5yXapz5GcviruSrldscQHQ7me8xAiraLUUN8gFVvnA= X-Gm-Message-State: AOJu0YyN6YS3yVKqFMVjDD0jaiT8drLNP8zRrpU0cTmHCHiNjinQzC8a lLf/Q+5GrqlTE1nofUoZRYtvS3d+kZVaD2oZQ4YflwZcEHuik97qefh2DOwBaiw= X-Google-Smtp-Source: AGHT+IEiGPP2k0Tes52yuipZMzp/g7mrJRY1V/fQrwHdTe2JA41WKN+HYayFlOJdmGCEyJZnrhwD6Q== X-Received: by 2002:a5d:4007:0:b0:354:e72f:d5d7 with SMTP id ffacd0b85a97d-354e72fd6f3mr2266834f8f.24.1716451353123; Thu, 23 May 2024 01:02:33 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35501abfdddsm93637f8f.110.2024.05.23.01.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:31 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 2/6] firmware: ti_sci: Partial-IO support Date: Thu, 23 May 2024 10:02:21 +0200 Message-ID: <20240523080225.1288617-3-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523080225.1288617-1-msp@baylibre.com> References: <20240523080225.1288617-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010235_131782_1C2FA4C4 X-CRM114-Status: GOOD ( 27.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for Partial-IO poweroff. In Partial-IO pins of a few modules can generate system wakeups while DDR memory is not powered resulting in a fresh boot of the system. The modules that can be wakeup sources are defined by the devicetree. Only wakeup sources that are actually enabled by the user will be considered as a an active wakeup source. If none of the wakeup sources are 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 enter an infinite loop. The wakeup source device nodes are gathered during probe. But they are only resolved to the actual devices in the sys_off handler, if they exist. If they do not exist, they are ignored. Signed-off-by: Markus Schneider-Pargmann --- drivers/firmware/ti_sci.c | 135 +++++++++++++++++++++++++++++++++++++- drivers/firmware/ti_sci.h | 31 +++++++++ 2 files changed, 165 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 160968301b1f..04730c4df2de 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -116,6 +116,9 @@ struct ti_sci_info { u8 host_id; /* protected by ti_sci_list_mutex */ int users; + + int nr_wakeup_sources; + struct device_node **wakeup_source_nodes; }; #define cl_to_ti_sci_info(c) container_of(c, struct ti_sci_info, cl) @@ -380,6 +383,28 @@ static void ti_sci_put_one_xfer(struct ti_sci_xfers_info *minfo, up(&minfo->sem_xfer_count); } +/** + * ti_sci_do_send() - Do one send, do not expect a response + * @info: Pointer to SCI entity information + * @xfer: Transfer to initiate + * + * Return: If send error, return corresponding error, else + * if all goes well, return 0. + */ +static inline int ti_sci_do_send(struct ti_sci_info *info, + struct ti_sci_xfer *xfer) +{ + int ret; + + ret = mbox_send_message(info->chan_tx, &xfer->tx_message); + if (ret < 0) + return ret; + + mbox_client_txdone(info->chan_tx, ret); + + return 0; +} + /** * ti_sci_do_xfer() - Do one transfer * @info: Pointer to SCI entity information @@ -3262,6 +3287,79 @@ static int tisci_reboot_handler(struct sys_off_data *data) return NOTIFY_BAD; } +/* Does not return if successful */ +static int tisci_enter_partial_io(struct ti_sci_info *info) +{ + struct ti_sci_msg_req_prepare_sleep *req; + struct ti_sci_xfer *xfer; + struct device *dev = info->dev; + int ret = 0; + + xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PREPARE_SLEEP, + TI_SCI_FLAG_REQ_GENERIC_NORESPONSE, + sizeof(*req), sizeof(struct ti_sci_msg_hdr)); + if (IS_ERR(xfer)) { + ret = PTR_ERR(xfer); + dev_err(dev, "Message alloc failed(%d)\n", ret); + return ret; + } + + req = (struct ti_sci_msg_req_prepare_sleep *)xfer->xfer_buf; + req->mode = TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO; + req->ctx_lo = 0; + req->ctx_hi = 0; + req->debug_flags = 0; + + ret = ti_sci_do_send(info, xfer); + if (ret) { + dev_err(dev, "Mbox send fail %d\n", ret); + goto fail; + } + +fail: + ti_sci_put_one_xfer(&info->minfo, xfer); + + return ret; +} + +static int tisci_sys_off_handler(struct sys_off_data *data) +{ + struct ti_sci_info *info = data->cb_data; + int i; + int ret; + bool enter_partial_io = false; + + for (i = 0; i != info->nr_wakeup_sources; ++i) { + struct platform_device *pdev = + of_find_device_by_node(info->wakeup_source_nodes[i]); + + if (!pdev) + continue; + + if (device_may_wakeup(&pdev->dev)) { + dev_dbg(info->dev, "%pOFp identified as wakeup source\n", + info->wakeup_source_nodes[i]); + enter_partial_io = true; + } + } + + if (!enter_partial_io) + return NOTIFY_DONE; + + ret = tisci_enter_partial_io(info); + + if (ret) + dev_err(info->dev, + "Failed to enter Partial-IO %pe, halting system\n", + ERR_PTR(ret)); + + /* Halt system/code execution */ + while (1) + ; + + return NOTIFY_DONE; +} + /* Description for K2G */ static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { .default_host_id = 2, @@ -3398,6 +3496,35 @@ static int ti_sci_probe(struct platform_device *pdev) goto out; } + if (of_property_read_bool(dev->of_node, "ti,partial-io-wakeup-sources")) { + info->nr_wakeup_sources = + of_count_phandle_with_args(dev->of_node, + "ti,partial-io-wakeup-sources", + NULL); + info->wakeup_source_nodes = + devm_kzalloc(dev, sizeof(*info->wakeup_source_nodes), + GFP_KERNEL); + + for (i = 0; i != info->nr_wakeup_sources; ++i) { + struct device_node *devnode = + of_parse_phandle(dev->of_node, + "ti,partial-io-wakeup-sources", + i); + info->wakeup_source_nodes[i] = devnode; + } + + ret = devm_register_sys_off_handler(dev, + SYS_OFF_MODE_POWER_OFF, + SYS_OFF_PRIO_FIRMWARE, + tisci_sys_off_handler, + info); + if (ret) { + dev_err(dev, "Failed to register sys_off_handler %pe\n", + ERR_PTR(ret)); + goto out; + } + } + dev_info(dev, "ABI: %d.%d (firmware rev 0x%04x '%s')\n", info->handle.version.abi_major, info->handle.version.abi_minor, info->handle.version.firmware_revision, @@ -3407,7 +3534,13 @@ static int ti_sci_probe(struct platform_device *pdev) list_add_tail(&info->node, &ti_sci_list); mutex_unlock(&ti_sci_list_mutex); - return of_platform_populate(dev->of_node, NULL, NULL, dev); + ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + if (ret) { + dev_err(dev, "platform_populate failed %pe\n", ERR_PTR(ret)); + goto out; + } + return 0; + out: if (!IS_ERR(info->chan_tx)) mbox_free_channel(info->chan_tx); diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index ef3a8214d002..6d8b12341f68 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -35,6 +35,9 @@ #define TI_SCI_MSG_QUERY_CLOCK_FREQ 0x010d #define TI_SCI_MSG_GET_CLOCK_FREQ 0x010e +/* Low Power Mode Requests */ +#define TI_SCI_MSG_PREPARE_SLEEP 0x0300 + /* Resource Management Requests */ #define TI_SCI_MSG_GET_RESOURCE_RANGE 0x1500 @@ -545,6 +548,34 @@ struct ti_sci_msg_resp_get_clock_freq { u64 freq_hz; } __packed; +#define TISCI_MSG_VALUE_SLEEP_MODE_DEEP_SLEEP 0x0 +#define TISCI_MSG_VALUE_SLEEP_MODE_MCU_ONLY 0x1 +#define TISCI_MSG_VALUE_SLEEP_MODE_STANDBY 0x2 +#define TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO 0x3 + +/** + * struct tisci_msg_prepare_sleep_req - Request for TISCI_MSG_PREPARE_SLEEP. + * + * @hdr TISCI header to provide ACK/NAK flags to the host. + * @mode Low power mode to enter. + * @ctx_lo Low 32-bits of physical pointer to address to use for context save. + * @ctx_hi High 32-bits of physical pointer to address to use for context save. + * @debug_flags Flags that can be set to halt the sequence during suspend or + * resume to allow JTAG connection and debug. + * + * This message is used as the first step of entering a low power mode. It + * allows configurable information, including which state to enter to be + * easily shared from the application, as this is a non-secure message and + * therefore can be sent by anyone. + */ +struct ti_sci_msg_req_prepare_sleep { + struct ti_sci_msg_hdr hdr; + u8 mode; + u32 ctx_lo; + u32 ctx_hi; + u32 debug_flags; +} __packed; + #define TI_SCI_IRQ_SECONDARY_HOST_INVALID 0xff /** From patchwork Thu May 23 08:02:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69B6DC25B75 for ; Thu, 23 May 2024 08:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=get+il8j7jV/pX7jlpoMYlZCOM8FPZV+87EmMQFQMnI=; b=2TPsFkYOZUe5ac 58Jo2pnt2giNSj6W92KVrAUCYEeH3XrqEteiNcjWtglhudsHKrQVqn0ULEwcnaGe4xySKJnmueRGi VKchY0880xMaTQdsN1rwdHjZJY5qg6ysLGIpS2V7hlhzSgktcJrSkbmYbtiRHvD01QBixeY0svKev Z4jL789ZuEaNye21MT+khvlCkqQ4q2bO6e63DqKRruy/4gVvJtrEqRhZKFPR50m3fPofA7gpsoe+B XKc8N2AdJ/PiZ1oux4Y0eAIdoWi/mOW4bnDnW0asXaddk0wD0JAt4rv9lVja5NiRVFSbk+sx7+ZEm yMppfEJOJW2+ftQi6m/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PP-00000005QA9-19AB; Thu, 23 May 2024 08:02:43 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PH-00000005Q6K-3SB4 for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:37 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-354fb2d9026so276561f8f.1 for ; Thu, 23 May 2024 01:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451354; x=1717056154; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jlxxT6O8N73c9hvaUpQrlj0G+RWv6RhO/OTBz0tylgY=; b=M1EXxsI5cdSEvGeZWzW5h7xBYg6bApYoJUgIlRYlbhkASYV9FRXiJekiA6R3zwg4+q DbI5prxTQ2EBWkYTYciact1NrZ5lArnzM0BH1mgIJkYo+BfOZBgYXmx76VyAFtWqDt7V IimvX4m6+mpNw6b6/halHpXB7VJgDD/A/y/Di4LMbjYwZLzS4tLEK0hsPQO8z3K4IVuL T+hfzPDWOp4iEByFJre8xI8dupOHrjIPpUsJlVCdioID1PAh3ouimxS81fLvZd/0VyCp Sso6/gj6SksR8mO9uLfEL/Oxc9aLOwnODxhdp0h+qKl14K+bfuvvCNywgV+xO5yiqaNE iDEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451354; x=1717056154; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jlxxT6O8N73c9hvaUpQrlj0G+RWv6RhO/OTBz0tylgY=; b=Vbmz0PA0h2GYas87mu/kDEgepmxzHaeOED5yI8pzjqMOFJdaNBOV3cX9VyhXzb2q4B /UIEC1XcAF1UZ0xTCS1wN1kjuI87L1udDHSxTt/x0SWUqd2vYFoqzWnHbw2jnlnk7UjQ 0fZmY3cN7ZW6M3iodZdF3BcrQ/PHg8MWvFtXr58m5PrINdODkjcoy0NAFdsSIovcSHc6 9wHCpjY+zaqXaWEhYLAjzBYNKIjGyaMf+wIWiPcS1byA2/L8Dl9GcSC5ikTGfPe+YTHJ HLVpunahKeTMWh4RyXbuL0JZXZlYL7GMo24hmLPhkfix/9GcfuLW0y2Q6kJjw94dnW6J xocA== X-Forwarded-Encrypted: i=1; AJvYcCWStnjDkcukVRN7k/6iPDuBFSkZuvoasEALUybniEips0ZbeibvKM+wpTS1wa46tFw/Xl0Z6VhOmrvhkT5WAicaHrv3WoVSowuy3OQDuxfAuQ4y+AE= X-Gm-Message-State: AOJu0YywQ9nl0ZcrbcWWohN2B5DRQ/Nlyq+DL2dvZe+sRzYJWs6v1yym Z5qVlTuq6L6/Q/9n9vv6WDK/AhUXbzQc/dN6bWsmiHvyxuXp9LFoQCCx+DzsS5Y= X-Google-Smtp-Source: AGHT+IHha0spuQLWF3mRLOAXmYo6c3Nk7W94QQizRM9z1j60uMb1s3ETcJpRBzV1BunMRUTV4mflMg== X-Received: by 2002:adf:eecd:0:b0:34e:34c5:2312 with SMTP id ffacd0b85a97d-354d8dade41mr2802684f8f.59.1716451354367; Thu, 23 May 2024 01:02:34 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35501abfdddsm93637f8f.110.2024.05.23.01.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:33 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 3/6] arm64: dts: ti: k3-pinctrl: Add WKUP_EN flag Date: Thu, 23 May 2024 10:02:22 +0200 Message-ID: <20240523080225.1288617-4-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523080225.1288617-1-msp@baylibre.com> References: <20240523080225.1288617-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010235_921523_C78A2620 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org WKUP_EN is a flag to enable pin wakeup. Any activity will wakeup the SoC in that case. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-pinctrl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-pinctrl.h b/arch/arm64/boot/dts/ti/k3-pinctrl.h index 4cd2df467d0b..e36bce881f44 100644 --- a/arch/arm64/boot/dts/ti/k3-pinctrl.h +++ b/arch/arm64/boot/dts/ti/k3-pinctrl.h @@ -12,6 +12,7 @@ #define PULLTYPESEL_SHIFT (17) #define RXACTIVE_SHIFT (18) #define DEBOUNCE_SHIFT (11) +#define WKUP_EN_SHIFT (29) #define PULL_DISABLE (1 << PULLUDEN_SHIFT) #define PULL_ENABLE (0 << PULLUDEN_SHIFT) @@ -38,6 +39,8 @@ #define PIN_DEBOUNCE_CONF5 (5 << DEBOUNCE_SHIFT) #define PIN_DEBOUNCE_CONF6 (6 << DEBOUNCE_SHIFT) +#define WKUP_EN (1 << WKUP_EN_SHIFT) + #define AM62AX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode)) #define AM62AX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode)) From patchwork Thu May 23 08:02:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46659C25B75 for ; Thu, 23 May 2024 08:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GSYlF/fdR1jB3x78QLajCbr++XnbISOxM0offcsaQzk=; b=VgWuw/mrK8q0mO MqgBHQ6G9I++K1YGlApo+kjfLVjmtKEyCIBxjhV/yvM/objDyq6XSLEP9Z2k6COjz0gRwxupCoSAL WKBGfjsXQ/Xm6Fpzu14QkypdrPmx8iiDC4BAoab8MZ+0j+hAhwI97QG4O2qkqlsB10f2X1eww8Atf OkJjgQas7uBkF60jm12a2o5bVDIXPDbybdK8c+0MNjhnVjTDwWj3Kh9SSbamq6HM8cDDH43WIF1Aw 8XrJZgquHqKzDUtowbAqKvB4cHV24iRHAcf/9LsMexJcLarFCwzBgvTygloPtPzRjXlWmtpbZ/22C UO4EpvZqhdqDwxBfCerw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Ph-00000005QKa-0OPy; Thu, 23 May 2024 08:03:01 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PL-00000005Q77-0GMe for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:40 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4201986d60aso14581175e9.3 for ; Thu, 23 May 2024 01:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451356; x=1717056156; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0UTV4+P4H7+uVsIxGGCjRLk6NaFdUSwIupMLwjHFRwo=; b=NLVAcoRAn0pjQDVFHe9T7HdalInkJGR7h1HvlvK6CazQOlFOLwy1kdqz4JVJqPs4wc c1j4QzyOYRnBxW9EhHyODxbUaTCzyeOHxls2U7UMCPJ2lYBXU0Q8FVtIrqo1oyrBwaro fhZP+jYfZxtiVphmik0iXNNlBSPYu0ppZVzhuqg0HlIcr6h7c7TakpzFoz7Fk9HzgS1x V1exBFBUJTglouigYBspVoZryc6YnotnXh3K4rCHNZDPyywhqk2G8ntYL7dx+Kg5GEXA sNB/p0KciMfbxtC6zypwbO14NHR2w4qxYsCxtr/N5bTzp8s6vNf7nlazLDezXcWN6C69 ChVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451356; x=1717056156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0UTV4+P4H7+uVsIxGGCjRLk6NaFdUSwIupMLwjHFRwo=; b=iWLQqvt1Zg1gjcpI/ts1s4Ekv0NqBFom01FYzmNwyBTtsS5xCsAqFVwfXGuxVdZ/tW BQUh7du25rPiKc8gHHie248EsI3ybsNJzrzHARY29Hu1K9O4Pz/7YrMwQCznFZtdiJ4u mj700JAKZYOAeAnAFfWzwkk/dLBPwgTDghXSmoT3R1J20C5UTwKInstQorulFOQ0Y++X Mlexqdc00yWTkWwI8ow8R29qV86Tgf9uemE+G9qGMkT69BcTNaIrX3jLLaG80I+JByI/ L7Be9W83TAmOkV/L7hBCxiooEom8/3RMqTTvfqAeMkSKAfeuisfehErFhKX5W0H/mFOz 9ypA== X-Forwarded-Encrypted: i=1; AJvYcCUiP+fM1pNBcx/4A2DFAkZleKvQ3UrYxEC2LKgfdHiAVoCy9aD4G4T1LwE7/4uFAY8S5/AUpxjvOVPHqoZjJwGy8d+0/2m2EKDER03Zc9wJXa/cThQ= X-Gm-Message-State: AOJu0Yz3gSIr6/PGSTNuBsl182ELfuotV/AAzbvtM4uMuXcIh1yPEn14 Bmd84Qe3LRuDBi7ulJZTADg9Ibwkfp/+fkmynl5ALum51DX/4cOqAOi8FBzvXoI= X-Google-Smtp-Source: AGHT+IF49vNHWfiYKOhW4GUh5UvdNVwkXdUWhLerjr6nku5L1GZw3HL0bskA3h4PrdU7ztVf/bakcw== X-Received: by 2002:a7b:cc14:0:b0:41b:c024:8e88 with SMTP id 5b1f17b1804b1-420fd344e28mr30256415e9.33.1716451355819; Thu, 23 May 2024 01:02:35 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35501abfdddsm93637f8f.110.2024.05.23.01.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:34 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 4/6] arm64: dts: ti: k3-am62: Add partial-io wakeup sources Date: Thu, 23 May 2024 10:02:23 +0200 Message-ID: <20240523080225.1288617-5-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523080225.1288617-1-msp@baylibre.com> References: <20240523080225.1288617-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010239_199182_2A266AB8 X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In Partial-IO mode there are a number of possible wakeup sources. Add the list of phandles to these wakeup sources. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi index f0781f2bea29..9ffa6652492e 100644 --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi @@ -120,3 +120,7 @@ dss_vp1_clk: clock-divider-oldi { #include "k3-am62-main.dtsi" #include "k3-am62-mcu.dtsi" #include "k3-am62-wakeup.dtsi" + +&dmsc { + ti,partial-io-wakeup-sources = <&mcu_mcan0>, <&mcu_mcan1>, <&mcu_uart0>, <&wkup_uart0>; +}; From patchwork Thu May 23 08:02:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A40BEC25B7A for ; Thu, 23 May 2024 08:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OtarIKSZAcDnDzcl9HnQwCMpALWMFRUoTxldJtGXtoI=; b=ho4uLBfWh1VGZD o9deilIBMdX6UO3gZmBXhPC0HXdonUZhfdNW4bSwMiWZYt1pfe03QS6yzWGnzq5916Xg5rhX73glD okZnuQ1vVXt8nyqx2GEOgdZLorMlKATCA/o6WAJly42I7m0dwvROWyUQtf66sWYciR784WeA5VWtl NeGxYIj8dpvEfXu9WDcqllTlYTeK0nZx+7TFDeXSWFI9i8iPhjhBNODmKJ3GK0is3aCTDm8v+oNjh B8iG6m4hfWwgfoNI5rY/WFt9xTbEt7+dMSEU1y6fichago3OChygCHFDtFw/PoWLtcy71hXWUKETp +hJ1YA2tMfPZ5S3hNeKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Pk-00000005QMI-3yxQ; Thu, 23 May 2024 08:03:04 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PM-00000005Q7Q-1JXk for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:42 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-354be94c874so1308148f8f.3 for ; Thu, 23 May 2024 01:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451357; x=1717056157; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZWlrESD1hPbK1jELiQUm0maGQhBf2warBvSE6Jg46pY=; b=LC18bVM91sgdyMDyN+hfCUXw4+MBMulY5MYijacnhynXeL6rscUVjL0tkO2PgLhveD tbDi0eimLbkbG1zXQmTLXaeYC1jClvD3tlTvDl8VJc/AJZH3668P98zyOGAvxMVw3Xa5 yr4tVLNNQ6x6JZTQmSBlofjvPYyqDSs2Bhe5pXzNg8UMY9f/NAd6eVpC0wBTgkAFgSI+ CEBH0XBy1AmcDkvsUZapTzu9Pvf2U+cmXOtCByvBClN7Q7WeZtmYEAaU11pSMR9JKsPA n7Ga3QVL9hIBWd7KktyYvlBUhfjBlIf6ZhmqN3nIrDwiff9vc9ra4iXw+QlsktrfDBLd KYWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451357; x=1717056157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZWlrESD1hPbK1jELiQUm0maGQhBf2warBvSE6Jg46pY=; b=oeL4v6JgTYr4mODyMrUzq8w3NbPhqTkL1wRERrHcPcIyswR1TXlPuVEqO9J3vUEzyZ SIyV99t3CJdjaMF4bGaVWlFGxaQ3AXhuOTM0CEqA1onV195M6NaMdm9MSL1NyAxNH3Ff 8ZxN5KA8EFb0BHoln3fAqW7aJh8vpINkZNlWmuLAOQp+To/kg/cGicnmWEh+cq8u7pI6 Cz2jy4WT/jWYPuypbdZLFjlqv/jz9e2h0mVAR9c3/8aKlqOyusgSwRqE5QpM5jiKoPKf YhhZNM9zhHI5vqwK9sP0OWh1FzIh7r2WW3nXRDUlDC8HlE7h64bSSPcmKH7KNkBe2d/m jC8A== X-Forwarded-Encrypted: i=1; AJvYcCUxaqgIEfBPstptNq31tN1wi5FVZINpehyaXVPbf8oQTMacmfSlgGjXfEUkNX6I4PXXc8xkeGy+SS8l2105mWrAvX2+pq1bCrVd8xDwGCafFNTwBR4= X-Gm-Message-State: AOJu0Yzbch28ukdz1z2f0RwpMMoCMJs/FN1qD8c+G6oBjQbYhde0nAzx tqaLuM2yxT5eOfKNfU6dAaQfEkjQvugaHdHYclaoZhYB9pJZwyAsuVKVk+EqXs0= X-Google-Smtp-Source: AGHT+IF1GFP+Prk8Sx8nfsKKmPVEsEvOgzLyVffBGqv+aRehf2+t9mnt83aCEYUlD2pGPfUSBjfp1Q== X-Received: by 2002:a5d:66cb:0:b0:354:f308:7cf2 with SMTP id ffacd0b85a97d-354f3087ee9mr2824214f8f.50.1716451357249; Thu, 23 May 2024 01:02:37 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35501abfdddsm93637f8f.110.2024.05.23.01.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:36 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 5/6] arm64: dts: ti: k3-am62a: Add partial-io wakeup sources Date: Thu, 23 May 2024 10:02:24 +0200 Message-ID: <20240523080225.1288617-6-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523080225.1288617-1-msp@baylibre.com> References: <20240523080225.1288617-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010240_375034_0D6AD5DD X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In Partial-IO mode there are a number of possible wakeup sources. Add the list of phandles to these wakeup sources. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a.dtsi b/arch/arm64/boot/dts/ti/k3-am62a.dtsi index b1b884600293..5c13851c29ec 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a.dtsi @@ -123,3 +123,7 @@ cbass_wakeup: bus@b00000 { #include "k3-am62a-main.dtsi" #include "k3-am62a-mcu.dtsi" #include "k3-am62a-wakeup.dtsi" + +&dmsc { + ti,partial-io-wakeup-sources = <&mcu_mcan0>, <&mcu_mcan1>, <&mcu_uart0>, <&wkup_uart0>; +}; From patchwork Thu May 23 08:02:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13671380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0F45C25B75 for ; Thu, 23 May 2024 08:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TXVmvIaDmBy32RiHtzjDoHCa/0KYG8a9dzQKvPaCwPo=; b=jCSK++LhvLkMLW vdgy7ckoWonAgy5d3+k/cJSQQtJ2AFgAJV89pqbSy10oTKhVY6+iGU3nl/jjLKVEgr/WDVEIBxkuh jCUouj6PkLSYVAbpt4ASChTU7J25FLnqS56n3t1u62Se6fpyQhCu/n+S3FgLrlxan2GnqL16uukia w7GlKiS0idZD3MnYCb0KXC382KO7FvGx4bM9bhZa0ufYHJYnPTxxM4dtjzijeGq56OZH1kQQVRBTr z2zHUZVfZ3g/88YDaYLFPdphzmdD6WrbqQntcHpZOcN59cxgwn34iME1pEC7h+SVaoDHCNIAJ+MWV eg/7TY9N6VTirg4CfzUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Pm-00000005QNI-0Y4f; Thu, 23 May 2024 08:03:06 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PM-00000005Q7k-3gQP for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:42 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-420180b58c5so16536355e9.3 for ; Thu, 23 May 2024 01:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451359; x=1717056159; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5xxaqeXNmd56fs7VILfOHspA8Y/nLG+qphjjlB9Ut0E=; b=xSFtClPu42xBZPjchsywb5hzd70fkCBfG5OtjTGymkVKIsRkHrtP/5jeI2ma1DvZcg yOxqWEB98cngrp/NtTt6oXKhY9xRX6Xy8WDHCSVR4ZsBeoqZ1oCn558X4lf+FoEud5+H 0BgDyepOZR+0VVPBtUP+Yt6T3AsTvm8fWww5TSgq5yh9ElwXcOZ6sqNOXx4hrNiUiJSq SjXC7hMOzTq8Sy1YOM6lAKHtx56GOQ109RL3KOF7zhz2BTzgioOE2L5i8SC8Nx7mu8ST wuY0ef4t8uIWh4Zdt6Nq9j7WVtfNCCeWL+cOEA9/ikLQfqCqyF8TPDClv/ior3wPIKVZ hGaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451359; x=1717056159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5xxaqeXNmd56fs7VILfOHspA8Y/nLG+qphjjlB9Ut0E=; b=jKSWwDo45t/lWI2ZswpgWn1w6Hd6LDASLbdGRiD0WYhrrfvUim6YZkftLiJUN3jBXP B7zTaww9cUERCAJveK3sR16khiQJbuijq8MGKoBqw1bZUH6VkAcncngCekcLpO/T/1R/ e/xSqZN/67plG/hxs6wFvmcIbm3RN5ATnKVxVqFjEicjOpY+Ai8h7jrtnEZckAVaXSuL DKpZopVYZ52evfgWW7Hr4bLkfDVANmhLMIrc3wux8Ye+FwJxgI6wQj4QgKqLFL42Qj3A njkkvBudYKYMOsGcsjzEphXG3EMvg0AMKZGAJZUFbV650LHPGwWrmjcIoW7KYHteBCIr c9/A== X-Forwarded-Encrypted: i=1; AJvYcCVFMJZLzbk2ba702cQKMq+7+wBNaPQg007gGx1Wrd6+YEjZV+tN7siNt7QeFiD8uSpZeuChXk9jQnkHwvNJCDAAE/bPeHb9IcYyTtGRFrcU3tKdWYk= X-Gm-Message-State: AOJu0YzJtFZtkcJvaJ34JnuHPOKz5wdM8C0q79z2iqsgzhHyhRCMT4gM FbKQ4Xt0iA4psG8iLxWGPRZxbC0xVeYZ4BVWpaLX125iTmsTNB+HzP4cd4nJMeQ= X-Google-Smtp-Source: AGHT+IGkl2Vp85pLyfdv7MQfq/S/GF6HxNSjqay+owUe5sYi6UWuSKa4o4vJy6nD+5JPxVtRVaLkog== X-Received: by 2002:a7b:c3d5:0:b0:41b:b07a:c54c with SMTP id 5b1f17b1804b1-420fd301f7emr33153235e9.9.1716451358550; Thu, 23 May 2024 01:02:38 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35501abfdddsm93637f8f.110.2024.05.23.01.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:37 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 6/6] arm64: dts: ti: k3-am62p: Add partial-io wakeup sources Date: Thu, 23 May 2024 10:02:25 +0200 Message-ID: <20240523080225.1288617-7-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523080225.1288617-1-msp@baylibre.com> References: <20240523080225.1288617-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010241_025846_F07DA0D7 X-CRM114-Status: GOOD ( 10.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Vibhore Vardhan In Partial-IO mode there are a number of possible wakeup sources. Add the list of phandles to these wakeup sources. Based on the patch for AM62a. Signed-off-by: Vibhore Vardhan Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62p.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p.dtsi b/arch/arm64/boot/dts/ti/k3-am62p.dtsi index 94babc412575..4d43cc972056 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p.dtsi @@ -123,3 +123,7 @@ cbass_wakeup: bus@b00000 { #include "k3-am62p-main.dtsi" #include "k3-am62p-mcu.dtsi" #include "k3-am62p-wakeup.dtsi" + +&dmsc { + ti,partial-io-wakeup-sources = <&mcu_mcan0>, <&mcu_mcan1>, <&mcu_uart0>, <&wkup_uart0>; +};