From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751572AbdFFSwZ (ORCPT ); Tue, 6 Jun 2017 14:52:25 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.162]:34615 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbdFFSuu (ORCPT ); Tue, 6 Jun 2017 14:50:50 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKIDcoID097Q== X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [RFC 0/3] misc: new serdev based drivers for w2sg00x4 GPS module and w2cbw003 wifi/bluetooth From: "H. Nikolaus Schaller" In-Reply-To: Date: Tue, 6 Jun 2017 20:50:39 +0200 Cc: Mark Rutland , =?utf-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Russell King , Thierry Reding , Jonathan Cameron , Maxime Ripard , Jarkko Sakkinen , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-omap , Discussions about the Letux Kernel , kernel@pyra-handheld.com, Marcel Holtmann Message-Id: <5429321F-A126-446B-B679-B98B4366F7A9@goldelico.com> References: <78B1501A-B9AD-4C6E-A481-26F647AA2BCE@goldelico.com> <0D94BEA0-F98D-48F6-9DDC-99F932AE7834@goldelico.com> <889E8F7F-FC0F-490E-B924-D04D9F4D3402@goldelico.com> To: Rob Herring X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v56IqcTl031705 Hi Rob, thanks for all the comments. > Am 25.05.2017 um 14:48 schrieb Rob Herring : > > On Tue, May 23, 2017 at 8:49 AM, H. Nikolaus Schaller wrote: >> Hi Rob, >> >>> Am 23.05.2017 um 15:10 schrieb Rob Herring : >>> >>> +Marcel >> >> Good! >> >> Hm. Well: >> >> root@letux:~# hciconfig hci0 up >> Can't get device info: No such device >> root@letux:~# >> >> I wonder how I can tell hciconfig about the UART port if not by running hciattach /dev/ttyBT0? > > You don't create a tty device. Instead you call > hci_uart_register_device from the serdev probe. I see. That is also brand new API in 4.12. > >>>> Or do you have a link to what you think about? >>> >>> Look at the nokia BT or TI (HCI_LL) BT drivers. Those both have f/w >>> downloading and some GPIO controls. Given that this module is based on >>> Marvell chipset, I'd expect you need to add serdev support to >>> hci_mrvl.c. >> >> The w2cb003 has a Marvell WiFi (libertas) but a CSR Bluetooth side. >> >> It has built-in firmware and already talks serial HCI over simple UART right >> after power-on. This is why our serdev driver has no firmware download. > > Okay, then probably add serdev support to hci_bcsp. In any case, > hci_uart_register_device just needs to register the correct protocol. Hm. I have tried to understand the hci_bcsp stuff but I must admit that we lack quick enough understanding of such magic, to be able to add serdev support with reasonable efforts. Is there a good description how hci_bcsp it works? And I found: BCSP (BlueCore Serial Protocol) is serial protocol for communication between Bluetooth device and host. This protocol is required for non USB Bluetooth devices based on CSR BlueCore chip, including PCMCIA and CF cards. It appears as if the w2cbw003 bluetooth is really based on a BlueCore chip (there are 2 references in http://www.wi2wi.com/mgr/docs/W2CBW003_Datasheet_Rev1.8.pdf ). Therefore it might be possible to use BCSP but that are completely new horizons. But so far we have simply used "hciattach any" mode for years. We also know that the Gumstix Storm uses the same w2cbw wifi/bluetooth combo (omap3-overo-base.dtsi) but there also appears to be no BCSP support in the kernel. BTW: it looks as if they simply turn on bluetooth as soon as WiFi is configured up. So they could be interested in a more precise power management driver like what we propose. Maybe someone who owns an older Gumstix with the same chip (they were phased out in 2015 and replaced by TI modules) can help or jump into this discussion. Thanks and BR, Nikolaus