diff mbox series

dt-bindings: PCI: apple: Add missing 'power-domains' property

Message ID 20220526014107.2871787-1-robh@kernel.org
State New
Headers show
Series dt-bindings: PCI: apple: Add missing 'power-domains' property | expand

Commit Message

Rob Herring May 26, 2022, 1:41 a.m. UTC
The 'unevaluatedProperties' schema checks is not fully working and doesn't
catch some cases where there's a $ref to another schema. A fix is pending,
but results in new warnings in examples.

The Apple PCIe host has 3 power domains at least according to the example.
Add the 'power-domains' property to the schema.

Signed-off-by: Rob Herring <robh@kernel.org>
---
Ideally, we'd define what each power domain is, but I don't know what
they are.
---
 Documentation/devicetree/bindings/pci/apple,pcie.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rob Herring May 26, 2022, 12:40 p.m. UTC | #1
On Wed, 25 May 2022 20:41:07 -0500, Rob Herring wrote:
> The 'unevaluatedProperties' schema checks is not fully working and doesn't
> catch some cases where there's a $ref to another schema. A fix is pending,
> but results in new warnings in examples.
> 
> The Apple PCIe host has 3 power domains at least according to the example.
> Add the 'power-domains' property to the schema.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Ideally, we'd define what each power domain is, but I don't know what
> they are.
> ---
>  Documentation/devicetree/bindings/pci/apple,pcie.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


pcie@690000000: power-domains: [[59]] is too short
	arch/arm64/boot/dts/apple/t8103-j274.dtb
	arch/arm64/boot/dts/apple/t8103-j293.dtb
	arch/arm64/boot/dts/apple/t8103-j313.dtb
	arch/arm64/boot/dts/apple/t8103-j456.dtb
	arch/arm64/boot/dts/apple/t8103-j457.dtb
Sven Peter May 26, 2022, 1:48 p.m. UTC | #2
Hi,


On Thu, May 26, 2022, at 03:41, Rob Herring wrote:
> The 'unevaluatedProperties' schema checks is not fully working and doesn't
> catch some cases where there's a $ref to another schema. A fix is pending,
> but results in new warnings in examples.
>
> The Apple PCIe host has 3 power domains at least according to the example.
> Add the 'power-domains' property to the schema.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Ideally, we'd define what each power domain is, but I don't know what
> they are.
> ---

I think the example is just wrong (or outdated) and we only need a single
power-domain for pcie.

The hierarchy is ps_pcie_ref -> ps_apcie -> ps_apcie_gp and the pcie
node then only depends on ps_apcie_gp.




Sven
Rob Herring May 26, 2022, 9:45 p.m. UTC | #3
On Thu, May 26, 2022 at 03:48:15PM +0200, Sven Peter wrote:
> Hi,
> 
> 
> On Thu, May 26, 2022, at 03:41, Rob Herring wrote:
> > The 'unevaluatedProperties' schema checks is not fully working and doesn't
> > catch some cases where there's a $ref to another schema. A fix is pending,
> > but results in new warnings in examples.
> >
> > The Apple PCIe host has 3 power domains at least according to the example.
> > Add the 'power-domains' property to the schema.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > Ideally, we'd define what each power domain is, but I don't know what
> > they are.
> > ---
> 
> I think the example is just wrong (or outdated) and we only need a single
> power-domain for pcie.
> 
> The hierarchy is ps_pcie_ref -> ps_apcie -> ps_apcie_gp and the pcie
> node then only depends on ps_apcie_gp.

Okay, I'll update the example and schema.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/apple,pcie.yaml b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
index daf602ac0d0f..2cf6b4586071 100644
--- a/Documentation/devicetree/bindings/pci/apple,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
@@ -68,6 +68,9 @@  properties:
   iommu-map: true
   iommu-map-mask: true
 
+  power-domains:
+    maxItems: 3
+
 required:
   - compatible
   - reg