LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Devicetree binding for omap3-serial & bcm2048 combination
@ 2015-01-28  9:35 Pavel Machek
  2015-01-28 22:35 ` Sebastian Reichel
  2015-01-29 10:17 ` Mark Rutland
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Machek @ 2015-01-28  9:35 UTC (permalink / raw)
  To: robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	devicetree, linux-kernel
  Cc: marcel

Nokia N900 contains bluetooth module connected on serial
port. Unfortunately, serial and bluetooth are rather closely coupled,
so standard serial driver can not be used, and we really don't want
/dev/ttyS1 to be published for internal port of bluetooth
stack... Hence solution below.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff --git a/Documentation/devicetree/bindings/serial/omap_serial.txt b/Documentation/devicetree/bindings/serial/omap_serial.txt
index 342eedd..e9fde42 100644
--- a/Documentation/devicetree/bindings/serial/omap_serial.txt
+++ b/Documentation/devicetree/bindings/serial/omap_serial.txt
@@ -4,7 +4,14 @@ Required properties:
 - compatible : should be "ti,omap2-uart" for OMAP2 controllers
 - compatible : should be "ti,omap3-uart" for OMAP3 controllers
 - compatible : should be "ti,omap4-uart" for OMAP4 controllers
+- compatible : should be "ti+brcm,omap3-uart,bcm2048" for bcm2048
+	       bluetooth connected to OMAP3 serial
 - ti,hwmods : Must be "uart<n>", n being the instance number (1-based)
 
 Optional properties:
 - clock-frequency : frequency of the clock input to the UART
+
+Required properties for ti+brcm,omap3-uart,bcm2048:
+- reset-gpios : gpio for reset pin
+- host-wakeup-gpios : gpio for host wakeup
+- bluetooth-wakeup-gpios : gpio for bluetooth wakeup

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH] Devicetree binding for omap3-serial & bcm2048 combination
  2015-01-28  9:35 [PATCH] Devicetree binding for omap3-serial & bcm2048 combination Pavel Machek
@ 2015-01-28 22:35 ` Sebastian Reichel
  2015-01-29 10:17 ` Mark Rutland
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2015-01-28 22:35 UTC (permalink / raw)
  To: Pavel Machek
  Cc: robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	devicetree, linux-kernel, marcel

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

Hi,

On Wed, Jan 28, 2015 at 10:35:01AM +0100, Pavel Machek wrote:
> Nokia N900 contains bluetooth module connected on serial
> port. Unfortunately, serial and bluetooth are rather closely coupled,
> so standard serial driver can not be used, and we really don't want
> /dev/ttyS1 to be published for internal port of bluetooth
> stack... Hence solution below.

Actually that's not true. If one takes a deeper look into Nokia's
bcm2048 driver one can see, that it's using more or less the same
protocol as other bluetooth modules (H4) with some custom
extensions. The only special thing are two additional GPIOs, which
are enabled before sending data, so that the bluetooth chip and the
omap can wakeup each other. I don't think one can speak of "closely
coupled" for this.

The only reason you needed this hacked DT binding is, that you do
not want to properly fix the bcm2048 driver, so that it can use the
omap-serial driver.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] Devicetree binding for omap3-serial & bcm2048 combination
  2015-01-28  9:35 [PATCH] Devicetree binding for omap3-serial & bcm2048 combination Pavel Machek
  2015-01-28 22:35 ` Sebastian Reichel
@ 2015-01-29 10:17 ` Mark Rutland
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2015-01-29 10:17 UTC (permalink / raw)
  To: Pavel Machek
  Cc: robh+dt, Pawel Moll, ijc+devicetree, galak, devicetree,
	linux-kernel, marcel

On Wed, Jan 28, 2015 at 09:35:01AM +0000, Pavel Machek wrote:
> Nokia N900 contains bluetooth module connected on serial
> port. Unfortunately, serial and bluetooth are rather closely coupled,
> so standard serial driver can not be used, and we really don't want
> /dev/ttyS1 to be published for internal port of bluetooth
> stack... Hence solution below.

How are they closely coupled?

> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff --git a/Documentation/devicetree/bindings/serial/omap_serial.txt b/Documentation/devicetree/bindings/serial/omap_serial.txt
> index 342eedd..e9fde42 100644
> --- a/Documentation/devicetree/bindings/serial/omap_serial.txt
> +++ b/Documentation/devicetree/bindings/serial/omap_serial.txt
> @@ -4,7 +4,14 @@ Required properties:
>  - compatible : should be "ti,omap2-uart" for OMAP2 controllers
>  - compatible : should be "ti,omap3-uart" for OMAP3 controllers
>  - compatible : should be "ti,omap4-uart" for OMAP4 controllers
> +- compatible : should be "ti+brcm,omap3-uart,bcm2048" for bcm2048
> +	       bluetooth connected to OMAP3 serial

I'm very much not keen on munging the two devices into one.

Elsewhere Neil Brown and others having been looking into allowing UARTs
to function as busses for single devices, which to me seems to cover
this case.

Mark.

>  - ti,hwmods : Must be "uart<n>", n being the instance number (1-based)
>  
>  Optional properties:
>  - clock-frequency : frequency of the clock input to the UART
> +
> +Required properties for ti+brcm,omap3-uart,bcm2048:
> +- reset-gpios : gpio for reset pin
> +- host-wakeup-gpios : gpio for host wakeup
> +- bluetooth-wakeup-gpios : gpio for bluetooth wakeup
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> 

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

end of thread, other threads:[~2015-01-29 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28  9:35 [PATCH] Devicetree binding for omap3-serial & bcm2048 combination Pavel Machek
2015-01-28 22:35 ` Sebastian Reichel
2015-01-29 10:17 ` Mark Rutland

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