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 DDE0AC43334 for ; Sat, 9 Jul 2022 19:54:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EAF2A844C5; Sat, 9 Jul 2022 21:54:34 +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 007A6845D9; Sat, 9 Jul 2022 21:54:33 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 566858447D for ; Sat, 9 Jul 2022 21:54:30 +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 D85391063; Sat, 9 Jul 2022 12:54:29 -0700 (PDT) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 99BAF3F792; Sat, 9 Jul 2022 12:54:28 -0700 (PDT) Date: Sat, 9 Jul 2022 20:53:18 +0100 From: Andre Przywara To: Michal Suchanek Cc: u-boot@lists.denx.de, Matthias Brugger , Jernej Skrabec , Jagan Teki Subject: Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero Message-ID: <20220709205318.33cccc00@slackpad.lan> In-Reply-To: <20220709065945.16141-1-msuchanek@suse.de> References: <20220707082523.27141-1-msuchanek@suse.de> <20220709065945.16141-1-msuchanek@suse.de> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.31; x86_64-slackware-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 Sat, 9 Jul 2022 08:59:45 +0200 Michal Suchanek wrote: Hi Michal, > The device tree should include generic "jedec,spi-nor" compatible, and a > manufacturer-specific one. > The macronix part is what is shipped on the boards that come with a > flash chip. thanks for taking care and trying to bring those fixes upstream! It seems that this patch alone doesn't do anything, as SPI0 is still disabled in the DT. Also we normally don't pick single DT changes from Linux, unless they fix a very particular U-Boot issue. Instead we try to sync the DT files in batches, once they reached a certain maturity state in the Linux tree (for instance merged into Linus' tree). So as this one here doesn't do anything, we will just pick it up as part of the next sync, which I guess is around Linux 5.20-rc1, due in about a month. As mentioned on IRC, I would be interested in solving this "SPI flash is optional" issue. IIUC there was pushback in Linux against blanketly enabling the SPI flash on this board, as there were boards sold without the chip? (Do you have a link to that discussion?) So the plan would be to detect the availability of the SPI flash in U-Boot, and then disable it (in the DT passed to the kernel), when the chip is not populated. Then we can send a patch to Linux to enable it in the DT, and sync that back. I would be grateful if someone could investigate the code it takes to pull this off. Thanks, Andre > > Fixes: 280294c5df ("sunxi: boards: Enable SPI flash support in U-Boot proper") > Signed-off-by: Michal Suchanek > --- > v2: cherry-pick from Linux > arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts > index b08e84c616..80c1e66b38 100644 > --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts > +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts > @@ -170,7 +170,7 @@ > flash@0 { > #address-cells = <1>; > #size-cells = <1>; > - compatible = "mxicy,mx25l1606e", "winbond,w25q128"; > + compatible = "mxicy,mx25l1606e", "jedec,spi-nor"; > reg = <0>; > spi-max-frequency = <40000000>; > };