Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp354347rdh; Tue, 19 Dec 2023 00:26:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkSx+jG6R7N4AI/T/mvtTq/wse4Hwrh9PUYFuo1EYiHROjyUqbm+7m7oPuDq1axOVphE+l X-Received: by 2002:a17:903:98b:b0:1d3:dc64:4142 with SMTP id mb11-20020a170903098b00b001d3dc644142mr413247plb.73.1702974394587; Tue, 19 Dec 2023 00:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702974394; cv=none; d=google.com; s=arc-20160816; b=hkAR3mNVIOwCfau5teEvlazcd7Jfb5ZTH3IAw5w/asT6ZZ7dwdGOzu3ZXRrhjobPAz gMElzvQrqJcJQ4bOyENSxqAkM/q2i7JzIzaNqFFkWdD96Nmq58/KVcj36WLLh332K1/y 0lzgZ/vucRdP+6gPwaMDQvJnv506u+wzhOwBXDAyuyvqH03TmTkUn8YMEQiEl2pDKaqo ZvvkiLrmxKKPJrIT/thxhBTkKByEJWEpIViMI6ZAMh1q4X8ydd6NYH0wJm+qLjA6aZAN 7zmh6PnDQTk2BrTXLwSCb05V2COSIV4v5LHvES39jZxU0p7NpseFQna/ZyvI7s3Ip2DS SvKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=44tWTX/RSFAs3xTgaKfAwubj6hvu6hnjcH+agLDrfuI=; fh=qKFkcqtkM75ISukL7HQ7Lu9XoQgzXz7MW77GgXWCe2w=; b=aQtZNtlRNpeVQEszfDf41oSRiHM7/fTX4X+b+uoF3HHiA/YfzX1FjzclXuM8ohCSf+ cEgi9nHPJlZQAos2GSrhb7YEBnKbu4niDDdTC/bMKGh8BuyyQ0lqQiCgpielCpIG/IXa 2OF/t0B/aeKnmTPDQWbADqUT/GzegYEmI11/J6u0iOFZ0gyAxYvpf/FGFDf7GpVa4W5Q BMjD0duC4HD33L4pJl/nOMEb6TFjFd9kifX/hVUxHowsuvx5Fzu3WZXWfA5E7vMd6Rfk wtmG/QEWw7MEaWq8OwTdH9fAQcagHDdOnMMMcXnh6zz5EcBD59Cie+C6hwm83LudX0O2 IcZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RZFBePNl; spf=pass (google.com: domain of linux-kernel+bounces-4883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b6-20020a170902d50600b001d3970f5026si6311463plg.297.2023.12.19.00.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 00:26:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RZFBePNl; spf=pass (google.com: domain of linux-kernel+bounces-4883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3A4D6285750 for ; Tue, 19 Dec 2023 08:26:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7A3611728; Tue, 19 Dec 2023 08:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RZFBePNl" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23E3812B6D for ; Tue, 19 Dec 2023 08:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-336695c4317so1872138f8f.3 for ; Tue, 19 Dec 2023 00:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702974383; x=1703579183; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=44tWTX/RSFAs3xTgaKfAwubj6hvu6hnjcH+agLDrfuI=; b=RZFBePNlvKK1/SmZLxoV0uLC3wND4aSou+pK00QdXHajnjSqDvBfImhZs9HW13G0l5 63FDyumdA7ivqVvtgOzFA/1UmqNh/e4ZacC+kIatzicFjLQ/ZnHK0Lpr0yldn/Kj5QMa uZh8t4eGpEgBNKAOareAjep+3eGko73g0/O6+a/AYoGPNHr5rMdNRV6WtRiPCX/5iV9a 9iVq2vghUkizJIr5tB7JIDs6sSEVPj7LXHsPP6eFm5Pz764AcSltwxHoeWKEyHHrEl5q RSc+IL1n2/JGkK8X910oLJMrNK78RSHxs3P4QWrf88fuxGBMfRSCmZGggJZb7TfA/sYN oY0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702974383; x=1703579183; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=44tWTX/RSFAs3xTgaKfAwubj6hvu6hnjcH+agLDrfuI=; b=LHubCyJ49VQDvu+F2CAYlQN0ZUJetk/C/Z2YzfhGYyakwceJMTwL4e2TQoubRBjZjt hnrsCau44uIVTfFCvInB5N3wl6lDfUU4WST6B3kLn563sR/XkpVJqT75dCqlxJ9HJL1D 7pCcJxl2xDFD8A6vT4MT2zeUdTsZ3BRoeZ3UDGr/NnqZHH3R4HepnsBAVbTyQgrDshxQ co6B0KPtAqPJRd9WYm8KaY9r8FhYzPzptGYgAv7DTyA9/7bGf2/DNhhwSarJYgfNIX5S 2kNwStTKQGqXnASL74q1YNH1RppevmmV76N+pkuYI7TQUnHntAPihdgecvShlLVUBWQW T9Ag== X-Gm-Message-State: AOJu0YzIQtkHQrecQSONndHjy/reuQpNJxmiT1GqMYSvAyNW9sA4Bya7 gvRCYNe4S6MMkeD5N3Ni9dHXOA== X-Received: by 2002:a5d:6801:0:b0:336:6e12:7c62 with SMTP id w1-20020a5d6801000000b003366e127c62mr861872wru.110.1702974383315; Tue, 19 Dec 2023 00:26:23 -0800 (PST) Received: from [192.168.2.173] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id d5-20020a5d5385000000b0033662cf5e51sm6719841wrv.93.2023.12.19.00.26.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Dec 2023 00:26:22 -0800 (PST) Message-ID: <576d56ed-d24b-40f9-9ae4-a02c50eea2ab@linaro.org> Date: Tue, 19 Dec 2023 10:26:20 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 07/10] mtd: spi-nor: Add stacked memories support in spi-nor Content-Language: en-US To: "Mahapatra, Amit Kumar" , "broonie@kernel.org" , "pratyush@kernel.org" , "miquel.raynal@bootlin.com" , "richard@nod.at" , "vigneshr@ti.com" , "sbinding@opensource.cirrus.com" , "lee@kernel.org" , "james.schulman@cirrus.com" , "david.rhodes@cirrus.com" , "rf@opensource.cirrus.com" , "perex@perex.cz" , "tiwai@suse.com" Cc: "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "michael@walle.cc" , "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" References: <20231125092137.2948-1-amit.kumar-mahapatra@amd.com> <20231125092137.2948-8-amit.kumar-mahapatra@amd.com> <5a6f6764-6779-42b0-b6c6-3f638b85ef78@linaro.org> From: Tudor Ambarus In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 15.12.2023 13:20, Mahapatra, Amit Kumar wrote: > Hello Tudor, > Hi! >> -----Original Message----- >> From: Tudor Ambarus >> Sent: Friday, December 15, 2023 4:03 PM >> To: Mahapatra, Amit Kumar ; >> broonie@kernel.org; pratyush@kernel.org; miquel.raynal@bootlin.com; >> richard@nod.at; vigneshr@ti.com; sbinding@opensource.cirrus.com; >> lee@kernel.org; james.schulman@cirrus.com; david.rhodes@cirrus.com; >> rf@opensource.cirrus.com; perex@perex.cz; tiwai@suse.com >> Cc: linux-spi@vger.kernel.org; linux-kernel@vger.kernel.org; michael@walle.cc; >> 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 >> Subject: Re: [PATCH v11 07/10] mtd: spi-nor: Add stacked memories support >> in spi-nor >> >> >> >> On 12/15/23 10:02, Mahapatra, Amit Kumar wrote: >>> Hello Tudor, >> >> Hi, >> >>> >>>> -----Original Message----- >>>> From: Tudor Ambarus >>>> Sent: Friday, December 15, 2023 1:40 PM >>>> To: Mahapatra, Amit Kumar ; >>>> broonie@kernel.org; pratyush@kernel.org; miquel.raynal@bootlin.com; >>>> richard@nod.at; vigneshr@ti.com; sbinding@opensource.cirrus.com; >>>> lee@kernel.org; james.schulman@cirrus.com; david.rhodes@cirrus.com; >>>> rf@opensource.cirrus.com; perex@perex.cz; tiwai@suse.com >>>> Cc: linux-spi@vger.kernel.org; linux-kernel@vger.kernel.org; >>>> michael@walle.cc; 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 >>>> Subject: Re: [PATCH v11 07/10] mtd: spi-nor: Add stacked memories >>>> support in spi-nor >>>> >>>> >>>> >>>> On 15.12.2023 09:55, Mahapatra, Amit Kumar wrote: >>>>>> Thanks! Can you share with us what flashes you used for testing in >>>>>> the stacked and parallel configurations? >>>>> I used SPI-NOR QSPI flashes for testing stacked and parallel. >>>> >>>> I got that, I wanted the flash name or device ID. >>> >>> N25Q00A, MX66U2G45G, IS25LP01G & W25H02JV are some of the QSPI >> flashes >>> on which we tested. Additionally, we conducted tests on over 30 >>> different QSPI flashes from four distinct vendors (Miron, Winbond, >> Macronix, and ISSI). >>> >> >> Great. >> >>>> What I'm interested is if each flash is in its own package. Are they? >>> >>> I'm sorry, but I don't quite understand what you mean by "if each >>> flash in its own package." >>> >> >> There are flashes that are stacked at the physical level. It's a single flash with >> multiple dies, that are all under a single physical package. > > Got it. The W25H02JV QSPI flash I mentioned earlier is a device with > with four dies that are stacked at the physical level. > >> >> As I understand, your stacked flash model is at logical level. You have >> 2 flashes each in its own package. 2 different entities. Is my understanding >> correct? > > Yes, that’s correct. > > I'd like to contribute to your earlier point regarding the placement of > the stacked layer. As you correctly highlighted, it should be in the > spi-mem generic layer. For instance, when a read/write operation extends > across multiple flashes (whether SPI-NOR or SPI-NAND), the stacked layer > must handle the flash crossover. This requires setting the appropriate CS > index in mem->spi->cs_index_mask to select the correct slave device and > updating the data buffer, address & data length in spi_mem_op struct > variable. Does this align with your understanding? > This was the initial idea, yes, but we'll have to see how mtd concat fits in. Maybe the abstraction can be made at the mtd level, which I suspect mtd concat does. I have to read that driver, never opened it. Something else to consider: I see that Micron has a twin quad mode: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25t/generation-b/mt25t_qljs_l_512_xba_0.pdf?rev=de70b770c5dc4da8b8ead06b57c03500 The micron's "Separate Chip-Select and Clock Signals" resembles the AMD's dual parallel 8-bit. Micron's "Shared Chip-Select and Clock Signals" differs from the AMD's stacked mode, as Micron uses DQ[3:0] and DQ[7:4], whereas AMD considers both as DQ[3:0]. I had a short chat with Michael and he highlighted that instead of the parallel mode, one would be better of with an octal device. I wonder whether the quad parallel is worth the effort. I see AMD can select either quad (single/stacked/parallel) or octal (single/stacked). Is the parallel mode considered obsolete for new IPs? Cheers, ta