From nobody Thu Apr 9 10:55:10 2026 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 D51C7C4332F for ; Mon, 14 Nov 2022 08:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236668AbiKNI5Z (ORCPT ); Mon, 14 Nov 2022 03:57:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236633AbiKNI5M (ORCPT ); Mon, 14 Nov 2022 03:57:12 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 214321CFD0; Mon, 14 Nov 2022 00:57:07 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id A3BD7100015; Mon, 14 Nov 2022 08:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668416226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O4AM4lnV2gTii8655Tt65FHVrgfOcRYc0nYRGkNgVIU=; b=cE42Y4nL5ZWwM04jmHinoEw182ECDCWr8074fPKIbaA9nslQ+lOlU4kVFfUBvxJgDRCArk Zsdc2lDWeh+91dWuH8MK5G7BusFAhaYO172IEE82WtMRnYw9/gwi//waUxhqxvfqOvoLRL h2PsW3ToZODKnqfE17qgxFEuexMH2I99bCGYS9RYerYuLnhlPmJxOmmn3Wk8HqGToZJAze IVIJbxT1fiXJaSD58Lv3gQ4accNTXVkvZmqryvdQys4TYR1RuFthpW+wTkutjz2P9RpBiB qLdRuQFqcv5uV+D3WLru1wo+K97fcpGN2hkZtZhVlicu/ZZBqJV91dlSGrSgPw== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Bartosz Golaszewski , Srinivas Kandagatla , , Miquel Raynal Subject: [PATCH v4 1/5] dt-bindings: nvmem: Introduce the nvmem-layout container Date: Mon, 14 Nov 2022 09:56:55 +0100 Message-Id: <20221114085659.847611-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221114085659.847611-1-miquel.raynal@bootlin.com> References: <20221114085659.847611-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The nvmem devices description works like this: * Most cases (EEPROM & co): eeprom@x { compatible =3D ""; ... }; * MTD case: flash@y { compatible =3D ""; ... otp { compatible =3D "user-otp"; /* or "factory-otp" */ ... }; }; In the former case, the nvmem device is "eeprom@x", while in the latter case the nvmem device is "otp". Nvmem devices can produce nvmem cells. The current way to describe nvmem cells is to locate them by providing their static byte and bit offset and length. These information are stored in subnodes of the nvmem device. It is now a fact that such description does not fit more advanced use cases where the location or the size of the cells may vary. There are currently three known situations which require being described differently: Kontron's SL28 VPD, ONIE's TLV table and U-Boot's environment variables. Hence, we need a way to describe the parsers that must be used in order to make the dynamic discovery of the nvmem cells. This new description must fit both use cases (the generic situation and the MTD case). Let's create in both cases a container node named nvmem-layout whose content will depend on the parser. Right now nvmem-layout.yaml is "empty", but references to additional layout parser bindings will be inserted in the near future. The final goal being something that looks like: * Most cases (EEPROM & co): eeprom@x { compatible =3D ""; ... nvmem-layout { compatible =3D ""; ... }; }; * MTD case: flash@y { compatible =3D ""; ... otp { compatible =3D "user-otp"; /* or "factory-otp" */ ... nvmem-layout { compatible =3D ""; ... }; }; }; Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring --- .../bindings/nvmem/layouts/nvmem-layout.yaml | 30 +++++++++++++++++++ .../devicetree/bindings/nvmem/nvmem.yaml | 7 +++++ 2 files changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/nvmem-l= ayout.yaml diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.y= aml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml new file mode 100644 index 000000000000..ecc7c37cbc1f --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/layouts/nvmem-layout.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVMEM (Non Volatile Memory) layouts + +maintainers: + - Srinivas Kandagatla + - Michael Walle + - Miquel Raynal + +description: | + Most NVMEM layouts are static and thus do not require additional descrip= tion + besides the bytes/bits offset and length. Other layouts can be less stat= ically + define and might require dynamic reading of the NVMEM device in order to + perform their parsing. The nvmem-layout container is here to describe th= ese. + +properties: + compatible: true + + '#address-cells': false + + '#size-cells': false + +required: + - compatible + +unevaluatedProperties: false diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documenta= tion/devicetree/bindings/nvmem/nvmem.yaml index 0455506fc30f..75bb93dda9df 100644 --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml @@ -39,6 +39,13 @@ properties: when it's driven low (logical '0') to allow writing. maxItems: 1 =20 + nvmem-layout: + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml + description: + Alternative to the statically defined nvmem cells, this + container may reference more advanced (dynamic) layout + parsers. + patternProperties: "@[0-9a-f]+(,[0-7])?$": type: object --=20 2.34.1 From nobody Thu Apr 9 10:55:10 2026 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 A8BACC433FE for ; Mon, 14 Nov 2022 08:57:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236677AbiKNI5d (ORCPT ); Mon, 14 Nov 2022 03:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236081AbiKNI5M (ORCPT ); Mon, 14 Nov 2022 03:57:12 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB801C401; Mon, 14 Nov 2022 00:57:09 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 8F3E410000B; Mon, 14 Nov 2022 08:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668416228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/RuwsiKOoT3RSiv0ATWGMePKlt2FePql8/L/NJA2t6w=; b=drBSkcHiGiZIoU8VLro96xlsTfAl0dgPYa0+Cv2zh2EBC5K124WsKrQdPmfcQOFl0KPpH9 kk7VpvjLl56WgiMO2s+9X5RZXZ9UR/W6prHjQzSMtYwzA8KiCwQitzldAmX9ix4xGJpNBt RwOl9o359I8aEN0wYn/OOdNsIExx2lxZRGboJEEwZqtS/yq0B8H1IGvTAuZhWvIvKjtHfp roS++IRFlm58JFSDVQX/IXx8PyHpJJ0WbxrkQ/bHbR+lTUtOB4H7FgXtx7P1N64VgAL7k0 6JXj+bA3XwjwvPIlN6s5/0Wn571UgTE4KL00ISuTF9L2TmmoEto6bOzuZB4ZYQ== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Bartosz Golaszewski , Srinivas Kandagatla , , Miquel Raynal Subject: [PATCH v4 2/5] dt-bindings: eeprom: Inherit from nvmem.yaml Date: Mon, 14 Nov 2022 09:56:56 +0100 Message-Id: <20221114085659.847611-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221114085659.847611-1-miquel.raynal@bootlin.com> References: <20221114085659.847611-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" EEPROMs can be nvmem providers. Let's make all EEPROM bindings reference nvmem.yaml as they should, so that nvmem cells and layout parsers can be safely described within the EEPROM nodes. Signed-off-by: Miquel Raynal Acked-by: Bartosz Golaszewski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/eeprom/at24.yaml | 5 ++++- Documentation/devicetree/bindings/eeprom/at25.yaml | 1 + .../devicetree/bindings/eeprom/microchip,93lc46b.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documenta= tion/devicetree/bindings/eeprom/at24.yaml index d14e0accbda8..84af0d5f52aa 100644 --- a/Documentation/devicetree/bindings/eeprom/at24.yaml +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml @@ -10,6 +10,9 @@ title: I2C EEPROMs compatible with Atmel's AT24 maintainers: - Bartosz Golaszewski =20 +allOf: + - $ref: /schemas/nvmem/nvmem.yaml + select: properties: compatible: @@ -183,7 +186,7 @@ required: - compatible - reg =20 -additionalProperties: false +unevaluatedProperties: false =20 examples: - | diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documenta= tion/devicetree/bindings/eeprom/at25.yaml index 8b1c997caac1..0f5a8ef996d3 100644 --- a/Documentation/devicetree/bindings/eeprom/at25.yaml +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml @@ -104,6 +104,7 @@ required: =20 allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# + - $ref: /schemas/nvmem/nvmem.yaml - if: properties: compatible: diff --git a/Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yam= l b/Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml index 0c2f5ddb79c5..64cfd971c9c5 100644 --- a/Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml +++ b/Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml @@ -47,6 +47,7 @@ required: =20 allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# + - $ref: /schemas/nvmem/nvmem.yaml =20 unevaluatedProperties: false =20 --=20 2.34.1 From nobody Thu Apr 9 10:55:10 2026 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 D81A9C4332F for ; Mon, 14 Nov 2022 08:57:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236682AbiKNI5g (ORCPT ); Mon, 14 Nov 2022 03:57:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236625AbiKNI5O (ORCPT ); Mon, 14 Nov 2022 03:57:14 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A4671CB0A; Mon, 14 Nov 2022 00:57:11 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 940C010000C; Mon, 14 Nov 2022 08:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668416229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BikeLvIio/JhCmemxXGK6Tb6BR276xdjdIvpKahReNo=; b=YgayJyWyPZfnFptl1bLMKNITwUQ25vhC/3TGcCwAe0psbOYG5CFVBeATP2+0RMaTRlZKLF DO7aYXY1gguBDzioOOMQNXgXubUsLA7GpfehuEvb7jQr9TGbT7QsJuz580UzSpC9cPYygJ EJtjZozHNpvGkY/kB77Hk2D4UxZJVnY/0JdJ+EIygIZvzDyoAUrTQvNvps79wHlQ/F432C dsG1Q1AegM4+zo4ZS1yZmccdeEyEhuc2DPXjb+GE45D3uaXsyOKWpVp6qewgSXaynEv75d n7i7NzrlL/7XQIuk72Gkhs0gZ6P/go8nksf2tzDpTv/BHwgE+jiM5/rq+fKOSw== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Bartosz Golaszewski , Srinivas Kandagatla , , Miquel Raynal Subject: [PATCH v4 3/5] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout Date: Mon, 14 Nov 2022 09:56:57 +0100 Message-Id: <20221114085659.847611-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221114085659.847611-1-miquel.raynal@bootlin.com> References: <20221114085659.847611-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Michael Walle Add a schema for the NVMEM layout on Kontron's sl28 boards. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring --- .../nvmem/layouts/kontron,sl28-vpd.yaml | 62 +++++++++++++++++++ .../bindings/nvmem/layouts/nvmem-layout.yaml | 3 + 2 files changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/kontron= ,sl28-vpd.yaml diff --git a/Documentation/devicetree/bindings/nvmem/layouts/kontron,sl28-v= pd.yaml b/Documentation/devicetree/bindings/nvmem/layouts/kontron,sl28-vpd.= yaml new file mode 100644 index 000000000000..fef795e79c36 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/layouts/kontron,sl28-vpd.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/layouts/kontron,sl28-vpd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVMEM layout of the Kontron SMARC-sAL28 vital product data + +maintainers: + - Michael Walle + +description: + The vital product data (VPD) of the sl28 boards contains a serial + number and a base MAC address. The actual MAC addresses for the + on-board ethernet devices are derived from this base MAC address by + adding an offset. + +select: false + +properties: + compatible: + const: kontron,sl28-vpd + + serial-number: + type: object + description: The board's serial number + + base-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 + +required: + - compatible + +additionalProperties: false + +examples: + - | + otp-1 { + compatible =3D "user-otp"; + + nvmem-layout { + compatible =3D "kontron,sl28-vpd"; + + serial_number: serial-number { + }; + + base_mac_address: base-mac-address { + #nvmem-cell-cells =3D <1>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.y= aml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml index ecc7c37cbc1f..f64ea2fa362d 100644 --- a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml +++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml @@ -17,6 +17,9 @@ description: | define and might require dynamic reading of the NVMEM device in order to perform their parsing. The nvmem-layout container is here to describe th= ese. =20 +oneOf: + - $ref: kontron,sl28-vpd.yaml + properties: compatible: true =20 --=20 2.34.1 From nobody Thu Apr 9 10:55:10 2026 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 0B2B4C4332F for ; Mon, 14 Nov 2022 08:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236717AbiKNI5s (ORCPT ); Mon, 14 Nov 2022 03:57:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236649AbiKNI5P (ORCPT ); Mon, 14 Nov 2022 03:57:15 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 157B21CFE7; Mon, 14 Nov 2022 00:57:12 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 145B910000A; Mon, 14 Nov 2022 08:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668416231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PH1TaWI18OK/TWX9eI82Zyj07sQxLoh1aLVV4ESIk3Q=; b=FV57343RzuyqV9ECyUhRuzb68q4wvUf5r1ZryMT9Dt7M4PUKQkEeIDh+jygW8G/vs+L7QC /MCMF3ryQ7SkLtfi8WU3GFEUiuF+ttd2DiNkzcZnaJe1rr64eopFLMmcNqgrT0Mh4M8Fsl sxeJPEAKqUIR7zy6xKBzvnvLz02BlBH83RwK5zZS/6WDD4As/SWh5pRpU/tr00/4bt2kVw 68POKZpO+svRrphqzjVmvslf+x0vdIyw1VxZoFKBji+LzKIw8thflRaroEmPJpncQo7Vdf YAUVytnUYt2sC6gMmmNt7ywjJNBrl5Gr839gQOyFgp11F2Kbj0wnmobsB7BChA== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Bartosz Golaszewski , Srinivas Kandagatla , , Miquel Raynal , Rob Herring Subject: [PATCH v4 4/5] dt-bindings: vendor-prefixes: Add ONIE Date: Mon, 14 Nov 2022 09:56:58 +0100 Message-Id: <20221114085659.847611-5-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221114085659.847611-1-miquel.raynal@bootlin.com> References: <20221114085659.847611-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As described on their website (see link below), "The Open Network Install Environment (ONIE) is an open source initiative that defines an open =E2=80=9Cinstall environment=E2=80=9D f= or modern networking hardware." It is not a proper corporation per-se but rather more a group which tries to spread the use of open source standards in the networking hardware world. Link: https://opencomputeproject.github.io/onie/ Signed-off-by: Miquel Raynal Acked-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Docum= entation/devicetree/bindings/vendor-prefixes.yaml index 6e323a380294..65a74026cf2b 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -927,6 +927,8 @@ patternProperties: description: One Laptop Per Child "^oneplus,.*": description: OnePlus Technology (Shenzhen) Co., Ltd. + "^onie,.*": + description: Open Network Install Environment group "^onion,.*": description: Onion Corporation "^onnn,.*": --=20 2.34.1 From nobody Thu Apr 9 10:55:10 2026 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 4405AC4332F for ; Mon, 14 Nov 2022 08:57:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236667AbiKNI5u (ORCPT ); Mon, 14 Nov 2022 03:57:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236662AbiKNI5X (ORCPT ); Mon, 14 Nov 2022 03:57:23 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FED91CFF9; Mon, 14 Nov 2022 00:57:15 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DEABA100008; Mon, 14 Nov 2022 08:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1668416233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4HG/iT/mzETZVhKM6zL2vs6fGxz+0PlYq2xmoenZCzQ=; b=EE2EyoU2XiXxfqcb5iTj6B8Fx0GBBnzPeUpEidTGTu0cRaS/hm3IBaTeoocAa8NCp+tJOp hwsBz3GcxksSXT2WgC2hqrQ76AGhDIUF5ArdknTdPPqlbgdp6J2+IA25OZPy4uC00ax/VS AmQUHbrQjuxCImRZNjYbJVgyJuFQCKXK0Us6x3RBNK6yb/lA4Rz7IA2BeoUrAg1Mst/vf0 X6tf6pRAkCXVIbp/48/CVk+CaMiNbny6ZyCE5FrGtbX6m5lik8/SkN+3KDn24MZjHV+7pY L4SkKDj+3wG7oOHt+xjSfXwuV3CF7LFul1CgI7vVhzONJ2FYN+wkDUBZ8RXtsQ== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Bartosz Golaszewski , Srinivas Kandagatla , , Miquel Raynal Subject: [PATCH v4 5/5] dt-bindings: nvmem: add YAML schema for the ONIE tlv layout Date: Mon, 14 Nov 2022 09:56:59 +0100 Message-Id: <20221114085659.847611-6-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221114085659.847611-1-miquel.raynal@bootlin.com> References: <20221114085659.847611-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- .../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,tl= v-layout.yaml diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.y= aml 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: | =20 oneOf: - $ref: kontron,sl28-vpd.yaml + - $ref: onie,tlv-layout.yaml =20 properties: compatible: true diff --git a/Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layou= t.yaml b/Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.ya= ml 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 manufactu= rer + (name, country of manufacture, etc) as well as device caracteristics (se= rial + number, hardware version, mac addresses, etc). The underlaying device ty= pe + (flash, EEPROM,...) is not specified. The exact location of each value i= s 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 =3D <1>; + #size-cells =3D <0>; + + eeprom@56 { + compatible =3D "atmel,24c64"; + read-only; + reg =3D <0x56>; + + nvmem-layout { + compatible =3D "onie,tlv-layout"; + + serial-number { + }; + }; + }; + }; + + - | + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + flash@0 { + compatible =3D "m25p80", "jedec,spi-nor"; + reg =3D <0>; + + otp { + compatible =3D "user-otp"; + + nvmem-layout { + compatible =3D "onie,tlv-layout"; + + mac-address { + #nvmem-cell-cells =3D <1>; + }; + }; + }; + }; + }; +... --=20 2.34.1