diff mbox series

[v3] arm64: dts: qcom: sc7280: Add bluetooth node on SC7280

Message ID 1638857623-32379-1-git-send-email-bgodavar@codeaurora.org (mailing list archive)
State Handled Elsewhere
Headers show
Series [v3] arm64: dts: qcom: sc7280: Add bluetooth node on SC7280 | expand

Checks

Context Check Description
tedd_an/checkpatch fail [v3] arm64: dts: qcom: sc7280: Add bluetooth node on SC7280\WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: Balakrishna Godavarthi <bgodavar@codeauroa.org>' != 'Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>' total: 0 errors, 1 warnings, 81 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/12661071.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/gitlint success Gitlint PASS
tedd_an/buildkernel success Build Kernel PASS
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 493, Passed: 493 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Balakrishna Godavarthi Dec. 7, 2021, 6:13 a.m. UTC
From: Balakrishna Godavarthi <bgodavar@codeauroa.org>

Add bluetooth SoC WCN6750 node for SC7280 IDP boards.

Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
---
v3:
  * Addressed reviewers comments
  * Added pin config for sw_ctrl line.
v2:
  * merged two patches into one
  * Removed unused comments
  * Removed pinmux & pin conf.
  * Addressed reviewers comments

v1: initial patch
---
 arch/arm64/boot/dts/qcom/sc7280-idp.dts  |  4 ++++
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 37 ++++++++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc7280-idp2.dts |  4 ++++
 3 files changed, 45 insertions(+)

Comments

Matthias Kaehlcke Dec. 7, 2021, 2:48 p.m. UTC | #1
On Tue, Dec 07, 2021 at 11:43:43AM +0530, Balakrishna Godavarthi wrote:

> Subject: arm64: dts: qcom: sc7280: Add bluetooth node on SC7280

nit: the node is added to the IDP boards, not sc7280 in general

> From: Balakrishna Godavarthi <bgodavar@codeauroa.org>
> 
> Add bluetooth SoC WCN6750 node for SC7280 IDP boards.
> 
> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> ---
> v3:
>   * Addressed reviewers comments

that's not overly useful, instead you should describe what changed

