dt-bindings: PCI: brcm,iproc-pcie: Fix example indentation
Subsystems (4)
Rob Herring
maintainerPATCH 1/3 dt-bindings: PCI: brcm,iproc-pcie: Fix example indentation
The example's indentation is off. While fixing this, the 'bus' node is unnecessary and can be dropped. It is also preferred to split up unrelated examples to their own entries.
--- .../bindings/pci/brcm,iproc-pcie.yaml | 124 +++++++++--------- 1 file changed, 60 insertions(+), 64 deletions(-)
Documentation/devicetree/bindings/pci/brcm,iproc-pcie.yaml +60 -64
@@ -117,68 +117,64 @@ unevaluatedProperties: false examples: - | - #include <dt-bindings/interrupt-controller/arm-gic.h> - - bus { - #address-cells = <1>; - #size-cells = <1>; - pcie0: pcie@18012000 { - compatible = "brcm,iproc-pcie"; - reg = <0x18012000 0x1000>; - - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>; - - linux,pci-domain = <0>; - - bus-range = <0x00 0xff>; - - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges = <0x81000000 0 0 0x28000000 0 0x00010000>, - <0x82000000 0 0x20000000 0x20000000 0 0x04000000>; - - phys = <&phy 0 5>; - phy-names = "pcie-phy"; - - brcm,pcie-ob; - brcm,pcie-ob-axi-offset = <0x00000000>; - - msi-parent = <&msi0>; - - /* iProc event queue based MSI */ - msi0: msi { - compatible = "brcm,iproc-msi"; - msi-controller; - interrupt-parent = <&gic>; - interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>, - <GIC_SPI 97 IRQ_TYPE_NONE>, - <GIC_SPI 98 IRQ_TYPE_NONE>, - <GIC_SPI 99 IRQ_TYPE_NONE>; - }; - }; - - pcie1: pcie@18013000 { - compatible = "brcm,iproc-pcie"; - reg = <0x18013000 0x1000>; - - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>; - - linux,pci-domain = <1>; - - bus-range = <0x00 0xff>; - - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges = <0x81000000 0 0 0x48000000 0 0x00010000>, - <0x82000000 0 0x40000000 0x40000000 0 0x04000000>; - - phys = <&phy 1 6>; - phy-names = "pcie-phy"; - }; + #include <dt-bindings/interrupt-controller/arm-gic.h> + + pcie@18012000 { + compatible = "brcm,iproc-pcie"; + reg = <0x18012000 0x1000>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>; + + linux,pci-domain = <0>; + + bus-range = <0x00 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + ranges = <0x81000000 0 0 0x28000000 0 0x00010000>, + <0x82000000 0 0x20000000 0x20000000 0 0x04000000>; + + phys = <&phy 0 5>; + phy-names = "pcie-phy"; + + brcm,pcie-ob; + brcm,pcie-ob-axi-offset = <0x00000000>; + + msi-parent = <&msi0>; + + /* iProc event queue based MSI */ + msi0: msi { + compatible = "brcm,iproc-msi"; + msi-controller; + interrupt-parent = <&gic>; + interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>, + <GIC_SPI 97 IRQ_TYPE_NONE>, + <GIC_SPI 98 IRQ_TYPE_NONE>, + <GIC_SPI 99 IRQ_TYPE_NONE>; + }; + }; + - | + pcie@18013000 { + compatible = "brcm,iproc-pcie"; + reg = <0x18013000 0x1000>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>; + + linux,pci-domain = <1>; + + bus-range = <0x00 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + ranges = <0x81000000 0 0 0x48000000 0 0x00010000>, + <0x82000000 0 0x40000000 0x40000000 0 0x04000000>; + + phys = <&phy 1 6>; + phy-names = "pcie-phy"; };
Signature · 1 line
2.40.1
Rob Herring
maintainerPATCH 2/3 dt-bindings: PCI: brcm,iproc-pcie: Drop common pci-bus properties
Drop the unnecessary listing of properties already defined in pci-bus.yaml. Unless there are additional constraints, it is not necessary.
--- .../devicetree/bindings/pci/brcm,iproc-pcie.yaml | 15 --------------- 1 file changed, 15 deletions(-)
Documentation/devicetree/bindings/pci/brcm,iproc-pcie.yaml +0 -15
@@ -34,13 +34,6 @@ properties: description: > Base address and length of the PCIe controller I/O register space - interrupt-map: true - - interrupt-map-mask: true - - "#interrupt-cells": - const: 1 - ranges: minItems: 1 maxItems: 2
@@ -54,16 +47,8 @@ properties: items: - const: pcie-phy - bus-range: true - dma-coherent: true - "#address-cells": true - - "#size-cells": true - - device_type: true - brcm,pcie-ob: type: boolean description: >
Signature · 1 line
2.40.1
Re: [PATCH 2/3] dt-bindings: PCI: brcm,iproc-pcie: Drop common pci-bus properties
Quoted 5 lines · Rob Herring
Drop the unnecessary listing of properties already defined in
pci-bus.yaml. Unless there are additional constraints, it is not necessary.Signed-off-by Rob Herring <[email protected]>
Thanks,
Conor.
Quoted 42 lines
--- .../devicetree/bindings/pci/brcm,iproc-pcie.yaml | 15 --------------- 1 file changed, 15 deletions(-)Documentation/devicetree/bindings/pci/brcm,iproc-pcie.yaml +0
-15@@ -34,13 +34,6 @@ properties: description: > Base address and length of the PCIe controller I/O register space - interrupt-map: true - - interrupt-map-mask: true - - "#interrupt-cells": - const: 1 - ranges: minItems: 1 maxItems: 2@@ -54,16 +47,8 @@ properties: items: - const: pcie-phy - bus-range: true - dma-coherent: true - "#address-cells": true - - "#size-cells": true - - device_type: true - brcm,pcie-ob: type: boolean description: >Signature · 1 line
2.40.1
Re: [PATCH 2/3] dt-bindings: PCI: brcm,iproc-pcie: Drop common pci-bus properties
In reply to Rob HerringQuoted 5 lines · Rob Herring
Drop the unnecessary listing of properties already defined in
pci-bus.yaml. Unless there are additional constraints, it is not necessary.Signed-off-by Rob Herring <[email protected]>
Signature · 1 line
Florian
Re: [PATCH 2/3] dt-bindings: PCI: brcm,iproc-pcie: Drop common pci-bus properties
In reply to Rob HerringQuoted 9 lines · Rob Herring
Drop the unnecessary listing of properties already defined in
pci-bus.yaml. Unless there are additional constraints, it is not necessary.Signed-off-by Rob Herring <[email protected]>--- .../devicetree/bindings/pci/brcm,iproc-pcie.yaml | 15 --------------- 1 file changed, 15 deletions(-)
Applied, thanks!
Rob Herring
maintainerPATCH 3/3 dt-bindings: PCI: brcm,iproc-pcie: Fix 'msi' child node schema
In reply to Rob HerringThe 'msi' child node schema is missing constraints on additional properties. It turns out it is incomplete and properties for it are documented in the parent node by mistake. Move the reference to msi-controller.yaml and the custom properties to the 'msi' node. Adding 'unevaluatedProperties' ensures all the properties in the 'msi' node are documented.
With the schema corrected, a minimal interrupt controller node is needed to properly decode the interrupt properties since the example has multiple interrupt parents.
--- .../bindings/pci/brcm,iproc-pcie.yaml | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/pci/brcm,iproc-pcie.yaml +16 -8
@@ -12,7 +12,6 @@ maintainers: allOf: - $ref: /schemas/pci/pci-bus.yaml# - - $ref: /schemas/interrupt-controller/msi-controller.yaml# properties: compatible:
@@ -63,20 +62,24 @@ properties: msi: type: object + $ref: /schemas/interrupt-controller/msi-controller.yaml# + unevaluatedProperties: false + properties: compatible: items: - const: brcm,iproc-msi - msi-parent: true + interrupts: + maxItems: 4 - msi-controller: true + brcm,pcie-msi-inten: + type: boolean + description: + Needs to be present for some older iProc platforms that require the + interrupt enable registers to be set explicitly to enable MSI - brcm,pcie-msi-inten: - type: boolean - description: > - Needs to be present for some older iProc platforms that require the - interrupt enable registers to be set explicitly to enable MSI + msi-parent: true dependencies: brcm,pcie-ob-axi-offset: ["brcm,pcie-ob"]
@@ -104,6 +107,11 @@ examples: - | #include <dt-bindings/interrupt-controller/arm-gic.h> + gic: interrupt-controller { + interrupt-controller; + #interrupt-cells = <3>; + }; + pcie@18012000 { compatible = "brcm,iproc-pcie"; reg = <0x18012000 0x1000>;
Signature · 1 line
2.40.1
Re: [PATCH 3/3] dt-bindings: PCI: brcm,iproc-pcie: Fix 'msi' child node schema
Quoted 9 lines · Rob Herring
The 'msi' child node schema is missing constraints on additional properties. It turns out it is incomplete and properties for it are documented in the parent node by mistake. Move the reference to
msi-controller.yamland the custom properties to the 'msi' node. Adding 'unevaluatedProperties' ensures all the properties in the 'msi' node are documented.With the schema corrected, a minimal interrupt controller node is needed to properly decode the interrupt properties since the example has multiple interrupt parents.
I suppose this is an ABI break, but the patch just makes the binding match the example and intent. Feels like of all the patches doing the unevaluatedProperty additions, this one is the most deserving of a fixes tag, since the original binding just seems to be completely wrong?
Otherwise,
Thanks,
Conor.
Quoted 65 lines
Signed-off-by Rob Herring <[email protected]>--- .../bindings/pci/brcm,iproc-pcie.yaml | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-)Documentation/devicetree/bindings/pci/brcm,iproc-pcie.yaml +16
-8@@ -12,7 +12,6 @@ maintainers: allOf: - $ref: /schemas/pci/pci-bus.yaml# - - $ref: /schemas/interrupt-controller/msi-controller.yaml# properties: compatible:@@ -63,20 +62,24 @@ properties: msi: type: object + $ref: /schemas/interrupt-controller/msi-controller.yaml# + unevaluatedProperties: false + properties: compatible: items: - const: brcm,iproc-msi - msi-parent: true + interrupts: + maxItems: 4 - msi-controller: true + brcm,pcie-msi-inten: + type: boolean + description: + Needs to be present for some older iProc platforms that require the + interrupt enable registers to be set explicitly to enable MSI - brcm,pcie-msi-inten: - type: boolean - description: > - Needs to be present for some older iProc platforms that require the - interrupt enable registers to be set explicitly to enable MSI + msi-parent: true dependencies: brcm,pcie-ob-axi-offset: ["brcm,pcie-ob"]@@ -104,6 +107,11 @@ examples: - | #include <dt-bindings/interrupt-controller/arm-gic.h> + gic: interrupt-controller { + interrupt-controller; + #interrupt-cells = <3>; + }; + pcie@18012000 { compatible = "brcm,iproc-pcie"; reg = <0x18012000 0x1000>;Signature · 1 line
2.40.1
Rob Herring
maintainerRe: [PATCH 3/3] dt-bindings: PCI: brcm,iproc-pcie: Fix 'msi' child node schema
Quoted 8 lines · Conor Dooley
Quoted 6 lines · Rob Herring
The 'msi' child node schema is missing constraints on additional properties. It turns out it is incomplete and properties for it are documented in the parent node by mistake. Move the reference to
msi-controller.yamland the custom properties to the 'msi' node. Adding 'unevaluatedProperties' ensures all the properties in the 'msi' node are documented.
Quoted 6 lines
Quoted 3 lines
With the schema corrected, a minimal interrupt controller node is needed to properly decode the interrupt properties since the example has multiple interrupt parents.
I suppose this is an ABI break, but the patch just makes the binding match the example and intent.
It also matches what the in tree users do, so not an ABI break. I imagine the .txt binding just listed out properties and the conversion carried that over.
Quoted 3 lines
Feels like of all the patches doing the
unevaluatedProperty additions, this one is the most deserving of a fixes tag, since the original binding just seems to be completely wrong?
Yes, though the example fix is a dependency, so probably not worth backporting.
Rob
Re: [PATCH 3/3] dt-bindings: PCI: brcm,iproc-pcie: Fix 'msi' child node schema
In reply to Rob HerringQuoted 11 lines · Rob Herring
The 'msi' child node schema is missing constraints on additional properties. It turns out it is incomplete and properties for it are documented in the parent node by mistake. Move the reference to
msi-controller.yamland the custom properties to the 'msi' node. Adding 'unevaluatedProperties' ensures all the properties in the 'msi' node are documented.With the schema corrected, a minimal interrupt controller node is needed to properly decode the interrupt properties since the example has multiple interrupt parents.
Signed-off-by Rob Herring <[email protected]>
Signature · 1 line
Florian
Re: [PATCH 3/3] dt-bindings: PCI: brcm,iproc-pcie: Fix 'msi' child node schema
In reply to Rob HerringQuoted 6 lines · Rob Herring
The 'msi' child node schema is missing constraints on additional properties. It turns out it is incomplete and properties for it are documented in the parent node by mistake. Move the reference to
msi-controller.yamland the custom properties to the 'msi' node. Adding 'unevaluatedProperties' ensures all the properties in the 'msi' node are documented.
Quoted 9 lines
With the schema corrected, a minimal interrupt controller node is needed to properly decode the interrupt properties since the example has multiple interrupt parents.
Signed-off-by Rob Herring <[email protected]>--- .../bindings/pci/brcm,iproc-pcie.yaml | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-)
Applied, thanks!
Quoted 3 lines · Rob Herring
The example's indentation is off. While fixing this, the 'bus' node is unnecessary and can be dropped. It is also preferred to split up unrelated examples to their own entries.
Damn, it really was all over the shop..
Thanks,
Conor.
Quoted 5 lines · Rob Herring
The example's indentation is off. While fixing this, the 'bus' node is unnecessary and can be dropped. It is also preferred to split up unrelated examples to their own entries.
Signed-off-by Rob Herring <[email protected]>
Signature · 1 line
Florian
Quoted 9 lines · Rob Herring
The example's indentation is off. While fixing this, the 'bus' node is unnecessary and can be dropped. It is also preferred to split up unrelated examples to their own entries.
Signed-off-by Rob Herring <[email protected]>--- .../bindings/pci/brcm,iproc-pcie.yaml | 124 +++++++++--------- 1 file changed, 60 insertions(+), 64 deletions(-)
Applied, thanks!