Commit 691dfbf5 authored by Caleb Connolly's avatar Caleb Connolly Committed by Bjorn Andersson

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
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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;
};
};
......@@ -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;
};
};
......@@ -3008,6 +3008,28 @@ pinmux {
};
};
qup_uart6_4pin: qup-uart6-4pin-state {
cts-pins {
pins = "gpio45";
function = "qup6";
bias-pull-down;
};
rts-tx-pins {
pins = "gpio46", "gpio47";
function = "qup6";
drive-strength = <2>;
bias-disable;
};
rx-pins {
pins = "gpio48";
function = "qup6";
bias-pull-up;
};
};
qup_uart7_default: qup-uart7-default {
pinmux {
pins = "gpio95", "gpio96";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment