]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dt-bindings: ieee802154: Convert at86rf230.txt yaml format
authorFrank Li <Frank.Li@nxp.com>
Thu, 24 Jul 2025 23:01:24 +0000 (19:01 -0400)
committerJakub Kicinski <kuba@kernel.org>
Sat, 26 Jul 2025 18:19:55 +0000 (11:19 -0700)
Convert at86rf230.txt yaml format.

Additional changes:
- Add ref to spi-peripheral-props.yaml.
- Add parent spi node in examples.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250724230129.1480174-1-Frank.Li@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt [deleted file]
Documentation/devicetree/bindings/net/ieee802154/atmel,at86rf233.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt
deleted file mode 100644 (file)
index 168f1be..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-* AT86RF230 IEEE 802.15.4 *
-
-Required properties:
-  - compatible:                should be "atmel,at86rf230", "atmel,at86rf231",
-                       "atmel,at86rf233" or "atmel,at86rf212"
-  - spi-max-frequency: maximal bus speed, should be set to 7500000 depends
-                       sync or async operation mode
-  - reg:               the chipselect index
-  - interrupts:                the interrupt generated by the device. Non high-level
-                       can occur deadlocks while handling isr.
-
-Optional properties:
-  - reset-gpio:                GPIO spec for the rstn pin
-  - sleep-gpio:                GPIO spec for the slp_tr pin
-  - xtal-trim:         u8 value for fine tuning the internal capacitance
-                       arrays of xtal pins: 0 = +0 pF, 0xf = +4.5 pF
-
-Example:
-
-       at86rf231@0 {
-               compatible = "atmel,at86rf231";
-               spi-max-frequency = <7500000>;
-               reg = <0>;
-               interrupts = <19 4>;
-               interrupt-parent = <&gpio3>;
-               xtal-trim = /bits/ 8 <0x06>;
-       };
diff --git a/Documentation/devicetree/bindings/net/ieee802154/atmel,at86rf233.yaml b/Documentation/devicetree/bindings/net/ieee802154/atmel,at86rf233.yaml
new file mode 100644 (file)
index 0000000..32cdc30
--- /dev/null
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ieee802154/atmel,at86rf233.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AT86RF230 IEEE 802.15.4
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    enum:
+      - atmel,at86rf212
+      - atmel,at86rf230
+      - atmel,at86rf231
+      - atmel,at86rf233
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpio:
+    maxItems: 1
+
+  sleep-gpio:
+    maxItems: 1
+
+  spi-max-frequency:
+    maximum: 7500000
+
+  xtal-trim:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    maximum: 0xf
+    description: |
+      Fine tuning the internal capacitance arrays of xtal pins:
+        0 = +0 pF, 0xf = +4.5 pF
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        zigbee@0 {
+            compatible = "atmel,at86rf231";
+            reg = <0>;
+            spi-max-frequency = <7500000>;
+            interrupts = <19 4>;
+            interrupt-parent = <&gpio3>;
+            xtal-trim = /bits/ 8 <0x06>;
+        };
+    };