From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 982CFC433E1 for ; Fri, 5 Jun 2020 08:34:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74F9320772 for ; Fri, 5 Jun 2020 08:34:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="ffT9jAG9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726231AbgFEIe3 (ORCPT ); Fri, 5 Jun 2020 04:34:29 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:10302 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726084AbgFEIeQ (ORCPT ); Fri, 5 Jun 2020 04:34:16 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0558WZDe029739; Fri, 5 Jun 2020 10:33:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=N34mf34zyNH9z+LguQ97xJdxyRAZPkEJBPLArQ3FE8Y=; b=ffT9jAG9sz9w3RTPQOMBMJyZbOlubEeufw8LbrMAnJ5vJaAuJOlvdx/JtIxBgAnSMaC/ 7huB9zhrmhe6gZHQQCuaBk3OlXibba5KtGWHE9cqS0JVfEmEUUqXM0F4xFVj8qGWGRQG O04XeLP/wajHH2+KW7VSPRb8emz/DyeI6bXxFc6sT9EUxDngXcDs2cs4ioVetA6U7FIq L4Rk9B02UPDYy5aoSAqflFSuRl6tjmeEr652yaDTjxsd296oQtnj9UEc8bobUlKrYYln /jz/aSKyQAzi9eiT4n0GuMEhSnUO+ZueD9YtntUTgftw/UPE44V+g+IvHqQicKh6Zn4y 5w== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 31fasma4f3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jun 2020 10:33:54 +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 2DA55100038; Fri, 5 Jun 2020 10:33:51 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1E3F92B21C1; Fri, 5 Jun 2020 10:33:51 +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; Fri, 5 Jun 2020 10:33:50 +0200 From: Benjamin Gaignard To: , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v4 0/5] STM32 ETZPC bus controller Date: Fri, 5 Jun 2020 10:33:43 +0200 Message-ID: <20200605083348.13880-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG5NODE3.st.com (10.75.127.15) To SFHDAG3NODE3.st.com (10.75.127.9) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-05_01:2020-06-04,2020-06-05 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org STM32 Extended TrustZone Protection controller act like a firewall on the platform bus. Depending of its configuration devices could be accessible by the TrustZone, the co-processor or the non-secure world. ETZPC configuration could evolve at runtime for example to switch a device from non-secure world to co-processor. The series introduce 'firewall' helpers to handle the new devices-tree properties. These properties are not dedicated to ETZPC and will be reused for STM32 next generation of bus controller. version 4: - use bus API version 3: - add description in firewall consumer bindings - add Linus reviewed-by tag version 2: - fix unit name into st,stm32-etzpc.yaml example and DT Benjamin Gaignard (5): dt-bindings: bus: Add firewall bindings bus: stm32: Introduce firewall controller helpers dt-bindings: bus: Add STM32 ETZPC firewall controller bus: stm32: Add stm32 ETZPC firewall bus controller ARM: dts: stm32: Use ETZPC firewall bus .../bindings/bus/stm32/firewall-consumer.yaml | 36 +++ .../bindings/bus/stm32/firewall-provider.yaml | 18 ++ .../bindings/bus/stm32/st,stm32-etzpc.yaml | 46 ++++ arch/arm/boot/dts/stm32mp151.dtsi | 7 +- drivers/bus/Kconfig | 2 + drivers/bus/Makefile | 2 + drivers/bus/stm32/Kconfig | 11 + drivers/bus/stm32/Makefile | 2 + drivers/bus/stm32/firewall.c | 251 +++++++++++++++++++++ drivers/bus/stm32/firewall.h | 66 ++++++ drivers/bus/stm32/stm32-etzpc.c | 163 +++++++++++++ include/dt-bindings/bus/stm32/stm32-etzpc.h | 90 ++++++++ 12 files changed, 692 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/bus/stm32/firewall-consumer.yaml create mode 100644 Documentation/devicetree/bindings/bus/stm32/firewall-provider.yaml create mode 100644 Documentation/devicetree/bindings/bus/stm32/st,stm32-etzpc.yaml create mode 100644 drivers/bus/stm32/Kconfig create mode 100644 drivers/bus/stm32/Makefile create mode 100644 drivers/bus/stm32/firewall.c create mode 100644 drivers/bus/stm32/firewall.h create mode 100644 drivers/bus/stm32/stm32-etzpc.c create mode 100644 include/dt-bindings/bus/stm32/stm32-etzpc.h -- 2.15.0