linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08
@ 2022-08-19 23:14 Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names Conor Dooley
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

Hey all,

Got a few fixes for PCI dt-bindings that I noticed after upgrading my
dt-schema to v2022.08.

Since all the dts patches are for "my" boards, I'll take them once the
bindings are approved. I added a pair of other dts changes to the series,
mostly for my own benefit in tracking what I need to apply that were
previously at [0] & [1].

Thanks,
Conor.

0 - https://lore.kernel.org/all/20220811203207.179470-1-mail@conchuod.ie/
1 - https://lore.kernel.org/all/20220811204024.182453-1-mail@conchuod.ie/

Changes since v2:
- fu740: make clock-names required
- mchp: add regex to clock names
- mchp: add a new patch adding dma-ranges as optional

Changes since v1:
- fu740: rewrite commit message
- mchp: rework clock-names as per rob's suggestion on IRC
- mchp: drop the "legacy" from the node name
- mchp: renemove the address translation property
- mchp: change the child node name in the dts rather than the binding

Conor Dooley (7):
  dt-bindings: PCI: fu740-pci: fix missing clock-names
  dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties
  dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges
  riscv: dts: microchip: mpfs: fix incorrect pcie child node name
  riscv: dts: microchip: mpfs: remove ti,fifo-depth property
  riscv: dts: microchip: mpfs: remove bogus card-detect-delay
  riscv: dts: microchip: mpfs: remove pci axi address translation
    property

 .../bindings/pci/microchip,pcie-host.yaml     | 31 +++++++++++++++++++
 .../bindings/pci/sifive,fu740-pcie.yaml       |  8 +++++
 .../boot/dts/microchip/mpfs-icicle-kit.dts    |  3 --
 .../boot/dts/microchip/mpfs-polarberry.dts    |  3 --
 arch/riscv/boot/dts/microchip/mpfs.dtsi       |  3 +-
 5 files changed, 40 insertions(+), 8 deletions(-)


base-commit: 69dac8e431af26173ca0a1ebc87054e01c585bcc
-- 
2.37.1


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

