linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support
@ 2020-01-29 23:20 Brian Masney
  2020-01-29 23:20 ` [PATCH 1/3] ARM: qcom_defconfig: add Broadcom bluetooth options Brian Masney
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Brian Masney @ 2020-01-29 23:20 UTC (permalink / raw)
  To: bjorn.andersson
  Cc: agross, robh+dt, mark.rutland, linux-arm-msm, devicetree, jonathan

Here's a small patch series that gets the bluetooth working on the Nexus
5 phone.

For a summary of what currently works upstream on the Nexus 5, see my
status page at https://masneyb.github.io/nexus-5-upstream/.

Brian Masney (1):
  ARM: qcom_defconfig: add Broadcom bluetooth options

Jonathan Marek (2):
  ARM: dts: qcom: msm8974: add blsp2_uart10
  ARM: dts: qcom: msm8974-hammerhead: add support for bluetooth

 .../qcom-msm8974-lge-nexus5-hammerhead.dts    | 71 +++++++++++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi           |  9 +++
 arch/arm/configs/qcom_defconfig               |  4 ++
 3 files changed, 84 insertions(+)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ARM: qcom_defconfig: add Broadcom bluetooth options
  2020-01-29 23:20 [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Brian Masney
@ 2020-01-29 23:20 ` Brian Masney
  2020-01-29 23:20 ` [PATCH 2/3] ARM: dts: qcom: msm8974: add blsp2_uart10 Brian Masney
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2020-01-29 23:20 UTC (permalink / raw)
  To: bjorn.andersson
  Cc: agross, robh+dt, mark.rutland, linux-arm-msm, devicetree, jonathan

Add Broadcom bluetooth options and serial bus in order to support
Bluetooth on the Nexus 5 phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
 arch/arm/configs/qcom_defconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig
index cdc75ef7d529..a00765b7225f 100644
--- a/arch/arm/configs/qcom_defconfig
+++ b/arch/arm/configs/qcom_defconfig
@@ -50,6 +50,9 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
 # CONFIG_INET_XFRM_MODE_BEET is not set
 # CONFIG_IPV6 is not set
+CONFIG_BT=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_BCM=y
 CONFIG_CFG80211=m
 CONFIG_MAC80211=m
 CONFIG_RFKILL=y
@@ -111,6 +114,7 @@ CONFIG_SERIO_LIBPS2=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_MSM=y
 CONFIG_SERIAL_MSM_CONSOLE=y
+CONFIG_SERIAL_DEV_BUS=y
 CONFIG_HW_RANDOM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ARM: dts: qcom: msm8974: add blsp2_uart10
  2020-01-29 23:20 [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Brian Masney
  2020-01-29 23:20 ` [PATCH 1/3] ARM: qcom_defconfig: add Broadcom bluetooth options Brian Masney
