[PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi

Jingyi Wang posted 6 patches 1 week, 4 days ago
[PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Jingyi Wang 1 week, 4 days ago
From: Zijun Hu <zijun.hu@oss.qualcomm.com>

Enable bluetooth WCN785x and Wi-Fi on Kaanapali MTP board.

Co-developed-by: Yijie Yang <yijie.yang@oss.qualcomm.com>
Signed-off-by: Yijie Yang <yijie.yang@oss.qualcomm.com>
Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/kaanapali-mtp.dts | 121 +++++++++++++++++++++++++++++
 1 file changed, 121 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts b/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
index 5054c5933687..d0f3909621c9 100644
--- a/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
@@ -27,6 +27,7 @@ / {
 
 	aliases {
 		serial0 = &uart7;
+		serial1 = &uart18;
 	};
 
 	chosen {
@@ -189,6 +190,68 @@ wcd939x: audio-codec {
 
 		#sound-dai-cells = <1>;
 	};
+
+	wcn7850-pmu {
+		compatible = "qcom,wcn7850-pmu";
+
+		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
+		pinctrl-names = "default";
+
+		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
+		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
+
+		vdd-supply = <&vreg_s2j_0p8>;
+		vddio-supply = <&vreg_l2g_1p8>;
+		vddio1p2-supply = <&vreg_l3g_1p2>;
+		vddaon-supply = <&vreg_s7g_0p9>;
+		vdddig-supply = <&vreg_s1j_0p8>;
+		vddrfa1p2-supply = <&vreg_s7f_1p2>;
+		vddrfa1p8-supply = <&vreg_s8f_1p8>;
+
+		clocks = <&rpmhcc RPMH_RF_CLK1>;
+
+		regulators {
+			vreg_pmu_rfa_cmn: ldo0 {
+				regulator-name = "vreg_pmu_rfa_cmn";
+			};
+
+			vreg_pmu_aon_0p59: ldo1 {
+				regulator-name = "vreg_pmu_aon_0p59";
+			};
+
+			vreg_pmu_wlcx_0p8: ldo2 {
+				regulator-name = "vreg_pmu_wlcx_0p8";
+			};
+
+			vreg_pmu_wlmx_0p85: ldo3 {
+				regulator-name = "vreg_pmu_wlmx_0p85";
+			};
+
+			vreg_pmu_btcmx_0p85: ldo4 {
+				regulator-name = "vreg_pmu_btcmx_0p85";
+			};
+
+			vreg_pmu_rfa_0p8: ldo5 {
+				regulator-name = "vreg_pmu_rfa_0p8";
+			};
+
+			vreg_pmu_rfa_1p2: ldo6 {
+				regulator-name = "vreg_pmu_rfa_1p2";
+			};
+
+			vreg_pmu_rfa_1p8: ldo7 {
+				regulator-name = "vreg_pmu_rfa_1p8";
+			};
+
+			vreg_pmu_pcie_0p9: ldo8 {
+				regulator-name = "vreg_pmu_pcie_0p9";
+			};
+
+			vreg_pmu_pcie_1p8: ldo9 {
+				regulator-name = "vreg_pmu_pcie_1p8";
+			};
+		};
+	};
 };
 
 &apps_rsc {
@@ -827,6 +890,21 @@ &pcie0_phy {
 &pcie_port0 {
 	wake-gpios = <&tlmm 104 GPIO_ACTIVE_HIGH>;
 	reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>;
+
+	wifi@0 {
+		compatible = "pci17cb,1107";
+		reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
+		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
+		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
+	};
 };
 
 &pmh0101_flash {
@@ -880,6 +958,18 @@ led@3 {
 	};
 };
 
+&pmh0104_j_e1_gpios {
+	bt_default: bt-default-state {
+		pins = "gpio5";
+		function = "normal";
+		input-disable;
+		output-enable;
+		output-low;
+		bias-disable;
+		power-source = <1>;
+	};
+};
+
 &pon_resin {
 	linux,code = <KEY_VOLUMEDOWN>;
 
@@ -1011,6 +1101,19 @@ &tlmm {
 			       <119 2>, /* SoCCP */
 			       <144 4>; /* CXM UART */
 
+	wlan_en: wlan-en-state {
+		pins = "gpio16";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+
+	sw_ctrl_default: sw-ctrl-default-state {
+		pins = "gpio18";
+		function = "gpio";
+		bias-pull-down;
+	};
+
 	spkr_0_sd_n_active: spkr-0-sd-n-active-state {
 		pins = "gpio76";
 		function = "gpio";
@@ -1067,6 +1170,24 @@ &uart7 {
 	status = "okay";
 };
 
+&uart18 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,wcn7850-bt";
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
+
+		max-speed = <3200000>;
+	};
+};
+
 &ufs_mem_hc {
 	reset-gpios = <&tlmm 217 GPIO_ACTIVE_LOW>;
 

-- 
2.25.1
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 1 week, 3 days ago
On Sun, Mar 22, 2026 at 11:19:44PM -0700, Jingyi Wang wrote:
> From: Zijun Hu <zijun.hu@oss.qualcomm.com>
> 
> Enable bluetooth WCN785x and Wi-Fi on Kaanapali MTP board.
> 
> Co-developed-by: Yijie Yang <yijie.yang@oss.qualcomm.com>
> Signed-off-by: Yijie Yang <yijie.yang@oss.qualcomm.com>
> Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/kaanapali-mtp.dts | 121 +++++++++++++++++++++++++++++
>  1 file changed, 121 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts b/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
> index 5054c5933687..d0f3909621c9 100644
> --- a/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/kaanapali-mtp.dts
> @@ -27,6 +27,7 @@ / {
>  
>  	aliases {
>  		serial0 = &uart7;
> +		serial1 = &uart18;
>  	};
>  
>  	chosen {
> @@ -189,6 +190,68 @@ wcd939x: audio-codec {
>  
>  		#sound-dai-cells = <1>;
>  	};
> +
> +	wcn7850-pmu {
> +		compatible = "qcom,wcn7850-pmu";
> +
> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
> +		pinctrl-names = "default";
> +
> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;

swctrl-gpios?

> +
> +		vdd-supply = <&vreg_s2j_0p8>;
> +		vddio-supply = <&vreg_l2g_1p8>;
> +		vddio1p2-supply = <&vreg_l3g_1p2>;
> +		vddaon-supply = <&vreg_s7g_0p9>;
> +		vdddig-supply = <&vreg_s1j_0p8>;
> +		vddrfa1p2-supply = <&vreg_s7f_1p2>;
> +		vddrfa1p8-supply = <&vreg_s8f_1p8>;
> +
> +		clocks = <&rpmhcc RPMH_RF_CLK1>;
> +

-- 
With best wishes
Dmitry
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Zijun Hu 1 week, 2 days ago
On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
>> +
>> +	wcn7850-pmu {
>> +		compatible = "qcom,wcn7850-pmu";
>> +
>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
>> +		pinctrl-names = "default";
>> +
>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
> swctrl-gpios?

it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
the input pin is not used by power sequencing driver.
just give it some default configurations here.
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 1 week, 2 days ago
On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
> >> +
> >> +	wcn7850-pmu {
> >> +		compatible = "qcom,wcn7850-pmu";
> >> +
> >> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
> >> +		pinctrl-names = "default";
> >> +
> >> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
> >> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
> > swctrl-gpios?
> 
> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
> the input pin is not used by power sequencing driver.
> just give it some default configurations here.

Please don't mix hardware description and the driver. If the pin is
wired, let's describe it in DT.

-- 
With best wishes
Dmitry
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Zijun Hu 1 week, 2 days ago
On 3/25/2026 3:08 PM, Dmitry Baryshkov wrote:
> On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
>> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
>>>> +
>>>> +	wcn7850-pmu {
>>>> +		compatible = "qcom,wcn7850-pmu";
>>>> +
>>>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
>>>> +		pinctrl-names = "default";
>>>> +
>>>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
>>>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
>>> swctrl-gpios?
>>
>> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
>> the input pin is not used by power sequencing driver.
>> just give it some default configurations here.
> 
> Please don't mix hardware description and the driver. If the pin is
> wired, let's describe it in DT.
> 

give comments about that pin in this dts file ?
or give a seperated patch to describe the pin in DT binding schema of "qcom,wcn7850-pmu"?
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 1 week, 2 days ago
On Wed, Mar 25, 2026 at 06:59:41PM +0800, Zijun Hu wrote:
> On 3/25/2026 3:08 PM, Dmitry Baryshkov wrote:
> > On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
> >> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
> >>>> +
> >>>> +	wcn7850-pmu {
> >>>> +		compatible = "qcom,wcn7850-pmu";
> >>>> +
> >>>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
> >>>> +		pinctrl-names = "default";
> >>>> +
> >>>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
> >>>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
> >>> swctrl-gpios?
> >>
> >> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
> >> the input pin is not used by power sequencing driver.
> >> just give it some default configurations here.
> > 
> > Please don't mix hardware description and the driver. If the pin is
> > wired, let's describe it in DT.
> > 
> 
> give comments about that pin in this dts file ?
> or give a seperated patch to describe the pin in DT binding schema of "qcom,wcn7850-pmu"?

It is there, as far as I remember.

$ grep swctrl Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml
  swctrl-gpios:

-- 
With best wishes
Dmitry
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Zijun Hu 1 week, 1 day ago
On 3/25/2026 7:40 PM, Dmitry Baryshkov wrote:
>> On 3/25/2026 3:08 PM, Dmitry Baryshkov wrote:
>>> On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
>>>> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
>>>>>> +
>>>>>> +	wcn7850-pmu {
>>>>>> +		compatible = "qcom,wcn7850-pmu";
>>>>>> +
>>>>>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
>>>>>> +		pinctrl-names = "default";
>>>>>> +
>>>>>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
>>>>>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
>>>>> swctrl-gpios?
>>>> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
>>>> the input pin is not used by power sequencing driver.
>>>> just give it some default configurations here.
>>> Please don't mix hardware description and the driver. If the pin is
>>> wired, let's describe it in DT.
>>>
>> give comments about that pin in this dts file ?
>> or give a seperated patch to describe the pin in DT binding schema of "qcom,wcn7850-pmu"?
> It is there, as far as I remember.
> 
> $ grep swctrl Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml
>   swctrl-gpios:

swctrl-gpios may be not applicable for 'qcom,wcn7850-pmu' since there is no 'qcom,wcn7850-pmu' node
which configures 'swctrl-gpios' within upstream DT tree.
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 1 week, 1 day ago
On Thu, Mar 26, 2026 at 11:19:27AM +0800, Zijun Hu wrote:
> On 3/25/2026 7:40 PM, Dmitry Baryshkov wrote:
> >> On 3/25/2026 3:08 PM, Dmitry Baryshkov wrote:
> >>> On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
> >>>> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
> >>>>>> +
> >>>>>> +	wcn7850-pmu {
> >>>>>> +		compatible = "qcom,wcn7850-pmu";
> >>>>>> +
> >>>>>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
> >>>>>> +		pinctrl-names = "default";
> >>>>>> +
> >>>>>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
> >>>>>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
> >>>>> swctrl-gpios?
> >>>> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
> >>>> the input pin is not used by power sequencing driver.
> >>>> just give it some default configurations here.
> >>> Please don't mix hardware description and the driver. If the pin is
> >>> wired, let's describe it in DT.
> >>>
> >> give comments about that pin in this dts file ?
> >> or give a seperated patch to describe the pin in DT binding schema of "qcom,wcn7850-pmu"?
> > It is there, as far as I remember.
> > 
> > $ grep swctrl Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml
> >   swctrl-gpios:
> 
> swctrl-gpios may be not applicable for 'qcom,wcn7850-pmu' since there is no 'qcom,wcn7850-pmu' node
> which configures 'swctrl-gpios' within upstream DT tree.

It's a wrong way to check it.
Instead follow these steps:
- Is the pin defined in the datasheet?
- Is the pin defined in the schema?
- Is the pin wired in the hardware?

-- 
With best wishes
Dmitry
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Zijun Hu 1 week, 1 day ago
On 3/26/2026 12:10 PM, Dmitry Baryshkov wrote:
>> 3/25/2026 7:40 PM, Dmitry Baryshkov wrote:
>>>> On 3/25/2026 3:08 PM, Dmitry Baryshkov wrote:
>>>>> On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
>>>>>> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
>>>>>>>> +
>>>>>>>> +	wcn7850-pmu {
>>>>>>>> +		compatible = "qcom,wcn7850-pmu";
>>>>>>>> +
>>>>>>>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
>>>>>>>> +		pinctrl-names = "default";
>>>>>>>> +
>>>>>>>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
>>>>>>>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
>>>>>>> swctrl-gpios?
>>>>>> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
>>>>>> the input pin is not used by power sequencing driver.
>>>>>> just give it some default configurations here.
>>>>> Please don't mix hardware description and the driver. If the pin is
>>>>> wired, let's describe it in DT.
>>>>>
>>>> give comments about that pin in this dts file ?
>>>> or give a seperated patch to describe the pin in DT binding schema of "qcom,wcn7850-pmu"?
>>> It is there, as far as I remember.
>>>
>>> $ grep swctrl Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml
>>>   swctrl-gpios:
>> swctrl-gpios may be not applicable for 'qcom,wcn7850-pmu' since there is no 'qcom,wcn7850-pmu' node
>> which configures 'swctrl-gpios' within upstream DT tree.
> It's a wrong way to check it.
> Instead follow these steps:
> - Is the pin defined in the datasheet?
datasheet define this pin SW_CTRL with description 
"Switch request to the external PMU between active and sleep mode"

> - Is the pin defined in the schema?

schema define property 'swctrl-gpios' with description
"GPIO line indicating the state of the clock supply to the BT module"

> - Is the pin wired in the hardware?
pin SW_CTRL is wired in hardware.

i have below confusions about 'swctrl-gpios' of 'qcom,wcn7850-pmu'
which WCN7850 pin is 'swctrl-gpios' mean for ?
Why to introduce 'swctrl-gpios' ?
what problem does it solve ?
how to solve the problem ?
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 4 days, 10 hours ago
On Thu, Mar 26, 2026 at 01:15:44PM +0800, Zijun Hu wrote:
> On 3/26/2026 12:10 PM, Dmitry Baryshkov wrote:
> >> 3/25/2026 7:40 PM, Dmitry Baryshkov wrote:
> >>>> On 3/25/2026 3:08 PM, Dmitry Baryshkov wrote:
> >>>>> On Wed, Mar 25, 2026 at 02:40:19PM +0800, Zijun Hu wrote:
> >>>>>> On 3/24/2026 9:16 AM, Dmitry Baryshkov wrote:
> >>>>>>>> +
> >>>>>>>> +	wcn7850-pmu {
> >>>>>>>> +		compatible = "qcom,wcn7850-pmu";
> >>>>>>>> +
> >>>>>>>> +		pinctrl-0 = <&bt_default>, <&sw_ctrl_default>, <&wlan_en>;
> >>>>>>>> +		pinctrl-names = "default";
> >>>>>>>> +
> >>>>>>>> +		bt-enable-gpios = <&pmh0104_j_e1_gpios 5 GPIO_ACTIVE_HIGH>;
> >>>>>>>> +		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
> >>>>>>> swctrl-gpios?
> >>>>>> it is '<&sw_ctrl_default>' within 'pinctrl-0' above.
> >>>>>> the input pin is not used by power sequencing driver.
> >>>>>> just give it some default configurations here.
> >>>>> Please don't mix hardware description and the driver. If the pin is
> >>>>> wired, let's describe it in DT.
> >>>>>
> >>>> give comments about that pin in this dts file ?
> >>>> or give a seperated patch to describe the pin in DT binding schema of "qcom,wcn7850-pmu"?
> >>> It is there, as far as I remember.
> >>>
> >>> $ grep swctrl Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml
> >>>   swctrl-gpios:
> >> swctrl-gpios may be not applicable for 'qcom,wcn7850-pmu' since there is no 'qcom,wcn7850-pmu' node
> >> which configures 'swctrl-gpios' within upstream DT tree.
> > It's a wrong way to check it.
> > Instead follow these steps:
> > - Is the pin defined in the datasheet?
> datasheet define this pin SW_CTRL with description 
> "Switch request to the external PMU between active and sleep mode"
> 
> > - Is the pin defined in the schema?
> 
> schema define property 'swctrl-gpios' with description
> "GPIO line indicating the state of the clock supply to the BT module"
> 
> > - Is the pin wired in the hardware?
> pin SW_CTRL is wired in hardware.

Granted your three answers, it can and should be described in the DT.

> 
> i have below confusions about 'swctrl-gpios' of 'qcom,wcn7850-pmu'
> which WCN7850 pin is 'swctrl-gpios' mean for ?
> Why to introduce 'swctrl-gpios' ?
> what problem does it solve ?
> how to solve the problem ?

Please descibe the hardware in the DT. Problem solving belongs to the
driver.

-- 
With best wishes
Dmitry
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Zijun Hu 2 days, 11 hours ago
On 3/30/2026 7:53 PM, Dmitry Baryshkov wrote:
>>> - Is the pin defined in the schema?
>> schema define property 'swctrl-gpios' with description
>> "GPIO line indicating the state of the clock supply to the BT module"
>>
>>> - Is the pin wired in the hardware?
>> pin SW_CTRL is wired in hardware.
> Granted your three answers, it can and should be described in the DT.
> 
>> i have below confusions about 'swctrl-gpios' of 'qcom,wcn7850-pmu'
>> which WCN7850 pin is 'swctrl-gpios' mean for ?
>> Why to introduce 'swctrl-gpios' ?
>> what problem does it solve ?
>> how to solve the problem ?
> Please descibe the hardware in the DT. Problem solving belongs to the
> driver.

sorry for not agreeing with your points here.

it is better to correct or remove 'swctrl-gpios' within DT binding spec at least
for 'qcom,wcn7850-pmu' with below reasons:

1) provided that 'swctrl-gpios' is for pin SW_CTRL of datasheet, binding spec's
   both description and its expected usage are wrong.
2) its driver does not parse and use the property 'swctrl-gpios', moreover, the
   property have no user within upstream DT tree.
3) the property is not mandatory based on binding spec.
4) upstream DT tree have had many such usages as mine which just set default pin
   configuration and not specify 'swctrl-gpios' explicitly.
5) kaanapali-mtp is originally preinstalled with android OS which supports some
   qualcomm specific feature which have not been supported by up-stream kernel.
   so kaanapali-mtp H/W has some wired pins which is not used by up-stream 
   kernel sometimes
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 2 days, 11 hours ago
On Wed, Apr 01, 2026 at 06:39:19PM +0800, Zijun Hu wrote:
> On 3/30/2026 7:53 PM, Dmitry Baryshkov wrote:
> >>> - Is the pin defined in the schema?
> >> schema define property 'swctrl-gpios' with description
> >> "GPIO line indicating the state of the clock supply to the BT module"
> >>
> >>> - Is the pin wired in the hardware?
> >> pin SW_CTRL is wired in hardware.
> > Granted your three answers, it can and should be described in the DT.
> > 
> >> i have below confusions about 'swctrl-gpios' of 'qcom,wcn7850-pmu'
> >> which WCN7850 pin is 'swctrl-gpios' mean for ?
> >> Why to introduce 'swctrl-gpios' ?
> >> what problem does it solve ?
> >> how to solve the problem ?
> > Please descibe the hardware in the DT. Problem solving belongs to the
> > driver.
> 
> sorry for not agreeing with your points here.
> 
> it is better to correct or remove 'swctrl-gpios' within DT binding spec at least
> for 'qcom,wcn7850-pmu' with below reasons:
> 
> 1) provided that 'swctrl-gpios' is for pin SW_CTRL of datasheet, binding spec's
>    both description and its expected usage are wrong.

Please correct it.

> 2) its driver does not parse and use the property 'swctrl-gpios', moreover, the
>    property have no user within upstream DT tree.

There is no "driver" in the "DT bindings"

> 3) the property is not mandatory based on binding spec.

Which is expected, because on some platforms it might be not wired up
and on the other platforms the pin to which it is wired to might be
unknown (think about all the phones for which the community doesn't have
schematics).

> 4) upstream DT tree have had many such usages as mine which just set default pin
>    configuration and not specify 'swctrl-gpios' explicitly.

I don't understand this part.

> 5) kaanapali-mtp is originally preinstalled with android OS which supports some
>    qualcomm specific feature which have not been supported by up-stream kernel.
>    so kaanapali-mtp H/W has some wired pins which is not used by up-stream 
>    kernel sometimes

Again, what does that have to do with the hardware description?

-- 
With best wishes
Dmitry
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Zijun Hu 2 days, 9 hours ago
On 4/1/2026 7:08 PM, Dmitry Baryshkov wrote:
>>>>> - Is the pin wired in the hardware?
>>>> pin SW_CTRL is wired in hardware.
>>> Granted your three answers, it can and should be described in the DT.
>>>
>>>> i have below confusions about 'swctrl-gpios' of 'qcom,wcn7850-pmu'
>>>> which WCN7850 pin is 'swctrl-gpios' mean for ?
>>>> Why to introduce 'swctrl-gpios' ?
>>>> what problem does it solve ?
>>>> how to solve the problem ?
>>> Please descibe the hardware in the DT. Problem solving belongs to the
>>> driver.
>> sorry for not agreeing with your points here.
>>
>> it is better to correct or remove 'swctrl-gpios' within DT binding spec at least
>> for 'qcom,wcn7850-pmu' with below reasons:
>>
>> 1) provided that 'swctrl-gpios' is for pin SW_CTRL of datasheet, binding spec's
>>    both description and its expected usage are wrong.
> Please correct it.
> 
>> 2) its driver does not parse and use the property 'swctrl-gpios', moreover, the
>>    property have no user within upstream DT tree.
> There is no "driver" in the "DT bindings"
> 

'its driver' i mean here is the driver which drives the device which is generated
by this DT node 'qcom,wcn7850-pmu'.
source code of the driver is drivers/power/sequencing/pwrseq-qcom-wcn.c

>> 3) the property is not mandatory based on binding spec.
> Which is expected, because on some platforms it might be not wired up
> and on the other platforms the pin to which it is wired to might be
> unknown (think about all the phones for which the community doesn't have
> schematics).
> 

got your points and will explain mine at below 2) together.

>> 4) upstream DT tree have had many such usages as mine which just set default pin
>>    configuration and not specify 'swctrl-gpios' explicitly.
> I don't understand this part.
> 

For DT node 'qcom,wcn7850-pmu' of products identified by the following dts file at least:

wcn7850-pmu {
	compatible = "qcom,wcn7850-pmu";

        pinctrl-names = "default";   // config SW_CTRL pin default settings, but
        pinctrl-0 = ....;            // this DT node does not specify property 'swctrl-gpios'.
	....		
}


grep -l -r "qcom,wcn7850-pmu" arch/arm64/boot/dts/qcom/ | xargs grep -l -r "sw[_-]ctrl"
arch/arm64/boot/dts/qcom/sm8550-hdk.dts
arch/arm64/boot/dts/qcom/sm8650-qrd.dts
arch/arm64/boot/dts/qcom/sm8750-mtp.dts
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts
arch/arm64/boot/dts/qcom/sm8550-qrd.dts
arch/arm64/boot/dts/qcom/sm8650-hdk.dts


>> 5) kaanapali-mtp is originally preinstalled with android OS which supports some
>>    qualcomm specific feature which have not been supported by up-stream kernel.
>>    so kaanapali-mtp H/W has some wired pins which is not used by up-stream 
>>    kernel sometimes
> Again, what does that have to do with the hardware description?

kaanapali-mtp hardware supports the feature pin SW_CTRL involved, but we can decide
not to enable the feature based on requirements.

any advise about how to correct DTS to not enable the feature SW_CTRL involved ?
Re: [PATCH 4/6] arm64: dts: qcom: kaanapali-mtp: Enable bluetooth and Wifi
Posted by Dmitry Baryshkov 2 days, 8 hours ago
On Wed, Apr 01, 2026 at 09:34:16PM +0800, Zijun Hu wrote:
> On 4/1/2026 7:08 PM, Dmitry Baryshkov wrote:
> >>>>> - Is the pin wired in the hardware?
> >>>> pin SW_CTRL is wired in hardware.
> >>> Granted your three answers, it can and should be described in the DT.
> >>>
> >>>> i have below confusions about 'swctrl-gpios' of 'qcom,wcn7850-pmu'
> >>>> which WCN7850 pin is 'swctrl-gpios' mean for ?
> >>>> Why to introduce 'swctrl-gpios' ?
> >>>> what problem does it solve ?
> >>>> how to solve the problem ?
> >>> Please descibe the hardware in the DT. Problem solving belongs to the
> >>> driver.
> >> sorry for not agreeing with your points here.
> >>
> >> it is better to correct or remove 'swctrl-gpios' within DT binding spec at least
> >> for 'qcom,wcn7850-pmu' with below reasons:
> >>
> >> 1) provided that 'swctrl-gpios' is for pin SW_CTRL of datasheet, binding spec's
> >>    both description and its expected usage are wrong.
> > Please correct it.
> > 
> >> 2) its driver does not parse and use the property 'swctrl-gpios', moreover, the
> >>    property have no user within upstream DT tree.
> > There is no "driver" in the "DT bindings"
> > 
> 
> 'its driver' i mean here is the driver which drives the device which is generated
> by this DT node 'qcom,wcn7850-pmu'.
> source code of the driver is drivers/power/sequencing/pwrseq-qcom-wcn.c

DT describes the hardware. The driver behaviour is not that relevant
here.

> 
> >> 3) the property is not mandatory based on binding spec.
> > Which is expected, because on some platforms it might be not wired up
> > and on the other platforms the pin to which it is wired to might be
> > unknown (think about all the phones for which the community doesn't have
> > schematics).
> > 
> 
> got your points and will explain mine at below 2) together.
> 
> >> 4) upstream DT tree have had many such usages as mine which just set default pin
> >>    configuration and not specify 'swctrl-gpios' explicitly.
> > I don't understand this part.
> > 
> 
> For DT node 'qcom,wcn7850-pmu' of products identified by the following dts file at least:
> 
> wcn7850-pmu {
> 	compatible = "qcom,wcn7850-pmu";
> 
>         pinctrl-names = "default";   // config SW_CTRL pin default settings, but
>         pinctrl-0 = ....;            // this DT node does not specify property 'swctrl-gpios'.
> 	....		
> }
> 
> 
> grep -l -r "qcom,wcn7850-pmu" arch/arm64/boot/dts/qcom/ | xargs grep -l -r "sw[_-]ctrl"
> arch/arm64/boot/dts/qcom/sm8550-hdk.dts
> arch/arm64/boot/dts/qcom/sm8650-qrd.dts
> arch/arm64/boot/dts/qcom/sm8750-mtp.dts
> arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts
> arch/arm64/boot/dts/qcom/sm8550-qrd.dts
> arch/arm64/boot/dts/qcom/sm8650-hdk.dts

So, let's fix them too.

> >> 5) kaanapali-mtp is originally preinstalled with android OS which supports some
> >>    qualcomm specific feature which have not been supported by up-stream kernel.
> >>    so kaanapali-mtp H/W has some wired pins which is not used by up-stream 
> >>    kernel sometimes
> > Again, what does that have to do with the hardware description?
> 
> kaanapali-mtp hardware supports the feature pin SW_CTRL involved, but we can decide
> not to enable the feature based on requirements.
> 
> any advise about how to correct DTS to not enable the feature SW_CTRL involved ?

You can enable or disable something in the driver. It doesn't change the
way the chip is wired (that's what DT describes).


-- 
With best wishes
Dmitry