All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: nbd@nbd.name, 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
Subject: Re: [PATCH v2 1/7] dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node
Date: Mon, 12 Apr 2021 14:06:35 -0500	[thread overview]
Message-ID: <20210412190635.GA4168984@robh.at.kernel.org> (raw)
In-Reply-To: <5712c0901cd826d49f881b6c632df35db1678a37.1618008449.git.lorenzo@kernel.org>

On Sat, Apr 10, 2021 at 12:51:46AM +0200, Lorenzo Bianconi wrote:
> 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  | 96 +++++++++++++++++++
>  1 file changed, 96 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> index d6f835d17d66..f459323b8972 100644
> --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> @@ -72,6 +72,79 @@ properties:
>        led-sources:
>          maxItems: 1
>  
> +  power-limits:
> +    type: object

       additionalProperties: false

> +    patternProperties:
> +      "^r[0-9]+":
> +        type: object

           additionalProperties: false
         
> +        properties:
> +          regdomain:
> +            $ref: /schemas/types.yaml#/definitions/string
> +            description:
> +              Regdomain refers to a legal regulatory region. Different
> +              countries define different levels of allowable transmitter
> +              power, time that a channel can be occupied, and different
> +              available channels
> +            enum:
> +              - FCC
> +              - ETSI
> +              - JP
> +
> +        patternProperties:
> +          "^txpower-[256]g$":
> +            type: object

               additionalProperties: false

> +            patternProperties:
> +              "^b[0-9]+$":
> +                type: object

                   additionalProperties: false

> +                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
> +
> +                  rates-cck:
> +                    $ref: /schemas/types.yaml#/definitions/uint8-array
> +                    minItems: 4
> +                    maxItems: 4
> +                    description:
> +                      4 half-dBm per-rate power limit values
> +
> +                  rates-ofdm:
> +                    $ref: /schemas/types.yaml#/definitions/uint8-array
> +                    minItems: 8
> +                    maxItems: 8
> +                    description:
> +                      8 half-dBm per-rate power limit values
> +
> +                  rates-mcs:
> +                    $ref: /schemas/types.yaml#/definitions/uint8-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.

This can be expressed as a schema:

maxItems: 4
items:
  minItems: 9
  maxItems: 11

> +
> +                  rates-ru:
> +                    $ref: /schemas/types.yaml#/definitions/uint8-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.


items:
  minItems: 13
  maxItems: 13

> +
> +                  txs-delta:
> +                    $ref: /schemas/types.yaml#/definitions/uint32-array
> +                    description:
> +                      Half-dBm power delta for different numbers of antennas
> +
>  required:
>    - compatible
>    - reg
> @@ -93,6 +166,29 @@ examples:
>          led {
>            led-sources = <2>;
>          };
> +
> +        power-limits {
> +          r0 {
> +            regdomain = "FCC";
> +            txpower-5g {
> +               b0 {
> +                   channels = <36 48>;
> +                   rates-ofdm = /bits/ 8 <23 23 23 23 23 23 23 23>;
> +                   rates-mcs = /bits/ 8 <1 23 23 23 23 23 23 23 23 23 23>,
> +                                        <3 22 22 22 22 22 22 22 22 22 22>;
> +                   rates-ru = /bits/ 8 <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>;
> +                   rates-ofdm = /bits/ 8 <14 14 14 14 14 14 14 14>;
> +                   rates-mcs = /bits/ 8  <4 14 14 14 14 14 14 14 14 14 14>;
> +                   txs-delta = <12 9 6>;
> +                   rates-ru = /bits/ 8  <7 14 14 14 14 14 14 14 14 14 14 14 14>;
> +               };
> +             };
> +          };
> +        };
>        };
>      };
>  
> -- 
> 2.30.2
> 

  reply	other threads:[~2021-04-12 19:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 22:51 [PATCH v2 0/7] introduce single-sku support for mt7663/mt7921 drivers Lorenzo Bianconi
2021-04-09 22:51 ` [PATCH v2 1/7] dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node Lorenzo Bianconi
2021-04-12 19:06   ` Rob Herring [this message]
2021-04-09 22:51 ` [PATCH v2 2/7] mt76: add functions for parsing rate power limits from DT Lorenzo Bianconi
2021-04-09 22:51 ` [PATCH v2 3/7] mt76: extend DT rate power limits to support 11ax devices Lorenzo Bianconi
2021-04-09 22:51 ` [PATCH v2 4/7] mt76: mt7615: implement support for using DT rate power limits Lorenzo Bianconi
2021-04-09 22:51 ` [PATCH v2 5/7] mt76: mt7615: do not use mt7615 single-sku values for mt7663 Lorenzo Bianconi
2021-04-09 22:51 ` [PATCH v2 6/7] mt76: introduce single-sku support for mt7663/mt7921 Lorenzo Bianconi
2021-04-09 22:51 ` [PATCH v2 7/7] 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=20210412190635.GA4168984@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --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.