Skip to content

Commit

Permalink
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2018-05-18

Here's the first bluetooth-next pull request for the 4.18 kernel:

 - Refactoring of the btbcm driver
 - New USB IDs for QCA_ROME and LiteOn controllers
 - Buffer overflow fix if the controller sends invalid advertising data length
 - Various cleanups & fixes for Qualcomm controllers

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 20, 2018
2 parents f0b99e3 + df2445b commit 2c71ab4
Show file tree
Hide file tree
Showing 19 changed files with 480 additions and 241 deletions.
30 changes: 30 additions & 0 deletions Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Qualcomm Bluetooth Chips
---------------------

This documents the binding structure and common properties for serial
attached Qualcomm devices.

Serial attached Qualcomm devices shall be a child node of the host UART
device the slave device is attached to.

Required properties:
- compatible: should contain one of the following:
* "qcom,qca6174-bt"

Optional properties:
- enable-gpios: gpio specifier used to enable chip
- clocks: clock provided to the controller (SUSCLK_32KHZ)

Example:

serial@7570000 {
label = "BT-UART";
status = "okay";

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

enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
clocks = <&divclk4>;
};
};
26 changes: 26 additions & 0 deletions arch/arm64/boot/dts/qcom/apq8096-db820c-pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,30 @@
drive-strength = <2>; /* 2 MA */
};
};

blsp1_uart1_default: blsp1_uart1_default {
mux {
pins = "gpio41", "gpio42", "gpio43", "gpio44";
function = "blsp_uart2";
};

config {
pins = "gpio41", "gpio42", "gpio43", "gpio44";
drive-strength = <16>;
bias-disable;
};
};

blsp1_uart1_sleep: blsp1_uart1_sleep {
mux {
pins = "gpio41", "gpio42", "gpio43", "gpio44";
function = "gpio";
};

config {
pins = "gpio41", "gpio42", "gpio43", "gpio44";
drive-strength = <2>;
bias-disable;
};
};
};
32 changes: 32 additions & 0 deletions arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@
};
};

bt_en_gpios: bt_en_gpios {
pinconf {
pins = "gpio19";
function = PMIC_GPIO_FUNC_NORMAL;
output-low;
power-source = <PM8994_GPIO_S4>; // 1.8V
qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
bias-pull-down;
};
};

wlan_en_gpios: wlan_en_gpios {
pinconf {
pins = "gpio8";
function = PMIC_GPIO_FUNC_NORMAL;
output-low;
power-source = <PM8994_GPIO_S4>; // 1.8V
qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
bias-pull-down;
};
};

volume_up_gpio: pm8996_gpio2 {
pinconf {
pins = "gpio2";
Expand All @@ -26,6 +48,16 @@
};
};

divclk4_pin_a: divclk4 {
pinconf {
pins = "gpio18";
function = PMIC_GPIO_FUNC_FUNC2;

bias-disable;
power-source = <PM8994_GPIO_S4>;
};
};

usb3_vbus_det_gpio: pm8996_gpio22 {
pinconf {
pins = "gpio22";
Expand Down
61 changes: 61 additions & 0 deletions arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
aliases {
serial0 = &blsp2_uart1;
serial1 = &blsp2_uart2;
serial2 = &blsp1_uart1;
i2c0 = &blsp1_i2c2;
i2c1 = &blsp2_i2c1;
i2c2 = &blsp2_i2c0;
Expand All @@ -34,7 +35,36 @@
stdout-path = "serial0:115200n8";
};

clocks {
divclk4: divclk4 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "divclk4";

pinctrl-names = "default";
pinctrl-0 = <&divclk4_pin_a>;
};
};

soc {
serial@7570000 {
label = "BT-UART";
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&blsp1_uart1_default>;
pinctrl-1 = <&blsp1_uart1_sleep>;

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

/* bt_disable_n gpio */
enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;

clocks = <&divclk4>;
};
};

serial@75b0000 {
label = "LS-UART1";
status = "okay";
Expand Down Expand Up @@ -139,9 +169,40 @@
pinctrl-0 = <&usb2_vbus_det_gpio>;
};

bt_en: bt-en-1-8v {
pinctrl-names = "default";
pinctrl-0 = <&bt_en_gpios>;
compatible = "regulator-fixed";
regulator-name = "bt-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;

/* WLAN card specific delay */
startup-delay-us = <70000>;
enable-active-high;
};

wlan_en: wlan-en-1-8v {
pinctrl-names = "default";
pinctrl-0 = <&wlan_en_gpios>;
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;

gpio = <&pm8994_gpios 8 0>;

/* WLAN card specific delay */
startup-delay-us = <70000>;
enable-active-high;
};

agnoc@0 {
qcom,pcie@600000 {
status = "okay";
perst-gpio = <&msmgpio 35 GPIO_ACTIVE_LOW>;
vddpe-supply = <&wlan_en>;
vddpe1-supply = <&bt_en>;
};

qcom,pcie@608000 {
Expand Down
10 changes: 10 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8996.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,16 @@
#clock-cells = <1>;
};

blsp1_uart1: serial@7570000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0x07570000 0x1000>;
interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>,
<&gcc GCC_BLSP1_AHB_CLK>;
clock-names = "core", "iface";
status = "disabled";
};

blsp1_spi0: spi@7575000 {
compatible = "qcom,spi-qup-v2.2.1";
reg = <0x07575000 0x600>;
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ config BT_HCIUART_BCM
config BT_HCIUART_QCA
bool "Qualcomm Atheros protocol support"
depends on BT_HCIUART
depends on BT_HCIUART_SERDEV
select BT_HCIUART_H4
select BT_QCA
help
Expand Down
Loading

0 comments on commit 2c71ab4

Please sign in to comment.