GNU Linux-libre 5.10.217-gnu1
[releases.git] / Documentation / devicetree / bindings / spi / qcom,spi-qcom-qspi.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2
3 %YAML 1.2
4 ---
5 $id: "http://devicetree.org/schemas/spi/qcom,spi-qcom-qspi.yaml#"
6 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8 title: Qualcomm Quad Serial Peripheral Interface (QSPI)
9
10 maintainers:
11   - Mukesh Savaliya <msavaliy@codeaurora.org>
12   - Akash Asthana <akashast@codeaurora.org>
13
14 description: The QSPI controller allows SPI protocol communication in single,
15   dual, or quad wire transmission modes for read/write access to slaves such
16   as NOR flash.
17
18 allOf:
19   - $ref: /spi/spi-controller.yaml#
20
21 properties:
22   compatible:
23     items:
24       - const: qcom,sdm845-qspi
25       - const: qcom,qspi-v1
26
27   reg:
28     maxItems: 1
29
30   interrupts:
31     maxItems: 1
32
33   clock-names:
34     items:
35       - const: iface
36       - const: core
37
38   clocks:
39     items:
40       - description: AHB clock
41       - description: QSPI core clock
42
43   interconnects:
44     minItems: 1
45     maxItems: 2
46
47   interconnect-names:
48     minItems: 1
49     items:
50       - const: qspi-config
51       - const: qspi-memory
52
53 required:
54   - compatible
55   - reg
56   - interrupts
57   - clock-names
58   - clocks
59
60 unevaluatedProperties: false
61
62 examples:
63   - |
64     #include <dt-bindings/clock/qcom,gcc-sdm845.h>
65     #include <dt-bindings/interrupt-controller/arm-gic.h>
66
67     soc: soc {
68         #address-cells = <2>;
69         #size-cells = <2>;
70
71         qspi: spi@88df000 {
72             compatible = "qcom,sdm845-qspi", "qcom,qspi-v1";
73             reg = <0 0x88df000 0 0x600>;
74             #address-cells = <1>;
75             #size-cells = <0>;
76             interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
77             clock-names = "iface", "core";
78             clocks = <&gcc GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
79                          <&gcc GCC_QSPI_CORE_CLK>;
80
81             flash@0 {
82                 compatible = "jedec,spi-nor";
83                 reg = <0>;
84                 spi-max-frequency = <25000000>;
85                 spi-tx-bus-width = <2>;
86                 spi-rx-bus-width = <2>;
87             };
88
89         };
90     };
91 ...