>   * Added pin config for sw_ctrl line.
> v2:
>   * merged two patches into one
>   * Removed unused comments
>   * Removed pinmux & pin conf.
>   * Addressed reviewers comments
> 
> v1: initial patch
> ---
>  arch/arm64/boot/dts/qcom/sc7280-idp.dts  |  4 ++++
>  arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 37 ++++++++++++++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/sc7280-idp2.dts |  4 ++++
>  3 files changed, 45 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
> index 9b991ba..19bd228 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
> @@ -56,6 +56,10 @@
>  	};
>  };
>  
> +&bluetooth {
> +	vddio-supply = <&vreg_l19b_1p8>;
> +};
> +
>  &ipa {
>  	status = "okay";
>  	modem-init;
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> index d623d71..b8b00dc 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> @@ -14,6 +14,11 @@
>  #include "pmk8350.dtsi"
>  
>  / {
> +	aliases {
> +		bluetooth0 = &bluetooth;
> +		serial1 = &uart7;
> +	};
> +
>  	gpio-keys {
>  		compatible = "gpio-keys";
>  		label = "gpio-keys";
> @@ -422,6 +427,23 @@
>  				<&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
>  	pinctrl-names = "default", "sleep";
>  	pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
> +
> +	bluetooth: bluetooth {
> +		compatible = "qcom,wcn6750-bt";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&bt_en>, <&swctrl_gpio>;
> +		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
> +		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
> +		vddaon-supply = <&vreg_s7b_0p9>;
> +		vddbtcxmx-supply = <&vreg_s7b_0p9>;
> +		vddrfacmn-supply = <&vreg_s7b_0p9>;
> +		vddrfa0p8-supply = <&vreg_s7b_0p9>;
> +		vddrfa1p7-supply = <&vreg_s1b_1p8>;
> +		vddrfa1p2-supply = <&vreg_s8b_1p2>;
> +		vddrfa2p2-supply = <&vreg_s1c_2p2>;
> +		vddasd-supply = <&vreg_l11c_2p8>;
> +		max-speed = <3200000>;
> +	};
>  };
>  
>  /* PINCTRL - additions to nodes defined in sc7280.dtsi */
> @@ -491,6 +513,14 @@
>  };
>  
>  &tlmm {
> +	bt_en: bt-en {
> +		pins = "gpio85";
> +		function = "gpio";
> +		drive-strength = <2>;

is it really necessary to specify the drive strength?

Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml:

  drive-strength:
    enum: [2, 4, 6, 8, 10, 12, 14, 16]
    default: 2

The default is 2, so it shouldn't be needed.

> +		output-low;
> +		bias-disable;
> +	};
> +
>  	nvme_pwren: nvme-pwren {
>  		function = "gpio";
>  	};
> @@ -554,6 +584,13 @@
>  		 */
>  		bias-pull-up;
>  	};
> +
> +	swctrl_gpio: swctrl-gpio {

The 'gpio' suffix isn't really useful.

I suggest to use the signal name from the schematics "mos-sw-ctrl" or
call it "bt-sw-ctrl". If you use the schematic name then this should
be also done for the enable pin.
Balakrishna Godavarthi Dec. 15, 2021, 4:55 p.m. UTC | #2
Hi Matthias,

On 2021-12-07 20:18, Matthias Kaehlcke wrote:
> On Tue, Dec 07, 2021 at 11:43:43AM +0530, Balakrishna Godavarthi wrote:
> 
>> Subject: arm64: dts: qcom: sc7280: Add bluetooth node on SC7280
> 
> nit: the node is added to the IDP boards, not sc7280 in general
> 
[Bala]: will update it.

>> From: Balakrishna Godavarthi <bgodavar@codeauroa.org>
>> 
>> Add bluetooth SoC WCN6750 node for SC7280 IDP boards.
>> 
>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
>> ---
>> v3:
>>   * Addressed reviewers comments
> 
> that's not overly useful, instead you should describe what changed
> 
>>   * Added pin config for sw_ctrl line.
>> v2:
>>   * merged two patches into one
>>   * Removed unused comments
>>   * Removed pinmux & pin conf.
>>   * Addressed reviewers comments
>> 
>> v1: initial patch
>> ---
>>  arch/arm64/boot/dts/qcom/sc7280-idp.dts  |  4 ++++
>>  arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 37 
>> ++++++++++++++++++++++++++++++++
>>  arch/arm64/boot/dts/qcom/sc7280-idp2.dts |  4 ++++
>>  3 files changed, 45 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts 
>> b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
>> index 9b991ba..19bd228 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
>> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
>> @@ -56,6 +56,10 @@
>>  	};
>>  };
>> 
>> +&bluetooth {
>> +	vddio-supply = <&vreg_l19b_1p8>;
>> +};
>> +
>>  &ipa {
>>  	status = "okay";
>>  	modem-init;
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi 
>> b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> index d623d71..b8b00dc 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> @@ -14,6 +14,11 @@
>>  #include "pmk8350.dtsi"
>> 
>>  / {
>> +	aliases {
>> +		bluetooth0 = &bluetooth;
>> +		serial1 = &uart7;
>> +	};
>> +
>>  	gpio-keys {
>>  		compatible = "gpio-keys";
>>  		label = "gpio-keys";
>> @@ -422,6 +427,23 @@
>>  				<&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
>>  	pinctrl-names = "default", "sleep";
>>  	pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, 
>> <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
>> +
>> +	bluetooth: bluetooth {
>> +		compatible = "qcom,wcn6750-bt";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&bt_en>, <&swctrl_gpio>;
>> +		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
>> +		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
>> +		vddaon-supply = <&vreg_s7b_0p9>;
>> +		vddbtcxmx-supply = <&vreg_s7b_0p9>;
>> +		vddrfacmn-supply = <&vreg_s7b_0p9>;
>> +		vddrfa0p8-supply = <&vreg_s7b_0p9>;
>> +		vddrfa1p7-supply = <&vreg_s1b_1p8>;
>> +		vddrfa1p2-supply = <&vreg_s8b_1p2>;
>> +		vddrfa2p2-supply = <&vreg_s1c_2p2>;
>> +		vddasd-supply = <&vreg_l11c_2p8>;
>> +		max-speed = <3200000>;
>> +	};
>>  };
>> 
>>  /* PINCTRL - additions to nodes defined in sc7280.dtsi */
>> @@ -491,6 +513,14 @@
>>  };
>> 
>>  &tlmm {
>> +	bt_en: bt-en {
>> +		pins = "gpio85";
>> +		function = "gpio";
>> +		drive-strength = <2>;
> 
> is it really necessary to specify the drive strength?
> 
> Documentation/devicetree/bindings/pinctrl/qcom,sc7280-pinctrl.yaml:
> 
>   drive-strength:
>     enum: [2, 4, 6, 8, 10, 12, 14, 16]
>     default: 2
> 
> The default is 2, so it shouldn't be needed.
> 
[Bala]: will update it.
>> +		output-low;
>> +		bias-disable;
>> +	};
>> +
>>  	nvme_pwren: nvme-pwren {
>>  		function = "gpio";
>>  	};
>> @@ -554,6 +584,13 @@
>>  		 */
>>  		bias-pull-up;
>>  	};
>> +
>> +	swctrl_gpio: swctrl-gpio {
> 
> The 'gpio' suffix isn't really useful.
> 
> I suggest to use the signal name from the schematics "mos-sw-ctrl" or
> call it "bt-sw-ctrl". If you use the schematic name then this should
> be also done for the enable pin.
[Bala]: will update it.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
index 9b991ba..19bd228 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
@@ -56,6 +56,10 @@ 
 	};
 };
 
