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 9AF88C433FE for ; Tue, 7 Dec 2021 08:59: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: 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=oMKG6qj5BIfCn1FaoqXiX4SATUKQWJ+LZbMNz3PH7Tk=; b=L8nsjOOJ26/qXe QW8RQpC9pvExaCb5iOL2O8YLzGnGcITbFqyHRpc3YopRFh9Kld7yrHim5mGkws+2Mm3UF/+oRm7R8 I28Hh/O38KeydfJh74ts9lSSYJDOmW3njv+L92KThMvMjnb8Hcz5iq/K6npq7gGqpu+KpdHESJcg+ NUjXJ98YkRVkzS9caWUZhxKge424VefuFnB/RJrycCAVbnV5oX9IXgvuJiMOgfe75yc3V7MbHZfxT NaYzkpiu9/tZ4MnynClAMxun9nt1LhUpZhJyDCqZjs/YiCn5KE8XIWpOeSKSvULNJOGqMiAhQvkRU 1flMkHrhV3A2eJs3+M7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muWJN-007ett-5m; Tue, 07 Dec 2021 08:58:57 +0000 Received: from relay12.mail.gandi.net ([217.70.178.232]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muW54-007anD-JV for linux-mtd@lists.infradead.org; Tue, 07 Dec 2021 08:44:12 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 9A91E20000C; Tue, 7 Dec 2021 08:44:06 +0000 (UTC) Date: Tue, 7 Dec 2021 09:44:05 +0100 From: Miquel Raynal To: Cc: , , , , , , , , , , , Subject: Re: [PATCH v3 1/3] dt-bindings: mtd: spi-nor: Allow two CS per device Message-ID: <20211207094405.6083b141@xps13> In-Reply-To: References: <20211206095921.33302-1-miquel.raynal@bootlin.com> <20211206095921.33302-2-miquel.raynal@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_004410_821929_7ED6363E X-CRM114-Status: GOOD ( 20.65 ) 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 SGVsbG8gVHVkb3IsCgpUdWRvci5BbWJhcnVzQG1pY3JvY2hpcC5jb20gd3JvdGUgb24gVHVlLCA3 IERlYyAyMDIxIDA3OjE2OjExICswMDAwOgoKPiBIaSwgTWlxdWVsLAo+IAo+IE9uIDEyLzYvMjEg MTE6NTkgQU0sIE1pcXVlbCBSYXluYWwgd3JvdGU6Cj4gPiBFWFRFUk5BTCBFTUFJTDogRG8gbm90 IGNsaWNrIGxpbmtzIG9yIG9wZW4gYXR0YWNobWVudHMgdW5sZXNzIHlvdSBrbm93IHRoZSBjb250 ZW50IGlzIHNhZmUKPiA+IAo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Bk b24ndCBoYXZlIGEgc3Ryb25nIG9waW5pb24sIHdoZXRoZXIgd2Ugc2hvdWxkIG1ha2UgdGhlc2UK WGlsaW54IHNwZWNpZmljLCBvciBub3QuIEZvciBub3cgdGhleSBhcmUsIGJ1dCBpbiB0aGUgbmVh ciBmdXR1cmUsIGl0CmlzIG5vdCBzbyBzdXJlIChhbmQgbXkgY3J5c3RhbCBiYWxsIGlzIHVuZGVy IG1haW50ZW5hbmNlIDspICkuCgpUaGFua3MsCk1pcXXDqGwKCl9fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpMaW51eCBNVEQgZGlzY3Vzc2lvbiBt YWlsaW5nIGxpc3QKaHR0cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9s aW51eC1tdGQvCg== 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4606FC433FE for ; Tue, 7 Dec 2021 08:44:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232448AbhLGIrk convert rfc822-to-8bit (ORCPT ); Tue, 7 Dec 2021 03:47:40 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:39147 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbhLGIrj (ORCPT ); Tue, 7 Dec 2021 03:47:39 -0500 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 9A91E20000C; Tue, 7 Dec 2021 08:44:06 +0000 (UTC) Date: Tue, 7 Dec 2021 09:44:05 +0100 From: Miquel Raynal To: Cc: , , , , , , , , , , , Subject: Re: [PATCH v3 1/3] dt-bindings: mtd: spi-nor: Allow two CS per device Message-ID: <20211207094405.6083b141@xps13> In-Reply-To: References: <20211206095921.33302-1-miquel.raynal@bootlin.com> <20211206095921.33302-2-miquel.raynal@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Hello Tudor, Tudor.Ambarus@microchip.com wrote on Tue, 7 Dec 2021 07:16:11 +0000: > Hi, Miquel, > > On 12/6/21 11:59 AM, Miquel Raynal wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > The Xilinx QSPI controller has two advanced modes which allow the > > controller to behave differently and consider two flashes as one single > > storage. > > > > One of these two modes is quite complex to support from a binding point > > of view and is the dual parallel memories. In this mode, each byte of > > data is stored in both devices: the even bits in one, the odd bits in > > the other. The split is automatically handled by the QSPI controller and > > is transparent for the user. > > > > The other mode is simpler to support, it is called dual stacked > > memories. The controller shares the same SPI bus but each of the devices > > contain half of the data. Once in this mode, the controller does not > > follow CS requests but instead internally wires the two CS levels with > > the value of the most significant address bit. > > The stacked mode that you describe seems particular to a specific > vendor. There are multi die NOR flashes which do not require any > controller intervention, the logic is held at the flash level: > https://media-www.micron.com/-/media/client/global/documents/products/technical-note/nor-flash/tn2505_n25q_mt25q_stacked_devices.pdf?rev=7a23cc95238e46f7b22e2a9f6bc736b7 > > Can you point us to which kind of memories you're willing to add > support for? Some datasheets will be best. Unfortunately I don't have any datasheets to propose, I think this mode must be seen like a controller abstraction of any device with several physical cs. The question: "should these properties be common to all devices" is still open, I don't have a strong opinion, whether we should make these Xilinx specific, or not. For now they are, but in the near future, it is not so sure (and my crystal ball is under maintenance ;) ). Thanks, Miquèl