linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] rework mtk pcie-gen3 bindings and support mt7986
@ 2022-10-29 17:58 Frank Wunderlich
  2022-10-29 17:58 ` [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Frank Wunderlich
  2022-10-29 17:58 ` [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Frank Wunderlich
  0 siblings, 2 replies; 7+ messages in thread
From: Frank Wunderlich @ 2022-10-29 17:58 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Frank Wunderlich, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger, linux-pci,
	devicetree, linux-kernel, linux-arm-kernel

This Series prepares support for mt7986 PCIe which is basicly gen3 PCIe
but with slightly differnt clock configuration.

To make differences better to read i split the exiting bindings which
has already different settings with a compatible switch and then add a
new one for mt7986.

v2:
- fixed typo in part 1 (SoC based config)
- squashed part2+3 (compatible and clock config for mt7986)

v3:
- fixed problem with fallback-compatible not compatible to main

Frank Wunderlich (2):
  dt-bindings: PCI: mediatek-gen3: add SoC based clock config
  dt-bindings: PCI: mediatek-gen3: add support for mt7986

 .../bindings/pci/mediatek-pcie-gen3.yaml      | 64 +++++++++++++++----
 1 file changed, 52 insertions(+), 12 deletions(-)

--
2.34.1


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

* [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config
  2022-10-29 17:58 [PATCH v3 0/2] rework mtk pcie-gen3 bindings and support mt7986 Frank Wunderlich
@ 2022-10-29 17:58 ` Frank Wunderlich
  2022-10-31 14:43   ` Rob Herring
  2022-10-29 17:58 ` [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Frank Wunderlich
  1 sibling, 1 reply; 7+ messages in thread
From: Frank Wunderlich @ 2022-10-29 17:58 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Frank Wunderlich, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger, linux-pci,
	devicetree, linux-kernel, linux-arm-kernel

The PCIe driver covers different SOC which needing different clock
configs. Define them based on compatible.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v2:
- fix typo in mediatek,mt8192-pcie
v3:
- remove contains to match only if compatible is no fallback
  tested with series "Add driver nodes for MT8195 SoC" and mt7986
  pcie-nodes, dtbs_check is now clean
---
 .../bindings/pci/mediatek-pcie-gen3.yaml      | 47 ++++++++++++++-----
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index c00be39af64e..5d7369debff2 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
@@ -43,9 +43,6 @@ description: |+
   each set has its own address for MSI message, and supports 32 MSI vectors
   to generate interrupt.

-allOf:
-  - $ref: /schemas/pci/pci-bus.yaml#
-
 properties:
   compatible:
     oneOf:
@@ -84,15 +81,7 @@ properties:
     maxItems: 6

   clock-names:
-    items:
-      - const: pl_250m
-      - const: tl_26m
-      - const: tl_96m
-      - const: tl_32k
-      - const: peri_26m
-      - enum:
-          - top_133m        # for MT8192
-          - peri_mem        # for MT8188/MT8195
+    maxItems: 6

   assigned-clocks:
     maxItems: 1
@@ -138,6 +127,40 @@ required:
   - '#interrupt-cells'
   - interrupt-controller

+allOf:
+  - $ref: /schemas/pci/pci-bus.yaml#
+  - if:
+      properties:
+        compatible:
+          const: mediatek,mt8192-pcie
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: pl_250m
+            - const: tl_26m
+            - const: tl_96m
+            - const: tl_32k
+            - const: peri_26m
+            - const: top_133m
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt8188-pcie
+              - mediatek,mt8195-pcie
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: pl_250m
+            - const: tl_26m
+            - const: tl_96m
+            - const: tl_32k
+            - const: peri_26m
+            - const: peri_mem
+
 unevaluatedProperties: false

 examples:
--
2.34.1


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

* [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986
  2022-10-29 17:58 [PATCH v3 0/2] rework mtk pcie-gen3 bindings and support mt7986 Frank Wunderlich
  2022-10-29 17:58 ` [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Frank Wunderlich
@ 2022-10-29 17:58 ` Frank Wunderlich
  2022-10-30 12:10   ` Aw: " Frank Wunderlich
  2022-11-01 12:16   ` Jianjun Wang (王建军)
  1 sibling, 2 replies; 7+ messages in thread
From: Frank Wunderlich @ 2022-10-29 17:58 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Frank Wunderlich, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger, linux-pci,
	devicetree, linux-kernel, linux-arm-kernel

Add compatible string and clock-definition for mt7986. It needs 4 clocks
for PCIe, define them in binding.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v2:
- squashed patch 2+3 (compatible and clock definition)
---
 .../bindings/pci/mediatek-pcie-gen3.yaml        | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index 5d7369debff2..f7a02019daea 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
@@ -48,6 +48,7 @@ properties:
     oneOf:
       - items:
           - enum:
+              - mediatek,mt7986-pcie
               - mediatek,mt8188-pcie
               - mediatek,mt8195-pcie
           - const: mediatek,mt8192-pcie
@@ -78,9 +79,11 @@ properties:
       - const: mac

   clocks:
+    minItems: 4
     maxItems: 6

   clock-names:
+    minItems: 4
     maxItems: 6

   assigned-clocks:
@@ -160,6 +163,20 @@ allOf:
             - const: tl_32k
             - const: peri_26m
             - const: peri_mem
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt7986-pcie
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: pl_250m
+            - const: tl_26m
+            - const: peri_26m
+            - const: top_133m

 unevaluatedProperties: false

--
2.34.1


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

* Aw: [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986
  2022-10-29 17:58 ` [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Frank Wunderlich
@ 2022-10-30 12:10   ` Frank Wunderlich
  2022-11-01 12:16   ` Jianjun Wang (王建军)
  1 sibling, 0 replies; 7+ messages in thread
From: Frank Wunderlich @ 2022-10-30 12:10 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: linux-mediatek, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
	Rob Herring, Krzysztof Kozlowski, Matthias Brugger, linux-pci,
	devicetree, linux-kernel, linux-arm-kernel

Hi,

sorry missed Reviewed-By from Rob i got for v2 [1] (this patch has not changed, only part 1)

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

regards Frank

https://patchwork.kernel.org/project/linux-mediatek/patch/20221025072837.16591-3-linux@fw-web.de/

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

* Re: [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config
  2022-10-29 17:58 ` [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Frank Wunderlich
@ 2022-10-31 14:43   ` Rob Herring
  2022-11-01 12:12     ` Jianjun Wang (王建军)
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2022-10-31 14:43 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: linux-mediatek, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
	Krzysztof Kozlowski, Matthias Brugger, linux-pci, devicetree,
	linux-kernel, linux-arm-kernel

On Sat, Oct 29, 2022 at 07:58:05PM +0200, Frank Wunderlich wrote:
> The PCIe driver covers different SOC which needing different clock
> configs. Define them based on compatible.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> v2:
> - fix typo in mediatek,mt8192-pcie
> v3:
> - remove contains to match only if compatible is no fallback
>   tested with series "Add driver nodes for MT8195 SoC" and mt7986
>   pcie-nodes, dtbs_check is now clean
> ---
>  .../bindings/pci/mediatek-pcie-gen3.yaml      | 47 ++++++++++++++-----
>  1 file changed, 35 insertions(+), 12 deletions(-)

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

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

* Re: [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config
  2022-10-31 14:43   ` Rob Herring
@ 2022-11-01 12:12     ` Jianjun Wang (王建军)
  0 siblings, 0 replies; 7+ messages in thread
From: Jianjun Wang (王建军) @ 2022-11-01 12:12 UTC (permalink / raw)
  To: robh, frank-w
  Cc: linux-kernel, linux-mediatek, devicetree, linux-arm-kernel,
	krzysztof.kozlowski+dt, matthias.bgg, linux-pci, Ryder Lee,
	bhelgaas

On Mon, 2022-10-31 at 09:43 -0500, Rob Herring wrote:
> On Sat, Oct 29, 2022 at 07:58:05PM +0200, Frank Wunderlich wrote:
> > The PCIe driver covers different SOC which needing different clock
> > configs. Define them based on compatible.
> > 
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> > ---
> > v2:
> > - fix typo in mediatek,mt8192-pcie
> > v3:
> > - remove contains to match only if compatible is no fallback
> >   tested with series "Add driver nodes for MT8195 SoC" and mt7986
> >   pcie-nodes, dtbs_check is now clean
> > ---
> >  .../bindings/pci/mediatek-pcie-gen3.yaml      | 47 ++++++++++++++-
> > ----
> >  1 file changed, 35 insertions(+), 12 deletions(-)
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Acked-by: Jianjun Wang <jianjun.wang@mediatek.com>

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

* Re: [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986
  2022-10-29 17:58 ` [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Frank Wunderlich
  2022-10-30 12:10   ` Aw: " Frank Wunderlich
@ 2022-11-01 12:16   ` Jianjun Wang (王建军)
  1 sibling, 0 replies; 7+ messages in thread
From: Jianjun Wang (王建军) @ 2022-11-01 12:16 UTC (permalink / raw)
  To: linux-mediatek, frank-w
  Cc: linux-kernel, robh+dt, devicetree, linux-arm-kernel,
	krzysztof.kozlowski+dt, matthias.bgg, linux-pci, Ryder Lee,
	bhelgaas

On Sat, 2022-10-29 at 19:58 +0200, Frank Wunderlich wrote:
> Add compatible string and clock-definition for mt7986. It needs 4
> clocks
> for PCIe, define them in binding.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> v2:
> - squashed patch 2+3 (compatible and clock definition)
> ---
>  .../bindings/pci/mediatek-pcie-gen3.yaml        | 17
> +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
Acked-by: Jianjun Wang <jianjun.wang@mediatek.com>

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

end of thread, other threads:[~2022-11-01 12:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-29 17:58 [PATCH v3 0/2] rework mtk pcie-gen3 bindings and support mt7986 Frank Wunderlich
2022-10-29 17:58 ` [PATCH v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Frank Wunderlich
2022-10-31 14:43   ` Rob Herring
2022-11-01 12:12     ` Jianjun Wang (王建军)
2022-10-29 17:58 ` [PATCH v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Frank Wunderlich
2022-10-30 12:10   ` Aw: " Frank Wunderlich
2022-11-01 12:16   ` Jianjun Wang (王建军)

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