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 2019-03-02

Here's one more bluetooth-next pull request for the 5.1 kernel:

 - Added support for MediaTek MT7663U and MT7668U UART devices
 - Cleanups & fixes to the hci_qca driver
 - Fixed wakeup pin behavior for QCA6174A controller

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 Mar 2, 2019
2 parents 9eb3591 + 22eaf6c commit 2369afb
Show file tree
Hide file tree
Showing 13 changed files with 478 additions and 97 deletions.
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/net/btusb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Required properties:
(more may be added later) are:

"usb1286,204e" (Marvell 8997)
"usbcf3,e300" (Qualcomm QCA6174A)
"usb4ca,301a" (Qualcomm QCA6174A (Lite-On))


Also, vendors that use btusb may have device additional properties, e.g:
Documentation/devicetree/bindings/net/marvell-bt-8xxx.txt
Expand Down
64 changes: 64 additions & 0 deletions Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,67 @@ Example:
clock-names = "ref";
};
};

MediaTek UART based Bluetooth Devices
==================================

This device is a serial attached device to UART device and thus it must be a
child node of the serial node with UART.

Please refer to the following documents for generic properties:

Documentation/devicetree/bindings/serial/slave-device.txt

Required properties:

- compatible: Must be
"mediatek,mt7663u-bluetooth": for MT7663U device
"mediatek,mt7668u-bluetooth": for MT7668U device
- vcc-supply: Main voltage regulator
- pinctrl-names: Should be "default", "runtime"
- pinctrl-0: Should contain UART RXD low when the device is powered up to
enter proper bootstrap mode.
- pinctrl-1: Should contain UART mode pin ctrl

Optional properties:

- reset-gpios: GPIO used to reset the device whose initial state keeps low,
if the GPIO is missing, then board-level design should be
guaranteed.
- current-speed: Current baud rate of the device whose defaults to 921600

Example:

uart1_pins_boot: uart1-default {
pins-dat {
pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
output-low;
};
};

uart1_pins_runtime: uart1-runtime {
pins-dat {
pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
<MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
};
};

uart1: serial@11003000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>,
<&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";

bluetooth {
compatible = "mediatek,mt7663u-bluetooth";
vcc-supply = <&reg_5v>;
reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "runtime";
pinctrl-0 = <&uart1_pins_boot>;
pinctrl-1 = <&uart1_pins_runtime>;
current-speed = <921600>;
};
};
13 changes: 13 additions & 0 deletions arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,19 @@
pinctrl-0 = <&bl_en>;
pwm-delay-us = <10000>;
};

gpio_keys: gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_l>;

wake_on_bt: wake-on-bt {
label = "Wake-on-Bluetooth";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WAKEUP>;
wakeup-source;
};
};
};

&ppvar_bigcpu {
Expand Down
46 changes: 29 additions & 17 deletions arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@
pinctrl-0 = <&dmic_en>;
wakeup-delay-ms = <250>;
};

gpio_keys: gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pen_eject_odl>;

pen-insert {
label = "Pen Insert";
/* Insert = low, eject = high */
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
linux,code = <SW_PEN_INSERTED>;
linux,input-type = <EV_SW>;
wakeup-source;
};
};
};

/* pp900_s0 aliases */
Expand Down Expand Up @@ -328,20 +343,6 @@ camera: &i2c7 {
<400000000>;
};

&gpio_keys {
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_l>, <&pen_eject_odl>;

pen-insert {
label = "Pen Insert";
/* Insert = low, eject = high */
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
linux,code = <SW_PEN_INSERTED>;
linux,input-type = <EV_SW>;
wakeup-source;
};
};

&i2c_tunnel {
google,remote-bus = <0>;
};
Expand Down Expand Up @@ -437,8 +438,19 @@ camera: &i2c7 {
status = "okay";
};

&wake_on_bt {
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
&usb_host0_ohci {
#address-cells = <1>;
#size-cells = <0>;

qca_bt: bluetooth@1 {
compatible = "usbcf3,e300", "usb4ca,301a";
reg = <1>;
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_l>;
interrupt-parent = <&gpio1>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "wakeup";
};
};

/* PINCTRL OVERRIDES */
Expand All @@ -455,7 +467,7 @@ camera: &i2c7 {
};

&bt_host_wake_l {
rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>;
rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_none>;
};

&ec_ap_int_l {
Expand Down
13 changes: 0 additions & 13 deletions arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,6 @@
#clock-cells = <0>;
};

gpio_keys: gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_l>;

wake_on_bt: wake-on-bt {
label = "Wake-on-Bluetooth";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WAKEUP>;
wakeup-source;
};
};

max98357a: max98357a {
compatible = "maxim,max98357a";
pinctrl-names = "default";
Expand Down
Loading

0 comments on commit 2369afb

Please sign in to comment.