linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Amrit Anand <quic_amrianan@quicinc.com>
To: <robh@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<conor+dt@kernel.org>, <agross@kernel.org>,
	<andersson@kernel.org>, <konrad.dybcio@linaro.org>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <kernel@quicinc.com>,
	<peter.griffin@linaro.org>, <caleb.connolly@linaro.org>,
	<linux-riscv@lists.infradead.org>,
	<chrome-platform@lists.linux.dev>,
	<linux-mediatek@lists.infradead.org>,
	Amrit Anand <quic_amrianan@quicinc.com>
Subject: [PATCH v2 0/2] Add board-id support for multiple DT selection
Date: Thu, 14 Mar 2024 17:41:50 +0530	[thread overview]
Message-ID: <1710418312-6559-1-git-send-email-quic_amrianan@quicinc.com> (raw)

The software packages are shipped with multiple device tree blobs supporting
multiple boards. For instance, suppose we have 3 SoC, each with 4 boards supported,
along with 2 PMIC support for each case which would lead to total of 24 DTB files.
Along with these configurations, OEMs may also add certain additional board variants.
Hence, a mechanism is required to pick the correct DTB for the board on which the
software package is deployed. Introduce a unique property for adding board identifiers
to device trees. Here, board-id property provides a mechanism for Qualcomm based
bootloaders to select the appropriate DTB.

Isn't that what the compatible property is for?
-----------------------------------------------
The compatible property can be used for board matching, but requires
bootloaders and/or firmware to maintain a database of possible strings
to match against or have complex compatible string parsing and matching.
Compatible string matching becomes complicated when there are multiple
versions of the same board. It becomes difficult for the device tree
selection mechanism to recognize the right DTB to pick, with minor
differences in compatible strings.

The solution proposed here is simpler to implement and doesn't require the need
to update bootloader for every new board.

How is this better than Qualcomm's qcom,msm-id/qcom,board-id?
-------------------------------------------------------------
Qualcomm's qcom,msm-id/qcom,board-id are not scalable for other distinguishing
features as we need to add a new property every time. Board-id property provide
a solution that the bootloader can use to select appropriate device tree. Board-id
encapsulates soc, board, pmic and oem identifiers. Qualcomm based bootloader can use
these key-value pairs to uniquely identify the device tree. This solution scales well
for cases where additional identifiers would be needed for device tree selection
criteria. Adding a new tuple in "board-id" along with "board-id-type" will help support it.
				      
Changes in V2:
 - Based on comment on V1 related to challenges on designing common bootloader for all
   the vendors, where different vendors can have different representation of board-id
   and the best and exact match logic can also be different for different vendors, moving
   the board-id definition in qcom specific binding.
 - Adding support for board IDs for all the boards that are in kernel.org.
 - Adding Qualcomm bootloader best/exact match logic for multi DT selection. 
 - Keeping list of other vendors in CC for comment/awareness related to this requirement 
 - Link to V1: https://lore.kernel.org/all/1705749649-4708-1-git-send-email-quic_amrianan@quicinc.com/

Amrit Anand (2):
  dt-bindings: arm: qcom: Update Devicetree identifiers
  dt-bindings: qcom: Update DT bindings for multiple DT

 Documentation/devicetree/bindings/arm/qcom.yaml | 90 +++++++++++++++++++++++++
 include/dt-bindings/arm/qcom,ids.h              | 86 ++++++++++++++++++++---
 2 files changed, 167 insertions(+), 9 deletions(-)

-- 
2.7.4


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2024-03-14 12:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 12:11 Amrit Anand [this message]
2024-03-14 12:11 ` [PATCH v2 1/2] dt-bindings: arm: qcom: Update Devicetree identifiers Amrit Anand
2024-03-14 14:29   ` Caleb Connolly
2024-05-07  5:07     ` Amrit Anand
2024-03-14 12:11 ` [PATCH v2 2/2] dt-bindings: qcom: Update DT bindings for multiple DT Amrit Anand
2024-03-14 13:35   ` Rob Herring
2024-03-14 14:20   ` Caleb Connolly
2024-03-14 14:35     ` Caleb Connolly
2024-03-14 20:07     ` Elliot Berman
2024-03-16 16:20     ` Conor Dooley
2024-03-16 16:51       ` Conor Dooley
2024-03-18 21:36         ` Doug Anderson
2024-03-28  5:49           ` Chen-Yu Tsai
2024-03-28  8:50 ` [PATCH v2 0/2] Add board-id support for multiple DT selection Krzysztof Kozlowski

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=1710418312-6559-1-git-send-email-quic_amrianan@quicinc.com \
    --to=quic_amrianan@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=caleb.connolly@linaro.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@quicinc.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=peter.griffin@linaro.org \
    --cc=robh@kernel.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;
as well as URLs for NNTP newsgroup(s).