Commit 691dfbf5 authored by Casey Connolly's avatar Casey Connolly Committed by Bjorn Andersson
Browse files

arm64: dts: qcom: sdm845: commonize bluetooth UART pinmux



The 4-pin configuration for UART6 is used for all or almost all SDM845
devices with built in Bluetooth. Move the pinmux configuration to
sdm845.dtsi in preparation to be removed from individual devices in
future patches.

Suggested-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarCaleb Connolly <caleb@connolly.tech>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221016172944.1892206-2-kc@postmarketos.org
parent 0cde1210
Loading
Loading
Loading
Loading
+2 −35
Original line number Diff line number Diff line
@@ -860,6 +860,8 @@ i2c_tunnel: i2c-tunnel {
&uart6 {
	status = "okay";

	pinctrl-0 = <&qup_uart6_4pin>;

	bluetooth: wcn3990-bt {
		compatible = "qcom,wcn3990-bt";
		vddio-supply = <&src_pp1800_s4a>;
@@ -1079,41 +1081,6 @@ pinconf {
	};
};

&qup_uart6_default {
	/* Change pinmux to all 4 pins since CTS and RTS are connected */
	pinmux {
		pins = "gpio45", "gpio46",
		       "gpio47", "gpio48";
	};

	pinconf-cts {
		/*
		 * Configure a pull-down on 45 (CTS) to match the pull of
		 * the Bluetooth module.
		 */
		pins = "gpio45";
		bias-pull-down;
	};

	pinconf-rts-tx {
		/* We'll drive 46 (RTS) and 47 (TX), so no pull */
		pins = "gpio46", "gpio47";
		drive-strength = <2>;
		bias-disable;
	};

	pinconf-rx {
		/*
		 * Configure a pull-up on 48 (RX). This is needed to avoid
		 * garbage data when the TX pin of the Bluetooth module is
		 * in tri-state (module powered off or not driving the
		 * signal yet).
		 */
		pins = "gpio48";
		bias-pull-up;
	};
};

&qup_uart9_default {
	pinconf-tx {
		pins = "gpio4";
+2 −23
Original line number Diff line number Diff line
@@ -986,6 +986,8 @@ &uart3 {
&uart6 {
	status = "okay";

	pinctrl-0 = <&qup_uart6_4pin>;

	bluetooth {
		compatible = "qcom,wcn3990-bt";

@@ -1144,29 +1146,6 @@ pinconf {
	};
};

&qup_uart6_default {
	pinmux {
		pins = "gpio45", "gpio46", "gpio47", "gpio48";
		function = "qup6";
	};

	cts {
		pins = "gpio45";
		bias-disable;
	};

	rts-tx {
		pins = "gpio46", "gpio47";
		drive-strength = <2>;
		bias-disable;
	};

	rx {
		pins = "gpio48";
		bias-pull-up;
	};
};

&qup_uart9_default {
	pinconf-tx {
		pins = "gpio4";
+2 −26
Original line number Diff line number Diff line
@@ -500,35 +500,11 @@ pinconf-rx {
	};
};

/*
 * Prevent garbage data on bluetooth UART lines
 */
&qup_uart6_default {
	pinmux {
		pins = "gpio45", "gpio46", "gpio47", "gpio48";
		function = "qup6";
	};

	cts {
		pins = "gpio45";
		bias-pull-down;
	};

	rts-tx {
		pins = "gpio46", "gpio47";
		drive-strength = <2>;
		bias-disable;
	};

	rx {
		pins = "gpio48";
		bias-pull-up;
	};
};

&uart6 {
	status = "okay";

	pinctrl-0 = <&qup_uart6_4pin>;

	bluetooth {
		compatible = "qcom,wcn3990-bt";

+2 −25
Original line number Diff line number Diff line
@@ -480,6 +480,8 @@ wcd_intr_default: wcd_intr_default {
&uart6 {
	status = "okay";

	pinctrl-0 = <&qup_uart6_4pin>;

	bluetooth {
		compatible = "qcom,wcn3990-bt";

@@ -566,28 +568,3 @@ &wifi {
	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
	vdd-3.3-ch1-supply = <&vreg_l23a_3p3>;
};

/* PINCTRL - additions to nodes defined in sdm845.dtsi */

&qup_uart6_default {
	pinmux {
		pins = "gpio45", "gpio46", "gpio47", "gpio48";
		function = "qup6";
	};

	cts {
		pins = "gpio45";
		bias-disable;
	};

	rts-tx {
		pins = "gpio46", "gpio47";
		drive-strength = <2>;
		bias-disable;
	};

	rx {
		pins = "gpio48";
		bias-pull-up;
	};
};
+2 −25
Original line number Diff line number Diff line
@@ -639,6 +639,8 @@ wcd_intr_default: wcd-intr-default {
&uart6 {
	status = "okay";

	pinctrl-0 = <&qup_uart6_4pin>;

	bluetooth {
		compatible = "qcom,wcn3990-bt";

@@ -735,28 +737,3 @@ &wifi {
	qcom,snoc-host-cap-skip-quirk;
	status = "okay";
};

/* PINCTRL - additions to nodes defined in sdm845.dtsi */

&qup_uart6_default {
	pinmux {
		 pins = "gpio45", "gpio46", "gpio47", "gpio48";
		 function = "qup6";
	};

	cts {
		pins = "gpio45";
		bias-disable;
	};

	rts-tx {
		pins = "gpio46", "gpio47";
		drive-strength = <2>;
		bias-disable;
	};

	rx {
		pins = "gpio48";
		bias-pull-up;
	};
};
Loading