Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp872576ybm; Fri, 29 May 2020 14:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw49Fp8IOzi9yiwsNd4lEsXv/E8LkQoWHLIjhOe1m+v+Gl59+pVvYYZT7h1p/x2UC4Ike0h X-Received: by 2002:aa7:c598:: with SMTP id g24mr4280729edq.132.1590787646099; Fri, 29 May 2020 14:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590787646; cv=none; d=google.com; s=arc-20160816; b=VzUuNbjJjRruuWXX1yPYvvR8T2dZMV/Y6dQWQtXkjzmOs0fHSndnE64XH1Kh7pxn7Z vRR0Dn1RwJUkwRPWUYM84frwEj6wNd4rAfpsE61rpYDyVmHflwRt98tiwEDCeREQr+/K 2m9BHBciMHS7HAE+b64NimFgrvjc8IgOwyvXWM+FgNHYJ5HA7HMK6p6gHOp4FYb3ACGN 2IoIS+bXejySEjllc9OCM6+VVxUgYsobgSgkFEPFNRMOyKpOYDrESvielr0T6LWfrdcl 1N84ExrFzRgnAf1PDIJ+NAjGoAyKUYkBXXi1V8dP8jGo+ut7J0FUdsbMfCxm2GNVa3Hm oUGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=+2I2uh+lCRQ53KIyx03FmW/+jeIMFqOBrGTcbc9lM4s=; b=Dbk97GXWM/ERj0cDTXJ87hmaUVWFEMXR0IgnFdnjYnkoNEefGAlUUvVq0s47k7a5fb pMoVD9QqelwxblcxA/qA6hOvUy5Dh5Hrud+BrkKdzRwgtAY0EaN+RQccfl77qPnrOHs1 HTEi/wKGFPnH5rwy2OhqUDvW4X3sDVx2pa5UMeFUmJUc0SFd7G9bf3izfA4a++DTJjgS s7APCeOXTfxC3cTWuWJ4LoYelNd18ed0PQAjHSoAJwyR2NiFIZlRldibpuE5SOBMqjt4 8YNGQZ2a1+zknZPmsT5IDIXwqodINcHly+3Mh90q8C0CwZhJqyIYhJnWTiR3VVPxnS75 6xwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si3402251ejg.564.2020.05.29.14.26.49; Fri, 29 May 2020 14:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728293AbgE2V0k (ORCPT + 99 others); Fri, 29 May 2020 17:26:40 -0400 Received: from mail-il1-f196.google.com ([209.85.166.196]:35846 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727964AbgE2V0k (ORCPT ); Fri, 29 May 2020 17:26:40 -0400 Received: by mail-il1-f196.google.com with SMTP id 17so3942588ilj.3; Fri, 29 May 2020 14:26:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+2I2uh+lCRQ53KIyx03FmW/+jeIMFqOBrGTcbc9lM4s=; b=Pikg9MLLTqzQ2jwqEe6IFmOXh4LISsKfaPmROxgGYDuQJutrBVTO1HxCvEdzFITZwj Ltn14m37MHv6e5VpR6KBH58k4f2UqWaW57jpw7Tn6c2VxucQoRKkGYkMbRGSh+GvcOe6 +iSHFUloRI9U8NOmyw81mQSJiVTBnvsJQfqoCpEyeMjC9yHhVlMWB5MLr9SxFULCB8JZ VgxSiRY/eY+eWUt0qgp/+z36Zdk+nt5yJAw65TEXozYwafSeT+qbFpRF0VJC0/Vz7kfL HUv8ebxvm0nglmxeLL94l8/722pdSt2oCymRNEIs07FarCPIePNFO8eR0zOAWau7e0fq x1cA== X-Gm-Message-State: AOAM531Ud/gU7ndHtfVtDsFI0GoGiCvsdVgTPEVNjKrB7ATe0D2FNBBc dkcwRLpE2nsDnevokxYFoVxgKubrhg== X-Received: by 2002:a92:8488:: with SMTP id y8mr2707079ilk.262.1590787599226; Fri, 29 May 2020 14:26:39 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id t65sm1498148ilk.38.2020.05.29.14.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 14:26:38 -0700 (PDT) Received: (nullmailer pid 2998245 invoked by uid 1000); Fri, 29 May 2020 21:26:37 -0000 Date: Fri, 29 May 2020 15:26:37 -0600 From: Rob Herring To: Felix Fietkau Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/3] dt-bindings: net: wireless: mt76: add power-limits node Message-ID: <20200529212637.GA2994957@bogus> References: <20200529161929.24751-1-nbd@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200529161929.24751-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, May 29, 2020 at 06:19:27PM +0200, Felix Fietkau wrote: > This subnode can be used to set per-rate tx power limits either per > country code / regdomain or globally. > These limits are typically provided by the device manufacturers and are > used to limit sideband emissions and stay within regulatory limits How do other WiFi chips handle this? If this is added to DT, then it should be common for all WiFi h/w. > Signed-off-by: Felix Fietkau > --- > .../bindings/net/wireless/mediatek,mt76.txt | 47 +++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt > index ab7e7a00e534..9d9ace0cfbf9 100644 > --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt > +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt > @@ -36,6 +36,7 @@ Optional nodes: > - led: Properties for a connected LED > Optional properties: > - led-sources: See Documentation/devicetree/bindings/leds/common.txt > +- power-limits: contains per-regdomain/channel rate power limit subnodes > > &pcie { > pcie0 { > @@ -76,3 +77,49 @@ wmac: wmac@18000000 { > > power-domains = <&scpsys MT7622_POWER_DOMAIN_WB>; > }; > + > + > +Subnodes of power-limits: > + > +Properties: > +- country: One or more country codes, as used by the cfg80211 regdomain code > +- regdomain: "FCC", "ETSI" or "JP" > + > +If neither country, nor regdomain is specified, the power limits node is used > +as a fallback when no other subnode matches. > + > +Subnodes txpower-2g, txpower-5g: > + > +Properties: > +- channels: pairs of first and last channel number > +- cck: 4 half-dBm per-rate power limit values > +- ofdm: 8 half-dBm per-rate power limit values > +- mcs: > + 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 (MT7603/MT7628) or > + 10 (all other chips) power limit values. > + The order of the channel bandwidth settings is: 20, 40, 80, 160 MHz. > + > + > +power-limit example: > + > +power-limits { > + r0 { > + regdomain = "FCC"; > + txpower-5g { > + r1 { > + 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>; > + }; > + r2 { > + channels = <100 181>; > + ofdm = <14 14 14 14 14 14 14 14>; > + mcs = <4 14 14 14 14 14 14 14 14 14 14>; > + }; > + }; > + }; > +}; > -- > 2.24.0 >