Skip to contentSkip to conversation

dt: bindings: add silabs,si4455 schema

PATCH Superseded József Horváth 2 participants 3 messages Jan 5, 2021 – Jan 12, 2021

Subsystems (2)

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v7 2/2 dt: bindings: add silabs,si4455 schema

This is a device tree schema for serial port driver for
Silicon Labs Si4455 Sub-GHz transciver.

Datasheet: https://www.silabs.com/documents/public/data-sheets/Si4455.pdf

Guide: https://github.com/dministro/linux-serial-si4455

---

changes v1:
- fixed: dt: bindings: rename sdn-gpios to shutdown-gpios

changes v3:
- fixed: dt: bindings: silabs,si4455: more detailed description
- added: dt: bindings: silabs,si4455: properties silabs,package-size, silabs,tx-channel, silabs,rx-channel, silabs,ez-config

changes v4:
- fixed: dt: bindings: silabs,si4455: $id
from http://devicetree.org/schemas/serial/silabs,si4455.yaml
to http://devicetree.org/schemas/staging/serial/silabs,si4455.yaml

changes v5:
- fixed: dt: bindings: silabs,si4455: $id
from http://devicetree.org/schemas/staging/serial/silabs,si4455.yaml
to http://devicetree.org/schemas/serial/silabs,si4455.yaml
- fixed: dt: bindings: silabs,si4455: serial.yaml reference added

changes v7:
- added: dt: bindings: silabs,si4455: silabs,tx-timeout property definition

---
 .../bindings/serial/silabs,si4455.yaml        | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/silabs,si4455.yaml
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +105 -0
new file mode 100644
index 000000000000..8ba4956064b4
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/silabs,si4455.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Silicon Labs Si4455 device tree bindings
+
+maintainers:
+  - József Horváth <[email protected]>
+
+description:
+  This document is for describing the required device tree parameters for si4455 serial driver.
+  The si4455 driver tries to represent the Silicon Labs Si4455 sub-GHz transceiver device
+  like a serial port. The required parameters for proper operation are described below.
+  https://www.silabs.com/documents/public/data-sheets/Si4455.pdf
+
+allOf:
+  - $ref: "serial.yaml#"
+
+properties:
+  compatible:
+    const: silabs,si4455
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  spi-max-frequency:
+    description: maximum clock frequency on SPI port
+    maximum: 500000
+
+  shutdown-gpios:
+    description: gpio pin for SDN
+    maxItems: 1
+
+  silabs,package-size:
+    description:
+      Radio payload length, variable packet length is not supported by driver.
+      This value should equal with EZConfig payload length.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 64
+    minimum: 1
+
+  silabs,tx-channel:
+    description:
+      Radio transmit channel selection.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 255
+    minimum: 0
+
+  silabs,rx-channel:
+    description:
+      Radio receive channel selection.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 255
+    minimum: 0
+
+  silabs,tx-timeout:
+    description:
+      Radio transmit timeout(ms)
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 1000
+    minimum: 1
+
+  firmware-name:
+    description:
+      Radio configuration data file name.
+    $ref: /schemas/types.yaml#/definitions/string
+    items:
+      pattern: ^[0-9a-z\._\-]{1,255}$
+
+required:
+  - reg
+  - interrupts
+  - spi-max-frequency
+  - shutdown-gpios
+  - silabs,package-size
+  - silabs,tx-channel
+  - silabs,rx-channel
+  - firmware-name
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      si4455_0: serial@0 {
+        compatible = "silabs,si4455";
+        reg = <0>;
+        interrupt-parent = <&gpio>;
+        interrupts = <7 2>;
+        shutdown-gpios = <&gpio 26 1>;
+        spi-max-frequency = <300000>;
+        silabs,package-size = <30>;
+        silabs,tx-channel = <1>;
+        silabs,rx-channel = <2>;
+        firmware-name = "si4455_spi0_0.ez.bin";
+      };
+    };
+...
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 95 lines · József Horváth

This is a device tree schema for serial port driver for
Silicon Labs Si4455 Sub-GHz transciver.

Datasheet: https://www.silabs.com/documents/public/data-sheets/Si4455.pdf

Guide: https://github.com/dministro/linux-serial-si4455

---

changes v1:
- fixed: dt: bindings: rename sdn-gpios to shutdown-gpios

changes v3:
- fixed: dt: bindings: silabs,si4455: more detailed description
- added: dt: bindings: silabs,si4455: properties silabs,package-size, silabs,tx-channel, silabs,rx-channel, silabs,ez-config

changes v4:
- fixed: dt: bindings: silabs,si4455: $id
from http://devicetree.org/schemas/serial/silabs,si4455.yaml
to http://devicetree.org/schemas/staging/serial/silabs,si4455.yaml

changes v5:
- fixed: dt: bindings: silabs,si4455: $id
from http://devicetree.org/schemas/staging/serial/silabs,si4455.yaml
to http://devicetree.org/schemas/serial/silabs,si4455.yaml
- fixed: dt: bindings: silabs,si4455: serial.yaml reference added

changes v7:
- added: dt: bindings: silabs,si4455: silabs,tx-timeout property definition

