From patchwork Wed Nov 22 18:52:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Fatoum X-Patchwork-Id: 168522 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1540284vqb; Wed, 22 Nov 2023 10:53:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFe4uUvH0owDbUZZ60QqUTgzeSxhXJmBlf8u0vsKK8A+hg7Kj65Hze/aroRdIsEQxi9/c2C X-Received: by 2002:a05:6a00:855:b0:6cb:a27f:5065 with SMTP id q21-20020a056a00085500b006cba27f5065mr3748366pfk.34.1700679201943; Wed, 22 Nov 2023 10:53:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700679201; cv=none; d=google.com; s=arc-20160816; b=Ml5oOzHLQG8vofs5n9gx6pIVbx0rmMiHP807Z/USSr9l5v2IOjfoziMZJNAMPulLEM W6S/11wAqn1VPFQdpz96lV5pCv3VVFAGL68qs2Hqb4GJqwiZFWomrfoGz+fMZWHRIn6p ZC0EAqJGLRelkqvVm7oXwMOvd6G2RW51d3Yxn0AplUhZas/XsZ3ew4xrt8ufWYdBKwhV 62eSWwhp4tlxSaN9t34qNtnga8nJZJMEbzQbVycPmyk4P0AQE9NJ+vNPTX/tQejpSBO1 72pNf/Qe+fPimArAk41WLYny/yvvZdUD3s/c+kARik9R7kNKUJ9VFJ7ZU/5Z1VlgGp+c DmZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8vvURaE5UiYJzXZ1bLmBB5PL27DT5QSKe1/6APIlChY=; fh=+9dP6kxYOFUK6iXmvfMsjEjHL0O2rGDgJ2CbfFVULJA=; b=wzKhQpnoT5paGOPV7fdeuCCQi3DG0swWYfXtNxIcorGiwGPVJ6iv+bCvbKOkQAz7r+ 70HQtJUk39Zmxv4XcccJ5a/RZ7AHLQ/BVOTeZDvTQ+vfegrI9D+n7eWKlsKOP92o7xVC JbyhjRUPR3OMQd/Wr9vFl04K6q3OgntmLpFluquSHoHialzwZE82KUzDgV1qpSwVYyrI ttlgLV56oyBJiKuyssKWogWaHZSaqEzBpIgXk43y+bnpMs3o0IBg/dRE6U53KgDg71r9 zk1RpVZfhrEehQaA71P2drX3qMH6ss5ZDiygwwY9GL1GDq+wROVr2mao4hUxVlYb2e1D pf1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c3-20020a056a000ac300b00690d695b113si94571pfl.337.2023.11.22.10.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:53:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6EF9A81D82D1; Wed, 22 Nov 2023 10:53:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344284AbjKVSwz (ORCPT + 99 others); Wed, 22 Nov 2023 13:52:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344178AbjKVSwx (ORCPT ); Wed, 22 Nov 2023 13:52:53 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928BAC1 for ; Wed, 22 Nov 2023 10:52:49 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r5sL0-0002NJ-KB; Wed, 22 Nov 2023 19:52:38 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r5sKz-00As7O-8d; Wed, 22 Nov 2023 19:52:37 +0100 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1r5sKz-008Sz9-0M; Wed, 22 Nov 2023 19:52:37 +0100 From: Ahmad Fatoum To: Maxime Coquelin , Alexandre Torgue , Rob Herring Cc: kernel@pengutronix.de, Ahmad Fatoum , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles Date: Wed, 22 Nov 2023 19:52:33 +0100 Message-Id: <20231122185235.2017642-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 10:53:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783291395097088838 X-GMAIL-MSGID: 1783291395097088838 SCMI-enabled boards may restrict access to resources like clocks, resets and regulators to the secure world. A normal world bootloader or kernel compatible with the non-SCMI-enabled board is thus not guaranteed to be able to deal with the SCMI variant. It follows, that the SCMI-enabled board is not compatible with the non-SCMI enabled board, so drop that compatible. This change is motivated by the barebox' bootloader's use of bootloader specification files[1][2]: barebox for non-SCMI DK2 will compare its own top-level "stm32mp157c-dk2" compatible with all compatibles listed in the device tree referenced by each bootloader spec file. If the boot medium contains a configuration with compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157"; it will match, because of the second compatible and boot a kernel with SCMI enabled, although no SCMI may exist on the platform. [1]: https://uapi-group.org/specifications/specs/boot_loader_specification/ [2]: https://www.barebox.org/doc/latest/user/booting-linux.html#boot-loader-specification Fixes: 8e14ebb1f08f ("dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") Signed-off-by: Ahmad Fatoum Acked-by: Rob Herring --- .../devicetree/bindings/arm/stm32/stm32.yaml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml index df087c81c69e..bc2f43330ae4 100644 --- a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml +++ b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml @@ -82,29 +82,19 @@ properties: - shiratech,stm32mp157a-iot-box # IoT Box - shiratech,stm32mp157a-stinger96 # Stinger96 - st,stm32mp157c-ed1 + - st,stm32mp157c-ed1-scmi - st,stm32mp157a-dk1 + - st,stm32mp157a-dk1-scmi - st,stm32mp157c-dk2 + - st,stm32mp157c-dk2-scmi - const: st,stm32mp157 - - items: - - const: st,stm32mp157a-dk1-scmi - - const: st,stm32mp157a-dk1 - - const: st,stm32mp157 - - items: - - const: st,stm32mp157c-dk2-scmi - - const: st,stm32mp157c-dk2 - - const: st,stm32mp157 - - items: - - const: st,stm32mp157c-ed1-scmi - - const: st,stm32mp157c-ed1 - - const: st,stm32mp157 - items: - const: st,stm32mp157c-ev1 - const: st,stm32mp157c-ed1 - const: st,stm32mp157 - items: - const: st,stm32mp157c-ev1-scmi - - const: st,stm32mp157c-ev1 - const: st,stm32mp157c-ed1 - const: st,stm32mp157 From patchwork Wed Nov 22 18:52:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Fatoum X-Patchwork-Id: 168521 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1540158vqb; Wed, 22 Nov 2023 10:53:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWiVmTDW91aRJcfkOlZukVwJ0dLVGNo5aL+AkowZj5+i2yespO0xvsYeul0amZYWF4THe/ X-Received: by 2002:a05:6a00:8f:b0:68f:d35d:217e with SMTP id c15-20020a056a00008f00b0068fd35d217emr2726671pfj.2.1700679185377; Wed, 22 Nov 2023 10:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700679185; cv=none; d=google.com; s=arc-20160816; b=inb5ytJFK1PbNIaTQTLbB3rWM647tKuIzXmfdTMATAAylZTQKzmkAGXRKQ9TVA/Wyt zsFLzEmawtePc2ffxgGCNobnPPtM6oamr7UXEevQ9dlcU7f9kg3BSQLBK4B1RVL2eBig PvQaYpUWwc8Dr21rm/yHiJogm2nHqRjo/cJ4ZlLgZ/347P/syZ1EhC5G9l3ocYxg1Env pYGxBMNKaWrGFi243Hm9E1jzYVGHx0lTYonttkblGWCenzC4qiRlWKefeduVcmCjOtDZ KL2ayg/cLY3uHag9Wi30WyjVMQVZdWBsWQp73DpVtKY0ofHFc/btlhCUFBkMob5+M9uB h2NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=08V7jv9/7oMB/0ntHG7Vp345T5bvV/u0UpO2yyrk+uA=; fh=KLGbafBi22WXVsh/FqrvBNP801hXN6DvdFfxpm9qKes=; b=sRvSmFxDo62ue9shIrlyS4DlcT+ntOfGv3t2MVVW+Wt3OmLG/eXy4F4LrRdD14iRnK BmuI5CuViJu1thOglJIZ4CQWoqniRDjKDdqaNkoyktSGq1k9GacGOhE7gaLOrFi7keOk wKkpygZrDM0rTDRGGAt7TDcEk23lufXDfM3JpZcpbOTuNt2MPBnrtrK30LANgAH5kIFt j6sBEe1jqDoL5hh4kykKao3ezeLkJJ6gCQN2OFKPC8h7LS5pbp/8GRLtA8xK4N1a6HEI yJew4JXO/DfdljrEEn6sj9myFZN5ng3dw65bIClNneYLFNfEOUn7AQuSJMflC9Wkree5 nFZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 15-20020a630d4f000000b005ab92870413si39752pgn.498.2023.11.22.10.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:53:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7B84A81D82CA; Wed, 22 Nov 2023 10:52:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344164AbjKVSwx (ORCPT + 99 others); Wed, 22 Nov 2023 13:52:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231470AbjKVSww (ORCPT ); Wed, 22 Nov 2023 13:52:52 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4711DA4 for ; Wed, 22 Nov 2023 10:52:49 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r5sL0-0002OL-OE; Wed, 22 Nov 2023 19:52:38 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r5sL0-00As7R-Ax; Wed, 22 Nov 2023 19:52:38 +0100 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1r5sL0-008Sz9-0d; Wed, 22 Nov 2023 19:52:38 +0100 From: Ahmad Fatoum To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue Cc: kernel@pengutronix.de, Ahmad Fatoum , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles Date: Wed, 22 Nov 2023 19:52:34 +0100 Message-Id: <20231122185235.2017642-2-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231122185235.2017642-1-a.fatoum@pengutronix.de> References: <20231122185235.2017642-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 10:52:52 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783291377126074499 X-GMAIL-MSGID: 1783291377126074499 The binding erroneously decreed that the SCMI variants of the ST evaluation kits are compatible with the non-SCMI variants. This is not correct, as a kernel or bootloader compatible with the non-SCMI variant is not necessarily able to function, when direct access to resources is replaced by having to talk SCMI to the secure monitor. The binding has been adjusted to reflect thus, so synchronize the device trees now. Fixes: 5b7e58313a77 ("ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") Signed-off-by: Ahmad Fatoum --- arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts index afcd6285890c..c27963898b5e 100644 --- a/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts @@ -11,7 +11,7 @@ / { model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board"; - compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157a-dk1", "st,stm32mp157"; + compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157"; reserved-memory { optee@de000000 { diff --git a/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts index 39358d902000..622618943134 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts @@ -11,7 +11,7 @@ / { model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board"; - compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157"; + compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157"; reserved-memory { optee@de000000 { diff --git a/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts index 07ea765a4553..c7c4d7e89d61 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts @@ -11,7 +11,7 @@ / { model = "STMicroelectronics STM32MP157C-ED1 SCMI eval daughter"; - compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157"; + compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157"; reserved-memory { optee@fe000000 { diff --git a/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts b/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts index 813086ec2489..2ab77e64f1bb 100644 --- a/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts +++ b/arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts @@ -11,8 +11,7 @@ / { model = "STMicroelectronics STM32MP157C-EV1 SCMI eval daughter on eval mother"; - compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", - "st,stm32mp157"; + compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ed1", "st,stm32mp157"; reserved-memory { optee@fe000000 {