From patchwork Wed Feb 13 15:09:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10810131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3559D1390 for ; Wed, 13 Feb 2019 15:09:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F13A2D48E for ; Wed, 13 Feb 2019 15:09:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12F8E2D5FC; Wed, 13 Feb 2019 15:09:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4D4572D48E for ; Wed, 13 Feb 2019 15:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=1lVU/OgrmZE8ONBu37PJ7kJj2uCtSYA5Lw5gNkCsIf8=; b=dfp n8Xu8kwWLQZlyQ3HHvu5l7Wv6BmxgnuJ59/YJnaRzksxuQcF7IIRx2mnHLCkYgbxtSMQHFBNFIOZK I5qpT2WGcE2bnhbuymJdUE5wZYztotbNq8kMwA0+/fye/gEpLPpffrF82JI3FB33PwFdxJO5sA5KZ ZAqzIrcfjk3I3ei/dkXjgrGfE3tbxVj7UI2fhiln/4XAdtz49aR4yOEJz7XzwZu/RwwXaQM6pwdbi v/xKIAfOpuerz6Yk8K82nvSrc9H2cCOyyjSE1Fqe/VJOdAInJaVCtQcG+BC20voEmFY9xfQzFjSTH P5osa8kg83RdXbop2u75hKISM6T9H8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtwAP-0005dd-PE; Wed, 13 Feb 2019 15:09:41 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtwAM-0005c6-MI for linux-amlogic@lists.infradead.org; Wed, 13 Feb 2019 15:09:40 +0000 Received: by mail-ed1-x543.google.com with SMTP id r15so2202966eds.9 for ; Wed, 13 Feb 2019 07:09:37 -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=mi2mVO/IJ0Uh7+nXJ3rnWhD82EEtsEXYmxE78KRe3ZM=; b=I8nkF1FiJxzndm/qA8SZLIzVcJjdecl3ZazI0iWa0o8ycJ8/AKOhamKC1l0uqkbpm0 UtLth7fQrN+O9JCyRYeo1m3v9kwqmrs5gHfOI1JZBm4f7ZgGlNEwyh8UJDTMkbIDvUvx u83v+zfX3OF8jzrKRmr0987RfX8KxnIGYDRIhBydp4S8+awIfe4UqZCeMKldreLvozRx BgjU6CoUYZvR4h5LyACk81U1psflIsok0ft39/QTSYX2HUG15OGWtJe+EH+Flskk5t+B Rn99NHTsZnMEvM9LzDpw+xk3ZBSovsL5usLz9Bh6VRgbyIy5xDgf/q2CI7pwcxL90JdO RRHA== 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=mi2mVO/IJ0Uh7+nXJ3rnWhD82EEtsEXYmxE78KRe3ZM=; b=qOkZEW6mnyUBn2LZ0sv+5BO2qdz7bgDty71uceyjWWzIpYQ6dEq6FDfEHGliFP6Bqy TjKR7RPANZsRE7oJq+TfuMnLhI5KIiBKrbogHZRvbVhbIUKEmrGWBp989ctxWJkBcnf9 +f/alP+ct7Sb5pAYhnuo6I/2ZVzmmZh309afamNEBysmexkMaFbyHtMnDFhJci1kwMe4 Vr+BRhwPiGfsN/SxuYT5BSRdhAStI4XjQVUZZI6giYsWn6a0hGabaBt0UIIqRQ4yQjdV lUTVmTvWf3ITNmjD79Zx/8Q8+A/o2i8Apqh5UoLX7M2eGsWduYg6lqP3B+FAP8A1T4rY //tg== X-Gm-Message-State: AHQUAuZ1AVvM+vTJsuQZWwIkpH1oskt2ma3M5Yko/t1busgnpLIgA7+7 UiJhZ955umvLAhTR0nVEQwEExw== X-Google-Smtp-Source: AHgI3IYrToBTVbuymH9nBQVGfsAKwDtKVKpFVDGMYMHu+JadPkEDHCthNxuAzpLOroxNh7tq/4H9Hg== X-Received: by 2002:a50:c408:: with SMTP id v8mr778469edf.144.1550070576370; Wed, 13 Feb 2019 07:09:36 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.thefacebook.com ([2620:10d:c092:180::1:4505]) by smtp.googlemail.com with ESMTPSA id k26sm1903941ejv.63.2019.02.13.07.09.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Feb 2019 07:09:35 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v4 0/4] Add driver for Mediatek-based GNSS receivers Date: Wed, 13 Feb 2019 16:09:25 +0100 Message-Id: <1550070569-18588-1-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190213_070938_779461_5B6018FC X-CRM114-Status: GOOD ( 16.77 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Martin Blumenstingl , Kevin Hilman , Loys Ollivier , linux-kernel@vger.kernel.org, Rob Herring , linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Version 4 changes: - dt: bindings: use standard name "reset-gpios" - dt: bindings: use standard name "gnss-fix-gpios" - dt: bindings: s/an/a UART Version 3 changes [0]: - driver: Removed "mediatek,mt3339" compatible - driver: moved gnss_types_names string diff in the GNSS_TYPE patch - driver: edited [patch 3/4] commit message to remove ref to vendor protocol - driver: retained the original copyright - dt: removed interfaces that are not available on the globaltop SoC - dt: Added missing pins documentation - dt: added optional properties pin names 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 [0]: https://lkml.kernel.org/r/1548693481-1162-1-git-send-email-lollivier@baylibre.com 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 | 37 +++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/gnss/Kconfig | 13 ++ drivers/gnss/Makefile | 3 + drivers/gnss/core.c | 1 + drivers/gnss/mtk.c | 152 +++++++++++++++++++++ include/linux/gnss.h | 1 + 7 files changed, 208 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"; }; 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 @@