---
 .../bindings/serial/silabs,si4455.yaml        | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/silabs,si4455.yaml
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +53 -0
new file mode 100644
index 000000000000..8ba4956064b4
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/silabs,si4455.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Silicon Labs Si4455 device tree bindings
+
+maintainers:
+  - József Horváth <[email protected]>
+
+description:
+  This document is for describing the required device tree parameters for si4455 serial driver.
+  The si4455 driver tries to represent the Silicon Labs Si4455 sub-GHz transceiver device
+  like a serial port. The required parameters for proper operation are described below.
+  https://www.silabs.com/documents/public/data-sheets/Si4455.pdf
+
+allOf:
+  - $ref: "serial.yaml#"
+
+properties:
+  compatible:
+    const: silabs,si4455
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  spi-max-frequency:
+    description: maximum clock frequency on SPI port
+    maximum: 500000
+
+  shutdown-gpios:
+    description: gpio pin for SDN
+    maxItems: 1
+
+  silabs,package-size:
+    description:
+      Radio payload length, variable packet length is not supported by driver.
+      This value should equal with EZConfig payload length.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 64
+    minimum: 1
+
+  silabs,tx-channel:
+    description:
+      Radio transmit channel selection.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 255
+    minimum: 0
+

Documentation/devicetree/bindings/serial/silabs,si4455.yaml line 63

Quoted 10 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +10 -0
+  silabs,rx-channel:
+    description:
+      Radio receive channel selection.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 255
+    minimum: 0
+
+  silabs,tx-timeout:
+    description:
+      Radio transmit timeout(ms)

Use a unit suffix as defined in property-units.txt.

Documentation/devicetree/bindings/serial/silabs,si4455.yaml line 64

Quoted 1 line
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +1 -0
+    $ref: /schemas/types.yaml#/definitions/uint32

With that, you can drop the type.

Quoted 44 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +41 -0
+    maximum: 1000
+    minimum: 1
+
+  firmware-name:
+    description:
+      Radio configuration data file name.
+    $ref: /schemas/types.yaml#/definitions/string
+    items:
+      pattern: ^[0-9a-z\._\-]{1,255}$
+
+required:
+  - reg
+  - interrupts
+  - spi-max-frequency
+  - shutdown-gpios
+  - silabs,package-size
+  - silabs,tx-channel
+  - silabs,rx-channel
+  - firmware-name
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      si4455_0: serial@0 {
+        compatible = "silabs,si4455";
+        reg = <0>;
+        interrupt-parent = <&gpio>;
+        interrupts = <7 2>;
+        shutdown-gpios = <&gpio 26 1>;
+        spi-max-frequency = <300000>;
+        silabs,package-size = <30>;
+        silabs,tx-channel = <1>;
+        silabs,rx-channel = <2>;
+        firmware-name = "si4455_spi0_0.ez.bin";
+      };
+    };
+...
Signature · 1 line
2.17.1
#2 lore raw
Quoted 64 lines · Rob Herring
Quoted 50 lines · József Horváth

This is a device tree schema for serial port driver for
Silicon Labs Si4455 Sub-GHz transciver.

Datasheet: https://www.silabs.com/documents/public/data-sheets/Si4455.pdf

Guide: https://github.com/dministro/linux-serial-si4455

---

changes v1:
- fixed: dt: bindings: rename sdn-gpios to shutdown-gpios

changes v3:
- fixed: dt: bindings: silabs,si4455: more detailed description
- added: dt: bindings: silabs,si4455: properties silabs,package-size, silabs,tx-channel, silabs,rx-channel, silabs,ez-config

changes v4:
- fixed: dt: bindings: silabs,si4455: $id
from http://devicetree.org/schemas/serial/silabs,si4455.yaml
to http://devicetree.org/schemas/staging/serial/silabs,si4455.yaml

changes v5:
- fixed: dt: bindings: silabs,si4455: $id
from http://devicetree.org/schemas/staging/serial/silabs,si4455.yaml
to http://devicetree.org/schemas/serial/silabs,si4455.yaml
- fixed: dt: bindings: silabs,si4455: serial.yaml reference added

changes v7:
- added: dt: bindings: silabs,si4455: silabs,tx-timeout property definition

---
 .../bindings/serial/silabs,si4455.yaml        | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/silabs,si4455.yaml
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +8 -0
new file mode 100644
index 000000000000..8ba4956064b4
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/silabs,si4455.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Silicon Labs Si4455 device tree bindings
+

Documentation/devicetree/bindings/serial/silabs,si4455.yaml line 18

Quoted 10 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +10 -0
+  silabs,rx-channel:
+    description:
+      Radio receive channel selection.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 255
+    minimum: 0
+
+  silabs,tx-timeout:
+    description:
+      Radio transmit timeout(ms)

Use a unit suffix as defined in property-units.txt.

Quoted 4 lines

Documentation/devicetree/bindings/serial/silabs,si4455.yaml line 19

Quoted 1 line
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +1 -0
+    $ref: /schemas/types.yaml#/definitions/uint32

With that, you can drop the type.

Thank you for suggestion.

Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +7 -0
+    maximum: 1000
+    minimum: 1
+
+  firmware-name:
+    description:
+      Radio configuration data file name.
+    $ref: /schemas/types.yaml#/definitions/string
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +5 -0
+    items:
+      pattern: ^[0-9a-z\._\-]{1,255}$
+
+    };
+...
Signature · 1 line
2.17.1

Üdvözlettel / Best regards:
József Horváth