From patchwork Fri Dec 28 10:50:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10744419 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 907AD6C5 for ; Fri, 28 Dec 2018 10:51:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81A5028B12 for ; Fri, 28 Dec 2018 10:51:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74F7528BBD; Fri, 28 Dec 2018 10:51:33 +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 313B428B12 for ; Fri, 28 Dec 2018 10:51:33 +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:References: In-Reply-To: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:List-Owner; bh=2t7UbCgaGhQX4u4ZShGKJWkZojYiFv2AAIwwDEopYKs=; b=EVOZ++V8DzrP8xx93Fbmr/Q7GJ VFduMWDxpuPKwsXfRH7L5IZ1VVqR+3/yn4iEGUnzqnLmznHgXPFaCYc0usdS26+dOehbcWRO57a61 c96FOYOZHrQExij93yikYlJQPtTQxggM83aIY7cMkfWDOc1As6BrwDMS9fHxPHMM7RshU46CrSKyJ 4LEG/jaiwFg0W+XpzIk49KVfZguAAqDKxQzaYMl7wFJeM8/LZYaCHATXIAAHJGk/yBUZrmd8+eNnD hazOyUyIjPFbVzLyW7ESvp6Rj2+UfDMAVerDHRAjZEq/c/wrb62sjFVuweJliK0Hl2KmRynufZhSD dELac7cA==; 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 1gcpjo-0001xD-9Y; Fri, 28 Dec 2018 10:51:32 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcpjk-0001sG-JH for linux-amlogic@lists.infradead.org; Fri, 28 Dec 2018 10:51:30 +0000 Received: by mail-ed1-x541.google.com with SMTP id d39so17213361edb.12 for ; Fri, 28 Dec 2018 02:51:18 -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:in-reply-to:references; bh=R7MS0Uj6TV3IGRKuWXxgSYM6zp8WuEpgDa+p4giEhME=; b=yZdVqtTY4hdZe8hkiWJ/OnLpqWTsMeOY81l02Veg7pb8pTkRRNxSllQmrLi27gS29v KS1pa+U4IuZK3PlGmOrms/cxlyJuEXrEI0wQX5Zz5Rk9pkKP1HLIerb/2HphlYATFHeb TxpehEIX06Ki39IRnOiHgWkeMnldKz69VDYjv0xKUdi9yJyRjf+dXAu9catVnVOZbWVW zUmulG9Pc2/9WSqSNTKfMfBMoZoFZoWCCDbInX4g4ArbP/7ErQ8i6jLt3ZKtkdlUkXD9 BmgwGYWS/ZP8FKkSEKxM2bRI7OQmJdvC1jlYuWirVrjn5i5s1jMEknMshiICXb2gES02 b37w== 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:in-reply-to :references; bh=R7MS0Uj6TV3IGRKuWXxgSYM6zp8WuEpgDa+p4giEhME=; b=f1gtSrKFjTQsVX5GchkkvfvLwNuEpaIoDUezEW0d49T+MADBMPTBnwsGPXU5ivhrUe zTM9wwmtlenR2vP3AVqUgOUWGMFEKxUOldeO8VneU64os240kMtXWltgyWQDu8xMLTTb qT5iPiCCBFRKq5EtIeV6fXQF2m9QORaennx+qYJR6TJmoYNzdJaet9GA35EwlvJ5knoh 4UQQWNffVAwfPTyKfe+NRC6k3mvMykHxwP2WPHT9VUMM/BB1y/3iWufvJGJIDr4a36GE p5c5gM9EEKjfkM5OX+Jvdlz2KZ74gZ/JZBBqUrYM49ZOuDYQ8oNg8bwFK3/tZhXgB5Tq vVtg== X-Gm-Message-State: AA+aEWZlwbTKxbSZGpYSzOgceznruEA4RcOtfiRm1rcyNeBi1vY4Mets ldgfOdonaJn6eTcpS942NrsBgg== X-Google-Smtp-Source: AFSGD/WkcjQjw5oTUruL7JeZA3mZvu0230sCi2ShPckzaEfx8suGNY1wnf1tdaDpB7CBxiFGzh4alA== X-Received: by 2002:a17:906:51d4:: with SMTP id v20-v6mr18411872ejk.184.1545994276866; Fri, 28 Dec 2018 02:51:16 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.home (anice-157-1-157-17.w83-201.abo.wanadoo.fr. [83.201.132.17]) by smtp.googlemail.com with ESMTPSA id b45sm12919494eda.34.2018.12.28.02.51.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Dec 2018 02:51:16 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH 1/4] dt-bindings: Add vendor prefix for "GlobalTop Technology, Inc." Date: Fri, 28 Dec 2018 11:50:32 +0100 Message-Id: <1545994235-8309-2-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> References: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181228_025128_894098_EF3920D4 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. 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 , Kevin Hilman , Loys Ollivier , linux-kernel@vger.kernel.org, Rob Herring , linux-amlogic@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 Add globaltop vendor definition. Signed-off-by: Loys Ollivier --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 4b1a2a8fcc16..a9214767afa8 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -153,6 +153,7 @@ goodix Shenzhen Huiding Technology Co., Ltd. google Google, Inc. grinn Grinn grmn Garmin Limited +globaltop GlobalTop Technology, Inc. gumstix Gumstix, Inc. gw Gateworks Corporation hannstar HannStar Display Corporation From patchwork Fri Dec 28 10:50:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10744417 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 367AD6C5 for ; Fri, 28 Dec 2018 10:51:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21F3928BBD for ; Fri, 28 Dec 2018 10:51:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12D6028BC0; Fri, 28 Dec 2018 10:51:29 +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 3CAC028B12 for ; Fri, 28 Dec 2018 10:51:28 +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:References: In-Reply-To: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:List-Owner; bh=BL9ORrZx+be/SN06kzanKGE1M0fw06nAqnxNZS/DmIQ=; b=Qdu5BAWO82RzPv2/9oXUBpuFpj tA0MQqifG7zK455mBOA14IY4QwN/TFbA7cISSUPHroNbFOzytK/w63EoTuYAXES3X9COrJHpjvJ6E akF2G0ARnm/c6hTNewFW4Y0kTL/k41bX/wrgvQglOfolS6IB7UmX49n2tnRaLDDtKPSSl+8vL5EYH Alr9fAOSCitfo7tW/m4TtoeAptdzmCkznyg9yw6HQ1/WjCvFRsl876e1y/kk9anjxCyvCRsthIEyT owZ8Xj+FawKb8MOUAyVKKpKzCibNJ2two2mT768cBHg6rH4FTgeTxlSGf5hUA85dgdkf55AarmHjB nMOSfKtg==; 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 1gcpji-0001tL-Ud; Fri, 28 Dec 2018 10:51:26 +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 1gcpjf-0001sd-BC for linux-amlogic@lists.infradead.org; Fri, 28 Dec 2018 10:51:25 +0000 Received: by mail-ed1-x542.google.com with SMTP id h15so17244476edb.4 for ; Fri, 28 Dec 2018 02:51:23 -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:in-reply-to:references; bh=gE62p5/59RTzWzc5sJxmZU4FHrcRfBxyqPDK6YvY16Y=; b=dRlA39fEGYGrMCSdYxMnu+56HDgaWfjlB0lpUUcTDIbhDhycuAZjsFRsBVekENFUcf A7PHCRAw04IH3nBfx6hy1HCoqwpMaH/9V0aM6i/wnUzgNLRrtqgCbNPMIm4E5g+0cNZx rPOV3y0yGLu/PvCh6gaV60LjWhDSyKb+ei7LJA1EfYadXQm4X3d+PpBT+3Ku31xaiEgp Sh+LTq1Gxlrjon7cNX7BquTilxJiESN+EI6SoLsHlB/J6Qeldds6ugSVX+rNv08AbSiu iHc2gGve9ysabdEJGEtaaijTlFiOFm2GwV/XrLLtfE1qZNdWrYUeVyHDNkNbtlBhAnZb vWPA== 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:in-reply-to :references; bh=gE62p5/59RTzWzc5sJxmZU4FHrcRfBxyqPDK6YvY16Y=; b=HRBoSrG3dom25oQR7frt7sTKbmCoGuZl2onnIraYTQ5KOseaNuEPDSI/B2mvwxZmGS qD+pZ1oMlx5mSyy092bYdwXmp25YPSYsfVy+vKCNYYD1nGRB2Gz8HCwR01DMZHummogB SY/K0SgSofKux9HJ5aU8XJ5B9AKWvXCCxxGxAepDI8j6hyxx4gAMUUAC03BLhJr9+SWf uhgsj97cUUW3W0ZhiQjRsOx7oBmlJMm1ogpqYOoexeLJAqm+ukBw4ezAp0sedgXGPXiO oqi4aUoMoE8DVmptb1iNtSIo+6aa/IcOckktshHqmgcXOHYyAS1Rleo0wO/nrVwTChTm DQjQ== X-Gm-Message-State: AA+aEWaJNnjUsMdjPnvlUaP2Vg9e3Vr08o0sTqWwS30KIsAbiXotU7PE 2djqHx7GNUlMoRsu+jhyIKwicQ== X-Google-Smtp-Source: AFSGD/UgWV6/KGWEQPJEiGDiMrBwzvlFt9oTMCNS79TdGRUIIHzmtWxHx1sANpSRzLgVnuiJr26S+g== X-Received: by 2002:aa7:d602:: with SMTP id c2mr21740716edr.203.1545994281932; Fri, 28 Dec 2018 02:51:21 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.home (anice-157-1-157-17.w83-201.abo.wanadoo.fr. [83.201.132.17]) by smtp.googlemail.com with ESMTPSA id b45sm12919494eda.34.2018.12.28.02.51.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Dec 2018 02:51:21 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH 2/4] dt-bindings: gnss: add gtop binding Date: Fri, 28 Dec 2018 11:50:33 +0100 Message-Id: <1545994235-8309-3-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> References: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181228_025123_384323_45C5C7AD X-CRM114-Status: GOOD ( 10.81 ) 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 , Kevin Hilman , Loys Ollivier , linux-kernel@vger.kernel.org, Rob Herring , linux-amlogic@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 Add binding for GlobalTop GNSS receivers. Signed-off-by: Loys Ollivier --- Documentation/devicetree/bindings/gnss/gtop.txt | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/gnss/gtop.txt diff --git a/Documentation/devicetree/bindings/gnss/gtop.txt b/Documentation/devicetree/bindings/gnss/gtop.txt new file mode 100644 index 000000000000..24c86703aa46 --- /dev/null +++ b/Documentation/devicetree/bindings/gnss/gtop.txt @@ -0,0 +1,33 @@ +GlobalTop GNSS Receiver DT binding + +The GlobalTop GNSS receivers uses UART interfaces. + +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic +properties. + +Required properties: + +- compatible : Must be + + "globaltop,pa6h" + +- vcc-supply : Main voltage regulator + +Optional properties: + +- timepulse-gpios : Time pulse GPIO +- v-bckp-supply : Backup voltage regulator + +Example: + +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>; + pinctrl-names = "default"; + + gnss { + compatible = "globaltop,pa6h"; + vcc-supply = <&vcc_3v3>; + current-speed = <9600>; + }; +}; From patchwork Fri Dec 28 10:50:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10744421 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 659F691E for ; Fri, 28 Dec 2018 10:51:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557DF28B12 for ; Fri, 28 Dec 2018 10:51:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4769728BBD; Fri, 28 Dec 2018 10:51:40 +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 F27CF28B12 for ; Fri, 28 Dec 2018 10:51:39 +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:References: In-Reply-To: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:List-Owner; bh=hWu5bExfyFJwe8Txcjzei5rwu8ZFOxBLcZDhuCFIlOw=; b=Ao6SFSNQvV6LWZXk3tyhCJbk5Y 5ASyt0UJx/6QVsfzYNRbg9oH2/BP5hul/YizjovjpHYubUUelxzaL+fGn2qp0Kdpz023ysailVb4q 5wfk3hWPVwF+0VGn2rylsfruJZaaEoCpupTZ5ZqKDho5std78Z5MteE2i8sW8rJfbsLtE65JNstVq O1O/uXXsgF1STIdpUXZksOM7EBafk2ddqaRtcbHHIyOJJ/9C5ERnSnjiX9G4skYkF0cXMIMC9skrJ nSSkSvcvPQllRPtm2maC61idygmmeMtb3rLXehExcE61VV3/U0ioCFJueygEXlpC8G8dw1cUQs8AO 0RUd3S1A==; 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 1gcpjv-00021O-8H; Fri, 28 Dec 2018 10:51:39 +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 1gcpjs-0001t6-0B for linux-amlogic@lists.infradead.org; Fri, 28 Dec 2018 10:51:37 +0000 Received: by mail-ed1-x543.google.com with SMTP id y20so17223412edw.9 for ; Fri, 28 Dec 2018 02:51:25 -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:in-reply-to:references; bh=839efX+7U5vYxejZ5MhRw75xUHfEI8ipzY9hkahVUzw=; b=Gk6CQ2pikAs8wt4C2vOgxBoJjANTeMK10dypoh/+0xvczPRvNgI8210CGWoa7CtBxk aDKfnLxBrSUz8CMJiACIrzpuphTqUvZbdvTdqcIvhltdDzZHFypMd/CsYM9Xph7o626x IZPw6mIbAdQygk0G40kdPghnyzGeQx1+pb8dJ7mzhQmZzSmcE4EokxMAc3F7QRY3s+dl h0Yjl6alIOttGNkZuJ4+pbeasVc+RLahYnXPgerhnTHKSBZYT6q+pEa9gsz7hGGdbhHf cWwBvkT57qKYSWLbvC3PCuF/Z4D7GvHoz6Nc2HVdkNH6FitCXlXXqf7IotkLlxCRXCTt oSQg== 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:in-reply-to :references; bh=839efX+7U5vYxejZ5MhRw75xUHfEI8ipzY9hkahVUzw=; b=pMo6ZwVySTxudVr1P+ATNJI4aL15t6ko+dYN5OMyPLzR1QXphouOZORRCfBh8ph/DV FQTgVbLGWle/cIq9NLNnnedOsmzQ3l45Yv0xsaOs3EGhSU7REzn4Ldm/e4KD7PTPjqPf /2xElVx94gWvQHh1QBoPZcygsGzLnvjhTdWltfisRVVLqTstPuutSBqTrKGVdhCJDQ5u 0z1pFr5DxGsSh9dlrA8AQV0jz8N9iQ2eOloO1KnVtM0eq/dt3b6FjhC8AevBSbhO1MsO WkxtWU741gRBhFIP691B1VbWNBqpGZ4GPYkFvFKkE63Qv/tUJL5DCHJRFPAu2Zxq+VI4 RcPw== X-Gm-Message-State: AA+aEWYXNk4MyOF1SCCxYtvnYr1FcuGbCMCPXrKAyvLsoLBCbAY1I4C7 OBYUrMHenmSNLAGJZ/feod91Og== X-Google-Smtp-Source: AFSGD/XcTh+i9kOd+GaV+Vgnk6kzn//dXHYSavPhihgQprRSECGw/x17G2eYjMlUkQflEAQ88DGMww== X-Received: by 2002:a17:906:5795:: with SMTP id k21-v6mr18149045ejq.238.1545994284272; Fri, 28 Dec 2018 02:51:24 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.home (anice-157-1-157-17.w83-201.abo.wanadoo.fr. [83.201.132.17]) by smtp.googlemail.com with ESMTPSA id b45sm12919494eda.34.2018.12.28.02.51.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Dec 2018 02:51:23 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH 3/4] gnss: add gtop receiver type support Date: Fri, 28 Dec 2018 11:50:34 +0100 Message-Id: <1545994235-8309-4-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> References: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181228_025136_043919_F04CB89B X-CRM114-Status: GOOD ( 10.44 ) 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 , Kevin Hilman , Loys Ollivier , linux-kernel@vger.kernel.org, Rob Herring , linux-amlogic@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 Add a gtop type to the "GNSS_TYPE" attribute. Note that GTOP receveirs support a subset of NMEA 0183 with vendor extensions (e.g. to allow switching to the vendor protocol). Signed-off-by: Loys Ollivier --- include/linux/gnss.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/gnss.h b/include/linux/gnss.h index 43546977098c..adbbacc00278 100644 --- a/include/linux/gnss.h +++ b/include/linux/gnss.h @@ -22,6 +22,7 @@ enum gnss_type { GNSS_TYPE_NMEA = 0, GNSS_TYPE_SIRF, GNSS_TYPE_UBX, + GNSS_TYPE_GTOP, GNSS_TYPE_COUNT }; From patchwork Fri Dec 28 10:50:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10744423 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 5E2FA6C5 for ; Fri, 28 Dec 2018 10:51:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EE5328B12 for ; Fri, 28 Dec 2018 10:51:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4273E28BBD; Fri, 28 Dec 2018 10:51: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 B8CDC28B12 for ; Fri, 28 Dec 2018 10:51: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:References: In-Reply-To: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:List-Owner; bh=6fNhrYyszzz616K5/m28TweUiIbSnHkmM2blMYe6zQA=; b=RgJaX+X/Zv9YIajPTY6X1xpOWd bCnoaw0BgaRgb9ysZQyy/+tw8TycHZX1ICYz2mPFaKf6YTOwcRlQm3HYxuwJHxQHakr9idpzW6+Ln 3v2V2uw0G11Ox2GJbTigvgqG6i3CIWe/Yf5rYV6L2m+x/OOuFW0sV5PZLbF/2HBgZcJPWuaqZtnO8 O/M6eNzoMe49TZJB0zGMWQ/v3XrfhwSzySUPECIO770CBxKBNkdNHO1tGaaOnEngz+OzQ7Zhvna0h WIPqGDtO00Km0Fvy6vGDqdBCdiwOhEc8Vxf0TyzmByxla2+jL7r0aNn4TPK0JWnTcdXd7xD8adySQ MJpIrtRg==; 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 1gcpjx-00023L-Tc; Fri, 28 Dec 2018 10:51:41 +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 1gcpju-0001te-Mu for linux-amlogic@lists.infradead.org; Fri, 28 Dec 2018 10:51:40 +0000 Received: by mail-ed1-x542.google.com with SMTP id f23so17259156edb.3 for ; Fri, 28 Dec 2018 02:51:28 -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:in-reply-to:references; bh=pN+0H3y7M98gFOz3pfkSQa2FcPvqO1nl4jQ3jTi1QzQ=; b=aFwiDCySvFSvTZrm8Ir/JlvumNXzF/UxvhR/BFapRrZXBaldRpztzlW9s0R8SkXb21 HgwATwjxkaZG5/qQRA3ppFge4e8M26J6ECXYoYijcYGQxwQaCjVNmsDSxffRGruVBHg1 pxA/MVX6cQPIGw0HSgnbyrbL+sAvzjdCmKITuvEOjtpbZhviZ2lRAV+cvZdzaeR4vm+2 NIDRyykqdK+rTfLiPzb/8hXgLPTXottM0XllCmpGrwUBMsOtj0mV7qOsGfvOp73WiZ/0 VMHgl5Wcqsy9Y+B3LLW06NUJqIYFd1Lc7XkTRLc9BHUaWp6Ph5NrwPK8UhdR9PfPtajt k+fw== 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:in-reply-to :references; bh=pN+0H3y7M98gFOz3pfkSQa2FcPvqO1nl4jQ3jTi1QzQ=; b=FQ0C8XHaRZAVcWASASAB8nKE/RuNXAgKDzIV8+7fZmWBwhKybbeo5F23JleJ7JRsdJ OdhM7Geg2o0E1Bwy/1GU1YdCXE2l81dfPJXmBuoLc11GMyriJuD+L9bxDIIWllhJIYpw S/n1dMeqQCWlLILOjPBcdjy6Z/ojkpeNV0Pf8njZ0uCDUd84FAfjHq5PTf2KlLLzHRdw CfHYcM412pUosoccLO3Wf7UQZYlyobvCeoFaoA4Vn1FD2TkQzVdydLuyb+zoIp3LvY6Z oPGZSgseTuKOZy312TFiu7wZSOj1xekRiF5JCsZIK8rVJk2RNxp/kJXVDs5ITVxoiyVS HMzA== X-Gm-Message-State: AA+aEWYQB9+C6190VNb85tSV3fbQgdcD6qmo8AbTLJjoVlzxTspANz0T IMrQn9NXilOj5BPGb0UMC9E19Q== X-Google-Smtp-Source: AFSGD/WjvTnSh/NAGr8ZC5gwuY2lQUjlJrvrB15WUgGdHqZ/hiMx46btTXX2yJGIxKdqCY0Ac0YYIQ== X-Received: by 2002:a17:906:914:: with SMTP id i20-v6mr18483859ejd.225.1545994287118; Fri, 28 Dec 2018 02:51:27 -0800 (PST) Received: from loys-ubuntu-BY1835A49200471.home (anice-157-1-157-17.w83-201.abo.wanadoo.fr. [83.201.132.17]) by smtp.googlemail.com with ESMTPSA id b45sm12919494eda.34.2018.12.28.02.51.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Dec 2018 02:51:26 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH 4/4] gnss: add driver for globaltop receivers Date: Fri, 28 Dec 2018 11:50:35 +0100 Message-Id: <1545994235-8309-5-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> References: <1545994235-8309-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181228_025138_743532_8243312D X-CRM114-Status: GOOD ( 19.03 ) 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 , Kevin Hilman , Loys Ollivier , linux-kernel@vger.kernel.org, Rob Herring , linux-amlogic@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 Add driver for serial-connected GlobalTop GNSS receivers. These devices typically boot transmitting vendor specific NMEA output sequences. The serial port bit rate is read from the device tree "current-speed". Note that the driver uses the generic GNSS serial implementation and therefore essentially only manages power abstracted into three power states: ACTIVE, STANDBY, and OFF. For globaltop receivers with a main supply and no enable-gpios, this simply means that the main supply is disabled in STANDBY and OFF (the optional backup supply is kept enabled while the driver is bound). Note that the timepulse-support is left unimplemented. Signed-off-by: Loys Ollivier --- drivers/gnss/Kconfig | 13 +++++ drivers/gnss/Makefile | 3 + drivers/gnss/core.c | 1 + drivers/gnss/gtop.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+) create mode 100644 drivers/gnss/gtop.c diff --git a/drivers/gnss/Kconfig b/drivers/gnss/Kconfig index 6abc88514512..c93ad134656b 100644 --- a/drivers/gnss/Kconfig +++ b/drivers/gnss/Kconfig @@ -40,4 +40,17 @@ config GNSS_UBX_SERIAL If unsure, say N. +config GNSS_GTOP_SERIAL + tristate "GlobalTop GNSS receiver support" + depends on SERIAL_DEV_BUS + select GNSS_SERIAL + help + Say Y here if you have a GlobalTop GNSS receiver which uses a serial + interface. + + To compile this driver as a module, choose M here: the module will + be called gnss-gtop. + + If unsure, say N. + endif # GNSS diff --git a/drivers/gnss/Makefile b/drivers/gnss/Makefile index 5cf0ebe0330a..becc45f24b8b 100644 --- a/drivers/gnss/Makefile +++ b/drivers/gnss/Makefile @@ -14,3 +14,6 @@ gnss-sirf-y := sirf.o obj-$(CONFIG_GNSS_UBX_SERIAL) += gnss-ubx.o gnss-ubx-y := ubx.o + +obj-$(CONFIG_GNSS_GTOP_SERIAL) += gnss-gtop.o +gnss-gtop-y := gtop.o diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c index 4291a0dd22aa..0b5cd82b1fb7 100644 --- a/drivers/gnss/core.c +++ b/drivers/gnss/core.c @@ -334,6 +334,7 @@ static const char * const gnss_type_names[GNSS_TYPE_COUNT] = { [GNSS_TYPE_NMEA] = "NMEA", [GNSS_TYPE_SIRF] = "SiRF", [GNSS_TYPE_UBX] = "UBX", + [GNSS_TYPE_GTOP] = "GTOP", }; static const char *gnss_type_name(struct gnss_device *gdev) diff --git a/drivers/gnss/gtop.c b/drivers/gnss/gtop.c new file mode 100644 index 000000000000..6fa7b425d711 --- /dev/null +++ b/drivers/gnss/gtop.c @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * GlobalTop GNSS receiver driver + * + * Copyright (C) 2018 Loys Ollivier + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "serial.h" + +struct gtop_data { + struct regulator *v_bckp; + struct regulator *vcc; +}; + +static int gtop_set_active(struct gnss_serial *gserial) +{ + struct gtop_data *data = gnss_serial_get_drvdata(gserial); + int ret; + + ret = regulator_enable(data->vcc); + if (ret) + return ret; + + return 0; +} + +static int gtop_set_standby(struct gnss_serial *gserial) +{ + struct gtop_data *data = gnss_serial_get_drvdata(gserial); + int ret; + + ret = regulator_disable(data->vcc); + if (ret) + return ret; + + return 0; +} + +static int gtop_set_power(struct gnss_serial *gserial, + enum gnss_serial_pm_state state) +{ + switch (state) { + case GNSS_SERIAL_ACTIVE: + return gtop_set_active(gserial); + case GNSS_SERIAL_OFF: + case GNSS_SERIAL_STANDBY: + return gtop_set_standby(gserial); + } + + return -EINVAL; +} + +static const struct gnss_serial_ops gtop_gserial_ops = { + .set_power = gtop_set_power, +}; + +static int gtop_probe(struct serdev_device *serdev) +{ + struct gnss_serial *gserial; + struct gtop_data *data; + int ret; + + gserial = gnss_serial_allocate(serdev, sizeof(*data)); + if (IS_ERR(gserial)) { + ret = PTR_ERR(gserial); + return ret; + } + + gserial->ops = >op_gserial_ops; + + gserial->gdev->type = GNSS_TYPE_GTOP; + + data = gnss_serial_get_drvdata(gserial); + + data->vcc = devm_regulator_get(&serdev->dev, "vcc"); + if (IS_ERR(data->vcc)) { + ret = PTR_ERR(data->vcc); + goto err_free_gserial; + } + + data->v_bckp = devm_regulator_get_optional(&serdev->dev, "v-bckp"); + if (IS_ERR(data->v_bckp)) { + ret = PTR_ERR(data->v_bckp); + if (ret == -ENODEV) + data->v_bckp = NULL; + else + goto err_free_gserial; + } + + if (data->v_bckp) { + ret = regulator_enable(data->v_bckp); + if (ret) + goto err_free_gserial; + } + + ret = gnss_serial_register(gserial); + if (ret) + goto err_disable_v_bckp; + + return 0; + +err_disable_v_bckp: + if (data->v_bckp) + regulator_disable(data->v_bckp); +err_free_gserial: + gnss_serial_free(gserial); + + return ret; +} + +static void gtop_remove(struct serdev_device *serdev) +{ + struct gnss_serial *gserial = serdev_device_get_drvdata(serdev); + struct gtop_data *data = gnss_serial_get_drvdata(gserial); + + gnss_serial_deregister(gserial); + if (data->v_bckp) + regulator_disable(data->v_bckp); + gnss_serial_free(gserial); +}; + +#ifdef CONFIG_OF +static const struct of_device_id gtop_of_match[] = { + { .compatible = "globaltop,pa6h" }, + {}, +}; +MODULE_DEVICE_TABLE(of, gtop_of_match); +#endif + +static struct serdev_device_driver gtop_driver = { + .driver = { + .name = "gnss-gtop", + .of_match_table = of_match_ptr(gtop_of_match), + .pm = &gnss_serial_pm_ops, + }, + .probe = gtop_probe, + .remove = gtop_remove, +}; +module_serdev_device_driver(gtop_driver); + +MODULE_AUTHOR("Loys Ollivier "); +MODULE_DESCRIPTION("GlobalTop GNSS receiver driver"); +MODULE_LICENSE("GPL v2");