@ 2020-01-29 23:20 ` Brian Masney
  2020-01-29 23:20 ` [PATCH 3/3] ARM: dts: qcom: msm8974-hammerhead: add support for bluetooth Brian Masney
  2020-02-03 17:39 ` [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2020-01-29 23:20 UTC (permalink / raw)
  To: bjorn.andersson
  Cc: agross, robh+dt, mark.rutland, linux-arm-msm, devicetree, jonathan

From: Jonathan Marek <jonathan@marek.ca>

Add blsp2_uart10 node in order to support bluetooth on the Nexus 5
phone.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
[masneyb@onstation.org: use constants in interrupts property; patch
 extracted from much larger out of tree patch.]
Signed-off-by: Brian Masney <masneyb@onstation.org>
---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 4b161b809dd5..f8e093179c3f 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -715,6 +715,15 @@ blsp1_uart2: serial@f991e000 {
 			status = "disabled";
 		};
 
+		blsp2_uart10: serial@f9960000 {
+			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+			reg = <0xf9960000 0x1000>;
+			interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_BLSP2_UART4_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
+			clock-names = "core", "iface";
+			status = "disabled";
+		};
+
 		sdhci@f9824900 {
 			compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
 			reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM: dts: qcom: msm8974-hammerhead: add support for bluetooth
  2020-01-29 23:20 [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Brian Masney
  2020-01-29 23:20 ` [PATCH 1/3] ARM: qcom_defconfig: add Broadcom bluetooth options Brian Masney
  2020-01-29 23:20 ` [PATCH 2/3] ARM: dts: qcom: msm8974: add blsp2_uart10 Brian Masney
@ 2020-01-29 23:20 ` Brian Masney
  2020-02-03 17:39 ` [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2020-01-29 23:20 UTC (permalink / raw)
  To: bjorn.andersson
  Cc: agross, robh+dt, mark.rutland, linux-arm-msm, devicetree, jonathan

From: Jonathan Marek <jonathan@marek.ca>

Add support for the bluetooth found on the Nexus 5 phone.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
[masneyb@onstation.org: formatting cleanups; remove sleep clock; patch
 extracted from much larger out of tree patch.]
Signed-off-by: Brian Masney <masneyb@onstation.org>
---
 .../qcom-msm8974-lge-nexus5-hammerhead.dts    | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
index 3487daf98e81..32b474bfeec3 100644
--- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -12,6 +12,7 @@ / {
 
 	aliases {
 		serial0 = &blsp1_uart1;
+		serial1 = &blsp2_uart10;
 	};
 
 	chosen {
@@ -355,6 +356,57 @@ te {
 				bias-disable;
 			};
 		};
+
+		bt_pin: bt {
+			hostwake {
+				pins = "gpio42";
+				function = "gpio";
+			};
+
+			devwake {
+				pins = "gpio62";
+				function = "gpio";
+			};
+
+			shutdown {
+				pins = "gpio41";
+				function = "gpio";
+			};
+		};
+
+		blsp2_uart10_pin_a: blsp2-uart10-pin-active {
+			tx {
+				pins = "gpio53";
+				function = "blsp_uart10";
+
+				drive-strength = <2>;
+				bias-disable;
+			};
+
+			rx {
+				pins = "gpio54";
+				function = "blsp_uart10";
+
+				drive-strength = <2>;
+				bias-pull-up;
+			};
+
+			cts {
+				pins = "gpio55";
+				function = "blsp_uart10";
+
+				drive-strength = <2>;
+				bias-pull-up;
+			};
+
+			rts {
+				pins = "gpio56";
+				function = "blsp_uart10";
+
+				drive-strength = <2>;
+				bias-disable;
+			};
+		};
 	};
 
 	sdhci@f9824900 {
@@ -418,6 +470,25 @@ volume-down {
 		};
 	};
 
+	serial@f9960000 {
+		status = "ok";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&blsp2_uart10_pin_a>;
+
+		bluetooth {
+			compatible = "brcm,bcm43438-bt";
+			max-speed = <3000000>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&bt_pin>;
+
+			host-wakeup-gpios = <&msmgpio 42 GPIO_ACTIVE_HIGH>;
+			device-wakeup-gpios = <&msmgpio 62 GPIO_ACTIVE_HIGH>;
+			shutdown-gpios = <&msmgpio 41 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
 	i2c@f9967000 {
 		status = "ok";
 		pinctrl-names = "default";
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support
  2020-01-29 23:20 [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Brian Masney
                   ` (2 preceding siblings ...)
  2020-01-29 23:20 ` [PATCH 3/3] ARM: dts: qcom: msm8974-hammerhead: add support for bluetooth Brian Masney
@ 2020-02-03 17:39 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2020-02-03 17:39 UTC (permalink / raw)
  To: Brian Masney
  Cc: agross, robh+dt, mark.rutland, linux-arm-msm, devicetree, jonathan

On Wed 29 Jan 15:20 PST 2020, Brian Masney wrote:

> Here's a small patch series that gets the bluetooth working on the Nexus
> 5 phone.
> 
> For a summary of what currently works upstream on the Nexus 5, see my
> status page at https://masneyb.github.io/nexus-5-upstream/.
> 

Nice, picked up for v5.7.

Regards,
Bjorn

> Brian Masney (1):
>   ARM: qcom_defconfig: add Broadcom bluetooth options
> 
> Jonathan Marek (2):
>   ARM: dts: qcom: msm8974: add blsp2_uart10
>   ARM: dts: qcom: msm8974-hammerhead: add support for bluetooth
> 
>  .../qcom-msm8974-lge-nexus5-hammerhead.dts    | 71 +++++++++++++++++++
>  arch/arm/boot/dts/qcom-msm8974.dtsi           |  9 +++
>  arch/arm/configs/qcom_defconfig               |  4 ++
>  3 files changed, 84 insertions(+)
> 
> -- 
> 2.24.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-03 17:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 23:20 [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Brian Masney
2020-01-29 23:20 ` [PATCH 1/3] ARM: qcom_defconfig: add Broadcom bluetooth options Brian Masney
2020-01-29 23:20 ` [PATCH 2/3] ARM: dts: qcom: msm8974: add blsp2_uart10 Brian Masney
2020-01-29 23:20 ` [PATCH 3/3] ARM: dts: qcom: msm8974-hammerhead: add support for bluetooth Brian Masney
2020-02-03 17:39 ` [PATCH 0/3] ARM: qcom: add Nexus 5 bluetooth support Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).