Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp931180ybh; Tue, 21 Jul 2020 11:20:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwpfi0/ao52JgRYltq31ihymVuZpPSofnwUi42VaiFx2Ucsoc8Ipnl4iat+d9812R4H1IP X-Received: by 2002:a17:906:fac1:: with SMTP id lu1mr27940257ejb.427.1595355644775; Tue, 21 Jul 2020 11:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595355644; cv=none; d=google.com; s=arc-20160816; b=C4Kx51kkfmDwaPpN+ZEmrR3fKy8MYNKOYxIU0K0zbNFBtT1gan2BYGvWHp8/Cw0Bw/ gs7VEXO4S3lw/BzVP2pn/bNrxU964x6TeuZylpQFDRENuybp+WM141CRKcpAAO9MSF0l t0MWfDY5q6q8GC5WmxkVgFm6N739IbHcxet15gdEFVPcG9vPzim2CDTrAqngUDDa4bof EzXHM7x+dObdnFFvDzkKIahiqeodfOtcVFnkOxvY2u8PMpp0100JV0E/e+DsFxM2pIrE B5rgGJgwPK3akrepEVSQDKhPPTxXx8UeRPOchjHLkVFcT6M/NOhD8j/3iEC5jqx1U/Jr gYvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=7ybedw7b+1HrL+2gV+0HQyzMIL57L2oQSZ9AJ4WhJ/8=; b=UdFVv2xnOsnEs4jFWhd+Qws81GyM/N69yX4yXKjzsFqbDTbEUz0qFocGcZUZ1pC6QJ yCbcWhsUJ2aGFSd4MXbRuoxEbfY/ZaIczp00Spog2j3SE+Ym8fyiNpYzawSI7pa3PESV I30HDYvl2bO1P9OiBAQ58+LgFw6y9C6kIL4E67grlTBkTVt6Ju5JL9EuguCoY/ngHNva DqfIF7J5Y9PdiB1SF8k3eVdy5TBLNRoY+zoNHk3J045eCUa7Y4pCVQqmA85LUfJowhkO gmxMu2RYfxz3OCNHgHLUmL0mVyybPyHkI+2dlAb2cJMBzYats9ruad0l24IqjKz9+lro gBjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=etA+ocCP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n17si12711657ejc.193.2020.07.21.11.20.11; Tue, 21 Jul 2020 11:20:44 -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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=etA+ocCP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728369AbgGUSRy (ORCPT + 99 others); Tue, 21 Jul 2020 14:17:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728153AbgGUSRy (ORCPT ); Tue, 21 Jul 2020 14:17:54 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D235C061794 for ; Tue, 21 Jul 2020 11:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7ybedw7b+1HrL+2gV+0HQyzMIL57L2oQSZ9AJ4WhJ/8=; b=etA+ocCPk0lRv78CP0xdDOTdNR dkYP7zAAChHoP2OAkAVxAeTOv2Fj7d3MUHTRF6sMFW6llRza5eE0RspEP4eiBb9AxFSJWiYBBBkm/ vYoqQOBEB7NCYPUsw+jF+pZ+7+JtkhQR7G5k3cIF425MVwO08vRvEbOxANpX4aYOOTCE=; Received: from p54ae9e66.dip0.t-ipconnect.de ([84.174.158.102] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jxwpr-0003bf-CP; Tue, 21 Jul 2020 20:17:51 +0200 Subject: Re: [PATCH v3 1/4] dt-bindings: net: wireless: mt76: add power-limits node To: Rob Herring Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, evelyn.tsai@mediatek.com, Shayne Chen References: <20200715130134.34988-1-nbd@nbd.name> <20200721030416.GA3448943@bogus> From: Felix Fietkau Autocrypt: addr=nbd@nbd.name; prefer-encrypt=mutual; keydata= xsDiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtcAunDaMKi9xVQW18FsUusM TdRvTZLBpoUAy+M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WS4 Message-ID: <1fb272a4-1b7a-d054-4c63-7fef1237e269@nbd.name> Date: Tue, 21 Jul 2020 20:17:50 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200721030416.GA3448943@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-07-21 05:04, Rob Herring wrote: > On Wed, Jul 15, 2020 at 03:01:34PM +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 >> >> Co-developed-by: Shayne Chen >> Signed-off-by: Shayne Chen >> Signed-off-by: Felix Fietkau >> --- >> v3: >> - fix S-o-b order >> v2: >> - merge 802.11ax rate changes from Shayne's patch >> - document txs-delta property > > This is an extensive enough change that I think it needs to be in schema > format. Okay, I will convert the existing file soon and then add these changes afterwards. >> .../bindings/net/wireless/mediatek,mt76.txt | 59 +++++++++++++++++++ >> 1 file changed, 59 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt >> index ab7e7a00e534..e4859c974ef4 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,61 @@ 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 > > What are the values? cfg80211 is a Linux thing and doesn't belong in > bindings. I'll change the description to leave out cfg80211. It's a simple alpha2 country code. >> +- regdomain: "FCC", "ETSI" or "JP" > > These aren't implied by the country code? You use either country code or regdomain. >> +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 > > What's the range in terms of channel numbers and pairs? 802.11 channel numbers (0-255) >> +- 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. > > The example only has 2 sets, so which channels are they? The format is , so a set starting with <3 ...> would contain the values for 20, 40 and 80 MHz and you'd add another one with <1 ...> to describe 160 MHz. Sets often contain the same data for multiple channel bandwidths, so this reduces duplication. >> +- ru: >> + 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, RU2x996/SU160. > > Could be 8-bit? Doesn't really matter much for the example, but what's > the worst/typical case? Yes, 8 bit would also work. >> +- txs-delta: half-dBm power delta for different numbers of antennas (1, 2, ...) >> + >> + >> +power-limit example: >> + >> +power-limits { >> + r0 { > > What's 'r0'? Not documented. > >> + regdomain = "FCC"; >> + txpower-5g { >> + r1 { > > What's 'r1' and 'r2'? Not documented. You add an arbitrary number of subnodes (I just used r0, r1, ...) containing rules with the documented properties. - Felix