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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87E7AC25B78 for ; Sat, 25 May 2024 17:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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-Owner; bh=9m8ARDVHGmsblw6rANBGUwoDMoyYbDvzupz6m3Zib+8=; b=jxyMgK5ohwS2qdiiM4vabBYzkT kMIT/JFzyoC7gGwTc4TWy/I11o9zHwf6M5JdeEI2VY+Sm2zkwH/9jukU8WBuA9lN6q0OBN6FT8bMb PTJAsSYLVwnImvVXYdDEmyTi9KozqHY8KgaeJZtStnrhcXYcm71Pw0br/3ZBnLW+j9zYTg9rfkt79 4qs3uAREzEa2cePVguEc+fCgQ33xKm/S8gIEEoyOnnzuat6oq8Z3iKj7g8BzJtArNoZFVoSCrYFj5 C2Utm96GTEnLJxZEOJFj6Eyf/rrKIO+idjXrs1BLmC69bVuGZLTeYxYu6QEhhmanMxhTyBkyjvzWD Vd18zNrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAutA-0000000BNoo-0Gxa; Sat, 25 May 2024 17:09:00 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAut6-0000000BNoD-3NdB for linux-arm-kernel@lists.infradead.org; Sat, 25 May 2024 17:08:58 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9A9DACE095D; Sat, 25 May 2024 17:08:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9B7DC2BD11; Sat, 25 May 2024 17:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716656933; bh=oD+OOWOoYQr68PffjFpo9sEKBfMWG/HzUK2GEmo4o8Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HWDoq/3wp7P3PYnVAMNPqjxVsUcRALTfvCeGhy5UYpVz/Erxw/W+NOtZ3/3PFh2gX LQMdBMedGCkxIwzPPFG9qsfeJ0oTz9GwXCtUIS+hryZVg6Ke4hJHItZvXrVpi6tcKK 1kyBJVXnMX5/4g09OfYw2J6k1Wilx7T4egyA+R7MAdW1/NeJnnG711UMq2KOzCXCpH r78vyAqDOxm/ENB2bRjtXaBYL4jlMReUJoCmXCFkqOb/wUMWA+85SpCg+0sNZwq5l7 K3SasTjVArwI3eL+ka9DpfDjtCuLCgGQbro2AEq1pXpOtQVY1Wp8MVtQFpTYni7PRc w55N292HuVc5w== Date: Sat, 25 May 2024 18:08:46 +0100 From: Conor Dooley To: Elliot Berman Cc: Rob Herring , Frank Rowand , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Amrit Anand , Peter Griffin , Caleb Connolly , Andy Gross , Doug Anderson , Simon Glass , Chen-Yu Tsai , Julius Werner , "Humphreys, Jonathan" , Sumit Garg , Jon Hunter , Michal Simek , boot-architecture@lists.linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH RFC v3 5/9] dt-bindings: board: Document board-ids for Qualcomm devices Message-ID: <20240525-parachute-plutonium-ef8d1472ff50@spud> References: <20240521-board-ids-v3-0-e6c71d05f4d2@quicinc.com> <20240521-board-ids-v3-5-e6c71d05f4d2@quicinc.com> MIME-Version: 1.0 In-Reply-To: <20240521-board-ids-v3-5-e6c71d05f4d2@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240525_100857_234293_BBA3A17E X-CRM114-Status: GOOD ( 25.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7559096250092996338==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7559096250092996338== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="A98bZ1uEY8yJEbmg" Content-Disposition: inline --A98bZ1uEY8yJEbmg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 21, 2024 at 11:38:02AM -0700, Elliot Berman wrote: > Document board identifiers for devices from Qualcomm Technologies, Inc. > These platforms are described with two mechanisms: the hardware SoC > registers and the "CDT" which is in a RO storage. >=20 > The hardware SoC registers describe both the SoC (e.g. SM8650, SC7180) > as well as revision. Add qcom,soc to describe only the SoC itself and > qcom,soc-version when the devicetree only works with a certain revision. >=20 > The CDT describes all other information about the board/platform. > Besides the platform type (e.g. MTP, ADP, CRD), there are 3 further > levels of versioning as well as additional fields to describe the PMIC > and boot storage device attached. The 3 levels of versioning are a > subtype, major, and minor version of the platform. Support describing > just the platform type (qcom,platform), the platform type and subtype > (qcom,platform-type), and all 4 numbers (qcom,platform-version). >=20 > Signed-off-by: Elliot Berman > --- > .../devicetree/bindings/board/qcom,board-id.yaml | 144 +++++++++++++++= ++++++ > 1 file changed, 144 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/board/qcom,board-id.yaml b= /Documentation/devicetree/bindings/board/qcom,board-id.yaml > new file mode 100644 > index 000000000000..53ba7acab4c3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/board/qcom,board-id.yaml > @@ -0,0 +1,144 @@ > +# SPDX-License-Identifier: BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/board/qcom,board-id.yaml > +$schema: http://devicetree.org/meta-schemas/core.yaml > + > +title: Board identifiers for devices from Qualcomm Technologies, Inc. > +description: Board identifiers for devices from Qualcomm Technologies, I= nc. > + > +maintainers: > + - Elliot Berman > + > +properties: > + $nodename: > + const: 'board-id' > + > + qcom,soc: > + description: > + List of Qualcomm SoCs this devicetree is applicable to. > + > + qcom,soc-version: > + items: > + items: > + - description: Qualcomm SoC identifier > + - description: SoC version > + > + qcom,platform: > + description: > + List of Qualcomm platforms this devicetree is applicable to. > + > + qcom,platform-type: > + items: > + items: > + - description: Qualcomm platform type identifier > + - description: Qualcomm platform subtype > + > + qcom,platform-version: > + items: > + items: > + - description: Qualcomm platform type identifier > + - description: Qualcomm platform subtype > + - description: Qualcomm platform major and minor version. > + > + qcom,boot-device: > + description: > + Boot device type > + > + qcom,pmic: > + description: > + List of Qualcomm PMIC attaches > + > + qcom,pmic-id: > + items: > + items: > + - description: Qualcomm PMIC identifier > + - description: Qualcomm PMIC revision > + > +allOf: > + # either describe soc or soc-version; it's confusing to have both Why not just use the one that has the most information and discard the others? If your dtb picker for this platform doesn't care about the soc version, then just don't look at that cell? Likewise for platform and PMIC, why can't you ignore the cells you don't care about, rather than having a new property for each variant? Nothing in this patch explains why multiple variants are required rather than just dealing with the most informational. Thanks, Conor. > + - if: > + properties: > + qcom,soc: true > + then: > + properties: > + qcom,soc-version: false > + - if: > + properties: > + qcom,soc-version: true > + then: > + properties: > + qcom,soc: false > + > + # describe one of platform, platform-type, or platform-version; it's c= onfusing to have multiple > + - if: > + properties: > + qcom,platform: true > + then: > + properties: > + qcom,platform-type: false > + qcom,platform-version: false > + - if: > + properties: > + qcom,platform-type: true > + then: > + properties: > + qcom,platform: false > + qcom,platform-version: false > + - if: > + properties: > + qcom,platform: true > + then: > + properties: > + qcom,platform: false > + qcom,platform-type: false > + > + # either describe pmic or pmic-id; it's confusing to have both > + - if: > + properties: > + qcom,pmic: true > + then: > + properties: > + qcom,pmic-id: false > + - if: > + properties: > + qcom,pmic-id: true > + then: > + properties: > + qcom,pmic: false > + > +additionalProperties: true > + > +examples: > + - | > + #include > + / { > + compatible =3D "qcom,sm8650"; > + board-id { > + qcom,soc =3D ; > + qcom,platform =3D ; > + }; > + }; > + > + - | > + #include > + / { > + compatible =3D "qcom,sm8650"; > + board-id { > + qcom,soc-version =3D , > + ; > + qcom,platform-type =3D , ; > + }; > + }; > + > + - | > + #include > + / { > + compatible =3D "qcom,sm8650"; > + board-id { > + qcom,soc =3D ; > + qcom,platform-version =3D , > + ; > + qcom,boot-device =3D ; > + }; > + }; >=20 > --=20 > 2.34.1 >=20 --A98bZ1uEY8yJEbmg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZlIbHgAKCRB4tDGHoIJi 0ra+AQDEoFa2vpuunjIrZlnjVrWlBEXl/FNWKRB4NdVTCzeCFgEAl6U1vl8Lwh4W zaBtPCnhIm0w8+h4XSwJ3r2eizsvRAw= =llk1 -----END PGP SIGNATURE----- --A98bZ1uEY8yJEbmg-- --===============7559096250092996338== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7559096250092996338==--