Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5264407rwb; Mon, 14 Nov 2022 01:44:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf6b0BThybislAY6X9MHJ/qa8SjxqOW+7CX7m2/cGlSbvg/8809LXxdMava9dVP7bqx31FRX X-Received: by 2002:a17:906:3c08:b0:7ae:ec5c:a99e with SMTP id h8-20020a1709063c0800b007aeec5ca99emr4847535ejg.219.1668419065484; Mon, 14 Nov 2022 01:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668419065; cv=none; d=google.com; s=arc-20160816; b=zfTuEPaS4tFckt/Fu3RjVZV0M7L6bRPKxBAYQCdU2OCrMohDV38OEQaf2B3TGZSbyq itYMqmdQdjdryUcYpDJ1InB+D3KKV4RY57S0BGL6JEkgBP0bqmKzygTrROxJyEurN2k+ ZTMl/Jd7x/2Vakdd2LalwQ0QO8FBrHXOU9BVmfXSUnOzUaLma3xKpTC4HEmZKBwYs3YA 7HhPMEQrPXzKKj+fW5ylomFheFaXs1E5Uq9EcYGqBqMkOAXnw4wRPGZvjK8FiG0kAH+4 tBYISQXiQP90JZjWICa+v8SctRj9/tIiNwFYALLUryZCcUw/WtzbuJ2yNxziipOq7j/h 11uw== 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=BikeLvIio/JhCmemxXGK6Tb6BR276xdjdIvpKahReNo=; b=X+oemaARDzDPreEWVvJPYz6vISNP1GTvYSf2rDU1YdW7iApclL/li7NB0Rbme1++JU lu5/OMdwfeSfcgYvAZdAiBr3FxTlLghbmTgvVgs3ZRu0fZa8uFIh071ETLON9NLJUNFQ /gSJHmanmP10XOaPtWYL1OgHm/2hDgDTC72MpSZHSjkMtq9XuMwCjC72cRdlUErryYvh WSFjIrcbuWKsUiP0KtfktfZJ3Q7a4TjeX+9BTHdAHrQ1Fd1s7EO4RnrpsFUayCEXEN+l Lt5AG6xNYXtsf2+CYEVShD4I5uWQyRgtmrtRhnr//ap+BZ+TwrzoVQSrS13rL8jyXK3C yqnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YgayJyWy; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb2-20020a1709076d8200b00780e89aecd1si8767776ejc.849.2022.11.14.01.44.04; Mon, 14 Nov 2022 01:44:25 -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=@bootlin.com header.s=gm1 header.b=YgayJyWy; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236680AbiKNI5f (ORCPT + 88 others); Mon, 14 Nov 2022 03:57:35 -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: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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: Michael Walle Add a schema for the NVMEM layout on Kontron's sl28 boards. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal --- .../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-vpd.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 = "user-otp"; + + nvmem-layout { + compatible = "kontron,sl28-vpd"; + + serial_number: serial-number { + }; + + base_mac_address: base-mac-address { + #nvmem-cell-cells = <1>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml 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 these. +oneOf: + - $ref: kontron,sl28-vpd.yaml + properties: compatible: true -- 2.34.1