[PATCH v2 1/2] dt-bindings: gnss: u-blox: add "safeboot-gpios" binding

Alejandro Enrique via B4 Relay posted 2 patches 7 months ago
There is a newer version of this series
[PATCH v2 1/2] dt-bindings: gnss: u-blox: add "safeboot-gpios" binding
Posted by Alejandro Enrique via B4 Relay 7 months ago
From: Alejandro Enrique <alejandroe1@geotab.com>

U-Blox 8/M8/M9 chip have a pin to start it in safeboot mode, to be
used to recover from situations where the flash content has become
corrupted and needs to be restored. Introduce a binding to support
this safeboot pin.

Signed-off-by: Alejandro Enrique <alejandroe1@geotab.com>
---
 Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
index 7d4b6d49e5eea2201ac05ba6d54b1c1721172f26..7589327a77da5c70bfebe57685e2a4bbfd95934c 100644
--- a/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
+++ b/Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml
@@ -6,10 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: U-blox GNSS Receiver
 
-allOf:
-  - $ref: gnss-common.yaml#
-  - $ref: /schemas/serial/serial-peripheral-props.yaml#
-
 maintainers:
   - Johan Hovold <johan@kernel.org>
 
@@ -32,6 +28,9 @@ properties:
   reset-gpios:
     maxItems: 1
 
+  safeboot-gpios:
+    maxItems: 1
+
   vcc-supply:
     description: >
       Main voltage regulator
@@ -49,6 +48,18 @@ required:
   - compatible
   - vcc-supply
 
+allOf:
+  - $ref: gnss-common.yaml#
+  - $ref: /schemas/serial/serial-peripheral-props.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: u-blox,neo-6m
+    then:
+      properties:
+        safeboot-gpios: false
+
 unevaluatedProperties: false
 
 examples:
@@ -61,5 +72,6 @@ examples:
             v-bckp-supply = <&gnss_v_bckp_reg>;
             vcc-supply = <&gnss_vcc_reg>;
             reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+            safeboot-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
         };
     };

-- 
2.34.1
Re: [PATCH v2 1/2] dt-bindings: gnss: u-blox: add "safeboot-gpios" binding
Posted by Krzysztof Kozlowski 7 months ago
On 22/05/2025 18:51, Alejandro Enrique via B4 Relay wrote:
> From: Alejandro Enrique <alejandroe1@geotab.com>
> 
> U-Blox 8/M8/M9 chip have a pin to start it in safeboot mode, to be
> used to recover from situations where the flash content has become
> corrupted and needs to be restored. Introduce a binding to support
> this safeboot pin.
> 
> Signed-off-by: Alejandro Enrique <alejandroe1@geotab.com>
> ---
>  Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml | 20 +++++++++++++++



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


Best regards,
Krzysztof