From patchwork Thu Jan 17 16:54:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 155851 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2193639jaa; Thu, 17 Jan 2019 08:54:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN7jMkizKhxIl/UL8sUb665lqwVc73uz1fZxtGODKvWue4/d/FaYTvczmrahR4Js8xg1B15X X-Received: by 2002:a17:902:12f:: with SMTP id 44mr15895347plb.74.1547744084140; Thu, 17 Jan 2019 08:54:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547744084; cv=none; d=google.com; s=arc-20160816; b=ZL+BW3JeAM37/oXDGsvMUwmvmvlbic2xmBg+zM0Cc5wuauggjOLXEefUsncovQFSQW sCQJgs5L14f874CFbSzDndk/D1tuI8OP3voCqUAp/EDnnvpmuc8+1k2hcbTNbQHj/n9v xQfrc83kenNTTvZTuhKBVuRzo52Yyzh3sjsp934XBKEUmz3Y5HN11LkRLbdEnS4zR6Uj c44ZemK/jouxr49EasZVuXcS5O/dUgUr3APNuIf9tYlFLH0IDEDk40oj9wHjENNUh4yX V8x33Yk/AXMpB+3fJivZg7F0Wsvzn1iaHz+//hTOnp2IKx5RybIBSWh9DBSSbbmipeHD Qykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=guam8jHzK8TRYRb78oVM8jQvkOc1edl/EV41EjO5ZPI=; b=OrMGcMTHV5pMSP1Kl1uqfQT/wYt+Cnkm93rQ6vOVT3g5UShHSn4CCjc+31Rn4oSUgZ cOJ+rdpy02PSvXn4PncmsDORVVWmK2nsbqCvkAfmUS2sF+9sNmC6iFfWQIBgqMahNlbf jBLA3vqGKW6UmqUBzMx76TP6HLIEGLNh5TQx70cjbI6WVNd/X4mK2xnbYqZzxrOGu2Ad czfjKHCotMq0NCpJQwbVX7t1KYQ+lkXaGYeO7+bhgS7j2BvUViMt1JO46Z/5lvPwwYPP RJvAxGVJMOFqOza8YTuclQX9pI6OkB4mGqhtsujZgnCrnZw3ApfE6qD9fL59dHFkpgSJ IYjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=zQVadgvm; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 r4si1843596pgi.387.2019.01.17.08.54.43; Thu, 17 Jan 2019 08:54:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=zQVadgvm; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728867AbfAQQyn (ORCPT + 7 others); Thu, 17 Jan 2019 11:54:43 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36105 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728802AbfAQQyn (ORCPT ); Thu, 17 Jan 2019 11:54:43 -0500 Received: by mail-wm1-f68.google.com with SMTP id p6so1811606wmc.1 for ; Thu, 17 Jan 2019 08:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=guam8jHzK8TRYRb78oVM8jQvkOc1edl/EV41EjO5ZPI=; b=zQVadgvmWN0kg3Iw41u1o+AFKjzYiVvu5IErM0gsdf7HBWaomZcj9Cbu+DvMMXtkU2 Gl1QkYG8Q4/CgFIzWF00/ZNjQzkxAMQ0M3s+y/mN44f1C/h+srIh4XFYFhuXCA/6jKV+ sXOmGgi/+GJmhzh2K2RtIclu1x10IGToNgAcIiea8HYJ/czOFD+2fJB5pM15oVDssMtC K9Te7dX9uqcFGozw2N0XPPAvvKyhImPY7AfFWjMtZSfSPk7XnWzP+qU2uBqnowlxZcL1 BEqc7UZI5et5DHfBR+0zPsiZR8BNXWdNYdsvWXQRvJActaOdmwmxXV2yI4/0qFdniIdY odlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=guam8jHzK8TRYRb78oVM8jQvkOc1edl/EV41EjO5ZPI=; b=pHoMlCFW5ie/l3Brsf3LOspXcFrAJx+27UnOsq8LyevoAt5hc8y4uMPfJUGYafkLfr XSmAF2Rp3TAtoL85paUME/HzWlknxYspaFEbE7Hn1x3IfeuQAe8aG9HiJTLjQpzM8lBu ruGZKPHo50+n9ZwEix+RDGzrXctVbnosarXq97ToZ6jgOm/tBKjmAoIc5Fc/wQ78ds9l lGj/tirf4HOrxZ/F9lqgja+d8F+agNYzuu/K+DmAa5GutzwRCvOqRVoVe+EVPQXR60sf lJnleXLDaBErrgMyFNG+a3diA4aPDOMI/ecuOrN5Nz9H+ajDIRER2k8gEQcXh2/zUsdZ nNsg== X-Gm-Message-State: AJcUuke46TbAPv0BpdryPAHeZ+9edf3xSHMHR5MLyNCeQKG2Dus0+lkM /9sRF2xOpARRRh79H3XuNLkjZTCnG08pg8lpWdg= X-Received: by 2002:a7b:c181:: with SMTP id y1mr12732023wmi.10.1547744080858; Thu, 17 Jan 2019 08:54:40 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.thefacebook.com (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id b12sm65309630wrt.17.2019.01.17.08.54.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jan 2019 08:54:39 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Cc: Loys Ollivier , Rob Herring , Mark Rutland , linux-kernel@vger.kernel.org, Kevin Hilman , linux-amlogic@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Martin Blumenstingl Subject: [PATCH v2 0/4] Add driver for Mediatek-based GNSS receivers Date: Thu, 17 Jan 2019 17:54:30 +0100 Message-Id: <1547744074-28308-1-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, This patch series adds a new GNSS driver for the Mediatek-based GNSS receivers. These receivers transmits NMEA output sequence after boot. Power management can be done via the main supply and optional backup supply as defined in the device tree. The driver has been tested using a GlobalTop pa6h chipset on a Libretech-cc board using the expansion header. Changes made in the board device tree can be found below for reference and testing. Loys Sorry it took so long for the v2. Rebased that serie on 5.0-rc1 and had to send some fixes for the board before testing. Version 2 changes: - driver: Renamed driver from Globaltop/gtop to Mediatek/mtk - driver: Added "mediatek,mt3339" compatible - dt: Renamed bindings from Globaltop to Mediatek - dt: Moved the current-speed property as optional - dt: removed the status line in example - cover-letter: removed the alias that is not needed anymore Loys Ollivier (4): dt-bindings: Add vendor prefix for "GlobalTop Technology, Inc." dt-bindings: gnss: add mediatek binding gnss: add mtk receiver type support gnss: add driver for mediatek receivers .../devicetree/bindings/gnss/mediatek.txt | 39 ++++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/gnss/Kconfig | 13 ++ drivers/gnss/Makefile | 3 + drivers/gnss/core.c | 1 + drivers/gnss/mtk.c | 153 +++++++++++++++++++++ include/linux/gnss.h | 1 + 7 files changed, 211 insertions(+) create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt create mode 100644 drivers/gnss/mtk.c --- pinctrl-names = "default"; }; +/* This is brought out on the UART_A_TX (8) and UART_A_RX (10) pins: */ +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>; + pinctrl-names = "default"; + + gnss { + compatible = "globaltop,pa6h"; + v-bckp-supply = <&vcc_3v3>; + vcc-supply = <&vcc_3v3>; + current-speed = <9600>; + }; +}; + &usb0 { status = "okay"; }; -- 2.7.4 Reviewed-by: Rob Herring diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts index 90a56af967a7..3b3d4dcc47aa 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts @@ -17,6 +17,7 @@ aliases { serial0 = &uart_AO; ethernet0 = ðmac; }; @@ -269,7 +270,20 @@