* [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-22 19:20   ` Rob Herring
  2022-08-19 23:14 ` [PATCH v3 2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties Conor Dooley
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

The commit b92225b034c0 ("dt-bindings: PCI: designware: Fix
'unevaluatedProperties' warnings") removed the clock-names property as
a requirement and from the example as it triggered unevaluatedProperty
warnings. dtbs_check was not able to pick up on this at the time, but
now can:

arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dtb: pcie@e00000000: Unevaluated properties are not allowed ('clock-names' was unexpected)
        From schema: linux/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml

The property was already in use by the FU740 DTS and the clock must be
enabled. The Linux and FreeBSD drivers require the property to enable
the clocks correctly Re-add the property and its "clocks" dependency,
while making it required.

Fixes: b92225b034c0 ("dt-bindings: PCI: designware: Fix 'unevaluatedProperties' warnings")
Fixes: 43cea116be0b ("dt-bindings: PCI: Add SiFive FU740 PCIe host controller")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
v2022.08 of dt-schema is required.
---
 .../devicetree/bindings/pci/sifive,fu740-pcie.yaml        | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml b/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
index 195e6afeb169..844fc7142302 100644
--- a/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
@@ -51,6 +51,12 @@ properties:
     description: A phandle to the PCIe power up reset line.
     maxItems: 1
 
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: pcie_aux
+
   pwren-gpios:
     description: Should specify the GPIO for controlling the PCI bus device power on.
     maxItems: 1
@@ -66,6 +72,7 @@ required:
   - interrupt-map-mask
   - interrupt-map
   - clocks
+  - clock-names
   - resets
   - pwren-gpios
   - reset-gpios
@@ -104,6 +111,7 @@ examples:
                             <0x0 0x0 0x0 0x2 &plic0 58>,
                             <0x0 0x0 0x0 0x3 &plic0 59>,
                             <0x0 0x0 0x0 0x4 &plic0 60>;
+            clock-names = "pcie_aux";
             clocks = <&prci FU740_PRCI_CLK_PCIE_AUX>;
             resets = <&prci 4>;
             pwren-gpios = <&gpio 5 0>;
-- 
2.37.1


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

* [PATCH v3 2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-22 19:21   ` Rob Herring
  2022-08-19 23:14 ` [PATCH v3 3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges Conor Dooley
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

Recent versions of dt-schema warn about unevaluatedProperties:
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: pcie@2000000000: Unevaluated properties are not allowed ('clock-names', 'clocks', 'legacy-interrupt-controller', 'microchip,axi-m-atr0' were unexpected)
        From schema: Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml

The clocks are required to enable interfaces between the FPGA fabric
and the core complex, so add them to the binding.

Fixes: 6ee6c89aac35 ("dt-bindings: PCI: microchip: Add Microchip PolarFire host binding")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
dt-schema v2022.08 is required to replicate
---
 .../bindings/pci/microchip,pcie-host.yaml     | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
index edb4f81253c8..6fbe62f4da93 100644
--- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
+++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
@@ -25,6 +25,33 @@ properties:
       - const: cfg
       - const: apb
 
+  clocks:
+    description:
+      Fabric Interface Controllers, FICs, are the interface between the FPGA
+      fabric and the core complex on PolarFire SoC. The FICs require two clocks,
+      one from each side of the interface. The "FIC clocks" described by this
+      property are on the core complex side & communication through a FIC is not
+      possible unless it's corresponding clock is enabled. A clock must be
+      enabled for each of the interfaces the root port is connected through.
+      This could in theory be all 4 interfaces, one interface or any combination
+      in between.
+    minItems: 1
+    items:
+      - description: FIC0's clock
+      - description: FIC1's clock
+      - description: FIC2's clock
+      - description: FIC3's clock
+
+  clock-names:
+    description:
+      As any FIC connection combination is possible, the names should match the
+      order in the clocks property and take the form "ficN" where N is a number
+      0-3
+    minItems: 1
+    maxItems: 4
+    items:
+      pattern: '^fic[0-3]$'
+
   interrupts:
     minItems: 1
     items:
-- 
2.37.1


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

* [PATCH v3 3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-22 19:22   ` Rob Herring
  2022-08-19 23:14 ` [PATCH v3 4/7] riscv: dts: microchip: mpfs: fix incorrect pcie child node name Conor Dooley
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

The dma-ranges property was missed when adding the binding initially.
The root port can use up to 6 address translation tables, depending on
configuration.

Link: https://www.microsemi.com/document-portal/doc_download/1245812-polarfire-fpga-and-polarfire-soc-fpga-pci-express-user-guide # Section 1.3.3
Fixes: 6ee6c89aac35 ("dt-bindings: PCI: microchip: Add Microchip PolarFire host binding")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../devicetree/bindings/pci/microchip,pcie-host.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
index 6fbe62f4da93..23d95c65acff 100644
--- a/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
+++ b/Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
@@ -67,6 +67,10 @@ properties:
   ranges:
     maxItems: 1
 
+  dma-ranges:
+    minItems: 1
+    maxItems: 6
+
   msi-controller:
     description: Identifies the node as an MSI controller.
 
-- 
2.37.1


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

* [PATCH v3 4/7] riscv: dts: microchip: mpfs: fix incorrect pcie child node name
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
                   ` (2 preceding siblings ...)
  2022-08-19 23:14 ` [PATCH v3 3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 5/7] riscv: dts: microchip: mpfs: remove ti,fifo-depth property Conor Dooley
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

Recent versions of dt-schema complain about the PCIe controller's child
node name:
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: pcie@2000000000: Unevaluated properties are not allowed ('clock-names', 'clocks', 'legacy-interrupt-controller', 'microchip,axi-m-atr0' were unexpected)
            From schema: Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
Make the dts match the correct property name in the dts.

Fixes: 528a5b1f2556 ("riscv: dts: microchip: add new peripherals to icicle kit device tree")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
v2022.08 of dt-schema is required to replicate.
---
 arch/riscv/boot/dts/microchip/mpfs.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/microchip/mpfs.dtsi b/arch/riscv/boot/dts/microchip/mpfs.dtsi
index 499c2e63ad35..e69322f56516 100644
--- a/arch/riscv/boot/dts/microchip/mpfs.dtsi
+++ b/arch/riscv/boot/dts/microchip/mpfs.dtsi
@@ -487,7 +487,7 @@ pcie: pcie@2000000000 {
 			msi-controller;
 			microchip,axi-m-atr0 = <0x10 0x0>;
 			status = "disabled";
-			pcie_intc: legacy-interrupt-controller {
+			pcie_intc: interrupt-controller {
 				#address-cells = <0>;
 				#interrupt-cells = <1>;
 				interrupt-controller;
-- 
2.37.1


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

* [PATCH v3 5/7] riscv: dts: microchip: mpfs: remove ti,fifo-depth property
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
                   ` (3 preceding siblings ...)
  2022-08-19 23:14 ` [PATCH v3 4/7] riscv: dts: microchip: mpfs: fix incorrect pcie child node name Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 6/7] riscv: dts: microchip: mpfs: remove bogus card-detect-delay Conor Dooley
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

Recent versions of dt-schema warn about a previously undetected
undocument property on the icicle & polarberry devicetrees:

arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: ethernet@20112000: ethernet-phy@8: Unevaluated properties are not allowed ('ti,fifo-depth' was unexpected)
        From schema: Documentation/devicetree/bindings/net/cdns,macb.yaml

I know what you're thinking, the binding doesn't look to be the problem
and I agree. I am not sure why a TI vendor property was ever actually
added since it has no meaning... just get rid of it.

Fixes: bc47b2217f24 ("riscv: dts: microchip: add the sundance polarberry")
Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
v2022.08 or later of dt-schema is required.
---
 arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 2 --
 arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 2 --
 2 files changed, 4 deletions(-)

diff --git a/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
index 044982a11df5..ee548ab61a2a 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
@@ -84,12 +84,10 @@ &mac1 {
 
 	phy1: ethernet-phy@9 {
 		reg = <9>;
-		ti,fifo-depth = <0x1>;
 	};
 
 	phy0: ethernet-phy@8 {
 		reg = <8>;
-		ti,fifo-depth = <0x1>;
 	};
 };
 
diff --git a/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts b/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts
index 82c93c8f5c17..dc11bb8fc833 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts
@@ -54,12 +54,10 @@ &mac1 {
 
 	phy1: ethernet-phy@5 {
 		reg = <5>;
-		ti,fifo-depth = <0x01>;
 	};
 
 	phy0: ethernet-phy@4 {
 		reg = <4>;
-		ti,fifo-depth = <0x01>;
 	};
 };
 
-- 
2.37.1


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

* [PATCH v3 6/7] riscv: dts: microchip: mpfs: remove bogus card-detect-delay
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
                   ` (4 preceding siblings ...)
  2022-08-19 23:14 ` [PATCH v3 5/7] riscv: dts: microchip: mpfs: remove ti,fifo-depth property Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-19 23:14 ` [PATCH v3 7/7] riscv: dts: microchip: mpfs: remove pci axi address translation property Conor Dooley
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

Recent versions of dt-schema warn about a previously undetected
undocumented property:
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: mmc@20008000: Unevaluated properties are not allowed ('card-detect-delay' was unexpected)
        From schema: Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml

There are no GPIOs connected to MSSIO6B4 pin K3 so adding the common
cd-debounce-delay-ms property makes no sense. The Cadence IP has a
register that sets the card detect delay as "DP * tclk". On MPFS, this
clock frequency is not configurable (it must be 200 MHz) & the FPGA
comes out of reset with this register already set.

Fixes: bc47b2217f24 ("riscv: dts: microchip: add the sundance polarberry")
Fixes: 0fa6107eca41 ("RISC-V: Initial DTS for Microchip ICICLE board")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
v2022.08 or later of dt-schema is required.
---
 arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 1 -
 arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
index ee548ab61a2a..f3f87ed2007f 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts
@@ -100,7 +100,6 @@ &mmc {
 	disable-wp;
 	cap-sd-highspeed;
 	cap-mmc-highspeed;
-	card-detect-delay = <200>;
 	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
 	sd-uhs-sdr12;
diff --git a/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts b/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts
index dc11bb8fc833..c87cc2d8fe29 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts
@@ -70,7 +70,6 @@ &mmc {
 	disable-wp;
 	cap-sd-highspeed;
 	cap-mmc-highspeed;
-	card-detect-delay = <200>;
 	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
 	sd-uhs-sdr12;
-- 
2.37.1


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

* [PATCH v3 7/7] riscv: dts: microchip: mpfs: remove pci axi address translation property
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
                   ` (5 preceding siblings ...)
  2022-08-19 23:14 ` [PATCH v3 6/7] riscv: dts: microchip: mpfs: remove bogus card-detect-delay Conor Dooley
@ 2022-08-19 23:14 ` Conor Dooley
  2022-08-24 11:40 ` (subset) [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Lorenzo Pieralisi
  2022-08-24 16:19 ` Conor Dooley
  8 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2022-08-19 23:14 UTC (permalink / raw)
  To: Daire McNamara, Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Greentime Hu, Palmer Dabbelt, Albert Ou,
	Lorenzo Pieralisi, Conor Dooley
  Cc: linux-pci, devicetree, linux-kernel, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

An AXI master address translation table property was inadvertently
added to the device tree & this was not caught by dtbs_check at the
time. Remove the property - it should not be in mpfs.dtsi anyway as
it would be more suitable in -fabric.dtsi nor does it actually apply
to the version of the reference design we are using for upstream.

Link: https://www.microsemi.com/document-portal/doc_download/1245812-polarfire-fpga-and-polarfire-soc-fpga-pci-express-user-guide # Section 1.3.3
Fixes: 528a5b1f2556 ("riscv: dts: microchip: add new peripherals to icicle kit device tree")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 arch/riscv/boot/dts/microchip/mpfs.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/riscv/boot/dts/microchip/mpfs.dtsi b/arch/riscv/boot/dts/microchip/mpfs.dtsi
index e69322f56516..a1176260086a 100644
--- a/arch/riscv/boot/dts/microchip/mpfs.dtsi
+++ b/arch/riscv/boot/dts/microchip/mpfs.dtsi
@@ -485,7 +485,6 @@ pcie: pcie@2000000000 {
 			ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
 			msi-parent = <&pcie>;
 			msi-controller;
-			microchip,axi-m-atr0 = <0x10 0x0>;
 			status = "disabled";
 			pcie_intc: interrupt-controller {
 				#address-cells = <0>;
-- 
2.37.1


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

* Re: [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names
  2022-08-19 23:14 ` [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names Conor Dooley
@ 2022-08-22 19:20   ` Rob Herring
  2022-08-23  7:43     ` Lorenzo Pieralisi
  0 siblings, 1 reply; 15+ messages in thread
From: Rob Herring @ 2022-08-22 19:20 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Daire McNamara, Rob Herring, Albert Ou, Palmer Dabbelt,
	devicetree, Greentime Hu, Paul Walmsley, Bjorn Helgaas,
	Conor Dooley, Krzysztof Kozlowski, linux-riscv, linux-pci,
	linux-kernel, Lorenzo Pieralisi

On Sat, 20 Aug 2022 00:14:10 +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The commit b92225b034c0 ("dt-bindings: PCI: designware: Fix
> 'unevaluatedProperties' warnings") removed the clock-names property as
> a requirement and from the example as it triggered unevaluatedProperty
> warnings. dtbs_check was not able to pick up on this at the time, but
> now can:
> 
> arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dtb: pcie@e00000000: Unevaluated properties are not allowed ('clock-names' was unexpected)
>         From schema: linux/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
> 
> The property was already in use by the FU740 DTS and the clock must be
> enabled. The Linux and FreeBSD drivers require the property to enable
> the clocks correctly Re-add the property and its "clocks" dependency,
> while making it required.
> 
> Fixes: b92225b034c0 ("dt-bindings: PCI: designware: Fix 'unevaluatedProperties' warnings")
> Fixes: 43cea116be0b ("dt-bindings: PCI: Add SiFive FU740 PCIe host controller")
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> v2022.08 of dt-schema is required.
> ---
>  .../devicetree/bindings/pci/sifive,fu740-pcie.yaml        | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties
  2022-08-19 23:14 ` [PATCH v3 2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties Conor Dooley
@ 2022-08-22 19:21   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2022-08-22 19:21 UTC (permalink / raw)
  To: Conor Dooley
  Cc: linux-kernel, Albert Ou, Bjorn Helgaas, Daire McNamara,
	Lorenzo Pieralisi, Conor Dooley, linux-riscv,
	Krzysztof Kozlowski, Palmer Dabbelt, devicetree, linux-pci,
	Paul Walmsley, Greentime Hu, Rob Herring

On Sat, 20 Aug 2022 00:14:11 +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> Recent versions of dt-schema warn about unevaluatedProperties:
> arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: pcie@2000000000: Unevaluated properties are not allowed ('clock-names', 'clocks', 'legacy-interrupt-controller', 'microchip,axi-m-atr0' were unexpected)
>         From schema: Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
> 
> The clocks are required to enable interfaces between the FPGA fabric
> and the core complex, so add them to the binding.
> 
> Fixes: 6ee6c89aac35 ("dt-bindings: PCI: microchip: Add Microchip PolarFire host binding")
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> dt-schema v2022.08 is required to replicate
> ---
>  .../bindings/pci/microchip,pcie-host.yaml     | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges
  2022-08-19 23:14 ` [PATCH v3 3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges Conor Dooley
@ 2022-08-22 19:22   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2022-08-22 19:22 UTC (permalink / raw)
  To: Conor Dooley
  Cc: linux-kernel, Lorenzo Pieralisi, Paul Walmsley, Daire McNamara,
	Albert Ou, Rob Herring, devicetree, linux-pci, Bjorn Helgaas,
	Greentime Hu, linux-riscv, Krzysztof Kozlowski, Palmer Dabbelt,
	Conor Dooley

On Sat, 20 Aug 2022 00:14:12 +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The dma-ranges property was missed when adding the binding initially.
> The root port can use up to 6 address translation tables, depending on
> configuration.
> 
> Link: https://www.microsemi.com/document-portal/doc_download/1245812-polarfire-fpga-and-polarfire-soc-fpga-pci-express-user-guide # Section 1.3.3
> Fixes: 6ee6c89aac35 ("dt-bindings: PCI: microchip: Add Microchip PolarFire host binding")
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>  .../devicetree/bindings/pci/microchip,pcie-host.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names
  2022-08-22 19:20   ` Rob Herring
@ 2022-08-23  7:43     ` Lorenzo Pieralisi
  2022-08-23 20:21       ` Conor.Dooley
  0 siblings, 1 reply; 15+ messages in thread
From: Lorenzo Pieralisi @ 2022-08-23  7:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: Conor Dooley, Daire McNamara, Rob Herring, Albert Ou,
	Palmer Dabbelt, devicetree, Greentime Hu, Paul Walmsley,
	Bjorn Helgaas, Conor Dooley, Krzysztof Kozlowski, linux-riscv,
	linux-pci, linux-kernel

On Mon, Aug 22, 2022 at 02:20:32PM -0500, Rob Herring wrote:
> On Sat, 20 Aug 2022 00:14:10 +0100, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> > 
> > The commit b92225b034c0 ("dt-bindings: PCI: designware: Fix
> > 'unevaluatedProperties' warnings") removed the clock-names property as
> > a requirement and from the example as it triggered unevaluatedProperty
> > warnings. dtbs_check was not able to pick up on this at the time, but
> > now can:
> > 
> > arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dtb: pcie@e00000000: Unevaluated properties are not allowed ('clock-names' was unexpected)
> >         From schema: linux/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
> > 
> > The property was already in use by the FU740 DTS and the clock must be
> > enabled. The Linux and FreeBSD drivers require the property to enable
> > the clocks correctly Re-add the property and its "clocks" dependency,
> > while making it required.
> > 
> > Fixes: b92225b034c0 ("dt-bindings: PCI: designware: Fix 'unevaluatedProperties' warnings")
> > Fixes: 43cea116be0b ("dt-bindings: PCI: Add SiFive FU740 PCIe host controller")
> > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> > ---
> > v2022.08 of dt-schema is required.
> > ---
> >  .../devicetree/bindings/pci/sifive,fu740-pcie.yaml        | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Should I pick these bindings updates up ?

Lorenzo

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

* Re: [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names
  2022-08-23  7:43     ` Lorenzo Pieralisi
@ 2022-08-23 20:21       ` Conor.Dooley
  0 siblings, 0 replies; 15+ messages in thread
From: Conor.Dooley @ 2022-08-23 20:21 UTC (permalink / raw)
  To: lpieralisi, robh
  Cc: mail, Daire.McNamara, robh+dt, aou, palmer, devicetree,
	greentime.hu, paul.walmsley, bhelgaas, krzysztof.kozlowski+dt,
	linux-riscv, linux-pci, linux-kernel

On 23/08/2022 08:43, Lorenzo Pieralisi wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Mon, Aug 22, 2022 at 02:20:32PM -0500, Rob Herring wrote:
>> On Sat, 20 Aug 2022 00:14:10 +0100, Conor Dooley wrote:
>>> From: Conor Dooley <conor.dooley@microchip.com>
>>>
>>> The commit b92225b034c0 ("dt-bindings: PCI: designware: Fix
>>> 'unevaluatedProperties' warnings") removed the clock-names property as
>>> a requirement and from the example as it triggered unevaluatedProperty
>>> warnings. dtbs_check was not able to pick up on this at the time, but
>>> now can:
>>>
>>> arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dtb: pcie@e00000000: Unevaluated properties are not allowed ('clock-names' was unexpected)
>>>         From schema: linux/Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml
>>>
>>> The property was already in use by the FU740 DTS and the clock must be
>>> enabled. The Linux and FreeBSD drivers require the property to enable
>>> the clocks correctly Re-add the property and its "clocks" dependency,
>>> while making it required.
>>>
>>> Fixes: b92225b034c0 ("dt-bindings: PCI: designware: Fix 'unevaluatedProperties' warnings")
>>> Fixes: 43cea116be0b ("dt-bindings: PCI: Add SiFive FU740 PCIe host controller")
>>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
>>> ---
>>> v2022.08 of dt-schema is required.
>>> ---
>>>  .../devicetree/bindings/pci/sifive,fu740-pcie.yaml        | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>
>> Reviewed-by: Rob Herring <robh@kernel.org>
> 
> Should I pick these bindings updates up ?

It was my expectation anyway that you would take the binding patches.
They're marked "not applicable" in the dt patchwork so appear that
Rob does not want to take them. Won't speak for him though!

I intend to take the dts part of the series through riscv's fixes as
the series will get the arch down to zero dtbs_check warnings. Could
you take the patches through the PCI fixes tree please?

Thanks,
Conor.


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

* Re: (subset) [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
                   ` (6 preceding siblings ...)
  2022-08-19 23:14 ` [PATCH v3 7/7] riscv: dts: microchip: mpfs: remove pci axi address translation property Conor Dooley
@ 2022-08-24 11:40 ` Lorenzo Pieralisi
  2022-08-24 16:19 ` Conor Dooley
  8 siblings, 0 replies; 15+ messages in thread
From: Lorenzo Pieralisi @ 2022-08-24 11:40 UTC (permalink / raw)
  To: Albert Ou, Conor Dooley, Paul Walmsley, Greentime Hu,
	Palmer Dabbelt, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
	Bjorn Helgaas, Daire McNamara
  Cc: Lorenzo Pieralisi, devicetree, linux-riscv, linux-kernel, linux-pci

On Sat, 20 Aug 2022 00:14:09 +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> Hey all,
> 
> Got a few fixes for PCI dt-bindings that I noticed after upgrading my
> dt-schema to v2022.08.
> 
> [...]

Applied to pci/dt, thanks!

[1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names
      https://git.kernel.org/lpieralisi/pci/c/b408fad61d34
[2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties
      https://git.kernel.org/lpieralisi/pci/c/05a5741019a5
[3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges
      https://git.kernel.org/lpieralisi/pci/c/1a7966b33b5b

Thanks,
Lorenzo

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

* Re: (subset) [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08
  2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
                   ` (7 preceding siblings ...)
  2022-08-24 11:40 ` (subset) [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Lorenzo Pieralisi
@ 2022-08-24 16:19 ` Conor Dooley
  8 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2022-08-24 16:19 UTC (permalink / raw)
  To: Rob Herring, Paul Walmsley, Krzysztof Kozlowski, Albert Ou,
	Palmer Dabbelt, Daire McNamara, Greentime Hu, Conor Dooley,
	Lorenzo Pieralisi, Bjorn Helgaas
  Cc: Conor Dooley, linux-kernel, linux-pci, devicetree, linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

On Sat, 20 Aug 2022 00:14:09 +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> Hey all,
> 
> Got a few fixes for PCI dt-bindings that I noticed after upgrading my
> dt-schema to v2022.08.
> 
> [...]

Applied to dt-fixes, RISC-V should be back to 0 warnings in the next
linux-next. Thanks!

[4/7] riscv: dts: microchip: mpfs: fix incorrect pcie child node name
      https://git.kernel.org/conor/c/3f67e6997603
[5/7] riscv: dts: microchip: mpfs: remove ti,fifo-depth property
      https://git.kernel.org/conor/c/72a05748cbd2
[6/7] riscv: dts: microchip: mpfs: remove bogus card-detect-delay
      https://git.kernel.org/conor/c/2b55915d27dc
[7/7] riscv: dts: microchip: mpfs: remove pci axi address translation property
      https://git.kernel.org/conor/c/e4009c5fa77b

Thanks,
Conor.

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

end of thread, other threads:[~2022-08-24 16:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19 23:14 [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Conor Dooley
2022-08-19 23:14 ` [PATCH v3 1/7] dt-bindings: PCI: fu740-pci: fix missing clock-names Conor Dooley
2022-08-22 19:20   ` Rob Herring
2022-08-23  7:43     ` Lorenzo Pieralisi
2022-08-23 20:21       ` Conor.Dooley
2022-08-19 23:14 ` [PATCH v3 2/7] dt-bindings: PCI: microchip,pcie-host: fix missing clocks properties Conor Dooley
2022-08-22 19:21   ` Rob Herring
2022-08-19 23:14 ` [PATCH v3 3/7] dt-bindings: PCI: microchip,pcie-host: fix missing dma-ranges Conor Dooley
2022-08-22 19:22   ` Rob Herring
2022-08-19 23:14 ` [PATCH v3 4/7] riscv: dts: microchip: mpfs: fix incorrect pcie child node name Conor Dooley
2022-08-19 23:14 ` [PATCH v3 5/7] riscv: dts: microchip: mpfs: remove ti,fifo-depth property Conor Dooley
2022-08-19 23:14 ` [PATCH v3 6/7] riscv: dts: microchip: mpfs: remove bogus card-detect-delay Conor Dooley
2022-08-19 23:14 ` [PATCH v3 7/7] riscv: dts: microchip: mpfs: remove pci axi address translation property Conor Dooley
2022-08-24 11:40 ` (subset) [PATCH v3 0/7] Fix RISC-V/PCI dt-schema issues with dt-schema v2022.08 Lorenzo Pieralisi
2022-08-24 16:19 ` Conor Dooley

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