linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
@ 2022-07-16  7:43 Jianjun Wang
  2022-07-16  7:43 ` [PATCH 1/2] " Jianjun Wang
  2022-07-16  7:43 ` [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name Jianjun Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Jianjun Wang @ 2022-07-16  7:43 UTC (permalink / raw)
  To: Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: linux-pci, linux-mediatek, devicetree, linux-kernel,
	linux-arm-kernel, Ryder Lee, Jianjun Wang, Rex-BC.Chen,
	TingHan.Shen, Liju-clr.Chen, Jian.Yang

These series patches add dt-bindings compatible string and new clock name
to support MT8188 and MT8195.

Jianjun Wang (2):
  dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
  dt-bindings: PCI: mediatek-gen3: Add new clock name

 .../bindings/pci/mediatek-pcie-gen3.yaml      | 51 +++++++++++++++----
 1 file changed, 40 insertions(+), 11 deletions(-)

-- 
2.18.0


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

* [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
  2022-07-16  7:43 [PATCH 0/2] dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195 Jianjun Wang
@ 2022-07-16  7:43 ` Jianjun Wang
  2022-07-16  7:43 ` [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name Jianjun Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Jianjun Wang @ 2022-07-16  7:43 UTC (permalink / raw)
  To: Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: linux-pci, linux-mediatek, devicetree, linux-kernel,
	linux-arm-kernel, Ryder Lee, Jianjun Wang, Rex-BC.Chen,
	TingHan.Shen, Liju-clr.Chen, Jian.Yang

MT8188 and MT8195 are ARM platform SoCs with the same PCIe IP as MT8192.

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
---
 .../devicetree/bindings/pci/mediatek-pcie-gen3.yaml      | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index 0499b94627ae..67d2ba25e336 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
@@ -48,7 +48,14 @@ allOf:
 
 properties:
   compatible:
-    const: mediatek,mt8192-pcie
+    oneOf:
+      - items:
+          - enum:
+              - mediatek,mt8188-pcie
+              - mediatek,mt8195-pcie
+          - const: mediatek,mt8192-pcie
+      - items:
+          - const: mediatek,mt8192-pcie
 
   reg:
     maxItems: 1
-- 
2.18.0


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

* [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name
  2022-07-16  7:43 [PATCH 0/2] dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195 Jianjun Wang
  2022-07-16  7:43 ` [PATCH 1/2] " Jianjun Wang
@ 2022-07-16  7:43 ` Jianjun Wang
  2022-07-20 22:24   ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Jianjun Wang @ 2022-07-16  7:43 UTC (permalink / raw)
  To: Bjorn Helgaas, Rob Herring, Krzysztof Kozlowski, Matthias Brugger
  Cc: linux-pci, linux-mediatek, devicetree, linux-kernel,
	linux-arm-kernel, Ryder Lee, Jianjun Wang, Rex-BC.Chen,
	TingHan.Shen, Liju-clr.Chen, Jian.Yang

MT8188 and MT8195 use clock "peri_mem" instead of "top_133m", add new
clock name "peri_mem" for MT8188 and MT8195.

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
---
 .../bindings/pci/mediatek-pcie-gen3.yaml      | 42 ++++++++++++++-----
 1 file changed, 32 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index 67d2ba25e336..038e25ae0be7 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:
@@ -85,13 +82,7 @@ properties:
     maxItems: 6
 
   clock-names:
-    items:
-      - const: pl_250m
-      - const: tl_26m
-      - const: tl_96m
-      - const: tl_32k
-      - const: peri_26m
-      - const: top_133m
+    maxItems: 6
 
   assigned-clocks:
     maxItems: 1
@@ -133,9 +124,40 @@ required:
   - interrupts
   - ranges
   - clocks
+  - clock-names
   - '#interrupt-cells'
   - interrupt-controller
 
+allOf:
+  - $ref: /schemas/pci/pci-bus.yaml#
+  - 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
+    else:
+      properties:
+        clock-names:
+          items:
+            - const: pl_250m
+            - const: tl_26m
+            - const: tl_96m
+            - const: tl_32k
+            - const: peri_26m
+            - const: top_133m
+
 unevaluatedProperties: false
 
 examples:
-- 
2.18.0


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

* Re: [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name
  2022-07-16  7:43 ` [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name Jianjun Wang
@ 2022-07-20 22:24   ` Rob Herring
  2022-07-21  8:44     ` Jianjun Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2022-07-20 22:24 UTC (permalink / raw)
  To: Jianjun Wang
  Cc: Bjorn Helgaas, Krzysztof Kozlowski, Matthias Brugger, linux-pci,
	linux-mediatek, devicetree, linux-kernel, linux-arm-kernel,
	Ryder Lee, Rex-BC.Chen, TingHan.Shen, Liju-clr.Chen, Jian.Yang

On Sat, Jul 16, 2022 at 03:43:49PM +0800, Jianjun Wang wrote:
> MT8188 and MT8195 use clock "peri_mem" instead of "top_133m", add new
> clock name "peri_mem" for MT8188 and MT8195.

This should be part of patch 1.

Clock names for IP blocks should be local to the IP block. IOW, named 
after the input name for the clocks or what their function is if you 
don't know that. Neither the old names nor the new name seem to follow 
this. At least make the new name follow that convention.

> 
> Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
> ---
>  .../bindings/pci/mediatek-pcie-gen3.yaml      | 42 ++++++++++++++-----
>  1 file changed, 32 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> index 67d2ba25e336..038e25ae0be7 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:
> @@ -85,13 +82,7 @@ properties:
>      maxItems: 6
>  
>    clock-names:
> -    items:
> -      - const: pl_250m
> -      - const: tl_26m
> -      - const: tl_96m
> -      - const: tl_32k
> -      - const: peri_26m
> -      - const: top_133m
> +    maxItems: 6
>  
>    assigned-clocks:
>      maxItems: 1
> @@ -133,9 +124,40 @@ required:
>    - interrupts
>    - ranges
>    - clocks
> +  - clock-names
>    - '#interrupt-cells'
>    - interrupt-controller
>  
> +allOf:
> +  - $ref: /schemas/pci/pci-bus.yaml#
> +  - 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
> +    else:
> +      properties:
> +        clock-names:
> +          items:
> +            - const: pl_250m
> +            - const: tl_26m
> +            - const: tl_96m
> +            - const: tl_32k
> +            - const: peri_26m
> +            - const: top_133m
> +
>  unevaluatedProperties: false
>  
>  examples:
> -- 
> 2.18.0
> 
> 

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

* Re: [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name
  2022-07-20 22:24   ` Rob Herring
@ 2022-07-21  8:44     ` Jianjun Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Jianjun Wang @ 2022-07-21  8:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Bjorn Helgaas, Krzysztof Kozlowski, Matthias Brugger, linux-pci,
	linux-mediatek, devicetree, linux-kernel, linux-arm-kernel,
	Ryder Lee, Rex-BC.Chen, TingHan.Shen, Liju-clr.Chen, Jian.Yang

Hi Rob,

Thanks for your comment.

On Wed, 2022-07-20 at 16:24 -0600, Rob Herring wrote:
> On Sat, Jul 16, 2022 at 03:43:49PM +0800, Jianjun Wang wrote:
> > MT8188 and MT8195 use clock "peri_mem" instead of "top_133m", add
> > new
> > clock name "peri_mem" for MT8188 and MT8195.
> 
> This should be part of patch 1.

Sure, I'll merge these two patches into one in the next version.

> 
> Clock names for IP blocks should be local to the IP block. IOW,
> named 
> after the input name for the clocks or what their function is if you 
> don't know that. Neither the old names nor the new name seem to
> follow 
> this. At least make the new name follow that convention.

Sorry, I'm not sure if I understand correctly, would you mind providing
an example of this change?

Thanks.

> 
> > 
> > Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
> > ---
> >  .../bindings/pci/mediatek-pcie-gen3.yaml      | 42 ++++++++++++++-
> > ----
> >  1 file changed, 32 insertions(+), 10 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-
> > gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-
> > gen3.yaml
> > index 67d2ba25e336..038e25ae0be7 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:
> > @@ -85,13 +82,7 @@ properties:
> >      maxItems: 6
> >  
> >    clock-names:
> > -    items:
> > -      - const: pl_250m
> > -      - const: tl_26m
> > -      - const: tl_96m
> > -      - const: tl_32k
> > -      - const: peri_26m
> > -      - const: top_133m
> > +    maxItems: 6
> >  
> >    assigned-clocks:
> >      maxItems: 1
> > @@ -133,9 +124,40 @@ required:
> >    - interrupts
> >    - ranges
> >    - clocks
> > +  - clock-names
> >    - '#interrupt-cells'
> >    - interrupt-controller
> >  
> > +allOf:
> > +  - $ref: /schemas/pci/pci-bus.yaml#
> > +  - 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
> > +    else:
> > +      properties:
> > +        clock-names:
> > +          items:
> > +            - const: pl_250m
> > +            - const: tl_26m
> > +            - const: tl_96m
> > +            - const: tl_32k
> > +            - const: peri_26m
> > +            - const: top_133m
> > +
> >  unevaluatedProperties: false
> >  
> >  examples:
> > -- 
> > 2.18.0
> > 
> > 


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

end of thread, other threads:[~2022-07-21  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16  7:43 [PATCH 0/2] dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195 Jianjun Wang
2022-07-16  7:43 ` [PATCH 1/2] " Jianjun Wang
2022-07-16  7:43 ` [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name Jianjun Wang
2022-07-20 22:24   ` Rob Herring
2022-07-21  8:44     ` 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).