Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2578730rdh; Sun, 26 Nov 2023 11:19:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVlAvxi5f74/BpZxbmKx7QYUVYmMem5rFJ5qGUNvRcJNF8aHapV47scDGlmFvj6RKldFKU X-Received: by 2002:a05:6a21:6d86:b0:18c:fc4:df21 with SMTP id wl6-20020a056a216d8600b0018c0fc4df21mr11999706pzb.5.1701026379057; Sun, 26 Nov 2023 11:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701026379; cv=none; d=google.com; s=arc-20160816; b=T2R6HC7bKoMKfFjVMAIUpfB1xgfI7kotM+Ugz1zv/MzJwcIMyu7YoGMsY+G7kisjTM 1GuN4dZLIVKaxa1s3votyXuh0vHiBnkU+zoN/xn69zQ0Jr/2hkh5KsPQa/dBtPlg0UIt DGAhormpI22WAnimfThagOnzMUB5xnaEMjYPuhi3UISItN/3Wt7d1zuRDrBjs7yPp4M/ xzs7HQV/KOu7bA9MdHQhfTrfhgs0hVwqmnGwy649Kdqj1VhK97p4dfgGZ2nJ4fxMVLEf IY1M3q+Ud+/SO73BCAhJEKrhWBJ8bPJcMzP2lO/ME5hH0/3LJfrZooEJUcRCW4XWe5nQ RLnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=apgBj4p6Jvd1gTRA9jIDachs46/x3NsygBduqrhAJ68=; fh=LG9dKayB47Aw5OhgE4A33oFKes3+TtS9nbezIo8wrtw=; b=gI5S+dPnuSPlbZ9cTaN+aZ8Kot3gkJkh3F0kxMg/lx+yCpIAO1E5EwqSjA+RigHZsu 3CVgHqQ5/k9OWoGPDsw6Bjrzqac2o92s2rnu488mF97u+feb+PGgxFfOUF+n3LEtZm+0 6R01P2G9YvhGeq5G4StVR6bNL93N9d0XI4TzZr2+UxULAaan4tBwan+1kZcPdaIEIYnG F2s+yq/zSuBCg7CWiRGnAhcxVpHGopc3a9OEqG9D3HYDB7NF7oCC20V4BeSMTJlQ7q/u nWe0FzR9VYrilsdTuK65RZ2MbQA4V57iZ2ntYsSQ8gz/jTocN2OStUkmRAPCIASmiljH OuTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s8-20020a056a0008c800b006b5c34a0c8csi8435454pfu.251.2023.11.26.11.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 11:19:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A3303807D41E; Sun, 26 Nov 2023 11:19:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbjKZTSw (ORCPT + 99 others); Sun, 26 Nov 2023 14:18:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKZTSs (ORCPT ); Sun, 26 Nov 2023 14:18:48 -0500 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34132FB for ; Sun, 26 Nov 2023 11:18:53 -0800 (PST) Received: from p200301077700a9001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:107:7700:a900:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7KeS-006khO-Q3; Sun, 26 Nov 2023 20:18:44 +0100 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1r7KeR-000Slb-0I; Sun, 26 Nov 2023 20:18:43 +0100 From: Andreas Kemnade To: marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, johan@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, andreas@kemnade.info, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, tomi.valkeinen@ideasonboard.com, Tony Lindgren , =?UTF-8?q?P=C3=A9ter=20Ujfalusi?= , robh@kernel.org Subject: [RFC PATCH 0/3] bluetooth/gnss: GNSS support for TiWi chips Date: Sun, 26 Nov 2023 20:18:37 +0100 Message-Id: <20231126191840.110564-1-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 26 Nov 2023 11:19:08 -0800 (PST) Some of these chips have GNSS support. In some vendor kernels a driver on top of misc/ti-st can be found providing a /dev/tigps device which speaks the secretive Air Independent Interface (AI2) protocol. Implement something comparable as a GNSS interface. With some userspace tools a proof-of-concept can be shown. A position can be successfully read out. Basic properties of the protocol are understood. This was tested on the Epson Moverio BT-200. This is sent out as an early RFC to ensure I am going onto the right track: So the main questions I see: - is the approach right to abandon drivers/misc/ti-st? - Output at /dev/gnssX: AI2 vs. NMEA The chip can be configured into sending AI2-encapsulated NMEA, or proving data in a binary format. Some research has to be done yet for the details. A pile of logs is waiting for further analysis... Arguments for/against NMEA: + Userspace is prepared to handle it + Power management can be easily done by the kernel - Less functionality can be used. Arguments for/against AI2: + Full functionality can be accessed from userspace (incl. A-GPS, maybe raw satellite data) - Userspace has to behave to have proper power management - No freely (not even as in beer) tool available to fully use AI2, so there will be only a real advantage after long "French Cafe" sessions. More detailed tings: - Some live cycle management is left out. Since it depends on the decisions above, I have not put much thought into it. - Should some pieces go into drivers/gnss? - detection for GNSS availability: For now the node name is used. But the device should be there if the chip supports it and things are wired up properly. Andreas Kemnade (3): gnss: Add AI2 protocol used by some TI combo chips. bluetooth: ti-st: add GNSS support for TI Wilink chips drivers: misc: ti-st: begin to deorbit drivers/bluetooth/hci_ll.c | 154 ++++++++++++++++++++++++++++++++++++- drivers/gnss/core.c | 1 + drivers/misc/ti-st/Kconfig | 2 +- include/linux/gnss.h | 1 + 4 files changed, 156 insertions(+), 2 deletions(-) -- 2.39.2