From patchwork Thu May 23 08:02:19 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: 13671375 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 A22CDC25B75 for ; Thu, 23 May 2024 08:02:54 +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: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:In-Reply-To:References: List-Owner; bh=hSqLppZu8Z7e/mp0VfdGNfKmzwBqPuSp3WtU4di+cAs=; b=n+hQkKFZMF2kq2 w+yOdGKD0pFAXq+o5BEViUYloGqwYmAuwtpqU1/oH7WgeqGbR5nyf0ZgRMgfneThOOFx29XRK7ITL 2IlhfRltUDY+6AQFWgzeQ8/0i5XzcghHRZOF076PfZbdD+/4UfdODtIYwwWex9GfINsyEXy5x6Ad5 IzjJmkykr5pdBWhUyy0V2WrFjll66WqKGxRYB2GGNlEytaTpfoIJnxs2DsFD4n07PQRJN7KRzlBhU 5uYGlSDzlgOrPjCWuX4SI3IFJsm5xZip2yu0chz3HJygHqDrkW9GoQa6ZT80V6i4YzOnm8m560GkM GCgfncN5S1usX+62AlxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3PH-00000005Q6J-0wxW; Thu, 23 May 2024 08:02:35 +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 1sA3PD-00000005Q5S-26cv for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 08:02:33 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-351da5838fcso5635957f8f.1 for ; Thu, 23 May 2024 01:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716451350; x=1717056150; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0J2OeoCqQcca8A4XUgC5bySDFCw48o1TNPYwtFh2a2I=; b=w2/lfBzcJtQe4HJP4yvnDZQjwlVUrVXBgNY4jyYJb4WEMV7vpqlkfzODno1o/KGuLM hFN6biAIsK+71MgrTYbs1yD+J4zzIVTaaJPnwiKL3HNcm54slSFENTfT+vixhYncsowo MqN86/QeG6sV7ucqHiSpo2K5wJeN4mdAE0xAJEksEQ+EqJyXvoftRl9MPbKzXfVWRHFH 04yLU00bdZ3fPz1VqFPOWHuxf0CCP+PPB5oIv7eshGyWcn3M4kzTqWXfjBIJZlv52tFh cuTgFb/SawQmlQw4frOLqLhWKPd9GjnbBGRYs5+J6q2bzmi9UxtnvaPwRqZ1oFm0/3Ji cjLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716451350; x=1717056150; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0J2OeoCqQcca8A4XUgC5bySDFCw48o1TNPYwtFh2a2I=; b=rcEKBX70sl1k6kX4M+z0b1U18YWmDqkyrGfvDd2XmMGg1Qc3oP91DonqQwIl9z59X9 vw1daTfRpZSUBzdbXhwDTnwYfc/uYiw9f2nMQjbhxgKF6/04RCQ8kVBeRwNY5T36Aic/ QVOnBCbm5Qgti6q5PYQMcG5gsIQ4/VQUmgOuxtBOZaaWB76dwAHyJecJPkkzDDWJfOj+ +RJsPiE2v74DnrQF/Orfq9NJR1yNVXQKBHbLYtz/H4+SkCb9nR0zWsmnWwK5ARIJ6Txf duXx3RaWqHXpgj1JRJZqJHWtcbYmzArzpTS2FCxNgj7e0VY4iWeoeqA5ADQ4oBg4vq6+ 8RIA== X-Forwarded-Encrypted: i=1; AJvYcCWTiSqRvp1npvpF9YgHzI7mJiyNEBKsojqOKwfDQgoniARS6TXx6S1E8/HwIWpjg6s789MlkIYi4Rcy094RhqieA+CpB0KRnxoz1DOYSoBXX4cevds= X-Gm-Message-State: AOJu0Yx1pqDVTpdfx5SqbojaXoTFaAgMMmLn+daEr8zigl2EIBwtmyaN 1KJVbEEOLKfN0noCX3rJCQFlpLenKUQap1p+sC+Ow+4zHq0OTGAd1vP5oJ4V3RPHR2lr4svYbCt H X-Google-Smtp-Source: AGHT+IFs4zKu4mkfSwJ00cEuqunFI4d5En43MpOl7AHLMm7sgx8p/3MO55WY1Bh9L819Lj+C7uR7JQ== X-Received: by 2002:adf:cd06:0:b0:354:f2b8:c75e with SMTP id ffacd0b85a97d-354f2b8c8b4mr2348864f8f.33.1716451349471; Thu, 23 May 2024 01:02:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 01:02:28 -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 0/6] firmware: ti_sci: Partial-IO support Date: Thu, 23 May 2024 10:02:19 +0200 Message-ID: <20240523080225.1288617-1-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_010231_793923_6ADBCFCC X-CRM114-Status: GOOD ( 13.77 ) 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 Hi, Partial-IO is a poweroff SoC state with a few pingroups active for wakeup. This state can be entered by sending a TI_SCI PREPARE_SLEEP message. The message is sent on poweroff if one of the potential wakeup sources for this power state are wakeup enabled. A list of potential wakeup sources for the specific SoC is described in the devicetree. The wakeup sources can be individually enabled/disabled by the user in the running system. The series is based on Andrew Davis accepted patches: [PATCH 0/4] Unconditionally register TI-SCI reset handler https://lore.kernel.org/lkml/20240326223730.54639-1-afd@ti.com/ This series is part of a bigger topic to support Partial-IO on am62, am62a and am62p. Partial-IO is a poweroff state in which some pins are able to wakeup the SoC. In detail MCU m_can and two serial port pins can trigger the wakeup. These two other series are relevant for the support of Partial-IO: - serial: 8250: omap: Add am62 wakeup support - can: m_can: Add am62 wakeup support A test branch is available here that includes all patches required to test Partial-IO: https://gitlab.baylibre.com/msp8/linux/-/tree/integration/am62-lp-sk-partialio/v6.9?ref_type=heads After enabling Wake-on-LAN the system can be powered off and will enter the Partial-IO state in which it can be woken up by activity on the specific pins: ethtool -s can0 wol p ethtool -s can1 wol p poweroff I tested these patches on am62-lp-sk. Best, Markus Markus Schneider-Pargmann (5): dt-bindings: ti, sci: Add property for partial-io-wakeup-sources firmware: ti_sci: Partial-IO support arm64: dts: ti: k3-pinctrl: Add WKUP_EN flag arm64: dts: ti: k3-am62: Add partial-io wakeup sources arm64: dts: ti: k3-am62a: Add partial-io wakeup sources Vibhore Vardhan (1): arm64: dts: ti: k3-am62p: Add partial-io wakeup sources .../bindings/arm/keystone/ti,sci.yaml | 6 + arch/arm64/boot/dts/ti/k3-am62.dtsi | 4 + arch/arm64/boot/dts/ti/k3-am62a.dtsi | 4 + arch/arm64/boot/dts/ti/k3-am62p.dtsi | 4 + arch/arm64/boot/dts/ti/k3-pinctrl.h | 3 + drivers/firmware/ti_sci.c | 135 +++++++++++++++++- drivers/firmware/ti_sci.h | 31 ++++ 7 files changed, 186 insertions(+), 1 deletion(-)