From patchwork Thu Mar 17 22:58:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 552732 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 033DDC433EF for ; Thu, 17 Mar 2022 23:00:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbiCQXCJ (ORCPT ); Thu, 17 Mar 2022 19:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbiCQXCJ (ORCPT ); Thu, 17 Mar 2022 19:02:09 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB8E14CD2C for ; Thu, 17 Mar 2022 16:00:51 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id w12so11438006lfr.9 for ; Thu, 17 Mar 2022 16:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mSX5XIgPOxOnww4CSR+De8Pza4n5HUdUiMJxEJQrB3g=; b=Q1I0OAkdlWp2ovUowkKLdVu5Tl2OF3/hoLP+Ms0FV58ym9H2/pNLXkYAmepbSzxYMv hHxBJ0J9fqVyh6Od6b+vJMIf344dM1oAXiwugVQ77TtAElFs9AJsTXg0zcp/vCfJD7I0 7zfN/0iXhrUiGp1T1nGVtIRqQo3oq0eZ7eOgAETWKMOaeJTHsVxC5c91SKHlQjLr0JZs 2rXaDMrdPPQcWEstGktivxNdlWZAkHEm4Pw+Q4j+1SenDTDjdQ1c7BZ/rQa4GiFXVPNs /zs0t/ebgyv/TQ6ifaoGmjSplVmif4QYgiuydL+ho4gnRQHObAQE8xONQk1TKYyPhw8+ hcPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mSX5XIgPOxOnww4CSR+De8Pza4n5HUdUiMJxEJQrB3g=; b=8Em/XezlfD6CFJwHFLlKcqfKX7oF+Ba28NqK2E2Hfq9vwgwLYQWO3bxhSBjFv53k0Q G65WeM1QXVZn9o9IjX0TMDCLamFqn1zUr8epzqjzx1bUb6WlgARE8dtDDku6maX3GVaD NHkwl7fDjcLBIqsQdU/EkrM605wx7pFy8jaIhzbwUr1pjJP6lMatKZTDMQvgOZp/UELP RQZZG9qpLX2kbk1jQFiSwKPVtZ3RRxNBgJfufUqegYMc/V7DxWbID8wwv9ibXcpLXPIB FPp2Rk+A6jPJL0DLSMdn1TweVag7kFD4A0BQep5MkLKIBLaQbo7gbGwtFWfnC0CEm8NQ 42og== X-Gm-Message-State: AOAM5322rr4Ir62vC2SWvpm0KUwnBQ5Fy8F+hZfetLu1lLvs/Uq4ohi7 pTnKjiAC6EzqJXvSElnaxuWGpQ== X-Google-Smtp-Source: ABdhPJzQQjqeagfBYCPNZB0Tkvyhlfgd9tcMTINgyASzLqGQsXqA0aViXmo8vOh8EqWmc736dbfazg== X-Received: by 2002:a05:6512:1054:b0:448:9c69:c6d2 with SMTP id c20-20020a056512105400b004489c69c6d2mr4132649lfb.583.1647558049926; Thu, 17 Mar 2022 16:00:49 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id 11-20020a2e154b000000b0024967cd674esm191876ljv.35.2022.03.17.16.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 16:00:49 -0700 (PDT) From: Linus Walleij To: Johan Hovold Cc: linux-kernel@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Date: Thu, 17 Mar 2022 23:58:40 +0100 Message-Id: <20220317225844.1262643-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This rewrites the text-based GNSS common bindings to use a YAML schema. Cc: devicetree@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Collected Krzysztof's review tag - No changes just resending --- .../devicetree/bindings/gnss/gnss-common.yaml | 55 +++++++++++++++++++ .../devicetree/bindings/gnss/gnss.txt | 37 ------------- 2 files changed, 55 insertions(+), 37 deletions(-) create mode 100644 Documentation/devicetree/bindings/gnss/gnss-common.yaml delete mode 100644 Documentation/devicetree/bindings/gnss/gnss.txt diff --git a/Documentation/devicetree/bindings/gnss/gnss-common.yaml b/Documentation/devicetree/bindings/gnss/gnss-common.yaml new file mode 100644 index 000000000000..963b926e30a7 --- /dev/null +++ b/Documentation/devicetree/bindings/gnss/gnss-common.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gnss/gnss-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for Global Navigation Satellite Systems (GNSS) + receiver devices + +maintainers: + - Johan Hovold + +description: | + This document defines device tree properties common to Global Navigation + Satellite System receivers. + +properties: + $nodename: + pattern: "^gnss(@.*)?$" + + lna-supply: + description: A separate regulator supplying power for the Low Noise + Amplifier (LNA). This is an amplifier connected between the GNSS + device and the receiver antenna. + + enable-gpios: + description: A GPIO line that will enable the GNSS receiver when + asserted. If this line is active low, the GPIO phandle should + consequently be tagged with the GPIO_ACTIVE_LOW flag so the operating + system can rely on asserting the line to enable the GNSS device. + maxItems: 1 + + timepulse-gpios: + description: When a timepulse is provided to the GNSS device using a + GPIO line, this is used. + maxItems: 1 + + current-speed: + description: The baudrate in bits per second of the device as it comes + online, current active speed. + $ref: /schemas/types.yaml#/definitions/uint32 + +additionalProperties: true + +examples: + - | + #include + serial { + gnss { + compatible = "u-blox,neo-8"; + vcc-supply = <&gnss_reg>; + timepulse-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + current-speed = <4800>; + }; + }; diff --git a/Documentation/devicetree/bindings/gnss/gnss.txt b/Documentation/devicetree/bindings/gnss/gnss.txt deleted file mode 100644 index d6dc9c0d8249..000000000000 --- a/Documentation/devicetree/bindings/gnss/gnss.txt +++ /dev/null @@ -1,37 +0,0 @@ -GNSS Receiver DT binding - -This documents the binding structure and common properties for GNSS receiver -devices. - -A GNSS receiver node is a node named "gnss" and typically resides on a serial -bus (e.g. UART, I2C or SPI). - -Please refer to the following documents for generic properties: - - Documentation/devicetree/bindings/serial/serial.yaml - Documentation/devicetree/bindings/spi/spi-bus.txt - -Required properties: - -- compatible : A string reflecting the vendor and specific device the node - represents - -Optional properties: -- lna-supply : Separate supply for an LNA -- enable-gpios : GPIO used to enable the device -- timepulse-gpios : Time pulse GPIO - -Example: - -serial@1234 { - compatible = "ns16550a"; - - gnss { - compatible = "u-blox,neo-8"; - - vcc-supply = <&gnss_reg>; - timepulse-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; - - current-speed = <4800>; - }; -}; From patchwork Thu Mar 17 22:58:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 552300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0453C433EF for ; Thu, 17 Mar 2022 23:00:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbiCQXCL (ORCPT ); Thu, 17 Mar 2022 19:02:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbiCQXCL (ORCPT ); Thu, 17 Mar 2022 19:02:11 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DECEB147AFD for ; Thu, 17 Mar 2022 16:00:53 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id bx44so2689808ljb.13 for ; Thu, 17 Mar 2022 16:00:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k6pGCFpZSVA4WdsVequ/uBV4TZcR3KGRwpFzQt31iO0=; b=isLQpVpqqqpoxVPtT8WrHxtM5GoA0rV+2IKxJmqv60ltU27HtXf/xyJ2Ppz5OdoonC Q8+TnxmwAn48uYay80ZFcY5QiOAg9OuxdiBxYH1MPBGlA4KrRBGSFLqq73S5cWYkqlN6 NtKSFXdcOCvcWKdw8XYy8kqrYsz6yzq2klfbEGXZQoZLOaXywCCPeFEbBy3uAUnkldNv ko3HqF8WEkdZbbC5WfIV61RgNOiBWvIJOU6b2Ad0t9WlHCsCnPjpxjvLzbtCWHYjKqVj /DqNs1l4b1nMCHKOG7xAkpa8SAsDUojQV56nXaFgCqSwUDy2hiidgcLI25Qdikdx/GKV KnLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k6pGCFpZSVA4WdsVequ/uBV4TZcR3KGRwpFzQt31iO0=; b=x7pSMywfj/X7IdMeR8URCKq7N480V+aPdK1mQLPGIEDjVYXj6kirhYzrE+IZ2w61oX Aq9Rw6xOvctaTToZ4NfdlRhiXMj7SakY1kRldojPd8eIaMLueJnEnF0ifKJwZuAICvuI cXJbqscWL4fCh26JIBSTJnX9s/mh7qzhMQ2+Dl2GgbObieht/OLHyVQEymX0dc/VpQMr J+VHhYzfhxMSpJMP26xrBZBnTlRMoxoLUAufteTDtiNC+a/kUJPi7OB9JPXZ6Cv3pvN8 4ZPY6NVPqivmMRo/BHeO6q/dqpdyKl3oxD+cNNbejfgk2fJT0/mx5PVGf3qNd6XJlBJ0 MpCQ== X-Gm-Message-State: AOAM530/+0zdy1hoLIx3voy34wl022Y5AaqMMELeGDrMPbhRZCYgIxfD X9DKpg3cvAv94kmbZsy94yiuHbR9j7T3WQ== X-Google-Smtp-Source: ABdhPJyxUj4uP2bWGRXszAdwLp7lM5cQT/CyvD3iLcClfAMJRw+eYpxHl0DUCy4dafeN5jmkwbGBYw== X-Received: by 2002:a2e:834f:0:b0:249:357c:bf28 with SMTP id l15-20020a2e834f000000b00249357cbf28mr4380677ljh.102.1647558052195; Thu, 17 Mar 2022 16:00:52 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id 11-20020a2e154b000000b0024967cd674esm191876ljv.35.2022.03.17.16.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 16:00:51 -0700 (PDT) From: Linus Walleij To: Johan Hovold Cc: linux-kernel@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Date: Thu, 17 Mar 2022 23:58:41 +0100 Message-Id: <20220317225844.1262643-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317225844.1262643-1-linus.walleij@linaro.org> References: <20220317225844.1262643-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This modifies the existing U-Blox GNSS bindings to reference the common GNSS YAML bindings. Fixed an unrelated whitespace error while at it. Cc: devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Change additionalProperties to unevaluatedProperties and cut the :true insertion of properties from the common props so new common properties get available immediately. --- .../devicetree/bindings/gnss/u-blox,neo-6m.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml index 396101a223e7..35a760cfd343 100644 --- a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml +++ b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml @@ -6,6 +6,9 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: U-blox GNSS Receiver Device Tree Bindings +allOf: + - $ref: gnss-common.yaml# + maintainers: - Johan Hovold @@ -29,27 +32,20 @@ properties: description: > Main voltage regulator - timepulse-gpios: - maxItems: 1 - description: > - Time pulse GPIO - u-blox,extint-gpios: maxItems: 1 description: > GPIO connected to the "external interrupt" input pin - + v-bckp-supply: description: > Backup voltage regulator - current-speed: true - required: - compatible - vcc-supply -additionalProperties: false +unevaluatedProperties: false examples: - | From patchwork Thu Mar 17 22:58:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 552731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F86C433FE for ; Thu, 17 Mar 2022 23:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbiCQXCO (ORCPT ); Thu, 17 Mar 2022 19:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230062AbiCQXCN (ORCPT ); Thu, 17 Mar 2022 19:02:13 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B280147AFD for ; Thu, 17 Mar 2022 16:00:55 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id s25so9212321lji.5 for ; Thu, 17 Mar 2022 16:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=45WiQuXkjTLwjH5KekJze4iDLtUQ2UlWaqKlaD1vlfU=; b=O1uLVIDYM5fl7sZQRbcj9rjoWtAVK446LBhQZ+vm2XLwi/hJGbQLrpKZCSfjgZV9xC f1v4X9+/CJoIASqRasudGMitV3p+vb3zOiD0kkW8W0cnfXIUcCwC6gtKJT7vue6y/KZu L+8PDBjEaIFO+x7JzYRpVPJ1CquGg4BbIxkzHcuhT10PpOwYyrDpNZyiw6cnlwwqOsDL ADdeUbp4cX24Io+vocI8kkwk/czBm8ORISg5LYRqNd32i6LZHEmkkTS1NeapFpjn7zLE y/6WTcBtSGWwfiauf9fCvAWF/tY+M2JMQE2EfOa9YDlcUmHQw8/4ow9xmYiUo7Muv27o QMxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=45WiQuXkjTLwjH5KekJze4iDLtUQ2UlWaqKlaD1vlfU=; b=TCqCYpmsX+YbeaJMLMmWTd++svkMOBtctI0bzwluafPR8rP71XoNjoQgWEen8BXTI0 GhJo5k4MJFyXVeZLQXXU+kOzKchxN9KD96LYmYKFWk5PDHMHj/uMAzxy9n5YWwZPxSzu hMfv/hcct0alrUdsiz5V6hdEchuaeIxxzGaNh3otBYd7yO/YxonjkJ/neWf0FUPjBT+F eJaC+oWbjBKYkPvtjPwPXmQYgHZbfo4wXrst80AK14IzI2113S09Fv5SUe2fXHgiYNKp MxBIdQRskzRPyy/B2BDstiOdLQm8Fch+Ydz+PKGHRLOJU7mzyKq22S/wG9mvG6N+R11o rxTQ== X-Gm-Message-State: AOAM530zJBaN+A+7h+AlwjjyVBtNZYPCrxeN6eRN+xcRqjafFMRmYlwn rnCC3UzCya8Y2RNJNNKFrvJCGw== X-Google-Smtp-Source: ABdhPJwuwYyEOdjueIIJ8/a9Si9EB0k5nSdlhsDtQPYoGlIqZnU0oT4grkWutD4aG3ykIfk5ZVJ4og== X-Received: by 2002:a05:651c:2dc:b0:247:e451:48ae with SMTP id f28-20020a05651c02dc00b00247e45148aemr4478851ljo.248.1647558053641; Thu, 17 Mar 2022 16:00:53 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id 11-20020a2e154b000000b0024967cd674esm191876ljv.35.2022.03.17.16.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 16:00:53 -0700 (PDT) From: Linus Walleij To: Johan Hovold Cc: linux-kernel@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML Date: Thu, 17 Mar 2022 23:58:42 +0100 Message-Id: <20220317225844.1262643-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317225844.1262643-1-linus.walleij@linaro.org> References: <20220317225844.1262643-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This rewrites the SiRFstar DT bindings in YAML. Cc: devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Change additionalProperties: false to uneavaluatedProperties: false so new common properties get available immediately - This should also make the checker robot happy about lna-supply --- .../devicetree/bindings/gnss/sirfstar.txt | 46 ------------ .../devicetree/bindings/gnss/sirfstar.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 46 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gnss/sirfstar.txt create mode 100644 Documentation/devicetree/bindings/gnss/sirfstar.yaml diff --git a/Documentation/devicetree/bindings/gnss/sirfstar.txt b/Documentation/devicetree/bindings/gnss/sirfstar.txt deleted file mode 100644 index f4252b6b660b..000000000000 --- a/Documentation/devicetree/bindings/gnss/sirfstar.txt +++ /dev/null @@ -1,46 +0,0 @@ -SiRFstar-based GNSS Receiver DT binding - -SiRFstar chipsets are used in GNSS-receiver modules produced by several -vendors and can use UART, SPI or I2C interfaces. - -Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic -properties. - -Required properties: - -- compatible : Must be one of - - "fastrax,uc430" - "linx,r4" - "wi2wi,w2sg0004" - "wi2wi,w2sg0008i" - "wi2wi,w2sg0084i" - -- vcc-supply : Main voltage regulator (pin name: 3V3_IN, VCC, VDD) - -Required properties (I2C): -- reg : I2C slave address - -Required properties (SPI): -- reg : SPI chip select address - -Optional properties: - -- sirf,onoff-gpios : GPIO used to power on and off device (pin name: ON_OFF) -- sirf,wakeup-gpios : GPIO used to determine device power state - (pin name: RFPWRUP, WAKEUP) -- timepulse-gpios : Time pulse GPIO (pin name: 1PPS, TM) - -Example: - -serial@1234 { - compatible = "ns16550a"; - - gnss { - compatible = "wi2wi,w2sg0084i"; - - vcc-supply = <&gnss_reg>; - sirf,onoff-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; - sirf,wakeup-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; - }; -}; diff --git a/Documentation/devicetree/bindings/gnss/sirfstar.yaml b/Documentation/devicetree/bindings/gnss/sirfstar.yaml new file mode 100644 index 000000000000..9f80add3e61b --- /dev/null +++ b/Documentation/devicetree/bindings/gnss/sirfstar.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gnss/sirfstar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SiRFstar GNSS Receiver Device Tree Bindings + +allOf: + - $ref: gnss-common.yaml# + +maintainers: + - Johan Hovold + +description: + The SiRFstar GNSS receivers have incarnated over the years in different + chips, starting from the SiRFstarIII which was a chip that was introduced in + 2004 and used in a lot of dedicated GPS devices. In 2009 SiRF was acquired + by CSR (Cambridge Silicon Radio) and in 2012 the CSR GPS business was + acquired by Samsung, while some products remained with CSR. In 2014 CSR + was acquired by Qualcomm who still sell some of the SiRF products. + + SiRF chips can be used over UART, I2C or SPI buses. + +properties: + compatible: + enum: + - fastrax,uc430 + - linx,r4 + - wi2wi,w2sg0004 + - wi2wi,w2sg0008i + - wi2wi,w2sg0084i + + reg: + description: + The I2C Address, SPI chip select address. Not required on UART buses. + + vcc-supply: + description: + Main voltage regulator, pin names such as 3V3_IN, VCC, VDD. + + timepulse-gpios: + description: Comes with pin names such as 1PPS or TM + + sirf,onoff-gpios: + maxItems: 1 + description: GPIO used to power on and off device, pin name ON_OFF. + + sirf,wakeup-gpios: + maxItems: 1 + description: GPIO used to determine device power state, pin names such + as RFPWRUP, WAKEUP. + +required: + - compatible + - vcc-supply + +unevaluatedProperties: false + +examples: + - | + #include + serial { + gnss { + compatible = "wi2wi,w2sg0084i"; + vcc-supply = <&gnss_vcc_reg>; + sirf,onoff-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + sirf,wakeup-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + current-speed = <38400>; + }; + }; From patchwork Thu Mar 17 22:58:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 552299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 113B1C4332F for ; Thu, 17 Mar 2022 23:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbiCQXCP (ORCPT ); Thu, 17 Mar 2022 19:02:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbiCQXCO (ORCPT ); Thu, 17 Mar 2022 19:02:14 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3ADF151D2B for ; Thu, 17 Mar 2022 16:00:56 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id c15so9181751ljr.9 for ; Thu, 17 Mar 2022 16:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=67Gg47WBDYq5WUX7O1pPL0ZsRMjTTDTDwwwbK5y73ZM=; b=iFl3eT+Cb3O7EJYyJnxZbDzWHcFUOsPk1mSkEf/kRDR/nhQG+uzQWfzV89US4AB8e/ IC+JBjozVfC9hwE3+6WBkPqbWCOzwA690xRn9LZbqnUAB+MWcxrQHHkJoXPpqRlG+yRh GJOzhM4AhPjpM5TZNqeJR0rTfVIkqFVf1inUCD/U0cLer9ybo7DYYnlMIQB7mqK80Zi4 pWY3lS3dsnDXyeFRbktyld7eiwt6Mu+Irh28lyncZX++vF6xvhDGfdNUZ2cjtzvJTH80 u9N3bYEaBZ8msVNFHURMekpabIMRHQuToeRrNItJSfQisnA3x5jJhZmI1tf2/dLP9S5C y/zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=67Gg47WBDYq5WUX7O1pPL0ZsRMjTTDTDwwwbK5y73ZM=; b=pTcH52RpnNv8UmZRnkOCqqbuc/BUUoHe0Ehw68Bgq9vHMDYea8b+XE0OmUZ73dubV9 p1owq+RRaJ+cuRMkA9ggyv6X7c01f1EKsLNkPVqj0ftIKHhq5IUCTTIlcWFSWJb5objp Q9KS2iP9bsYw+AgRSsVOmqHjEMI0XAHL0XQ4tkKZZueorZYd2uWwRGpvOnBqKgjkel9I +rYuRUQcT+U8gjLqBI97ZkMM1A53QDdVe+zxwVQVITCX/0b+q20iZy9JIqIDxYyBisJu jjRqdtbr9N1NAHOkVDJaEPgmVHWdupQMkf19vc77rfWalwqEiIEbAHr2ZvzvS0gZcWiF loiw== X-Gm-Message-State: AOAM532giVZu9atIfPnPH08DTCrTJV6T+TdoqOlVuWgzIVCIWGGinf+3 9GOuMprJ8Pi626Ir688lpeHtoQ== X-Google-Smtp-Source: ABdhPJzyy7abJDPDvIRNJdA7GdH8ZGYstjjr50/OwVCX1P8uUBfQ50wPheUtR6G0hcDZ+9k1txeEpA== X-Received: by 2002:a2e:b449:0:b0:249:388a:3dec with SMTP id o9-20020a2eb449000000b00249388a3decmr4337546ljm.346.1647558055113; Thu, 17 Mar 2022 16:00:55 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id 11-20020a2e154b000000b0024967cd674esm191876ljv.35.2022.03.17.16.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 16:00:54 -0700 (PDT) From: Linus Walleij To: Johan Hovold Cc: linux-kernel@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips Date: Thu, 17 Mar 2022 23:58:43 +0100 Message-Id: <20220317225844.1262643-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317225844.1262643-1-linus.walleij@linaro.org> References: <20220317225844.1262643-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The CSR GSD4t is a CSR product using the SiRFstarIV core, and the CSR CSRG05TA03-ICJE-R is a CSR product using the SiRFstarV core. These chips have a SRESETN line that can be pulled low to hard reset the chip and in some designs this is connected to a GPIO, so add this as an optional property. Update the example with a reset line so users see that it need to be tagged as active low. Cc: devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Signed-off-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski --- ChangeLog v1->v2: - Add maxItems: 1 to the reset-gpios --- Documentation/devicetree/bindings/gnss/sirfstar.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/gnss/sirfstar.yaml b/Documentation/devicetree/bindings/gnss/sirfstar.yaml index 9f80add3e61b..f3d8902dca04 100644 --- a/Documentation/devicetree/bindings/gnss/sirfstar.yaml +++ b/Documentation/devicetree/bindings/gnss/sirfstar.yaml @@ -25,6 +25,8 @@ description: properties: compatible: enum: + - csr,gsd4t + - csr,csrg05ta03-icje-r - fastrax,uc430 - linx,r4 - wi2wi,w2sg0004 @@ -39,6 +41,11 @@ properties: description: Main voltage regulator, pin names such as 3V3_IN, VCC, VDD. + reset-gpios: + maxItems: 1 + description: An optional active low reset line, should be flagged with + GPIO_ACTIVE_LOW. + timepulse-gpios: description: Comes with pin names such as 1PPS or TM @@ -64,6 +71,7 @@ examples: gnss { compatible = "wi2wi,w2sg0084i"; vcc-supply = <&gnss_vcc_reg>; + reset-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; sirf,onoff-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; sirf,wakeup-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; current-speed = <38400>; From patchwork Thu Mar 17 22:58:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 552730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30841C433EF for ; Thu, 17 Mar 2022 23:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbiCQXCZ (ORCPT ); Thu, 17 Mar 2022 19:02:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbiCQXCP (ORCPT ); Thu, 17 Mar 2022 19:02:15 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E92B147AFD for ; Thu, 17 Mar 2022 16:00:58 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id y17so9156738ljd.12 for ; Thu, 17 Mar 2022 16:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1h6v43X9Wm6mV5ATOpHxZMr+fhOw297iiR7I0VujGPQ=; b=wsTHgw2VBBcm8YG8qFRGs1WpXu6JyF6Icf7SYw2oQ2KyRk6OOMy2lcGej02iEPfdBj aaisFTjvISJ8vBPGrFZDgxnzDIAx2m9MvaNK3aXJy/1F7w1v+N6EGnDH2YwJmwJJrlwz VTQI7fG36ROUtvLL9CDQgS193hnT7stsgy523VSeAkEVoyT1L1rgo0DhplRoubiltQM7 ut796lq+9aEWQHFf/n0TH5zDYRG0EaPaPuJVm5lO/Z2uOXTn40j63YijDtaxdnz4qaqz PCpEV4UmXZKUZ2l7b23KU8nGmJO5l3L0ooot97t0ugw4djgP28PQWTI52F4wwS09BAiC GLgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1h6v43X9Wm6mV5ATOpHxZMr+fhOw297iiR7I0VujGPQ=; b=oyHaCClry20HtZjBUpv94X355O3YE7rEZ4Vr0onLkKwHuktNweYVwvqRNIHnuTJvK2 D+kRkExxkwHw3AIP3w806rCBYhqO056I+1/D+kbHAeOW8tdeVrFpj1XthkGDAs6/OeGX SnSTouwv3m3ERlwTsviRldWN/fCslwywjU4c3Euz91DtVvSnUrMN1r2euVBCvMbuIXpy JiWtiF5whPyaLdQRzQF7JQ8AyaEiEjJ3dLySRpffP++qUiTtAIu8dNxQY2dDqiryi2iZ yfM9nYzEj16gz7JfSE++uRJ7hgE6BMXZw/119ccjz6fKIvZQLg2eKCcZnPKWqBbl81+8 mpXA== X-Gm-Message-State: AOAM530WODTz1aIxWXZT2o42mkIIRNZ3S7fSB6q+hZXE8BHDKi1dzm5v xSZa7LHwVNLFruYFRdjBSAE5XQ== X-Google-Smtp-Source: ABdhPJwsJWZmyw0Dj/XqEo3qOAjEFzd2Ly8PIdTH8f3QVrdumsfKQ80WpyvQczrfw2PPEZouvhCfVA== X-Received: by 2002:a05:651c:4c6:b0:249:68fe:916e with SMTP id e6-20020a05651c04c600b0024968fe916emr1409054lji.288.1647558056520; Thu, 17 Mar 2022 16:00:56 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id 11-20020a2e154b000000b0024967cd674esm191876ljv.35.2022.03.17.16.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 16:00:56 -0700 (PDT) From: Linus Walleij To: Johan Hovold Cc: linux-kernel@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Date: Thu, 17 Mar 2022 23:58:44 +0100 Message-Id: <20220317225844.1262643-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317225844.1262643-1-linus.walleij@linaro.org> References: <20220317225844.1262643-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This rewrites the Mediatek GNSS bindings in YAML. Cc: devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - New patch since Krzysztof pointed out there is really just one more binding to convert, so why not. --- .../devicetree/bindings/gnss/mediatek.txt | 35 ------------ .../devicetree/bindings/gnss/mediatek.yaml | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.yaml diff --git a/Documentation/devicetree/bindings/gnss/mediatek.txt b/Documentation/devicetree/bindings/gnss/mediatek.txt deleted file mode 100644 index 80cb802813c5..000000000000 --- a/Documentation/devicetree/bindings/gnss/mediatek.txt +++ /dev/null @@ -1,35 +0,0 @@ -Mediatek-based GNSS Receiver DT binding - -Mediatek chipsets are used in GNSS-receiver modules produced by several -vendors and can use a 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: - -- current-speed : Default UART baud rate -- gnss-fix-gpios : GPIO used to determine device position fix state - (pin name: FIX, 3D_FIX) -- reset-gpios : GPIO used to reset the device (pin name: RESET, NRESET) -- timepulse-gpios : Time pulse GPIO (pin name: PPS1, 1PPS) -- vbackup-supply : Backup voltage regulator (pin name: VBAT, VBACKUP) - -Example: - -serial@1234 { - compatible = "ns16550a"; - - gnss { - compatible = "globaltop,pa6h"; - vcc-supply = <&vcc_3v3>; - }; -}; diff --git a/Documentation/devicetree/bindings/gnss/mediatek.yaml b/Documentation/devicetree/bindings/gnss/mediatek.yaml new file mode 100644 index 000000000000..273732225c1f --- /dev/null +++ b/Documentation/devicetree/bindings/gnss/mediatek.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gnss/mediatek.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek GNSS Receiver Device Tree Bindings + +allOf: + - $ref: gnss-common.yaml# + +maintainers: + - Johan Hovold + +description: + Mediatek chipsets are used in GNSS-receiver modules produced by several + vendors and can use a UART interface. + +properties: + compatible: + const: globaltop,pa6h + + vcc-supply: + description: + Main voltage regulator, pin name VCC. + + reset-gpios: + maxItems: 1 + description: An optional reset line, with names such as RESET or NRESET. + If the line is active low it should be flagged with GPIO_ACTIVE_LOW. + + timepulse-gpios: + description: Comes with pin names such as PPS1 or 1PPS. + + vbackup-supply: + description: + Regulator providing backup voltage, pin names such as VBAT or VBACKUP. + +required: + - compatible + - vcc-supply + +unevaluatedProperties: false + +examples: + - | + #include + serial { + gnss { + compatible = "globaltop,pa6h"; + vcc-supply = <&vcc_3v3>; + reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + };