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: 461386 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp487129jae; Wed, 16 Jun 2021 03:37:11 -0700 (PDT) X-Received: by 2002:ac2:5084:: with SMTP id f4mr3224407lfm.466.1623839831622; Wed, 16 Jun 2021 03:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623839831; cv=none; d=google.com; s=arc-20160816; b=oFq+zdLL9dcNqrQXPO09tR3DGsBjz5F43XcXZD/9QdH62Xfmd/Wc0q5vsP2JM6g5i4 JrnAX3+RPc3kc0VFjb3bsfnpf65lQS8fkfwS0THHFt13eGwgGRcfQp3W1FELSUDqLcpd s/L2uLSZTtTiqoOg2Iij/Zv017J2BlJOftJJoMdNAUUZxeBKZW055vfafHoXirvRU0wR 9ibWAK7lcBsyRSOF7HCXHY67QX8M5TlJZq8igYUTeBo+LnQwgzEH3QqnI8YWr7UaZ2yg aGai/i34yiNXhWBmhz4jzVM0CFKQrAHnvoGGop43VpyChW8hFC4xNkRDCPyU4jGZPOhC mcyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Umz7aYzmYhwqEEP8hnC/zZgdzJV3Msj9S6v5a9aoDDg=; b=lnwZGJfFfGhIUDGHxyVimI4PME0YEvUpQQGcbZ6pYzdcm93wU+P9kHT12F7NjUU5TO nY8mDN5ADAm8MlJzfbWfu8E/gFLJjxWyRmVwTwEpJr+8+wdFsK0tMhc3Vo9rMHF7N4/8 S38OKZMWJiGZNxy8RNpbEzhyNplQ1notFSjs7Ujl+IUCLqI0xaXzxwSxNlXt1K2atyaC VkDqkHVALt3jDBZXjHOA7DrVX/dHs8gJjI9aWpnP8Z4i6Ld32//9uCXVsHSL8ZL9hyHw hd1RdiNebL/bJ3/TszH0CetlIfMNL/2teaM9D7tOwkHleJ+5pKtiPfLeSSJv+lck9tJ5 MpjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VwI8KJq4; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id j11sor390497lfu.114.2021.06.16.03.37.11 for (Google Transport Security); Wed, 16 Jun 2021 03:37:11 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VwI8KJq4; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=Bq7U1TO7yQ4fT6UTskAGTmiM0RAB1kqq/UgP2CkNReOjsmpYjCsFgfU7nMzstJtrYY 6Dmn4djI0eddHMfkyVxcnKk1L+I+8hn1sf6Hl0+IHmaLzaGD8u44H+NUCEuTLvecTG/G n8qjH81TyzFHzPHWrCr6zwSn8SgRAfq8RmmnwEOfAxS+9fdh8YPkkDot358DV02QrExk 6dWTYkfjMdSLwPNUx2FOCLaK7ILIL+v+2e73eFdQrqmnl8ZcUmwLE23h2kEDKnvcnbpd JErBqH++jdwY6F9wfkI7xr+M8i02tgjiMs3e2Kxb8kyoLVuga/6kKPBSLgwgVL/o44ln UiIg== X-Gm-Message-State: AOAM533060lusL9oD2SOC9im2e0rivOb3RiO1zR7MkFjoqcg37iJH560 W9ro2tAuRLd7/g7f/jiJuHztOyWF 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) Return-Path: 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 Converts the optee binding to use DT schema format. Signed-off-by: Jens Wiklander --- .../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 -- 2.31.1 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"; + }; + };