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