From patchwork Mon Apr 20 13:47:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 201747 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 059EEC3815B for ; Mon, 20 Apr 2020 13:48:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA72120672 for ; Mon, 20 Apr 2020 13:48:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="tvkyfl8T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728770AbgDTNsV (ORCPT ); Mon, 20 Apr 2020 09:48:21 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:31830 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbgDTNsV (ORCPT ); Mon, 20 Apr 2020 09:48:21 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03KDllMc024848; Mon, 20 Apr 2020 15:48:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=FJh6fC8jON2d+h4HJHf/RBjL/d+0wt6Wf8NAcemUV7o=; b=tvkyfl8TSu19rcRoEpFtFxavA/jh5kAEXz1yw9kAvruhldYECXYgE/3fodYagU/vYr2E MHBVPnS3YH8YN3ng5JtnyOu68mK9Sm4hli/nrkjh0MbAX7yIu5Xj2dmonh1EHB6loToY qWEJNts0I1vlXTDn3VdPDPZL9tGe7kWCjKGKZZEQLf4Qf1v5+mt0zaaB91lGw7fDAHMl ciQDw9mZ0YjvbVpD9eHER5iXp22AWKbgMCV+UdP2JgBr2v1O0iNeqXBiu5mmEuuNW9SF +agJ9WqWHvxy12dwlRJlraau1xzuk+TmmwEJL/weMp9jKEcsW4XFmL9RPQazdOJfYFMI Uw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 30fq11akx7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Apr 2020 15:48:06 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DD55010002A; Mon, 20 Apr 2020 15:48:04 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CBC762B3E2D; Mon, 20 Apr 2020 15:48:04 +0200 (CEST) Received: from localhost (10.75.127.44) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 20 Apr 2020 15:48:03 +0200 From: Benjamin Gaignard To: , , , , , CC: , , , , Benjamin Gaignard Subject: [PATCH 1/5] dt-bindings: bus: Add firewall bindings Date: Mon, 20 Apr 2020 15:47:56 +0200 Message-ID: <20200420134800.31604-2-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20200420134800.31604-1-benjamin.gaignard@st.com> References: <20200420134800.31604-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG7NODE3.st.com (10.75.127.21) To SFHDAG3NODE3.st.com (10.75.127.9) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-20_04:2020-04-20,2020-04-20 signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add schemas for firewall consumer and provider. Signed-off-by: Benjamin Gaignard --- .../bindings/bus/stm32/firewall-consumer.yaml | 25 ++++++++++++++++++++++ .../bindings/bus/stm32/firewall-provider.yaml | 18 ++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/stm32/firewall-consumer.yaml create mode 100644 Documentation/devicetree/bindings/bus/stm32/firewall-provider.yaml diff --git a/Documentation/devicetree/bindings/bus/stm32/firewall-consumer.yaml b/Documentation/devicetree/bindings/bus/stm32/firewall-consumer.yaml new file mode 100644 index 000000000000..8f123888d058 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/stm32/firewall-consumer.yaml @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/stm32/firewall-consumer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Bus Firewall consumer binding + +maintainers: + - Benjamin Gaignard + +# always select the core schema +select: true + +properties: + firewall-0: true + + firewall-names: true + +patternProperties: + "firewall-[0-9]": + $ref: "/schemas/types.yaml#/definitions/phandle-array" + +dependencies: + firewall-names: [ firewall-0 ] diff --git a/Documentation/devicetree/bindings/bus/stm32/firewall-provider.yaml b/Documentation/devicetree/bindings/bus/stm32/firewall-provider.yaml new file mode 100644 index 000000000000..299824c620ea --- /dev/null +++ b/Documentation/devicetree/bindings/bus/stm32/firewall-provider.yaml @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/stm32/firewall-provider.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Bus Firewall provider binding + +maintainers: + - Benjamin Gaignard + +properties: + '#firewall-cells': + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of cells in a bus firewall specifier + +required: + - '#firewall-cells' From patchwork Mon Apr 20 13:47:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 201749 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 8E6D3C3815B for ; Mon, 20 Apr 2020 13:48:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EAC2206E9 for ; Mon, 20 Apr 2020 13:48:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="oZCROPz8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbgDTNsX (ORCPT ); Mon, 20 Apr 2020 09:48:23 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:35980 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726105AbgDTNsX (ORCPT ); Mon, 20 Apr 2020 09:48:23 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03KDmAO4000358; Mon, 20 Apr 2020 15:48:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=+RO07yLIiBmNRGLs8R+tGZitP1R9yGgnxaWOnVOiYSE=; b=oZCROPz8buxih9PyX+1uH+lBnOHZVfDW6/nwCGIxApeSLcqn7w0AG4eEAu90RqZV7OsT iuq8Gnzu5RR9Ur73XmQ5kyv3ei6mp/zgqLyBGz7Jdp5Bv0JmbcFVqBIB0KyNE3qmVEMQ 4P0G6Wh80VAkvRSmBUzIwSW8eShqOW7ZHQ0TNzkOgGa/jk+rT1uGjTUOZCjYUoJGPDXM 2wLWa+Tnxca6KgEZQINR5SMidvAKRXhahTy/MgvCd10Jry3uTSHpei61lKacULUqxU/g tgAVsoezuOjY/TQ7Dytck+0ZqfQmszDrVW/EUvM4inbCFkdy4/SY8mAnU91V+sm8hu45 bg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 30fregabmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Apr 2020 15:48:10 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5761E10002A; Mon, 20 Apr 2020 15:48:07 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4A96B2C0BED; Mon, 20 Apr 2020 15:48:07 +0200 (CEST) Received: from localhost (10.75.127.46) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 20 Apr 2020 15:48:06 +0200 From: Benjamin Gaignard To: , , , , , CC: , , , , Benjamin Gaignard Subject: [PATCH 3/5] dt-bindings: bus: Add STM32 ETZPC firewall controller Date: Mon, 20 Apr 2020 15:47:58 +0200 Message-ID: <20200420134800.31604-4-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20200420134800.31604-1-benjamin.gaignard@st.com> References: <20200420134800.31604-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG7NODE1.st.com (10.75.127.19) To SFHDAG3NODE3.st.com (10.75.127.9) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-20_04:2020-04-20,2020-04-20 signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document STM32 ETZPC firewall controller bindings Signed-off-by: Benjamin Gaignard --- .../bindings/bus/stm32/st,stm32-etzpc.yaml | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml diff --git a/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml new file mode 100644 index 000000000000..a684475ef339 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/stm32/st,stm32-etzpc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STM32 Extended TrustZone Protection controller + +maintainers: + - Benjamin Gaignard + +description: STMicroelectronics's STM32 firewall bus controller implementation + +allOf: + - $ref: "firewall-provider.yaml#" + - $ref: /schemas/simple-bus.yaml# + +properties: + compatible: + contains: + enum: + - st,stm32-etzpc-bus + + reg: + maxItems: 1 + + '#firewall-cells': + const: 2 + +required: + - compatible + - reg + - '#firewall-cells' + +examples: + - | + soc { + compatible = "st,stm32-etzpc-bus", "simple-bus"; + reg = <0x5c007000 0x400>; + #firewall-cells = <2>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + }; + +... From patchwork Mon Apr 20 13:48:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 201748 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 955B6C3A5A0 for ; Mon, 20 Apr 2020 13:48:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 735212070B for ; Mon, 20 Apr 2020 13:48:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="ktNatlHb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728826AbgDTNsZ (ORCPT ); Mon, 20 Apr 2020 09:48:25 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:20492 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728798AbgDTNsY (ORCPT ); Mon, 20 Apr 2020 09:48:24 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03KDgpKH005021; Mon, 20 Apr 2020 15:48:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=YafPaspbg9vF7jvVZXlsFyKpH/FVWQeDOCMxyjl7JA8=; b=ktNatlHb+hlh5T84xyq1GW/hYhMtNP/LjBjoNPJwdCukxgK2D9/fxfCkjY3pBUcpEtGh FsFo7QgCHDI+YzRBtZUIbYvtZv/o2GT8/qCAX2tbiScWMSJp8AR5UZ/T7L8Q2dJzM6KX gU8rgoGTwljqUQ1EersKSrS+DfHmMtCJNdLxhoA1cncQGG4cHuv0jFAaMLFEsCsyhqlT MMrQBG/aGJUr9jkvdfZoHqFTEgdaJOR57ejIjiZuwXv4uRaM2YnRjM8xybvaXPam+jYl 9IXe/K3AJbePPnY7hzgCqDvbVygnoyIhaCJAkrvma4U8PZe6JOD6R1Hzazg8SjCu9/wH 7g== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 30fqaw2j09-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Apr 2020 15:48:10 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C5CB8100038; Mon, 20 Apr 2020 15:48:09 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BA35D2C0BED; Mon, 20 Apr 2020 15:48:09 +0200 (CEST) Received: from localhost (10.75.127.44) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 20 Apr 2020 15:48:08 +0200 From: Benjamin Gaignard To: , , , , , CC: , , , , Benjamin Gaignard Subject: [PATCH 5/5] ARM: dts: stm32: Use ETZPC firewall bus Date: Mon, 20 Apr 2020 15:48:00 +0200 Message-ID: <20200420134800.31604-6-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20200420134800.31604-1-benjamin.gaignard@st.com> References: <20200420134800.31604-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG6NODE2.st.com (10.75.127.17) To SFHDAG3NODE3.st.com (10.75.127.9) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-20_04:2020-04-20,2020-04-20 signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allow STM32 ETZPC to check firewall configuration before populating the platform bus. Signed-off-by: Benjamin Gaignard --- arch/arm/boot/dts/stm32mp151.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi index 3ea05ba48215..21b37cfc3e54 100644 --- a/arch/arm/boot/dts/stm32mp151.dtsi +++ b/arch/arm/boot/dts/stm32mp151.dtsi @@ -4,6 +4,7 @@ * Author: Ludovic Barre for STMicroelectronics. */ #include +#include #include #include @@ -110,8 +111,10 @@ status = "disabled"; }; - soc { - compatible = "simple-bus"; + stm32_bus: soc { + compatible = "st,stm32-etzpc-bus", "simple-bus"; + reg = <0x5c007000 0x400>; + #firewall-cells = <2>; #address-cells = <1>; #size-cells = <1>; interrupt-parent = <&intc>;