From patchwork Wed May 22 23:54:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 13671188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2276C25B7C for ; Wed, 22 May 2024 23:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Hhg0B7CgEnNkWH91ymKqdxjtRP8wNhjzMY24k66pSls=; b=GwTEnwNrOIXNdM voTp3qGRgH9FDiVOFhMyK7mUaRv3I11h49QACnchCMxhe5IB+T3c5hvZfKxz81ZIZMCoLm0cKp77W a5UbFUvcSswavD0tZG2TcdgBbVkmz3+YdCcd1DkxIf8ltN5EsFI+lcpPjT+xQ0wEftuNCWmukZUXy l8sjvBOUzd9uPQyMKipZUzNmkAbJqTa1TqoiCu4X1aNWIbvdY74jojWaVfzcRnCubgm0MKQvDEijU SXkIk6PP3VPFZ0OUvMKMOmIA4fVZ06MbA2N1wRNyC7DUyRokCk+S2Drv0K/d+qzA+yIJMZWKUjHy6 ynB1RiG+aqTsEb8EIylw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9vnG-00000004Wsn-3Dtx; Wed, 22 May 2024 23:54:50 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9vnD-00000004WsI-2wtT for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2024 23:54:49 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44MKvvYt001874; Wed, 22 May 2024 23:54:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s= qcppdkim1; bh=xtjs0+95UyS0oZvi0YIw5LIDSHAwyXY4Y6Fx3l5/VrI=; b=ld jcPls5oQfxFkhZqqlqDRr7yHDxetqexBX/EJ5161qkKp47daq+gpE8JqDEfPl1/w BDf7wPkOEJL2AptBh7fplrI6SU+4oFKfZ8pAQrRZbKvk0raiMp31U+6fqyG4zsvU XhfRS3sorD9s/JP094v6TjoQXF1ohvT1V2ijDtllDDfMq7OzvA5R2lEDCny1IDsj 1lN5zaKGh2o2Rw/zLX+rR2pyAnlS7KawR65IWD4COcb479u205mpWxIjES2ebkLH 3IIlGGpFrGDqH7VDBFfwdwjnHr6BZt8/C0KeKYfwmgTxJAvKm5zpJZd1u17UBF4w OLf5hD5CuOgqoIW5EOkw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6pq5j9x1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 23:54:38 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44MNsbYG029337 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 May 2024 23:54:37 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 22 May 2024 16:54:37 -0700 From: Elliot Berman To: Elliot Berman CC: Conor Dooley , Rob Herring , "Frank Rowand" , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Amrit Anand , "Peter Griffin" , Caleb Connolly , Andy Gross , Doug Anderson , Simon Glass , Chen-Yu Tsai , Julius Werner , "Humphreys, Jonathan" , Sumit Garg , "Michal Simek" , , , , , Subject: [PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id Date: Wed, 22 May 2024 16:54:23 -0700 Message-ID: <20240522-board-ids-v4-2-a173277987f5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240522162545887-0700.eberman@hu-eberman-lv.qualcomm.com> References: <20240522162545887-0700.eberman@hu-eberman-lv.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: DpkhxoH8UqRFLEMMCaRQiDEKebv4G9j2 X-Proofpoint-ORIG-GUID: DpkhxoH8UqRFLEMMCaRQiDEKebv4G9j2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-22_13,2024-05-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405220166 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240522_165447_785067_4CB5DC66 X-CRM114-Status: GOOD ( 18.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 board identifiers to devicetrees. Signed-off-by: Elliot Berman --- .../devicetree/bindings/board/board-id.yaml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/Documentation/devicetree/bindings/board/board-id.yaml b/Documentation/devicetree/bindings/board/board-id.yaml new file mode 100644 index 000000000000..894c1e310cbd --- /dev/null +++ b/Documentation/devicetree/bindings/board/board-id.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/board/board-id.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Board identifiers +description: | + This node contains a list of identifier values for the board(s) supported by + this devicetree. Identifier values are either N-tuples of integers or a + string. The number of items for an N-tuple identifer is determined by the + property name. String identifiers must be suffixed with "-string". + + Every identifier in the devicetree must have a matching value from the board + to be considered a valid devicetree for the board. In other words: if + multiple identifiers are present in the board-id and one identifier doesn't + match against the board, then the devicetree is not applicable. Note this is + not the case where the the board can provide more identifiers than the + devicetree describes: those additional identifers can be ignored. + + Identifiers in the devicetree can describe multiple possible valid values, + such as revision 1 and revision 2. + +maintainers: + - Elliot Berman + +properties: + $nodename: + const: '/' + board-id: + type: object + patternProperties: + "^.*(?; + #size-cells = <1>; + compatible = "example"; + board-id { + // this works with any boards where: + // some-hw-id = 1, other-hw-id = 1, some-id-string = "cat" + // some-hw-id = 1, other-hw-id = 1, some-id-string = "kitten" + // some-hw-id = 1, other-hw-id = 2, some-id-string = "cat" + // some-hw-id = 1, other-hw-id = 2, some-id-string = "kitten" + some-hw-id = <1>; // some-hw-id must be "1" + other-hw-id = <1>, <2>; // other-hw-id must be "1" or "2" + some-id-string = "cat", "kitten"; // some-id-string must be "cat" or "kitten" + }; + }; + +additionalProperties: true