xref: /freebsd/sys/contrib/device-tree/Bindings/spi/qcom,spi-qcom-qspi.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/qcom,spi-qcom-qspi.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Qualcomm Quad Serial Peripheral Interface (QSPI)
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription: The QSPI controller allows SPI protocol communication in single,
13c66ec88fSEmmanuel Vadot  dual, or quad wire transmission modes for read/write access to slaves such
14c66ec88fSEmmanuel Vadot  as NOR flash.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel VadotallOf:
17c9ccf3a3SEmmanuel Vadot  - $ref: /schemas/spi/spi-controller.yaml#
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadotproperties:
20c66ec88fSEmmanuel Vadot  compatible:
21c66ec88fSEmmanuel Vadot    items:
228cc087a1SEmmanuel Vadot      - enum:
238cc087a1SEmmanuel Vadot          - qcom,sc7180-qspi
248cc087a1SEmmanuel Vadot          - qcom,sc7280-qspi
258cc087a1SEmmanuel Vadot          - qcom,sdm845-qspi
268cc087a1SEmmanuel Vadot
27c66ec88fSEmmanuel Vadot      - const: qcom,qspi-v1
28c66ec88fSEmmanuel Vadot
29c66ec88fSEmmanuel Vadot  reg:
30c66ec88fSEmmanuel Vadot    maxItems: 1
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel Vadot  interrupts:
33c66ec88fSEmmanuel Vadot    maxItems: 1
34c66ec88fSEmmanuel Vadot
35c66ec88fSEmmanuel Vadot  clock-names:
36c66ec88fSEmmanuel Vadot    items:
37c66ec88fSEmmanuel Vadot      - const: iface
38c66ec88fSEmmanuel Vadot      - const: core
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  clocks:
41c66ec88fSEmmanuel Vadot    items:
42c66ec88fSEmmanuel Vadot      - description: AHB clock
43c66ec88fSEmmanuel Vadot      - description: QSPI core clock
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel Vadot  interconnects:
46c66ec88fSEmmanuel Vadot    minItems: 1
47c66ec88fSEmmanuel Vadot    maxItems: 2
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  interconnect-names:
50d5b0e70fSEmmanuel Vadot    minItems: 1
51c66ec88fSEmmanuel Vadot    items:
52c66ec88fSEmmanuel Vadot      - const: qspi-config
53c66ec88fSEmmanuel Vadot      - const: qspi-memory
54c66ec88fSEmmanuel Vadot
55*cb7aa33aSEmmanuel Vadot  operating-points-v2: true
56*cb7aa33aSEmmanuel Vadot
57*cb7aa33aSEmmanuel Vadot  power-domains:
58*cb7aa33aSEmmanuel Vadot    maxItems: 1
59*cb7aa33aSEmmanuel Vadot
60c66ec88fSEmmanuel Vadotrequired:
61c66ec88fSEmmanuel Vadot  - compatible
62c66ec88fSEmmanuel Vadot  - reg
63c66ec88fSEmmanuel Vadot  - interrupts
64c66ec88fSEmmanuel Vadot  - clock-names
65c66ec88fSEmmanuel Vadot  - clocks
66c66ec88fSEmmanuel Vadot
676be33864SEmmanuel VadotunevaluatedProperties: false
686be33864SEmmanuel Vadot
69c66ec88fSEmmanuel Vadotexamples:
70c66ec88fSEmmanuel Vadot  - |
71c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-sdm845.h>
72c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot    soc: soc {
75c66ec88fSEmmanuel Vadot        #address-cells = <2>;
76c66ec88fSEmmanuel Vadot        #size-cells = <2>;
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot        qspi: spi@88df000 {
79c66ec88fSEmmanuel Vadot            compatible = "qcom,sdm845-qspi", "qcom,qspi-v1";
80c66ec88fSEmmanuel Vadot            reg = <0 0x88df000 0 0x600>;
81c66ec88fSEmmanuel Vadot            #address-cells = <1>;
82c66ec88fSEmmanuel Vadot            #size-cells = <0>;
83c66ec88fSEmmanuel Vadot            interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
84c66ec88fSEmmanuel Vadot            clock-names = "iface", "core";
85c66ec88fSEmmanuel Vadot            clocks = <&gcc GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
86c66ec88fSEmmanuel Vadot                         <&gcc GCC_QSPI_CORE_CLK>;
87c66ec88fSEmmanuel Vadot
88c66ec88fSEmmanuel Vadot            flash@0 {
89c66ec88fSEmmanuel Vadot                compatible = "jedec,spi-nor";
90c66ec88fSEmmanuel Vadot                reg = <0>;
91c66ec88fSEmmanuel Vadot                spi-max-frequency = <25000000>;
92c66ec88fSEmmanuel Vadot                spi-tx-bus-width = <2>;
93c66ec88fSEmmanuel Vadot                spi-rx-bus-width = <2>;
94c66ec88fSEmmanuel Vadot            };
95c66ec88fSEmmanuel Vadot        };
96c66ec88fSEmmanuel Vadot    };
97c66ec88fSEmmanuel Vadot...
98