dt-bindings: pci: layerscape-pci: Convert to yaml format
Subsystems (4)
Frank Li
maintainerv6 cover dt-bindings: pci: layerscape-pci: Convert to yaml format
Change from
Change from v5 to v6
- Rob require every commit pass dtb_check, so first commit included
nesssary change. and list change at commit message.
- Reduce to 3 patches.
Change from v4 to v5
- split 5 patch.
- create one base patch, which the same as original txt.
- two patch fix for RC.
- two patch fix for EP.
Change from v3 to v4
- remove ep label
- remove status="disabled"
- remove deprecated property
- fixed irq max-numbers
- because dts still use "reg" instead "dbi", to avoid dtb check warning, not referernece to snps,dwc-pcie yet.
Change from v2 to v3
- update commit message, show change compare txt file
- add failback compatible fsl,ls-pcie-ep.
- add commit message about 'addr_space' and 'config'.
Change from v1 to v2
- remove '|-'
- dma-coherent: true
- add interrupts and interrupt-names at before Allof
- remove ref to snps,pcie*.yaml, some reg-names are not aligned with in drivers
- Add an example for pcie-ep
Frank Li (3):
dt-bindings: pci: layerscape-pci: Convert to yaml format
dt-bindings: pci: layerscape-pci: Add snps,dw-pcie.yaml reference
dt-bindings: pci: layerscape-pci-ep: Add snps,dw-pcie-ep.yaml
reference
.../bindings/pci/fsl,layerscape-pcie-ep.yaml | 91 +++++++++ .../bindings/pci/fsl,layerscape-pcie.yaml | 173 ++++++++++++++++++ .../bindings/pci/layerscape-pci.txt | 79 -------- 3 files changed, 264 insertions(+), 79 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml delete mode 100644 Documentation/devicetree/bindings/pci/layerscape-pci.txt
Signature · 1 line
2.34.1
Frank Li
maintainerPATCH v6 1/3 dt-bindings: pci: layerscape-pci: Convert to yaml format
Split layerscape-pci.txt into two yaml files: fsl,layerscape-pcie-ep.yaml and fsl,layerscape-pcie.yaml.
yaml files contain the same content as the original txt file.
Do below changes to pass dtb_binding check:
- Remove dma-coherent and fsl,pcie-scfg because not every SOC need it.
- Set unevaluatedProperties to true in fsl,layerscape-pcie.yaml.
--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 87 +++++++++++++ .../bindings/pci/fsl,layerscape-pcie.yaml | 121 ++++++++++++++++++ .../bindings/pci/layerscape-pci.txt | 79 ------------ 3 files changed, 208 insertions(+), 79 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml delete mode 100644 Documentation/devicetree/bindings/pci/layerscape-pci.txt
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +87 -0
@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie-ep.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Layerscape PCIe Root Complex(RC) controller + +maintainers: + - Frank Li <[email protected]> + +description: + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP + and thus inherits all the common properties defined in snps,dw-pcie.yaml. + + This controller derives its clocks from the Reset Configuration Word (RCW) + which is used to describe the PLL settings at the time of chip-reset. + + Also as per the available Reference Manuals, there is no specific 'version' + register available in the Freescale PCIe controller register set, + which can allow determining the underlying DesignWare PCIe controller version + information. + +properties: + compatible: + items: + - enum: + - fsl,ls1028a-pcie-ep + - fsl,ls2046a-pcie-ep + - fsl,ls2088a-pcie-ep + - fsl,ls1046a-pcie-ep + - fsl,ls1043a-pcie-ep + - fsl,ls1012a-pcie-ep + - fsl,lx2160ar2-pcie-ep + - const: fsl,ls-pcie-ep + + reg: + description: base addresses and lengths of the PCIe controller register blocks. + + interrupts: + description: A list of interrupt outputs of the controller. Must contain an + entry for each entry in the interrupt-names property. + + interrupt-names: + minItems: 1 + maxItems: 3 + description: It could include the following entries. + items: + oneOf: + - description: + Used for interrupt line which reports AER events when + non MSI/MSI-X/INTx mode is used. + const: aer + - description: + Used for interrupt line which reports PME events when + non MSI/MSI-X/INTx mode is used. + const: pme + - description: + Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) + which has a single interrupt line for miscellaneous controller + events(could include AER and PME events). + const: intr + + fsl,pcie-scfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: Must include two entries. + The first entry must be a link 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 + + dma-coherent: + description: Indicates that the hardware IP block can ensure the coherency + of the data transferred from/to the IP block. This can avoid the software + cache flush/invalid actions, and improve the performance significantly + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: If the PEX_LUT and PF register block is in big-endian, specify + this property. + +unevaluatedProperties: false + +required: + - compatible + - reg + - interrupt-names +
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +121 -0
121 lines not on this page · raw message
Documentation/devicetree/bindings/pci/layerscape-pci.txt deleted +0 -79
79 lines not on this page · raw message
Signature · 1 line
2.34.1
Rob Herring
maintainerQuoted 6 lines · Frank Li
Split layerscape-pci.txt into two yaml files: fsl,layerscape-pcie-ep.yaml and fsl,layerscape-pcie.yaml.
yaml files contain the same content as the original txt file.Do below changes to pass
dtb_bindingcheck:
- Remove dma-coherent and fsl,pcie-scfg because not every SOC need it.
You mean 'remove from required' right? Because they are still here.
Quoted 1 line
- Set unevaluatedProperties to true in fsl,layerscape-pcie.yaml.
Sorry, but that's not acceptable either. You need the $ref's in this patch.
Quoted 45 lines
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 87 +++++++++++++ .../bindings/pci/fsl,layerscape-pcie.yaml | 121 ++++++++++++++++++ .../bindings/pci/layerscape-pci.txt | 79 ------------ 3 files changed, 208 insertions(+), 79 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml delete mode 100644 Documentation/devicetree/bindings/pci/layerscape-pci.txtDocumentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +28
-0@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie-ep.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Layerscape PCIe Root Complex(RC) controller + +maintainers: + - Frank Li <[email protected]> + +description: + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP + and thus inherits all the common properties defined in snps,dw-pcie.yaml. + + This controller derives its clocks from the Reset Configuration Word (RCW) + which is used to describe the PLL settings at the time of chip-reset. + + Also as per the available Reference Manuals, there is no specific 'version' + register available in the Freescale PCIe controller register set, + which can allow determining the underlying DesignWare PCIe controller version + information. + +properties: + compatible: + items: + - enum: + - fsl,ls1028a-pcie-ep
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 38
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +10
-0+ - fsl,ls2046a-pcie-ep + - fsl,ls2088a-pcie-ep + - fsl,ls1046a-pcie-ep + - fsl,ls1043a-pcie-ep + - fsl,ls1012a-pcie-ep + - fsl,lx2160ar2-pcie-ep + - const: fsl,ls-pcie-ep + + reg: + description: base addresses and lengths of the PCIe controller register blocks.
You need to define how many entries and what they are.
Missing 'reg-names'?
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 42
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +4
-0+ + interrupts: + description: A list of interrupt outputs of the controller. Must contain an + entry for each entry in the interrupt-names property.
You need to define how many entries and what they are.
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +10
-0+ + interrupt-names: + minItems: 1 + maxItems: 3 + description: It could include the following entries. + items: + oneOf: + - description: + Used for interrupt line which reports AER events when + non MSI/MSI-X/INTx mode is used.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 62
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +10
-0+ const: aer + - description: + Used for interrupt line which reports PME events when + non MSI/MSI-X/INTx mode is used. + const: pme + - description: + Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) + which has a single interrupt line for miscellaneous controller + events(could include AER and PME events). + const: intr
The way this works is the common schema defines all possible names. This schema needs to define how many entries, which names you use, and what is the order. So you need to add 'pme' and 'aer' to snps,dw-pcie-ep.yaml.
I imagine the order of entries is a mess here, and I don't expect there's any new Layerscape platforms coming. So this binding can just say:
minItems: 1
maxItems: 3
items:
enum: [ aer, pme, intr ]
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 74
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +12
-0+ + fsl,pcie-scfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: Must include two entries. + The first entry must be a link 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 + + dma-coherent: + description: Indicates that the hardware IP block can ensure the coherency + of the data transferred from/to the IP block. This can avoid the software + cache flush/invalid actions, and improve the performance significantly
Already listed in the common schema, so you can drop.
Quoted 48 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +13
-0+ + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: If the PEX_LUT and PF register block is in big-endian, specify + this property. + +unevaluatedProperties: false + +required: + - compatible + - reg + - interrupt-names +Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +29
-0@@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Layerscape PCIe Root Complex(RC) controller + +maintainers: + - Frank Li <[email protected]> + +description: + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP + and thus inherits all the common properties defined in snps,dw-pcie.yaml. + + This controller derives its clocks from the Reset Configuration Word (RCW) + which is used to describe the PLL settings at the time of chip-reset. + + Also as per the available Reference Manuals, there is no specific 'version' + register available in the Freescale PCIe controller register set, + which can allow determining the underlying DesignWare PCIe controller version + information. + +properties: + compatible: + enum: + - fsl,ls1021a-pcie + - fsl,ls2080a-pcie + - fsl,ls2085a-pcie
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 39
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +10
-0+ - fsl,ls2088a-pcie + - fsl,ls1088a-pcie + - fsl,ls1046a-pcie + - fsl,ls1043a-pcie + - fsl,ls1012a-pcie + - fsl,ls1028a-pcie + - fsl,lx2160a-pcie + + reg: + description: base addresses and lengths of the PCIe controller register blocks.
You need to define how many entries and what they are.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 43
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +4
-0+ + interrupts: + description: A list of interrupt outputs of the controller. Must contain an + entry for each entry in the interrupt-names property.
You need to define how many entries and what they are.
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +10
-0+ + interrupt-names: + minItems: 1 + maxItems: 3 + description: It could include the following entries. + items: + oneOf: + - description: + Used for interrupt line which reports AER events when + non MSI/MSI-X/INTx mode is used.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 63
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +10
-0+ const: aer + - description: + Used for interrupt line which reports PME events when + non MSI/MSI-X/INTx mode is used. + const: pme + - description: + Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) + which has a single interrupt line for miscellaneous controller + events(could include AER and PME events). + const: intr
Similar comment here, but the names are already defined in snps,dw-pcie.yaml.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 75
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +12
-0+ + fsl,pcie-scfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: Must include two entries. + The first entry must be a link 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 + + dma-coherent: + description: Indicates that the hardware IP block can ensure the coherency + of the data transferred from/to the IP block. This can avoid the software + cache flush/invalid actions, and improve the performance significantly
Drop
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 86
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +11
-0+ + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: If the PEX_LUT and PF register block is in big-endian, specify + this property. + +unevaluatedProperties: true + +required: + - compatible + - reg
Both required in common schema. Drop.
Quoted 35 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +35
-0+ - interrupt-names + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie@3400000 { + compatible = "fsl,ls1088a-pcie"; + reg = <0x00 0x03400000 0x0 0x00100000>, /* controller registers */ + <0x20 0x00000000 0x0 0x00002000>; /* configuration space */ + reg-names = "regs", "config"; + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */ + interrupt-names = "aer"; + #address-cells = <3>; + #size-cells = <2>; + dma-coherent; + device_type = "pci"; + bus-range = <0x0 0xff>; + ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000 /* downstream I/O */ + 0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ + msi-parent = <&its>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0000 0 0 1 &gic 0 0 0 109 IRQ_TYPE_LEVEL_HIGH>, + <0000 0 0 2 &gic 0 0 0 110 IRQ_TYPE_LEVEL_HIGH>, + <0000 0 0 3 &gic 0 0 0 111 IRQ_TYPE_LEVEL_HIGH>, + <0000 0 0 4 &gic 0 0 0 112 IRQ_TYPE_LEVEL_HIGH>; + iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */ + }; + }; +...
Frank Li
maintainerQuoted 8 lines · Rob Herring
Quoted 6 lines · Frank Li
Split layerscape-pci.txt into two yaml files: fsl,layerscape-pcie-ep.yaml and fsl,layerscape-pcie.yaml.
yaml files contain the same content as the original txt file.Do below changes to pass
dtb_bindingcheck:
- Remove dma-coherent and fsl,pcie-scfg because not every SOC need it.
Quoted 6 lines
You mean 'remove from required' right? Because they are still here.
Quoted 1 line
- Set unevaluatedProperties to true in fsl,layerscape-pcie.yaml.
Sorry, but that's not acceptable either. You need the $ref's in this patch.
Rob:
If I squash this 3 patches, it will match most your comments. And will back to my previous v3's patches,
https://lore.kernel.org/imx/[email protected]/
Bjorn Helgaas suggest split to patches:
https://lore.kernel.org/imx/20240226210842.GA211190@bhelgaas/
First one will be equal to origial txt, then add change base on that.
I need a clear direction before I continue on this.
Frank
Quoted 276 lines
Quoted 46 lines
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 87 +++++++++++++ .../bindings/pci/fsl,layerscape-pcie.yaml | 121 ++++++++++++++++++ .../bindings/pci/layerscape-pci.txt | 79 ------------ 3 files changed, 208 insertions(+), 79 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml create mode 100644 Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml delete mode 100644 Documentation/devicetree/bindings/pci/layerscape-pci.txtDocumentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +28
-0@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie-ep.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Layerscape PCIe Root Complex(RC) controller + +maintainers: + - Frank Li <[email protected]> + +description: + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP + and thus inherits all the common properties defined in snps,dw-pcie.yaml. + + This controller derives its clocks from the Reset Configuration Word (RCW) + which is used to describe the PLL settings at the time of chip-reset. + + Also as per the available Reference Manuals, there is no specific 'version' + register available in the Freescale PCIe controller register set, + which can allow determining the underlying DesignWare PCIe controller version + information. + +properties: + compatible: + items: + - enum: + - fsl,ls1028a-pcie-epDocumentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 38
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +10
-0+ - fsl,ls2046a-pcie-ep + - fsl,ls2088a-pcie-ep + - fsl,ls1046a-pcie-ep + - fsl,ls1043a-pcie-ep + - fsl,ls1012a-pcie-ep + - fsl,lx2160ar2-pcie-ep + - const: fsl,ls-pcie-ep + + reg: + description: base addresses and lengths of the PCIe controller register blocks.You need to define how many entries and what they are.
Missing 'reg-names'?
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 42
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +4
-0+ + interrupts: + description: A list of interrupt outputs of the controller. Must contain an + entry for each entry in the interrupt-names property.You need to define how many entries and what they are.
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +10
-0+ + interrupt-names: + minItems: 1 + maxItems: 3 + description: It could include the following entries. + items: + oneOf: + - description: + Used for interrupt line which reports AER events when + non MSI/MSI-X/INTx mode is used.Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 62
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +10
-0+ const: aer + - description: + Used for interrupt line which reports PME events when + non MSI/MSI-X/INTx mode is used. + const: pme + - description: + Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) + which has a single interrupt line for miscellaneous controller + events(could include AER and PME events). + const: intrThe way this works is the common schema defines all possible names. This schema needs to define how many entries, which names you use, and what is the order. So you need to add 'pme' and 'aer' to snps,dw-pcie-ep.yaml.
I imagine the order of entries is a mess here, and I don't expect there's any new Layerscape platforms coming. So this binding can just say:
minItems: 1
maxItems: 3
items:
enum: [ aer, pme, intr ]Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml line 74
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +12
-0+ + fsl,pcie-scfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: Must include two entries. + The first entry must be a link 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 + + dma-coherent: + description: Indicates that the hardware IP block can ensure the coherency + of the data transferred from/to the IP block. This can avoid the software + cache flush/invalid actions, and improve the performance significantlyAlready listed in the common schema, so you can drop.
Quoted 48 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml new file +13
-0+ + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: If the PEX_LUT and PF register block is in big-endian, specify + this property. + +unevaluatedProperties: false + +required: + - compatible + - reg + - interrupt-names +Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +29
-0@@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Layerscape PCIe Root Complex(RC) controller + +maintainers: + - Frank Li <[email protected]> + +description: + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP + and thus inherits all the common properties defined in snps,dw-pcie.yaml. + + This controller derives its clocks from the Reset Configuration Word (RCW) + which is used to describe the PLL settings at the time of chip-reset. + + Also as per the available Reference Manuals, there is no specific 'version' + register available in the Freescale PCIe controller register set, + which can allow determining the underlying DesignWare PCIe controller version + information. + +properties: + compatible: + enum: + - fsl,ls1021a-pcie + - fsl,ls2080a-pcie + - fsl,ls2085a-pcieDocumentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 39
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +10
-0+ - fsl,ls2088a-pcie + - fsl,ls1088a-pcie + - fsl,ls1046a-pcie + - fsl,ls1043a-pcie + - fsl,ls1012a-pcie + - fsl,ls1028a-pcie + - fsl,lx2160a-pcie + + reg: + description: base addresses and lengths of the PCIe controller register blocks.You need to define how many entries and what they are.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 43
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +4
-0+ + interrupts: + description: A list of interrupt outputs of the controller. Must contain an + entry for each entry in the interrupt-names property.You need to define how many entries and what they are.
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +10
-0+ + interrupt-names: + minItems: 1 + maxItems: 3 + description: It could include the following entries. + items: + oneOf: + - description: + Used for interrupt line which reports AER events when + non MSI/MSI-X/INTx mode is used.Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 63
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +10
-0+ const: aer + - description: + Used for interrupt line which reports PME events when + non MSI/MSI-X/INTx mode is used. + const: pme + - description: + Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) + which has a single interrupt line for miscellaneous controller + events(could include AER and PME events). + const: intrSimilar comment here, but the names are already defined in snps,dw-pcie.yaml.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 75
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +12
-0+ + fsl,pcie-scfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: Must include two entries. + The first entry must be a link 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 + + dma-coherent: + description: Indicates that the hardware IP block can ensure the coherency + of the data transferred from/to the IP block. This can avoid the software + cache flush/invalid actions, and improve the performance significantlyDrop
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml line 86
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +11
-0+ + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: If the PEX_LUT and PF register block is in big-endian, specify + this property. + +unevaluatedProperties: true + +required: + - compatible + - regBoth required in common schema. Drop.
Quoted 35 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml new file +35
-0+ - interrupt-names + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie@3400000 { + compatible = "fsl,ls1088a-pcie"; + reg = <0x00 0x03400000 0x0 0x00100000>, /* controller registers */ + <0x20 0x00000000 0x0 0x00002000>; /* configuration space */ + reg-names = "regs", "config"; + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */ + interrupt-names = "aer"; + #address-cells = <3>; + #size-cells = <2>; + dma-coherent; + device_type = "pci"; + bus-range = <0x0 0xff>; + ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000 /* downstream I/O */ + 0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ + msi-parent = <&its>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0000 0 0 1 &gic 0 0 0 109 IRQ_TYPE_LEVEL_HIGH>, + <0000 0 0 2 &gic 0 0 0 110 IRQ_TYPE_LEVEL_HIGH>, + <0000 0 0 3 &gic 0 0 0 111 IRQ_TYPE_LEVEL_HIGH>, + <0000 0 0 4 &gic 0 0 0 112 IRQ_TYPE_LEVEL_HIGH>; + iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */ + }; + }; +...
Rob Herring
maintainerQuoted 17 lines · Frank Li
Quoted 8 lines · Rob Herring
Quoted 6 lines · Frank Li
Split layerscape-pci.txt into two yaml files: fsl,layerscape-pcie-ep.yaml and fsl,layerscape-pcie.yaml.
yaml files contain the same content as the original txt file.Do below changes to pass
dtb_bindingcheck:
- Remove dma-coherent and fsl,pcie-scfg because not every SOC need it.Quoted 6 lines
You mean 'remove from required' right? Because they are still here.
Quoted 1 line
- Set unevaluatedProperties to true in fsl,layerscape-pcie.yaml.
Sorry, but that's not acceptable either. You need the $ref's in this patch.
Quoted 5 lines
Rob:
If I squash this 3 patches, it will match most your comments. And will back to my previous v3's patches,
https://lore.kernel.org/imx/[email protected]/
Plus our review comments I hope...
Quoted 7 lines
Bjorn Helgaas suggest split to patches:
https://lore.kernel.org/imx/20240226210842.GA211190@bhelgaas/First one will be equal to origial txt, then add change base on that.
I need a clear direction before I continue on this.
Bjorn's suggestion doesn't work. I think it was confused in that you said you were 'adding' things. You aren't adding things, just fixing things to make the validation pass.
If you want to split things, you could add reg and/or interrupt names to the common schema first. And then add Layerscape schemas. But don't add things you turn around and remove in the very next patch. I think Krzysztof told you the very same thing.
Rob
Frank Li
maintainerQuoted 34 lines · Rob Herring
Quoted 17 lines · Frank Li
Quoted 8 lines · Rob Herring
Quoted 6 lines · Frank Li
Split layerscape-pci.txt into two yaml files: fsl,layerscape-pcie-ep.yaml and fsl,layerscape-pcie.yaml.
yaml files contain the same content as the original txt file.Do below changes to pass
dtb_bindingcheck:
- Remove dma-coherent and fsl,pcie-scfg because not every SOC need it.Quoted 6 lines
You mean 'remove from required' right? Because they are still here.
Quoted 1 line
- Set unevaluatedProperties to true in fsl,layerscape-pcie.yaml.
Sorry, but that's not acceptable either. You need the $ref's in this patch.
Quoted 5 lines
Rob:
If I squash this 3 patches, it will match most your comments. And will back to my previous v3's patches,
https://lore.kernel.org/imx/[email protected]/Plus our review comments I hope...
Quoted 7 lines
Bjorn Helgaas suggest split to patches:
https://lore.kernel.org/imx/20240226210842.GA211190@bhelgaas/First one will be equal to origial txt, then add change base on that.
I need a clear direction before I continue on this.
Quoted 8 lines
Bjorn's suggestion doesn't work. I think it was confused in that you said you were 'adding' things. You aren't adding things, just fixing things to make the validation pass.
If you want to split things, you could add reg and/or interrupt names to the common schema first. And then add Layerscape schemas. But don't add things you turn around and remove in the very next patch. I think Krzysztof told you the very same thing.
@Bjorn:
Do you agree squash these 3 patches? I don't want to split again.
I prefer focus on the real value things. It is not difficult to review at one patches. Origianl txt actaully relately simple.
Frank
Quoted 2 lines
Rob
Frank Li
maintainerQuoted 34 lines · Rob Herring
Quoted 17 lines · Frank Li
Quoted 8 lines · Rob Herring
Quoted 6 lines · Frank Li
Split layerscape-pci.txt into two yaml files: fsl,layerscape-pcie-ep.yaml and fsl,layerscape-pcie.yaml.
yaml files contain the same content as the original txt file.Do below changes to pass
dtb_bindingcheck:
- Remove dma-coherent and fsl,pcie-scfg because not every SOC need it.Quoted 6 lines
You mean 'remove from required' right? Because they are still here.
Quoted 1 line
- Set unevaluatedProperties to true in fsl,layerscape-pcie.yaml.
Sorry, but that's not acceptable either. You need the $ref's in this patch.
Quoted 5 lines
Rob:
If I squash this 3 patches, it will match most your comments. And will back to my previous v3's patches,
https://lore.kernel.org/imx/[email protected]/Plus our review comments I hope...
Quoted 7 lines
Bjorn Helgaas suggest split to patches:
https://lore.kernel.org/imx/20240226210842.GA211190@bhelgaas/First one will be equal to origial txt, then add change base on that.
I need a clear direction before I continue on this.
Quoted 8 lines
Bjorn's suggestion doesn't work. I think it was confused in that you said you were 'adding' things. You aren't adding things, just fixing things to make the validation pass.
If you want to split things, you could add reg and/or interrupt names to the common schema first. And then add Layerscape schemas. But don't add things you turn around and remove in the very next patch. I think Krzysztof told you the very same thing.
@Bjorn:
Do you agree on square 3 patch to one or others? All dt-binding scheme
have to pass dt_check. Rob and conor already take many time to review this patches.
Frank
Quoted 2 lines
Rob
Frank Li
maintainerPATCH v6 2/3 dt-bindings: pci: layerscape-pci: Add snps,dw-pcie.yaml reference
In reply to Frank LiAdd snps,dw-pcie.yaml reference. Clean up all context that already exist in snps,dw-pcie.yaml. Update interrupt-names requirement for difference compatible string.
Set 'unevaluatedProperties' back to 'false'.
--- .../bindings/pci/fsl,layerscape-pcie.yaml | 104 +++++++++++++----- 1 file changed, 78 insertions(+), 26 deletions(-)
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +78 -26
@@ -11,7 +11,6 @@ maintainers: description: This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.
@@ -36,31 +35,18 @@ properties: - fsl,lx2160a-pcie reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2 interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle
@@ -69,23 +55,88 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true + + msi-parent: true + + iommu-map: true big-endian: $ref: /schemas/types.yaml#/definitions/flag description: If the PEX_LUT and PF register block is in big-endian, specify this property. -unevaluatedProperties: true +unevaluatedProperties: false required: - compatible - reg - interrupt-names +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - $ref: /schemas/pci/snps,dw-pcie.yaml# + - if: + properties: + compatible: + enum: + - fsl,lx2160a-pcie + then: + properties: + interrupts: + maxItems: 3 + interrupt-names: + items: + - const: pme + - const: aer + - const: intr + + - if: + properties: + compatible: + enum: + - fsl,ls1028a-pcie + - fsl,ls1046a-pcie + - fsl,ls1043a-pcie + - fsl,ls1012a-pcie + then: + properties: + interrupts: + maxItems: 2 + interrupt-names: + items: + - const: pme + - const: aer + + - if: + properties: + compatible: + enum: + - fsl,ls2080a-pcie + - fsl,ls2085a-pcie + - fsl,ls2088a-pcie + - fsl,ls1021a-pcie + then: + properties: + interrupts: + maxItems: 1 + interrupt-names: + items: + - const: intr + + - if: + properties: + compatible: + enum: + - fsl,ls1088a-pcie + then: + properties: + interrupts: + maxItems: 1 + interrupt-names: + items: + - const: aer + examples: - | #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -98,7 +149,7 @@ examples: compatible = "fsl,ls1088a-pcie"; reg = <0x00 0x03400000 0x0 0x00100000>, /* controller registers */ <0x20 0x00000000 0x0 0x00002000>; /* configuration space */ - reg-names = "regs", "config"; + reg-names = "dbi", "config"; interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */ interrupt-names = "aer"; #address-cells = <3>;
@@ -116,6 +167,7 @@ examples: <0000 0 0 3 &gic 0 0 0 111 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 4 &gic 0 0 0 112 IRQ_TYPE_LEVEL_HIGH>; iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */ + msi-map = <0 &its 0 1>; /* Fixed-up by bootloader */ }; }; ...
Signature · 1 line
2.34.1
Rob Herring
maintainerRe: [PATCH v6 2/3] dt-bindings: pci: layerscape-pci: Add snps,dw-pcie.yaml reference
Quoted 24 lines · Frank Li
Add snps,dw-pcie.yaml reference. Clean up all context that already exist in snps,dw-pcie.yaml. Update interrupt-names requirement for difference compatible string.
Set 'unevaluatedProperties' back to 'false'.
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie.yaml | 104 +++++++++++++----- 1 file changed, 78 insertions(+), 26 deletions(-)Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +0
-1@@ -11,7 +11,6 @@ maintainers: description: This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 41
Quoted 8 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +4
-1@@ -36,31 +35,18 @@ properties: - fsl,lx2160a-pcie reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2
Need to define what the entries are. You change 'regs' to 'dbi' in the example. Was that an error in the example or are you planning on changing it in dts files? Besides the latter being an ABI change, I don't think you want to change dts files for platforms which are pretty stable.
Quoted 29 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +2
-18interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 58
Quoted 8 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +1
-4@@ -69,23 +55,88 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true
No need to list.
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +4
-0+ + msi-parent: true + + iommu-map: true big-endian: $ref: /schemas/types.yaml#/definitions/flag description: If the PEX_LUT and PF register block is in big-endian, specify this property.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 77
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +3
-1-unevaluatedProperties: true +unevaluatedProperties: false required: - compatible - reg - interrupt-names +allOf: + - $ref: /schemas/pci/pci-bus.yaml#
That's already referenced in the common schema.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 87
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +10
-0+ - $ref: /schemas/pci/snps,dw-pcie.yaml# + - if: + properties: + compatible: + enum: + - fsl,lx2160a-pcie + then: + properties: + interrupts: + maxItems: 3
max is already 3.
minItems: 3
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 92
Quoted 5 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +5
-0+ interrupt-names: + items: + - const: pme + - const: aer + - const: intr
I guess since you figured out the ordering here, you should keep them despite what I said in the first patch.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 105
Quoted 13 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +13
-0+ + - if: + properties: + compatible: + enum: + - fsl,ls1028a-pcie + - fsl,ls1046a-pcie + - fsl,ls1043a-pcie + - fsl,ls1012a-pcie + then: + properties: + interrupts: + maxItems: 2
minItems: 2
maxItems: 2
Quoted 57 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +36
-1+ interrupt-names: + items: + - const: pme + - const: aer + + - if: + properties: + compatible: + enum: + - fsl,ls2080a-pcie + - fsl,ls2085a-pcie + - fsl,ls2088a-pcie + - fsl,ls1021a-pcie + then: + properties: + interrupts: + maxItems: 1 + interrupt-names: + items: + - const: intr + + - if: + properties: + compatible: + enum: + - fsl,ls1088a-pcie + then: + properties: + interrupts: + maxItems: 1 + interrupt-names: + items: + - const: aer + examples: - | #include <dt-bindings/interrupt-controller/arm-gic.h>@@ -98,7 +149,7 @@ examples: compatible = "fsl,ls1088a-pcie"; reg = <0x00 0x03400000 0x0 0x00100000>, /* controller registers */ <0x20 0x00000000 0x0 0x00002000>; /* configuration space */ - reg-names = "regs", "config"; + reg-names = "dbi", "config"; interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */ interrupt-names = "aer"; #address-cells = <3>;@@ -116,6 +167,7 @@ examples: <0000 0 0 3 &gic 0 0 0 111 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 4 &gic 0 0 0 112 IRQ_TYPE_LEVEL_HIGH>; iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */ + msi-map = <0 &its 0 1>; /* Fixed-up by bootloader */ }; };Signature · 1 line
2.34.1
Frank Li
maintainerRe: [PATCH v6 2/3] dt-bindings: pci: layerscape-pci: Add snps,dw-pcie.yaml reference
Quoted 27 lines · Rob Herring
Quoted 26 lines · Frank Li
Add snps,dw-pcie.yaml reference. Clean up all context that already exist in snps,dw-pcie.yaml. Update interrupt-names requirement for difference compatible string.
Set 'unevaluatedProperties' back to 'false'.
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie.yaml | 104 +++++++++++++----- 1 file changed, 78 insertions(+), 26 deletions(-)Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +0
-1@@ -11,7 +11,6 @@ maintainers: description: This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.@@ -36,31 +35,18 @@ properties: - fsl,lx2160a-pcie
Quoted 12 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 41
Quoted 6 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +4
-1reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2Need to define what the entries are. You change 'regs' to 'dbi' in the example. Was that an error in the example or are you planning on changing it in dts files? Besides the latter being an ABI change, I don't think you want to change dts files for platforms which are pretty stable.
It is on my plan.
https://lore.kernel.org/linux-pci/[email protected]/
Need change driver first, then change dts.
It still need maintainance, even it is stable.
Frank
Quoted 162 lines
Quoted 30 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +2
-18interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandleDocumentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 58
Quoted 8 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +1
-4@@ -69,23 +55,88 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: trueNo need to list.
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +4
-0+ + msi-parent: true + + iommu-map: true big-endian: $ref: /schemas/types.yaml#/definitions/flag description: If the PEX_LUT and PF register block is in big-endian, specify this property.Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 77
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +3
-1-unevaluatedProperties: true +unevaluatedProperties: false required: - compatible - reg - interrupt-names +allOf: + - $ref: /schemas/pci/pci-bus.yaml#That's already referenced in the common schema.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 87
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +10
-0+ - $ref: /schemas/pci/snps,dw-pcie.yaml# + - if: + properties: + compatible: + enum: + - fsl,lx2160a-pcie + then: + properties: + interrupts: + maxItems: 3max is already 3.
minItems: 3
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 92
Quoted 5 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +5
-0+ interrupt-names: + items: + - const: pme + - const: aer + - const: intrI guess since you figured out the ordering here, you should keep them despite what I said in the first patch.
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml properties: · line 105
Quoted 13 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +13
-0+ + - if: + properties: + compatible: + enum: + - fsl,ls1028a-pcie + - fsl,ls1046a-pcie + - fsl,ls1043a-pcie + - fsl,ls1012a-pcie + then: + properties: + interrupts: + maxItems: 2minItems: 2
maxItems: 2Quoted 57 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie.yaml +36
-1+ interrupt-names: + items: + - const: pme + - const: aer + + - if: + properties: + compatible: + enum: + - fsl,ls2080a-pcie + - fsl,ls2085a-pcie + - fsl,ls2088a-pcie + - fsl,ls1021a-pcie + then: + properties: + interrupts: + maxItems: 1 + interrupt-names: + items: + - const: intr + + - if: + properties: + compatible: + enum: + - fsl,ls1088a-pcie + then: + properties: + interrupts: + maxItems: 1 + interrupt-names: + items: + - const: aer + examples: - | #include <dt-bindings/interrupt-controller/arm-gic.h>@@ -98,7 +149,7 @@ examples: compatible = "fsl,ls1088a-pcie"; reg = <0x00 0x03400000 0x0 0x00100000>, /* controller registers */ <0x20 0x00000000 0x0 0x00002000>; /* configuration space */ - reg-names = "regs", "config"; + reg-names = "dbi", "config"; interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */ interrupt-names = "aer"; #address-cells = <3>;@@ -116,6 +167,7 @@ examples: <0000 0 0 3 &gic 0 0 0 111 IRQ_TYPE_LEVEL_HIGH>, <0000 0 0 4 &gic 0 0 0 112 IRQ_TYPE_LEVEL_HIGH>; iommu-map = <0 &smmu 0 1>; /* Fixed-up by bootloader */ + msi-map = <0 &its 0 1>; /* Fixed-up by bootloader */ }; };Signature · 1 line
2.34.1
Frank Li
maintainerPATCH v6 3/3 dt-bindings: pci: layerscape-pci-ep: Add snps,dw-pcie-ep.yaml reference
In reply to Frank LiAdd snps,dw-pcie-ep.yaml.
Remove context that exist in snps,dw-pcie-ep.yaml.
Add an example for pcie-ep.
--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-)
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +29 -25
@@ -10,8 +10,7 @@ maintainers: - Frank Li <[email protected]> description: - This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.
@@ -35,31 +34,18 @@ properties: - const: fsl,ls-pcie-ep reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2 interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle
@@ -68,10 +54,7 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true big-endian: $ref: /schemas/types.yaml#/definitions/flag
@@ -85,3 +68,24 @@ required: - reg - interrupt-names +allOf: + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie-ep@3400000 { + compatible = "fsl,ls1028a-pcie-ep", "fsl,ls-pcie-ep"; + reg = <0x00 0x03400000 0x0 0x00100000 + 0x80 0x00000000 0x8 0x00000000>; + reg-names = "dbi", "addr_space"; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */ + interrupt-names = "app"; + }; + }; +...
Signature · 1 line
2.34.1
Rob Herring
maintainerRe: [PATCH v6 3/3] dt-bindings: pci: layerscape-pci-ep: Add snps,dw-pcie-ep.yaml reference
Quoted 86 lines · Frank Li
Add snps,dw-pcie-ep.yaml.
Remove context that exist in snps,dw-pcie-ep.yaml.
Add an example for pcie-ep.
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-)Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +15
-25@@ -10,8 +10,7 @@ maintainers: - Frank Li <[email protected]> description: - This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.@@ -35,31 +34,18 @@ properties: - const: fsl,ls-pcie-ep reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2 interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle@@ -68,10 +54,7 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true big-endian: $ref: /schemas/types.yaml#/definitions/flag@@ -85,3 +68,24 @@ required: - reg - interrupt-names +allOf: + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> +
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 87
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +10
-0+ soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie-ep@3400000 { + compatible = "fsl,ls1028a-pcie-ep", "fsl,ls-pcie-ep"; + reg = <0x00 0x03400000 0x0 0x00100000 + 0x80 0x00000000 0x8 0x00000000>; + reg-names = "dbi", "addr_space"; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */
PME or...
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 88
Quoted 1 line
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +1
-0+ interrupt-names = "app";
app? You seem to just be changing the names to make the example happy. What do the dts files have? You need to make those pass.
Rob
Frank Li
maintainerRe: [PATCH v6 3/3] dt-bindings: pci: layerscape-pci-ep: Add snps,dw-pcie-ep.yaml reference
Quoted 100 lines · Rob Herring
Quoted 86 lines · Frank Li
Add snps,dw-pcie-ep.yaml.
Remove context that exist in snps,dw-pcie-ep.yaml.
Add an example for pcie-ep.
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-)Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +15
-25@@ -10,8 +10,7 @@ maintainers: - Frank Li <[email protected]> description: - This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.@@ -35,31 +34,18 @@ properties: - const: fsl,ls-pcie-ep reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2 interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle@@ -68,10 +54,7 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true big-endian: $ref: /schemas/types.yaml#/definitions/flag@@ -85,3 +68,24 @@ required: - reg - interrupt-names +allOf: + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> +Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 87
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +10
-0+ soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie-ep@3400000 { + compatible = "fsl,ls1028a-pcie-ep", "fsl,ls-pcie-ep"; + reg = <0x00 0x03400000 0x0 0x00100000 + 0x80 0x00000000 0x8 0x00000000>; + reg-names = "dbi", "addr_space"; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */PME or...
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 88
Quoted 1 line
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +1
-0+ interrupt-names = "app";app? You seem to just be changing the names to make the example happy. What do the dts files have? You need to make those pass.
It's on my plan.
First need change 'regs' to 'dbi'.
https://lore.kernel.org/linux-pci/[email protected]/
After that, I can update all dts.
The second step:
Change EP side interrupt-names.
Frank
Quoted 2 lines
Rob
Rob Herring
maintainerRe: [PATCH v6 3/3] dt-bindings: pci: layerscape-pci-ep: Add snps,dw-pcie-ep.yaml reference
Quoted 106 lines · Frank Li
Quoted 100 lines · Rob Herring
Quoted 86 lines · Frank Li
Add snps,dw-pcie-ep.yaml.
Remove context that exist in snps,dw-pcie-ep.yaml.
Add an example for pcie-ep.
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-)Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +15
-25@@ -10,8 +10,7 @@ maintainers: - Frank Li <[email protected]> description: - This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.@@ -35,31 +34,18 @@ properties: - const: fsl,ls-pcie-ep reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2 interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle@@ -68,10 +54,7 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true big-endian: $ref: /schemas/types.yaml#/definitions/flag@@ -85,3 +68,24 @@ required: - reg - interrupt-names +allOf: + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> +Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 87
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +10
-0+ soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie-ep@3400000 { + compatible = "fsl,ls1028a-pcie-ep", "fsl,ls-pcie-ep"; + reg = <0x00 0x03400000 0x0 0x00100000 + 0x80 0x00000000 0x8 0x00000000>; + reg-names = "dbi", "addr_space"; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */PME or...
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 88
Quoted 1 line
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +1
-0+ interrupt-names = "app";app? You seem to just be changing the names to make the example happy. What do the dts files have? You need to make those pass.
Quoted 7 lines
It's on my plan.
First need change 'regs' to 'dbi'.
https://lore.kernel.org/linux-pci/[email protected]/
After that, I can update all dts.
No!
I'm saying you shouldn't be changing the dts files. That's an ABI which you are likely breaking. You should adjust the binding so the dts files pass. The exception is if you know the change is safe and not going to break the ABI or the dts is just been wrong all along (e.g. missing a compatible the OS doesn't rely on).
Rob
Frank Li
maintainerRe: [PATCH v6 3/3] dt-bindings: pci: layerscape-pci-ep: Add snps,dw-pcie-ep.yaml reference
Quoted 115 lines · Rob Herring
Quoted 106 lines · Frank Li
Quoted 100 lines · Rob Herring
Quoted 86 lines · Frank Li
Add snps,dw-pcie-ep.yaml.
Remove context that exist in snps,dw-pcie-ep.yaml.
Add an example for pcie-ep.
Signed-off-by Frank Li <[email protected]>--- .../bindings/pci/fsl,layerscape-pcie-ep.yaml | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-)Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +15
-25@@ -10,8 +10,7 @@ maintainers: - Frank Li <[email protected]> description: - This PCIe RC controller is based on the Synopsys DesignWare PCIe IP - and thus inherits all the common properties defined in snps,dw-pcie.yaml. + This PCIe RC controller is based on the Synopsys DesignWare PCIe IP. This controller derives its clocks from the Reset Configuration Word (RCW) which is used to describe the PLL settings at the time of chip-reset.@@ -35,31 +34,18 @@ properties: - const: fsl,ls-pcie-ep reg: - description: base addresses and lengths of the PCIe controller register blocks. + maxItems: 2 + + reg-names: + maxItems: 2 interrupts: - description: A list of interrupt outputs of the controller. Must contain an - entry for each entry in the interrupt-names property. + minItems: 1 + maxItems: 3 interrupt-names: minItems: 1 maxItems: 3 - description: It could include the following entries. - items: - oneOf: - - description: - Used for interrupt line which reports AER events when - non MSI/MSI-X/INTx mode is used. - const: aer - - description: - Used for interrupt line which reports PME events when - non MSI/MSI-X/INTx mode is used. - const: pme - - description: - Used for SoCs(like ls2080a, lx2160a, ls2080a, ls2088a, ls1088a) - which has a single interrupt line for miscellaneous controller - events(could include AER and PME events). - const: intr fsl,pcie-scfg: $ref: /schemas/types.yaml#/definitions/phandle@@ -68,10 +54,7 @@ properties: The second entry is the physical PCIe controller index starting from '0'. This is used to get SCFG PEXN registers - dma-coherent: - description: Indicates that the hardware IP block can ensure the coherency - of the data transferred from/to the IP block. This can avoid the software - cache flush/invalid actions, and improve the performance significantly + dma-coherent: true big-endian: $ref: /schemas/types.yaml#/definitions/flag@@ -85,3 +68,24 @@ required: - reg - interrupt-names +allOf: + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> +Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 87
Quoted 10 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +10
-0+ soc { + #address-cells = <2>; + #size-cells = <2>; + + pcie-ep@3400000 { + compatible = "fsl,ls1028a-pcie-ep", "fsl,ls-pcie-ep"; + reg = <0x00 0x03400000 0x0 0x00100000 + 0x80 0x00000000 0x8 0x00000000>; + reg-names = "dbi", "addr_space"; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* PME interrupt */PME or...
Quoted 4 lines
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml required: · line 88
Quoted 1 line
Documentation/devicetree/bindings/pci/fsl,layerscape-pcie-ep.yaml +1
-0+ interrupt-names = "app";app? You seem to just be changing the names to make the example happy. What do the dts files have? You need to make those pass.
Quoted 7 lines
It's on my plan.
First need change 'regs' to 'dbi'.
https://lore.kernel.org/linux-pci/[email protected]/
After that, I can update all dts.
Quoted 7 lines
No!
I'm saying you shouldn't be changing the dts files. That's an ABI which you are likely breaking. You should adjust the binding so the dts files pass. The exception is if you know the change is safe and not going to break the ABI or the dts is just been wrong all along (e.g. missing a compatible the OS doesn't rely on).
The problem is that I have not method to make dts check without warning.
If using snps,dw-pcie-ep.yaml/snps,dw-pcie.yaml, it always complain 'regs' and 'pme'.
If update snps,dw-pcie-ep-.yaml/snps,dw-pcie.yaml, there are two name 'regs' and 'dbi' will be the same thing. it should be bad.
If don't included snps,dw-pcie-ep-.yaml/snps,dw-pcie.yaml, I have to duplicate most parts, which already in these files.
If you have good method, let me know.
Frank
Quoted 2 lines
Rob