Re: [PATCH v4 1/3] dt-bindings: spi: Add realtek,rtl9301-snand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14/10/24 20:12, Krzysztof Kozlowski wrote:
On Mon, Oct 14, 2024 at 02:52:43PM +1300, Chris Packham wrote:
diff --git a/Documentation/devicetree/bindings/spi/realtek,rtl9301-snand.yaml b/Documentation/devicetree/bindings/spi/realtek,rtl9301-snand.yaml
new file mode 100644
index 000000000000..397b32b41e86
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/realtek,rtl9301-snand.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://scanmail.trustwave.com/?c=20988&d=3cSM59Be7zhiOY6j70BGhTh0kCvZ-1Nf0f5XJZnTzQ&u=http%3a%2f%2fdevicetree%2eorg%2fschemas%2fspi%2frealtek%2crtl9301-snand%2eyaml%23
+$schema: http://scanmail.trustwave.com/?c=20988&d=3cSM59Be7zhiOY6j70BGhTh0kCvZ-1Nf0a1RIsqGnw&u=http%3a%2f%2fdevicetree%2eorg%2fmeta-schemas%2fcore%2eyaml%23
+
+title: SPI-NAND Flash Controller for Realtek RTL9300 SoCs
+
+maintainers:
+  - Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
+
+description:
+  The Realtek RTL9300 SoCs have a built in SPI-NAND controller. It supports
+  typical SPI-NAND page cache operations in single, dual or quad IO mode.
+
+properties:
+  compatible:
+    enum:
+      - realtek,rtl9301-snand
+      - realtek,rtl9302b-snand
+      - realtek,rtl9302c-snand
+      - realtek,rtl9303-snand
All of them look compatible with each other, why not using fallback to
9301? That's common and expected pattern.

So something like

properties:
  compatible:
    oneOf:
      - items:
         -  enum:
             - realtek,rtl9302b-snand
            - realtek,rtl9302c-snand
            - realtek,rtl9303-snand
       - const: realtek,rtl9301-snand
     - items:
        const: realtek,rtl9301-snand

Or am I over thinking it and I should just use only a single "const: realtek,rtl9301-snand"?


Best regards,
Krzysztof






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux