From mboxrd@z Thu Jan 1 00:00:00 1970 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 DB9DEC4708E for ; Thu, 5 Jan 2023 20:26:55 +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:References:In-Reply-To: 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: List-Owner; bh=ZKOJl+hbvvx3Vh0VqC6JrB4WB8sa+47/8IhBx6qFrC4=; b=zP8N46UmsUwF6E sK9HPiMZK/skpKsUI81vGZl+dT1e3ZudA673dovNJfvZU0yfIPsb6HVCcts932JeJGYceiYc+dnn7 ZYXB7+wevB9nz76zVGLOI7tA/jwW0mLO7rERteZtL/UpY5s8YE7fmvRRCztc0DUqCumIz8CClqQFX 2V0XEBizCIrlOfb7IbZ6zQ3DVklsPPhe28T5KPEwIvmbZ59Nbb3kIn7f7wlKCiMI+aMRcXgFYpguc Xc9AFgU0vWuTMno4vL1V70FBmt40+NqQixmvddfplmtp29rjXJW91WyTCdcytMjJNpYvVECTo6S8c 8zM1O5Y2/m31u65nfxwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDWo7-00EWle-S8; Thu, 05 Jan 2023 20:25:48 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDO3Z-00BNML-6O for linux-arm-kernel@lists.infradead.org; Thu, 05 Jan 2023 11:05:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1672916709; x=1704452709; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ed+5TF4v3rGppdgT7usbWpyQEGylXfunnAdot9pn3no=; b=OB1ILm2L1qqmBd9r328a+jAy0zqr6r5SzwAZ9P1VJACEMSI7YYtDr6Hh bVIwg0PV4KDp0OcBFL7EE8vR9WGFunW0l1n6SHcXuJX/S7SjKoiERo3uo Y22aUfgtXxOkD38tZoMc9WoZqhmX65xYbRjR4XZQQ3uuVaQCsVR47obYW iM50UtvSSVVfSegwLNQMTs/uPpdKvxVyFY0Wc8X7+vBskZUvF6Dt8Kesj qHC8xP41+A32nXzIdUJ6x+p31IHmCyBbiIhdpMbos3MgfKRwwl8Vnol71 TKTJv8PmUOY0xbE2zQhZ3X8TFI48ZA23QgiF2TlCjHF5E8KUNSbB8Sl9c g==; X-IronPort-AV: E=Sophos;i="5.96,302,1665439200"; d="scan'208";a="28258308" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 05 Jan 2023 12:04:59 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 05 Jan 2023 12:05:02 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 05 Jan 2023 12:05:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1672916702; x=1704452702; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ed+5TF4v3rGppdgT7usbWpyQEGylXfunnAdot9pn3no=; b=i6Ib2erDmJ5SXk0os67kYkyiUB2PkgoIxuOHSLWzFHcIM2P2MBQa4ceK VgCxI6qRBiQmp+4nvE9i1hNhU2wnZexQymsrf1iipKV3HPWiJjfMd4Ds1 5+tNt/VXyqxHIj/ljlcBrAkK14JCxWc/1PaYuf4g2bTipVRINsM/CN6lu n1Hl29iPexdkLjjchFdOOUOZRIe8gx8D35SNI3L+FuCSESoFCWlCu8ge4 SYgbpw4KEyCQQ4Et3IZKrnACOkQx9AUyPXPGtF0I/4shh/kX7DLg4jN4o m+2tgXFovNv7MUj9XRKin8ujii2f+0zDtCagsZJJa61SSMy72m8O1aiz8 Q==; X-IronPort-AV: E=Sophos;i="5.96,302,1665439200"; d="scan'208";a="28258288" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 05 Jan 2023 12:04:55 +0100 Received: from steina-w.localnet (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 353E5280056; Thu, 5 Jan 2023 12:04:55 +0100 (CET) From: Alexander Stein To: Miquel Raynal , Michael Walle , Srinivas Kandagatla Cc: Jonathan Corbet , Rob Herring , Frank Rowand , Sascha Hauer , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH v5 00/21] nvmem: core: introduce NVMEM layouts Date: Thu, 05 Jan 2023 12:04:52 +0100 Message-ID: <2143916.GUh0CODmnK@steina-w> Organization: TQ-Systems GmbH In-Reply-To: References: <20221206200740.3567551-1-michael@walle.cc> <20230103163902.218cb5c7@xps-13> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230105_030509_661878_5B605A72 X-CRM114-Status: GOOD ( 35.45 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Dienstag, 3. Januar 2023, 16:51:31 CET schrieb Srinivas Kandagatla: > Hi Miquel, > > On 03/01/2023 15:39, Miquel Raynal wrote: > > Hi Srinivas, > > > > michael@walle.cc wrote on Tue, 6 Dec 2022 21:07:19 +0100: > >> This is now the third attempt to fetch the MAC addresses from the VPD > >> for the Kontron sl28 boards. Previous discussions can be found here: > >> https://lore.kernel.org/lkml/20211228142549.1275412-1-michael@walle.cc/ > >> > >> > >> NVMEM cells are typically added by board code or by the devicetree. But > >> as the cells get more complex, there is (valid) push back from the > >> devicetree maintainers to not put that handling in the devicetree. > >> > >> Therefore, introduce NVMEM layouts. They operate on the NVMEM device and > >> can add cells during runtime. That way it is possible to add more complex > >> cells than it is possible right now with the offset/length/bits > >> description in the device tree. For example, you can have post processing > >> for individual cells (think of endian swapping, or ethernet offset > >> handling). > >> > >> The imx-ocotp driver is the only user of the global post processing hook, > >> convert it to nvmem layouts and drop the global post pocessing hook. > >> > >> For now, the layouts are selected by the device tree. But the idea is > >> that also board files or other drivers could set a layout. Although no > >> code for that exists yet. > >> > >> Thanks to Miquel, the device tree bindings are already approved and > >> merged. > >> > >> NVMEM layouts as modules? > >> While possible in principle, it doesn't make any sense because the NVMEM > >> core can't be compiled as a module. The layouts needs to be available at > >> probe time. (That is also the reason why they get registered with > >> subsys_initcall().) So if the NVMEM core would be a module, the layouts > >> could be modules, too. > > > > I believe this series still applies even though -rc1 (and -rc2) are out > > now, may we know if you consider merging it anytime soon or if there > > are still discrepancies in the implementation you would like to > > discuss? Otherwise I would really like to see this laying in -next a > > few weeks before being sent out to Linus, just in case. > > Thanks for the work! > > Lets get some testing in -next. This causes the following errors on existing boards (imx8mq-tqma8mq- mba8mx.dtb): root@tqma8-common:~# uname -r 6.2.0-rc2-next-20230105 > OF: /soc@0: could not get #nvmem-cell-cells for /soc@0/bus@30000000/ efuse@30350000/soc-uid@4 > OF: /soc@0/bus@30800000/ethernet@30be0000: could not get #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/mac-address@90 These are caused because '#nvmem-cell-cells = <0>;' is not explicitly set in DT. > TI DP83867 30be0000.ethernet-1:0e: error -EINVAL: failed to get nvmem cell io_impedance_ctrl > TI DP83867: probe of 30be0000.ethernet-1:0e failed with error -22 These are caused because of_nvmem_cell_get() now returns -EINVAL instead of - ENODEV if the requested nvmem cell is not available. Best regards, Alexander _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel