From patchwork Fri Nov 4 16:38:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13032355 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 9DEC0C4332F for ; Fri, 4 Nov 2022 16:40:25 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5wZpuuDRHh8o/wrC5iWgc8kkJeYKckDP0K+oEt/pDV8=; b=rUt9ph3tQl3DL9 HmlAYao1JY7IS3bAZNyjcmIZBvbB62nXh+KCUjJztSYQfsWctn2WGS5S8MUdFmj3H7XYcwF4olLVb S1xRSIr9pgYI2gUGeuOZz7/4k4nXJ07+1W5xKyQr/W1Sbgiaosub6RKuvgYxm3NVmsJtzTPnt06yk IgDdFup5g8EBrCmtD9Leqw86kzKqWvfd2N5333kB2jJ8120QBGBBS85+eCOFWwsOS9CCdX49xSXq4 UzJb0OLMO4QFKXyZsSeTiEnmYCLJksbhrookp9LVW+8WcNDUhWKAW5Lm6k55Vgj2VHY4iXv0ZUBQI 1G+YyEDhlZvjJhfPETag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqzix-004SOs-Q5; Fri, 04 Nov 2022 16:39:19 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqziM-004S8l-Hb for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 16:38:45 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id D5003C0004; Fri, 4 Nov 2022 16:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1667579915; 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-type: content-transfer-encoding:content-transfer-encoding; bh=e9XKbe2mUkU1EoIARk/XvvxHVyrHP8xE0gIy/lmQxXA=; b=KB7Fp9zuC/EYFOWRALKkPfEfxYDcoTiHGV/qk2YYJITg9bTX71VBVidxLZeKrXlkBVeTE0 CVE8HOwuYSUB6SAhXirCD2gyIKNJM9jvZYtglktmK6kxGb+0PRcoSYa85dVbFGJEAhHhRV 8TD/fZoyLSJBw3C3rlEabcUKK/NzERPfYXgEL0G7TOW6GjkYiqwMSwiKvogKfh0yme024K R197zicfdH44NXKG1qFWZIojGqwDm5WH3SwOpYr0Vf6nNMYmGa+zVj+SvxR2apGN8eEWvz hSJoW1Cc0lDrWvNyHFCqHbsi1YSyTbNA0XMv7F3++tQ1NMrw9eF2ARvDB4KxPA== From: Miquel Raynal To: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org Cc: Srinivas Kandagatla , , Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , , Bartosz Golaszewski , Christian Eggers , Cory Tusar , Miquel Raynal Subject: [PATCH v3 0/6] Bindings for NVMEM layouts Date: Fri, 4 Nov 2022 17:38:27 +0100 Message-Id: <20221104163833.1289857-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221104_093842_918501_12893F2F X-CRM114-Status: GOOD ( 12.94 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, A month ago, Michael was sending a new iteration of his series bringing nvmem layout support. The idea is: we currently can produce nvmem cells statically defined on top of nvmem devices (which themselves may be MTD devices sometimes) but in some cases we may need more advanced parsing, which is possible thanks to the introduction of nvmem layout parsers. I am not taking over the entire series but I recently tried to make use of these layouts for the ONIE tlv table layout and Rob (rightfully) pointed out that the description was messy, because of the mix between nvmem devices and nvmem parsers. This was known to Michael which initially argued that it was simpler to handle like that. So here is a new proposal for the bindings which is described in details within "dt-bindings: nvmem: Introduce the nvmem-layout container". The idea to avoid mixing different node contents is to use a container node when relevant (suggested by Rob) which I named nvmem-layout. This container will have a compatible that describes the parser (plus possible additional properties). Michael, I have a few fixup! patches which apply directly to your former series in order to support this additional container. I propose we first settle the bindings (including the two direct use cases as examples) and once merged, we can move forward and respin both the nvmem series + the layout drivers. # Original series (v2) from Michael Link: https://lore.kernel.org/linux-arm-kernel/20220921115813.208ff789@xps-13/T/#mb97d5376647ff3e686b9c55e3d5e0dc80879e84a Cheers, Miquèl Michael Walle (1): dt-bindings: nvmem: add YAML schema for the sl28 vpd layout Miquel Raynal (5): dt-bindings: nvmem: Fix example dt-bindings: nvmem: Introduce the nvmem-layout container dt-bindings: eeprom: Inherit from nvmem.yaml dt-bindings: vendor-prefixes: Add ONIE dt-bindings: nvmem: add YAML schema for the ONIE tlv layout .../devicetree/bindings/eeprom/at24.yaml | 5 +- .../devicetree/bindings/eeprom/at25.yaml | 1 + .../bindings/eeprom/microchip,93lc46b.yaml | 1 + .../nvmem/layouts/kontron,sl28-vpd.yaml | 60 +++++++++ .../bindings/nvmem/layouts/nvmem-layout.yaml | 34 ++++++ .../nvmem/layouts/onie,tlv-layout.yaml | 115 ++++++++++++++++++ .../devicetree/bindings/nvmem/nvmem.yaml | 8 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + 8 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/kontron,sl28-vpd.yaml create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/onie,tlv-layout.yaml