Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp433413ybh; Wed, 15 Jul 2020 06:03:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwUzsihu/sWvWdnlGckYoRTQurZLg1B366Jy33F6LfyC8P5MIQuTUUAWXh5kq/pBhkpe0h X-Received: by 2002:a05:6402:359:: with SMTP id r25mr9245187edw.177.1594818201702; Wed, 15 Jul 2020 06:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594818201; cv=none; d=google.com; s=arc-20160816; b=we68nxylBq/9dZZN9SdNteljTROqd3/zWvfyIvZw62BHC7WKYqgbttb7tWHVyPmqB0 7nj/Bqe+H1kpFwdR7YII/84F4jfccfkzJFQ8ZL0ohg/maQfP8gHLG8iq4EJm8dQQ3c5w /NuMX1ryGtDoZ0Ax0TZzUH3B1TCyYHFrFMqFG05F7S43eJ2gtx70Rr8L9eorWSIfKYDJ Ry7VAPZn2Oxq+9+jT66nmZDeLxi1cNYVJV9wbooIRMw7WMfXDuWiWiKd0Pw+2Rk0SPjV 3f4jtvi4PN4V3EucGIB2GJcUQF8oGJZLXhoP3i6AnJcwAIDpVtaG0AnqhI9zdhQ4ccnO omHg== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pivfQbDXNPRL1qq0rFiuOkRxQTRlTI7QE0TCm+MsbXk=; b=aN6ggV8Jo0gLrDO7KJcPJ/HPvny0iiPi2S3BxDos8UWxI8jLQTWvSKYAVj8F14gDPh BUWGX6YmKoXQOGK1ZY2vUlWlgfiM6ZjLIv9dIw/IP/irJ66H7C+tY+gcL3PPezwO0wJH X2ge7yTfTd88MX0q5WejUNVsLvYHMpGlbT90E3FuJRup9h+LOucjM6/xspKFov3NhXYX JxiytEHP/YZCc6J1f/dDe5UdTBF3WBqHFIBDH/12rud1jew25TPZoY9GBafxUJmxLe8O Z8r5Gs1ViTUN0MugVMx5txkTQhyUB2pfM0S93iqyuQj1JFspJEHPUjSaEeI9HaHTLIEO 9C3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=qlJkJ4up; 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 q12si1243974edn.472.2020.07.15.06.02.54; Wed, 15 Jul 2020 06:03:21 -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=qlJkJ4up; 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 S1731358AbgGONBk (ORCPT + 99 others); Wed, 15 Jul 2020 09:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgGONBk (ORCPT ); Wed, 15 Jul 2020 09:01:40 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05162C061755 for ; Wed, 15 Jul 2020 06:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pivfQbDXNPRL1qq0rFiuOkRxQTRlTI7QE0TCm+MsbXk=; b=qlJkJ4upTKLxMA42NTIOoVfsZa GgIt7tXEJ7JTMrogl0oRMmHSoEjSssyjSI18oOuYmwu52v+OdIHpVmlhPGxiyVs7c8FRS1Lu5Xs0O qCRR8Ak4+h0aRV6RGkEcc42hsfHP6HLHegM24jaK1PiGBvYWD+4utKzn4Td2a9QGPVI8=; Received: from p5b2068d4.dip0.t-ipconnect.de ([91.32.104.212] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1jvh2V-0000ux-IH; Wed, 15 Jul 2020 15:01:35 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: devicetree@vger.kernel.org, evelyn.tsai@mediatek.com, Shayne Chen Subject: [PATCH v3 1/4] dt-bindings: net: wireless: mt76: add power-limits node Date: Wed, 15 Jul 2020 15:01:34 +0200 Message-Id: <20200715130134.34988-1-nbd@nbd.name> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 .../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 +- 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. +- 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. +- txs-delta: half-dBm power delta for different numbers of antennas (1, 2, ...) + + +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>; + 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>; + }; + 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>; + txs-delta = <12 9 6>; + ru = <7 14 14 14 14 14 14 14 14 14 14 14 14>; + }; + }; + }; +}; -- 2.24.0