Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp167994rwb; Thu, 17 Nov 2022 22:54:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf46VRVpiDHx3p835Ba/w+zqAyp0f1qlwTckIBYfzla/FkH5OxZcZoGb7aFFI9J+cIxMf3Ls X-Received: by 2002:a63:5a56:0:b0:46e:9bac:17f with SMTP id k22-20020a635a56000000b0046e9bac017fmr5357690pgm.420.1668754488222; Thu, 17 Nov 2022 22:54:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668754488; cv=none; d=google.com; s=arc-20160816; b=sYyiZzYgfPuCEFkX2XLuA7sJ4sbYEJ/alMHvv57T+prp6Uji1UEkO9TFDkXqFhfVR3 FqwUZdynmHYTcgHUnActgQC+M56kY43vE16PJNDPrNOewYUKKyDUHjs26GoeGueWwsqh JTQ7RfvnnQSzdPN/Ks6EhNs599IZ7k8d85LNHBf2/G90HhLg4F+gHm5IqnEOCJY/BTsC MuOSYeI2I155mB/cXT3AA+9Kf+zrRknOX40ohxFmrOPKKUoN4Pho7Tus8r9bKJiBHMXc 2UYRQZsumjvqmL64dv9lvw2ok4NWmlyqGrxslnjcvQBqjOBBXlun70CCLkAZjUE+KLFt FJew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Bj0RYfTA9vPDpy3KmDK11XXmVUXWJHQPReToyWDFygo=; b=NpUBLaKNIANFDoxbHkj/lmhSQLws+QrLFIgXhnfPrm99NQ42wFMSQOQ7QkKlOP6Sd7 DVVNwuMYlBYd8BMZUbZ8+bisPXDd2kGfkf6EcCO+k9fpdELVYSXnifn6Ri8nlKS+AMET cX7yMxmf8xgkjUcLZMIle8elNHMYYwZl/XdGhiL7pCc4+pUqK602iN/atBRcic0l+i+g O6HOobzxA1UD4FWcVvyyETMh+7tC41kLA02JCYhZSNQJK94xV+4WoLIqqnfhYiXqPC7u UKqHyWyr6wOdHFcgJebpjpWWw0JOdOR8biiAls8/TUdKPEc5Rnq+bBpF6KsmiIMj0Y8R FYRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=de8GdCUw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a17090276cb00b001782bd6c443si2575374plt.621.2022.11.17.22.54.36; Thu, 17 Nov 2022 22:54:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=de8GdCUw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S241223AbiKRGlR (ORCPT + 91 others); Fri, 18 Nov 2022 01:41:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241232AbiKRGkW (ORCPT ); Fri, 18 Nov 2022 01:40:22 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A24EE9B3A6 for ; Thu, 17 Nov 2022 22:40:09 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id i186-20020a1c3bc3000000b003cfe29a5733so6819313wma.3 for ; Thu, 17 Nov 2022 22:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Bj0RYfTA9vPDpy3KmDK11XXmVUXWJHQPReToyWDFygo=; b=de8GdCUwkA8s4uu+/K0FIEh27UTpRIvYKXMzz3TzGX79tBSPeTsxhSX4HQ+OOPXF8a IZW+lCbgmDktjP6ljFP+OHB14DLqrXJjYYJy0omWX4XAz7QZ9mQcxQwccE8+u43Z0W1m vf9siDzhh52qPQG89HpAe33UCpMIC18n4zN8H7cE84b3bqgNI/IR8J4CRplPI5D1l6fZ umun//DdS+huTNnqMVHGT1pNKRbbFPekRu5Rc+LMOLB+so3y1KGYKJMUWU4wNuvBgKB7 Le5c32D3F+sGDiuD9p+NuOA9LKjvpBh1bqsjRi3wQY/byI41dYopQjdfantNgekttDOg sT0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bj0RYfTA9vPDpy3KmDK11XXmVUXWJHQPReToyWDFygo=; b=yfgOF8tkgA9JP8Mj/KdVHJwZkYKkT02FLrBBenlrslFPWRNuH+htVBa7BoraToL/J+ Ggfkc5oA0yKTFJoG3k23Ib0I5Qcl/nlnYidwgdB2EsrQ/OT2HAYBcQnSto2FO18LNv7o K5o8hgomayH9LVRfKjO6NFCuggR8v0zEO9bIf2JaP7SjOVWseSrnV8vk4crWDR5sdPqI dS0eGVp/vHop3hO8gZuQ/GHEeGyo2ajGCpJBeRw0F32a+JyYmY8GOGKAIkg2/kyn52tL Q3KfR8mCKfTIWjRZpjyHq7ArpUkDKxPweH3QHiOuEl9wDeuTbQX3/O8Zb5pdvG+ExqOM HDJg== X-Gm-Message-State: ANoB5pmt9vaUH/LizgAYkLlo++BP+DclrpsZcR4Kz71QykVyr/TgDmnY K90d8KNhRYRQO5J4IqJc3EHAsA== X-Received: by 2002:a7b:c3c9:0:b0:3cf:5442:bbe with SMTP id t9-20020a7bc3c9000000b003cf54420bbemr7562440wmj.2.1668753609224; Thu, 17 Nov 2022 22:40:09 -0800 (PST) Received: from localhost.localdomain ([167.98.215.174]) by smtp.gmail.com with ESMTPSA id j13-20020adff54d000000b0023655e51c33sm2785902wrp.4.2022.11.17.22.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 22:40:08 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Miquel Raynal , Rob Herring , Srinivas Kandagatla Subject: [PATCH 13/13] dt-bindings: nvmem: add YAML schema for the ONIE tlv layout Date: Fri, 18 Nov 2022 06:39:32 +0000 Message-Id: <20221118063932.6418-14-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221118063932.6418-1-srinivas.kandagatla@linaro.org> References: <20221118063932.6418-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miquel Raynal Add a schema for the ONIE tlv NVMEM layout that can be found on any ONIE compatible networking device. Describe all the possible NVMEM cells that can be produced by this layout parser. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla --- .../bindings/nvmem/layouts/nvmem-layout.yaml | 1 + .../nvmem/layouts/onie,tlv-layout.yaml | 147 ++++++++++++++++++ 2 files changed, 148 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..5a0e7671aa3f --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.yaml @@ -0,0 +1,147 @@ +# 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. + +select: false + +properties: + compatible: + const: onie,tlv-layout + + product-name: + type: object + additionalProperties: false + + part-number: + type: object + additionalProperties: false + + serial-number: + type: object + additionalProperties: false + + 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: + type: object + additionalProperties: false + + device-version: + type: object + additionalProperties: false + + label-revision: + type: object + additionalProperties: false + + platforn-name: + type: object + additionalProperties: false + + onie-version: + type: object + additionalProperties: false + + num-macs: + type: object + additionalProperties: false + + manufacturer: + type: object + additionalProperties: false + + country-code: + type: object + additionalProperties: false + + vendor: + type: object + additionalProperties: false + + diag-version: + type: object + additionalProperties: false + + service-tag: + type: object + additionalProperties: false + + vendor-extension: + type: object + additionalProperties: false + +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.25.1