linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Ilya Faenson <ifaenson@broadcom.com>,
	<linux-bluetooth@vger.kernel.org>, Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH 1/5] Broadcom Bluetooth UART Device Tree bindings
Date: Sat, 6 Jun 2015 09:41:03 +0200	[thread overview]
Message-ID: <5572A40F.9090206@broadcom.com> (raw)
In-Reply-To: <FC211E48-68D8-4C2E-9A1A-E89EDAA1B23F@holtmann.org>

On 06/06/15 08:40, Marcel Holtmann wrote:
> Hi Ilya,
>
>> Device Tree bindings to configure the Broadcom Bluetooth UART device.
>> Updated not to use CamelCase and to use Intel style "oper-speed".
>>
>> Signed-off-by: Ilya Faenson<ifaenson@broadcom.com>
>> ---
>> .../devicetree/bindings/net/bluetooth/btbcm.txt    | 82 ++++++++++++++++++++++
>> 1 file changed, 82 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/net/bluetooth/btbcm.txt
>>
>> diff --git a/Documentation/devicetree/bindings/net/bluetooth/btbcm.txt b/Documentation/devicetree/bindings/net/bluetooth/btbcm.txt
>> new file mode 100644
>> index 0000000..2679819
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/bluetooth/btbcm.txt
>> @@ -0,0 +1,82 @@
>> +btbcm
>> +------
>> +
>> +Required properties:
>> +
>> +	- compatible : must be "brcm,brcm-bt-uart".
>> +	- tty : tty device connected to this Bluetooth device.
>> +
>> +Optional properties:
>> +
>> +  - bt-host-wake-gpios : bt-host-wake input GPIO to be used as an interrupt.
>> +
>> +  - bt-wake-gpios : bt-wake output GPIO to be used to suspend / resume device.
>> +
>> +  - bt-reg-on-gpios : reg-on output GPIO to be used to power device on/off.
>> +
>> +  - oper-speed : Bluetooth device operational baud rate.
>> +    Default: 3000000.
>> +
>> +  - manual-fc : flow control UART in suspend / resume scenarios.
>> +    Default: 0.
>> +
>> +  - configure-sleep : configure suspend / resume flag.
>> +    Default: false.
>> +
>> +  - configure-audio : configure platform PCM SCO flag.
>> +    Default: false.
>> +
>> +  - pcm-clockmode : PCM clock mode. 0-slave, 1-master.
>> +    Default: 0.
>> +
>> +  - pcm-fillmethod : PCM fill method. 0 to 3.
>> +    Default: 2.
>> +
>> +  - pcm-fillnum : PCM number of fill bits. 0 to 3.
>> +    Default: 0.
>> +
>> +  - pcm-fillvalue : PCM fill value. 0 to 7.
>> +    Default: 3.
>> +
>> +  - pcm-incallbitclock : PCM interface rate. 0-128Kbps, 1-256Kbps, 2-512Kbps,
>> +    3-1024Kbps, 4-2048Kbps.
>> +    Default: 0.
>> +
>> +  - pcm-lsbfirst : PCM LSB first. 0 or 1.
>> +    Default: 0.
>> +
>> +  - pcm-rightjustify : PCM Justify. 0-left, 1-right.
>> +    Default: 0.
>> +
>> +  - pcm-routing : PCM routing. 0-PCM, 1-SCO over HCI.
>> +    Default: 0.
>> +
>> +  - pcm-shortframesync : PCM sync. 0-short, 1-long.
>> +    Default: 0.
>> +
>> +  - pcmsyncmode : PCM sync mode. 0-slave, 1-master.
>> +    Default: 0.
>> +
>> +
>> +Example:
>> +
>> +	brcm4354_bt_uart: brcm4354-bt-uart {
>
> at some point you have to explain to me if Broadcom prefers BCM or BRCM. I can not make heads or tail out of it. My current explanation is the it is BCM for the Bluetooth guys and BRCM for the WiFi guys ;)

That's a nice explanation ;-) Maybe I can give it a shot. First, two 
facts: 1) BRCM is our stock symbol, and 2) our device names are prefixed 
by BCM. So in devicetree specifications we specified the vendor prefix 
as BRCM and (try to) stick to that. The above clearly refers to a device 
so it would probably be better to use bcm4354... there.

>> +		compatible = "brcm,brcm-bt-uart";

The compatible string indeed starts with vendor prefix "brcm,".

>> +		bt-wake-gpios =<&gpio4 30 GPIO_ACTIVE_HIGH>;
>> +		bt-host-wake-gpios =<&gpio4 31 GPIO_ACTIVE_HIGH>;
>> +		tty = "ttyS0”;
>
> This tty one is the one we need to figure out. Could we reference by some node information instead of the assigned device name. If we can reference something in struct device that we know is more consistent, that would be perfect. I mean if the kernel for reason decides to enumerate things in a different order then this might be ttyS1 out of a sudden.

I see your point, but not sure what to do here either. In devicetree you 
could reference the uart node, but I don't know if there is an api in 
the kernel to obtain tty associated with a uart port. I could not find 
it doing quick glance in include/linux/tty.h although the linkage is 
obviously there in the data types.

Regards,
Arend

  reply	other threads:[~2015-06-06  7:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 21:01 [PATCH 0/5] Broadcom Bluetooth UART device driver Ilya Faenson
2015-06-03 21:01 ` [PATCH 1/5] Broadcom Bluetooth UART Device Tree bindings Ilya Faenson
2015-06-06  6:40   ` Marcel Holtmann
2015-06-06  7:41     ` Arend van Spriel [this message]
2015-06-06  8:33       ` Marcel Holtmann
2015-06-06 11:26         ` Arend van Spriel
2015-06-07  7:39           ` Marcel Holtmann
2015-06-03 21:01 ` [PATCH 2/5] Intel based H4 line discipline enhancements Ilya Faenson
2015-06-06  6:36   ` Marcel Holtmann
2015-06-06 15:33     ` Ilya Faenson
2015-06-06 15:40       ` Arend van Spriel
2015-06-06 16:39         ` Marcel Holtmann
2015-06-06 17:48           ` Peter Hurley
2015-06-06 18:24         ` Ilya Faenson
2015-06-06 15:50       ` Marcel Holtmann
2015-06-06 18:25         ` Ilya Faenson
2015-06-03 21:01 ` [PATCH 3/5] Broadcom Bluetooth UART Platform Driver Ilya Faenson
2015-06-04  8:41   ` Frederic Danis
2015-06-03 21:01 ` [PATCH 4/5] Broadcom Bluetooth protocol UART support Ilya Faenson
2015-06-06  6:37   ` Marcel Holtmann
2015-06-06  8:15     ` Arend van Spriel
2015-06-06  8:31       ` Marcel Holtmann
2015-06-06 16:03         ` chanyeol
2015-06-03 21:01 ` [PATCH 5/5] BlueZ Broadcom UART Protocol Ilya Faenson
2015-06-04 10:14   ` Frederic Danis
2015-06-04 11:13     ` Arend van Spriel
2015-06-04  7:44 ` [PATCH 0/5] Broadcom Bluetooth UART device driver Arend van Spriel
2015-06-04 16:00 ` Frederic Danis
2015-06-04 23:46   ` Ilya Faenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5572A40F.9090206@broadcom.com \
    --to=arend@broadcom.com \
    --cc=ifaenson@broadcom.com \
    --cc=jslaby@suse.cz \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).