Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7647446rdb; Thu, 4 Jan 2024 03:23:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IECL/3oxiX6wCEV0Lg4dM8cFikivyjWQ/obQYyNY9tnsoEG5Dl/VeBligE66hMQZ9r86Rt7 X-Received: by 2002:ad4:5ce8:0:b0:680:c829:7169 with SMTP id iv8-20020ad45ce8000000b00680c8297169mr437353qvb.82.1704367427261; Thu, 04 Jan 2024 03:23:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704367427; cv=none; d=google.com; s=arc-20160816; b=n1RATS+JGnlbxXvaW/T4ukOBt7sTVa2NaYkXCHOXljZth5TQlHQUJUYdixI1/bCd2f rMV2mPoswlYx241IJVeN2jkFGRKAEG5xwkzNBkFbWzOIipaG5oXLigU74g61qjdYcfL7 AiC3Z0CUvAT4e3cjmG0eH8r2Zy1qFP2QeqkZUA9iqiketaoaFcm3dgYLUlDfHxxpiAyB Y3shAmx6/YTe/hIuxSjjCYSQEefod03eqOL1edmz8/9vVTZGcNB20TtTU2L/gZJoBdTU PmjfUt/IKDpE0r6X3o+rSNxq+mM00aL66NBBOKVYDfv+9tXl3TCgGYRAAu7PoSCzXAgs cLrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=aTyOt6+SodX6bP52NpaT44ugzzw6dI40D4PGBU1bCzU=; fh=v//SCgEnPLxfD7ZXYfBs70q614wfcsuc/1sLxdcW2/Q=; b=NyzuKPkpvfq3+kwZOVQbpCZNPkNE+Mv9WAFMsi7w1geSDjS4q5e+nWvo4xqs4GqOgA +Yovr8q+sJCKS/QoO7r4BS45GvgC8hnd4vyFIjM4QFizWoewpB9hKHjsXB078E3MQ8TA 3GezvA6ceR0wLO39HNpg96tvntIa22YPqyYRCQdPR6ImEl/2S1cDAgbOS9uFCmo/8qwv HEcgQNrqUwrxVfaxioSygMkw/zCT3LuazuG5EH+qPbhdDuq1lyGQpoAjblKphXiu06Bo ILVw5cM+haowzWs4UqcVcBm/F+rCI8Zbc9L/ANwAv0tOgfTM7DATjZ3DwHNlH7HY/OSJ UpXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pOuVTLfN; spf=pass (google.com: domain of linux-kernel+bounces-16580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w17-20020a0ce111000000b0067f1b8febe2si31284135qvk.98.2024.01.04.03.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 03:23:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pOuVTLfN; spf=pass (google.com: domain of linux-kernel+bounces-16580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 099091C21B83 for ; Thu, 4 Jan 2024 11:23:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE9BB2110F; Thu, 4 Jan 2024 11:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="pOuVTLfN" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E51121347; Thu, 4 Jan 2024 11:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4047efg9020092; Thu, 4 Jan 2024 11:23:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= qcppdkim1; bh=aTyOt6+SodX6bP52NpaT44ugzzw6dI40D4PGBU1bCzU=; b=pO uVTLfNeu6BowS6RRhUJkCKR35oVUAjzDehsKfpC5xwRn4Nm4P25e44WN1Msyv8la dP/rWmLuKTX2rwXCIHlpIiEpSJC4g8P+LzMTNvNEjAiROLso+HM6bGpuuCLJoyyV Ys7ugRSvV5XYccwls6nFB6not6lBrjhITVGlt4vgg5fH3RLp+meM0HB5EIG5Vc6D rvgpyU4EFsqf3+c2tdYhEh6hO3CVgFyNpS5blV/DaIGZ69qweq5L7I6KmXrekAKO apwN6ajJv8+IQvgf/OH1MEDx+ZemqkBNesSoUqXLxz4rbatKHprV4mKYbe4MilKl HSiN05jqZk8QrOVHsUfA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vdra38kcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jan 2024 11:23:17 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 404BNGBI028553 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Jan 2024 11:23:16 GMT Received: from zhenhuah-gv.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 4 Jan 2024 03:23:13 -0800 From: Zhenhua Huang To: , , , , , CC: , , , , , Zhenhua Huang Subject: [PATCH] dt-bindings: mtd: Change the schema for nodename which includes "sram" Date: Thu, 4 Jan 2024 19:23:02 +0800 Message-ID: <1704367382-29979-1-git-send-email-quic_zhenhuah@quicinc.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: FltXqd4Vq79xg_8J-GVunkFoQIhGr56X X-Proofpoint-ORIG-GUID: FltXqd4Vq79xg_8J-GVunkFoQIhGr56X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 phishscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401040086 Node name which includes "sram" not only represents MTD devices, but also lots of sram devices(eg, qcom,imem.yaml, rules in folder sram/*). To avoid the conflicts, change the schema as: - if node name includes "sram", must select "compatible" to match (I have listed all "comptible" string in mtd.yaml by searching drivers/mtd/* to find applicable drivers) - if node name is nand/flash, use "nodename" to select. Fixes: 7bdc671822e9 ("dt-bindings: mtd: physmap: Reuse the generic definitions") Signed-off-by: Zhenhua Huang --- Hello, Tested a few devicetree nodes, which confirms: "qcom,imem.yaml" which in sram/ not matches with mtd.yaml anymore. All nodes include string "sram" must have "compatible" which listed in mtd.yaml to be matched. Current I just modify the rule for "sram" as it is definitely conflicting with rules in sram/*. I have not much backgrounds on nand/flash whether they may have similar conflicts. Documentation/devicetree/bindings/mtd/mtd.yaml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml index f322290..1704437 100644 --- a/Documentation/devicetree/bindings/mtd/mtd.yaml +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml @@ -10,10 +10,28 @@ maintainers: - Miquel Raynal - Richard Weinberger -properties: - $nodename: - pattern: "^(flash|.*sram|nand)(@.*)?$" +select: + if: + properties: + $nodename: + pattern: "^.*sram(@.*)?$" + then: + properties: + compatible: + enum: + - arm,vexpress-psram + - cypress,cy7c1019dv33-10zsxi + - microchip,48l640 + - mtd-ram + else: + properties: + $nodename: + pattern: "^(flash|nand)(@.*)?$" + required: + - $nodename + +properties: label: description: User-defined MTD device name. Can be used to assign user friendly -- 2.7.4