dt-bindings: gnss: Rewrite sirfstar binding in YAML

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>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220317225844.1262643-3-linus.walleij@linaro.org
This commit is contained in:
Linus Walleij 2022-03-17 23:58:42 +01:00 committed by Rob Herring
parent 069e6bc6db
commit 5505409e42
2 changed files with 68 additions and 46 deletions

View file

@ -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>;
};
};

View file

@ -0,0 +1,68 @@
# 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
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.
allOf:
- $ref: gnss-common.yaml#
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.
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>;
};
};