devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] dt-bindings: PCI: layerscape-pci: Fix property 'fsl,pcie-scfg' type
@ 2024-06-28 14:48 Frank Li
  2024-06-28 19:45 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Li @ 2024-06-28 14:48 UTC (permalink / raw)
  To: Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	open list:PCI SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list
  Cc: imx

fsl,pcie-scfg actually need an argument when there are more than one PCIe
instances. Change it to phandle-array and use items to describe each field
means.

Fix below warning.

arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: pcie@3400000: fsl,pcie-scfg:0: [22, 0] is too long
        from schema $id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml#

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Change from v1 to v2
- update commit message.
---
 .../devicetree/bindings/pci/fsl,layerscape-pcie.yaml      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml
index 793986c5af7ff..679c2989de7a2 100644
--- a/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml
@@ -43,10 +43,16 @@ properties:
       - const: config
 
   fsl,pcie-scfg:
-    $ref: /schemas/types.yaml#/definitions/phandle
+    $ref: /schemas/types.yaml#/definitions/phandle-array
     description: A phandle to the SCFG device node. The second entry is the
       physical PCIe controller index starting from '0'. This is used to get
       SCFG PEXN registers.
+    items:
+      items:
+        - description: A phandle to the SCFG device node
+        - description: PCIe controller index starting from '0'
+      minItems: 1
+    maxItems: 1
 
   big-endian:
     $ref: /schemas/types.yaml#/definitions/flag
-- 
2.34.1


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

* Re: [PATCH 1/1] dt-bindings: PCI: layerscape-pci: Fix property 'fsl,pcie-scfg' type
  2024-06-28 14:48 [PATCH 1/1] dt-bindings: PCI: layerscape-pci: Fix property 'fsl,pcie-scfg' type Frank Li
@ 2024-06-28 19:45 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2024-06-28 19:45 UTC (permalink / raw)
  To: Frank Li
  Cc: Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Krzysztof Kozlowski, Conor Dooley, open list:PCI SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, imx

On Fri, Jun 28, 2024 at 10:48:57AM -0400, Frank Li wrote:
> fsl,pcie-scfg actually need an argument when there are more than one PCIe
> instances. Change it to phandle-array and use items to describe each field
> means.
> 
> Fix below warning.
> 
> arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: pcie@3400000: fsl,pcie-scfg:0: [22, 0] is too long
>         from schema $id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml#
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Change from v1 to v2
> - update commit message.
> ---
>  .../devicetree/bindings/pci/fsl,layerscape-pcie.yaml      | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml
> index 793986c5af7ff..679c2989de7a2 100644
> --- a/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml
> @@ -43,10 +43,16 @@ properties:
>        - const: config
>  
>    fsl,pcie-scfg:
> -    $ref: /schemas/types.yaml#/definitions/phandle
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
>      description: A phandle to the SCFG device node. The second entry is the
>        physical PCIe controller index starting from '0'. This is used to get
>        SCFG PEXN registers.
> +    items:
> +      items:
> +        - description: A phandle to the SCFG device node
> +        - description: PCIe controller index starting from '0'
> +      minItems: 1

Are there any cases with only the phandle? I don't see any in tree and 
looks like the driver requires the 2nd entry.

> +    maxItems: 1
>  
>    big-endian:
>      $ref: /schemas/types.yaml#/definitions/flag
> -- 
> 2.34.1
> 

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

end of thread, other threads:[~2024-06-28 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 14:48 [PATCH 1/1] dt-bindings: PCI: layerscape-pci: Fix property 'fsl,pcie-scfg' type Frank Li
2024-06-28 19:45 ` Rob Herring

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).