+&bluetooth {
+	vddio-supply = <&vreg_l19b_1p8>;
+};
+
 &ipa {
 	status = "okay";
 	modem-init;
diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index d623d71..b8b00dc 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -14,6 +14,11 @@ 
 #include "pmk8350.dtsi"
 
 / {
+	aliases {
+		bluetooth0 = &bluetooth;
+		serial1 = &uart7;
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		label = "gpio-keys";
@@ -422,6 +427,23 @@ 
 				<&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
 	pinctrl-names = "default", "sleep";
 	pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
+
+	bluetooth: bluetooth {
+		compatible = "qcom,wcn6750-bt";
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_en>, <&swctrl_gpio>;
+		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
+		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+		vddaon-supply = <&vreg_s7b_0p9>;
+		vddbtcxmx-supply = <&vreg_s7b_0p9>;
+		vddrfacmn-supply = <&vreg_s7b_0p9>;
+		vddrfa0p8-supply = <&vreg_s7b_0p9>;
+		vddrfa1p7-supply = <&vreg_s1b_1p8>;
+		vddrfa1p2-supply = <&vreg_s8b_1p2>;
+		vddrfa2p2-supply = <&vreg_s1c_2p2>;
+		vddasd-supply = <&vreg_l11c_2p8>;
+		max-speed = <3200000>;
+	};
 };
 
 /* PINCTRL - additions to nodes defined in sc7280.dtsi */
@@ -491,6 +513,14 @@ 
 };
 
 &tlmm {
+	bt_en: bt-en {
+		pins = "gpio85";
+		function = "gpio";
+		drive-strength = <2>;
+		output-low;
+		bias-disable;
+	};
+
 	nvme_pwren: nvme-pwren {
 		function = "gpio";
 	};
@@ -554,6 +584,13 @@ 
 		 */
 		bias-pull-up;
 	};
+
+	swctrl_gpio: swctrl-gpio {
+		pins = "gpio86";
+		function = "gpio";
+		input-enable;
+		bias-pull-down;
+	};
 };
 
 &sdc1_on {
diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp2.dts b/arch/arm64/boot/dts/qcom/sc7280-idp2.dts
index 0382c77..73b9911 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp2.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp2.dts
@@ -23,6 +23,10 @@ 
 	};
 };
 
+&bluetooth {
+	vddio-supply = <&vreg_l18b_1p8>;
+};
+
 &nvme_pwren {
 	pins = "gpio51";
 };