All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: gnss: Rewrite Mediatek bindings in YAML
@ 2022-04-25 13:29 Linus Walleij
  2022-04-25 17:49 ` Krzysztof Kozlowski
  2022-04-25 20:19 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2022-04-25 13:29 UTC (permalink / raw)
  To: Johan Hovold, Rob Herring
  Cc: linux-kernel, Linus Walleij, devicetree, Krzysztof Kozlowski

This rewrites the Mediatek GNSS bindings in YAML.

Cc: devicetree@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- Add the missed gnss-fix-gpios.
- Move allOf to right before the properties.
- Keep the description on timepulse-gpios because it documents
  which pins are used on this chip.
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    | 59 +++++++++++++++++++
 2 files changed, 59 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..45cf01b27700
--- /dev/null
+++ b/Documentation/devicetree/bindings/gnss/mediatek.yaml
@@ -0,0 +1,59 @@
+# 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
+
+maintainers:
+  - Johan Hovold <johan@kernel.org>
+
+description:
+  Mediatek chipsets are used in GNSS-receiver modules produced by several
+  vendors and can use a UART interface.
+
+allOf:
+  - $ref: gnss-common.yaml#
+
+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.
+
+  gnss-fix-gpios:
+    maxItems: 1
+    description: GPIO used to determine device position fix state, pin names
+      FIX or 3D_FIX.
+
+  vbackup-supply:
+    description:
+      Regulator providing backup voltage, pin names such as VBAT or VBACKUP.
+
+required:
+  - compatible
+  - vcc-supply
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    serial {
+        gnss {
+            compatible = "globaltop,pa6h";
+            vcc-supply = <&vcc_3v3>;
+            reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+        };
+    };
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] dt-bindings: gnss: Rewrite Mediatek bindings in YAML
  2022-04-25 13:29 [PATCH v3] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
@ 2022-04-25 17:49 ` Krzysztof Kozlowski
  2022-04-25 20:19 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-25 17:49 UTC (permalink / raw)
  To: Linus Walleij, Johan Hovold, Rob Herring; +Cc: linux-kernel, devicetree

On 25/04/2022 15:29, Linus Walleij wrote:
> This rewrites the Mediatek GNSS bindings in YAML.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Add the missed gnss-fix-gpios.
> - Move allOf to right before the properties.
> - Keep the description on timepulse-gpios because it documents
>   which pins are used on this chip.
> 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    | 59 +++++++++++++++++++

Bindings look good, just the filename should be probably more specific,
to match the model... but then who is the vendor? mediatek,pa6h.yaml or
mediatek,globaltop-pa6h.yaml? I sincerely do not know, so:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] dt-bindings: gnss: Rewrite Mediatek bindings in YAML
  2022-04-25 13:29 [PATCH v3] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
  2022-04-25 17:49 ` Krzysztof Kozlowski
@ 2022-04-25 20:19 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-04-25 20:19 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, devicetree, Krzysztof Kozlowski, Johan Hovold, Rob Herring

On Mon, 25 Apr 2022 15:29:47 +0200, Linus Walleij wrote:
> This rewrites the Mediatek GNSS bindings in YAML.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Add the missed gnss-fix-gpios.
> - Move allOf to right before the properties.
> - Keep the description on timepulse-gpios because it documents
>   which pins are used on this chip.
> 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    | 59 +++++++++++++++++++
>  2 files changed, 59 insertions(+), 35 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.yaml
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-25 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 13:29 [PATCH v3] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
2022-04-25 17:49 ` Krzysztof Kozlowski
2022-04-25 20:19 ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.