Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp685862pxu; Mon, 23 Nov 2020 01:07:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDu4N0KxjpIuO5eCNweBUzgnZB90wHhdGoeYVgraK2LJe5XN/HIonG4KcNHU4DyXqxwiH7 X-Received: by 2002:aa7:cb58:: with SMTP id w24mr46070680edt.35.1606122419944; Mon, 23 Nov 2020 01:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606122419; cv=none; d=google.com; s=arc-20160816; b=XLcpJ1TEwEcEvqb/E8wTOiBC2ryFnfCxATcjkvwX1zIIPQjjHRmui17/HUThAZmzk1 0N6sM9svQSLM4E/xNQr4DTNpnlGJxQhgQHmFCOa6X7unzcruEJwMQ5SEyiAZS8IH+uYD Jq7GD0RHMKiopTWlv5ecWC2ThTkqJmGKTH5NKDjfjVH4USRPBSMITLxnTl5tj5RLpBjX qTcbPE7n5ygC3bOHhUcfrm2ecY8foUx8s+kJuehGDgGUpt/69X8DUFftiBL4kPjaGPYB CoW0H4qh52XXw0e87MYg+ei5Z+VmV3dXMeXjbaexU7kbkieA9x5NDirqc9U2aYTfeaWp kD6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xoafmFFR+0RIcs2C8A7ThlJ/abtbVqZ0EnInBd9658U=; b=rzLltR9riZRNcTBDwaAeFDm0WwnOpd4H58pytZhvLjnAjiFDOSKT0sbl1/Lf8N0SYW Iopawt2CSDDup6BvsaKEL/oYQj+3LkFVZL9lkWCJaUaUEFSKDR555HrIOHKMl40yW5QS GiYWD7mI1O8ipYuKPHZ0EIn7FUFpUM7Zz8u12lhHQl0h9T0YEAdxX47AJmixP7N3LHli 1n9CUxGRdmhQCebyiqC/xPx4EUbiPhISrdBogfIlkfN3M4//eCQD08iC3Zxu+HNWU6Dn sIjD4KHXNPNRlbrsCAHSPZMu5hwSMZubV6HssYuS53pzm2t3FiKwLQ4/yptSC7uHxHvl 3u3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si4962375edn.329.2020.11.23.01.06.37; Mon, 23 Nov 2020 01:06:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbgKWJEo convert rfc822-to-8bit (ORCPT + 99 others); Mon, 23 Nov 2020 04:04:44 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44486 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725287AbgKWJEn (ORCPT ); Mon, 23 Nov 2020 04:04:43 -0500 Received: by mail-ed1-f65.google.com with SMTP id l5so16245703edq.11; Mon, 23 Nov 2020 01:04:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=wGGlpzvGX0by37pqRtpcEEdM/2jadzvK1HD3lMXgLU0=; b=ix6B8IsnEofDPVMe0nIt0OGMzvGxygTHN0WZVY8AGXH+BGOyK+4zvYMM6a7aFQFMTd FFDnclWyRA1JpIhb5xiB/mmQiyzvdtl8xoKsVSp9G+fcFV420T3EuDYf+S6GVVsjK+g4 lQsxNPPPQrLxtLHmuCVLAOj4bV3B4pqNM2L2Y2FI64w+uzCIKUgN47jR6sT4xYySDONm APFceL36CoaxKSfANB11QG8wgzVxnaFZ+J2saEWcA/dPTnVuXqHqoO5PRA9k5KxrDU4Z Ahb6E635MMBZ8cgZ+WRSgzTi/HItjtYtxTu8n7soqSjE0B88QkNSSO8u8/uvrmes/T21 33rw== X-Gm-Message-State: AOAM5327JTikbjuDTnqPYXoCDYrF7uCj4/4wXtdgZzErNwqrMZfxNfGF PL92lc+If3KMV6OfVFzV80o= X-Received: by 2002:a05:6402:54d:: with SMTP id i13mr48437719edx.3.1606122280616; Mon, 23 Nov 2020 01:04:40 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id k1sm4561266ejr.53.2020.11.23.01.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 01:04:39 -0800 (PST) Date: Mon, 23 Nov 2020 10:04:38 +0100 From: Krzysztof Kozlowski To: Alice Guo Cc: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , dl-linux-imx , Peng Fan , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [EXT] Re: [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID Message-ID: <20201123090438.GA17112@kozik-lap> References: <20201120101112.31819-1-alice.guo@nxp.com> <20201120105045.GA18581@kozik-lap> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 04:45:13AM +0000, Alice Guo wrote: > > > > -----Original Message----- > > From: Krzysztof Kozlowski > > Sent: 2020年11月20日 18:51 > > To: Alice Guo > > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de; > > dl-linux-imx ; Peng Fan ; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; > > linux-arm-kernel@lists.infradead.org > > Subject: [EXT] Re: [PATCH v4 1/4] dt-bindings: soc: imx8m: add DT Binding doc > > for soc unique ID > > > > Caution: EXT Email > > > > On Fri, Nov 20, 2020 at 06:11:09PM +0800, Alice Guo wrote: > > > Add DT Binding doc for the Unique ID of i.MX 8M series. > > > > > > v2: remove the subject prefix "LF-2571-1" > > > v3: put it into Documentation/devicetree/bindings/arm/fsl.yaml > > > modify the description of nvmem-cells > > > use "make ARCH=arm64 dtbs_check" to test it and fix errors > > > v4: use allOf to limit new version DTS files for i.MX8M to include > > > "fsl,imx8mm/n/p/q-soc", nvmem-cells and nvmem-cells-names > > > > > > Signed-off-by: Alice Guo > > > --- > > > .../devicetree/bindings/arm/fsl.yaml | 51 > > +++++++++++++++++++ > > > 1 file changed, 51 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml > > > b/Documentation/devicetree/bindings/arm/fsl.yaml > > > index 67980dcef66d..d8048323a290 100644 > > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml > > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml > > > @@ -918,6 +918,57 @@ properties: > > > - fsl,s32v234-evb # S32V234-EVB2 Customer > > Evaluation Board > > > - const: fsl,s32v234 > > > > > > + soc: > > > + type: object > > > + properties: > > > + compatible: > > > + oneOf: > > > + - description: new version compatible for i.MX8M SoCs > > > + items: > > > + - enum: > > > + - fsl,imx8mm-soc > > > + - fsl,imx8mn-soc > > > + - fsl,imx8mp-soc > > > + - fsl,imx8mq-soc > > > + - const: simple-bus > > > + > > > + - description: old version compatible for i.MX8M SoCs > > > + items: > > > + - const: simple-bus > > > + > > > + nvmem-cells: > > > + maxItems: 1 > > > + description: Phandle to the SOC Unique ID provided by a nvmem > > > + node > > > + > > > + nvmem-cells-names: > > > + const: soc_unique_id > > > + > > > + allOf: > > > > Nothing changed here comparing to previous version. Still does not work. > > > > The allOf should not be part of soc node because the "if" below won't match. > > Instead, it should be against root node. > > > > Best regards, > > Krzysztof > > I'm sorry to disturb you. I don't very clear about the grammar rules of yaml, so don't know how to make allOf be part of root node. > If allof is part of root node, how does it specify the soc node? The following is my change which is definitely wrong. > soc: > properties: > compatible: > - description: new version compatible for i.MX8M SoCs > items: > - enum: > - fsl,imx8mm-soc > - fsl,imx8mn-soc > - fsl,imx8mp-soc > - fsl,imx8mq-soc > - const: simple-bus > > nvmem-cells: > maxItems: 1 > description: Phandle to the SOC Unique ID provided by a nvmem node > > nvmem-cells-names: > const: soc_unique_id > > allOf: > - if: > properties: > compatible: > contains: > enum: > - fsl,imx8mm > - fsl,imx8mn > - fsl,imx8mp > - fsl,imx8mq > > then: > required: > - soc > > Please give me suggestion. Thank you. This should work: 940 allOf: 941 - if: 942 properties: 943 compatible: 944 contains: 945 enum: 946 - fsl,imx8mm 947 - fsl,imx8mn 948 - fsl,imx8mp 949 - fsl,imx8mq 950 951 then: 952 patternProperties: 953 "^soc@[0-9a-f]+$": 954 properties: 955 compatible: 956 items: 957 - enum: 958 - fsl,imx8mm-soc 959 - fsl,imx8mn-soc 960 - fsl,imx8mp-soc 961 - fsl,imx8mq-soc 962 - const: simple-bus 963 964 required: 965 - nvmem-cells 966 - nvmem-cells-names And probablt "soc" should also be added to required, just below the "then:". You need to test it and find the proper solution. Best regards, Krzysztof