Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3152999pxb; Tue, 20 Apr 2021 01:35:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykAb3x7mR2RS14Vxuexm8sZdM2wOCuNpEWyMxJneMAn6hPm5f+NYHSjDzG0No8E7Y8T9HL X-Received: by 2002:a62:6481:0:b029:249:ecee:a05d with SMTP id y123-20020a6264810000b0290249eceea05dmr23797754pfb.9.1618907709712; Tue, 20 Apr 2021 01:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618907709; cv=none; d=google.com; s=arc-20160816; b=FdgvAgKwDboVQvSrjcG+Z1sxE0abmurCVFLeKKp1NTQx2iM2Mj93wY/7dlrlcUoPGi cXtIRQ76r8BNYBYdlMw4t4ygcJryFMRg6PDI+AJ9ntEMJemm4+rXaVTJ5GqxAyMuekzq jRQA00dvKie6/3WK4ej1/L++2tm8pFm4nmAKdIJdRiwC0qi20WTQubpaDVmt4T5dAzPV Lt/YUJYZqQ7Re7iPLafsG8GliDCCDp0ZQYml4/yCAvL8OPprtLbQHubBCRpXpNyP+voB /USfWmVueH7vJgQHR8E9UX2SK9VNWuPzdSQliNO2PcekFQutw/DcyYSsLT8qJ0Wn9Yl7 v+Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Q1T8M/4Hes3NzluLQXBUJj6LcT4nx2E+5/+ymNCi9rc=; b=hVI8a5h2/4z12Ix5eIQjLCBOi17WTGJ/TobAdNhxBq98nPVYpOm9ImRsVwHOH8gsoM 5jLIonsMVVnYiR76zG0OLpGcgz8kPH9B0ksDNkv2WOE4LkAWv3Rlxq34ubfDN949PsJO ONnZkpBbe/ua8v7i8I8XlCX67zN2E5dJuunfb6B0C08CIQDFL5o0akEHiZSSQj/C+dKi dPa9v9RJRJisGmlUDrSTBxkLv/uKilb4KmpGC7nvVn2PAS16SIsxoM0znu8zm8N2QDe2 aJ/DUT23m6LMavI9noTjEzS0549is6Cicj2q+5Ov+/SkM4nG0ql7l/ui3FOHtBsbzX8u WEag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ednZnGG6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si21284735pgv.80.2021.04.20.01.34.57; Tue, 20 Apr 2021 01:35:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ednZnGG6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbhDTIdU (ORCPT + 99 others); Tue, 20 Apr 2021 04:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbhDTIdU (ORCPT ); Tue, 20 Apr 2021 04:33:20 -0400 Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E02DC061763 for ; Tue, 20 Apr 2021 01:32:48 -0700 (PDT) Received: by mail-oo1-xc2e.google.com with SMTP id d16-20020a4a3c100000b02901f0590a614eso509071ooa.8 for ; Tue, 20 Apr 2021 01:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q1T8M/4Hes3NzluLQXBUJj6LcT4nx2E+5/+ymNCi9rc=; b=ednZnGG6fwzO6JD8Iu0xjnPY9PBOnCxmbRtJXT5RpgtoGAE21UQyh6whya2/H0Yo4q NRqYrxQL1FGM+4oaNfUzQv/K0iLxeorhv1irOU7PwJqZHfeF6lmQLSzXgALQJZpPutfb MBYvAn1iOUQmRdcugUOAX0DN/kiZuOBrnD4jbarZ3NaAHVXk+snwzBDuNT6dxvYRXqOT CEVDB+YVnvTTiFUkk5kNNb2yN7ANz4m7tdxSk+Hu/ZG2RFVBWzVJRBBcqBq0woNjCuIj apNPLT3YzRHIxQeyjuSulaUzuTqT4SdC2Zg/j/EQLzHQt/sIhnXN2evYU3NVRNpFryLY QAyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q1T8M/4Hes3NzluLQXBUJj6LcT4nx2E+5/+ymNCi9rc=; b=bXlHKSY9lxJzyls//bfkr7hbg1IkZfyjwf6BfzDFJk9XTjggNEXVJeEkdLmTkObuC9 XJ2Qm2J8p2DZ9puvFdkk8zO0bcWc9cwyTLJ7rMsdrULYxe4ep8BMCFw4Fg5/WpnqBD7T EwLRxEB9eFv5ok5BraSrHuTFPVGAa5pKdzwcbHz1WJ6VUNi653/ni9FH+PLUMNfRrMFY PlN/JGIvi7b8gI5zWxwPLZaZxqqO0yhmhF4L1h3YW7dNOlfoHMeaI4793Rxlk25ouBy6 IDLcAC7yznZ/ZMvExqXTLZeXpTM2ddneSR4IHIoxslPMw13mdW3l4c/2ZIG13LG6kUxV Q5Jg== X-Gm-Message-State: AOAM5305EvQJtqTVISSCFsxVCEecslhMI3Jte9YiPbkJzpvSSfYKheUT MHkTqUf4ojljoY0TGp8gPZ1FOjzwMqqguKn7QuKzeA== X-Received: by 2002:a4a:e153:: with SMTP id p19mr16412764oot.52.1618907567900; Tue, 20 Apr 2021 01:32:47 -0700 (PDT) MIME-Version: 1.0 References: <20210416222518.15801-1-nm@ti.com> In-Reply-To: <20210416222518.15801-1-nm@ti.com> From: Jens Wiklander Date: Tue, 20 Apr 2021 10:32:37 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: arm: firmware: Convert linaro,optee-tz to json schema To: Nishanth Menon Cc: Rob Herring , Linux Kernel Mailing List , Devicetree List , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 17, 2021 at 12:25 AM Nishanth Menon wrote: > > Convert linaro,optee-tz to json schema format for better documentation > and error checks. > > NOTE: > 1. This change does introduce a stricter naming convention for > optee nodes. > 2. We do have false positive checkpatch warning with this patch: > "DT binding docs and includes should be a separate patch" > > Signed-off-by: Nishanth Menon > --- > .../bindings/arm/firmware/linaro,optee-tz.txt | 31 ---------- > .../arm/firmware/linaro,optee-tz.yaml | 62 +++++++++++++++++++ > 2 files changed, 62 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..6513b5ac8b2c > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > @@ -0,0 +1,62 @@ > +# 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# Are these links supposed to work? Thanks, Jens > + > +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. > + > + We're using "linaro" as the first part of the compatible property for > + the reference implementation maintained by Linaro. > + > +properties: > + $nodename: > + const: 'optee' > + > + compatible: > + const: linaro,optee-tz > + > + method: > + description: The method of calling the OP-TEE Trusted OS. > + oneOf: > + - description: | > + SMC #0, with the register assignments specified > + in drivers/tee/optee/optee_smc.h > + items: > + - const: smc > + - description: | > + HVC #0, with the register assignments specified > + in drivers/tee/optee/optee_smc.h > + items: > + - const: hvc > + > +required: > + - compatible > + - method > + > +additionalProperties: false > + > +examples: > + - | > + firmware { > + optee { > + compatible = "linaro,optee-tz"; > + method = "smc"; > + }; > + }; > + > + - | > + firmware { > + optee { > + compatible = "linaro,optee-tz"; > + method = "hvc"; > + }; > + }; > -- > 2.31.0 >