From: Conor Dooley <conor@kernel.org>
To: Elliot Berman <quic_eberman@quicinc.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Amrit Anand <quic_amrianan@quicinc.com>,
Peter Griffin <peter.griffin@linaro.org>,
Caleb Connolly <caleb.connolly@linaro.org>,
Andy Gross <agross@kernel.org>,
Doug Anderson <dianders@chromium.org>,
Simon Glass <sjg@chromium.org>, Chen-Yu Tsai <wenst@chromium.org>,
Julius Werner <jwerner@chromium.org>,
"Humphreys, Jonathan" <j-humphreys@ti.com>,
Sumit Garg <sumit.garg@linaro.org>,
Jon Hunter <jonathanh@nvidia.org>,
Michal Simek <michal.simek@amd.com>,
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
Date: Sat, 25 May 2024 18:08:46 +0100 [thread overview]
Message-ID: <20240525-parachute-plutonium-ef8d1472ff50@spud> (raw)
In-Reply-To: <20240521-board-ids-v3-5-e6c71d05f4d2@quicinc.com>
[-- Attachment #1.1: Type: text/plain, Size: 5962 bytes --]
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.
>
> 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.
>
> 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).
>
> Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
> ---
> .../devicetree/bindings/board/qcom,board-id.yaml | 144 +++++++++++++++++++++
> 1 file changed, 144 insertions(+)
>
> 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, Inc.
> +
> +maintainers:
> + - Elliot Berman <quic_eberman@quicinc.com>
> +
> +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 confusing 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 <dt-bindings/arm/qcom,ids.h>
> + / {
> + compatible = "qcom,sm8650";
> + board-id {
> + qcom,soc = <QCOM_ID_SM8650>;
> + qcom,platform = <QCOM_BOARD_ID_MTP>;
> + };
> + };
> +
> + - |
> + #include <dt-bindings/arm/qcom,ids.h>
> + / {
> + compatible = "qcom,sm8650";
> + board-id {
> + qcom,soc-version = <QCOM_ID_SM8650 QCOM_SOC_REVISION(1)>,
> + <QCOM_ID_SM8650 QCOM_SOC_REVISION(2)>;
> + qcom,platform-type = <QCOM_BOARD_ID_MTP 0>, <QCOM_BOARD_ID_MTP 1>;
> + };
> + };
> +
> + - |
> + #include <dt-bindings/arm/qcom,ids.h>
> + / {
> + compatible = "qcom,sm8650";
> + board-id {
> + qcom,soc = <QCOM_ID_SM8650>;
> + qcom,platform-version = <QCOM_BOARD_ID(MTP, 0, 1, 0)>,
> + <QCOM_BOARD_ID(MTP, 0, 1, 1)>;
> + qcom,boot-device = <QCOM_BOARD_BOOT_UFS>;
> + };
> + };
>
> --
> 2.34.1
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-25 17:09 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 18:37 [PATCH RFC v3 0/9] dt-bindings: hwinfo: Introduce board-id Elliot Berman
2024-05-21 18:37 ` [PATCH RFC v3 1/9] libfdt: board-id: Implement board-id scoring Elliot Berman
2024-05-21 19:28 ` Conor Dooley
2024-05-22 23:57 ` Elliot Berman
2024-05-21 18:37 ` [PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id Elliot Berman
2024-05-21 19:19 ` Rob Herring (Arm)
2024-05-21 19:21 ` Conor Dooley
2024-05-21 19:25 ` Conor Dooley
2024-05-21 21:32 ` Rob Herring
2024-05-21 21:47 ` Conor Dooley
2024-05-22 23:47 ` Elliot Berman
2024-05-22 23:54 ` Elliot Berman
2024-05-23 1:23 ` Rob Herring (Arm)
2024-05-25 16:54 ` Conor Dooley
2024-05-29 15:43 ` Elliot Berman
2024-05-21 18:38 ` [PATCH RFC v3 3/9] fdt-select-board: Add test tool for selecting dtbs based on board-id Elliot Berman
2024-05-21 18:38 ` [PATCH RFC v3 4/9] dt-bindings: arm: qcom: Update Devicetree identifiers Elliot Berman
2024-05-25 17:21 ` Conor Dooley
2024-05-29 15:34 ` Elliot Berman
2024-05-21 18:38 ` [PATCH RFC v3 5/9] dt-bindings: board: Document board-ids for Qualcomm devices Elliot Berman
2024-05-21 19:19 ` Rob Herring (Arm)
2024-05-25 17:08 ` Conor Dooley [this message]
2024-05-29 15:09 ` Elliot Berman
2024-05-21 18:38 ` [PATCH RFC v3 6/9] arm64: boot: dts: sm8650: Add board-id Elliot Berman
2024-06-05 8:18 ` Krzysztof Kozlowski
2024-05-21 18:38 ` [PATCH RFC v3 7/9] arm64: boot: dts: qcom: Use phandles for thermal_zones Elliot Berman
2024-05-21 18:38 ` [PATCH RFC v3 8/9] arm64: boot: dts: qcom: sm8550: Split into overlays Elliot Berman
2024-06-05 8:20 ` Krzysztof Kozlowski
2024-05-21 18:38 ` [PATCH RFC v3 9/9] tools: board-id: Add test suite Elliot Berman
2024-05-21 19:00 ` [PATCH RFC v3 0/9] dt-bindings: hwinfo: Introduce board-id Dmitry Baryshkov
2024-05-24 15:51 ` Konrad Dybcio
2024-05-27 7:19 ` Michal Simek
2024-05-29 15:32 ` Elliot Berman
2024-05-30 14:12 ` Michal Simek
2024-06-05 13:17 ` Simon Glass
2024-06-05 17:17 ` Elliot Berman
2024-06-06 16:00 ` Simon Glass
2024-06-21 22:40 ` Elliot Berman
2024-06-22 7:18 ` Dmitry Baryshkov
2024-06-28 7:33 ` Simon Glass
2024-06-28 8:04 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240525-parachute-plutonium-ef8d1472ff50@spud \
--to=conor@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=boot-architecture@lists.linaro.org \
--cc=caleb.connolly@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=frowand.list@gmail.com \
--cc=j-humphreys@ti.com \
--cc=jonathanh@nvidia.org \
--cc=jwerner@chromium.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=peter.griffin@linaro.org \
--cc=quic_amrianan@quicinc.com \
--cc=quic_eberman@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=wenst@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox