Add the nodes to describe the WCN6755 chip with its PMU and Bluetooth parts.
Thanks to Alexander Koskovich for helping with the bringup, adding 'clocks' to the PMU node to make Bluetooth work. Signed-off-by: Luca Weiss <[email protected]> --- arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts | 174 +++++++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts index 52895dd9e4fa..cbe1507b0aaa 100644 --- a/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts +++ b/arch/arm64/boot/dts/qcom/milos-fairphone-fp6.dts @@ -24,6 +24,7 @@ / { aliases { serial0 = &uart5; + serial1 = &uart11; }; gpio-keys { @@ -215,6 +216,67 @@ trip1 { }; }; }; + + wcn6750-pmu { + compatible = "qcom,wcn6750-pmu"; /* WCN6755 */ + + vddaon-supply = <&vreg_s3b>; + vddasd-supply = <&vreg_l7b>; + vddpmu-supply = <&vreg_s3b>; + vddrfa0p8-supply = <&vreg_s3b>; + vddrfa1p2-supply = <&vreg_s2b>; + vddrfa1p7-supply = <&vreg_s1b>; + vddrfa2p2-supply = <&vreg_s1j>; + + bt-enable-gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>; + + clocks = <&rpmhcc RPMH_RF_CLK1>; + + pinctrl-0 = <&bluetooth_enable_default>; + pinctrl-names = "default"; + + 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_1p7: ldo7 { + regulator-name = "vreg_pmu_rfa_1p7"; + }; + + vreg_pmu_pcie_0p9: ldo8 { + regulator-name = "vreg_pmu_pcie_0p9"; + }; + + vreg_pmu_pcie_1p8: ldo9 { + regulator-name = "vreg_pmu_pcie_1p8"; + }; + }; + }; }; &apps_rsc { @@ -690,6 +752,39 @@ &pon_resin { status = "okay"; }; +&qup_uart11_cts { + /* + * Configure a bias-bus-hold on CTS to lower power + * usage when Bluetooth is turned off. Bus hold will + * maintain a low power state regardless of whether + * the Bluetooth module drives the pin in either + * direction or leaves the pin fully unpowered. + */ + bias-bus-hold; +}; + +&qup_uart11_rts { + /* We'll drive RTS, so no pull */ + drive-strength = <2>; + bias-disable; +}; + +&qup_uart11_rx { + /* + * Configure a pull-up on 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). + */ + bias-pull-up; +}; + +&qup_uart11_tx { + /* We'll drive TX, so no pull */ + drive-strength = <2>; + bias-disable; +}; + &qupv3_id_0 { status = "okay"; }; @@ -748,6 +843,59 @@ &tlmm { <13 1>, /* NC */ <63 2>; /* WLAN UART */ + qup_uart11_sleep_cts: qup-uart11-sleep-cts-state { + pins = "gpio48"; + function = "gpio"; + /* + * Configure a bias-bus-hold on CTS to lower power + * usage when Bluetooth is turned off. Bus hold will + * maintain a low power state regardless of whether + * the Bluetooth module drives the pin in either + * direction or leaves the pin fully unpowered. + */ + bias-bus-hold; + }; + + qup_uart11_sleep_rts: qup-uart11-sleep-rts-state { + pins = "gpio49"; + function = "gpio"; + /* + * Configure pull-down on RTS. As RTS is active low + * signal, pull it low to indicate the BT SoC that it + * can wakeup the system anytime from suspend state by + * pulling RX low (by sending wakeup bytes). + */ + bias-pull-down; + }; + + qup_uart11_sleep_tx: qup-uart11-sleep-tx-state { + pins = "gpio50"; + function = "gpio"; + /* + * Configure pull-up on TX when it isn't actively driven + * to prevent BT SoC from receiving garbage during sleep. + */ + bias-pull-up; + }; + + qup_uart11_sleep_rx: qup-uart11-sleep-rx-state { + pins = "gpio51"; + function = "gpio"; + /* + * Configure a pull-up on RX. This is needed to avoid + * garbage data when the TX pin of the Bluetooth module + * is floating which may cause spurious wakeups. + */ + bias-pull-up; + }; + + bluetooth_enable_default: bluetooth-enable-default-state { + pins = "gpio53"; + function = "gpio"; + output-low; + bias-disable; + }; + sdc2_card_det_n: sdc2-card-det-state { pins = "gpio65"; function = "gpio"; @@ -767,6 +915,32 @@ &uart5 { status = "okay"; }; +&uart11 { + /delete-property/ interrupts; + interrupts-extended = <&intc GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH 0>, + <&tlmm 51 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-1 = <&qup_uart11_sleep_cts>, + <&qup_uart11_sleep_rts>, + <&qup_uart11_sleep_tx>, + <&qup_uart11_sleep_rx>; + pinctrl-names = "default", + "sleep"; + + status = "okay"; + + bluetooth { + compatible = "qcom,wcn6750-bt"; /* WCN6755 */ + + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p7-supply = <&vreg_pmu_rfa_1p7>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + }; +}; + &usb_1 { dr_mode = "otg"; -- 2.52.0

