From patchwork Mon Jan 28 16:37:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10784007 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 6906B746 for ; Mon, 28 Jan 2019 16:38:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55B952B72F for ; Mon, 28 Jan 2019 16:38:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48AD12BB7B; Mon, 28 Jan 2019 16:38:16 +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 B1A5F2B72F for ; Mon, 28 Jan 2019 16:38:15 +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=1QeySeCsBybNdCsGd3BueoxMd2TykyANoh6gFkjn0sw=; b=LgU ha4t/uqxFTaVTqPuiCBUH4VurC53j6zctZn3rvXcKB0eb8o1mYBZlll7pqUpBL1qO2NSDtviGodF1 Bi/x+5OnkZ9Z+HeIFvwQfscjJ75l+BTptim+cr/+u8zdWf+D4g72a5qJEpGAeBhH/RdmvkrQng8JM 0PKkvWReVKnNzzV2MBc4vs3sBrD8zwdBkUz1SjQe/Z/9sdNcVqSHk8tOO/NGojuN50bFKEudOvUgH KQujsORXb3xR326LyTAT6RGs4/Orq47GV2NFsjh3dI2cPwDDSzmQQ14g3I0BVvH50bAUTyUzJz/ql Yjnk8PKrdaOWIk2EdE4h0Y89TRmQzJg==; 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 1go9vI-0006n4-Fk; Mon, 28 Jan 2019 16:38:12 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1go9vD-0006iL-81 for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 16:38:09 +0000 Received: by mail-wr1-x444.google.com with SMTP id u4so18804923wrp.3 for ; Mon, 28 Jan 2019 08:38:07 -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=L7bmc/MKBpCEs68YcmIGpGX/6J5igsqYwSDPtXbpF5I=; b=yzIDRLO9X+802YPKhcWAQgT3HiXDB380oqYdqf6CP1G19Qkvqfbs58ODce5fIKqtNa eDnwsGju3DQS4WTAt09TRz+ANV1Wi+Ti1M9Ajro2biB5h3AbGNeHOATtrroDIwBfM8FJ z3U2ckMCCPgEYHVoqsLKtmtQHO4RJD9wGqQX+nxlEC80cMLJtyLZhdUDC+fkR13/mvpM YJTUK4Aa74JoWrl0LpImzYg0mdrfcgNAq76di6GBU0q+2SEal1IUcPR2fyqfIEtk5G1N hoCj+M/CpkRVFiLa8K+q0g0zu7c+UOiQvY39wngNKGB8IyFCO9n+346yAcy93jGXn9bb XN2Q== 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=L7bmc/MKBpCEs68YcmIGpGX/6J5igsqYwSDPtXbpF5I=; b=Va3XmdTltWe6NWf3jyJfvgdybKil9OzVQGtJ5LfhT9D9vb8lhqDSgMdX8KGXbbURW/ E0PAXhcmwNHhOcsotCZYfIlmWv6TkOJdR9oNnKiPetiX5aQSs+WcycU2DkxEIlFbO4LD ycO2vC4xvGyR11756D9aVhM0t2+n8nupp+Qt+zF6me0JAQ8Tbm3pjX4sVe7igNscnHaI Uhdub26V+chOu2dRxux/3nl50e28NoS66Oyq1uWajJEgByydnKLz6xdO3OXh9KUzfVg3 DxsjNBhW3FUwQVM7vw8UaDbraAS4OkIYwNbVg7m+WmUsk/qI6kNQCJ/0+MVTT2EBmN6N cH5g== X-Gm-Message-State: AJcUukdQwIkn/VhsaBBm9DUa8KPj94vvD6ZAA2d+xmd0buTQcZ8CQmYB OosmRZHV2J1VKNzBMTbml7+NHw== X-Google-Smtp-Source: ALg8bN6/AeMbB9ztw2/OPA4aRkoO7jNQPii37d8PbkqqGlfnMk8N/2tBzzZxaU1owHOurlYxWl9Q3Q== X-Received: by 2002:a5d:6b81:: with SMTP id n1mr24066949wrx.149.1548693485628; Mon, 28 Jan 2019 08:38:05 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.thefacebook.com ([2620:10d:c092:180::1:d40b]) by smtp.googlemail.com with ESMTPSA id s3sm52388982wmj.23.2019.01.28.08.38.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 08:38:05 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v3 0/4] Add driver for Mediatek-based GNSS receivers Date: Mon, 28 Jan 2019 17:37:57 +0100 Message-Id: <1548693481-1162-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-20190128_083807_297712_30BFB13A X-CRM114-Status: GOOD ( 18.45 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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 3 changes: - 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 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 @@