Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp61979rdb; Mon, 22 Jan 2024 11:59:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+vSqmZiJwHklpgIVAfVmpoHqbyc4yMWnz59cJmuy2D7Vbrrga2XjzUz16zNtpbvPv2XRl X-Received: by 2002:a05:6358:704:b0:176:4fce:38 with SMTP id e4-20020a056358070400b001764fce0038mr1905566rwj.5.1705953574963; Mon, 22 Jan 2024 11:59:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705953574; cv=pass; d=google.com; s=arc-20160816; b=dLBIoarYhdYGJECy56bl5pyF3GclIxoANic4zrZIbcx0XbkfXak0myDL4i4SebQPE3 0N/40TRibxHVq5S1cLaPJGcTy5u+V+aa4NSJNvRpNHcdcKx2zMvhT7W5GmJoG8JLhGEP hjAAIzRBmySzlsQHM61BPcNfZYeWOG4IM8e/VJpjZ3x9uVa+/10Z5gnr0UWmziQY7Ev1 yLzLPSTDZIQXyY/5z6uCIObT0xk+KyhZdng9S9HGsJqzcvzjXPr1clZgG/4uGZW9aFvS pvJdEcsbg84GXl4jvNwyOKCd7Ap+bkYIsSX61TdySiOhadaohsZUzcyGA7Glb1Tk2zaE VF/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=ldZM+19i4vknqpEJcz+SwZt7PNLuLGwHmstwFcNRiVw=; fh=YZuvYJ07OJO6arYEpoMLGIvafQKR88m3q2bcSbyvWn0=; b=Fd2bcJEurKVHQDxTprllZmdufpqFojX+/GOG2nNhgIBSYRmelSA/f6FIw6ndr9zqqP ymRxFMbmsiSqnbjajQOK4gbnPilVfEiOLQRQT+24LvFQzPjbVDj5HnS2uH+ii1KQC07n VEIAn0kJsylExItgjxK2IhSoGVjkf5js8qiftDItfUs5Mb7lI9ouJpUZUytiKBEwT8SM HHEQIr2vISBgr25285e9eAPXJl3yo31RSEgT4logOQdl2tnFF+8U/09tKbIPR2MCH2LJ jnKdCx0JV7r8254tXIBSkN+zm9LMoyR+NhqmWba/6dVPXCimdabFHr+rovY+DMODdych obCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=leVghTsS; 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-34053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i3-20020a639d03000000b005ce0160641fsi8430741pgd.551.2024.01.22.11.59.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=leVghTsS; 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-34053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34053-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 41E85B28615 for ; Mon, 22 Jan 2024 19:27:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EA643EA8E; Mon, 22 Jan 2024 19:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="leVghTsS" Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) (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 2EB2A3B790 for ; Mon, 22 Jan 2024 19:27:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705951667; cv=none; b=EksvfzIejcvKODV+wlvZ7qNHfyKTX/ovkit5NhyDCtnA796FYL4FJ6EaMMXdhpd9/vNDF9mO6weQkqe18s18BUsWBVjFqFI7ZUaZxYy9lJCayOZ9GcBspI5tC+I+Szv6w2izEFyCvRV9PEg3T27priJWan67Csjva3LaoEF+E/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705951667; c=relaxed/simple; bh=Mh5Kbe0KU3JUAV7ggZ8bLsdafX+tUQ2V+LveuJGisoA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=G3J4GjPq/OnBiKRAyJCSjOZtJ6DBm4m6y1z08SIihfdWD0Xpc49A1A4wuMmUSwCoelZjl51+uxw/oA33OY8z5hh1XcyVCIBb4lKuNSV2LpfaRt0swRW5AIK5FzZudTsL5cThb19R4/AdJk0v5UXwzvgFsjhcwTRB9KIoXNKPjMw= 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=leVghTsS; arc=none smtp.client-ip=209.85.128.181 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-yw1-f181.google.com with SMTP id 00721157ae682-6000bbdbeceso9422487b3.2 for ; Mon, 22 Jan 2024 11:27:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705951665; x=1706556465; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ldZM+19i4vknqpEJcz+SwZt7PNLuLGwHmstwFcNRiVw=; b=leVghTsS5sLwDRGNdU9STr4ydNsQaenKuR42v/HGQ3sWt9p3DKxQmwZWYrvgrLPdDj IS3jeZUA3aSwiFQ7Dn8vVhCGTli9ORJ/P7cS/lurnLiBxAf9Q97PZNwkuBxQU8NOkoaN Di+fSgasN3JY1Hf+qOaDK14FZj7b9W4DHTBuo6dzrJh6Ud+UvOlHuCkIprvnHST64PNG UIhwxLf/xCc8YLYKLLekBXH2Vr3V+mc8wjyDxW7ko2Zp7fdsfaDgfyR/eD7OnKUOleFz FQ1grO0UNl1xV/6Ki7iwSP1ZC0l6ftAnYR10wRM8Zn15td2TYkI0i3kxEeXzmPgOCw8K njow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705951665; x=1706556465; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ldZM+19i4vknqpEJcz+SwZt7PNLuLGwHmstwFcNRiVw=; b=edUCe9ShWS43DKDjDU+fIbcJJhk80S56T1NspIBlSd/ASNjLHpHPIvEoU7nb2It3aJ wPFDAcvOTTG72NhS/yT6UyBxXu6NxstmjkjAVHP87a2T1Kf/EFH8XST4ZtPJY57B4o0W VOxdTBIaxuOpMu1ljNtEm0WPizHsK/DE4KGpLMPA+FSCxaTyz6zLG0AvLtjpsYeZDuKJ b3f1TEyC81pRmkWalJMgVLUh769D20SwG42+9fDrWpvxV6k1bC0VhoOXj3yvtaeoIpzx z3qlENgBQKxK8WzOIehDNKpKO/cqZhNMU8abqZi0IVkzr8EkUpduZUhDsrjZCKre/MSL OsJA== X-Gm-Message-State: AOJu0Yxn+c1b5/mtq6zDlLukr0SYxNBauLAhMmgvAIAg7kwQW9Z5Jr8I cCgUtaVgBsLVj942McbT6Cbrb8dwwiDz/vPEKHMHxbleFIH7KVXpaAbXrO2huJIrhLoC2e7jl0g SzsDicgw3kIR2pwJ87p5SW/3PG7BzWMQ3uDp2Gw== X-Received: by 2002:a81:4a89:0:b0:5ff:96ea:ba12 with SMTP id x131-20020a814a89000000b005ff96eaba12mr3779029ywa.23.1705951665050; Mon, 22 Jan 2024 11:27:45 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1705749649-4708-1-git-send-email-quic_amrianan@quicinc.com> <1705749649-4708-3-git-send-email-quic_amrianan@quicinc.com> <54426665-90c5-4355-a174-f512004e11e5@linaro.org> <391f8f48-d1f5-702d-20d4-ae8b8a7ace58@quicinc.com> <065601d3-92e7-46cc-a7aa-116cd02b3c36@quicinc.com> In-Reply-To: <065601d3-92e7-46cc-a7aa-116cd02b3c36@quicinc.com> From: Dmitry Baryshkov Date: Mon, 22 Jan 2024 21:27:34 +0200 Message-ID: Subject: Re: [PATCH 2/2] dt-bindings: hwinfo: Add Qualcomm's board-id types To: Elliot Berman Cc: Amrit Anand , Konrad Dybcio , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, agross@kernel.org, andersson@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, kernel@quicinc.com Content-Type: text/plain; charset="UTF-8" On Mon, 22 Jan 2024 at 20:46, Elliot Berman wrote: > > > > On 1/22/2024 2:07 AM, Amrit Anand wrote: > > > > On 1/20/2024 7:02 PM, Konrad Dybcio wrote: > >> On 20.01.2024 12:20, Amrit Anand wrote: > >>> Qualcomm based DT uses two or three different identifiers. The SoC > >>> based idenfier which signifies chipset and the revision for those > >>> chipsets. The board based identifier is used to distinguish different > >>> boards (e.g. IDP, MTP) along with the different types of same boards. > >>> The PMIC attached to the board can also be used as a identifier for > >>> device tree. > >>> > >>> Signed-off-by: Elliot Berman > >>> Signed-off-by: Amrit Anand > >>> --- > >>> .../devicetree/bindings/hwinfo/qcom,board-id.yaml | 86 ++++++++++++++++++++++ > >>> include/dt-bindings/arm/qcom,ids.h | 68 +++++++++++++++-- > >>> 2 files changed, 146 insertions(+), 8 deletions(-) > >>> create mode 100644 Documentation/devicetree/bindings/hwinfo/qcom,board-id.yaml > >>> > >>> diff --git a/Documentation/devicetree/bindings/hwinfo/qcom,board-id.yaml b/Documentation/devicetree/bindings/hwinfo/qcom,board-id.yaml > >>> new file mode 100644 > >>> index 0000000..807f134 > >>> --- /dev/null > >>> +++ b/Documentation/devicetree/bindings/hwinfo/qcom,board-id.yaml > >>> @@ -0,0 +1,86 @@ > >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >>> +%YAML 1.2 > >>> +--- > >>> +$id: http://devicetree.org/schemas/hwinfo/qcom,board-id.yaml# > >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >>> + > >>> +title: QCOM Board Identifier for Devicetree Selection > >>> + > >>> +maintainers: > >>> + - Amrit Anand > >>> + - Elliot Berman > >>> + > >>> +description: | > >> The '|'s are unnecessary in both commits, IIRC they're used for > >> preserving formatting which we don't really need for non-styled > >> plaintext > > Sure, will do. > >>> + Qualcomm uses two and sometimes three hardware identifiers to describe > >>> + its boards > >>> + - a SoC identifier is used to match chipsets (e.g. sm8550 vs sm8450) > >>> + - a board identifier is used to match board form factor (e.g. MTP, QRD, > >>> + ADP, CRD) > >>> + - a PMIC identifier is occasionally used when different PMICs are used > >>> + for a given board/SoC combination. > >>> + Each field and helper macros are defined at:: > >>> + - include/dt-bindings/arm/qcom,ids.h > >>> + > >>> + For example, > >>> + / { > >>> + #board-id-cells = <2>; > >>> + board-id = <456 0>, <457 0>, <10 0>; > >>> + board-id-types = "qcom,soc-id", "qcom,soc-id", "qcom,board-id"; > >>> + } > >>> + > >>> +allOf: > >>> + - $ref: board-id.yaml# > >>> + > >>> +properties: > >>> + board-id: > >>> + minItems: 2 > >> I believe some older platforms match exclusively based on socid, so > >> perhaps 1 would be okay as well. > >> > >> [...] > > > > Ok, considering legacy targets we can make it 1. > > > > But i think ideally it should always be recommended to have a board ID associated with a SoC ID, correct me if my understanding is wrong. > > > > There is no "legacy" support needed here: Qualcomm's bootloaders > need to be updated to adhere to the new proposed spec. I suppose > we need to consider whether we have targets that only need SoC to > differentiate? What is the chance of updating the bootloader for the N year device? -- With best wishes Dmitry