devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Rob Herring <robh@kernel.org>,
	sebastian.reichel@collabora.com, hns@goldelico.com,
	devicetree@vger.kernel.org,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-bluetooth@vger.kernel.org, letux-kernel@openphoenux.org
Subject: Re: [Letux-kernel] [PATCH RFC] bluetooth: add uart h4 devices via serdev/devicetree
Date: Wed, 14 Nov 2018 12:13:12 +0100	[thread overview]
Message-ID: <20181114121312.53362ad3@kemnade.info> (raw)
In-Reply-To: <86A3A2E6-FC89-42FE-8410-9C8273EC9CF7@holtmann.org>

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

On Wed, 14 Nov 2018 08:51:17 +0100
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Andreas,
> 
> >>>>> Am 12.11.2018 um 21:59 schrieb Andreas Kemnade <andreas@kemnade.info>:
> >>>>> On Sun, 11 Nov 2018 03:46:48 +0100
> >>>>> Sebastian Reichel <sebastian.reichel@collabora.com> wrote:    
> >>>>>> On Sun, Nov 11, 2018 at 12:20:34AM +0100, Andreas Kemnade wrote:    
> >>>>>>> This is a first try to be able to use h4 devices specified in
> >>>>>>> the devicetree, so you do not need to call hciattach and
> >>>>>>> it can be automatically probed.
> >>>>>>> 
> >>>>>>> Of course, proper devicetree bindings documentation is
> >>>>>>> missing. And also you would extend that by regulator/
> >>>>>>> enable gpio settings.
> >>>>>>> 
> >>>>>>> But before proceeding further it should be checked if the
> >>>>>>> general way of doing things is right.
> >>>>>>> 
> >>>>>>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> >>>>>>> ---    
> >>>>>> 
> >>>>>> Patch looks good to me, just one note
> >>>>>>   
> >>>>> I found one thing myself:
> >>>>> Shouldn't we have a generic compatible string like "generic-h4".
> >>>>> ehci-platform.c has for example:
> >>>>>       { .compatible = "generic-ehci", },    
> >>>> 
> >>>> There might be differences in h4 compatible devices (e.g. default
> >>>> baud rate) so that I would not bet there a "generic-h4" suffices
> >>>> in the long run.    
> >> 
> >> It will not because that doesn't define clocks, resets, gpios,
> >> supplies, etc. and the interactions of all those.
> >>   
> > well, we need a simple supply being on when the device is on.
> > Nothing more.
> >   
> >>> My suggestion is to use this in DT:
> >>> 
> >>> compatible = "wi2wi,w2cbw003-bluetooth", "<something generic>";
> >>>   
> > That would be my slight preference here.
> >   
> >>> The driver can start with supporting just the generic compatible
> >>> string. If somebody finds some incompatible differences, the driver
> >>> can add a custom handler for the wi2wi chip without breaking DT
> >>> ABI.    
> >> 
> >> Any idea how many H4 devices there are? Somehow I doubt there are that
> >> many to be unmanageable.
> >>   
> > Well, many devices are h4 devices with some more or less important
> > vendor-specific commands. Well, "hciattach any" uses simple h4 protocol.
> > 
> > those firmware download commands and they have their own drivers.
> > Most devices I had used bluetooth uart from the command line with, were
> > simple enough. The other question is whether those devices will run a
> > modern kernel.
> > 
> > No strong opinion here.   
> 
> doing the firmware load from user space via some magic tool is no longer going to work smoothly. It will be actually almost impossible with serdev. However I did post btuart.c driver which is pretty much just plain H:4. You would still somehow define the default baudraute since just picking 115200 is not always going to work.
> 
Just to avoid some misunderstandings here. With this RFC patch I have only
devices in mind where we do not know any vendor specific commands and
do not need to do any firmware download.

> Btw. I see nothing standing in the way of merging btuart.c driver and then go from there. Either I dig this out and submit or someone else does.
> 
Seems to be a good idea. So in the end I should not continue
that rtc patch?

And that thing has than a devicetree string of
"h4-generic" or a list of generic h4 devices?

Regards,
Andreas

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

  reply	other threads:[~2018-11-14 11:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 23:20 [PATCH RFC] bluetooth: add uart h4 devices via serdev/devicetree Andreas Kemnade
2018-11-11  2:46 ` Sebastian Reichel
2018-11-12 20:59   ` Andreas Kemnade
2018-11-12 21:19     ` [Letux-kernel] " H. Nikolaus Schaller
2018-11-12 22:27       ` Sebastian Reichel
2018-11-13  0:17         ` Rob Herring
2018-11-13 16:01           ` Andreas Kemnade
2018-11-14  7:51             ` Marcel Holtmann
2018-11-14 11:13               ` Andreas Kemnade [this message]
2018-11-16 19:46               ` Andreas Kemnade
2018-11-16 19:58                 ` Marcel Holtmann
2019-01-04  5:44                   ` Andreas Kemnade
2019-01-04  9:07                     ` Marcel Holtmann
2019-01-04 19:57                       ` Andreas Kemnade
2019-01-12 11:16                         ` Jon Nettleton
2019-01-12 12:15                           ` H. Nikolaus Schaller

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=20181114121312.53362ad3@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=johan.hedberg@gmail.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    /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).