Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A163CC433FE for ; Wed, 15 Dec 2021 20:26:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235850AbhLOU0L (ORCPT ); Wed, 15 Dec 2021 15:26:11 -0500 Received: from mail-oi1-f179.google.com ([209.85.167.179]:36463 "EHLO mail-oi1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231725AbhLOU0K (ORCPT ); Wed, 15 Dec 2021 15:26:10 -0500 Received: by mail-oi1-f179.google.com with SMTP id t23so33310492oiw.3; Wed, 15 Dec 2021 12:26:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iG0u57kunifdWBtvwJx/znGD9pCdWnk87JXPiNNnr3g=; b=GouGxrE23uZJRhx+JkyT6tbRUx8bryuCWz11K7of106E9mGRTDYi8DHbsAJm5sJ3bS n+WJbpRtLgRMogrg8UW//cMQ/JVyEE/OmO2ryBNeshJdvRG5vyWLoFL+ls6Z1X9Cpry3 jMXobdnsymDHzH+QAta/CIh+vhcpi7a33WmQ85XFy+e+R5pMYWlrtS19oBL8AKrqi02+ AAHtmAD4GRPfz3J+Tpju9CEbmOR8Qlf4OVpGUjVM+dP9pEUgMTNiFNe9inA2/Vih6XEZ Ynh7JhhcgxnZQrfCszsde8GIDaG6B9s7PKXA/9KhQn4RAKbM1T2dA9J5CPk4hTWHNrb2 iLCA== X-Gm-Message-State: AOAM533l/xy6ONwbTGx/JvuVDjwOTB9O8qpj0wIAfL2KfYMcAj77Or9M C4E/XFZxu1VHLrfUg9+Jrg== X-Google-Smtp-Source: ABdhPJxJaNg3Ku//Xg6t7XA/x0vvFJciwrOVFVrPBvOGQ/pHUbHe33Mstx8XZwWj+AIWef4HqmWYRA== X-Received: by 2002:a05:6808:2111:: with SMTP id r17mr1492778oiw.118.1639599969681; Wed, 15 Dec 2021 12:26:09 -0800 (PST) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id bl33sm580563oib.47.2021.12.15.12.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 12:26:08 -0800 (PST) Received: (nullmailer pid 1779557 invoked by uid 1000); Wed, 15 Dec 2021 20:26:08 -0000 Date: Wed, 15 Dec 2021 14:26:08 -0600 From: Rob Herring To: David Brazdil Cc: Greg Kroah-Hartman , Arnd Bergmann , Will Deacon , Andrew Scull , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] dt-bindings: firmware: Add Open Profile for DICE Message-ID: References: <20211213195833.772892-1-dbrazdil@google.com> <20211213195833.772892-2-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211213195833.772892-2-dbrazdil@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 13, 2021 at 07:58:32PM +0000, David Brazdil wrote: > Add DeviceTree bindings for Open Profile for DICE, an open protocol for > measured boot. Firmware uses DICE to measure the hardware/software > combination and generates Compound Device Identifier (CDI) certificates. > These are stored in memory and the buffer is described in the DT as > a reserved memory region referenced by a compatible device node. > > Signed-off-by: David Brazdil > --- > .../bindings/firmware/google,open-dice.yaml | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/firmware/google,open-dice.yaml > > diff --git a/Documentation/devicetree/bindings/firmware/google,open-dice.yaml b/Documentation/devicetree/bindings/firmware/google,open-dice.yaml > new file mode 100644 > index 000000000000..1aa69f381b8c > --- /dev/null > +++ b/Documentation/devicetree/bindings/firmware/google,open-dice.yaml > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/firmware/google,open-dice.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Open Profile for DICE Device Tree Bindings > + > +description: | > + This binding represents a reserved memory region containing data > + generated by the Open Profile for DICE protocol. > + > + See https://pigweed.googlesource.com/open-dice/ > + > +maintainers: > + - David Brazdil > + > +properties: > + compatible: > + enum: > + - google,open-dice > + > + memory-region: > + maxItems: 1 > + description: | > + phandle to the reserved memory node to be associated with the device > + The reserved memory node should be defined as per the bindings, > + Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml > + > +required: > + - compatible > + - memory-region > + > +additionalProperties: false > + > +examples: > + - | > + reserved-memory { > + #address-cells = <2>; > + #size-cells = <1>; > + > + dice_reserved: dice@12340000 { > + reg = <0x00 0x12340000 0x2000>; > + no-map; > + }; > + }; > + > + dice { > + compatible = "google,open-dice"; > + memory-region = <&dice_reserved>; There's no need for this indirection. Just add the compatible to the dice@12340000 node. You can bind drivers to /reserved-memory nodes. Rob