From patchwork Wed Jun 16 10:36:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 1492865 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VwI8KJq4; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4G4hTH70wPz9sX2 for ; Wed, 16 Jun 2021 20:37:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232450AbhFPKj2 (ORCPT ); Wed, 16 Jun 2021 06:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232457AbhFPKjX (ORCPT ); Wed, 16 Jun 2021 06:39:23 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE591C0613A4 for ; Wed, 16 Jun 2021 03:37:12 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id bp38so3616902lfb.0 for ; Wed, 16 Jun 2021 03:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Umz7aYzmYhwqEEP8hnC/zZgdzJV3Msj9S6v5a9aoDDg=; b=VwI8KJq4r2miZYI4zo45kPqtcT9PQcZDZi7EgbrJ/dLYSxlekJGyMM3Oti5eB4RYqm ZHkdL8OBpSXPl+meGhQlfIMnqqcHTC7yVre4XK0+jTOmwGE/KtfDIgl7kl62+7B4whGc Gozv6cVsNkCcosBjkQinf1GZ6gacq4m5oZMs0IWWETLe1TonQXVhWz5yyAHMfW3hfmvD mEBFhdd6wX5G+dpX66LrSBBCjLIn+NxD8bmZB4zYM8YZd1n5rXzg+fbgOKRuTh2HehVz GnBbVrUoOm04x49Zk3S+rFgnps7nAsgsnzlXkCAcEBwRzSQsdEIJA9BIDfERUhaqiNMp J+EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Umz7aYzmYhwqEEP8hnC/zZgdzJV3Msj9S6v5a9aoDDg=; b=dUrpSJ9VlfbZeEs0jCEYHa1PtFuWjK1AzdOfHBBRDYxOYZAG4USgFf1G+Hrlz4lFPr Olkelrwf1nC6z048iGzQBhJW2uUsobvnVf9bxVQA4lQhkiYTyTBQ+RXCJkNlo7v8pqmf D0uq9FWPcGyrq72dEza+jxWJaruQ3S4m/jSgyt9Mg4WcWraRqHfT3ma5+vch42/GKJxP pPMcvI9Id4otO5nHNWBbnH+eF/+aNUnRHZoYIX+xRIcFtkmcc0VSVLE1BoLYN0EBKLjg Tpmtc2h+dSzuvU17ZnD4Kz4UBr0i2cnjFAMT4uN/es6JxbfyGACul26f79VUyLcXYAuS C+dQ== X-Gm-Message-State: AOAM533axliZQgufDfkgDtgogaWnmAjS+zbkyZJZfpNNrjR3FBNmL6KD 8KAfLG7MsdDyFVTwKJxFHT5MzA== X-Google-Smtp-Source: ABdhPJwusF0Hwl0KFVC3f7/9aSUBQG2V+qpIxjgLKtQ37eXDUOU8OQTd23w0a+s/4F+jqEb90knm+g== X-Received: by 2002:a05:6512:344e:: with SMTP id j14mr3261852lfr.468.1623839831236; Wed, 16 Jun 2021 03:37:11 -0700 (PDT) Received: from jade.urgonet (h-79-136-85-3.A175.priv.bahnhof.se. [79.136.85.3]) by smtp.gmail.com with ESMTPSA id m17sm205621lfh.288.2021.06.16.03.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 03:37:11 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org Cc: Jerome Forissier , Etienne Carriere , Sumit Garg , Vincent Guittot , Rob Herring , Jonathan Corbet , Ard Biesheuvel , Marc Zyngier , Jens Wiklander Subject: [PATCH v2 2/7] dt-bindings: arm: Convert optee binding to json-schema Date: Wed, 16 Jun 2021 12:36:44 +0200 Message-Id: <20210616103649.2662395-3-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210616103649.2662395-1-jens.wiklander@linaro.org> References: <20210616103649.2662395-1-jens.wiklander@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Converts the optee binding to use DT schema format. Signed-off-by: Jens Wiklander Reviewed-by: Rob Herring --- .../bindings/arm/firmware/linaro,optee-tz.txt | 31 ------------ .../arm/firmware/linaro,optee-tz.yaml | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt create mode 100644 Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml diff --git a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt deleted file mode 100644 index d38834c67dff..000000000000 --- a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt +++ /dev/null @@ -1,31 +0,0 @@ -OP-TEE Device Tree Bindings - -OP-TEE is a piece of software using hardware features to provide a Trusted -Execution Environment. The security can be provided with ARM TrustZone, but -also by virtualization or a separate chip. - -We're using "linaro" as the first part of the compatible property for -the reference implementation maintained by Linaro. - -* OP-TEE based on ARM TrustZone required properties: - -- compatible : should contain "linaro,optee-tz" - -- method : The method of calling the OP-TEE Trusted OS. Permitted - values are: - - "smc" : SMC #0, with the register assignments specified - in drivers/tee/optee/optee_smc.h - - "hvc" : HVC #0, with the register assignments specified - in drivers/tee/optee/optee_smc.h - - - -Example: - firmware { - optee { - compatible = "linaro,optee-tz"; - method = "smc"; - }; - }; diff --git a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml new file mode 100644 index 000000000000..c931b030057f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/firmware/linaro,optee-tz.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: OP-TEE Device Tree Bindings + +maintainers: + - Jens Wiklander + +description: | + OP-TEE is a piece of software using hardware features to provide a Trusted + Execution Environment. The security can be provided with ARM TrustZone, but + also by virtualization or a separate chip. + +properties: + $nodename: + const: optee + compatible: + oneOf: + - description: + We're using "linaro" as the first part of the compatible property + for the reference implementation maintained by Linaro. + const: linaro,optee-tz + + method: + description: The method of calling the OP-TEE Trusted OS. + $ref: /schemas/types.yaml#/definitions/string-array + oneOf: + - description: | + SMC #0, with the register assignments specified in + in drivers/tee/optee/optee_smc.h + const: smc + - description: | + HVC #0, with the register assignments specified in + in drivers/tee/optee/optee_smc.h + const: hvc + +additionalProperties: false + +examples: + - | + firmware { + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; From patchwork Wed Jun 16 10:36:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 1492866 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=I5t43eIZ; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4G4hTL0s2Rz9sWl for ; Wed, 16 Jun 2021 20:37:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232521AbhFPKja (ORCPT ); Wed, 16 Jun 2021 06:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232430AbhFPKjY (ORCPT ); Wed, 16 Jun 2021 06:39:24 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 247E9C06121D for ; Wed, 16 Jun 2021 03:37:14 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id p17so3520182lfc.6 for ; Wed, 16 Jun 2021 03:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K9rTCswFDcSx/xadpaa8S03K2mvlJRdx5LDwjr8plho=; b=I5t43eIZCnjyPa+pKdyMqKnMr/EQajUpEvuogScKNI+ErMEJmin3AHBzvsqi3F7Ved 49qQwy0hURavSmoJCaIwZ8dVmjdLqfsi2jRYXP+/C8l5fy09a/kHDWT7UE11u5sLMj8C h0GQzuVeB4zGiuGdGPjZHgvzy28JGggJE+s7yMliKSGCW/h09IjRdygF5eVc7n66S4xH Z9kbx6w+CsSJx2cbAL+nCv0c0V8djUMkZfwg4IdiHJoNQ4YW8Uz0dXDx5qE1p5n1tHCa 66Oc3U2PfmFdFTGUVZdSzhc/W7suK+3/79px/ibN3lyI2Z5eo5mEdoU/d6O+U/z9FuIM O2Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K9rTCswFDcSx/xadpaa8S03K2mvlJRdx5LDwjr8plho=; b=ZBZkh7oUeufI/AcBjGlkbkQEQIbbh5yYJMsVJDRhoXXqaK4XI2HWsvQ6vLX1JpD5JE SwTxiSRJmOpJaIRR/Ew8oLUIzrI8yAdtG4btPPy8MANf3f7wYlAhBchc/D71bfSSzDiq Q8zkYoni/Hh9ymt+7xxhGmCGtjLh5V28SzaEU5g4C83Pd/c4C5A+IaHCux+3HiUltWoQ 128vGECl8gMnqhmfbGmKd/IvZmhZgQmr6g70Lx59jtEM30xBpxWuqn5gbGWP82QYf1+l 7DfUWLse7KCDKQUVu/AXF8c3bMeeOGbDIKvcr54RkxRSoj/N0NHtdZ2G2Q13NRwDwlHp 3i8w== X-Gm-Message-State: AOAM531j1FUrMNz14MKcP3DESNPq135+v3EPeMAnhlIrS0BL7TCQUmWE qs9SWl+Krj488XWrhBGZ66qduA== X-Google-Smtp-Source: ABdhPJyRRh0Pb8kvyCXq/Lr9lQOLxI0JWINcPh9CvxE5rvjcyHijONeFGS2Ue+Juc03F1Wjspl6pIw== X-Received: by 2002:ac2:4c0e:: with SMTP id t14mr3228126lfq.555.1623839832447; Wed, 16 Jun 2021 03:37:12 -0700 (PDT) Received: from jade.urgonet (h-79-136-85-3.A175.priv.bahnhof.se. [79.136.85.3]) by smtp.gmail.com with ESMTPSA id m17sm205621lfh.288.2021.06.16.03.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 03:37:12 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org Cc: Jerome Forissier , Etienne Carriere , Sumit Garg , Vincent Guittot , Rob Herring , Jonathan Corbet , Ard Biesheuvel , Marc Zyngier , Jens Wiklander Subject: [PATCH v2 3/7] dt-bindings: arm: optee: add interrupt property Date: Wed, 16 Jun 2021 12:36:45 +0200 Message-Id: <20210616103649.2662395-4-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210616103649.2662395-1-jens.wiklander@linaro.org> References: <20210616103649.2662395-1-jens.wiklander@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Adds an optional interrupt property to the optee binding. Signed-off-by: Jens Wiklander --- .../devicetree/bindings/arm/firmware/linaro,optee-tz.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml index c931b030057f..3efbe11b637d 100644 --- a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml +++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml @@ -24,6 +24,9 @@ properties: for the reference implementation maintained by Linaro. const: linaro,optee-tz + interrupts: + maxItems: 1 + method: description: The method of calling the OP-TEE Trusted OS. $ref: /schemas/types.yaml#/definitions/string-array @@ -37,6 +40,10 @@ properties: in drivers/tee/optee/optee_smc.h const: hvc +required: + - compatible + - method + additionalProperties: false examples: @@ -45,5 +52,6 @@ examples: optee { compatible = "linaro,optee-tz"; method = "smc"; + interrupts = <0 187 4>; }; };