From patchwork Wed Oct 21 10:28:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Fatoum X-Patchwork-Id: 11848889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D72BC4363A for ; Wed, 21 Oct 2020 10:36:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9137822249 for ; Wed, 21 Oct 2020 10:36:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="frxC5V93" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9137822249 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=qwaeas6p/3x5HqUoT1/FCu4DT9aBD0PUFpxGbwM/+74=; b=frxC5V93cHgUZA9mWlHTHLByV1 mOkNA5L0azJwMhaIsJ7q3V/Kp685+vWNBHTOJr3K5QiBSAWJlIBQG4FQFRQ1ROyW/bgISeL+BmWn7 gIhjAdyT+uI3OQOKptjBpuhxIpOqKLZQYubRn9tyFKOu6gSepzOc13LEInQ/x9iGnnh5NthtwTjPI sKdUI2zwFYsqSCjHWI1zBkvvXezTkmOB6RkjF1uzIuJwC0O76578glzee/0e+u7c2Y+/SEVnneJIM gy6h8ea8UhX96d4lNyYmmhzHpeG7WWkNJxyXGMud14kYyfUBIEXvYzaGokExdm8SfxuWR/xyWT5Gz xlrN8GPg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVBSP-0006mF-Bh; Wed, 21 Oct 2020 10:35:01 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVBSM-0006la-3N for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2020 10:34:58 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVBSG-0006i7-8U; Wed, 21 Oct 2020 12:34:52 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kVBSE-00024Q-MQ; Wed, 21 Oct 2020 12:34:50 +0200 From: Ahmad Fatoum To: Maxime Coquelin , Alexandre Torgue , Christophe Roullier Subject: [PATCH v2 1/2] dt-bindings: arm: stm32: add simple-mfd compatible for tamp node Date: Wed, 21 Oct 2020 12:28:55 +0200 Message-Id: <20201021102855.18026-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: afa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201021_063458_149632_2CEF26A1 X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ahmad Fatoum , Arnaud Pouliquen , linux-kernel@vger.kernel.org, Rob Herring , kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The stm32mp1 TAMP (Tamper and backup registers) does tamper detection and features 32 backup registers that, being in the RTC domain, may survive even with Vdd switched off. This makes it suitable for use to communicate a reboot mode from OS to bootloader via the syscon-reboot-mode binding. Add a "simple-mfd" to support probing such a child node. The actual reboot mode node could then be defined in a board.dts or fixed up by the bootloader. Signed-off-by: Ahmad Fatoum Reviewed-by: Rob Herring --- v1 available here: https://lore.kernel.org/linux-arm-kernel/20200916142216.25142-1-a.fatoum@pengutronix.de/ v1 -> v2: - new patch, rebased on top of https://lore.kernel.org/r/20201014125441.2457-1-arnaud.pouliquen@st.com --- .../devicetree/bindings/arm/stm32/st,stm32-syscon.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml index 6634b3e0853e..4684017a42e4 100644 --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml @@ -19,8 +19,11 @@ properties: - st,stm32mp151-pwr-mcu - st,stm32-syscfg - st,stm32-power-config - - st,stm32-tamp - const: syscon + - items: + - const: st,stm32-tamp + - const: syscon + - const: simple-mfd reg: maxItems: 1 From patchwork Wed Oct 21 10:28:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Fatoum X-Patchwork-Id: 11848887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC364C388F9 for ; Wed, 21 Oct 2020 10:36:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CB9E22249 for ; Wed, 21 Oct 2020 10:36:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kHkveKkx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CB9E22249 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GZBkTl7S1otD/ajWdijNb+iG3YFzGGDFx5qOwIbp8N0=; b=kHkveKkxyTxg9zf4UW7cg43Pl hrqHP6AmAomLd+S1PUNpXv1xzMXYZvpAX+uYZQ7abnOqlPVTtkoQcyPXd6aypYgodQ3GfFEXxUvpe QO9nG2wKyCN6Ad+6prPgzvJ1bpaCCXuC01N70jsDzKQ11iW+risqc4UloZd+lVwuA0RGLtTXneaKy LxP5LwDCvOcmTmSC47qAvvVio/xuAA7NgBAXPEbpjaglGBW8CPCz+aDZghabDzxkrDaUFEtZzunf1 CM4Rar7ZIIcB9d0tF6B89qd1mgYvcv2rQlJ9iUVHJhBoTQ1OkLd7Lblq5O55O8z4DV0b1sncq8TNz 3z2Dud/VQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVBST-0006nN-FM; Wed, 21 Oct 2020 10:35:05 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVBSO-0006mD-Ph for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2020 10:35:01 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVBSK-0006kK-Vy; Wed, 21 Oct 2020 12:34:56 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kVBSK-00024m-Lr; Wed, 21 Oct 2020 12:34:56 +0200 From: Ahmad Fatoum To: Rob Herring , Maxime Coquelin , Alexandre Torgue Subject: [PATCH v2 2/2] ARM: dts: stm32: support child mfd cells for the stm32mp1 TAMP syscon Date: Wed, 21 Oct 2020 12:28:56 +0200 Message-Id: <20201021102855.18026-2-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021102855.18026-1-a.fatoum@pengutronix.de> References: <20201021102855.18026-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: afa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201021_063500_859795_F1C3A1C9 X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ahmad Fatoum , Arnaud Pouliquen , linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The stm32mp1 TAMP peripheral has 32 backup registers that survive a warm reset. This makes them suitable for storing a reboot mode, which the vendor's kernel tree is already doing[0]. The actual syscon-reboot-mode child node can be added by a board.dts or fixed up by the bootloader. For the child node to be probed, the compatible needs to include simple-mfd. The binding now specifies this, so have the SoC dtsi adhere to it. [0]: https://github.com/STMicroelectronics/linux/commit/2e9bfc29dd Signed-off-by: Ahmad Fatoum --- v1 -> v2: - Dropped simple-bus. simple-mfd is all that's needed - reworded commit message --- arch/arm/boot/dts/stm32mp151.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi index 842ecffae73a..662c2408d41b 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -1542,7 +1542,7 @@ i2c6: i2c@5c009000 { }; tamp: tamp@5c00a000 { - compatible = "st,stm32-tamp", "syscon"; + compatible = "st,stm32-tamp", "syscon", "simple-mfd"; reg = <0x5c00a000 0x400>; };