Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3538365pxu; Mon, 19 Oct 2020 14:52:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0TJBkWszPo9WCuqlucFX/6601YIBI0HYQ7pJD3ln0L6O+/A65HLJbM5b7JhD0psuldZ9i X-Received: by 2002:a50:fc09:: with SMTP id i9mr2030280edr.3.1603144369935; Mon, 19 Oct 2020 14:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603144369; cv=none; d=google.com; s=arc-20160816; b=PH0j/RGhk/Zj2gBbqlQEKsCOx7eb+M3BuxGFtbfP5QXZJsvz7Rnd8GSmt2NUKVjCsB WeYaAwHi5zSBti5w1Hl5C6MrSw5UyMbsccYm6tNOLnK6YR9o8Ew/zTBd7g60sD2gRhTf rNTYJOncM5XZjmn0yacL2Oi24Ddd5DDsqZo6VbqFbkeXp18gIAkORwpRjBP46hJb89bz 22pAP0cLtygSd8OlfBHFCMrllcGOyUL3gVQwNVAzRuyStPkKS8FF8h1gzRAUL3OJAA62 fJ/gDILBYuYW7iRo2Drp8UqTKd7Ig9BgFfF9qoomA+cSWPp9zE2iO8MQLe/sU2BSNkCd ytlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=34lTEUkxXEEYOk9ylxSpTaMMgwCXAUNQHtvP3Fum2F4=; b=gPt5KMg6a2xtdv4n1+jWMWVY7rauQS+OqWsr4N8cOdEZJayCGkV/JLB7dG/LiQ6i4d xFTTzC3o+LaaIvnXqqfEUhK4VlXZ9fbNr+6f1kgJBiieIsjapiTopMslyROxDoTGQFwx Mgmbjm8g8hvLEOVFIMkD9XKFojyifNkTIZB14tmH3jMwRjhIQ85+l/imbmL9LlJDZjiA Xu72xpUFgd7bgRW3vNbFrMBarYoYM0dceVPuLw49KSh3rdQU5sJOKdHvi10NxwlyAPqu QhWsYnNUovIG+iDyRg0xQvUychO/pdq60NDuzBF2HIWWbB7vQnnNopwQvQqofcRkxcPg UK5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=VTKh39gH; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=GThO5QCN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bg10si963692ejb.240.2020.10.19.14.52.27; Mon, 19 Oct 2020 14:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=VTKh39gH; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=GThO5QCN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728837AbgJSKIo (ORCPT + 99 others); Mon, 19 Oct 2020 06:08:44 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60801 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727192AbgJSKIo (ORCPT ); Mon, 19 Oct 2020 06:08:44 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0571A5C013A; Mon, 19 Oct 2020 06:08:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 19 Oct 2020 06:08:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=34lTEUkxXEEYOk9ylxSpTaMMgwC XAUNQHtvP3Fum2F4=; b=VTKh39gHTt5XWAP90IKuZVnwpbrTDT1UIoMTQtyqzxm 41j5dCMov0Lp9A8Cy5WOqC5G0DwHPAGAAqxdvfJ6Da7segfCZvoc2hiC70W9KcRl KuhpyHrwSqcFytyKSvwF/KcBuVNOWH2CRVSY0C5qALlsYV3ZPhfP8z/2mPeuyCuu g8HODwX9e4slObjPpKMXU5MZGT74hEShfldvkkHg+JU85jUg7xUvuwUtmEyPb97l 3HDKFWJrbc0XIsMHEal629ZuozEbFdyOE4CQSCovn3+9hnHnUT6YReDQmtOGcC8a jV4E8ZGd+MqB68QNwASCUUAya1VRXgTY/IT307vrzSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=34lTEU kxXEEYOk9ylxSpTaMMgwCXAUNQHtvP3Fum2F4=; b=GThO5QCNeq/XNEnpHUQ7Sr YsyeWqfjkQFN2KRmGVr7uDUHPm2aoFbQhJVopcJVmPQ7RPXDQ+qwnnxu4D1Nof/3 3IPjrulq5hzAN70peDvUkfIsm/iCzZIQPeg0cuLBmi6M9/+pMvyt+dZAW/sXIpTY 0Z9Eyg6utbFc6lmJrWryITh3YoZh01bw/FfFFQ0HOrSXuz15/Svl2v3uK6U1wjos WhXuGFwa6OnCx9qk9TpDVgdRDEfAkMIPysqqjOb7LszQx+HCfQyWxLdlYv3GE7Ck Bv5y00mRyXmqyuGvZ1AMtgE8ZaiVqAVh26VAE5cI5k0mWf+dDrAiA1XS06RWXuVg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrjedugddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvfefftedvuddvkeekteeiudefhfettdetleefieefhefhieduudekueettefh tdenucffohhmrghinhepohhrrghnghgvphhirdhorhhgpdgsohhothhlihhnrdgtohhmne cukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id E6173328005D; Mon, 19 Oct 2020 06:08:41 -0400 (EDT) Date: Mon, 19 Oct 2020 12:08:40 +0200 From: Maxime Ripard To: Michal =?utf-8?B?U3VjaMOhbmVr?= Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: dts: sun8i: h2+: Enable optional SPI flash on Orange Pi Zero board Message-ID: <20201019100840.vntpu7d2eiun3zek@gilmour.lan> References: <20200929083025.2089-1-msuchanek@suse.de> <20201008151315.v3geykbs6musl4wq@gilmour.lan> <20201008160219.GM29778@kitsune.suse.cz> <20201008171454.qixrcjmhzko766su@gilmour.lan> <20201008174044.GN29778@kitsune.suse.cz> <20201012153507.ft77jgaprpendpne@gilmour.lan> <20201012170325.GS29778@kitsune.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pdudt7bfmn67gt2h" Content-Disposition: inline In-Reply-To: <20201012170325.GS29778@kitsune.suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pdudt7bfmn67gt2h Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 12, 2020 at 07:03:25PM +0200, Michal Such=E1nek wrote: > > > >=20 > > > > > Also the boards that do not have the flsh are either broken or > > > > > obsolete. > > > >=20 > > > > Making general statements without arguments doesn't really make it = true > > > > though. Plenty of boards to have flash and are neither broken nor > > > > obsolete. > > > > > > Cannot parse this. > >=20 > > "Plenty of boards do not have flash and are neither broken nor obsolete" > The product description of Orange Pi Zero clearly states there is a > flash memory: http://www.orangepi.org/orangepizero/ >=20 > When you order an Orange Pi Zero it comes with a flash memory. That is > not what the device tree describes. The device tree is supposed to > descrbe the hardware. If it does not it is broken. >=20 > If you have a board without a flash memory I do not know what it is but > it is clearly not an Orange Pi Zero because it comes with one. If you're buying it today, yes. If you take a random Orange Pi Zero that has been sold at any point in time, you cannot make that statement. > > > >=20 > > > > > So most of the time enabling the flash chip is the right thing. > > > > >=20 > > > > > Or do we need two DTBs like sun8i-h2-plus-orangepi-zero.dts and > > > > > sun8i-h2-plus-orangepi-zero-no-spi-nor.dts > > > >=20 > > > > No, you need sun8i-h2-plus-orangepi-zero plus an overlay for the > > > > SPI-NOR. > > > > > > The flash is part of the board. > >=20 > > Not always though. > No, it always comes with one. You must be speaking of a different board > then. > >=20 > > > There is no need for an overlay. > >=20 > > Overlays are here to deal with the "not always though" situation... > > There are no overlays in the kernel. Please show me tho code in the > kernel for handling overlays. You're the one that mentioned the kernel here, but here you are: https://elixir.bootlin.com/linux/v5.9.1/source/include/linux/of.h#L1455 And a driver using it: https://elixir.bootlin.com/linux/v5.9.1/source/drivers/gpu/drm/rcar-du/rcar= _du_of.c#L44 > > > And overlays don't exist. > >=20 > > If you want to believe that, please go ahead. > >=20 > > But there's support for it in libfdt, and you can either apply them > > directly through the U-Boot command line, or bundle them in a FIT image. > > And as you state the user ususally does not know which version of the Pi > they have. How are they supposed to know that they should apply an > overlay through u-boot commandline (if they even get to see one) Documentation? > bundle them in a FIT image (if they are even using a FIT image). That would be the distro's job, not the user's. > I am doing neither. I boot a standard distribution kernel from EFI > grub. >=20 > I understand that it would be nice to support two almost identical > boards with a single device tree. However, if an error about missing > flash memory is not acceptable, and the kernel does not support > enabling the flash memory dynamically we need two device trees then. You keep moving the goalposts, but U-boot is perfectly able to apply an overlay automatically at boot without the user's intervention. We're already making it select various DTs for the pine64 and pine64+ to have a single image for both, or for the pinephone variants. Maxime --pdudt7bfmn67gt2h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX41lqAAKCRDj7w1vZxhR xejPAP0XzhVecdEKFAwu1TUIo43F0qYib6ce1Ozlu2eyGCuNpAEA+3RTWPJzgs3f 3nRfBMDryEuhjb4QzXqcDzI60l+GoQU= =AOh6 -----END PGP SIGNATURE----- --pdudt7bfmn67gt2h--