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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB344C433EF for ; Fri, 1 Jul 2022 09:57:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C08E83E60; Fri, 1 Jul 2022 11:57:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 57AD784433; Fri, 1 Jul 2022 11:57:47 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 3559083AC3 for ; Fri, 1 Jul 2022 11:57:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85531113E; Fri, 1 Jul 2022 02:57:43 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 264403F66F; Fri, 1 Jul 2022 02:57:42 -0700 (PDT) Date: Fri, 1 Jul 2022 10:57:39 +0100 From: Andre Przywara To: Markus Hoffrogge , Maxime Ripard , Jernej Skrabec , Miquel Raynal , =?UTF-8?B?YW5kcsOpcyByYW3DrXJleg==?= , Samuel Holland Cc: u-boot@lists.denx.de, macroalpha82@gmail.com Subject: Re: [PATCH] sunxi-nand: fix the PIO instead of DMA implementation Message-ID: <20220701105739.36df32e5@donnerap.cambridge.arm.com> In-Reply-To: References: <20220630091322.090dab73@xps-13> <20220630073143.bep6se7ja6juvh6b@houat> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Thu, 30 Jun 2022 23:30:50 +0200 Markus Hoffrogge wrote: Hi Markus, > as this patch has been delegated to you, thanks for sending the patch, and for the heads up, looks like we should add that file somewhere into MAINTAINERS. (And please keep people on CC:, to not split up the thread on the list). > I would like to mention, that this patch is superseding > the patch https://patchwork.ozlabs.org/project/uboot/patch/20220330204543.3790-1-macroalpha82@gmail.com/ > raised by Chris Morgan. So from a first look at it, I like this version better, mostly because it's much shorter ;-) That being said, I tried to stay away from raw NAND as much as possible in the past, and thought that our support in U-Boot is very minimal. So can someone please enlighten me about the status: - AFAIK raw NAND is only supported on the C.H.I.P. Pro, because this is one the few devices featuring SLC NAND. I guess the main feature of raw NAND is that it's cheaper, so using SLC instead of MLC kind of defeats the main purpose of it. - Is there a separate SPL story? As in: loading U-Boot proper from NAND when the BROM loaded the SPL from there? IIUC read disturbance makes even that part non-trivial. - Because of the absence of SLC in modern devices, and the prevalence of eMMC, raw NAND was rarely used on modern devices (>= H3). So did we ever support that? My understanding was that the NAND controller itself is fairly similar (is it?), but the MLC problem would still persist. - How do you actually write to the NAND? It seems like even reading is non-trivial, so is this done from U-Boot, (BSP?) Linux, or using vendor tools, probably via FEL? I recently got an H6 TV box, which happens to use raw (MLC) NAND flash. I also inherited a Cubietruck, which is MLC as well. So can I use that storage, at least for the firmware? If yes, this should be documented somewhere, I guess? Or is it already? Cheers, Andre > It should solve the issue in general and does not require to > revert to the former DMA implementation. > > Kind regards > Markus