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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2A63C4332F for ; Thu, 10 Nov 2022 04:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JSdxMx3ZqyLO2qniXwTMQe9G2KH+IAJIYvOURazIF7U=; b=JH4SrP5+QCfH58 FyCEXLCeqXEz6DbiAslkzdIinqDgEtNzSH5yaZo3FViGp4ogmu5g1khoMn1KUgldNBDD3kwkajaDF mKAINEE6oL6A8oFyHsAUBsWNdhRiILfHGi2qwiSXEawWGa/ezIFlsA/FPUpxX9PRGz+Goq6ckrniE BCADfymQGqrHOGpmkLffRz5LLxb9QYG0oqh4Z8izEVWwq+EvokcGnXlk/WrjRfnSQJ2qbo+TNV+Zq QQjhClVMrGJGg6M0P/WQnj0WKYPWI8lYPPFkanDBa3qp7QuFPN680il/PSYikCegdeBq3PSTBwgJ5 rEj+kvfGQKQahKeDjgXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osykO-002VgP-6n; Thu, 10 Nov 2022 04:01:00 +0000 Received: from mail-oa1-f53.google.com ([209.85.160.53]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osykJ-002VcV-5M for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 04:00:58 +0000 Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-13b6c1c89bdso952852fac.13 for ; Wed, 09 Nov 2022 20:00:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6cl67aM0A8kGCsNU3bcMg/7JOPhSo1g2SCxTElIolKU=; b=2cxSZdqr+XI5ANhBQGQn5vAkpE1+nQM8UE6n/tmvNpHn+JZCIxs73ZzdQBUlqueL3p juIJV3eWTqw2xl2nr/guDeizpJnQn8cge+GkMzJRLJTDp54OEoiDR+0IUrjX0qot5T9N aAx2TrHP7lDqLHn6I5pnBtxrSxEJB8BzXDBdcGG2bliEOYBR4DQx4xUn3TM7GpM6CcRr Uxs3WuG7BpTZOdqMKCL20Mbi1N16fh0dN447JzVGJq4nnlKkFuGuGYhG26cqm2hyHlJu NyMRvABvuSrPdJegB/rbVu/CRdR/eOpyow/KHlMblCWLk7ETcCqdNWyqU7UelGrKdRfM fQFQ== X-Gm-Message-State: ACrzQf168ifMUxu+dlfDC9LcE5O6RgNEM5VP68T1/Qph3qR/kKyfeI7o w15uE08xOZsBvbuFk0nAcw== X-Google-Smtp-Source: AMsMyM4XoNOIKGVSS0bQjbFxmDKYAfgcx2uRNlK04pww5KVRKRTVn3dv2hl11PBsH0G7DwvoWgs5nw== X-Received: by 2002:a05:6870:4188:b0:12d:484a:2592 with SMTP id y8-20020a056870418800b0012d484a2592mr46671854oac.5.1668052853778; Wed, 09 Nov 2022 20:00:53 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id er33-20020a056870c8a100b00131c3d4d38fsm7002740oab.39.2022.11.09.20.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 20:00:53 -0800 (PST) Received: (nullmailer pid 3448323 invoked by uid 1000); Thu, 10 Nov 2022 04:00:55 -0000 Date: Wed, 9 Nov 2022 22:00:55 -0600 From: Rob Herring To: Miquel Raynal Cc: Krzysztof Kozlowski , devicetree@vger.kernel.org, Srinivas Kandagatla , linux-kernel@vger.kernel.org, Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski , Christian Eggers , Cory Tusar Subject: Re: [PATCH v3 6/6] dt-bindings: nvmem: add YAML schema for the ONIE tlv layout Message-ID: <20221110040055.GA3436769-robh@kernel.org> References: <20221104163833.1289857-1-miquel.raynal@bootlin.com> <20221104163833.1289857-7-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221104163833.1289857-7-miquel.raynal@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_200055_227717_5B75C2C1 X-CRM114-Status: GOOD ( 22.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 04, 2022 at 05:38:33PM +0100, Miquel Raynal wrote: > Add a schema for the ONIE tlv NVMEM layout that can be found on any ONIE > compatible networking device. > > Signed-off-by: Miquel Raynal > --- > .../bindings/nvmem/layouts/nvmem-layout.yaml | 1 + > .../nvmem/layouts/onie,tlv-layout.yaml | 115 ++++++++++++++++++ > 2 files changed, 116 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.yaml > > diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml > index f64ea2fa362d..8512ee538c4c 100644 > --- a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml > +++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml > @@ -19,6 +19,7 @@ description: | > > oneOf: > - $ref: kontron,sl28-vpd.yaml > + - $ref: onie,tlv-layout.yaml > > properties: > compatible: true > diff --git a/Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.yaml b/Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.yaml > new file mode 100644 > index 000000000000..1d91277324ac > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.yaml > @@ -0,0 +1,115 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/nvmem/layouts/onie,tlv-layout.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVMEM layout of the ONIE tlv table > + > +maintainers: > + - Miquel Raynal > + > +description: > + Modern networking hardware implementing the Open Compute Project ONIE > + infrastructure shall provide a non-volatile memory with a table whose the > + content is well specified and gives many information about the manufacturer > + (name, country of manufacture, etc) as well as device caracteristics (serial > + number, hardware version, mac addresses, etc). The underlaying device type > + (flash, EEPROM,...) is not specified. The exact location of each value is also > + dynamic and should be discovered at run time because it depends on the > + parameters the manufacturer decided to embed. > + > +properties: > + compatible: > + const: onie,tlv-layout > + > + product-name: true This is a node? If so, you need: type: object additionalProperties: false > + > + part-number: true > + > + serial-number: true > + > + mac-address: > + type: object > + description: > + Base MAC address for all on-module network interfaces. The first > + argument of the phandle will be treated as an offset. > + > + properties: > + "#nvmem-cell-cells": > + const: 1 > + > + additionalProperties: false > + > + manufacture-date: true > + > + device-version: true > + > + label-revision: true > + > + platforn-name: true > + > + onie-version: true > + > + num-macs: true > + > + manufacturer: true > + > + country-code: true > + > + vendor: true > + > + diag-version: true > + > + service-tag: true > + > + vendor-extension: true > + > +required: > + - compatible > + > +additionalProperties: false > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + eeprom@56 { > + compatible = "atmel,24c64"; > + read-only; > + reg = <0x56>; > + > + nvmem-layout { > + compatible = "onie,tlv-layout"; > + > + serial-number { > + }; > + }; > + }; > + }; > + > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + flash@0 { > + compatible = "m25p80", "jedec,spi-nor"; > + reg = <0>; > + > + otp { > + compatible = "user-otp"; > + > + nvmem-layout { > + compatible = "onie,tlv-layout"; > + > + mac-address { > + #nvmem-cell-cells = <1>; > + }; > + }; > + }; > + }; > + }; > +... > -- > 2.34.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel