linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: omap4-droid4: add bluetooth
@ 2017-04-15 22:18 Sebastian Reichel
  2017-04-16  1:56 ` Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sebastian Reichel @ 2017-04-15 22:18 UTC (permalink / raw)
  To: Sebastian Reichel, Tony Lindgren
  Cc: Rob Herring, linux-bluetooth, linux-kernel, linux-omap

Droid 4 has wl1835 connected to the OMAP's UART4 port, which is
used for Bluetooth and most likely can also be used for controlling
the FM radio and GPS receivers.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
Hi,

Thanks to the work of Rob adding Bluetooth support for Droid 4 was
straight forward :) I did a short test scanning for available devices
using bluetoothctl. For that I had to rebind the bluetooth device,
since it has been initialized before rootfs/firmware was available
(builtin driver):

echo serial0-0 > /sys/bus/serial/drivers/hci-ti/unbind
echo serial0-0 > /sys/bus/serial/drivers/hci-ti/bind

According to my research the FM module should be functional on
Droid 4 and the wl1835's GPS is also used. Rob, do you have a
plans for supporting the extra resources?

-- Sebastian
---
 arch/arm/boot/dts/omap4-droid4-xt894.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
index e0fdfe6cc78c..2495faf79a43 100644
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -395,6 +395,15 @@
 		>;
 	};
 
+	uart4_pins: pinmux_uart4_pins {
+		pinctrl-single,pins = <
+		OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)		/* uart4_rx */
+		OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)		/* uart4_tx */
+		OMAP4_IOPAD(0x110, PIN_INPUT_PULLUP | MUX_MODE5)	/* uart4_cts */
+		OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5)	/* uart4_rts */
+		>;
+	};
+
 	mcbsp2_pins: pinmux_mcbsp2_pins {
 		pinctrl-single,pins = <
 			OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)	/* abe_mcbsp2_clkx */
@@ -429,6 +438,17 @@
 			       &omap4_pmx_core 0x17c>;
 };
 
+&uart4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart4_pins>;
+
+	bluetooth {
+		compatible = "ti,wl1835-st";
+		enable-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; /* gpio 174 */
+		max-speed = <3686400>;
+	};
+};
+
 &usbhsehci {
 	phys = <&hsusb1_phy>;
 };
-- 
2.11.0

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

* Re: [PATCH] ARM: dts: omap4-droid4: add bluetooth
  2017-04-15 22:18 [PATCH] ARM: dts: omap4-droid4: add bluetooth Sebastian Reichel
@ 2017-04-16  1:56 ` Rob Herring
       [not found] ` <CAEz3QY0duPa91TT3e86xA=tDGppiq0UXmDzuUm2i6cXbBi9CgQ@mail.gmail.com>
  2017-05-16 16:34 ` Tony Lindgren
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2017-04-16  1:56 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, open list:BLUETOOTH DRIVERS, linux-kernel, linux-omap

On Sat, Apr 15, 2017 at 5:18 PM, Sebastian Reichel <sre@kernel.org> wrote:
> Droid 4 has wl1835 connected to the OMAP's UART4 port, which is
> used for Bluetooth and most likely can also be used for controlling
> the FM radio and GPS receivers.
>
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
> Hi,
>
> Thanks to the work of Rob adding Bluetooth support for Droid 4 was
> straight forward :) I did a short test scanning for available devices
> using bluetoothctl. For that I had to rebind the bluetooth device,
> since it has been initialized before rootfs/firmware was available
> (builtin driver):
>
> echo serial0-0 > /sys/bus/serial/drivers/hci-ti/unbind
> echo serial0-0 > /sys/bus/serial/drivers/hci-ti/bind
>
> According to my research the FM module should be functional on
> Droid 4 and the wl1835's GPS is also used. Rob, do you have a
> plans for supporting the extra resources?

I don't think the h/w I have can do FM or GPS. At least there's no
headphone jack to serve as the FM antenna. For GPS, it seems support
for that is not publicly available. Maybe an antenna is not needed to
get the control interface working. It would be nice to integrate
though and then we can kill off the shared transport driver. Marcel
had mentioned that the Intel BT driver provides a regmap interface to
its FM driver. Not sure if that would work for TI.

Rob

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

* Re: [PATCH] ARM: dts: omap4-droid4: add bluetooth
       [not found] ` <CAEz3QY0duPa91TT3e86xA=tDGppiq0UXmDzuUm2i6cXbBi9CgQ@mail.gmail.com>
@ 2017-04-16 15:26   ` Sebastian Reichel
  2017-04-17 12:51     ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Reichel @ 2017-04-16 15:26 UTC (permalink / raw)
  To: Michael Scott
  Cc: linux-bluetooth, linux-omap, Rob Herring, linux-kernel, Tony Lindgren

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

Hi Michael,

On Sat, Apr 15, 2017 at 07:00:29PM -0700, Michael Scott wrote:
> On Apr 15, 2017 3:18 PM, "Sebastian Reichel" <sre@kernel.org> wrote:
>> Droid 4 has wl1835 connected to the OMAP's UART4 port, which is
> 
> Technically, I believe the Droid 4 has WL1283 WLAN chip.
>
> - Mike

iFixit [0] has a nice photo in step 15, which clearly shows,
that its a WL1285C, with 1835 looking similar I didn't notice
Rob's binding does not cover wl128x. I will resend with proper
compatible value (+ patches for the driver and binding).

[0] https://www.ifixit.com/Teardown/Motorola+Droid+4+Teardown/7759#s31961

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] ARM: dts: omap4-droid4: add bluetooth
  2017-04-16 15:26   ` Sebastian Reichel
@ 2017-04-17 12:51     ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2017-04-17 12:51 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Michael Scott, open list:BLUETOOTH DRIVERS, linux-omap,
	linux-kernel, Tony Lindgren

On Sun, Apr 16, 2017 at 10:26 AM, Sebastian Reichel <sre@kernel.org> wrote:
> Hi Michael,
>
> On Sat, Apr 15, 2017 at 07:00:29PM -0700, Michael Scott wrote:
>> On Apr 15, 2017 3:18 PM, "Sebastian Reichel" <sre@kernel.org> wrote:
>>> Droid 4 has wl1835 connected to the OMAP's UART4 port, which is
>>
>> Technically, I believe the Droid 4 has WL1283 WLAN chip.
>>
>> - Mike
>
> iFixit [0] has a nice photo in step 15, which clearly shows,
> that its a WL1285C, with 1835 looking similar I didn't notice
> Rob's binding does not cover wl128x. I will resend with proper
> compatible value (+ patches for the driver and binding).

I only documented what was publicly available as some parts have
failed to materialize. Any idea what the differences are?

Rob

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

* Re: [PATCH] ARM: dts: omap4-droid4: add bluetooth
  2017-04-15 22:18 [PATCH] ARM: dts: omap4-droid4: add bluetooth Sebastian Reichel
  2017-04-16  1:56 ` Rob Herring
       [not found] ` <CAEz3QY0duPa91TT3e86xA=tDGppiq0UXmDzuUm2i6cXbBi9CgQ@mail.gmail.com>
@ 2017-05-16 16:34 ` Tony Lindgren
  2 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2017-05-16 16:34 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Rob Herring, linux-bluetooth, linux-kernel, linux-omap

* Sebastian Reichel <sre@kernel.org> [170415 15:21]:
> Droid 4 has wl1835 connected to the OMAP's UART4 port, which is
> used for Bluetooth and most likely can also be used for controlling
> the FM radio and GPS receivers.
...

> --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
> +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
> @@ -395,6 +395,15 @@
>  		>;
>  	};
>  
> +	uart4_pins: pinmux_uart4_pins {
> +		pinctrl-single,pins = <
> +		OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)		/* uart4_rx */
> +		OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)		/* uart4_tx */
> +		OMAP4_IOPAD(0x110, PIN_INPUT_PULLUP | MUX_MODE5)	/* uart4_cts */
> +		OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5)	/* uart4_rts */
> +		>;
> +	};
> +
>  	mcbsp2_pins: pinmux_mcbsp2_pins {
>  		pinctrl-single,pins = <
>  			OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)	/* abe_mcbsp2_clkx */

This needs updating against v4.12-rc1 BTW, looks like you have
some audio patches in works here that mainline does not have
for mcbsp2.

Regards,

Tony

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

end of thread, other threads:[~2017-05-16 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-15 22:18 [PATCH] ARM: dts: omap4-droid4: add bluetooth Sebastian Reichel
2017-04-16  1:56 ` Rob Herring
     [not found] ` <CAEz3QY0duPa91TT3e86xA=tDGppiq0UXmDzuUm2i6cXbBi9CgQ@mail.gmail.com>
2017-04-16 15:26   ` Sebastian Reichel
2017-04-17 12:51     ` Rob Herring
2017-05-16 16:34 ` Tony Lindgren

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).