Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1234391pxu; Mon, 23 Nov 2020 15:29:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzop/zBBIiginfDeKpREl5k6lcKs0LWrw5pB8uGmEoXIR4kNkcLQBp1Dq+cT3MVwiKkaujI X-Received: by 2002:a50:c019:: with SMTP id r25mr1452805edb.372.1606174191174; Mon, 23 Nov 2020 15:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606174191; cv=none; d=google.com; s=arc-20160816; b=nHuz1XWfRBhxOz7wnHI1MfLLbDsNzN8/hwiTyhSeApT7F2gxAlOlhgbVkr9SfTcLbS vnol90EGtXKthjY3R6LLJaiDdve5LyKuWoZg3oIra+EOL2h7i7nLbm7O0olxm4gEUDad 7/fRV7zBg5+yFXWwQXzE0aqLImBPhU7WWsO18fWDexRlBEX/+wn/ChoohfBDyb2LAgxu FDQY/0uJ9dXz/wpHzZmNexV6Z55QRn/lkSFxqdW5ru/mRNDIzGpggg4awDJE0yLtPw2g GntwWmJyJhElSahxMF6uDHKxePEIPjlPMao/P20xyKt3U49/fs1P+qSiTH7X1uFZGKk1 Jq1g== 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=eOnRjyJE1Z3ZmRvnHPBEyLhFqGCMaC8++eicc5KO8Hc=; b=Lo6UfK13gxaIi8Mm3Zi7mp/QC/llJsA1BB/S9crTRvNb5CR9nN5sxQeYBO99rNtRhW fWEw34vJR5eWtpuGEi1XYgoGtYbjyTpzBLw3hpADbU089o9Ztyk2uKWLUqGGi1bpC11Y NA9TGkndjsb5gOSK8ZpNmtR/rRr/4yFQHUkSYwJ7n0qC/igpBZD2Cp5wuf56HghgHPs7 Jb9N2cBG0PmpDoggkfrMCWffwXwlKmz3xuftV8bt4yosgCFlg3kBmJd7bKv1HXElZUSo Rfkkyb+TyX7ry2ZVCaEHxXmQUpxxP51DGCG0ux2w9ihzx2acm62a29V7M8Ae6XA1rjts gkIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=LA8jjuYG; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=cS0kXU33; 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 q10si3890893ejp.175.2020.11.23.15.29.28; Mon, 23 Nov 2020 15:29:51 -0800 (PST) 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=LA8jjuYG; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=cS0kXU33; 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 S1728681AbgKWLPU (ORCPT + 99 others); Mon, 23 Nov 2020 06:15:20 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:46063 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728650AbgKWLPT (ORCPT ); Mon, 23 Nov 2020 06:15:19 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DD1895C0139; Mon, 23 Nov 2020 06:15:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 23 Nov 2020 06:15:15 -0500 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=eOnRjyJE1Z3ZmRvnHPBEyLhFqGC MaC8++eicc5KO8Hc=; b=LA8jjuYGrOYXkHJvG2tCZBmy/ZtwC0QMh5+zhXCIHuA hSOJFE5NB4Vl0s2rP5n0NxlOo903NHzy1t5AcyAt9QIkJeDLuup0G4M78G0BrSkA HRKcSBlVGEfQ/S9rneUfspzksqlwdz1Lmys61ull9ttT1WM21jfnrKGiTgAbp7Wy DlIEeB3T3TqZXYJa9wVldfmvIZwbjUTj53oZM9crHlk3GxmdkcLsVuIBGd725EHr 1/LbKFE5Ub3/8FpKdJJ3wZ3dlGvU6cVIj2vU/fncpECzcno3UWDuZ4yyDjlq00e+ sPjqMIQS8/Bt+RQzN/sftaun6FphXdvaCl5gLzYeSKA== 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=eOnRjy JE1Z3ZmRvnHPBEyLhFqGCMaC8++eicc5KO8Hc=; b=cS0kXU33YfnvKokdUjOrlp mCnr+Y00CncVHWBogwCtZoeci71aTXInsrCFHHI3lXBP8nPEBf3K1g9EOJsGQWII KIh9oVUWAFdD35bbo2DGBhYvyvl5HUeum6dsJoXaTyxOA1+g6G4WjrJOcgswGyQp sZmZn0intQSz+F1fhRCLSWrsGjuW34Y9q96iosKpVhMscz2IYe0BdVBetk4o8Qxt T/nG8OJr9ZEa7V1bTnk1uDWKyUJgYl1rmSX52ZXWPACzg2s8F83P8C51WY65We+s htCqnEOaVpG6VBvtFncOPgzwLJgn+kqYSZ9+kUK19NZutLM6HK3iwlIqVA8HJJHA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudegiedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh 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 76DEC3280063; Mon, 23 Nov 2020 06:15:14 -0500 (EST) Date: Mon, 23 Nov 2020 12:15:12 +0100 From: Maxime Ripard To: Samuel Holland Cc: Icenowy Zheng , devicetree@vger.kernel.org, Jernej Skrabec , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , linux-arm-kernel@lists.infradead.org Subject: Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: a64: add DT for PineTab developer sample Message-ID: <20201123111512.y7lbwsipbkcpuleb@gilmour> References: <20201107124958.2222253-1-icenowy@aosc.io> <20201107125332.2223197-1-icenowy@aosc.io> <20201110103925.rbej5ueo2fefbmlp@gilmour.lan> <6175E674-E8BC-4199-8BE8-A983065C32D5@aosc.io> <20201116155508.364dg6ycklwylswe@gilmour.lan> <8FFC1A6C-9CA4-4F94-91C4-F111A7519979@aosc.io> <20201120155939.3ajmbny2pka2vsnf@gilmour> <38ee5feb-e35d-801f-99a1-65e23618e73b@sholland.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2dkvbthaltnncon2" Content-Disposition: inline In-Reply-To: <38ee5feb-e35d-801f-99a1-65e23618e73b@sholland.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2dkvbthaltnncon2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Fri, Nov 20, 2020 at 08:51:48PM -0600, Samuel Holland wrote: > On 11/20/20 5:30 PM, Icenowy Zheng wrote: > >>>>>>> +/ { > >>>>>>> + model =3D "PineTab Developer Sample"; > >>>>>>> + compatible =3D "pine64,pinetab-dev", "allwinner,sun50i-a64"; > >>>>>>> +}; > >>>>>> > >>>>>> Changing the DT and the compatible half-way through it isn't ok. P= lease > >>>>>> add a new DT with the newer revision like we did for the pinephone > >>>>> > >>>>> We did this on Pine H64. > >>>> > >>>> What are you referring to? I couldn't find a commit where we did what > >>>> you suggested in that patch to the pine H64. > >>> > >>> Oh the situation is complex. On Pine H64, we didn't specify anything = at > >>> start (which is the same here), the DT is originally version-neutral > >>> but then transitioned to model B, then reverted to model A. Here the = DT is always > >>> for the sample. > >>> > >>> However, for Pine H64 there's model A/B names, but for PineTab there'= s no > >>> any samples that are sold, thus except who got the samples, all PineT= ab > >>> owners simply owns a "PineTab", not a "PineTab xxx version". > >> > >> It's fairly simple really, we can't really predict the future, so any = DT > >> submitted is for the current version of whatever board there is. This = is >=20 > I don't think that was the intention at all. The DT was submitted for a > future product, whatever that future product ends up being at the time > of its release. Since there are necessarily no users until the product > ships, there is no chance of breaking users by modifying the DT. There was no indication of that in the commit though > >> what we (somewhat messily) did for the PineH64, for the pinephone, or > >> really any other board that has several revisions >=20 > Surely a non-public prototype doesn't count as a separate revision! This > sort of policy strongly discourages ever shipping a board with > out-of-the-box mainline Linux support. Because if there any hardware > bugs fixed between initial upstreaming and production, the manufacture > must come up with a new DT name. >=20 > This is hostile to the users as well, because the "canonical" DT name no > longer matches the "canonical" (read: the only one ever available) > version of the hardware. >=20 > Do you want manufacturers to submit their initial board DT as > "$BOARD-prototype.dts", just in case they have to make a change before > production? And only after the board is shipped (with out-of-tree > patches, of course, to use $BOARD.dts, since the shipped board is *not* > the prototype) submit a "$BOARD.dts" to mainline? >=20 > Maxime, can you clarify specifically what the line is where a device > tree is "locked down" and further changes to the hardware require a new > name? First sample leaves the factory? $NUMBER units produced? First > sold to the public for money? The first board that is shipped to a user. From the wiki, the version supported here (I guess?) has been shipped to around 100 people, so it doesn't really qualify for the "non-public prototype". We still have to support these users, whether we like it or not. > Without some guidance, or a change in policy, this problem is going to > keep coming up again and again. There's a few things that are interleaved here. First, there's two hard rules: never change the DT name and never change the compatible of a board. The former would break any build system, boot script or documentation, and the latter would break the DT compatibility. Aside from this, things get a bit blurrier since it's mostly about the intent. I'm fine with having a DT for a non-public prototype if it's clear from day one that it is. In this particular case, the DT just stated that support for the pinetab was added. I guess anyone would make the assumption without any context that this would be for the (or a) final design. Finally, I'd also advise against submitting the parts that are still not finalized though, because this is also fairly bad for the users. Let's take the current situation as the example: from what I understand, the screen changed half-way through the process, and the first one was upstreamed. This means that any user that would use a kernel with that bugfix would have the display working, while rolling back to 5.9 would break the display, even though everyone claimed it was supported out-of-the-box in mainline. This is a worse situation than not supporting the display in the first place here. > You'll note that so far it has mostly affected Pine devices, and I don't > think that's because they make more board revisions than other > manufacturers. Yes definitely. Pine devices may be worse though because of their policy of making their prototypes public. I guess most of the issues we had also were due to poor communication: context on what were the Pine intentions were missing, and thus we couldn't catch things that turned out to be bad later on during review. > It's because they're actively involved in getting their > boards supported upstream. For other manufacturers, it's some user > sending in a device tree months after the hardware ships to the public > -- of course the hardware is more stable at that point. I mean, it's not black and white either. One could very well send the DT once the final design is done and that would still be upstreamed way before reaching the first user. > I think Pine's behavior is something we want to encourage, not > penalize. For the DT in particular, yes > > Okay. But I'm not satisfied with a non-public sample occupies > > the pinetab name. Is rename it to pinetab-dev and add a > > pinetab-retail okay? > > To me, naming the production version anything but "pinetab" isn't > satisfying either. I understand where you're coming from, but the point I was making my previous mail is precisely that it's not really possible. You want to name the early adopter version _the_ production version. Let's assume the hardware changes again between the early adopter and mass-production version. Which one will be _the_ production version? The early-adopter or the mass-produced one? There's really no good answer here, and both would suck in their own way. The only way to deal with this is to simply avoid defining one version as the one true board, and just loading the proper DT in u-boot based on whatever clue we have of the hardware revision. Maxime --2dkvbthaltnncon2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX7uZwAAKCRDj7w1vZxhR xY3cAQC5IXDgSlkXpILcFSvlB3PSbM5unhfUr47d0lKQUDhUTgD/YcnzjGKckV+5 4QxyC0mE0W0tPzOe08XA+V0JYwQ6YwE= =mv5t -----END PGP SIGNATURE----- --2dkvbthaltnncon2--