* [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq
[not found] <20221107204934.32655-1-Sergey.Semin@baikalelectronics.ru>
@ 2022-11-07 20:49 ` Serge Semin
2022-11-10 21:01 ` Rob Herring
2022-11-07 20:49 ` [PATCH v6 02/20] dt-bindings: visconti-pcie: Fix interrupts array max constraints Serge Semin
2022-11-07 20:49 ` [PATCH v6 13/20] dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes Serge Semin
2 siblings, 1 reply; 5+ messages in thread
From: Serge Semin @ 2022-11-07 20:49 UTC (permalink / raw)
To: Rob Herring, Rob Herring, Krzysztof Kozlowski, Bjorn Helgaas,
Lorenzo Pieralisi, Cai Huoqing, Robin Murphy, Jingoo Han,
Gustavo Pimentel, Richard Zhu, Lucas Stach, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Cc: Serge Semin, Serge Semin, Alexey Malahov, Pavel Parkhomenko,
Krzysztof Wilczyński, Frank Li, Manivannan Sadhasivam,
caihuoqing, Vinod Koul, linux-pci, devicetree, linux-kernel,
Alexander Stein, linux-arm-kernel
Originally as it was defined the legacy bindings the pcie_inbound_axi and
pcie_aux clock names were supposed to be used in the fsl,imx6sx-pcie and
fsl,imx8mq-pcie devices respectively. But the bindings conversion has been
incorrectly so now the fourth clock name is defined as "pcie_inbound_axi
for imx6sx-pcie, pcie_aux for imx8mq-pcie", which is completely wrong.
Let's fix that by conditionally apply the clock-names constraints based on
the compatible string content.
Fixes: 751ca492f131 ("dt-bindings: PCI: imx6: convert the imx pcie controller to dtschema")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Changelog v5:
- This is a new patch added on the v5 release of the patchset.
---
.../bindings/pci/fsl,imx6q-pcie.yaml | 47 +++++++++++++++++--
1 file changed, 42 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
index 376e739bcad4..ebfe75f1576e 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
@@ -16,6 +16,47 @@ description: |+
allOf:
- $ref: /schemas/pci/snps,dw-pcie.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx6sx-pcie
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: pcie
+ - const: pcie_bus
+ - const: pcie_phy
+ - const: pcie_inbound_axi
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8mq-pcie
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: pcie
+ - const: pcie_bus
+ - const: pcie_phy
+ - const: pcie_aux
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ enum:
+ - fsl,imx6sx-pcie
+ - fsl,imx8mq-pcie
+ then:
+ properties:
+ clock-names:
+ items:
+ - const: pcie
+ - const: pcie_bus
+ - const: pcie_phy
properties:
compatible:
@@ -57,11 +98,7 @@ properties:
clock-names:
minItems: 3
- items:
- - const: pcie
- - const: pcie_bus
- - const: pcie_phy
- - const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie
+ maxItems: 4
num-lanes:
const: 1
--
2.38.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v6 02/20] dt-bindings: visconti-pcie: Fix interrupts array max constraints
[not found] <20221107204934.32655-1-Sergey.Semin@baikalelectronics.ru>
2022-11-07 20:49 ` [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Serge Semin
@ 2022-11-07 20:49 ` Serge Semin
2022-11-07 20:49 ` [PATCH v6 13/20] dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes Serge Semin
2 siblings, 0 replies; 5+ messages in thread
From: Serge Semin @ 2022-11-07 20:49 UTC (permalink / raw)
To: Rob Herring, Rob Herring, Krzysztof Kozlowski, Bjorn Helgaas,
Lorenzo Pieralisi, Cai Huoqing, Robin Murphy, Jingoo Han,
Gustavo Pimentel, Nobuhiro Iwamatsu
Cc: Serge Semin, Serge Semin, Alexey Malahov, Pavel Parkhomenko,
Krzysztof Wilczyński, Frank Li, Manivannan Sadhasivam,
caihuoqing, Vinod Koul, linux-pci, devicetree, linux-kernel,
linux-arm-kernel
In accordance with the way the device DT-node is actually defined in
arch/arm64/boot/dts/toshiba/tmpv7708.dtsi and the way the device is probed
by the DW PCIe driver there are two IRQs it actually has. It's MSI IRQ the
DT-bindings lack. Let's extend the interrupts property constraints then
and fix the schema example so one would be acceptable by the actual device
DT-bindings.
Fixes: 17c1b16340f0 ("dt-bindings: pci: Add DT binding for Toshiba Visconti PCIe controller")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
Changelog v5:
- This is a new patch added on the v5 release of the patchset.
---
.../devicetree/bindings/pci/toshiba,visconti-pcie.yaml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml b/Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml
index 48ed227fc5b9..53da2edd7c9a 100644
--- a/Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml
@@ -36,7 +36,7 @@ properties:
- const: mpu
interrupts:
- maxItems: 1
+ maxItems: 2
clocks:
items:
@@ -94,8 +94,9 @@ examples:
#interrupt-cells = <1>;
ranges = <0x81000000 0 0x40000000 0 0x40000000 0 0x00010000>,
<0x82000000 0 0x50000000 0 0x50000000 0 0x20000000>;
- interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "intr";
+ interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi", "intr";
interrupt-map-mask = <0 0 0 7>;
interrupt-map =
<0 0 0 1 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
--
2.38.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v6 13/20] dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes
[not found] <20221107204934.32655-1-Sergey.Semin@baikalelectronics.ru>
2022-11-07 20:49 ` [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Serge Semin
2022-11-07 20:49 ` [PATCH v6 02/20] dt-bindings: visconti-pcie: Fix interrupts array max constraints Serge Semin
@ 2022-11-07 20:49 ` Serge Semin
2 siblings, 0 replies; 5+ messages in thread
From: Serge Semin @ 2022-11-07 20:49 UTC (permalink / raw)
To: Rob Herring, Rob Herring, Krzysztof Kozlowski, Bjorn Helgaas,
Lorenzo Pieralisi, Cai Huoqing, Robin Murphy, Jingoo Han,
Gustavo Pimentel, Heiko Stuebner, Shawn Lin, Simon Xue
Cc: Serge Semin, Serge Semin, Alexey Malahov, Pavel Parkhomenko,
Krzysztof Wilczyński, Frank Li, Manivannan Sadhasivam,
caihuoqing, Vinod Koul, linux-pci, devicetree, linux-kernel,
linux-arm-kernel, linux-rockchip
As the DT-bindings description states the Rockchip PCIe controller is
based on the DW PCIe RP IP-core thus its DT-nodes are supposed to be
compatible with the common DW PCIe controller schema. Let's make sure they
are evaluated against it by referring to the snps,dw-pcie.yaml schema in
the allOf sub-schemas composition.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changelog v3:
- This is a new patch created on v3 lap of the series.
Changelog v5:
- Apply snps,dw-pcie.yaml instead of the snps,dw-pcie-common.yaml schema.
---
Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
index bc0a9d1db750..2be72ae1169f 100644
--- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
@@ -14,10 +14,10 @@ maintainers:
description: |+
RK3568 SoC PCIe host controller is based on the Synopsys DesignWare
PCIe IP and thus inherits all the common properties defined in
- designware-pcie.txt.
+ snps,dw-pcie.yaml.
allOf:
- - $ref: /schemas/pci/pci-bus.yaml#
+ - $ref: /schemas/pci/snps,dw-pcie.yaml#
properties:
compatible:
--
2.38.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq
2022-11-07 20:49 ` [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Serge Semin
@ 2022-11-10 21:01 ` Rob Herring
2022-11-11 11:00 ` Serge Semin
0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2022-11-10 21:01 UTC (permalink / raw)
To: Serge Semin
Cc: Krzysztof Kozlowski, Bjorn Helgaas, Lorenzo Pieralisi,
Cai Huoqing, Robin Murphy, Jingoo Han, Gustavo Pimentel,
Richard Zhu, Lucas Stach, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Serge Semin, Alexey Malahov, Pavel Parkhomenko,
Krzysztof Wilczyński, Frank Li, Manivannan Sadhasivam,
caihuoqing, Vinod Koul, linux-pci, devicetree, linux-kernel,
Alexander Stein, linux-arm-kernel
On Mon, Nov 07, 2022 at 11:49:15PM +0300, Serge Semin wrote:
> Originally as it was defined the legacy bindings the pcie_inbound_axi and
> pcie_aux clock names were supposed to be used in the fsl,imx6sx-pcie and
> fsl,imx8mq-pcie devices respectively. But the bindings conversion has been
> incorrectly so now the fourth clock name is defined as "pcie_inbound_axi
> for imx6sx-pcie, pcie_aux for imx8mq-pcie", which is completely wrong.
> Let's fix that by conditionally apply the clock-names constraints based on
> the compatible string content.
>
> Fixes: 751ca492f131 ("dt-bindings: PCI: imx6: convert the imx pcie controller to dtschema")
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>
> ---
>
> Changelog v5:
> - This is a new patch added on the v5 release of the patchset.
> ---
> .../bindings/pci/fsl,imx6q-pcie.yaml | 47 +++++++++++++++++--
> 1 file changed, 42 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> index 376e739bcad4..ebfe75f1576e 100644
> --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> @@ -16,6 +16,47 @@ description: |+
>
> allOf:
> - $ref: /schemas/pci/snps,dw-pcie.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: fsl,imx6sx-pcie
> + then:
> + properties:
> + clock-names:
> + items:
> + - const: pcie
> + - const: pcie_bus
> + - const: pcie_phy
> + - const: pcie_inbound_axi
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: fsl,imx8mq-pcie
> + then:
> + properties:
> + clock-names:
> + items:
> + - const: pcie
> + - const: pcie_bus
> + - const: pcie_phy
> + - const: pcie_aux
> + - if:
> + properties:
> + compatible:
> + not:
> + contains:
> + enum:
> + - fsl,imx6sx-pcie
> + - fsl,imx8mq-pcie
> + then:
> + properties:
> + clock-names:
> + items:
> + - const: pcie
> + - const: pcie_bus
> + - const: pcie_phy
>
> properties:
> compatible:
> @@ -57,11 +98,7 @@ properties:
>
> clock-names:
> minItems: 3
> - items:
> - - const: pcie
> - - const: pcie_bus
> - - const: pcie_phy
> - - const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie
This should have been just 'enum: [ pcie_inbound_axi, pcie_aux ]'
And then do:
- if:
properties:
compatible:
contains:
const: fsl,imx8mq-pcie
then:
properties:
clock-names:
items:
- {}
- {}
- {}
- const: pcie_aux
And then another if/then with 'maxItems: 3'
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq
2022-11-10 21:01 ` Rob Herring
@ 2022-11-11 11:00 ` Serge Semin
0 siblings, 0 replies; 5+ messages in thread
From: Serge Semin @ 2022-11-11 11:00 UTC (permalink / raw)
To: Rob Herring
Cc: Serge Semin, Krzysztof Kozlowski, Bjorn Helgaas,
Lorenzo Pieralisi, Cai Huoqing, Robin Murphy, Jingoo Han,
Gustavo Pimentel, Richard Zhu, Lucas Stach, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Alexey Malahov, Pavel Parkhomenko,
Krzysztof Wilczyński, Frank Li, Manivannan Sadhasivam,
caihuoqing, Vinod Koul, linux-pci, devicetree, linux-kernel,
Alexander Stein, linux-arm-kernel
On Thu, Nov 10, 2022 at 03:01:04PM -0600, Rob Herring wrote:
> On Mon, Nov 07, 2022 at 11:49:15PM +0300, Serge Semin wrote:
> > Originally as it was defined the legacy bindings the pcie_inbound_axi and
> > pcie_aux clock names were supposed to be used in the fsl,imx6sx-pcie and
> > fsl,imx8mq-pcie devices respectively. But the bindings conversion has been
> > incorrectly so now the fourth clock name is defined as "pcie_inbound_axi
> > for imx6sx-pcie, pcie_aux for imx8mq-pcie", which is completely wrong.
> > Let's fix that by conditionally apply the clock-names constraints based on
> > the compatible string content.
> >
> > Fixes: 751ca492f131 ("dt-bindings: PCI: imx6: convert the imx pcie controller to dtschema")
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> >
> > ---
> >
> > Changelog v5:
> > - This is a new patch added on the v5 release of the patchset.
> > ---
> > .../bindings/pci/fsl,imx6q-pcie.yaml | 47 +++++++++++++++++--
> > 1 file changed, 42 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> > index 376e739bcad4..ebfe75f1576e 100644
> > --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> > +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> > @@ -16,6 +16,47 @@ description: |+
> >
> > allOf:
> > - $ref: /schemas/pci/snps,dw-pcie.yaml#
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: fsl,imx6sx-pcie
> > + then:
> > + properties:
> > + clock-names:
> > + items:
> > + - const: pcie
> > + - const: pcie_bus
> > + - const: pcie_phy
> > + - const: pcie_inbound_axi
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: fsl,imx8mq-pcie
> > + then:
> > + properties:
> > + clock-names:
> > + items:
> > + - const: pcie
> > + - const: pcie_bus
> > + - const: pcie_phy
> > + - const: pcie_aux
> > + - if:
> > + properties:
> > + compatible:
> > + not:
> > + contains:
> > + enum:
> > + - fsl,imx6sx-pcie
> > + - fsl,imx8mq-pcie
> > + then:
> > + properties:
> > + clock-names:
> > + items:
> > + - const: pcie
> > + - const: pcie_bus
> > + - const: pcie_phy
> >
> > properties:
> > compatible:
> > @@ -57,11 +98,7 @@ properties:
> >
> > clock-names:
> > minItems: 3
> > - items:
> > - - const: pcie
> > - - const: pcie_bus
> > - - const: pcie_phy
> > - - const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie
>
> This should have been just 'enum: [ pcie_inbound_axi, pcie_aux ]'
>
> And then do:
>
> - if:
> properties:
> compatible:
> contains:
> const: fsl,imx8mq-pcie
> then:
> properties:
> clock-names:
> items:
> - {}
> - {}
> - {}
> - const: pcie_aux
>
>
> And then another if/then with 'maxItems: 3'
Ok. Will fix it in v7. But IMO it looks a bit less descriptive
especially with the '{}' pattern and a need to look in two different
places to comprehend the whole constraint. I understand though what is an
intention of such construction. It's to place as much info into the
schema body and isolate the platform-specific constraints in the allOf
clause. Pretty neat anyway.
-Sergey
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-11 11:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221107204934.32655-1-Sergey.Semin@baikalelectronics.ru>
2022-11-07 20:49 ` [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Serge Semin
2022-11-10 21:01 ` Rob Herring
2022-11-11 11:00 ` Serge Semin
2022-11-07 20:49 ` [PATCH v6 02/20] dt-bindings: visconti-pcie: Fix interrupts array max constraints Serge Semin
2022-11-07 20:49 ` [PATCH v6 13/20] dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes Serge Semin
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).