public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: "Bryan O'Donoghue" <bod.linux@nxsw.ie>,
	jerome.debretagne@gmail.com,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Maximilian Luz" <luzmaximilian@gmail.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Jeff Johnson" <jjohnson@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, ath12k@lists.infradead.org,
	"Jeff Johnson" <jeff.johnson@oss.qualcomm.com>,
	"Dale Whinham" <daleyo@gmail.com>
Subject: Re: [PATCH v5 2/7] dt-bindings: wireless: ieee80211: Add disable-rfkill property
Date: Mon, 22 Dec 2025 13:41:48 +0100	[thread overview]
Message-ID: <2ff993a7-0fda-4337-9acc-92aaa75be750@kernel.org> (raw)
In-Reply-To: <v4hxei4t7n6ebvw6heoccei2t3mskq7uo7zejv6dyvvq5fr5sv@xzpsiic5x7a4>

Hi Mani,

On 22-Dec-25 12:45, Manivannan Sadhasivam wrote:
> On Mon, Dec 22, 2025 at 11:23:18AM +0100, Hans de Goede wrote:
>> +Cc Mani
>>
>> Hi,
>>
>> On 20-Dec-25 07:04, Bryan O'Donoghue wrote:
>>> On 20/12/2025 00:21, Jérôme de Bretagne via B4 Relay wrote:
>>>> From: Jérôme de Bretagne <jerome.debretagne@gmail.com>
>>>>
>>>> For some devices, Wi-Fi is entirely hard blocked by default making
>>>> the Wi-Fi radio unusable, except if rfkill is disabled as expected
>>>> on those models.
>>>>
>>>> Commit c6a7c0b09d5f ("wifi: ath12k: Add Support for enabling or
>>>> disabling specific features based on ACPI bitflag") added a way to
>>>> support features set via ACPI, including the DISABLE_RFKILL bit.
>>>>
>>>> Add a disable-rfkill property to expose the DISABLE_RFKILL bit
>>>> equivalent for devices described by a Devicetree instead of ACPI.
>>>>
>>>> Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
>>>> ---
>>>>   Documentation/devicetree/bindings/net/wireless/ieee80211.yaml | 6 ++++++
>>>>   1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
>>>> index d89f7a3f88a71d45d6f4ab2ae909eae09cbcaf9a..c10a4675640be947cd0b5eaec2c7ff367fd93945 100644
>>>> --- a/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/wireless/ieee80211.yaml
>>>> @@ -29,6 +29,12 @@ properties:
>>>>         different 5 GHz subbands. Using them incorrectly could not work or
>>>>         decrease performance noticeably
>>>>
>>>> +  disable-rfkill:
>>>> +    type: boolean
>>>> +    description:
>>>> +      Disable rfkill for some devices on which Wi-Fi would be entirely hard
>>>> +      blocked by default otherwise
>>>> +
>>>>   additionalProperties: true
>>>>
>>>>   examples:
>>>>
>>>> -- 
>>>> 2.47.3
>>>>
>>>>
>>>>
>>>
>>> Is this really a hardware description though ?
>>
>> I would say yes it is. The wifi chip has an rfkill input pin and
>> things will be broken when that pin is hardwired to a fixed value
>> rather then being actually connected to a GPIO from say
>> the embedded controller.
>>
> 
> IIUC, even if the M.2 slot has the W_DISABLE1# signal routed from the host,
> the device won't make use of it as there is no physical connection. So you want
> the WLAN driver to change the state through SW?
> 
>> So I think that we would need here is not a disable-rfkill property
>> but some way to indicate in the DT-node that the rfkill input pin
>> is not connected and thus should be ignored.
>>
>> This (the rfkill input pin being not-connected) IMHO very much
>> is hw-description.
>>
> 
> Though we can argue this way, I would prefer to handle it in the driver. For
> example, with my M.2 series, we will end up describing the M.2 slot:
> 
> 	connector {
> 		compatible = "pcie-m2-e-connector";
> 		w-disable1-gpios = <&tlmm 117 GPIO_ACTIVE_LOW>;
> 		...
> 		ports {
> 			...
> 			endpoint@0 {
> 				reg = <0>;
> 				remote-endpoint = <&pcie4_port0_ep>;
> 			};
> 		};
> 	};
> 
> Then if we use a DT property to convey the RFKILL pin state of the device, we
> would need to describe the endpoint device in DT and hardcode the state:
> 
> 	&pcie4_port0 {
> 		...
> 		port {
> 			pcie4_port0_ep: endpoint {
> 				remote-endpoint = <&m2_e_pcie_ep>;
> 				disable-rfkill;
> 			};
> 		};
> 	};
> 
> So this will essentially make the M.2 device non-swappable unless you change the
> DT since you've how hardcoded the device property in the binding. This is
> something I try to avoid to make the M.2 slot really swappable.
> 
> For this reason, I would prefer to handle the RFKILL state in the WLAN driver
> using the device specific compatible. This will be problematic only if multiple
> cards of the same Device ID have different RFKILL state and the devices are not
> distinguishable even with sub IDs.

I think we're miscommunicating here. I'm not talking about the card having
a broken rfkill implementation, I'm talking about the M.2 slot on the mainboard
having e.g. W_DISABLE1# hardwired in such a way that cards would interpret it as
having to always disable their wifi radio which is very similar to what is
happening on the surface device. Except that on the Surface there is no M.2 slot,
the wifi is just soldered onto the mainboard I believe.

Based on experience I'm pretty sure we will encounter M.2 slots which such
a hardwired W_DISABLE1# signal sooner rather then later.

So my proposal is to come up with a generic way to solve the broken M.2 slot
case and then apply that to the Surface case.

Regards,

Hans



  reply	other threads:[~2025-12-22 12:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20  0:21 [PATCH v5 0/7] Microsoft Surface Pro 11 support Jérôme de Bretagne via B4 Relay
2025-12-20  0:21 ` [PATCH v5 1/7] dt-bindings: arm: qcom: Document Microsoft Surface Pro 11 Jérôme de Bretagne via B4 Relay
2025-12-20  9:12   ` Krzysztof Kozlowski
2025-12-20  0:21 ` [PATCH v5 2/7] dt-bindings: wireless: ieee80211: Add disable-rfkill property Jérôme de Bretagne via B4 Relay
2025-12-20  6:04   ` Bryan O'Donoghue
2025-12-20  9:12     ` Krzysztof Kozlowski
2025-12-20 14:02       ` Jérôme de Bretagne
2025-12-20 16:05       ` Dmitry Baryshkov
2025-12-22 10:06         ` Konrad Dybcio
2025-12-22 10:23     ` Hans de Goede
2025-12-22 11:04       ` Krzysztof Kozlowski
2025-12-22 11:45       ` Manivannan Sadhasivam
2025-12-22 12:41         ` Hans de Goede [this message]
2025-12-22 13:41           ` Manivannan Sadhasivam
2025-12-22 14:22             ` Hans de Goede
2025-12-23  6:31               ` Manivannan Sadhasivam
2025-12-23  9:23                 ` Jérôme de Bretagne
2025-12-20  0:22 ` [PATCH v5 3/7] dt-bindings: wireless: ath12k: Allow " Jérôme de Bretagne via B4 Relay
2025-12-20  0:22 ` [PATCH v5 4/7] firmware: qcom: scm: allow QSEECOM on Surface Pro 11 Jérôme de Bretagne via B4 Relay
2025-12-20  0:22 ` [PATCH v5 5/7] platform/surface: aggregator_registry: Add Surface Pro 11 (QCOM) Jérôme de Bretagne via B4 Relay
2025-12-20  0:22 ` [PATCH v5 6/7] arm64: dts: qcom: Add support for Surface Pro 11 Jérôme de Bretagne via B4 Relay
2025-12-20  0:22 ` [PATCH v5 7/7] wifi: ath12k: Add support for disabling rfkill via devicetree Jérôme de Bretagne via B4 Relay
2025-12-20  6:07   ` Bryan O'Donoghue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ff993a7-0fda-4337-9acc-92aaa75be750@kernel.org \
    --to=hansg@kernel.org \
    --cc=andersson@kernel.org \
    --cc=ath12k@lists.infradead.org \
    --cc=bod.linux@nxsw.ie \
    --cc=conor+dt@kernel.org \
    --cc=daleyo@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=jerome.debretagne@gmail.com \
    --cc=jjohnson@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=mani@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox