Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3028163imj; Mon, 11 Feb 2019 12:33:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IbSL3/C1fDTJGSfwOdWGLAm32yevKlhmvLuIdF7plj+E9a3jedTVqQnNdAZ4LVtXuafg6gH X-Received: by 2002:a62:6204:: with SMTP id w4mr80049pfb.5.1549917227346; Mon, 11 Feb 2019 12:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549917227; cv=none; d=google.com; s=arc-20160816; b=LJiPV/826SE1pVH7OPOmpRHaGJ8r6tqylg1mMo/aat40WaxMQF+SfwOSXBUhUABZyE 5BBxKHix+MbtVhTAuVF+RzeSV+fUMTg2rXX2mL5RMmoQLidBvT5G+F35GAXOBSQkOEzU ipMGFHahp2Fgqd1JNy49Q4kJ7QiJrOZ5LjsyPF5X42JIWGDzhRukQ9S1LqbM1xGmXAYc 1shuMxrOaZXi9vCLMoPPDSLvz7tLcNfeJBbQgQzE2MpO83m5Uo7jQ1Rx65BoEnyGDahI Cq/gFgWjO7X9C5KFPx62wKfPD/PMHTAi0o3iFp0Yvj/IQXEQQFZhX+khSCu7OnEG7F8C x8Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=l/8BkGwH/DMSeIAmiqUBDgDFHaYCnWW4zMB0yKVQuZs=; b=rVEla7r/b7LmDwuk50vMQPr3MVbHpIIxY6iqMDAV6PQOxOGGvAOzQR+uSUW4U7J1i8 LvyM70c5th2r1M9RM+hRmD5CwmOpMGVAs38Ozy/RAnKTHILyFDxUAyiXujZ3x+UBq/nN ouvyOAYbA1WViuvcl0bftF/j98BFJNtfOGyK4klPgyxRV9ruHyqHyigmxxKjE8XsC2cY C6vNNgv9sj4X/ecJwcsadhdpd4j+0MxpmkDuEGm3rMFhGheR3n/uKuoAxw6/NtXFpxJZ CnSMfIwki0FjMo5sQQicZJ/ZrKrOjYtuzjcVWqir9tdTMB04bVyqBBGn3DORxkruD/1A 0Dxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=QiluadKv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si10372448pgc.475.2019.02.11.12.33.30; Mon, 11 Feb 2019 12:33:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=QiluadKv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730529AbfBKRcH (ORCPT + 99 others); Mon, 11 Feb 2019 12:32:07 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:53640 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbfBKRcH (ORCPT ); Mon, 11 Feb 2019 12:32:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=l/8BkGwH/DMSeIAmiqUBDgDFHaYCnWW4zMB0yKVQuZs=; b=QiluadKvKtGm4PDlDKgwhcAfT R3OaGstbe85cSNbJ3d/tvruljZdE7b5tfrC1SQ2FIAMnbzsgOacDjDl/vFw4c5H5Mwm2W1HlfFlip 7mdAx7tEyEUfrwUId2W4aCInHBAcAYjGpEQ6m9XvztRgOdOibG7YLNm9SuAvBvkEOlFPI=; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:54404) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gtFQz-0007sR-Nh; Mon, 11 Feb 2019 17:31:57 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1gtFQx-0001Lo-Ou; Mon, 11 Feb 2019 17:31:55 +0000 Date: Mon, 11 Feb 2019 17:31:55 +0000 From: Russell King - ARM Linux admin To: Marc Zyngier Cc: Alexander Syring , Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Rob Herring , Mark Rutland , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config Message-ID: <20190211173155.azppt37uvsd6rn2w@shell.armlinux.org.uk> References: <20190211171401.434-1-alex@asyring.de> <3040714f-471c-6773-57dd-455e7d1f195c@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3040714f-471c-6773-57dd-455e7d1f195c@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 05:27:37PM +0000, Marc Zyngier wrote: > On 11/02/2019 17:14, Alexander Syring wrote: > > According to U-Boot dts file enabling the SPI-NOR flash for use in > > Linux > > > > Signed-off-by: Alexander Syring > > --- > > .../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++---- > > 1 file changed, 18 insertions(+), 5 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi > > index 329f8ceeebea..83994ff46e2d 100644 > > --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi > > +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi > > @@ -333,11 +333,24 @@ > > status = "okay"; > > > > spi-flash@0 { > > - compatible = "st,w25q32"; > > - spi-max-frequency = <50000000>; > > - reg = <0>; > > - }; > > -}; > > + compatible = "st,w25q32", "jedec,spi-nor"; > > + reg = <0>; > > + spi-max-frequency = <50000000>; > > + > > + partitions { > > + compatible = "fixed-partitions"; > > + > > + partition@0 { > > + label = "U-Boot"; > > + reg = <0 0x200000>; > > + }; > > + partition@400000 { > > + label = "U-Boot Env"; > > + reg = <0x200000 0xce0000>; > > + }; > > + }; > > + }; > > +}; > > > > &cp1_usb3_0 { > > /* CPS Lane 2 - CON7 */ > > > > Really? > > My mcbin SPI flash doesn't have this partitioning, and doesn't have > u-boot at all. This should be provided by the bootloader itself, and not > baked into the reference DT. Exactly. Simple solution for the above. Instead of the above, create /etc/fw_env.config with: /dev/mtdblock0 0x200000 0x10000 Then its possible to read and write the u-boot environment using fw_printenv and fw_setenv. No partitions are required, and IMHO are pointless for such a scenario. That will allow those of us with a different SPI flash layout and already have this in /etc/fw_env.config: /dev/mtdblock0 0x3f0000 0x10000 to not experience any breakage. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up