* [PATCH 2/4] dt-bindings: gnss: Modify u-blox to use common bindings
2022-03-11 23:51 [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
@ 2022-03-11 23:51 ` Linus Walleij
2022-03-12 11:41 ` Krzysztof Kozlowski
2022-03-11 23:51 ` [PATCH 3/4] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2022-03-11 23:51 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree
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
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
.../devicetree/bindings/gnss/u-blox,neo-6m.yaml | 10 +++++-----
1 file changed, 5 insertions(+), 5 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..5dffe722777f 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,16 +32,13 @@ properties:
description: >
Main voltage regulator
- timepulse-gpios:
- maxItems: 1
- description: >
- Time pulse GPIO
+ timepulse-gpios: true
u-blox,extint-gpios:
maxItems: 1
description: >
GPIO connected to the "external interrupt" input pin
-
+
v-bckp-supply:
description: >
Backup voltage regulator
--
2.35.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] dt-bindings: gnss: Modify u-blox to use common bindings
2022-03-11 23:51 ` [PATCH 2/4] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
@ 2022-03-12 11:41 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-12 11:41 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 12/03/2022 00:51, 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
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../devicetree/bindings/gnss/u-blox,neo-6m.yaml | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 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..5dffe722777f 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,16 +32,13 @@ properties:
> description: >
> Main voltage regulator
>
> - timepulse-gpios:
> - maxItems: 1
> - description: >
> - Time pulse GPIO
> + timepulse-gpios: true
>
> u-blox,extint-gpios:
> maxItems: 1
> description: >
> GPIO connected to the "external interrupt" input pin
> -
> +
> v-bckp-supply:
> description: >
> Backup voltage regulator
I propose to change additionalProperties->unevaluatedProperties and
remove current-speed and timepulse-gpios. This way also new properties
from gnss-common can be easily used.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] dt-bindings: gnss: Rewrite sirfstar binding in YAML
2022-03-11 23:51 [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
2022-03-11 23:51 ` [PATCH 2/4] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
@ 2022-03-11 23:51 ` Linus Walleij
2022-03-12 3:41 ` Rob Herring
2022-03-11 23:51 ` [PATCH 4/4] dt-bindings: gnss: Add two more chips Linus Walleij
2022-03-12 11:39 ` [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Krzysztof Kozlowski
3 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2022-03-11 23:51 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree
This rewrites the SiRFstar DT bindings in YAML.
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
.../devicetree/bindings/gnss/sirfstar.txt | 46 ------------
.../devicetree/bindings/gnss/sirfstar.yaml | 73 +++++++++++++++++++
2 files changed, 73 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..91874241d0f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/gnss/sirfstar.yaml
@@ -0,0 +1,73 @@
+# 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.
+
+ current-speed: true
+
+required:
+ - compatible
+ - vcc-supply
+
+additionalProperties: 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] 9+ messages in thread
* Re: [PATCH 3/4] dt-bindings: gnss: Rewrite sirfstar binding in YAML
2022-03-11 23:51 ` [PATCH 3/4] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
@ 2022-03-12 3:41 ` Rob Herring
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2022-03-12 3:41 UTC (permalink / raw)
To: Linus Walleij; +Cc: devicetree, Johan Hovold, linux-kernel
On Sat, 12 Mar 2022 00:51:18 +0100, Linus Walleij wrote:
> This rewrites the SiRFstar DT bindings in YAML.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../devicetree/bindings/gnss/sirfstar.txt | 46 ------------
> .../devicetree/bindings/gnss/sirfstar.yaml | 73 +++++++++++++++++++
> 2 files changed, 73 insertions(+), 46 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gnss/sirfstar.txt
> create mode 100644 Documentation/devicetree/bindings/gnss/sirfstar.yaml
>
Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.
Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.
Full log is available here: https://patchwork.ozlabs.org/patch/1604572
gnss: 'lna-supply' does not match any of the regexes: 'pinctrl-[0-9]+'
arch/arm/boot/dts/omap3-gta04a3.dt.yaml
arch/arm/boot/dts/omap3-gta04a4.dt.yaml
arch/arm/boot/dts/omap3-gta04a5.dt.yaml
arch/arm/boot/dts/omap3-gta04a5one.dt.yaml
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] dt-bindings: gnss: Add two more chips
2022-03-11 23:51 [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
2022-03-11 23:51 ` [PATCH 2/4] dt-bindings: gnss: Modify u-blox to use common bindings Linus Walleij
2022-03-11 23:51 ` [PATCH 3/4] dt-bindings: gnss: Rewrite sirfstar binding in YAML Linus Walleij
@ 2022-03-11 23:51 ` Linus Walleij
2022-03-12 11:44 ` Krzysztof Kozlowski
2022-03-12 11:39 ` [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Krzysztof Kozlowski
3 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2022-03-11 23:51 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-kernel, Linus Walleij, devicetree
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
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Documentation/devicetree/bindings/gnss/sirfstar.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/gnss/sirfstar.yaml b/Documentation/devicetree/bindings/gnss/sirfstar.yaml
index 91874241d0f3..e2ad1f01f9f3 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,10 @@ properties:
description:
Main voltage regulator, pin names such as 3V3_IN, VCC, VDD.
+ reset-gpios:
+ 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
@@ -66,6 +72,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] 9+ messages in thread
* Re: [PATCH 4/4] dt-bindings: gnss: Add two more chips
2022-03-11 23:51 ` [PATCH 4/4] dt-bindings: gnss: Add two more chips Linus Walleij
@ 2022-03-12 11:44 ` Krzysztof Kozlowski
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-12 11:44 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 12/03/2022 00:51, 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
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Documentation/devicetree/bindings/gnss/sirfstar.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gnss/sirfstar.yaml b/Documentation/devicetree/bindings/gnss/sirfstar.yaml
> index 91874241d0f3..e2ad1f01f9f3 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,10 @@ properties:
> description:
> Main voltage regulator, pin names such as 3V3_IN, VCC, VDD.
>
> + reset-gpios:
> + description: An optional active low reset line, should be flagged with
> + GPIO_ACTIVE_LOW.
> +
maxItems
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML
2022-03-11 23:51 [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Linus Walleij
` (2 preceding siblings ...)
2022-03-11 23:51 ` [PATCH 4/4] dt-bindings: gnss: Add two more chips Linus Walleij
@ 2022-03-12 11:39 ` Krzysztof Kozlowski
2022-03-17 17:54 ` Linus Walleij
3 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-12 11:39 UTC (permalink / raw)
To: Linus Walleij, Johan Hovold; +Cc: linux-kernel, devicetree
On 12/03/2022 00:51, Linus Walleij wrote:
> This rewrites the text-based GNSS common bindings to use
> a YAML schema.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../devicetree/bindings/gnss/gnss-common.yaml | 55 +++++++++++++++++++
> .../devicetree/bindings/gnss/gnss.txt | 37 -------------
I see you're updating later sirfstar.txt, but you also have mediatek.txt
referencing old txt file.
> 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
>
With the last gnss.txt reference fixed:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML
2022-03-12 11:39 ` [PATCH 1/4] dt-bindings: gnss: Rewrite common bindings in YAML Krzysztof Kozlowski
@ 2022-03-17 17:54 ` Linus Walleij
0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2022-03-17 17:54 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Johan Hovold, linux-kernel, devicetree
On Sat, Mar 12, 2022 at 12:39 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > .../devicetree/bindings/gnss/gnss-common.yaml | 55 +++++++++++++++++++
> > .../devicetree/bindings/gnss/gnss.txt | 37 -------------
>
> I see you're updating later sirfstar.txt, but you also have mediatek.txt
> referencing old txt file.
You're right, why leave one off. I'll just convert that binding to YAML
as well and be done with it.
Thanks!
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread