Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5538057imu; Tue, 13 Nov 2018 08:03:51 -0800 (PST) X-Google-Smtp-Source: AJdET5fAI/VoD8wTvpoWvTVwhIiPMPwP+M2NrPk5V3imnGWp6iKIBOyaF/J3CJZt7T2ED5ORENUk X-Received: by 2002:a63:413:: with SMTP id 19mr5185467pge.7.1542125031242; Tue, 13 Nov 2018 08:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542125031; cv=none; d=google.com; s=arc-20160816; b=kWGQU0Z3XfILny3QawSrQ7RJ7pxFwFFERHHLxCei110SvwHDA2AKtUUgwn0Ej1QxiC kH1DreiGuVl6VTKPn4B29S6S3Yn0od3c9kFRHs+EX5jcaLPZICHpUcSgziVKtHJ5grQ2 VkG487duXKCyQQbA3sGUMGy1gIA+I8we2a/qTVBqQNaWil3S4qcScHBZmXI1Omvj0Nz3 6Y5IEhUusK+PXWqLmd/TFQkYdpGuKVlFUj5CpwXmuAhRqAOc1GYIv/vTuWDo2FkNI9uv 9//xamMR8SJXkfvDuCLvjoemSKO04WK0WrpbNIvk8C9zFqapiYIXLYLjQTJlN4Damfg6 6YAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=VQssOANATFsGw4L5A82QdDx12Yme6rB94QmRny/G5r8=; b=VUYtdUqD5DPx/VTdhIgRpJtebvpfDgOiDAZSWgn81yW2oKSaDcIhv4mE+h1X4yxflX IH4uKOBlqqxkQmxnJl/xs0uLXOGBc5KpmlLW3fIM5ae1fO0N2peG6A5VA0BAXQVjVQ/s CCwgNEL08D4ndyV9EXRj+LgGhP7xPEZiTugM3fFngKXinqHGYxxSKQtJWEKwDjkc1pRT s0aw+a++Skrn5PA3sK0HbH0s6T5NEyaWmsP8/GL+mf8Z6bjBk6M/vxKgWJbbw4zaDZwo jv0jdKYoQ+D6aSrqvUMELzSxzzl3SojOKQRP2Atqc3DDd5q/fCQm/RABWl7sESj6UO7z Ff/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=ZANlDEpC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y27si19419879pga.459.2018.11.13.08.03.10; Tue, 13 Nov 2018 08:03:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=ZANlDEpC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388124AbeKNCAy (ORCPT + 99 others); Tue, 13 Nov 2018 21:00:54 -0500 Received: from mail.andi.de1.cc ([85.214.239.24]:36058 "EHLO h2641619.stratoserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387659AbeKNCAy (ORCPT ); Tue, 13 Nov 2018 21:00:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VQssOANATFsGw4L5A82QdDx12Yme6rB94QmRny/G5r8=; b=ZANlDEpCGjujNvIeGMJ0TGSvp nylB94BoFVB1pV/Tsft8fJ8TxpWvSTzj349NgJGfwVgm0P9A+HPrVUF0wX4RKD2T7ZBaKpz18s52b mwurMeJcfMLls1JjnwOytgMwz3srs+LFtS3rwFs1kCPtTqloxdW3KJR3KVsFeOiDL7CrU=; Received: from x590fecab.dyn.telefonica.de ([89.15.236.171] helo=localhost) by h2641619.stratoserver.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gMb8h-0001Pb-0g; Tue, 13 Nov 2018 17:02:07 +0100 Received: from localhost ([::1]) by localhost with esmtp (Exim 4.89) (envelope-from ) id 1gMb8d-0001y2-R7; Tue, 13 Nov 2018 17:02:03 +0100 Date: Tue, 13 Nov 2018 17:01:28 +0100 From: Andreas Kemnade To: Rob Herring Cc: sebastian.reichel@collabora.com, hns@goldelico.com, devicetree@vger.kernel.org, johan.hedberg@gmail.com, marcel@holtmann.org, Linux Kernel Mailing List , linux-bluetooth@vger.kernel.org, letux-kernel@openphoenux.org Subject: Re: [Letux-kernel] [PATCH RFC] bluetooth: add uart h4 devices via serdev/devicetree Message-ID: <20181113170128.0f59ef0e@kemnade.info> In-Reply-To: References: <20181110232034.17277-1-andreas@kemnade.info> <20181111024648.7rt7rlhaqihtqecv@earth.universe> <20181112215812.18ebca35@aktux> <2C74C837-A6D3-47C9-BE59-CCA594289B94@goldelico.com> <20181112222726.73m2oca7hankvcjs@earth.universe> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/j5HQM3BtDpk6Uv4sir_Rhdt"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/j5HQM3BtDpk6Uv4sir_Rhdt Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 12 Nov 2018 18:17:38 -0600 Rob Herring wrote: > On Mon, Nov 12, 2018 at 4:27 PM Sebastian Reichel > wrote: > > > > Hi, > > > > On Mon, Nov 12, 2018 at 10:19:02PM +0100, H. Nikolaus Schaller wrote: = =20 > > > > Am 12.11.2018 um 21:59 schrieb Andreas Kemnade : > > > > On Sun, 11 Nov 2018 03:46:48 +0100 > > > > Sebastian Reichel wrote: =20 > > > >> On Sun, Nov 11, 2018 at 12:20:34AM +0100, Andreas Kemnade wrote: = =20 > > > >>> 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 > > > >>> --- =20 > > > >> > > > >> Patch looks good to me, just one note > > > >> =20 > > > > I found one thing myself: > > > > Shouldn't we have a generic compatible string like "generic-h4". > > > > ehci-platform.c has for example: > > > > { .compatible =3D "generic-ehci", }, =20 > > > > > > 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. =20 >=20 > It will not because that doesn't define clocks, resets, gpios, > supplies, etc. and the interactions of all those. >=20 well, we need a simple supply being on when the device is on. Nothing more. > > My suggestion is to use this in DT: > > > > compatible =3D "wi2wi,w2cbw003-bluetooth", ""; > > 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. =20 >=20 > Any idea how many H4 devices there are? Somehow I doubt there are that > many to be unmanageable. >=20 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.=20 Regards, Andreas --Sig_/j5HQM3BtDpk6Uv4sir_Rhdt Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE7sDbhY5mwNpwYgrAfb1qx03ikyQFAlvq9VgACgkQfb1qx03i kyS5nBAAxlvnsfTEFAxI0BcKanS38HpbBcXP8k1/aPlkYpgHeVPGgZeyd8Cj1aGn e8gdITUsT2IA3Jlph2V2+W+QuHynUaW+pZgsvVJ8EwgxHoUqhcw4EgghkerHHnLf /ykN/hNS9Pz+PeDJz4mmVl6bqjD0T494GVfR63Z1iQXmvaK3QgsbKC5N+q8kZqgx JMdbS2ZRrF7gvoyfNtzP390hmqcZ+UpN3p5Dx6Lm6pM/SzI9Gt+3z8qYwnw3Qg4r EWlg/Hmj6xDQnS1J8rPCBA2VCFOLP2EgEc+kr+HpND/mXrpfw5gClBXVKd+X9XWO I2ZubzUTy5mE7xHpAhJT0e8B66CfZ1Kb/hmnLY941N24nqoB5ynu1/JZiXsn304r 6HHMwdsY5+Dsxrc7zvA4s8g322vIMR5Zx0FDD4n+1mryBRPJL/b4iiComnyTgBxQ rJA5nYKc8GRN8QsOGpFGL2r2YphSAGnwa8H/616jxvZhzqH0CO6D0OAY6wP6tF71 C96bnoXS8XXbpID8jbFMbPjil4AEGiNX3plUNUe0viFqhz6x4kYqI0FYKuZW+8qA 7jwYVkQy9QXVw91COg0KAUkGXfYhQAapeTKPhHtI75Xpq9xoAXTRKHw77+HreZjs zdafAAz9IhXG0cilaGbNxtEUU5iRAhAQkfe7rYrITcw0Nn/472c= =/9mK -----END PGP SIGNATURE----- --Sig_/j5HQM3BtDpk6Uv4sir_Rhdt--