linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
@ 2020-11-17  7:10 Alice Guo
  2020-11-17  7:36 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Alice Guo @ 2020-11-17  7:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel



> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 2020年11月17日 0:03
> To: Alice Guo <alice.guo@nxp.com>
> Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding
> doc for soc unique ID
> 
> Caution: EXT Email
> 
> On Mon, Nov 16, 2020 at 07:04:13AM +0000, Alice Guo wrote:
> >
> > > -----Original Message-----
> > > From: Krzysztof Kozlowski <krzk@kernel.org>
> > > Sent: 2020年11月15日 0:50
> > > To: Alice Guo <alice.guo@nxp.com>
> > > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> > > dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > linux-arm-kernel@lists.infradead.org
> > > Subject: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT
> > > Binding doc for soc unique ID
> > >
> > > Caution: EXT Email
> > >
> > > On Fri, Nov 13, 2020 at 07:04:06PM +0800, Alice Guo wrote:
> > > > Add DT Binding doc for the Unique ID of i.MX 8M series.
> > > >
> > > > Signed-off-by: Alice Guo <alice.guo@nxp.com>
> > > > ---
> > > >  .../devicetree/bindings/arm/fsl.yaml          | 25
> > > +++++++++++++++++++
> > > >  1 file changed, 25 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > index e4db0f9ed664..f4faebbb57da 100644
> > > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > @@ -901,6 +901,31 @@ properties:
> > > >                - fsl,s32v234-evb           # S32V234-EVB2
> Customer
> > > Evaluation Board
> > > >            - const: fsl,s32v234
> > > >
> > > > +  soc:
> > > > +    type: object
> > > > +    properties:
> > > > +      compatible:
> > > > +        oneOf:
> > > > +          - description: i.MX8M SoCs
> > > > +            items:
> > > > +              - enum:
> > > > +                  - fsl,imx8mm-soc
> > > > +                  - fsl,imx8mn-soc
> > > > +                  - fsl,imx8mp-soc
> > > > +                  - fsl,imx8mq-soc
> > > > +              - const: simple-bus
> > > > +
> > > > +          - description: Other 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
> > > > +
> > > >  additionalProperties: true
> > >
> > > The "soc" node should be required for these compatibles. Otherwise
> > > you will have to stay with this
> > > backwards-compatible-DTB-device-initcall-glue for many years... I think you
> can achieve it with allOf.
> > >
> > [Alice Guo]Hi,
> > I find that my description for compatible is ambiguous. There are two kinds of
> compatible of the "soc" node:
> > 1. For dtsi files used for SoCs other than imx8m series SoCs and old
> > version dtsi files used for imx8m series SoCs, compatible of the "soc" node is
> "simple-bus".
> > 2. For new version dtsi files used for imx8m series SoCs, compatible of the
> "soc" node is {"fsl,imx8mX-soc","simple-bus"}.
> >
> > "nvmem-cell" is an optional property.
> >
> > I do not understand what you mean. You mean that limit the compatible of
> "soc" node must include " fsl,imx8mX-soc" in new version dts files. Is my
> understanding correct?
> 
> All new DTS files should have soc node with "fsl,imx8mX-soc" and this should be
> required by dtschema. The nvmem-cells and related properties do not look like
> optional. From the hardware perspective - they are always present. From the
> driver point of view: they are required and driver will fail to work.

[Alice Guo] 
+  soc:
+    type: object
+    properties:
+      compatible:
+        oneOf:
+          - description: new version DTS for i.MX8M SoCs
+            items:
+              - enum:
+                  - fsl,imx8mm-soc
+                  - fsl,imx8mn-soc
+                  - fsl,imx8mp-soc
+                  - fsl,imx8mq-soc
+              - const: simple-bus
+
+          - description: other SoCs and old version DTS 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:
+      - if:
+          properties:
+            compatible:
+              contains:
+                enum:
+                  - fsl,imx8mm-soc
+                  - fsl,imx8mn-soc
+                  - fsl,imx8mp-soc
+                  - fsl,imx8mq-soc
+                const: simple-bus
+
+        then:
+          required:
+            - nvmem-cells
+            - nvmem-cells-names

