Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp424583rdb; Tue, 23 Jan 2024 04:09:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGomAIMWU6CB9Sc6zZ6L7ktEoTFfSFKwxKOvvfBxRMK9P/lzzhrT8FB7sMFk1Y7UhZ3vRva X-Received: by 2002:a17:907:7f93:b0:a2d:e4b9:45b4 with SMTP id qk19-20020a1709077f9300b00a2de4b945b4mr3104658ejc.75.1706011764824; Tue, 23 Jan 2024 04:09:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706011764; cv=pass; d=google.com; s=arc-20160816; b=UdYXzR6q5vUxX9MgiDsG7ljw2DKYDsW7iF7caGzruwSx3cRcGqzQ3phx5/R6OmUbIX j8vIIHz3ydV11Cs4Ii3dNrjXyGyvxPR/IPq2/nVNog5qMfOti9Lh6YNjncrmuv4pqm7B yINbzUqoPN7BnLZH4/Fj1TauEB4GTfBakl7NLp67rKEiKyMYYp8IqyVYZ80zUJfGk2SF daPQw++bfzivsSI9EBmAB6dEwx5foY4YFVv16hhSXGGjRmoxeEpS2vn8mGD3haebxp/K IoXtLdnksCPJcugcPmQ4hSnz1yN0cEEv0GN+wfuaOqZWDz2+3Ynm7FqaR0Rg4cwAkEFj Tf4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=l3C8Fw5l+jhncPA4wDIldFznr0WXO1yKPR2qB2QrPqU=; fh=lM6CzfKR6Fj85E/DkUASk/M3Ht03MV+8Yp6NwzjBXPA=; b=hEJ8U+f7Yqg8bBpRe3uQd7F9P39tAC7s97b+Ky/j11aZvH1Ld3Eqc2+zVxuglg7+S8 DD+nccC4C+51qmpgRO8NPvoMWEUaeRRMCnGrXOstGGMv2PYhuEGqHZ4V8MzYbaa1CIRf Uso+TgDiBi8e7pWXFcUwme0nbURL9yhmdm5C8wBX4dF3IjySYeqRc9dZjWvGuQnReeIu zeA7RW8oLBC4Y6FYazf+HP/crVE/fKFfTnt7dwPE8wdKeMQlqdLjFANibI+X7DD6KGmh Ucl2HmTAqyMRQjob+Eh1RNX1HrON+v+brMLMFCf+OhowusLXRULswH0ek8rjBRH85p5w NZzg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j6MkMbWm; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-35230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p15-20020a1709061b4f00b00a30be2b44a4si668785ejg.178.2024.01.23.04.09.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 04:09:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j6MkMbWm; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-35230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6B1AA1F22A93 for ; Tue, 23 Jan 2024 12:09:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09FCE5DF08; Tue, 23 Jan 2024 12:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j6MkMbWm" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32C605D916 for ; Tue, 23 Jan 2024 12:09:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706011753; cv=none; b=a9sY5woJZ5vBZXkxtlJFVWIA4bKtwx/8oS7WxpFDHFxlzIXnD27TX3u9vzCHh988LwbAncnEaVTxGl4BEFj4mydY9YoCNUIz083XAK8r1lHxGiC1qAnxw7/EiW346HqzcL7qP+YUJkCJ1BDecNd7JMl2cJyC3vQso02XJkop/Ik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706011753; c=relaxed/simple; bh=FFfT5q80Hs3zDMjLI3EodrE/Zh2o/sWHApPCFclFeC0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=E3Weyqo41rB23ZYdmp4bfY+zBTKA5bny8zrMoFpcXNE72dqKBklBC5K7ekpEilpMC9lgwPD31DpNIe4ZSdzu8LF2oeqytBFA9ZuL+MIjkDZ78YZCUn7ySTxAngCTIAEEaVQGFVNZ99FIfLfiOocsGqdzCvW2onTOaEHdvrXfQFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=j6MkMbWm; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3392291b21bso3608113f8f.1 for ; Tue, 23 Jan 2024 04:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706011749; x=1706616549; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=l3C8Fw5l+jhncPA4wDIldFznr0WXO1yKPR2qB2QrPqU=; b=j6MkMbWm/Ky+OXkpG8xFxAoK6HPI8/NmzIXR/+CHWPrj8HvPFbQGmX7CKu+xqi1z1m lkls/ofkWLmM1H2JLoGr9b86FFF6if14T8L4VlzkvMVQC//RzL6P5lHwPEwyC/7wumU+ 2VNodlIz4kV5EAFz/aLK7o6zzFhTjcuPv4xzXr5mt6OTEHcRiu1Krtjf8Wbw2t5uS//9 Z8dzEcuFEMCUe/hXKbCdnbVv0eso1qkUpdKDNYZjNsEZyFlc7Z704XyQlFDUUrzO/M8w S8ZgtjyQnT+E1tPZTAKb5NaXT875yQKnYEtWotHLGIVd6n7YDJnED64ddHCAg93kllTW TA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706011749; x=1706616549; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l3C8Fw5l+jhncPA4wDIldFznr0WXO1yKPR2qB2QrPqU=; b=i27eUq0dTo+LA5cqATC8394QF8VKM4sLWQnvRdIz4GAUeGe4gPG2qnl0u0ag6YQ922 tX4tvkvYyS3FOymtRVm3WZTkwjzejrAdNjE99AB33Yd9wHSTTRki9YdKcsu7Vq5H+Oa3 Po+V9sETQ4M+dZyQZWdeIh8GN6jtEr11sT25j4MpREqZ0pzzwTrzryGQ1+9TdY3QaPqc JcZf2rAdsbMWI+xR/yT7KD2UDnX1W0W4vOmQd/KhpHe3m1sAjtrEg2QDQEH+vdnXP0yh bIELgSu3W0znuuELnThXA930FpwGAbmliIM1JgOb14rs8Afx0Cx7Ku1MWlKKQhwxhBDr Ilww== X-Gm-Message-State: AOJu0YzYVoF5JDl0x1LiYwYW7xleIUYVDt+aaOVAVjbCnSiCqcSGdxkl BE/OpGJfWuLdAborPrpYJzihxuPcXNUUzVIFRe38On74EYxYWlHii7fDNibobTA= X-Received: by 2002:a05:6000:1f89:b0:339:372e:7714 with SMTP id bw9-20020a0560001f8900b00339372e7714mr2297966wrb.32.1706011749386; Tue, 23 Jan 2024 04:09:09 -0800 (PST) Received: from [192.168.1.20] ([178.197.215.66]) by smtp.gmail.com with ESMTPSA id j14-20020a5d604e000000b003392cdeb3a2sm7140080wrt.103.2024.01.23.04.09.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Jan 2024 04:09:09 -0800 (PST) Message-ID: <1fc9815e-76dd-41d7-aa1a-caa72ef4ad34@linaro.org> Date: Tue, 23 Jan 2024 13:09:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] dt-bindings: hwinfo: Introduce board-id Content-Language: en-US To: Amrit Anand , robh+dt@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, Elliot Berman References: <1705749649-4708-1-git-send-email-quic_amrianan@quicinc.com> <1705749649-4708-2-git-send-email-quic_amrianan@quicinc.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+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qsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <1705749649-4708-2-git-send-email-quic_amrianan@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20/01/2024 12:20, Amrit Anand wrote: > From: Elliot Berman > > > How is this better than Qualcomm's qcom,msm-id/qcom,board-id? > ------------------------------------------------------------- > The selection process for devicetrees was Qualcomm-specific and not > useful for other devices and bootloaders that were not developed by > Qualcomm because a complex algorithm was used to implement. Board-ids > provide a matching solution that can be implemented by bootloaders > without introducing vendor-specific code. Qualcomm uses three > devicetree properties: msm-id (interchangeably: soc-id), board-id, and > pmic-id. This does not scale well for use casese which use identifiers, > for example, to distinguish between a display panel. For a display > panel, an approach could be to add a new property: display-id, > but now bootloaders need to be updated to also read this property. We > want to avoid requiring to update bootloaders with new hardware Some mis-indentation in two lines above. > identifiers: a bootloader need only recognize the identifiers it can > handle. > > Signed-off-by: Elliot Berman > Signed-off-by: Amrit Anand > --- > .../devicetree/bindings/hwinfo/board-id.yaml | 53 ++++++++++++++++++++++ > 1 file changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwinfo/board-id.yaml > > diff --git a/Documentation/devicetree/bindings/hwinfo/board-id.yaml b/Documentation/devicetree/bindings/hwinfo/board-id.yaml I think we should add it to dtschema, because bootloaders are using these. > new file mode 100644 > index 0000000..82d5ff7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwinfo/board-id.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwinfo/board-id.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Board Identifier for Devicetree Selection > + > +maintainers: > + - Amrit Anand > + - Elliot Berman > + > +description: | Do not need '|' unless you need to preserve formatting. > + Device manufacturers frequently ship multiple boards 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. board-id provides a mechanism for > + bootloaders to select the appropriate DTB which is vendor/OEM-agnostic. > + > +select: > + anyOf: > + - required: > + - 'board-id' > + - required: > + - 'board-id-types' > + - required: > + - '#board-id-cells' I don't fully get why do you need this select. Isn't the schema selected by nodename? Or maybe it is for the final required: but then this could be just set of dependencies. > + > +properties: > + $nodename: > + const: "/" Blank line. > + board-id: > + $ref: /schemas/types.yaml#/definitions/uint32-matrix > + description: | Do not need '|' unless you need to preserve formatting. > + A list of identifiers that can be used to match with this devicetree. s/devicetree/Devicetree/ ? > + The interpretatation of each cell can be matched with the Typo: interpretation > + board-id-type at the same index. > + > + board-id-types: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: > + Defines the type of each cell, indicating to the DeviceTree selection s/DeviceTree/Devicetree/ ? > + mechanism how to parse the board-id. > + > + '#board-id-cells': What are the cells for? > + minimum: 1 > + > +required: > + - board-id > + - board-id-types > + - '#board-id-cells' > + > +additionalProperties: true Best regards, Krzysztof