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 7289FC282DE for ; Thu, 6 Mar 2025 09:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; b=y4if6DunmVjdE5y4deKU6rsArq 0XILuHoMApYvLYXFMe7uxEASu52047EY9OOXNDhW0ctE1n2fDMtikf2j+rWecUVEZQY2vZAXkjC48 R82129dF1oh951WWlJaOtKJxWwbyYBvPgF1WlXu7hCo0rmtIkFo6Ou7c8Vkk4VXU9BwH3ScDxWCzl z8IsnbH143/vY+DD3zXZUV2LClhz0YghTz1ZjKUaR0grL6Cz/q9bPn26e1rSf6K6EIg4+Lti1K70R 2ePWeFFeGaQsXuz1z9Jviz/QK7PXaGh3YicWP7tBoaOaDndNu5vpx4vFrhGBgEVObYRs3aFL8ZO9K 8P/1Z7MA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tq7A7-0000000AQhr-3GNB; Thu, 06 Mar 2025 09:05:03 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq72A-0000000APPV-3WXO; Thu, 06 Mar 2025 08:56:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; b=k3byhzb00j7wIBgkXRuB3E8pTS /OQuf6LoqeNMJUOmIoB84peIoeaFfhwnL9Ps5VGAvTo8fqksJqagO5aOKcJRiV6UBMBeQN7vZ+u9v zzarYUAigIDkK4Tc9YeAwWk/AHoOauZ9BOyeoIxGRAajOddAt9MmcjXRbeZJwrq8r3Ew1yUJnr7f/ EeLtyuSImhORYXRbjeHRBhdAly6qv1RNUzQEyYA/A9ULL6kPa8S61uZV+7hESCnFSW+d/ei1Z6GqW 1X8eN7KPvqGLVPIALgm2thLbusDZ1TzTDASD2VvaQOMyoy0YWFfyR4PBs61mhJRe/0ElYOOydVfHg fnjKyHVQ==; Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq727-00000000yg6-295I; Thu, 06 Mar 2025 08:56:49 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 095C644346; Thu, 6 Mar 2025 08:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1741251403; 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=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; b=bcsa9PFyZi1TSiKo447e1/X2al16CgcgnqKVunZQwmCl3qnrX42lHDEfhvyrbmi8JXKkhB n46Csjqw3jAiRBM19KIhHdgmgeuOcDB9nXpJmo2rqQc6VkrgUp7DkciYqtcArEWHn73+zs vOaVZVP1a9rn2+5TNQVfaCcttQlc7xWDfaaCNHhImxl/3QrjVunzqykZTzJ+uZrQDZpbrk mQc62IoiFiU82VxHheDJGLNJIe17Q+EtySnPObBAlP183ahUQNB1rJMFzBM0rLgZNyf9gN ihY0C10PIAZEEmNNvFV5HSlCP3iqRxg87xIM0B21c1zjCt7p66avf6QbXYbKxg== From: Miquel Raynal To: "Michael Walle" Subject: Re: [PATCH 1/2] mtd: spi-nor: sst: register SFDP region into NVMEM framework to read MAC Address In-Reply-To: (Michael Walle's message of "Thu, 06 Mar 2025 09:39:31 +0100") References: <20250305100134.1171124-1-manikandan.m@microchip.com> <6fee6e71-106f-474b-9a0c-5df5fb0caa00@microchip.com> <87eczawo9q.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 06 Mar 2025 09:56:42 +0100 Message-ID: <87o6yev8ol.fsf@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejfedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhepofhiqhhuvghlucftrgihnhgrlhcuoehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeffgefhjedtfeeigeduudekudejkedtiefhleelueeiueevheekvdeludehiedvfeenucfkphepledtrdekledrudeifedruddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeltddrkeelrdduieefrdduvdejpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedujedprhgtphhtthhopehmfigrlhhlvgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepofgrnhhikhgrnhgurghnrdfosehmihgtrhhotghhihhprdgtohhmpdhrtghpthhtoheprhhosghhsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehkrhiikhdoughtsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegtohhnohhrodgutheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheppfhitgholhgrs hdrhfgvrhhrvgesmhhitghrohgthhhiphdrtghomhdprhgtphhtthhopegrlhgvgigrnhgurhgvrdgsvghllhhonhhisegsohhothhlihhnrdgtohhmpdhrtghpthhtoheptghlrghuughiuhdrsggviihnvggrsehtuhigohhnrdguvghv X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250306_085647_675902_C4E16664 X-CRM114-Status: GOOD ( 14.57 ) 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: , Cc: Manikandan.M@microchip.com, robh@kernel.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, vigneshr@ti.com, devicetree@vger.kernel.org, richard@nod.at, alexandre.belloni@bootlin.com, tudor.ambarus@linaro.org, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, claudiu.beznea@tuxon.dev, Varshini.Rajendran@microchip.com, krzk+dt@kernel.org, pratyush@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org >> >> I don't think it makes sense to have this one-off in a particular >> >> driver. If at all, this should be handled in the core. Sorry, but >> >> this really looks like an ugly hack. >> >>=20 >> > >> > Because the EUI identifier within the SFDP is unique to the=20 >> > SST26VF064BEUI flash, I opted to handle it here rather than in the cor= e. >> > >> > Also here the MAC address data resides within the 0x260-0x26F range, I= =20 >> > will resize the nvmem_config.size to 0x10 instead of registering the=20 >> > full SFDP region as NVMEM. >> >> Open question to all parties in this thread: how do we give an offset in >> the device tree that is relative to the sfdp region and not the data >> region? I believe we care not to mix these areas while describing. > > You don't do it, because there is not even a relative offset that is > fixed. There should be a pointer to the vendor table inside the SFDP > structure. Thus, you need to properly parse it. If there is nothing static and the location can be derived by reading the chip tables, I'd suggest to offload this out of the spi-nor core and instead use some kind of an nvmem layout driver to retrieve the corresponding region? > Regarding how to reference it within the device tree, I'd assume > something along 'compatible =3D "jedec,sfdp-vendor-table-NNN";' or > similar. But no static/relative offsets. I see. We need to invoke our DT binding gurus. Cheers, Miqu=C3=A8l 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 39A74C282D1 for ; Thu, 6 Mar 2025 09:05:10 +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:References :In-Reply-To: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=2XPwiMZmy6vuNqvjMSA1bgtM49QVOaMcHuqRtoI+hSY=; b=bL5JfJgLc17eIH 9SPB1sjI7gIKk+B2GAosRf3KIG91+pl7rFQn00PPtC5dLNo+HTeLubcRtWGek52+RCliXp0qjnSNQ iO+0akToHmNGNF/JzLKlyz5i3usKAL7ptXiSZvNFer0mCX/ICrkuzavYs5icOOjogl19qMiL2AAa8 pR6dPRAo3ZiGfRLFHd8pANFgx2pmR8anIrDs4sNB/Zr/ZBankMVmYHv6eTacFTvlJyLtSIxH1dQjx Vq+ln51nLpKooMi4kNj8ird/U5qints2qzaLKB2aN2YB8kK9UAXIwODh6a7kpZ/36gcJLe45RGjDQ duaiJdBZQbl7l81Zn+Pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tq7A8-0000000AQi7-1Xyt; Thu, 06 Mar 2025 09:05:04 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq72A-0000000APPV-3WXO; Thu, 06 Mar 2025 08:56:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; b=k3byhzb00j7wIBgkXRuB3E8pTS /OQuf6LoqeNMJUOmIoB84peIoeaFfhwnL9Ps5VGAvTo8fqksJqagO5aOKcJRiV6UBMBeQN7vZ+u9v zzarYUAigIDkK4Tc9YeAwWk/AHoOauZ9BOyeoIxGRAajOddAt9MmcjXRbeZJwrq8r3Ew1yUJnr7f/ EeLtyuSImhORYXRbjeHRBhdAly6qv1RNUzQEyYA/A9ULL6kPa8S61uZV+7hESCnFSW+d/ei1Z6GqW 1X8eN7KPvqGLVPIALgm2thLbusDZ1TzTDASD2VvaQOMyoy0YWFfyR4PBs61mhJRe/0ElYOOydVfHg fnjKyHVQ==; Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tq727-00000000yg6-295I; Thu, 06 Mar 2025 08:56:49 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 095C644346; Thu, 6 Mar 2025 08:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1741251403; 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=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; b=bcsa9PFyZi1TSiKo447e1/X2al16CgcgnqKVunZQwmCl3qnrX42lHDEfhvyrbmi8JXKkhB n46Csjqw3jAiRBM19KIhHdgmgeuOcDB9nXpJmo2rqQc6VkrgUp7DkciYqtcArEWHn73+zs vOaVZVP1a9rn2+5TNQVfaCcttQlc7xWDfaaCNHhImxl/3QrjVunzqykZTzJ+uZrQDZpbrk mQc62IoiFiU82VxHheDJGLNJIe17Q+EtySnPObBAlP183ahUQNB1rJMFzBM0rLgZNyf9gN ihY0C10PIAZEEmNNvFV5HSlCP3iqRxg87xIM0B21c1zjCt7p66avf6QbXYbKxg== From: Miquel Raynal To: "Michael Walle" Cc: , , , , , , , , , , , , , , , Subject: Re: [PATCH 1/2] mtd: spi-nor: sst: register SFDP region into NVMEM framework to read MAC Address In-Reply-To: (Michael Walle's message of "Thu, 06 Mar 2025 09:39:31 +0100") References: <20250305100134.1171124-1-manikandan.m@microchip.com> <6fee6e71-106f-474b-9a0c-5df5fb0caa00@microchip.com> <87eczawo9q.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 06 Mar 2025 09:56:42 +0100 Message-ID: <87o6yev8ol.fsf@bootlin.com> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejfedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhepofhiqhhuvghlucftrgihnhgrlhcuoehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeffgefhjedtfeeigeduudekudejkedtiefhleelueeiueevheekvdeludehiedvfeenucfkphepledtrdekledrudeifedruddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeltddrkeelrdduieefrdduvdejpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedujedprhgtphhtthhopehmfigrlhhlvgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepofgrnhhikhgrnhgurghnrdfosehmihgtrhhotghhihhprdgtohhmpdhrtghpthhtoheprhhosghhsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehkrhiikhdoughtsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegtohhnohhrodgutheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheppfhitgholhgrs hdrhfgvrhhrvgesmhhitghrohgthhhiphdrtghomhdprhgtphhtthhopegrlhgvgigrnhgurhgvrdgsvghllhhonhhisegsohhothhlihhnrdgtohhmpdhrtghpthhtoheptghlrghuughiuhdrsggviihnvggrsehtuhigohhnrdguvghv X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250306_085647_675902_C4E16664 X-CRM114-Status: GOOD ( 14.57 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Cj4+ID4+IEkgZG9uJ3QgdGhpbmsgaXQgbWFrZXMgc2Vuc2UgdG8gaGF2ZSB0aGlzIG9uZS1vZmYg aW4gYSBwYXJ0aWN1bGFyCj4+ID4+IGRyaXZlci4gSWYgYXQgYWxsLCB0aGlzIHNob3VsZCBiZSBo YW5kbGVkIGluIHRoZSBjb3JlLiBTb3JyeSwgYnV0Cj4+ID4+IHRoaXMgcmVhbGx5IGxvb2tzIGxp a2UgYW4gdWdseSBoYWNrLgo+PiA+PiAKPj4gPgo+PiA+IEJlY2F1c2UgdGhlIEVVSSBpZGVudGlm aWVyIHdpdGhpbiB0aGUgU0ZEUCBpcyB1bmlxdWUgdG8gdGhlIAo+PiA+IFNTVDI2VkYwNjRCRVVJ IGZsYXNoLCBJIG9wdGVkIHRvIGhhbmRsZSBpdCBoZXJlIHJhdGhlciB0aGFuIGluIHRoZSBjb3Jl Lgo+PiA+Cj4+ID4gQWxzbyBoZXJlIHRoZSBNQUMgYWRkcmVzcyBkYXRhIHJlc2lkZXMgd2l0aGlu IHRoZSAweDI2MC0weDI2RiByYW5nZSwgSSAKPj4gPiB3aWxsIHJlc2l6ZSB0aGUgbnZtZW1fY29u ZmlnLnNpemUgdG8gMHgxMCBpbnN0ZWFkIG9mIHJlZ2lzdGVyaW5nIHRoZSAKPj4gPiBmdWxsIFNG RFAgcmVnaW9uIGFzIE5WTUVNLgo+Pgo+PiBPcGVuIHF1ZXN0aW9uIHRvIGFsbCBwYXJ0aWVzIGlu IHRoaXMgdGhyZWFkOiBob3cgZG8gd2UgZ2l2ZSBhbiBvZmZzZXQgaW4KPj4gdGhlIGRldmljZSB0 cmVlIHRoYXQgaXMgcmVsYXRpdmUgdG8gdGhlIHNmZHAgcmVnaW9uIGFuZCBub3QgdGhlIGRhdGEK Pj4gcmVnaW9uPyBJIGJlbGlldmUgd2UgY2FyZSBub3QgdG8gbWl4IHRoZXNlIGFyZWFzIHdoaWxl IGRlc2NyaWJpbmcuCj4KPiBZb3UgZG9uJ3QgZG8gaXQsIGJlY2F1c2UgdGhlcmUgaXMgbm90IGV2 ZW4gYSByZWxhdGl2ZSBvZmZzZXQgdGhhdCBpcwo+IGZpeGVkLiBUaGVyZSBzaG91bGQgYmUgYSBw b2ludGVyIHRvIHRoZSB2ZW5kb3IgdGFibGUgaW5zaWRlIHRoZSBTRkRQCj4gc3RydWN0dXJlLiBU aHVzLCB5b3UgbmVlZCB0byBwcm9wZXJseSBwYXJzZSBpdC4KCklmIHRoZXJlIGlzIG5vdGhpbmcg c3RhdGljIGFuZCB0aGUgbG9jYXRpb24gY2FuIGJlIGRlcml2ZWQgYnkgcmVhZGluZwp0aGUgY2hp cCB0YWJsZXMsIEknZCBzdWdnZXN0IHRvIG9mZmxvYWQgdGhpcyBvdXQgb2YgdGhlIHNwaS1ub3Ig Y29yZSBhbmQKaW5zdGVhZCB1c2Ugc29tZSBraW5kIG9mIGFuIG52bWVtIGxheW91dCBkcml2ZXIg dG8gcmV0cmlldmUgdGhlCmNvcnJlc3BvbmRpbmcgcmVnaW9uPwoKPiBSZWdhcmRpbmcgaG93IHRv IHJlZmVyZW5jZSBpdCB3aXRoaW4gdGhlIGRldmljZSB0cmVlLCBJJ2QgYXNzdW1lCj4gc29tZXRo aW5nIGFsb25nICdjb21wYXRpYmxlID0gImplZGVjLHNmZHAtdmVuZG9yLXRhYmxlLU5OTiI7JyBv cgo+IHNpbWlsYXIuIEJ1dCBubyBzdGF0aWMvcmVsYXRpdmUgb2Zmc2V0cy4KCkkgc2VlLiBXZSBu ZWVkIHRvIGludm9rZSBvdXIgRFQgYmluZGluZyBndXJ1cy4KCkNoZWVycywKTWlxdcOobAoKX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkxpbnV4 IE1URCBkaXNjdXNzaW9uIG1haWxpbmcgbGlzdApodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9t YWlsbWFuL2xpc3RpbmZvL2xpbnV4LW10ZC8K From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D364E209F31; Thu, 6 Mar 2025 08:56:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741251408; cv=none; b=KhoFfwHBoJZlL9zS/QRlWNtnCvWDJUib+owvpg2QDdeySkBQS9QUjNXEdxRuVLfUc2qM6DG8TbUlbPydunLAbaaBjJCdSmNAtE3OeRuzwjzHRTIq51dNDfpPTO/mtZAHK43lhrynHZYryU9U7XaipeaD4h0yIc1PBGVxPXiFx8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741251408; c=relaxed/simple; bh=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=FLYrtoTRTqml0sbq3LcqbzxGKgQTOzTj+Ox+klNnl2rbJk2yqSeKS7i0U13toAyTCShji0bKyc2xMqPzZZ3mNslEzGpQswULJ/QttWI4mvld5mTxtfrFxt/7gDssxbha6Ha2Pu2QJEaPTQV/pGLUwZsdC43tqIT+2dQLeGrqcDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=bcsa9PFy; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="bcsa9PFy" Received: by mail.gandi.net (Postfix) with ESMTPSA id 095C644346; Thu, 6 Mar 2025 08:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1741251403; 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=nGwcEVedx/JIyaFBS6j1W8a/OxxJvsbDFiq4EOhTUjo=; b=bcsa9PFyZi1TSiKo447e1/X2al16CgcgnqKVunZQwmCl3qnrX42lHDEfhvyrbmi8JXKkhB n46Csjqw3jAiRBM19KIhHdgmgeuOcDB9nXpJmo2rqQc6VkrgUp7DkciYqtcArEWHn73+zs vOaVZVP1a9rn2+5TNQVfaCcttQlc7xWDfaaCNHhImxl/3QrjVunzqykZTzJ+uZrQDZpbrk mQc62IoiFiU82VxHheDJGLNJIe17Q+EtySnPObBAlP183ahUQNB1rJMFzBM0rLgZNyf9gN ihY0C10PIAZEEmNNvFV5HSlCP3iqRxg87xIM0B21c1zjCt7p66avf6QbXYbKxg== From: Miquel Raynal To: "Michael Walle" Cc: , , , , , , , , , , , , , , , Subject: Re: [PATCH 1/2] mtd: spi-nor: sst: register SFDP region into NVMEM framework to read MAC Address In-Reply-To: (Michael Walle's message of "Thu, 06 Mar 2025 09:39:31 +0100") References: <20250305100134.1171124-1-manikandan.m@microchip.com> <6fee6e71-106f-474b-9a0c-5df5fb0caa00@microchip.com> <87eczawo9q.fsf@bootlin.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 06 Mar 2025 09:56:42 +0100 Message-ID: <87o6yev8ol.fsf@bootlin.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejfedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhepofhiqhhuvghlucftrgihnhgrlhcuoehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeffgefhjedtfeeigeduudekudejkedtiefhleelueeiueevheekvdeludehiedvfeenucfkphepledtrdekledrudeifedruddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeltddrkeelrdduieefrdduvdejpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedujedprhgtphhtthhopehmfigrlhhlvgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepofgrnhhikhgrnhgurghnrdfosehmihgtrhhotghhihhprdgtohhmpdhrtghpthhtoheprhhosghhsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehkrhiikhdoughtsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegtohhnohhrodgutheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheppfhitgholhgrs hdrhfgvrhhrvgesmhhitghrohgthhhiphdrtghomhdprhgtphhtthhopegrlhgvgigrnhgurhgvrdgsvghllhhonhhisegsohhothhlihhnrdgtohhmpdhrtghpthhtoheptghlrghuughiuhdrsggviihnvggrsehtuhigohhnrdguvghv X-GND-Sasl: miquel.raynal@bootlin.com >> >> I don't think it makes sense to have this one-off in a particular >> >> driver. If at all, this should be handled in the core. Sorry, but >> >> this really looks like an ugly hack. >> >>=20 >> > >> > Because the EUI identifier within the SFDP is unique to the=20 >> > SST26VF064BEUI flash, I opted to handle it here rather than in the cor= e. >> > >> > Also here the MAC address data resides within the 0x260-0x26F range, I= =20 >> > will resize the nvmem_config.size to 0x10 instead of registering the=20 >> > full SFDP region as NVMEM. >> >> Open question to all parties in this thread: how do we give an offset in >> the device tree that is relative to the sfdp region and not the data >> region? I believe we care not to mix these areas while describing. > > You don't do it, because there is not even a relative offset that is > fixed. There should be a pointer to the vendor table inside the SFDP > structure. Thus, you need to properly parse it. If there is nothing static and the location can be derived by reading the chip tables, I'd suggest to offload this out of the spi-nor core and instead use some kind of an nvmem layout driver to retrieve the corresponding region? > Regarding how to reference it within the device tree, I'd assume > something along 'compatible =3D "jedec,sfdp-vendor-table-NNN";' or > similar. But no static/relative offsets. I see. We need to invoke our DT binding gurus. Cheers, Miqu=C3=A8l