From nobody Thu Apr 9 12:22:13 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