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: 10810135 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 E69821390 for ; Wed, 13 Feb 2019 15:09:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1D9B2D41F for ; Wed, 13 Feb 2019 15:09:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C60CA2D5FC; Wed, 13 Feb 2019 15:09:52 +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=unavailable 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 744C62D41F for ; Wed, 13 Feb 2019 15:09:52 +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=maKjGjJVPKiuoXDAvDi3PawaeSzIat5MGVVlBv/qt2A=; b=eZX rdR14Gpl62jeu06t7BCJlrPKNJAMfpJmcY7+HGVGG9pErXE2xRkT5YDyI5iacj0d+gFapjhzaFAzG qgK1wQ2JRazf1brsyR3JkmmTkK1MAd5qRqcZmSePv/NNjcU/HV+FlVkJKp7KzlZ/nwbSzR7LKc8wx wEnpAXhGRIAx1S+/HvFcRSHL9m4fhT2Pc+yjUpO9fjW+txEXs3Zbqt5if0HcKrOh4do5Hjp82VYqD MFXqmqnj+UorCG+bXLKRGRdVYRhvX0fZ4lpRAyqk0iRjWBa2Hht1/LLd8/2NCeuPRBZ7x2xGf1cZi 373JkH9bZRFalFkNFkyRom97xp3Afzg==; 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 1gtwAT-0005hW-IP; Wed, 13 Feb 2019 15:09:45 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtwAM-0005c5-Me for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2019 15:09:42 +0000 Received: by mail-ed1-x542.google.com with SMTP id b17so2236721eds.2 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=goGRFgXyNoS+aoLYHGAH9lXdj1gVlzuYoswvw48PqsetUS8pj91+sKYzDKKfK2UMbe R1O171s+fyrr9lL41LevA1a5DXKdedQRmOpKZZBahgyY5pCTNX2JxUs7EX+4Cj7ETd1Y DDwRcl39YBkMaw+90H9igzRLzwQFw/ra0aFeFtg183WkngXBro6y8LRWZ+CGKsVnZuih XJgozYGf1a5P2L+E1OLc1xvNa2SuYJuXqo725HO781iykTM7zljdP11i1i9w22mIDvC/ UpTij4cEYIzg+E8eg7EIcP0OsWsMxhP4j14oDMhzYZyD1Bp1N/Y+VSUVIV/j1z1wqlm7 N1hA== X-Gm-Message-State: AHQUAuYazS8HEZz5HugqHxNQB/peMP4ydOWJjf/qh4xPP/BZXM5X4MFu qSqX/pmusWCHhxp0whpqvcxUcw== 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_780260_A715F76D X-CRM114-Status: GOOD ( 18.34 ) 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 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 @@