dt-bindings: sdio: Add bindings for Starfive sdio driver
authorWilliam Qiu <william.qiu@starfivetech.com>
Tue, 22 Nov 2022 06:22:58 +0000 (14:22 +0800)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Tue, 31 Jan 2023 15:43:41 +0000 (16:43 +0100)
Add documentation to descibe StarFive JH7110 sdio driver
bindings.

Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Documentation/devicetree/bindings/mmc/starfive-jh7110-sdio.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/mmc/starfive-jh7110-sdio.yaml b/Documentation/devicetree/bindings/mmc/starfive-jh7110-sdio.yaml
new file mode 100644 (file)
index 0000000..3b6daaa
--- /dev/null
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/starfive-jh7110-sdio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SDIO Device Tree Bindings
+
+description:
+  Bindings for the JH7110 RISC-V SoC from StarFive Ltd.
+
+allOf:
+  - $ref: "synopsys-dw-mshc-common.yaml#"
+
+maintainers:
+  - William Qiu <william.qiu@starfivetech.com>
+
+properties:
+  compatible:
+    const: starfive,jh7110-sdio
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+    items:
+      - description: biu clock
+      - description: ciu clock
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: biu
+      - const: ciu
+
+  interrupts:
+    maxItems: 1
+
+  starfive,sys-syscon:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    description:
+      The desired number of times that the host execute tuning when needed.
+      If not specified, the host will do tuning for 360 times,
+      namely tuning for each degree.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/starfive-jh7110.h>
+    #include <dt-bindings/reset/starfive-jh7110.h>
+
+    soc {
+                 #address-cells = <2>;
+                 #size-cells = <2>;
+
+                 sdio0: mmc@16010000 {
+                         compatible = "starfive,jh7110-sdio";
+                         reg = <0x0 0x16010000 0x0 0x10000>;
+                         clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>,
+                              <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>;
+                         clock-names = "biu","ciu";
+                         resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>;
+                         reset-names = "reset";
+                         interrupts = <74>;
+                         fifo-depth = <32>;
+                         fifo-watermark-aligned;
+                         data-addr = <0>;
+                 };
+          };
+
+...
+