From patchwork Mon Jan 28 16:37:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10784011 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 0F078746 for ; Mon, 28 Jan 2019 16:38:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE6142BB84 for ; Mon, 28 Jan 2019 16:38:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDCE22BB8A; Mon, 28 Jan 2019 16:38:31 +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 7DB182BB84 for ; Mon, 28 Jan 2019 16:38:31 +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=/40hcdwyay/hnkLBYSgduLW8uxOgsGXYj+d7/FSHqVw=; b=oec7nR74tFhZAGsBIWxHiL2ilq cpDekbyV5u4DvDT7m4CLmOVNUqP/grLjHEkcC0XRLDcjGb9aakWQgIUB4+Q5L2nF/iuIk/S5uQ0Ye nXwHnd+82MuBZkUoPLFyFK72NgHoBpAVgGU1CHDvYJ1cqatjYOgeApSq0L6PCsd8FM+dNFU5ueXi6 gmGjJrPwNPsOC55me8Xc3Nh/KTSLaEmp4gvfw/V2P7d1i5vc5bDD9g/CizLGmqdFAZZkoTmo/Db7n M9Y1gsrAVtT+uxd8TbWXJZ1E5WxarACv/ztqO+USFsBKj7oJstjnsNQWHNUsNCKh3S4M4zeNbG+6U RJShnynw==; 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 1go9vZ-00073P-Cf; Mon, 28 Jan 2019 16:38:29 +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 1go9vE-0006jC-9g for linux-amlogic@lists.infradead.org; Mon, 28 Jan 2019 16:38:11 +0000 Received: by mail-wr1-x444.google.com with SMTP id s12so18785246wrt.4 for ; Mon, 28 Jan 2019 08:38:08 -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=DwXU/DABY03ITJwoWyaouwbE8TjJuTN6E6OnLCAmCoA=; b=AvL9UiD3J4AerEcQE13yxgFPcrNzEyvgVO/Oed9HUx52ap7/tMpLGzKcGWXRGxciNK ZdRFq9lnPpRcfvosrhlsegfVAVUgGprCIx2a1cscd0T90+lG1RfGJ+pyg90BTmK4JXB1 +ifa2QS9EZd00bpcesusSxt9OZC6c6+v2Y8TlJL+ILgy2nG3wkyeVbaJZ0uV9TjxYOXS DNkQCUG28w5ZJogOBquDxyApdURnAZdJpFoMcU7vt8jwxyH7Mabs6MCuA3PLNlazBkYR IJVCZNnSnsei5MriMsg3c4hjn9z6IKnWjDEZ0ASkG5I9PgdHeOzA3NEHWSTyOistHo9+ 0Now== 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=DwXU/DABY03ITJwoWyaouwbE8TjJuTN6E6OnLCAmCoA=; b=WefEPCYgLfK8yJyhPbSiWw0nsJSAMwnq/KWAyB7mj4R2HMgQr811tXxXT9VHJlp2en H39WC3aM/JjNIXBZtW5koNTm2obPPdzjWX95pc0WiVIhtAtiZGJOtTvK44R7lJ4aMYF4 nDsU4SahKKkqi2Jz9kTia2fBAV/hRmBXx2z3U7dOWZMZq91vRbGgQNX1cPr4C4FpiYBO NeDWmaE63VEoCY+UPU4NlxY6Z/KlIebzABvZr4NGbrvb0iHPpkG0Ss6YJvGDyd0TSuD3 fzvgoWIqpYdu2qdL0fy4DYsL4e835F8wLfm4goUCLxmUsAtN22DDlYHEORhhsUIpHnBe DF/g== X-Gm-Message-State: AJcUukc/NdFd4FJ80+DL7UmIWjF47dr94CGzG1fAbRrrDB/lNUSu1cgB NdFPoQMCM2yIXdb+HltYJMSFhw== X-Google-Smtp-Source: ALg8bN5KMG1QHbxfXu8KVWN1cLvVGhJydZpy2RUk7wZ6NpeR6bHPzOsCNI6QCr0tfyobn6ULK0jr6g== X-Received: by 2002:a5d:56d2:: with SMTP id m18mr23651374wrw.113.1548693486851; Mon, 28 Jan 2019 08:38:06 -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.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 08:38:06 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v3 1/4] dt-bindings: Add vendor prefix for "GlobalTop Technology, Inc." Date: Mon, 28 Jan 2019 17:37:58 +0100 Message-Id: <1548693481-1162-2-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> References: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_083808_457621_CDF01DD0 X-CRM114-Status: UNSURE ( 9.41 ) 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 , 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 Add globaltop vendor definition. Signed-off-by: Loys Ollivier --- v3: No changes v2: Alphabetical order 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 389508584f48..d80a70343b36 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -150,6 +150,7 @@ geniatech Geniatech, Inc. giantec Giantec Semiconductor, Inc. giantplus Giantplus Technology Co., Ltd. globalscale Globalscale Technologies, Inc. +globaltop GlobalTop Technology, Inc. gmt Global Mixed-mode Technology, Inc. goodix Shenzhen Huiding Technology Co., Ltd. google Google, Inc. From patchwork Mon Jan 28 16:37:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10784023 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 7B09E922 for ; Mon, 28 Jan 2019 16:39:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66F932A178 for ; Mon, 28 Jan 2019 16:39:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AB8E2A1CB; Mon, 28 Jan 2019 16:39:07 +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 023862A178 for ; Mon, 28 Jan 2019 16:39:07 +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=hkIkEKZk1zAo5N88GQjZqGAJki5Yuin0Pv94uAHMwdw=; b=XPsq+qF5x6Dgq565F9sf++/IHS /ipc7X6BfYT5ixO7MmlWua0vObAyfUmuS2TknopinUYm3bIHNHgHn1DX5LuvrEpkFHvYEB4kPN/qU O+Z5sEsRzpRlACQCPxX51pz08r4mhPd1gl+VL14JBNmVXIb96RbWzKaOrQ7bXblnk71BJr/AbgNVq tq/ozl9JdvuUkxJoUnmBDQpebN41+jlt40Z+tG5kgFHzOZAMehakdvcvuVpFBJtd7M+O2uHwWg6LM 3+0w4rF/HytRZ+b6tixglW3EetPFd69dgu+KQgZyCnmTuurotIE93wfza8WPWmdegszOkCrvF9QOD ve/0xXzw==; 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 1go9wA-0007ZF-3U; Mon, 28 Jan 2019 16:39:06 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1go9vF-0006jz-LA for linux-amlogic@lists.infradead.org; Mon, 28 Jan 2019 16:38:18 +0000 Received: by mail-wr1-x442.google.com with SMTP id l9so18730370wrt.13 for ; Mon, 28 Jan 2019 08:38:09 -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=9TWS3RWKZyY10HyUQ8/8Pkd3n2zCGA7KyKif2utYLQk=; b=RDmU414oN71nkBAYiPqn/5DnY9a/u9LMT3qHlV2ydHCc9+jtKa3TZNdEJgRBEKLjco NI+Lb1XZrxNIUcye9zYNtrllkeaj2GBJoJI7Z/i1XARKPFGR9kWhG+lXT2jrRFEJnFXG fb0nNllUVAVqtLBaoWLKoW9l+FHgd0sKaMl5VY5QMFASIbkKM3vKMmKsLdNCuDCWoG46 0AMutNJrNG1RtjHGwSWyW5Q7n5J90mjXDurK03szScyb9cpynPLrpT31fd8bU0tOTEb2 EzYmx8T2acxvSwN8Brv/qxA6tYytvzdG1jBUYjMrnKEiND2F1CQCHlEcU9+/R2aYozSO qW8A== 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=9TWS3RWKZyY10HyUQ8/8Pkd3n2zCGA7KyKif2utYLQk=; b=CnoY5nLn97dCi/zIqVI7oCEevfjzdOMRNKjho/MXPGBEmcZ3PE1mDY8PK05zcLEGBf FKuiCcWigDPoUg8YRJ09Sb6yhsx/BiyNzCG9WFMYxgqvn6tJEFWS2dqIRu1UmzXcVl4x 6ndSoppQSSowlcPCMR1gttOF1e13DeHLeOOasqKivFZNdak8rJYaukik18yp9EVgF8Pt tm5sYlt11DcKBH0QV8+GL/idlEgT4Y9VoFsCdt+g6YF05Vc+5qJH43UfXaW+O1RL0tt1 qmD9+g7H/ZqlcmOwgchgOHGl4Lal9I7DK9tWaNlnKDH8HIGHBXgH/LsO04VaGTVxqbP9 jH0g== X-Gm-Message-State: AJcUukfMiw/epJ4j0DMEeEbuWGgQdjtjw/YUCuBKOFnT2kZZR3n3H6UO XYYMcUFbPor74/dB12NZN6drhg== X-Google-Smtp-Source: ALg8bN4eVHINugfE+Wj5WD3XT4PnxZy5JY6koo/ABOSVBWhpinarToJm9cMVU9wRXD/OYiuX3Zt80A== X-Received: by 2002:a5d:5182:: with SMTP id k2mr22490514wrv.121.1548693488056; Mon, 28 Jan 2019 08:38:08 -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.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 08:38:07 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v3 2/4] dt-bindings: gnss: add mediatek binding Date: Mon, 28 Jan 2019 17:37:59 +0100 Message-Id: <1548693481-1162-3-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> References: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_083809_720668_C72EBA4D X-CRM114-Status: GOOD ( 11.27 ) 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 Add binding for Mediatek-based GNSS receivers. Signed-off-by: Loys Ollivier --- v3: Removed the I2C and SPI interfaces references. Removed the "mediatek,mt3339" compatible line. Added the optional propertied (reset, fix) Added the pin names for the optional properties. v2: Renamed bindings from Globaltop/gtop to Mediatek/mtk. Moved current-speed as an optional propertie. Removed the status line in the example. Added "mediatek,mt3339" compatible. .../devicetree/bindings/gnss/mediatek.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt diff --git a/Documentation/devicetree/bindings/gnss/mediatek.txt b/Documentation/devicetree/bindings/gnss/mediatek.txt new file mode 100644 index 000000000000..00650d81c5c8 --- /dev/null +++ b/Documentation/devicetree/bindings/gnss/mediatek.txt @@ -0,0 +1,37 @@ +Mediatek-based GNSS Receiver DT binding + +Mediatek chipsets are used in GNSS-receiver modules produced by several +vendors and can use an UART interface. + +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic +properties. + +Required properties: + +- compatible : Must be + + "globaltop,pa6h" + +- vcc-supply : Main voltage regulator (pin name: VCC) + +Optional properties: + +- gtop,reset-gpios : GPIO used to reset the device + (pin name: RESET, NRESET) +- gtop,fix-gpios : GPIO used to determine device position fix state + (pin name: FIX, 3D_FIX) +- timepulse-gpios : Time pulse GPIO (pin name: PPS1, 1PPS) +- v-bckp-supply : Backup voltage regulator + (pin name: VBAT, VBACKUP) +- current-speed : Default UART baud rate + +Example: + +serial@1234 { + compatible = "ns16550a"; + + gnss { + compatible = "globaltop,pa6h"; + vcc-supply = <&vcc_3v3>; + }; +}; From patchwork Mon Jan 28 16:38:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10784019 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 14980746 for ; Mon, 28 Jan 2019 16:39:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2E9F2A178 for ; Mon, 28 Jan 2019 16:39:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E488C2A1DF; Mon, 28 Jan 2019 16:39:00 +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 9A1472A19E for ; Mon, 28 Jan 2019 16:39:00 +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=B3CIWUCDff6/i6u6qd5wzOlPSCF1SskOlz53Wh8+xls=; b=ixUXAiFSJTtlSL9Q3+5pAUJgX0 WXAqKxNBV3JC3AcfsBoWfLCcKjCjJ4nuhWHyJjDBRjM9tuQQ/nDy6o/ueG/HSVmaEj87eK9l4q0Pm gSHPGFjnKIB/edymPIS4CdCHBo6NSBWTY8DZoZlTuWxiY7fvBLy8QCz5D1wr/UY9eeD2bZb54ALk8 UjwNu9O3NZBhqhZpucVUjyYh/Tnoo492pKCe3/mYsOmMaXxR5NCnsPe/hm5B0vpC3GkbYyZhqo8IG ce/E3D0NwvuHyzkyK3wb9S+/rFYIWoA4oMGQbFiapHjCMqw4RNFEptHy0cIhGMJm6j5o7cvKtp0Qq gIq/+QEQ==; 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 1go9w2-0007RB-Uw; Mon, 28 Jan 2019 16:38:58 +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 1go9vG-0006ki-Jl for linux-amlogic@lists.infradead.org; Mon, 28 Jan 2019 16:38:15 +0000 Received: by mail-wr1-x444.google.com with SMTP id q18so18781684wrx.9 for ; Mon, 28 Jan 2019 08:38:10 -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=fyBQQHTr8PUOvMNC5TSDB366cWfD8A0+KHCn5LVVNH8=; b=HYqf2z5eD3+QLpuQsIa8Phc08x0KnTYkWPWdqhent4WHaKgV4AbHrdtuSEnDNKkNea scxM5Kd1hkFVFFI5IHpusyuIjntVpb2gnbFpH79sCOqq5mBgtfdPApxIgeCI0uoboDz7 CmTfvBuda3ITtikhX8QxoAqgbZAQgO/hztL1G88Gyxh6/tf2cqnOxQ6OKQGiCFlpfKq8 7Ld2pI88cmWYyySZhmb1YoxRZF0HfbJauuKsWpbg9ssVMXAv3mh09+s0BgXqfyLxXxxH ghdjIouftGV65Hgm1OLT7E7tq70USf2NZLEJlM8dJ8EREsqhBC09RG5Na/qrCNvsNWyJ +BTA== 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=fyBQQHTr8PUOvMNC5TSDB366cWfD8A0+KHCn5LVVNH8=; b=tIPdgA9BbP+QtejLKzev9VYEo8sHzBYFNGg0IqeAEIZu7D/hOd7DyEaT3hdlGDDphU YOznFo1lhrM/LsmZs0CJEIDL5stviOZkAMJtiiohOVlrZrB/qwKaJNHZJFN0zaR8Jjo2 qLhevJCBJy6fvHva1qOEedhXZ+VAIOZC2Eeynj/MxnDQ7UTyzBS62HQqB/q6YeMLsY4p ZKJ5cDyvCEdLZ7JMybboFcHkPE+RGdGQj6bpdr33RKxMtk9RYzLAC26+p1uJkWm+rQmI NXT+RTu0g8Tjp//s3vHyurtfzCfrR2kymghsVf2Y+GN39KVlIaRNUNqTe24yvbXMpQtK xlcg== X-Gm-Message-State: AJcUukeJSzFnl++wr3pSf6pntx6X8Lo+2a5S+7skRPWF6508Y2OIS4V3 WRgCQIDQJYomo+kUsMPj1b2wiA== X-Google-Smtp-Source: ALg8bN4/B4SWxIm7vCUbRYvn874M1dL1HvhVWIsz6SyWTxC8hna3Zz/YBgIob2CzSREhZRSEL60eAA== X-Received: by 2002:adf:eec9:: with SMTP id a9mr22139027wrp.242.1548693489225; Mon, 28 Jan 2019 08:38:09 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 08:38:08 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v3 3/4] gnss: add mtk receiver type support Date: Mon, 28 Jan 2019 17:38:00 +0100 Message-Id: <1548693481-1162-4-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> References: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_083810_953445_E47160E2 X-CRM114-Status: GOOD ( 11.58 ) 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 Add an MTK (Mediatek) type to the "GNSS_TYPE" attribute. Note that MTK receivers support a subset of NMEA 0183 with vendor extensions. Signed-off-by: Loys Ollivier --- v3: Moved the gnss_type_names string addition to this patch. Edited the commit message to remove the reference to a vendor protocol. v2: renamed from GTOP to MTK. drivers/gnss/core.c | 1 + include/linux/gnss.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c index 4291a0dd22aa..320cfca80d5f 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_MTK] = "MTK", }; static const char *gnss_type_name(struct gnss_device *gdev) diff --git a/include/linux/gnss.h b/include/linux/gnss.h index 43546977098c..36968a0f33e8 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_MTK, GNSS_TYPE_COUNT }; From patchwork Mon Jan 28 16:38:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loys Ollivier X-Patchwork-Id: 10784027 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 241C8922 for ; Mon, 28 Jan 2019 16:39:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84AB02A19E for ; Mon, 28 Jan 2019 16:39:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 785222A1DF; Mon, 28 Jan 2019 16:39:19 +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 069CC2A19E for ; Mon, 28 Jan 2019 16:39:19 +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=rfnVix7GSG6/E6coG3aKv+rSDUrgBm8mPi8VVK43uMY=; b=M/sU+Om3xJgyMfVhof+6LEaXxw qNg0tHvsoifT3s0XGtBH2jUHU4PqUsyKuNZrEf9NvmF+P3wh8ISHT9v3CVgoNjMVIYD/KZf+EDto0 bM8dcMajNp49O8dETUbilNE6CsoBdqi3mrJmL0UH2w476gzRiri278HrBT+hIlqmY4E7KNlmbvbzo OmNdF7T3brYDE0M/Z1rdZCaLiFW3hTjvSJUwuvO8WPk4gBO3fNS28M8ZwL3fg/bY2MfjdXvBmukB5 tV3DtLRuVS5iQQlnGakq9pRRPVBH8aRxPgfrOi4CZn5tqLztst1GDRZyK2qiey730y1hwV+nmZRam lj5dWAZA==; 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 1go9wM-0007fc-CW; Mon, 28 Jan 2019 16:39:18 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1go9vH-0006ls-Qg for linux-amlogic@lists.infradead.org; Mon, 28 Jan 2019 16:38:27 +0000 Received: by mail-wr1-x442.google.com with SMTP id t6so18754893wrr.12 for ; Mon, 28 Jan 2019 08:38:11 -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=J7q2ZjQCinm0IA/wotZbsDzW17KZqQK/HytBY9aOmww=; b=jCkIK7qOU+oQ1Qf34xBNH44bu15/Eyc78HQubpYXfrNqRhzbGg3DLSspO5WFomgfxQ ci7q5n3OMQVcMVv4ouYs3jdw8Bl9a29EfuewI2VUXE+o99WXguBy4COns+R1Jy4pUuPO GCAKPLG+EJpDA1hrhDo2vLPv1oWl4fhuwHBI2/qksQuGYUkCa+Z+Fi3Ng1ipN4fh9PPU NLIrrFaHrfT0pVMt/FfGAd8c2ldttUAuWPUMA6fYtinkc2rI9D0uSos4KvDod3NPbZIR KNNYoff6rjsNQWcGRMxK5grcIt2BEhRZ9c4Q8P+6l6g91fcANuGpSC9G7rDhAd6fFCGb IEPQ== 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=J7q2ZjQCinm0IA/wotZbsDzW17KZqQK/HytBY9aOmww=; b=tLSyppCuT1F9FTY0rl6kSNkXHtWF0YLLOzCgCoS/1dm3haXYZPig072o7usC5exWag ludMUogOJsvJ/BSBAVKqu1cyHHX+HnhbHdldbjre9TkcrF5KYTw8xecDf8iPNBiN/1fF 0ImbyMVXBYqhM04qq8KXfOo8IG5wd78tN1gb+qpyVVgmfdaFyG46hZUdtAN0IgZVda0x AqBqFl6zvjVZQR0Le5Ot0Z8dY0Uq+DDpxYrRgjUpl1AWC/FnwLNAbZIn2ZEv6mwu+5FH dZ4Tc8tfYqn9k/tuYLG8mNDBxD81RTZ7wMiVPZ8f7Lb/JOXGvH5mCNM/EOqwhi6Lx1/T dTkA== X-Gm-Message-State: AJcUukfYKVOnjN3Ny5P+/xyu/Xfaafg8jGTELwTKnNy//SLWJAvAE3nW 0/d87ucgdAqyKFKDZIk8I9veYQ== X-Google-Smtp-Source: ALg8bN7blyEvsvwmNr8fUFPB28n210TFW2WoUsaWbisBlgkZPfBc9rYG0fS4DpIKo7pWK/NFlt6Kfw== X-Received: by 2002:adf:ae41:: with SMTP id u1mr21558974wrd.20.1548693490439; Mon, 28 Jan 2019 08:38:10 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 08:38:09 -0800 (PST) From: Loys Ollivier To: devicetree@vger.kernel.org, Johan Hovold Subject: [PATCH v3 4/4] gnss: add driver for mediatek receivers Date: Mon, 28 Jan 2019 17:38:01 +0100 Message-Id: <1548693481-1162-5-git-send-email-lollivier@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> References: <1548693481-1162-1-git-send-email-lollivier@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_083812_028533_2764FEC7 X-CRM114-Status: GOOD ( 18.50 ) 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 Add driver for serial-connected Mediatek-based 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 mediatek 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 --- v3: Sorted the Kconfig and Makefile Retained the original Copyright Removed "mediatek,mt3339" compatible. v2: Renamed from gtop/Globaltop to mtk/Mediatek. Added "mediatek,mt3339" compatible. drivers/gnss/Kconfig | 13 +++++ drivers/gnss/Makefile | 3 + drivers/gnss/mtk.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) create mode 100644 drivers/gnss/mtk.c diff --git a/drivers/gnss/Kconfig b/drivers/gnss/Kconfig index 6abc88514512..6d8c8027e1cd 100644 --- a/drivers/gnss/Kconfig +++ b/drivers/gnss/Kconfig @@ -15,6 +15,19 @@ if GNSS config GNSS_SERIAL tristate +config GNSS_MTK_SERIAL + tristate "Mediatek GNSS receiver support" + depends on SERIAL_DEV_BUS + select GNSS_SERIAL + help + Say Y here if you have a Mediatek-based GNSS receiver which uses a + serial interface. + + To compile this driver as a module, choose M here: the module will + be called gnss-mtk. + + If unsure, say N. + config GNSS_SIRF_SERIAL tristate "SiRFstar GNSS receiver support" depends on SERIAL_DEV_BUS diff --git a/drivers/gnss/Makefile b/drivers/gnss/Makefile index 5cf0ebe0330a..451f11401ecc 100644 --- a/drivers/gnss/Makefile +++ b/drivers/gnss/Makefile @@ -9,6 +9,9 @@ gnss-y := core.o obj-$(CONFIG_GNSS_SERIAL) += gnss-serial.o gnss-serial-y := serial.o +obj-$(CONFIG_GNSS_MTK_SERIAL) += gnss-mtk.o +gnss-mtk-y := mtk.o + obj-$(CONFIG_GNSS_SIRF_SERIAL) += gnss-sirf.o gnss-sirf-y := sirf.o diff --git a/drivers/gnss/mtk.c b/drivers/gnss/mtk.c new file mode 100644 index 000000000000..a5aad08fb9d7 --- /dev/null +++ b/drivers/gnss/mtk.c @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Mediatek GNSS receiver driver + * + * Copyright (C) 2018 Johan Hovold + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "serial.h" + +struct mtk_data { + struct regulator *v_bckp; + struct regulator *vcc; +}; + +static int mtk_set_active(struct gnss_serial *gserial) +{ + struct mtk_data *data = gnss_serial_get_drvdata(gserial); + int ret; + + ret = regulator_enable(data->vcc); + if (ret) + return ret; + + return 0; +} + +static int mtk_set_standby(struct gnss_serial *gserial) +{ + struct mtk_data *data = gnss_serial_get_drvdata(gserial); + int ret; + + ret = regulator_disable(data->vcc); + if (ret) + return ret; + + return 0; +} + +static int mtk_set_power(struct gnss_serial *gserial, + enum gnss_serial_pm_state state) +{ + switch (state) { + case GNSS_SERIAL_ACTIVE: + return mtk_set_active(gserial); + case GNSS_SERIAL_OFF: + case GNSS_SERIAL_STANDBY: + return mtk_set_standby(gserial); + } + + return -EINVAL; +} + +static const struct gnss_serial_ops mtk_gserial_ops = { + .set_power = mtk_set_power, +}; + +static int mtk_probe(struct serdev_device *serdev) +{ + struct gnss_serial *gserial; + struct mtk_data *data; + int ret; + + gserial = gnss_serial_allocate(serdev, sizeof(*data)); + if (IS_ERR(gserial)) { + ret = PTR_ERR(gserial); + return ret; + } + + gserial->ops = &mtk_gserial_ops; + + gserial->gdev->type = GNSS_TYPE_MTK; + + 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 mtk_remove(struct serdev_device *serdev) +{ + struct gnss_serial *gserial = serdev_device_get_drvdata(serdev); + struct mtk_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 mtk_of_match[] = { + { .compatible = "globaltop,pa6h" }, + {}, +}; +MODULE_DEVICE_TABLE(of, mtk_of_match); +#endif + +static struct serdev_device_driver mtk_driver = { + .driver = { + .name = "gnss-mtk", + .of_match_table = of_match_ptr(mtk_of_match), + .pm = &gnss_serial_pm_ops, + }, + .probe = mtk_probe, + .remove = mtk_remove, +}; +module_serdev_device_driver(mtk_driver); + +MODULE_AUTHOR("Loys Ollivier "); +MODULE_DESCRIPTION("Mediatek GNSS receiver driver"); +MODULE_LICENSE("GPL v2");