diff mbox series

[v4,1/2] dt-bindings: spi: Realtek RTL838x/RTL839x SPI controller

Message ID 20210105232815.3218063-2-bert@biot.com
State Accepted
Commit 6acbd614c2c8d3b8de5fb7605d6e24b9b3a8a17b
Headers show
Series spi: Add support for Realtek RTL838x/RTL839x SoC SPI | expand

Commit Message

Bert Vermeulen Jan. 5, 2021, 11:28 p.m. UTC
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 .../bindings/spi/realtek,rtl-spi.yaml         | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/realtek,rtl-spi.yaml

Comments

Mark Brown Jan. 6, 2021, 12:57 p.m. UTC | #1
On Wed, Jan 06, 2021 at 12:28:14AM +0100, Bert Vermeulen wrote:

> +    oneOf:
> +      - const: realtek,rtl838x-spi
> +      - const: realtek,rtl839x-spi

These should list exact models, not wildcards.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/realtek,rtl-spi.yaml b/Documentation/devicetree/bindings/spi/realtek,rtl-spi.yaml
new file mode 100644
index 000000000000..c600e85b819b
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/realtek,rtl-spi.yaml
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/realtek,rtl-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTL838x/RTL839x SPI controller
+
+maintainers:
+  - Bert Vermeulen <bert@biot.com>
+  - Birger Koblitz <mail@birger-koblitz.de>
+
+allOf:
+  - $ref: "spi-controller.yaml#"
+
+properties:
+  compatible:
+    oneOf:
+      - const: realtek,rtl838x-spi
+      - const: realtek,rtl839x-spi
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi: spi@1200 {
+        compatible = "realtek,rtl838x-spi";
+        reg = <0x1200 0x100>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+    };