devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: net: wireless: mt76: add interrupts description for MT7986
@ 2023-11-28  3:57 Peter Chiu
  2023-11-28 17:37 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Chiu @ 2023-11-28  3:57 UTC (permalink / raw)
  To: Felix Fietkau, Rob Herring
  Cc: Lorenzo Bianconi, Ryder Lee, Evelyn Tsai, Shayne Chen, Sam Shih,
	linux-wireless, linux-mediatek, devicetree, Peter Chiu

The mt7986 can support four interrupts to distribute the interrupts
to different CPUs.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
---
 .../bindings/net/wireless/mediatek,mt76.yaml  | 24 +++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index 252207adbc54..20f5f2ead265 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -19,9 +19,6 @@ description: |
   Alternatively, it can specify the wireless part of the MT7628/MT7688
   or MT7622/MT7986 SoC.
 
-allOf:
-  - $ref: ieee80211.yaml#
-
 properties:
   compatible:
     enum:
@@ -38,7 +35,8 @@ properties:
       MT7986 should contain 3 regions consys, dcm, and sku, in this order.
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 4
 
   power-domains:
     maxItems: 1
@@ -219,6 +217,24 @@ required:
 
 unevaluatedProperties: false
 
+allOf:
+  - $ref: ieee80211.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt7986-wmac
+    then:
+      properties:
+        interrupts:
+          minItems: 1
+          items:
+            - description: major interrupt for rings
+            - description: addditional interrupt for ring 19
+            - description: addditional interrupt for ring 4
+            - description: addditional interrupt for ring 5
+
 examples:
   - |
     pcie0 {
-- 
2.18.0


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

* Re: [PATCH] dt-bindings: net: wireless: mt76: add interrupts description for MT7986
  2023-11-28  3:57 [PATCH] dt-bindings: net: wireless: mt76: add interrupts description for MT7986 Peter Chiu
@ 2023-11-28 17:37 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2023-11-28 17:37 UTC (permalink / raw)
  To: Peter Chiu
  Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Evelyn Tsai,
	Shayne Chen, Sam Shih, linux-wireless, linux-mediatek, devicetree

On Tue, Nov 28, 2023 at 11:57:23AM +0800, Peter Chiu wrote:
> The mt7986 can support four interrupts to distribute the interrupts
> to different CPUs.
> 
> Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
> ---
>  .../bindings/net/wireless/mediatek,mt76.yaml  | 24 +++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> index 252207adbc54..20f5f2ead265 100644
> --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> @@ -19,9 +19,6 @@ description: |
>    Alternatively, it can specify the wireless part of the MT7628/MT7688
>    or MT7622/MT7986 SoC.
>  
> -allOf:
> -  - $ref: ieee80211.yaml#
> -
>  properties:
>    compatible:
>      enum:
> @@ -38,7 +35,8 @@ properties:
>        MT7986 should contain 3 regions consys, dcm, and sku, in this order.
>  
>    interrupts:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 4
>  
>    power-domains:
>      maxItems: 1
> @@ -219,6 +217,24 @@ required:
>  
>  unevaluatedProperties: false
>  
> +allOf:
> +  - $ref: ieee80211.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mt7986-wmac
> +    then:
> +      properties:
> +        interrupts:
> +          minItems: 1
> +          items:
> +            - description: major interrupt for rings
> +            - description: addditional interrupt for ring 19
> +            - description: addditional interrupt for ring 4
> +            - description: addditional interrupt for ring 5

This list belongs in the top level. The if/then schema needs to set 
'maxItems: 1' for the cases with only 1 interrupt and 'minItems: 4' for 
the cases with 4 interrupts.

Rob

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

end of thread, other threads:[~2023-11-28 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28  3:57 [PATCH] dt-bindings: net: wireless: mt76: add interrupts description for MT7986 Peter Chiu
2023-11-28 17:37 ` Rob Herring

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