From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 169AC3D5222 for ; Mon, 17 Aug 2026 21:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787003718; cv=none; b=Juc7/CA7HlmlYeHgsXRudsRHm0E5MzYLEes1ftQC6333aAYIMYEmOp4Xqv1Jy58J/XoigMVaay5ToN4be0YzO0Ld4Gz4Z5wyAfjR51eO1y3Tcvl0r6IxHu1QuQjiuN9xb3di6h3+reobY1yoZ45A/NFlKsuSBvY8ByqFApWy5bc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787003718; c=relaxed/simple; bh=8EMlG6R/cw7SoID55yTqFGHDLwMbLeW2jwmeF10chJk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GCQgnn6zWz5Hp72qB5DWIBJOZIcRYvxCEXqE5EWVYtDfvYcHAnDNt7qzOqUUDyJqlD/OG4fW0ojjBeRghtkBf6KFiEZUcE4A1bXZ9S0BX2sGiQShLOoCO6gA0jDf8vXV9qd2ZHdRyQQMu1oFtirrJyrsRo6vlZiXTgFlM2tMJBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aT9ygKin; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aT9ygKin" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-498028b3d5eso50134015e9.1 for ; Mon, 17 Aug 2026 14:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787003712; x=1787608512; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kyG2XouO94IC0oaowF4bLz5IBlinDO6829l+v8pLt/w=; b=aT9ygKinfbupuOkba5NnnDu4BX//6ohQZvyC9xHRRn0tmb+i8x9xELPhiEmrIbrXGK tmGLskE7iqURrOEDT0FYpo5nS4zVzel108GdcAvpXiuajMEnmrOG02KKcMmdtPRyPCh8 waG3abe+VKfwI+L10I+K9Ki5q8Yj5QsoYdIN6pzsSde5qWOt4ajOnaQlAyJhTFC1UTmc klJ+l6BxMPpai26FKYN2swj+4EOVPV8LhCOQGggGRGIjhTJtcwROOFWQ3jnWDWUbZjIY +en6OlRZpskdEBeMScmop3kP9fOHh/6bov9/rdPgRj1t2tJZ3rUDWecITELvJn9UzZQ7 RpWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787003712; x=1787608512; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=kyG2XouO94IC0oaowF4bLz5IBlinDO6829l+v8pLt/w=; b=M3F2ZSkpXbgrUSvGtaMWpyCDKiIzSQtPnPgbzG4asCHN0wlcXGjHoVOej4r40KQlbu flkjJFXcgAKZfSt8N9xGoJBXE+txRzLXehMZZbctnSezh4XSA6z8ySCL9Fkx6g2uXfZA u8lmp7YWTpCKWEVhDxnw+nfs+WloUq281qV4H4tVN+AmxPxcZ1+T3R5r5CjYNpcMWQUy 8RRFum7xm8l+i9CJCzEHHlPUZHkI7j8oGdV+Y6UEqt4TDcP4aKBRYQBUOc2KC72YZJZs soEStjekIS/OGbt+HuduYUJSRq4Q1Pzc+t9oCZbyOpK0Wvss+ZqlvRj9vmbx0lThG20N /FmQ== X-Forwarded-Encrypted: i=1; AHgh+Rqx0MV8IGv+tWX4pwYCuG4u2CcC+hIbF74nnB9Cmu3ewollFJrei4Tx4pCVVk+zl3/Po8teYmjDC4eJoJg=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+onGjXjn9pbnwfzl7gKFUw3tN+mlZ7+28coXuiihwNxkO0+mi 0evCAvQS1QllFSW7JYaJPiYmbT8i4svdG8To3doKXQ47eGil30z9VZLU X-Gm-Gg: AR+sD12PCUWuHPq+Zx5Jr3ippyVOaDowd2AldLdgcnqg28XGat35HvbbyA4lNxq7cXG we38iIGeKmNM8LgL0rNz71Tua6PLlUJJOSX8xEklcJYoPUZDpbj4f0GS7dkXnN6e+wVxYHwdvR2 17ZF6r7aK17fmGAAMa1N95NOvWmKorWK59+0tsBsrn5KTS2EZskqAGq7vBZm+BxhlOJyYwJbNL/ 7hYMylYNOw/QTDTKAgkvEdZUmzsOlyDyDBdahZVWZnzcDBMB2qZlkK6GOlPTsOjIyIyvDyhTyr0 FTVVVo0CXMFE00fZhjbAW/aj0LEqCmwWmW46AeHUA2r6PGI03bf4I86mcHyE1mR4Ap52LgN0O8S AKa8Eye7njLWkbVhsOPBgULysJJKv9blLuMknhrBVS5OvZuzCrPs3IJ6/mxSvzKVbt8haUIbs6W Lus+7o4nJUhXkFUzJtd7KBmWw+Inr6DlRwOGB5XXFEhhmmprJB02rGl1Ximuct48vIX7b67abA8 7wKvEV0PUH7+VpPZF86h4xz69rXeQinxo8xggQDrW4vxtIyeNAlOB2Wz059UzCOecFidmO1OdOF yEUgtmQIQA== X-Received: by 2002:a05:600c:b99:b0:496:c379:b2a1 with SMTP id 5b1f17b1804b1-49987929903mr398757195e9.2.1787003712299; Mon, 17 Aug 2026 14:55:12 -0700 (PDT) Received: from localhost.localdomain (85-118-76-205.mtel.net. [85.118.76.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49987b2a176sm309622525e9.4.2026.08.17.14.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 14:55:11 -0700 (PDT) From: Georgi Valkov To: briannorris@chromium.org, johannes@sipsolutions.net, andrew@lunn.ch, krzk+dt@kernel.org Cc: francesco@dolcini.it, johannes.berg@intel.com, kees@kernel.org, miriam.rachel.korenblit@intel.com, wenst@chromium.org, rafael.beims@toradex.com, avraham.stern@intel.com, error27@gmail.com, s.kerkmann@pengutronix.de, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh@kernel.org, conor+dt@kernel.org, Frank.Li@nxp.com, chunfan.chen@gmail.com, linux-arm-kernel@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, stable@vger.kernel.org, gvalkov@gmail.com Subject: [PATCH v5 1/3] dt-bindings: net: wireless: add flag marvell,ignore-regulatory-hint Date: Tue, 18 Aug 2026 00:54:26 +0300 Message-ID: <20260817215428.84740-1-gvalkov@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit WRT3200ACM and WRT32x routers always report a fixed US regulatory domain from the mwifiex ROM, which conflicts with the platform regulatory configuration on units sold outside the US market. For example: - phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR - phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR - phy2 mwifiex 2.4 and 5 GHz, hard-coded region US When the system boots, it detects a conflict between the user selected region and the radios, e.g. BG FR US, and applies extreme restrictions, preventing use of 5 GHz and DFS channels. This also affects phy0. Add a device-tree flag, which allows affected platforms to ignore an incorrect regulatory hint from ROM, so userspace can set the correct platform regulatory domain. [1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699 [2] https://github.com/openwrt/openwrt/issues/9956 Cc: stable@vger.kernel.org Signed-off-by: Georgi Valkov --- v5: 1. description: remove tag Tested-on 2. add #address-cells = <1>, #size-cells = <0> to fix a warning: arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts:183.3-13: Warning (reg_format): /soc/internal-regs/sdhci@d8000/wifi@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) 3. description: add info about testing v4: 1. Add binding documentation for flag marvell,ignore-regulatory-hint 2. Add dt for sd8897 and move the flag there, I used sample from docs 3. Use device_property_read_bool in the driver v3: I implemented and tested a better approach with no board specific code: 1. check for a device-tree flag in mwifiex_register_cfg80211in() !of_property_read_bool(of_root, "marvell,ignore-regulatory-hint") 2. add this flag to the root device tree of each affected board Currently this affects only armada-385-linksys-rango.dts, because Linux has no dts for venom. OpenWrt will take care of that. This approach is more flexible and scalable, because the flag can also be used in other drivers, e.g. mwlwifi (not part of Linux). v2: Replace the compatible device names, which are currently only available on OpenWrt with board names which are available on both Linux and OpenWrt. .../devicetree/bindings/net/wireless/marvell,sd8787.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml b/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml index 930b700b73d0..5f235cb9f3e5 100644 --- a/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml +++ b/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml @@ -59,6 +59,12 @@ properties: description: Calibration data for sub-band 3 in the 5GHz band. maxItems: 502 + marvell,ignore-regulatory-hint: + $ref: /schemas/types.yaml#/definitions/flag + description: + Ignore an incorrect regulatory hint from ROM, + so userspace can set the correct regulatory domain. + marvell,wakeup-pin: $ref: /schemas/types.yaml#/definitions/uint32 description: -- 2.55.0