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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 F2508CF07DE for ; Thu, 10 Oct 2024 09:28:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 97DFDB60; Thu, 10 Oct 2024 11:28:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 97DFDB60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728552512; bh=Qc/AzkQlI2nXPdkpvLykvsnuBMgjz/SDo6Yy82JMdn4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cMHB5RtDKzGWXjCqJqUQ9PB8agpkG74pB7r4dGderMv6Dp8ZMCsmN/Jk8KoUvAcSX KlQSauwLY60EtgFdauTE+5MeJCclUbS4DGBXAKIGp1Jz8AV3bX52rQYiNaZaaPDszR IMRj2l38o8Nj88yXhaxFshBbojlxGAiHYkYFOEt4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3D3FF805B3; Thu, 10 Oct 2024 11:28:01 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 07032F805B5; Thu, 10 Oct 2024 11:28:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38EC0F80528; Thu, 10 Oct 2024 11:27:56 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7132DF8001E for ; Thu, 10 Oct 2024 11:27:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7132DF8001E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=HYHexWZb Received: by mail.gandi.net (Postfix) with ESMTPSA id E8E0C240009; Thu, 10 Oct 2024 09:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728552473; 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=SIpvFyTZgLUu94xOGDEGcr970RAQUxKWuf6ktquG0pA=; b=HYHexWZbzisi+7I32KvQ/3MgFxTE0vqgO/bvfPgFfvjFRZ5OL9sONbUEfexGaj3nIYFNBg rFZUaS9+M6En3zav/tnEjpEGrVtrUchLMaFKubrwz/WPA5PkH2uATnZ/FxbUUIIlOa9i79 LftYlIOBb1T/NFh5hwpmp7x5qIojm8Qgq4Z8BE9AXAPsz6/N6EONB62+aL71r4rZPTGC05 TbrVH8EBsOkG8a8EwJ/WP7/2wT5erFKgJoylTC6JKbG3f2l7lguUKdnT57IhBnrziOxfBW oyZsmZ5SKpI9QmYRMdUhHMS9zuORceU+OxkeXy4uL2O+2ozkIJp+R2VbWKooGA== Date: Thu, 10 Oct 2024 11:27:51 +0200 From: Miquel Raynal To: "Mahapatra, Amit Kumar" Cc: Tudor Ambarus , "michael@walle.cc" , "broonie@kernel.org" , "pratyush@kernel.org" , "richard@nod.at" , "vigneshr@ti.com" , Rob Herring , "cornor+dt@kernel.org" , "krzk+dt@kernel.org" , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "nicolas.ferre@microchip.com" , "alexandre.belloni@bootlin.com" , "claudiu.beznea@tuxon.dev" , "Simek, Michal" , "linux-arm-kernel@lists.infradead.org" , "alsa-devel@alsa-project.org" , "patches@opensource.cirrus.com" , "linux-sound@vger.kernel.org" , "git (AMD-Xilinx)" , "amitrkcian2002@gmail.com" , Conor Dooley , "beanhuo@micron.com" Subject: Re: Add stacked and parallel memories support in spi-nor Message-ID: <20241010112751.01e5afa1@xps-13> In-Reply-To: References: <20240930110408.6ec43e97@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Message-ID-Hash: 25YEM36HM4TRMCI75MWDZXZK2IKMAJK6 X-Message-ID-Hash: 25YEM36HM4TRMCI75MWDZXZK2IKMAJK6 X-MailFrom: miquel.raynal@bootlin.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Amit, amit.kumar-mahapatra@amd.com wrote on Thu, 10 Oct 2024 09:17:58 +0000: > Hello Miquel, >=20 > > > - The stacked-memories DT bindings will contain the phandles of the f= lash nodes =20 > > connected in stacked mode. =20 > > > > > > - The first flash node will contain the mtd partition that would have > > > the cross over memory staring at a memory location in the first flash > > > and ending at some memory location of the 2nd flash =20 > >=20 > > I don't like that much. Describing partitions past the actual device so= unds wrong. If > > you look into [1] there is a suggestion from Rob to handle this case us= ing a property > > that tells us there is a continuation, so from a software perspective w= e can easily > > make the link, but on the hardware description side the information are= correct. =20 >=20 > I reviewed Rob's suggestions in [1], and I need to examine the MTD layer= =20 > to determine how this can be implemented from a software perspective.=20 > For reference, here is Rob's suggestion: >=20 > Describe each device and partition separately and add link(s) from one=20 > partition to the next=20 >=20 > flash0 { > partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash1_partitions>; > ... > }; > }; >=20 > flash1 { > flash1_partition: partitions { > compatible =3D "fixed-partitions"; > ... > }; > }; >=20 > >=20 > > If this description is accepted, then fine, you can deprecate the "stac= ked-memories" > > property. =20 >=20 > I believe that in addition to Rob's description, we should also include=20 > the 'stacked-memories' property. This property helps us identify which=20 > flashes are stacked, while Rob's suggestion explains how the partitions=20 > within the stacked flashes are connected. >=20 > For example, if we have three flashes connected to an SPI host, with=20 > flash@0 and flash@1 operating in stacked mode and flash@2 functioning as = a=20 > standalone flash, the Device Tree binding might look something like this:= =20 > Please share your thoughts on this. >=20 > spi@0 { > ... > flash@0 { > compatible =3D "jedec,spi-nor" > reg =3D <0x00>; > stacked-memories =3D <&flash@0 &flash@1>; > spi-max-frequency =3D <50000000>; > ... > flash0_partition: partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash1_partitions>;=09 > partition@0 { > label =3D "Stacked-Flash-1"; > reg =3D <0x0 0x800000>; > } > } > } > flash@1 { > compatible =3D "jedec,spi-nor" > reg =3D <0x01>; > spi-max-frequency =3D <50000000>; > ... > flash1_partition: partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash0_partitions>;=09 > partition@0 { > label =3D " Stacked-Flash-2"; > reg =3D <0x0 0x800000>; > } > } > } >=20 > flash@2 { > compatible =3D "jedec,spi-nor" > reg =3D <0x01>; > spi-max-frequency =3D <50000000>; > ... > partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash0_partitions>;=09 > partition@0 { > label =3D "Single-Flash"; > reg =3D <0x0 0x800000>; > } > } > } I'm sorry but this is pretty messed up. The alignments are wrong, I believe the labels are wrong, the reg properties as well. Can you please work on this example and send an updated version? Thanks, 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 E9F65CF07DF for ; Thu, 10 Oct 2024 09:29:30 +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:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MBMDo8dgihyexikCYbWaSkCCLWmIknOFmMOBtzKab2k=; b=IMsuOH4URZFXOL 198zKYD60LUeIE5KZLIipl6L8wgEnWR6To7rQLZRaCt4WXHxhDJp1QJASo4Uv0rg2wa9ZkdwkgvnN RY6CdE05/LSmFEhNcQAJWfu282ORDlX/GFjCd9jviYPLfsL1of2nF1JOy4WvhM4JLNDgSP3AiNtz9 PEV47eCHn6Id6EciY0FB+nPzxnnJOqhnGSMGAMkqVnfGw7a1qGJaDXWhqPzMnYaWp3fql4vtlk7i2 VSwaoZYDd5VMksOTr7IG/GwMDjlvENvvYVKgS3/1MFENkeUdFgR7nKiy4fPojIapD8ZBVP2C9g/43 KYVPlCqd7XAkqKTqB2mQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sypU6-0000000CEXz-22C1; Thu, 10 Oct 2024 09:29:26 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sypSg-0000000CEDg-00Va; Thu, 10 Oct 2024 09:28:00 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id E8E0C240009; Thu, 10 Oct 2024 09:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728552473; 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=SIpvFyTZgLUu94xOGDEGcr970RAQUxKWuf6ktquG0pA=; b=HYHexWZbzisi+7I32KvQ/3MgFxTE0vqgO/bvfPgFfvjFRZ5OL9sONbUEfexGaj3nIYFNBg rFZUaS9+M6En3zav/tnEjpEGrVtrUchLMaFKubrwz/WPA5PkH2uATnZ/FxbUUIIlOa9i79 LftYlIOBb1T/NFh5hwpmp7x5qIojm8Qgq4Z8BE9AXAPsz6/N6EONB62+aL71r4rZPTGC05 TbrVH8EBsOkG8a8EwJ/WP7/2wT5erFKgJoylTC6JKbG3f2l7lguUKdnT57IhBnrziOxfBW oyZsmZ5SKpI9QmYRMdUhHMS9zuORceU+OxkeXy4uL2O+2ozkIJp+R2VbWKooGA== Date: Thu, 10 Oct 2024 11:27:51 +0200 From: Miquel Raynal To: "Mahapatra, Amit Kumar" Cc: Tudor Ambarus , "michael@walle.cc" , "broonie@kernel.org" , "pratyush@kernel.org" , "richard@nod.at" , "vigneshr@ti.com" , Rob Herring , "cornor+dt@kernel.org" , "krzk+dt@kernel.org" , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "nicolas.ferre@microchip.com" , "alexandre.belloni@bootlin.com" , "claudiu.beznea@tuxon.dev" , "Simek, Michal" , "linux-arm-kernel@lists.infradead.org" , "alsa-devel@alsa-project.org" , "patches@opensource.cirrus.com" , "linux-sound@vger.kernel.org" , "git (AMD-Xilinx)" , "amitrkcian2002@gmail.com" , Conor Dooley , "beanhuo@micron.com" Subject: Re: Add stacked and parallel memories support in spi-nor Message-ID: <20241010112751.01e5afa1@xps-13> In-Reply-To: References: <20240930110408.6ec43e97@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_022759_132395_0C2165D5 X-CRM114-Status: GOOD ( 22.44 ) 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 SGkgQW1pdCwKCmFtaXQua3VtYXItbWFoYXBhdHJhQGFtZC5jb20gd3JvdGUgb24gVGh1LCAxMCBP Y3QgMjAyNCAwOToxNzo1OCArMDAwMDoKCj4gSGVsbG8gTWlxdWVsLAo+IAo+ID4gPiAtIFRoZSBz dGFja2VkLW1lbW9yaWVzIERUIGJpbmRpbmdzIHdpbGwgY29udGFpbiB0aGUgcGhhbmRsZXMgb2Yg dGhlIGZsYXNoIG5vZGVzICAKPiA+IGNvbm5lY3RlZCBpbiBzdGFja2VkIG1vZGUuICAKPiA+ID4K PiA+ID4gLSBUaGUgZmlyc3QgZmxhc2ggbm9kZSB3aWxsIGNvbnRhaW4gdGhlIG10ZCBwYXJ0aXRp b24gdGhhdCB3b3VsZCBoYXZlCj4gPiA+IHRoZSBjcm9zcyBvdmVyIG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9yZy9tYWlsbWFuL2xp c3RpbmZvL2xpbnV4LW10ZC8K 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 93541CF07DE for ; Thu, 10 Oct 2024 09:29:35 +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:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SIpvFyTZgLUu94xOGDEGcr970RAQUxKWuf6ktquG0pA=; b=NA8ZD9eRBFqiqB HNdo5Bzgev8l2Zh82pRLM8vU10JA9gy3+6IoNosH4dyBfWwBmdLv/zp5YJDtd5JYI54p+Sy1opVC3 l135d56oqkEVvMaU96H9d04aAPfcC6nLhceLLi0pSLomzV8LylDJLFOwziWET0Wm8vRy8JBOHf4HG ivHQz03Kz+E2CJcOfY6b5ESOvazZgS5dtSnWgMut/If38mcqOP9HkcKEnJAJsF+l7mDG/nhRmhP+G o7oTVfiuMXj/eZgJM9RFhoFQ7QaoUHW3E7e9RL9ljRISixmABETbemzsqhLtTYt3pHhELd37bfrnU 2erVk3PLNtMsyaZgZuow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sypU5-0000000CEXi-2TTz; Thu, 10 Oct 2024 09:29:25 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sypSg-0000000CEDg-00Va; Thu, 10 Oct 2024 09:28:00 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id E8E0C240009; Thu, 10 Oct 2024 09:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728552473; 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=SIpvFyTZgLUu94xOGDEGcr970RAQUxKWuf6ktquG0pA=; b=HYHexWZbzisi+7I32KvQ/3MgFxTE0vqgO/bvfPgFfvjFRZ5OL9sONbUEfexGaj3nIYFNBg rFZUaS9+M6En3zav/tnEjpEGrVtrUchLMaFKubrwz/WPA5PkH2uATnZ/FxbUUIIlOa9i79 LftYlIOBb1T/NFh5hwpmp7x5qIojm8Qgq4Z8BE9AXAPsz6/N6EONB62+aL71r4rZPTGC05 TbrVH8EBsOkG8a8EwJ/WP7/2wT5erFKgJoylTC6JKbG3f2l7lguUKdnT57IhBnrziOxfBW oyZsmZ5SKpI9QmYRMdUhHMS9zuORceU+OxkeXy4uL2O+2ozkIJp+R2VbWKooGA== Date: Thu, 10 Oct 2024 11:27:51 +0200 From: Miquel Raynal To: "Mahapatra, Amit Kumar" Subject: Re: Add stacked and parallel memories support in spi-nor Message-ID: <20241010112751.01e5afa1@xps-13> In-Reply-To: References: <20240930110408.6ec43e97@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_022759_132395_0C2165D5 X-CRM114-Status: GOOD ( 22.44 ) 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: "alexandre.belloni@bootlin.com" , "vigneshr@ti.com" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , Conor Dooley , "linux-mtd@lists.infradead.org" , "beanhuo@micron.com" , "git \(AMD-Xilinx\)" , Rob Herring , "richard@nod.at" , Tudor Ambarus , "cornor+dt@kernel.org" , "amitrkcian2002@gmail.com" , "linux-sound@vger.kernel.org" , "broonie@kernel.org" , "Simek, Michal" , "linux-arm-kernel@lists.infradead.org" , "patches@opensource.cirrus.com" , "claudiu.beznea@tuxon.dev" , "linux-spi@vger.kernel.org" , "michael@walle.cc" , "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 Hi Amit, amit.kumar-mahapatra@amd.com wrote on Thu, 10 Oct 2024 09:17:58 +0000: > Hello Miquel, >=20 > > > - The stacked-memories DT bindings will contain the phandles of the f= lash nodes =20 > > connected in stacked mode. =20 > > > > > > - The first flash node will contain the mtd partition that would have > > > the cross over memory staring at a memory location in the first flash > > > and ending at some memory location of the 2nd flash =20 > >=20 > > I don't like that much. Describing partitions past the actual device so= unds wrong. If > > you look into [1] there is a suggestion from Rob to handle this case us= ing a property > > that tells us there is a continuation, so from a software perspective w= e can easily > > make the link, but on the hardware description side the information are= correct. =20 >=20 > I reviewed Rob's suggestions in [1], and I need to examine the MTD layer= =20 > to determine how this can be implemented from a software perspective.=20 > For reference, here is Rob's suggestion: >=20 > Describe each device and partition separately and add link(s) from one=20 > partition to the next=20 >=20 > flash0 { > partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash1_partitions>; > ... > }; > }; >=20 > flash1 { > flash1_partition: partitions { > compatible =3D "fixed-partitions"; > ... > }; > }; >=20 > >=20 > > If this description is accepted, then fine, you can deprecate the "stac= ked-memories" > > property. =20 >=20 > I believe that in addition to Rob's description, we should also include=20 > the 'stacked-memories' property. This property helps us identify which=20 > flashes are stacked, while Rob's suggestion explains how the partitions=20 > within the stacked flashes are connected. >=20 > For example, if we have three flashes connected to an SPI host, with=20 > flash@0 and flash@1 operating in stacked mode and flash@2 functioning as = a=20 > standalone flash, the Device Tree binding might look something like this:= =20 > Please share your thoughts on this. >=20 > spi@0 { > ... > flash@0 { > compatible =3D "jedec,spi-nor" > reg =3D <0x00>; > stacked-memories =3D <&flash@0 &flash@1>; > spi-max-frequency =3D <50000000>; > ... > flash0_partition: partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash1_partitions>;=09 > partition@0 { > label =3D "Stacked-Flash-1"; > reg =3D <0x0 0x800000>; > } > } > } > flash@1 { > compatible =3D "jedec,spi-nor" > reg =3D <0x01>; > spi-max-frequency =3D <50000000>; > ... > flash1_partition: partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash0_partitions>;=09 > partition@0 { > label =3D " Stacked-Flash-2"; > reg =3D <0x0 0x800000>; > } > } > } >=20 > flash@2 { > compatible =3D "jedec,spi-nor" > reg =3D <0x01>; > spi-max-frequency =3D <50000000>; > ... > partitions { > compatible =3D "fixed-partitions"; > concat-partition =3D <&flash0_partitions>;=09 > partition@0 { > label =3D "Single-Flash"; > reg =3D <0x0 0x800000>; > } > } > } I'm sorry but this is pretty messed up. The alignments are wrong, I believe the labels are wrong, the reg properties as well. Can you please work on this example and send an updated version? Thanks, Miqu=C3=A8l