From nobody Mon May 4 13:03:47 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5B0B388E6D; Mon, 4 May 2026 09:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888418; cv=none; b=GvewpXv/DB5sMbM45EpqdLvcKRa+Nx4Z7zJfERam0CSlycExTEtZHPJtlCm8jM+gidZ4huyAsdKG39TAmVt3XG2aAxUemJ4kam59EbyV25/3iLdE5z3POdJjMwSO5p5p2UibpYBl3RMvJfyzaRd5TZnkXWI/gUKQkArYCRpSKr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888418; c=relaxed/simple; bh=bfHxs+8n4wZA2fJCrQWrYGJJt/F4QIFzOGI0x34JhfU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jpeVPCFa6mON04ezodogb8jn+F7VTiwPRY9tbiYTWjH7RnSXadVPMWTtPZzBnVJj7JN67FpHWZhXiwne2iHjH6s49NGcUSF/MRydPC57Bs1NWWtC9r/v2ns6VYIpok9+o626zzniK7aocxD/v8nSiw5tahRJZyFaArMElR6+YkQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=f5Gtz6y8; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="f5Gtz6y8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777888416; x=1809424416; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bfHxs+8n4wZA2fJCrQWrYGJJt/F4QIFzOGI0x34JhfU=; b=f5Gtz6y8NNDQ5uG5J4gLKFHf4cKIaD4+Lf8OclPydHUOz6ptihV8hJ8F daMB49NHf4rwfjk/0IqD5t3cJY3dX6rC/SWBWzMRoS0y9NskH3Q3fsNK2 fnqqdc/oegiK5D5avJ/ax2uxEFZPKpJtUakyrTX4pprGStUAausK6riDJ 0mg6ByW2AnoLpltlCTY8Q1wCr9JhT3d1VTj0qywxLCGexJxJESI8dQBnV xGDztfiNY6IljzU8S2DowUVxMFj8wghSr79uRjZ/7jr6xU73v+I6vq1Re wENz04WhidqLTZshmNftwMmuV4uluCfp69BZ1A4DAmeAEPlvkFb6ODl/T w==; X-CSE-ConnectionGUID: AfiFAP19QrSkGY1uF9pbxg== X-CSE-MsgGUID: QTGV+aACRUicE0WZpJ2OWQ== X-IronPort-AV: E=McAfee;i="6800,10657,11775"; a="78767564" X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="78767564" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 02:53:35 -0700 X-CSE-ConnectionGUID: g2zTyUDkSR6YIbVq9Exexw== X-CSE-MsgGUID: OhJk/IYdSD281VHfmLHK2Q== X-ExtLoop1: 1 Received: from iapp347.iil.intel.com (HELO localhost) ([10.167.28.6]) by fmviesa003.fm.intel.com with ESMTP; 04 May 2026 02:53:32 -0700 From: Avinash Bhatt To: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, johannes@sipsolutions.net, miriam.rachel.korenblit@intel.com, linux-kernel@vger.kernel.org, kobi.guetta@intel.com, emmanuel.grumbach@intel.com, avinash.bhatt@intel.com Subject: [PATCH v2 1/3] dt-bindings: net: wireless: intel,iwlwifi: add binding Date: Mon, 4 May 2026 12:53:25 +0300 Message-Id: <20260504095327.30892-2-avinash.bhatt@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260504095327.30892-1-avinash.bhatt@intel.com> References: <20260504095327.30892-1-avinash.bhatt@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a devicetree schema binding for Intel discrete Wi-Fi 7 BE200 PCIe adapters. The binding documents OEM platform configuration properties for platforms that use Device Tree instead of platform firmware methods. All properties mirror the existing equivalents in structure and semantics, covering SAR power limits (intel,wrds), 6 GHz AP type support (intel,uats), static power limit (intel,splc), channel puncturing (intel,wcpe), 320 MHz per-MCC enablement (intel,wbem), ETSI SRD channel configuration (intel,srd), 6-7 GHz UHB country enable bitmask (intel,6e-uhb), and additional regulatory override properties. Signed-off-by: Avinash Bhatt --- .../bindings/net/wireless/intel,iwlwifi.yaml | 430 ++++++++++++++++++ 1 file changed, 430 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/wireless/intel,iw= lwifi.yaml diff --git a/Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.y= aml b/Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.yaml new file mode 100644 index 000000000000..210063c6183d --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/intel,iwlwifi.yaml @@ -0,0 +1,430 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2026 Intel Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/wireless/intel,iwlwifi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Intel iwlwifi PCIe Wi-Fi devices + +maintainers: + - Avinash Bhatt + +description: + Intel iwlwifi IEEE 802.11be discrete Wi-Fi adapters connected over PCIe. + +properties: + compatible: + enum: + - pci8086,272b + + reg: + maxItems: 1 + + intel,wrds: + description: | + Wi-Fi Regulatory Domain Settings (WRDS). SAR (Specific Absorption Ra= te) + transmit power limits per antenna chain and frequency subband. Values + are 8-bit unsigned in units of 0.125 dBm. + + Revision 3 layout: 4 chains x 12 subbands =3D 50 cells total. + Chain A and Chain B are the two physical antenna paths; CDB Chain A + and CDB Chain B carry separate limits for simultaneous dual-band + operation. + + Header (2 cells): + [0] revision - structure revision, must be 0x03 + [1] mode - bit 0: 0 =3D SAR disabled, 1 =3D SAR enabled; + bits [8:1]: set to 0 + + Followed by 4 chains in order: chain_a, chain_b, cdb_chain_a, + cdb_chain_b, each containing 12 subband values: + + Subband index to frequency range mapping: + [0] 2.4 GHz ch 1-13 (2412-2472 MHz) + [1] 5 GHz ch 36-64 (5180-5320 MHz, UNII-1/2) + [2] 5 GHz ch 68-96 (5340-5480 MHz, UNII-2) + [3] 5 GHz ch 100-144 (5500-5720 MHz, UNII-2e) + [4] 5 GHz ch 149-188 (5745-5940 MHz, UNII-3/4) + [5] 6 GHz ch 1-45 (5955-6175 MHz, UNII-5 lower) + [6] 6 GHz ch 49-93 (6195-6415 MHz, UNII-5 upper) + [7] 6 GHz ch 97-115 (6435-6525 MHz, UNII-6) + [8] 6 GHz ch 117-151 (6535-6705 MHz, UNII-7 lower) + [9] 6 GHz ch 153-183 (6715-6865 MHz, UNII-7 upper) + [10] 6 GHz ch 185-233 (6875-7115 MHz, UNII-8) + [11] 6 GHz ch 237-253 (7135-7215 MHz, UNII-9) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 50 + maxItems: 50 + + intel,uats: + description: | + UHB (Ultra High Band / 6 GHz) AP Type Support (UATS). Per-country + enablement matrix for 6 GHz AP types. Uses byte array format + (DTS [ ... ] notation). + + In the 6 GHz band, regulatory rules differ per country and per AP + type: AFC (Standard Power), LPI (Low Power Indoor), and VLP (Very + Low Power). This matrix encodes which AP types are permitted to + operate in each country. + + Revision 1 layout (339 bytes total): + [0] revision - structure revision, must be 0x01 + [1+] country_map - 338-byte matrix encoding AP type allowances + per country. + + Countries are identified by their ISO 3166-1 + alpha-2 code (two letters, A-Z each). The + matrix covers all 26x26 =3D 676 possible + two-letter combinations (AA..ZZ), most of + which are unused (set to 0x0). + + Each country entry is 4 bits (a nibble). Two + entries are packed per byte: the low nibble + holds the even-indexed entry, the high nibble + holds the odd-indexed entry. For example, + byte value 0x53 means: entry[even]=3D0x3, + entry[odd]=3D0x5. + + The matrix is stored column-major by first + letter: all 26 second-letter variants for + first letter 'A' occupy bytes [0..12], then + first letter 'B' occupies bytes [13..25], + and so on for all 26 first letters. + 26 columns x 13 bytes =3D 338 bytes total. + + Each 4-bit nibble encodes AP type allowances + for one country: + bit 0: AFC (Standard Power AP) allowed + bit 1: VLP (Very Low Power AP) allowed + bit 2: LPI (Low Power Indoor AP) allowed + bit 3: reserved, must be 0 + + Note: each bit is only effective when the + corresponding control bit in intel,6e-uhb + is also set (bit 30 for AFC, bit 29 + for VLP, bit 31 for LPI country-by-country + mode). + allOf: + - $ref: /schemas/types.yaml#/definitions/uint8-array + - minItems: 339 + maxItems: 339 + + intel,srd: + description: | + ETSI 5.8 GHz SRD (Short Range Device) channel configuration. + Controls how the driver handles the 5725-5875 MHz (5.8 GHz) SRD + channels in ETSI regulatory domains. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] value - channel configuration: + 0 =3D active scan permitted (default behaviour) + 1 =3D passive scan only; device may associate and + transfer data but must not transmit probe + requests on SRD channels + 2 =3D SRD channels fully disabled; the device must + not scan, associate, or operate on any of the + 5725-5875 MHz SRD channels + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - enum: [0, 1, 2] + + intel,6e-uhb: + description: | + 6-7 GHz Ultra-High Band (UHB) per-country enable bitmask. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] bitmap - UHB enablement control: + bit 0: override control; 0 =3D use device defau= lts, + 1 =3D force-disable all countries not + explicitly enabled in bits 1-25 + bits 1-25: per-country/region enable flags: + bit 1 =3D USA + bit 2 =3D Rest of World (ROW) + bit 3 =3D EU + bit 4 =3D South Korea + bit 5 =3D Brazil + bit 6 =3D Chile + bit 7 =3D Japan + bit 8 =3D Canada + bit 9 =3D Morocco + bit 10 =3D Mongolia + bit 11 =3D Malaysia + bit 12 =3D Saudi Arabia + bit 13 =3D Mexico + bit 14 =3D Nigeria + bit 15 =3D Thailand + bit 16 =3D Singapore + bit 17 =3D Taiwan + bit 18 =3D South Africa + bit 19 =3D Philippines + bit 20 =3D Serbia + bit 21 =3D Indonesia + bit 22 =3D Azerbaijan + bit 23 =3D Paraguay + bit 24 =3D Vietnam + bit 25 =3D India + bit 26: reserved, must be 0 + bit 27: enable VLP active scan, SoftAP, and + P2P-GO operation in Japan + bit 28: reserved, must be 0 + bit 29: enable VLP (Very Low Power) mode per + country-by-country table + bit 30: enable AFC (Standard Power) mode per + country-by-country table + bit 31: LPI override mode; 0 =3D use grouping + mechanism, 1 =3D use country-by-country = table + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + + intel,regulatory-special: + description: | + Regulatory Special Configurations. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] bitmap - configuration flags: + bits 0-3: reserved, must be 0 + bit 4 =3D Australia UHB extension + bits 5-31: reserved, must be 0 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + + intel,activate-channel: + description: | + Indoor channel activation bitmask. Sets specific frequency bands to + active (rather than passive or disabled) when the platform is + confirmed to be operating indoors. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] bitmap - per-region indoor activation flags: + bit 0 =3D enable EU U-NII-1 (5.2 GHz) for indoors o= nly + bit 1 =3D enable Japan U-NII-1 (5.2 GHz) for indoor= s only + bit 2 =3D enable China Mainland U-NII-1 (5.2 GHz) + for indoors only + bit 3 =3D enable USA U-NII-4 (5.9 GHz) for indoors = only + bit 4 =3D enable WW U-NII-1 (5.2 GHz) for indoors i= n any + country where the band is permitted + bit 5 =3D enable Canada U-NII-4 (5.9 GHz) for indoo= rs only + bit 6 =3D enable USA + Canada + WW U-NII-4 (5.9 GHz= ) for + indoors only + bits 7-31: reserved, must be 0 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + + intel,force-disable-channels: + description: | + Selective Wi-Fi band force-disable bitmask. Allows the platform to + permanently disable specific frequency bands regardless of regulatory + domain. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] bitmap - per-band force-disable flags: + bit 0 =3D force disable 2.4 GHz (channels 1-13) + bit 1 =3D force disable 5.2 GHz (channels 36-48) + bit 2 =3D force disable 5.3 GHz (channels 52-64) + bit 3 =3D force disable 5.5 GHz (channels 100-144) + bit 4 =3D force disable 5.8 GHz (channels 149-165) + bit 5 =3D force disable 5.9 GHz (channels 169-177) + bit 6 =3D force disable 6.2 GHz (channels 1-93) + bit 7 =3D force disable 6.5 GHz (channels 97-113) + bit 8 =3D force disable 6.6 GHz (channels 117-153) + bit 9 =3D force disable 6.8 GHz (channels 157-185) + bit 10 =3D force disable 7.0 GHz (channels 185-233) + bits 11-31: reserved, must be 0 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + + intel,11be: + description: | + 802.11be (Wi-Fi 7) per-country enable bitmask. Controls whether + 802.11be operation is permitted in specific countries. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] bitmap - per-country enable flags: + bit 0 =3D enable 802.11be in China (CB/CN) + bit 1 =3D enable 802.11be in South Korea + bits 2-31: reserved, must be 0 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + + intel,splc: + description: | + Wi-Fi Static Power Limit Capabilities (SPLC). Sets the platform ther= mal + power limit for the Wi-Fi core in mW. Omit this property entirely if + no platform power limit applies; the device will use its certified + maximum in that case. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] power_limit - maximum platform power budget in mW, must be + non-zero (a zero value is equivalent to omitting + the property) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - minimum: 1 + + intel,wcpe: + description: | + Wi-Fi Channel Puncturing Enablement (WCPE). Enables 802.11be channel + puncturing for specific regulatory domains. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] puncturing - per-country enable bitmask: + bit 0: 1 =3D channel puncturing enabled for USA + bit 1: 1 =3D channel puncturing enabled for Canada + bits 2-31: reserved, must be 0 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + + intel,wbem: + description: | + Wi-Fi 320 MHz Bandwidth Enablement per MCC (WBEM). Controls whether + 320 MHz operation is permitted in specific countries. + + Layout (2 cells): + [0] revision - structure revision, must be 0x00 + [1] wifi320mhz_mcc - per-country enable bitmask: + bit 0: 1 =3D 320 MHz enabled for Japan + bit 1: 1 =3D 320 MHz enabled for South Korea + bits 2-31: reserved, must be 0 + + Each bit takes effect only if the installed + module is certified for 320 MHz in that count= ry. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - items: + - const: 0 + - {} + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + /* ARM64 platform with Intel Wi-Fi 7 BE200 as discrete PCIe device */ + pcie { + #address-cells =3D <3>; + #size-cells =3D <2>; + + pcie@0 { + device_type =3D "pci"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + bus-range =3D <0x01 0xff>; + + wifi@0 { + compatible =3D "pci8086,272b"; + reg =3D <0x10000 0x0 0x0 0x0 0x0>; + + /* + * Wi-Fi Regulatory Domain Settings (SAR power limits). + * Revision 3: 4 chains x 12 subbands =3D 50 cells total. + * Layout: revision, mode, then 4 x chain[12]. + */ + intel,wrds =3D < + 0x03 0x01 + /* Chain A: 12 subbands */ + 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38= 0x38 + /* Chain B: 12 subbands */ + 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38 0x38= 0x38 + /* CDB Chain A: 12 subbands */ + 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c= 0x3c + /* CDB Chain B: 12 subbands */ + 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c= 0x3c + >; + + /* + * Static Power Limit: 4500 mW cap on this platform. + * 2 u32 cells: revision, power_limit_mw. + */ + intel,splc =3D <0x00 0x1194>; + + /* + * Channel Puncturing: enabled for USA and Canada. + * 2 u32 cells: revision, puncturing bitmask (bits 0+1). + */ + intel,wcpe =3D <0x00 0x03>; + + /* + * 320 MHz per MCC: Japan and South Korea enabled. + * 2 u32 cells: revision, wifi320mhz_mcc. + */ + intel,wbem =3D <0x00 0x03>; + + /* OEM regulatory configuration properties. */ + intel,srd =3D <0x00 1>; /* revision=3D0, passive scan only= */ + intel,activate-channel =3D <0x00 0x01>; /* EU indoors */ + intel,force-disable-channels =3D <0x00 0x00>; /* revision= =3D0 */ + intel,6e-uhb =3D <0x00 0x06>; /* revision=3D0, USA+ROW */ + + /* + * UHB AP Type Support (6 GHz country matrix). + * Byte array: revision (0x01), then + * 338 bytes of the 26x13 country enable map (all zeros + * in this example =3D no countries enabled). + */ + intel,uats =3D [01 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00]; + }; + }; + }; --=20 2.34.1 From nobody Mon May 4 13:03:47 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEF14389110; Mon, 4 May 2026 09:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888421; cv=none; b=BpqMcwNUV2ZGbOzKItnkTkvF5541uWJLJkKmBYu69TqgAy2ln8qQoNV0dAk8r5vR+OTfYSxJPfNeiZS02UtsAN+QKYfca0KxCysthDnpXL1DDO7Dku8F1Y9aBnZurTvOpBFjT/mdR39Ck9OZ6aU69qTMq4MIjo1eA6jjvecWMKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888421; c=relaxed/simple; bh=rDLLDyJGWbnHEZy87mTvRW2xYvYUiNHLwcFssU6xVa0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FF89230F2LDe5RfWGeXlYqKtrbpi6YNCYv9akT9rLO1mOeWkyig4y8v0qew+BBgODSgekSmngfcUuj0/kLgI20qEwU0xfj0ZFrVkZm/bzOI1kBpkLOayMA22gd2IRnxsTajC5qhd9RLn6bumuWQxL5AL+WIo4Ll+UFuTIlus3MY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aMf3nUhU; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aMf3nUhU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777888419; x=1809424419; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rDLLDyJGWbnHEZy87mTvRW2xYvYUiNHLwcFssU6xVa0=; b=aMf3nUhUcDPo/QIRzjtrGhC1gVJsTkCZwHxshDY6itfB8nava6oFdaJZ d7zOyplI+Y8nSKeGVqyoOBTM1Hg50zVLEuP9pXufi02+OJqaXq4o5hnH/ UAGdwRs+VUItdfzBChm5hWiMRjXF2WUZKSuZAFz/bKvr4isdSzfikQMzO KOstWstbkQrWmkL+o2QTWpmJQ9rPyLsNaWZKqrCcg1ewdZwoGIypdHAKW 3FX0fkfuZpuFcwej+3CHf7vtPo1kanUEXwJ0KZOmZwIfVawRPSQWWf7b1 7FfHcn2NkqawDr1c86cwRgxxeBUoXHvunQ3A9GTPziT+3Q/YcTzwQogph w==; X-CSE-ConnectionGUID: S6dyjytgTkabL1iyq3zjJA== X-CSE-MsgGUID: KwB46sPWTImpOxZqs7YIBQ== X-IronPort-AV: E=McAfee;i="6800,10657,11775"; a="78767571" X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="78767571" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 02:53:39 -0700 X-CSE-ConnectionGUID: bF3toE6PTl2EpcK2BJ+nPg== X-CSE-MsgGUID: dPXZnDVdT16h9Krg1nHPMw== X-ExtLoop1: 1 Received: from iapp347.iil.intel.com (HELO localhost) ([10.167.28.6]) by fmviesa003.fm.intel.com with ESMTP; 04 May 2026 02:53:36 -0700 From: Avinash Bhatt To: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, johannes@sipsolutions.net, miriam.rachel.korenblit@intel.com, linux-kernel@vger.kernel.org, kobi.guetta@intel.com, emmanuel.grumbach@intel.com, avinash.bhatt@intel.com Subject: [PATCH v2 2/3] wifi: iwlwifi: dt: add Device Tree BIOS configuration infrastructure Date: Mon, 4 May 2026 12:53:26 +0300 Message-Id: <20260504095327.30892-3-avinash.bhatt@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260504095327.30892-1-avinash.bhatt@intel.com> References: <20260504095327.30892-1-avinash.bhatt@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On platforms that use Device Tree and do not provide UEFI variables or ACPI methods, discrete Intel Wi-Fi adapters have no way to receive BIOS configuration. Add Device Tree as a supported configuration source for SAR limits and 6 GHz AP type support, with stub hooks for TAS and per-platform antenna gain tables. DT support is gated on CONFIG_OF and is a no-op on x86. BIOS_SOURCE_DT is added to enum bios_source to track the configuration origin. Signed-off-by: Avinash Bhatt --- drivers/net/wireless/intel/iwlwifi/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 5 +- .../wireless/intel/iwlwifi/fw/api/nvm-reg.h | 4 +- drivers/net/wireless/intel/iwlwifi/fw/dt.c | 321 ++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/dt.h | 123 +++++++ .../wireless/intel/iwlwifi/fw/regulatory.h | 3 +- 6 files changed, 451 insertions(+), 6 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/fw/dt.c create mode 100644 drivers/net/wireless/intel/iwlwifi/fw/dt.h diff --git a/drivers/net/wireless/intel/iwlwifi/Makefile b/drivers/net/wire= less/intel/iwlwifi/Makefile index 941257b811b4..445c8a26b6bd 100644 --- a/drivers/net/wireless/intel/iwlwifi/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/Makefile @@ -38,6 +38,7 @@ iwlwifi-$(CONFIG_IWLMVM) +=3D fw/paging.o fw/smem.o fw/in= it.o iwlwifi-$(CONFIG_IWLMLD) +=3D fw/smem.o fw/init.o iwlwifi-$(CONFIG_ACPI) +=3D fw/acpi.o iwlwifi-$(CONFIG_EFI) +=3D fw/uefi.o +iwlwifi-$(CONFIG_OF) +=3D fw/dt.o iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) +=3D fw/debugfs.o =20 iwlwifi-objs +=3D $(iwlwifi-m) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wir= eless/intel/iwlwifi/fw/acpi.h index 51a57e57de7a..45eb35ffb637 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* * Copyright (C) 2017 Intel Deutschland GmbH - * Copyright (C) 2018-2023, 2025 Intel Corporation + * Copyright (C) 2018-2023, 2025-2026 Intel Corporation */ #ifndef __iwl_fw_acpi__ #define __iwl_fw_acpi__ @@ -111,9 +111,6 @@ #define ACPI_PPAG_WIFI_DATA_SIZE_V3 ((ACPI_PPAG_NUM_CHAINS * \ ACPI_PPAG_NUM_BANDS_V3) + 2) =20 -#define IWL_SAR_ENABLE_MSK BIT(0) -#define IWL_REDUCE_POWER_FLAGS_POS 1 - /* The Inidcator whether UEFI WIFI GUID tables are locked is read from ACP= I */ #define UEFI_WIFI_GUID_UNLOCKED 0 =20 diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h b/drivers/= net/wireless/intel/iwlwifi/fw/api/nvm-reg.h index 443a9a416325..39289bf3a193 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2012-2014, 2018-2025 Intel Corporation + * Copyright (C) 2012-2014, 2018-2026 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -495,11 +495,13 @@ struct iwl_tas_config_cmd_v2_v4 { * @BIOS_SOURCE_NONE: BIOS source is not defined * @BIOS_SOURCE_ACPI: BIOS source is ACPI * @BIOS_SOURCE_UEFI: BIOS source is UEFI + * @BIOS_SOURCE_DT: BIOS source is Device Tree */ enum bios_source { BIOS_SOURCE_NONE, BIOS_SOURCE_ACPI, BIOS_SOURCE_UEFI, + BIOS_SOURCE_DT, }; =20 /** diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dt.c b/drivers/net/wirel= ess/intel/iwlwifi/fw/dt.c new file mode 100644 index 000000000000..4f3d098204f0 --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/fw/dt.c @@ -0,0 +1,321 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Copyright (C) 2026 Intel Corporation + */ +#include +#include "iwl-drv.h" +#include "iwl-debug.h" +#include "fw/runtime.h" +#include "fw/regulatory.h" +#include "dt.h" + +/* DT property names */ +#define IWL_DT_PROP_WRDS "intel,wrds" +#define IWL_DT_PROP_UATS "intel,uats" +#define IWL_DT_PROP_SPLC "intel,splc" +#define IWL_DT_PROP_WBEM "intel,wbem" +#define IWL_DT_PROP_WCPE "intel,wcpe" +#define IWL_DT_WCPE_USA_EN BIT(0) +#define IWL_DT_WCPE_CANADA_EN BIT(1) +#define IWL_DT_WCPE_MASK (IWL_DT_WCPE_USA_EN | \ + IWL_DT_WCPE_CANADA_EN) +#define IWL_DT_PROP_SRD "intel,srd" +#define IWL_DT_PROP_6E_UHB "intel,6e-uhb" +#define IWL_DT_PROP_REG_SPECIAL "intel,regulatory-special" +#define IWL_DT_PROP_ACTIVATE_CH "intel,activate-channel" +#define IWL_DT_PROP_FORCE_DISABLE_CH "intel,force-disable-channels" +#define IWL_DT_PROP_11BE "intel,11be" + +/* Supported revision values for each DT property */ +#define IWL_DT_WRDS_REVISION 3 +#define IWL_DT_UATS_REVISION 1 + +/* SAR layout for "intel,wrds" revision 3 (mirrors ACPI_SAR_NUM_CHAINS_REV2 + * and UEFI_SAR_SUB_BANDS_NUM_REV3): 4 chains x 12 subbands + */ +#define IWL_DT_WRDS_NUM_CHAINS 4 +#define IWL_DT_WRDS_NUM_SUBBANDS 12 +/* Total cell count for "intel,wrds" property: 2-cell header + SAR data */ +#define IWL_DT_WRDS_MAX_CELLS \ + (2 + IWL_DT_WRDS_NUM_CHAINS * IWL_DT_WRDS_NUM_SUBBANDS) + +/** + * iwl_dt_get_wrds_table - read SAR power limits from DT "intel,wrds" prop= erty + * @fwrt: firmware runtime context + * + * Reads per-chain, per-subband SAR power limits from the "intel,wrds" + * Device Tree property and populates the SAR profile. + * + * Return: 0 on success, -ENOENT if the property or DT node is absent, + * or a negative error code for malformed data. + */ +int iwl_dt_get_wrds_table(struct iwl_fw_runtime *fwrt) +{ + struct device_node *node =3D dev_of_node(fwrt->dev); + u32 buf[IWL_DT_WRDS_MAX_CELLS]; + u8 num_chains, num_subbands; + int ret; + + if (!node) + return -ENOENT; + + ret =3D of_property_read_u32_array(node, IWL_DT_PROP_WRDS, buf, + IWL_DT_WRDS_MAX_CELLS); + if (ret) { + IWL_DEBUG_RADIO(fwrt, "WRDS DT: read failed (%d)\n", ret); + return ret; + } + + if (buf[0] !=3D IWL_DT_WRDS_REVISION) { + IWL_DEBUG_RADIO(fwrt, + "WRDS DT: revision %u not supported (only %u)\n", + buf[0], IWL_DT_WRDS_REVISION); + return -EINVAL; + } + + num_chains =3D IWL_DT_WRDS_NUM_CHAINS; + num_subbands =3D IWL_DT_WRDS_NUM_SUBBANDS; + + IWL_DEBUG_RADIO(fwrt, + "Reading WRDS from Device Tree (revision %u, %u chains, %u subbands)\n", + buf[0], num_chains, num_subbands); + + /* buf[1] bit 0 (IWL_SAR_ENABLE_MSK): enable SAR */ + + BUILD_BUG_ON(IWL_DT_WRDS_NUM_CHAINS > BIOS_SAR_MAX_CHAINS_PER_PROFILE); + BUILD_BUG_ON(IWL_DT_WRDS_NUM_SUBBANDS > BIOS_SAR_MAX_SUB_BANDS_NUM); + + /* buf[2..]: chains[0..N-1] x subbands[0..M-1] in row-major order */ + for (int i =3D 0; i < num_chains; i++) { + for (int j =3D 0; j < num_subbands; j++) { + u32 val =3D buf[2 + i * num_subbands + j]; + + if (val > U8_MAX) { + IWL_DEBUG_RADIO(fwrt, + "DT: WRDS OOB [%u][%u]=3D%u\n", + i, j, val); + return -EINVAL; + } + fwrt->sar_profiles[0].chains[i].subbands[j] =3D (u8)val; + } + } + + if (buf[1] & IWL_SAR_ENABLE_MSK) + fwrt->sar_profiles[0].enabled =3D true; + + return 0; +} + +/** + * iwl_dt_get_uats_table - read UHB AP type support table from DT "intel,u= ats" + * @fwrt: firmware runtime context + * + * Reads the UHB AP type support table from the "intel,uats" Device Tree + * property and stores the MCC-to-AP-type map for use by the firmware comm= and. + */ +void iwl_dt_get_uats_table(struct iwl_fw_runtime *fwrt) +{ + size_t map_size =3D sizeof(fwrt->ap_type_cmd.mcc_to_ap_type_map); + struct device_node *node =3D dev_of_node(fwrt->dev); + const u8 *prop_data; + int len; + + if (!node) + return; + + prop_data =3D of_get_property(node, IWL_DT_PROP_UATS, &len); + if (!prop_data) { + IWL_DEBUG_FW(fwrt, "UATS DT: property absent\n"); + return; + } + + if (len !=3D (int)(1 + map_size)) { + IWL_DEBUG_FW(fwrt, "UATS DT: bad length %d (expected %zu)\n", + len, 1 + map_size); + return; + } + + if (prop_data[0] !=3D IWL_DT_UATS_REVISION) { + IWL_DEBUG_FW(fwrt, + "UATS DT: revision %u not supported (expected %u)\n", + prop_data[0], IWL_DT_UATS_REVISION); + return; + } + + IWL_DEBUG_FW(fwrt, "Reading UATS table from Device Tree\n"); + + /* prop_data[0]=3Drevision, prop_data[1+]=3D26x13 MCC to AP type map */ + memcpy(fwrt->ap_type_cmd.mcc_to_ap_type_map, prop_data + 1, map_size); + fwrt->ap_type_cmd_valid =3D true; +} +IWL_EXPORT_SYMBOL(iwl_dt_get_uats_table); + +/* + * Mapping from DSM function index to Device Tree property name. + * Returns the DT property name for a given DSM function, or NULL if the + * function has no Device Tree representation. + */ +static const char *dsm_func_to_prop_name(enum iwl_dsm_funcs func) +{ + switch (func) { + case DSM_FUNC_DISABLE_SRD: return IWL_DT_PROP_SRD; + case DSM_FUNC_ENABLE_6E: return IWL_DT_PROP_6E_UHB; + case DSM_FUNC_REGULATORY_CONFIG: return IWL_DT_PROP_REG_SPECIAL; + case DSM_FUNC_ACTIVATE_CHANNEL: return IWL_DT_PROP_ACTIVATE_CH; + case DSM_FUNC_FORCE_DISABLE_CHANNELS: + return IWL_DT_PROP_FORCE_DISABLE_CH; + case DSM_FUNC_ENABLE_11BE: return IWL_DT_PROP_11BE; + default: return NULL; + } +} + +/** + * iwl_dt_get_dsm - read one OEM DSM function value from Device Tree + * @fwrt: firmware runtime context + * @func: DSM function index (enum iwl_dsm_funcs) + * @value: output value + * + * Reads the DT property for @func on every call without caching. + * Unlike the ACPI/UEFI paths, the shared dsm_funcs_valid/dsm_values[] + * fields are not used here. + * + * Return: 0 on success, -ENOENT if no DT node, -EOPNOTSUPP if the function + * has no DT representation, -ENODATA if the property is absent, + * -EINVAL if the property revision is unsupported. + */ +int iwl_dt_get_dsm(struct iwl_fw_runtime *fwrt, enum iwl_dsm_funcs func, + u32 *value) +{ + struct device_node *node =3D dev_of_node(fwrt->dev); + const char *prop; + u32 buf[2]; + + if (!node) + return -ENOENT; + + if (func >=3D DSM_FUNC_NUM_FUNCS) + return -EOPNOTSUPP; + + prop =3D dsm_func_to_prop_name(func); + if (!prop) + return -EOPNOTSUPP; + + if (of_property_read_u32_array(node, prop, buf, ARRAY_SIZE(buf))) + return -ENODATA; + + if (buf[0] !=3D 0) { + IWL_DEBUG_RADIO(fwrt, + "DT: DSM func %d (%s) unsupported revision %u\n", + func, prop, buf[0]); + return -EINVAL; + } + + if (fwrt->dsm_source =3D=3D BIOS_SOURCE_NONE) { + fwrt->dsm_source =3D BIOS_SOURCE_DT; + fwrt->dsm_revision =3D 0; + } + + *value =3D buf[1]; + IWL_DEBUG_RADIO(fwrt, "DT: DSM func=3D%d (%s) val=3D%u\n", + func, prop, *value); + return 0; +} + +/** + * iwl_dt_get_pwr_limit - read static platform power limit from DT "intel,= splc" + * @fwrt: firmware runtime context + * @data: output power limit in mW + * + * Reads the 2-cell "intel,splc" DT property: [revision, power_limit_mw]. + * Return: 0 on success, -ENOENT if absent, -EINVAL for unsupported revisi= on. + */ +int iwl_dt_get_pwr_limit(struct iwl_fw_runtime *fwrt, u64 *data) +{ + struct device_node *node =3D dev_of_node(fwrt->dev); + u32 buf[2]; + int ret; + + if (!node) + return -ENOENT; + + ret =3D of_property_read_u32_array(node, IWL_DT_PROP_SPLC, + buf, ARRAY_SIZE(buf)); + if (ret) + return ret; + + if (buf[0] !=3D 0) { + IWL_DEBUG_RADIO(fwrt, "DT: splc unsupported revision %u\n", + buf[0]); + return -EINVAL; + } + + *data =3D buf[1]; + IWL_DEBUG_RADIO(fwrt, "DT: Read SPLC power limit %llu mW\n", *data); + return 0; +} + +/** + * iwl_dt_get_wbem - read 320 MHz per-MCC enablement from DT "intel,wbem" + * @fwrt: firmware runtime context + * @data: output bitmask (bit 0 =3D Japan, bit 1 =3D South Korea) + * + * Reads the 2-cell "intel,wbem" DT property: [revision, wifi320mhz_mcc]. + * Return: 0 on success, -ENOENT if absent, -EINVAL for unsupported revisi= on. + */ +int iwl_dt_get_wbem(struct iwl_fw_runtime *fwrt, u32 *data) +{ + struct device_node *node =3D dev_of_node(fwrt->dev); + u32 buf[2]; + int ret; + + if (!node) + return -ENOENT; + + ret =3D of_property_read_u32_array(node, IWL_DT_PROP_WBEM, + buf, ARRAY_SIZE(buf)); + if (ret) + return ret; + + if (buf[0] !=3D 0) { + IWL_DEBUG_RADIO(fwrt, "DT: wbem unsupported revision %u\n", + buf[0]); + return -EINVAL; + } + + *data =3D buf[1]; + IWL_DEBUG_RADIO(fwrt, "DT: Read WBEM config 0x%x\n", *data); + return 0; +} + +/** + * iwl_dt_get_puncturing - read channel puncturing config from DT "intel,w= cpe" + * @fwrt: firmware runtime context + * + * Reads the 2-cell "intel,wcpe" DT property: [revision, puncturing_bitmap= ]. + * Return: the bitmask (bit 0 =3D USA, bit 1 =3D Canada), or 0 if absent + * or revision unsupported. + */ +int iwl_dt_get_puncturing(struct iwl_fw_runtime *fwrt) +{ + struct device_node *node =3D dev_of_node(fwrt->dev); + u32 buf[2]; + int ret; + + if (!node) + return 0; + + ret =3D of_property_read_u32_array(node, IWL_DT_PROP_WCPE, + buf, ARRAY_SIZE(buf)); + if (ret) + return 0; + + if (buf[0] !=3D 0) { + IWL_DEBUG_RADIO(fwrt, "DT: wcpe unsupported revision %u\n", + buf[0]); + return 0; + } + + IWL_DEBUG_RADIO(fwrt, "DT: Read WCPE puncturing config 0x%x\n", buf[1]); + return buf[1] & IWL_DT_WCPE_MASK; +} +IWL_EXPORT_SYMBOL(iwl_dt_get_puncturing); diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dt.h b/drivers/net/wirel= ess/intel/iwlwifi/fw/dt.h new file mode 100644 index 000000000000..01d8eef2babc --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/fw/dt.h @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* + * Copyright (C) 2026 Intel Corporation + */ +#ifndef __iwl_fw_dt_h__ +#define __iwl_fw_dt_h__ + +#include "fw/regulatory.h" + +/* + * Device Tree property parsing for Intel iwlwifi discrete Wi-Fi devices. + * + * On platforms without UEFI variables or ACPI methods, regulatory and + * power configuration can be supplied via Device Tree properties in the + * Wi-Fi PCIe device node. The following properties are supported: + * + * intel,wrds - SAR power limits (WRDS, revision 3) + * intel,uats - UHB AP type support table (UATS, revisio= n 1) + * intel,splc - static platform power limit + * intel,wbem - 320 MHz per-MCC enablement + * intel,wcpe - channel puncturing enablement + * intel,srd - ETSI SRD channel configuration + * intel,6e-uhb - 6 GHz UHB country enable bitmask + * intel,regulatory-special - regulatory special configuration + * intel,activate-channel - indoor channel activation bitmask + * intel,force-disable-channels - band force-disable bitmask + * intel,11be - 802.11be per-country enable bitmask + * + * DT is the lowest-priority source: UEFI variables take precedence, then + * ACPI methods, and finally these DT properties. + */ + +struct iwl_fw_runtime; + +#if IS_ENABLED(CONFIG_OF) + +/* Functions implemented in fw/dt.c */ +int iwl_dt_get_wrds_table(struct iwl_fw_runtime *fwrt); +void iwl_dt_get_uats_table(struct iwl_fw_runtime *fwrt); +int iwl_dt_get_dsm(struct iwl_fw_runtime *fwrt, enum iwl_dsm_funcs func, + u32 *value); +int iwl_dt_get_pwr_limit(struct iwl_fw_runtime *fwrt, u64 *data); +int iwl_dt_get_wbem(struct iwl_fw_runtime *fwrt, u32 *data); +int iwl_dt_get_puncturing(struct iwl_fw_runtime *fwrt); + +#else /* !CONFIG_OF */ + +static inline int iwl_dt_get_wrds_table(struct iwl_fw_runtime *fwrt) +{ + return -ENOENT; +} + +static inline void iwl_dt_get_uats_table(struct iwl_fw_runtime *fwrt) {} + +static inline int iwl_dt_get_dsm(struct iwl_fw_runtime *fwrt, + enum iwl_dsm_funcs func, u32 *value) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_pwr_limit(struct iwl_fw_runtime *fwrt, u64 *d= ata) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_wbem(struct iwl_fw_runtime *fwrt, u32 *data) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_puncturing(struct iwl_fw_runtime *fwrt) +{ + return 0; +} + +#endif /* CONFIG_OF */ + +/* + * The following tables have no Device Tree implementation regardless of + * CONFIG_OF. Callers fall back gracefully when these return -ENOENT. + */ +static inline int iwl_dt_get_ppag_table(struct iwl_fw_runtime *fwrt) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_tas_table(struct iwl_fw_runtime *fwrt, + struct iwl_tas_data *data) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_ewrd_table(struct iwl_fw_runtime *fwrt) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_wgds_table(struct iwl_fw_runtime *fwrt) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_phy_filters(struct iwl_fw_runtime *fwrt) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_mcc(struct iwl_fw_runtime *fwrt, char *data) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_eckv(struct iwl_fw_runtime *fwrt, u32 *data) +{ + return -ENOENT; +} + +static inline int iwl_dt_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *data) +{ + return -ENOENT; +} + +#endif /* __iwl_fw_dt_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h b/drivers/n= et/wireless/intel/iwlwifi/fw/regulatory.h index 6fffc032efd3..22c97c75b83c 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2023-2025 Intel Corporation + * Copyright (C) 2023-2026 Intel Corporation */ =20 #ifndef __fw_regulatory_h__ @@ -30,6 +30,7 @@ #define BIOS_GEO_MIN_PROFILE_NUM 3 =20 #define IWL_SAR_ENABLE_MSK BIT(0) +#define IWL_REDUCE_POWER_FLAGS_POS 1 =20 /* PPAG gain value bounds in 1/8 dBm */ #define IWL_PPAG_MIN_LB -16 --=20 2.34.1 From nobody Mon May 4 13:03:47 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7701361660; Mon, 4 May 2026 09:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888424; cv=none; b=Fy7fA9ZSR/a8OYtNFjUWXmGXgnEyMSsxXcZkzM0fsCRdcGdVEVvq2/Msq0mYUh8cNHRl6vjQCq5UqsOkfTFJ8O1O6fT/D17/iHRRV3OYm1VVx8ALMj9wwNU5seUVMv2dQJ4WxUMOhZON/tagneMrlRwDPEUz3YZH0u7++HCRSyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777888424; c=relaxed/simple; bh=mKa58w5dpFcGWRMkLBxMJoKorqe0hrHK6WSxFCGon3s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NxLAS0Tyl3CU1WlIHYVmCC7c6Z4p8Uu/cjAYHzfCCwp8Ddp1wujtvV3ZZHkRwT2yk/7jrmxqyk908l/y0yFrkSuQuPLqsMfSzTXN9atMDn2XHGCnZ0DYo9MfIxLcPQNEJLym0BA1FyMa6nxZvdEGx0PXVZcZ/y3IbLD323BvmYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=akSHfj2W; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="akSHfj2W" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777888423; x=1809424423; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mKa58w5dpFcGWRMkLBxMJoKorqe0hrHK6WSxFCGon3s=; b=akSHfj2W/Ljb0FuJxRFjwIKDeW/aZlf0fifA15rbtwXlDT1oO+QC6Uw0 Os7r7yqQH0dAJg6D/vV8zNyz4j6WyhMF2g8WJxfZm0m5Myjpm4QbFhGiP RIE4v0p/PtcGAW615aQQOd14llT2YFdOpYwallNshZditT4oLXqeplpMl ejxjYVDvzZuFQgwTPifXG5BTzrJ+5dOffPngWwXDXKpQnaBo6db4r9X91 lD+hwuY3tHzimYvY2R8JyY8zEInIDfPF9YAGgSXo4WcE3aRpIlN62CoMF XD0O4reBdLP+keur1Gklxr/NhLieay1bcmlGf1NQwRI+nEWjSMIPwhZz7 Q==; X-CSE-ConnectionGUID: N2ZFbGIsTgeQNt8cMpqffQ== X-CSE-MsgGUID: W1FPmwZyQECWHGW0Iw8aMw== X-IronPort-AV: E=McAfee;i="6800,10657,11775"; a="78767579" X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="78767579" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 02:53:43 -0700 X-CSE-ConnectionGUID: agQKhT/XSYqTWtiB5Eb7tg== X-CSE-MsgGUID: cPqsscEAQYSTLcuxwiIXUQ== X-ExtLoop1: 1 Received: from iapp347.iil.intel.com (HELO localhost) ([10.167.28.6]) by fmviesa003.fm.intel.com with ESMTP; 04 May 2026 02:53:39 -0700 From: Avinash Bhatt To: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, johannes@sipsolutions.net, miriam.rachel.korenblit@intel.com, linux-kernel@vger.kernel.org, kobi.guetta@intel.com, emmanuel.grumbach@intel.com, avinash.bhatt@intel.com Subject: [PATCH v2 3/3] wifi: iwlwifi: dt: use Device Tree as fallback BIOS configuration source Date: Mon, 4 May 2026 12:53:27 +0300 Message-Id: <20260504095327.30892-4-avinash.bhatt@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260504095327.30892-1-avinash.bhatt@intel.com> References: <20260504095327.30892-1-avinash.bhatt@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When neither UEFI variables nor ACPI methods provide a BIOS configuration table, fall back to Device Tree. This preserves the existing UEFI -> ACPI priority order and extends it with DT as the lowest-priority source. Signed-off-by: Avinash Bhatt --- drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mld/mld.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mld/regulatory.c | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c b/drivers/n= et/wireless/intel/iwlwifi/fw/regulatory.c index 55128caac7ed..10bb4d2f64cf 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c @@ -8,6 +8,7 @@ #include "regulatory.h" #include "fw/runtime.h" #include "fw/uefi.h" +#include "fw/dt.h" =20 #define GET_BIOS_TABLE(__name, ...) \ do { \ @@ -16,6 +17,8 @@ do { \ ret =3D iwl_uefi_get_ ## __name(__VA_ARGS__); \ if (ret < 0) \ ret =3D iwl_acpi_get_ ## __name(__VA_ARGS__); \ + if (ret < 0) \ + ret =3D iwl_dt_get_ ## __name(__VA_ARGS__); \ return ret; \ } while (0) =20 diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.c b/drivers/net/wir= eless/intel/iwlwifi/mld/mld.c index 495e9d8f3af6..a3e93112caff 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.c @@ -12,6 +12,7 @@ #include "fw/api/coex.h" #include "fw/dbg.h" #include "fw/uefi.h" +#include "fw/dt.h" =20 #include "mld.h" #include "mlo.h" @@ -418,6 +419,8 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const st= ruct iwl_rf_cfg *cfg, iwl_mld_get_bios_tables(mld); iwl_uefi_get_sgom_table(trans, &mld->fwrt); mld->bios_enable_puncturing =3D iwl_uefi_get_puncturing(&mld->fwrt); + if (!mld->bios_enable_puncturing) + mld->bios_enable_puncturing =3D iwl_dt_get_puncturing(&mld->fwrt); =20 iwl_mld_hw_set_regulatory(mld); =20 diff --git a/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c b/drivers/= net/wireless/intel/iwlwifi/mld/regulatory.c index 659243ada86c..1c7d2136b2e3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/regulatory.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2024-2025 Intel Corporation + * Copyright (C) 2024-2026 Intel Corporation */ =20 #include @@ -8,6 +8,7 @@ #include "fw/regulatory.h" #include "fw/acpi.h" #include "fw/uefi.h" +#include "fw/dt.h" =20 #include "regulatory.h" #include "mld.h" @@ -64,6 +65,8 @@ void iwl_mld_get_bios_tables(struct iwl_mld *mld) } =20 iwl_uefi_get_uats_table(mld->trans, &mld->fwrt); + if (!mld->fwrt.ap_type_cmd_valid) + iwl_dt_get_uats_table(&mld->fwrt); iwl_uefi_get_uneb_table(mld->trans, &mld->fwrt); =20 iwl_bios_get_phy_filters(&mld->fwrt); --=20 2.34.1