[PATCH RFC v3 9/9] tools: board-id: Add test suite

2024-05-21 Thread Elliot Berman
Add a short test suite to demonstrate board-id selection and scoring. This patch isn't intended to be merged here. After compiling the kernel (esp. arch/arm64/boot/dts/qcom DTBs), run tools/board-id/test.py. The test cases provide a hypothetical firmware-provied board-id and compares expected out

[PATCH RFC v3 6/9] arm64: boot: dts: sm8650: Add board-id

2024-05-21 Thread Elliot Berman
Add board-id to match sm8650 MTPs and QRDs. Signed-off-by: Elliot Berman --- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 6 ++ arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 6 ++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom

[PATCH RFC v3 1/9] libfdt: board-id: Implement board-id scoring

2024-05-21 Thread Elliot Berman
The devicetree spec introduced a mechanism to match devicetree blobs to boards using firmware-provided identifiers. Although the matching can be implemented by DTB loaders, having a canonical implementation makes it easier to integrate and ensure consistent behavior across ecosystems. I've not yet

[PATCH RFC v3 3/9] fdt-select-board: Add test tool for selecting dtbs based on board-id

2024-05-21 Thread Elliot Berman
Introduce a tool which scores devicetrees based on their board-id and a supplied reference devicetree. This mechanism would be most similar to an proposal to EBBR where firmware provides a reference devicetree which contains the actual board identifier values, and an OS loader can choose to replace

[PATCH RFC v3 5/9] dt-bindings: board: Document board-ids for Qualcomm devices

2024-05-21 Thread Elliot Berman
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

[PATCH RFC v3 4/9] dt-bindings: arm: qcom: Update Devicetree identifiers

2024-05-21 Thread Elliot Berman
From: Amrit Anand Update existing documentation for qcom,msm-id (interchangeably: qcom,soc-id) and qcom,board-id. Add support for qcom,pmic-id, qcom,oem-id to support multi-DTB selection on Qualcomm's boards. "qcom,soc-id", "qcom,board-id" and "qcom,pmic-id" are tuples of two 32-bit values. The

[PATCH RFC v3 0/9] dt-bindings: hwinfo: Introduce board-id

2024-05-21 Thread Elliot Berman
Device manufacturers frequently ship multiple boards or SKUs under a single software package. These software packages will ship multiple devicetree blobs and require some mechanism to pick the correct DTB for the board the software package was deployed. Introduce a common definition for adding boar

[PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id

2024-05-21 Thread Elliot Berman
Device manufcturers frequently ship multiple boards or SKUs under a single softwre package. These software packages ship multiple devicetree blobs and require some mechanims to pick the correct DTB for the boards that use the software package. This patch introduces a common language for adding boar

[PATCH RFC v3 8/9] arm64: boot: dts: qcom: sm8550: Split into overlays

2024-05-21 Thread Elliot Berman
Generic sm8550 devicetree is split into a dtsi. Move it into its own DTB and preserve the boards as overlays. When not using overlays, 264 KB needed to store the sm8550-mtp.dtb and sm8550-qrd.dtb. When using overlays, 188 KB is needed to store sm8550.dtb, sm8550-mtp.dtbo, and sm8550-qrd.dtbo; wher

[PATCH RFC v3 7/9] arm64: boot: dts: qcom: Use phandles for thermal_zones

2024-05-21 Thread Elliot Berman
In preparation for converting sm8550 to use devicetree overlays, use phandles for thermal_zones. Signed-off-by: Elliot Berman --- arch/arm64/boot/dts/qcom/pm8010.dtsi| 62 arch/arm64/boot/dts/qcom/pm8550.dtsi| 32 arch/arm64/boot/dts/qcom/pm8550b.dtsi | 36

Re: [PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id

2024-05-21 Thread Rob Herring (Arm)
es:0: [2, 0, 24, 3, 1, 0, 5, 2] is too long from schema $id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.example.dtb: tsa@ae0: tdm@0:fsl,rx-ts-routes:0: [2, 0, 24, 3,

Re: [PATCH RFC v3 5/9] dt-bindings: board: Document board-ids for Qualcomm devices

2024-05-21 Thread Rob Herring (Arm)
ion/devicetree/bindings/board/qcom,board-id.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1430: dt_binding_check] Error 2 make: *** [Makefile:240: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://

Re: [PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id

2024-05-21 Thread Rob Herring
On Tue, May 21, 2024 at 2:25 PM Conor Dooley wrote: > > On Tue, May 21, 2024 at 08:21:45PM +0100, Conor Dooley wrote: > > On Tue, May 21, 2024 at 11:37:59AM -0700, Elliot Berman wrote: > > > Device manufcturers frequently ship multiple boards or SKUs under a > > > single softwre package. These sof