All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: nbd@nbd.name
Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com,
	sean.wang@mediatek.com, ryder.lee@mediatek.com,
	shayne.chen@mediatek.com, devicetree@vger.kernel.org,
	robh@kernel.org
Subject: [PATCH 2/8] dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node
Date: Mon,  5 Apr 2021 14:40:26 +0200	[thread overview]
Message-ID: <eb6998d12c7f60a28c7f3eab455d4339656f76e2.1617625912.git.lorenzo@kernel.org> (raw)
In-Reply-To: <cover.1617625912.git.lorenzo@kernel.org>

Introduce power-limits node in mt76 binding in order to specify
per-rate power limit values for each 802.11n/802.11ac rate

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../bindings/net/wireless/mediatek,mt76.yaml  | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index d6f835d17d66..6ede331e3e52 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -72,6 +72,62 @@ properties:
       led-sources:
         maxItems: 1
 
+  power-limits:
+    type: object
+    properties:
+      regdomain: true
+
+    patternProperties:
+      "^r[0-9]+":
+        type: object
+        patternProperties:
+          "^txpower-[256]g$":
+            type: object
+            patternProperties:
+              "^b[0-9]+$":
+                type: object
+                properties:
+                  channels:
+                    $ref: /schemas/types.yaml#/definitions/uint32-array
+                    minItems: 2
+                    maxItems: 2
+                    description:
+                      Pairs of first and last channel number of the selected
+                      band
+
+                  cck:
+                    $ref: /schemas/types.yaml#/definitions/uint32-array
+                    minItems: 4
+                    maxItems: 4
+                    description:
+                      4 half-dBm per-rate power limit values
+
+                  mcs:
+                    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+                    description:
+                      Sets of per-rate power limit values for 802.11n/802.11ac
+                      rates for multiple channel bandwidth settings.
+                      Each set starts with the number of channel bandwidth
+                      settings for which the rate set applies, followed by
+                      either 8 or 10 power limit values. The order of the
+                      channel bandwidth settings is 20, 40, 80 and 160 MHz.
+
+                  ru:
+                    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+                    description:
+                      Sets of per-rate power limit values for 802.11ax rates
+                      for multiple channel bandwidth or resource unit settings.
+                      Each set starts with the number of channel bandwidth or
+                      resource unit settings for which the rate set applies,
+                      followed by 12 power limit values. The order of the
+                      channel resource unit settings is RU26, RU52, RU106,
+                      RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
+
+                  txs-delta:
+                    $ref: /schemas/types.yaml#/definitions/uint32-array
+                    description:
+                      Half-dBm power delta for different numbers of antennas
+
 required:
   - compatible
   - reg
@@ -93,6 +149,29 @@ examples:
         led {
           led-sources = <2>;
         };
+
+        power-limits {
+          r0 {
+            txpower-5g {
+               regdomain = "FCC";
+               b0 {
+                   channels = <36 48>;
+                   ofdm = <23 23 23 23 23 23 23 23>;
+                   mcs = <1 23 23 23 23 23 23 23 23 23 23>,
+                         <3 22 22 22 22 22 22 22 22 22 22>;
+                   ru = <3 22 22 22 22 22 22 22 22 22 22 22 22>,
+                        <4 20 20 20 20 20 20 20 20 20 20 20 20>;
+               };
+               b1 {
+                   channels = <100 181>;
+                   ofdm = <14 14 14 14 14 14 14 14>;
+                   mcs = <4 14 14 14 14 14 14 14 14 14 14>;
+                   txs-delta = <12 9 6>;
+                   ru = <7 14 14 14 14 14 14 14 14 14 14 14 14>;
+               };
+             };
+          };
+        };
       };
     };
 
-- 
2.30.2


  parent reply	other threads:[~2021-04-05 12:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 12:40 [PATCH 0/8] introduce single-sku support for mt7663/mt7921 drivers Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 1/8] dt-bindings:net:wireless:ieee80211: introduce regdomain property Lorenzo Bianconi
2021-04-09 15:13   ` Rob Herring
2021-04-09 21:27     ` Lorenzo Bianconi
2021-04-05 12:40 ` Lorenzo Bianconi [this message]
2021-04-09 15:22   ` [PATCH 2/8] dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node Rob Herring
2021-04-09 22:50     ` Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 3/8] mt76: add functions for parsing rate power limits from DT Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 4/8] mt76: extend DT rate power limits to support 11ax devices Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 5/8] mt76: mt7615: implement support for using DT rate power limits Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 6/8] mt76: mt7615: do not use mt7615 single-sku values for mt7663 Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 7/8] mt76: introduce single-sku support for mt7663/mt7921 Lorenzo Bianconi
2021-04-05 12:40 ` [PATCH 8/8] mt76: mt7921: add dumping Tx power table Lorenzo Bianconi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb6998d12c7f60a28c7f3eab455d4339656f76e2.1617625912.git.lorenzo@kernel.org \
    --to=lorenzo@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=robh@kernel.org \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.