[PATCH 01/11] arm64: dts: qcom: sdm845-lg-common: Add uarts and Bluetooth

Paul Sajna posted 11 patches 2 weeks, 4 days ago
There is a newer version of this series
[PATCH 01/11] arm64: dts: qcom: sdm845-lg-common: Add uarts and Bluetooth
Posted by Paul Sajna 2 weeks, 4 days ago
uart9 is debug serial on USB SBU1/2
uart6 is bluetooth

Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
 arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 47 ++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts  | 10 ++++++
 2 files changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 99dafc6716e76e25aad0755e6004dc952779689f..1acc418b943443f3ba4f8a8a1cfe2c575da11876 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -31,6 +31,8 @@ chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges;
+
+		stdout-path = "serial0:115200n8";
 	};
 
 	reserved-memory {
@@ -159,6 +161,11 @@ vreg_s4a_1p8: pm8998-smps4-regulator {
 
 		vin-supply = <&vph_pwr>;
 	};
+
+	aliases {
+		serial0 = &uart9;
+		serial1 = &uart6;
+	};
 };
 
 &adsp_pas {
@@ -595,3 +602,43 @@ vol_up_pin_a: vol-up-active-state {
 		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
 	};
 };
+
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&qup_uart9_rx {
+	drive-strength = <2>;
+	bias-pull-up;
+};
+
+&qup_uart9_tx {
+	drive-strength = <2>;
+	bias-disable;
+};
+
+&uart6 {
+	pinctrl-0 = <&qup_uart6_4pin>;
+
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,wcn3990-bt";
+
+		vddio-supply = <&vreg_s4a_1p8>;
+		vddxo-supply = <&vreg_l7a_1p8>;
+		vddrf-supply = <&vreg_l17a_1p3>;
+		vddch0-supply = <&vreg_l25a_3p3>;
+		max-speed = <3200000>;
+	};
+};
+
+&uart9 {
+	label = "LS-UART1";
+
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index a12723310c8b630a4961de671ea8b60f1f8b512b..49225e4fa80e5f45a36964d5d733dc238e4413f8 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -66,3 +66,13 @@ thinq_key_default: thinq-key-default-state {
 		bias-pull-up;
 	};
 };
+
+&uart6 {
+	bluetooth {
+		/*
+		 * This path is relative to the qca/
+		 * subdir under lib/firmware.
+		 */
+		firmware-name = "judyln/crnv21.bin";
+	};
+};

-- 
2.51.0
Re: [PATCH 01/11] arm64: dts: qcom: sdm845-lg-common: Add uarts and Bluetooth
Posted by Konrad Dybcio 2 weeks, 3 days ago
On 9/14/25 1:56 AM, Paul Sajna wrote:
> uart9 is debug serial on USB SBU1/2
> uart6 is bluetooth
> 
> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> ---

[...]


> +&uart9 {
> +	label = "LS-UART1";

This is what the name of the output is on 96boards products, I
doubt it makes sense in your case

Konrad
Re: [PATCH 01/11] arm64: dts: qcom: sdm845-lg-common: Add uarts and Bluetooth
Posted by Dmitry Baryshkov 2 weeks, 3 days ago
On Sat, Sep 13, 2025 at 04:56:34PM -0700, Paul Sajna wrote:
> uart9 is debug serial on USB SBU1/2
> uart6 is bluetooth
> 
> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 47 ++++++++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts  | 10 ++++++
>  2 files changed, 57 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> index 99dafc6716e76e25aad0755e6004dc952779689f..1acc418b943443f3ba4f8a8a1cfe2c575da11876 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> @@ -31,6 +31,8 @@ chosen {
>  		#address-cells = <2>;
>  		#size-cells = <2>;
>  		ranges;
> +
> +		stdout-path = "serial0:115200n8";
>  	};
>  
>  	reserved-memory {
> @@ -159,6 +161,11 @@ vreg_s4a_1p8: pm8998-smps4-regulator {
>  
>  		vin-supply = <&vph_pwr>;
>  	};
> +
> +	aliases {

Please keep the file sorted. 'aliases' < 'chosen', etc.

> +		serial0 = &uart9;
> +		serial1 = &uart6;
> +	};
>  };
>  
>  &adsp_pas {
> @@ -595,3 +602,43 @@ vol_up_pin_a: vol-up-active-state {
>  		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
>  	};
>  };
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&qupv3_id_1 {
> +	status = "okay";
> +};
> +
> +&qup_uart9_rx {
> +	drive-strength = <2>;
> +	bias-pull-up;
> +};
> +
> +&qup_uart9_tx {
> +	drive-strength = <2>;
> +	bias-disable;
> +};
> +
> +&uart6 {
> +	pinctrl-0 = <&qup_uart6_4pin>;
> +
> +	status = "okay";
> +
> +	bluetooth {
> +		compatible = "qcom,wcn3990-bt";
> +
> +		vddio-supply = <&vreg_s4a_1p8>;
> +		vddxo-supply = <&vreg_l7a_1p8>;
> +		vddrf-supply = <&vreg_l17a_1p3>;
> +		vddch0-supply = <&vreg_l25a_3p3>;
> +		max-speed = <3200000>;
> +	};
> +};
> +
> +&uart9 {
> +	label = "LS-UART1";
> +
> +	status = "okay";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> index a12723310c8b630a4961de671ea8b60f1f8b512b..49225e4fa80e5f45a36964d5d733dc238e4413f8 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> @@ -66,3 +66,13 @@ thinq_key_default: thinq-key-default-state {
>  		bias-pull-up;
>  	};
>  };
> +
> +&uart6 {
> +	bluetooth {
> +		/*
> +		 * This path is relative to the qca/
> +		 * subdir under lib/firmware.

Why do you need a special NV file? Please include BT information into
the commit message. Also, if qca_read_fw_board_id() returns a sensible
information on this board, it would be better to fix btqca driver to
apply board ID on WCN399x boards too.

> +		 */
> +		firmware-name = "judyln/crnv21.bin";
> +	};
> +};
> 
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry
Re: [PATCH 01/11] arm64: dts: qcom: sdm845-lg-common: Add uarts and Bluetooth
Posted by Paul Sajna 2 weeks, 3 days ago
> 
> Why do you need a special NV file? Please include BT information into
> the commit message. Also, if qca_read_fw_board_id() returns a sensible
> information on this board, it would be better to fix btqca driver to
> apply board ID on WCN399x boards too.
> 
> > 
> > + */
> >  + firmware-name = "judyln/crnv21.bin";
> >  + };
> >  +};
> >  
> >  -- 
> >  2.51.0
> > 
> -- 
> With best wishes
> Dmitry
> 

I'm not sure if it's necessary, but it seems to be standard practice for all the devices to have their own NV.
https://i.imgur.com/MD3o3k2.png