The above is my modification. Is that ok?

Best regards,
Alice

> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
  2020-11-17  7:10 [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID Alice Guo
@ 2020-11-17  7:36 ` Krzysztof Kozlowski
  2020-11-20  6:21   ` Alice Guo
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-17  7:36 UTC (permalink / raw)
  To: Alice Guo
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel

On Tue, Nov 17, 2020 at 07:10:28AM +0000, Alice Guo wrote:
> 
> 
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzk@kernel.org>
> > Sent: 2020年11月17日 0:03
> > To: Alice Guo <alice.guo@nxp.com>
> > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> > dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org
> > Subject: Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding
> > doc for soc unique ID
> > 
> > Caution: EXT Email
> > 
> > On Mon, Nov 16, 2020 at 07:04:13AM +0000, Alice Guo wrote:
> > >
> > > > -----Original Message-----
> > > > From: Krzysztof Kozlowski <krzk@kernel.org>
> > > > Sent: 2020年11月15日 0:50
> > > > To: Alice Guo <alice.guo@nxp.com>
> > > > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> > > > dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> > > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > > linux-arm-kernel@lists.infradead.org
> > > > Subject: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT
> > > > Binding doc for soc unique ID
> > > >
> > > > Caution: EXT Email
> > > >
> > > > On Fri, Nov 13, 2020 at 07:04:06PM +0800, Alice Guo wrote:
> > > > > Add DT Binding doc for the Unique ID of i.MX 8M series.
> > > > >
> > > > > Signed-off-by: Alice Guo <alice.guo@nxp.com>
> > > > > ---
> > > > >  .../devicetree/bindings/arm/fsl.yaml          | 25
> > > > +++++++++++++++++++
> > > > >  1 file changed, 25 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > index e4db0f9ed664..f4faebbb57da 100644
> > > > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > @@ -901,6 +901,31 @@ properties:
> > > > >                - fsl,s32v234-evb           # S32V234-EVB2
> > Customer
> > > > Evaluation Board
> > > > >            - const: fsl,s32v234
> > > > >
> > > > > +  soc:
> > > > > +    type: object
> > > > > +    properties:
> > > > > +      compatible:
> > > > > +        oneOf:
> > > > > +          - description: i.MX8M SoCs
> > > > > +            items:
> > > > > +              - enum:
> > > > > +                  - fsl,imx8mm-soc
> > > > > +                  - fsl,imx8mn-soc
> > > > > +                  - fsl,imx8mp-soc
> > > > > +                  - fsl,imx8mq-soc
> > > > > +              - const: simple-bus
> > > > > +
> > > > > +          - description: Other 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
> > > > > +
> > > > >  additionalProperties: true
> > > >
> > > > The "soc" node should be required for these compatibles. Otherwise
> > > > you will have to stay with this
> > > > backwards-compatible-DTB-device-initcall-glue for many years... I think you
> > can achieve it with allOf.
> > > >
> > > [Alice Guo]Hi,
> > > I find that my description for compatible is ambiguous. There are two kinds of
> > compatible of the "soc" node:
> > > 1. For dtsi files used for SoCs other than imx8m series SoCs and old
> > > version dtsi files used for imx8m series SoCs, compatible of the "soc" node is
> > "simple-bus".
> > > 2. For new version dtsi files used for imx8m series SoCs, compatible of the
> > "soc" node is {"fsl,imx8mX-soc","simple-bus"}.
> > >
> > > "nvmem-cell" is an optional property.
> > >
> > > I do not understand what you mean. You mean that limit the compatible of
> > "soc" node must include " fsl,imx8mX-soc" in new version dts files. Is my
> > understanding correct?
> > 
> > All new DTS files should have soc node with "fsl,imx8mX-soc" and this should be
> > required by dtschema. The nvmem-cells and related properties do not look like
> > optional. From the hardware perspective - they are always present. From the
> > driver point of view: they are required and driver will fail to work.
> 
> [Alice Guo] 
> +  soc:
> +    type: object
> +    properties:
> +      compatible:
> +        oneOf:
> +          - description: new version DTS for i.MX8M SoCs
> +            items:
> +              - enum:
> +                  - fsl,imx8mm-soc
> +                  - fsl,imx8mn-soc
> +                  - fsl,imx8mp-soc
> +                  - fsl,imx8mq-soc
> +              - const: simple-bus
> +
> +          - description: other SoCs and old version DTS 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:
> +      - if:
> +          properties:
> +            compatible:
> +              contains:
> +                enum:
> +                  - fsl,imx8mm-soc
> +                  - fsl,imx8mn-soc
> +                  - fsl,imx8mp-soc
> +                  - fsl,imx8mq-soc
> +                const: simple-bus
> +
> +        then:
> +          required:
> +            - nvmem-cells
> +            - nvmem-cells-names
> 
> The above is my modification. Is that ok?

Does not look like solving anything.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
  2020-11-17  7:36 ` Krzysztof Kozlowski
@ 2020-11-20  6:21   ` Alice Guo
  2020-11-20  7:54     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Alice Guo @ 2020-11-20  6:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel



> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 2020年11月17日 15:36
> To: Alice Guo <alice.guo@nxp.com>
> Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding
> doc for soc unique ID
> 
> Caution: EXT Email
> 
> On Tue, Nov 17, 2020 at 07:10:28AM +0000, Alice Guo wrote:
> >
> >
> > > -----Original Message-----
> > > From: Krzysztof Kozlowski <krzk@kernel.org>
> > > Sent: 2020年11月17日 0:03
> > > To: Alice Guo <alice.guo@nxp.com>
> > > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> > > dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > linux-arm-kernel@lists.infradead.org
> > > Subject: Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add
> > > DT Binding doc for soc unique ID
> > >
> > > Caution: EXT Email
> > >
> > > On Mon, Nov 16, 2020 at 07:04:13AM +0000, Alice Guo wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Krzysztof Kozlowski <krzk@kernel.org>
> > > > > Sent: 2020年11月15日 0:50
> > > > > To: Alice Guo <alice.guo@nxp.com>
> > > > > Cc: robh+dt@kernel.org; shawnguo@kernel.org;
> > > > > s.hauer@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>; Peng
> > > > > Fan <peng.fan@nxp.com>; devicetree@vger.kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > linux-arm-kernel@lists.infradead.org
> > > > > Subject: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add
> > > > > DT Binding doc for soc unique ID
> > > > >
> > > > > Caution: EXT Email
> > > > >
> > > > > On Fri, Nov 13, 2020 at 07:04:06PM +0800, Alice Guo wrote:
> > > > > > Add DT Binding doc for the Unique ID of i.MX 8M series.
> > > > > >
> > > > > > Signed-off-by: Alice Guo <alice.guo@nxp.com>
> > > > > > ---
> > > > > >  .../devicetree/bindings/arm/fsl.yaml          | 25
> > > > > +++++++++++++++++++
> > > > > >  1 file changed, 25 insertions(+)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > > index e4db0f9ed664..f4faebbb57da 100644
> > > > > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > > > @@ -901,6 +901,31 @@ properties:
> > > > > >                - fsl,s32v234-evb           # S32V234-EVB2
> > > Customer
> > > > > Evaluation Board
> > > > > >            - const: fsl,s32v234
> > > > > >
> > > > > > +  soc:
> > > > > > +    type: object
> > > > > > +    properties:
> > > > > > +      compatible:
> > > > > > +        oneOf:
> > > > > > +          - description: i.MX8M SoCs
> > > > > > +            items:
> > > > > > +              - enum:
> > > > > > +                  - fsl,imx8mm-soc
> > > > > > +                  - fsl,imx8mn-soc
> > > > > > +                  - fsl,imx8mp-soc
> > > > > > +                  - fsl,imx8mq-soc
> > > > > > +              - const: simple-bus
> > > > > > +
> > > > > > +          - description: Other 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
> > > > > > +
> > > > > >  additionalProperties: true
> > > > >
> > > > > The "soc" node should be required for these compatibles.
> > > > > Otherwise you will have to stay with this
> > > > > backwards-compatible-DTB-device-initcall-glue for many years...
> > > > > I think you
> > > can achieve it with allOf.
> > > > >
> > > > [Alice Guo]Hi,
> > > > I find that my description for compatible is ambiguous. There are
> > > > two kinds of
> > > compatible of the "soc" node:
> > > > 1. For dtsi files used for SoCs other than imx8m series SoCs and
> > > > old version dtsi files used for imx8m series SoCs, compatible of
> > > > the "soc" node is
> > > "simple-bus".
> > > > 2. For new version dtsi files used for imx8m series SoCs,
> > > > compatible of the
> > > "soc" node is {"fsl,imx8mX-soc","simple-bus"}.
> > > >
> > > > "nvmem-cell" is an optional property.
> > > >
> > > > I do not understand what you mean. You mean that limit the
> > > > compatible of
> > > "soc" node must include " fsl,imx8mX-soc" in new version dts files.
> > > Is my understanding correct?
> > >
> > > All new DTS files should have soc node with "fsl,imx8mX-soc" and
> > > this should be required by dtschema. The nvmem-cells and related
> > > properties do not look like optional. From the hardware perspective
> > > - they are always present. From the driver point of view: they are required
> and driver will fail to work.
> >
> > [Alice Guo]
> > +  soc:
> > +    type: object
> > +    properties:
> > +      compatible:
> > +        oneOf:
> > +          - description: new version DTS for i.MX8M SoCs
> > +            items:
> > +              - enum:
> > +                  - fsl,imx8mm-soc
> > +                  - fsl,imx8mn-soc
> > +                  - fsl,imx8mp-soc
> > +                  - fsl,imx8mq-soc
> > +              - const: simple-bus
> > +
> > +          - description: other SoCs and old version DTS 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:
> > +      - if:
> > +          properties:
> > +            compatible:
> > +              contains:
> > +                enum:
> > +                  - fsl,imx8mm-soc
> > +                  - fsl,imx8mn-soc
> > +                  - fsl,imx8mp-soc
> > +                  - fsl,imx8mq-soc
> > +                const: simple-bus
> > +
> > +        then:
> > +          required:
> > +            - nvmem-cells
> > +            - nvmem-cells-names
> >
> > The above is my modification. Is that ok?
> 
> Does not look like solving anything.

If restrict that the newly added DTS file must have "fsl,imx8mX-soc" attributes, it cannot pass make dtbs_check because
there are other DTS files which have soc node but are not used for i.mx8m family SoCs.

Best regards,
Alice Guo

> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
  2020-11-20  6:21   ` Alice Guo
@ 2020-11-20  7:54     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20  7:54 UTC (permalink / raw)
  To: Alice Guo
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel

On Fri, Nov 20, 2020 at 06:21:55AM +0000, Alice Guo wrote:
> > > +  soc:
> > > +    type: object
> > > +    properties:
> > > +      compatible:
> > > +        oneOf:
> > > +          - description: new version DTS for i.MX8M SoCs
> > > +            items:
> > > +              - enum:
> > > +                  - fsl,imx8mm-soc
> > > +                  - fsl,imx8mn-soc
> > > +                  - fsl,imx8mp-soc
> > > +                  - fsl,imx8mq-soc
> > > +              - const: simple-bus
> > > +
> > > +          - description: other SoCs and old version DTS 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:
> > > +      - if:
> > > +          properties:
> > > +            compatible:
> > > +              contains:
> > > +                enum:
> > > +                  - fsl,imx8mm-soc
> > > +                  - fsl,imx8mn-soc
> > > +                  - fsl,imx8mp-soc
> > > +                  - fsl,imx8mq-soc
> > > +                const: simple-bus
> > > +
> > > +        then:
> > > +          required:
> > > +            - nvmem-cells
> > > +            - nvmem-cells-names
> > >
> > > The above is my modification. Is that ok?
> > 
> > Does not look like solving anything.
> 
> If restrict that the newly added DTS file must have "fsl,imx8mX-soc" attributes, it cannot pass make dtbs_check because
> there are other DTS files which have soc node but are not used for i.mx8m family SoCs.

You need to check whether boards with i.MX 8M compatible have the SoC
node with one of above compatibles and nvmem-cells.  Since the top
select choses root node, then just check whether child exists with
specific pattern and compatibles (for given root compatibles).

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
  2020-11-16 16:03     ` Krzysztof Kozlowski
@ 2020-11-17  7:12       ` Alice Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Alice Guo @ 2020-11-17  7:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel



> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 2020年11月17日 0:03
> To: Alice Guo <alice.guo@nxp.com>
> Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding
> doc for soc unique ID
> 
> Caution: EXT Email
> 
> On Mon, Nov 16, 2020 at 07:04:13AM +0000, Alice Guo wrote:
> >
> > > -----Original Message-----
> > > From: Krzysztof Kozlowski <krzk@kernel.org>
> > > Sent: 2020年11月15日 0:50
> > > To: Alice Guo <alice.guo@nxp.com>
> > > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> > > dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > linux-arm-kernel@lists.infradead.org
> > > Subject: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT
> > > Binding doc for soc unique ID
> > >
> > > Caution: EXT Email
> > >
> > > On Fri, Nov 13, 2020 at 07:04:06PM +0800, Alice Guo wrote:
> > > > Add DT Binding doc for the Unique ID of i.MX 8M series.
> > > >
> > > > Signed-off-by: Alice Guo <alice.guo@nxp.com>
> > > > ---
> > > >  .../devicetree/bindings/arm/fsl.yaml          | 25
> > > +++++++++++++++++++
> > > >  1 file changed, 25 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > index e4db0f9ed664..f4faebbb57da 100644
> > > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > > @@ -901,6 +901,31 @@ properties:
> > > >                - fsl,s32v234-evb           # S32V234-EVB2
> Customer
> > > Evaluation Board
> > > >            - const: fsl,s32v234
> > > >
> > > > +  soc:
> > > > +    type: object
> > > > +    properties:
> > > > +      compatible:
> > > > +        oneOf:
> > > > +          - description: i.MX8M SoCs
> > > > +            items:
> > > > +              - enum:
> > > > +                  - fsl,imx8mm-soc
> > > > +                  - fsl,imx8mn-soc
> > > > +                  - fsl,imx8mp-soc
> > > > +                  - fsl,imx8mq-soc
> > > > +              - const: simple-bus
> > > > +
> > > > +          - description: Other 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
> > > > +
> > > >  additionalProperties: true
> > >
> > > The "soc" node should be required for these compatibles. Otherwise
> > > you will have to stay with this
> > > backwards-compatible-DTB-device-initcall-glue for many years... I think you
> can achieve it with allOf.
> > >
> > [Alice Guo]Hi,
> > I find that my description for compatible is ambiguous. There are two kinds of
> compatible of the "soc" node:
> > 1. For dtsi files used for SoCs other than imx8m series SoCs and old
> > version dtsi files used for imx8m series SoCs, compatible of the "soc" node is
> "simple-bus".
> > 2. For new version dtsi files used for imx8m series SoCs, compatible of the
> "soc" node is {"fsl,imx8mX-soc","simple-bus"}.
> >
> > "nvmem-cell" is an optional property.
> >
> > I do not understand what you mean. You mean that limit the compatible of
> "soc" node must include " fsl,imx8mX-soc" in new version dts files. Is my
> understanding correct?
> 
> All new DTS files should have soc node with "fsl,imx8mX-soc" and this should be
> required by dtschema. The nvmem-cells and related properties do not look like
> optional. From the hardware perspective - they are always present. From the
> driver point of view: they are required and driver will fail to work.

[Alice Guo] 
[Alice Guo] 
+  soc:
+    type: object
+    properties:
+      compatible:
+        oneOf:
+          - description: new version DTS for i.MX8M SoCs
+            items:
+              - enum:
+                  - fsl,imx8mm-soc
+                  - fsl,imx8mn-soc
+                  - fsl,imx8mp-soc
+                  - fsl,imx8mq-soc
+              - const: simple-bus
+
+          - description: other SoCs and old version DTS 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:
+      - if:
+          properties:
+            compatible:
+              contains:
+                enum:
+                  - fsl,imx8mm-soc
+                  - fsl,imx8mn-soc
+                  - fsl,imx8mp-soc
+                  - fsl,imx8mq-soc
+                const: simple-bus
+
+        then:
+          required:
+            - nvmem-cells
+            - nvmem-cells-names

The above is my modification. Is that ok?

Best regards,
Alice
> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
  2020-11-16  7:04   ` [EXT] " Alice Guo
@ 2020-11-16 16:03     ` Krzysztof Kozlowski
  2020-11-17  7:12       ` Alice Guo
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-16 16:03 UTC (permalink / raw)
  To: Alice Guo
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel

On Mon, Nov 16, 2020 at 07:04:13AM +0000, Alice Guo wrote:
> 
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzk@kernel.org>
> > Sent: 2020年11月15日 0:50
> > To: Alice Guo <alice.guo@nxp.com>
> > Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> > dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org
> > Subject: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc
> > for soc unique ID
> > 
> > Caution: EXT Email
> > 
> > On Fri, Nov 13, 2020 at 07:04:06PM +0800, Alice Guo wrote:
> > > Add DT Binding doc for the Unique ID of i.MX 8M series.
> > >
> > > Signed-off-by: Alice Guo <alice.guo@nxp.com>
> > > ---
> > >  .../devicetree/bindings/arm/fsl.yaml          | 25
> > +++++++++++++++++++
> > >  1 file changed, 25 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > index e4db0f9ed664..f4faebbb57da 100644
> > > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > > @@ -901,6 +901,31 @@ properties:
> > >                - fsl,s32v234-evb           # S32V234-EVB2 Customer
> > Evaluation Board
> > >            - const: fsl,s32v234
> > >
> > > +  soc:
> > > +    type: object
> > > +    properties:
> > > +      compatible:
> > > +        oneOf:
> > > +          - description: i.MX8M SoCs
> > > +            items:
> > > +              - enum:
> > > +                  - fsl,imx8mm-soc
> > > +                  - fsl,imx8mn-soc
> > > +                  - fsl,imx8mp-soc
> > > +                  - fsl,imx8mq-soc
> > > +              - const: simple-bus
> > > +
> > > +          - description: Other 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
> > > +
> > >  additionalProperties: true
> > 
> > The "soc" node should be required for these compatibles. Otherwise you will
> > have to stay with this backwards-compatible-DTB-device-initcall-glue for many
> > years... I think you can achieve it with allOf.
> > 
> [Alice Guo]Hi,
> I find that my description for compatible is ambiguous. There are two kinds of compatible of the "soc" node:
> 1. For dtsi files used for SoCs other than imx8m series SoCs and old version dtsi files used for imx8m series SoCs,
> compatible of the "soc" node is "simple-bus".
> 2. For new version dtsi files used for imx8m series SoCs, compatible of the "soc" node is {"fsl,imx8mX-soc","simple-bus"}.
> 
> "nvmem-cell" is an optional property.
> 
> I do not understand what you mean. You mean that limit the compatible of "soc" node must include " fsl,imx8mX-soc" in new version dts files. Is my understanding correct?

All new DTS files should have soc node with "fsl,imx8mX-soc" and this
should be required by dtschema. The nvmem-cells and related properties
do not look like optional. From the hardware perspective - they are
always present. From the driver point of view: they are required and
driver will fail to work.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID
  2020-11-14 16:49 ` Krzysztof Kozlowski
@ 2020-11-16  7:04   ` Alice Guo
  2020-11-16 16:03     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Alice Guo @ 2020-11-16  7:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: robh+dt, shawnguo, s.hauer, dl-linux-imx, Peng Fan, devicetree,
	linux-kernel, linux-arm-kernel


> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 2020年11月15日 0:50
> To: Alice Guo <alice.guo@nxp.com>
> Cc: robh+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> dl-linux-imx <linux-imx@nxp.com>; Peng Fan <peng.fan@nxp.com>;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org
> Subject: [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc
> for soc unique ID
> 
> Caution: EXT Email
> 
> On Fri, Nov 13, 2020 at 07:04:06PM +0800, Alice Guo wrote:
> > Add DT Binding doc for the Unique ID of i.MX 8M series.
> >
> > Signed-off-by: Alice Guo <alice.guo@nxp.com>
> > ---
> >  .../devicetree/bindings/arm/fsl.yaml          | 25
> +++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml
> > b/Documentation/devicetree/bindings/arm/fsl.yaml
> > index e4db0f9ed664..f4faebbb57da 100644
> > --- a/Documentation/devicetree/bindings/arm/fsl.yaml
> > +++ b/Documentation/devicetree/bindings/arm/fsl.yaml
> > @@ -901,6 +901,31 @@ properties:
> >                - fsl,s32v234-evb           # S32V234-EVB2 Customer
> Evaluation Board
> >            - const: fsl,s32v234
> >
> > +  soc:
> > +    type: object
> > +    properties:
> > +      compatible:
> > +        oneOf:
> > +          - description: i.MX8M SoCs
> > +            items:
> > +              - enum:
> > +                  - fsl,imx8mm-soc
> > +                  - fsl,imx8mn-soc
> > +                  - fsl,imx8mp-soc
> > +                  - fsl,imx8mq-soc
> > +              - const: simple-bus
> > +
> > +          - description: Other 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
> > +
> >  additionalProperties: true
> 
> The "soc" node should be required for these compatibles. Otherwise you will
> have to stay with this backwards-compatible-DTB-device-initcall-glue for many
> years... I think you can achieve it with allOf.
> 
[Alice Guo]Hi,
I find that my description for compatible is ambiguous. There are two kinds of compatible of the "soc" node:
1. For dtsi files used for SoCs other than imx8m series SoCs and old version dtsi files used for imx8m series SoCs,
compatible of the "soc" node is "simple-bus".
2. For new version dtsi files used for imx8m series SoCs, compatible of the "soc" node is {"fsl,imx8mX-soc","simple-bus"}.

"nvmem-cell" is an optional property.

I do not understand what you mean. You mean that limit the compatible of "soc" node must include " fsl,imx8mX-soc" in new version dts files. Is my understanding correct?

Best regards,
Alice

> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-20  7:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17  7:10 [EXT] Re: [PATCH v3 1/4] dt-bindings: soc: imx8m: add DT Binding doc for soc unique ID Alice Guo
2020-11-17  7:36 ` Krzysztof Kozlowski
2020-11-20  6:21   ` Alice Guo
2020-11-20  7:54     ` Krzysztof Kozlowski
  -- strict thread matches above, loose matches on Subject: below --
2020-11-13 11:04 Alice Guo
2020-11-14 16:49 ` Krzysztof Kozlowski
2020-11-16  7:04   ` [EXT] " Alice Guo
2020-11-16 16:03     ` Krzysztof Kozlowski
2020-11-17  7:12       ` Alice Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).