* [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML
@ 2022-03-17 22:58 Linus Walleij
2022-03-17 22:58 ` [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Linus Walleij @ 2022-03-17 22:58 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree, Krzysztof Kozlowski
This rewrites the text-based GNSS common bindings to use
a YAML schema.
Cc: devicetree@vger.kernel.org
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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 <johan@kernel.org>
+
+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 <dt-bindings/gpio/gpio.h>
+ 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>;
- };
-};
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings
2022-03-17 22:58 [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
@ 2022-03-17 22:58 ` Linus Walleij
2022-03-18 9:13 ` Krzysztof Kozlowski
2022-03-20 18:54 ` Rob Herring
2022-03-17 22:58 ` [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
` (3 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Linus Walleij @ 2022-03-17 22:58 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree, Krzysztof Kozlowski
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 <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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 <johan@kernel.org>
@@ -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:
- |
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML
2022-03-17 22:58 [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
2022-03-17 22:58 ` [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
@ 2022-03-17 22:58 ` Linus Walleij
2022-03-18 9:29 ` Krzysztof Kozlowski
2022-03-17 22:58 ` [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips Linus Walleij
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Linus Walleij @ 2022-03-17 22:58 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree, Krzysztof Kozlowski
This rewrites the SiRFstar DT bindings in YAML.
Cc: devicetree@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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 <johan@kernel.org>
+
+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 <dt-bindings/gpio/gpio.h>
+ 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>;
+ };
+ };
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips
2022-03-17 22:58 [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
2022-03-17 22:58 ` [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
2022-03-17 22:58 ` [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
@ 2022-03-17 22:58 ` Linus Walleij
2022-03-18 9:29 ` Krzysztof Kozlowski
2022-03-21 18:59 ` Rob Herring
2022-03-17 22:58 ` [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
2022-03-20 18:53 ` [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common " Rob Herring
4 siblings, 2 replies; 14+ messages in thread
From: Linus Walleij @ 2022-03-17 22:58 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree, Krzysztof Kozlowski
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 <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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>;
--
2.35.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML
2022-03-17 22:58 [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
` (2 preceding siblings ...)
2022-03-17 22:58 ` [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips Linus Walleij
@ 2022-03-17 22:58 ` Linus Walleij
2022-03-18 9:33 ` Krzysztof Kozlowski
2022-03-20 18:53 ` [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common " Rob Herring
4 siblings, 1 reply; 14+ messages in thread
From: Linus Walleij @ 2022-03-17 22:58 UTC (permalink / raw)
To: Johan Hovold; +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 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 <johan@kernel.org>
+
+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 <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] 14+ messages in thread
* Re: [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings
2022-03-17 22:58 ` [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
@ 2022-03-18 9:13 ` Krzysztof Kozlowski
2022-03-20 18:54 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-18 9:13 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 17/03/2022 23:58, Linus Walleij wrote:
> 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 <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> 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(-)
>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML
2022-03-17 22:58 ` [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
@ 2022-03-18 9:29 ` Krzysztof Kozlowski
2022-03-20 18:58 ` Rob Herring
0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-18 9:29 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 17/03/2022 23:58, Linus Walleij wrote:
> This rewrites the SiRFstar DT bindings in YAML.
>
> Cc: devicetree@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> 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#
The allOf should be just before "properties:" (also in patch #2).
> +
> +maintainers:
> + - Johan Hovold <johan@kernel.org>
> +
> +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
You don't need this, I think. It's coming from gnss-common.yaml.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips
2022-03-17 22:58 ` [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips Linus Walleij
@ 2022-03-18 9:29 ` Krzysztof Kozlowski
2022-03-21 18:59 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-18 9:29 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 17/03/2022 23:58, Linus Walleij wrote:
> 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 <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Add maxItems: 1 to the reset-gpios
> ---
> Documentation/devicetree/bindings/gnss/sirfstar.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML
2022-03-17 22:58 ` [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
@ 2022-03-18 9:33 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-18 9:33 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 17/03/2022 23:58, 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 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)
What happened with this property? It looks not used, but still I am not
sure we should remove it.
> -- 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 <johan@kernel.org>
> +
> +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.
This should not be needed here (same as patch #3). While changing it,
move also "allOf" just before properties.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML
2022-03-17 22:58 [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
` (3 preceding siblings ...)
2022-03-17 22:58 ` [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
@ 2022-03-20 18:53 ` Rob Herring
4 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2022-03-20 18:53 UTC (permalink / raw)
To: Linus Walleij; +Cc: Johan Hovold, Krzysztof Kozlowski, linux-kernel, devicetree
On Thu, 17 Mar 2022 23:58:40 +0100, Linus Walleij wrote:
> This rewrites the text-based GNSS common bindings to use
> a YAML schema.
>
> Cc: devicetree@vger.kernel.org
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> 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
>
Applied, thanks!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings
2022-03-17 22:58 ` [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
2022-03-18 9:13 ` Krzysztof Kozlowski
@ 2022-03-20 18:54 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2022-03-20 18:54 UTC (permalink / raw)
To: Linus Walleij; +Cc: devicetree, Johan Hovold, linux-kernel, Krzysztof Kozlowski
On Thu, 17 Mar 2022 23:58:41 +0100, Linus Walleij wrote:
> 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 <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> 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(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML
2022-03-18 9:29 ` Krzysztof Kozlowski
@ 2022-03-20 18:58 ` Rob Herring
2022-03-22 0:01 ` Linus Walleij
0 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2022-03-20 18:58 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Linus Walleij, Johan Hovold, linux-kernel, devicetree
On Fri, Mar 18, 2022 at 10:29:03AM +0100, Krzysztof Kozlowski wrote:
> On 17/03/2022 23:58, Linus Walleij wrote:
> > This rewrites the SiRFstar DT bindings in YAML.
> >
> > Cc: devicetree@vger.kernel.org
> > Cc: Krzysztof Kozlowski <krzk@kernel.org>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > 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#
>
> The allOf should be just before "properties:" (also in patch #2).
>
> > +
> > +maintainers:
> > + - Johan Hovold <johan@kernel.org>
> > +
> > +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
>
> You don't need this, I think. It's coming from gnss-common.yaml.
I fixed up both and applied.
Rob
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips
2022-03-17 22:58 ` [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips Linus Walleij
2022-03-18 9:29 ` Krzysztof Kozlowski
@ 2022-03-21 18:59 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2022-03-21 18:59 UTC (permalink / raw)
To: Linus Walleij; +Cc: Johan Hovold, linux-kernel, devicetree, Krzysztof Kozlowski
On Thu, Mar 17, 2022 at 11:58:43PM +0100, Linus Walleij wrote:
> 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 <krzk@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Add maxItems: 1 to the reset-gpios
> ---
> Documentation/devicetree/bindings/gnss/sirfstar.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied, thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML
2022-03-20 18:58 ` Rob Herring
@ 2022-03-22 0:01 ` Linus Walleij
0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2022-03-22 0:01 UTC (permalink / raw)
To: Rob Herring; +Cc: Krzysztof Kozlowski, Johan Hovold, linux-kernel, devicetree
On Sun, Mar 20, 2022 at 7:58 PM Rob Herring <robh@kernel.org> wrote:
> I fixed up both and applied.
Thanks for handling this Rob!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-03-22 0:02 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 22:58 [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
2022-03-17 22:58 ` [PATCH 2/5 v2] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
2022-03-18 9:13 ` Krzysztof Kozlowski
2022-03-20 18:54 ` Rob Herring
2022-03-17 22:58 ` [PATCH 3/5 v2] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
2022-03-18 9:29 ` Krzysztof Kozlowski
2022-03-20 18:58 ` Rob Herring
2022-03-22 0:01 ` Linus Walleij
2022-03-17 22:58 ` [PATCH 4/5 v2] dt-bindings: gnss: Add two more chips Linus Walleij
2022-03-18 9:29 ` Krzysztof Kozlowski
2022-03-21 18:59 ` Rob Herring
2022-03-17 22:58 ` [PATCH 5/5 v2] dt-bindings: gnss: Rewrite Mediatek bindings in YAML Linus Walleij
2022-03-18 9:33 ` Krzysztof Kozlowski
2022-03-20 18:53 ` [PATCH 1/5 v2] dt-bindings: gnss: Rewrite common " Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).