xref: /freebsd/sys/contrib/device-tree/Bindings/spi/qcom,spi-qup.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/qcom,spi-qup.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI)
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Andy Gross <agross@kernel.org>
11d5b0e70fSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
12d5b0e70fSEmmanuel Vadot  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
13d5b0e70fSEmmanuel Vadot
14d5b0e70fSEmmanuel Vadotdescription:
15d5b0e70fSEmmanuel Vadot  The QUP core is an AHB slave that provides a common data path (an output FIFO
16d5b0e70fSEmmanuel Vadot  and an input FIFO) for serial peripheral interface (SPI) mini-core.
17d5b0e70fSEmmanuel Vadot
18d5b0e70fSEmmanuel Vadot  SPI in master mode supports up to 50MHz, up to four chip selects,
19d5b0e70fSEmmanuel Vadot  programmable data path from 4 bits to 32 bits and numerous protocol variants.
20d5b0e70fSEmmanuel Vadot
21d5b0e70fSEmmanuel VadotallOf:
22d5b0e70fSEmmanuel Vadot  - $ref: /schemas/spi/spi-controller.yaml#
23d5b0e70fSEmmanuel Vadot
24d5b0e70fSEmmanuel Vadotproperties:
25d5b0e70fSEmmanuel Vadot  compatible:
26d5b0e70fSEmmanuel Vadot    enum:
27d5b0e70fSEmmanuel Vadot      - qcom,spi-qup-v1.1.1 # for 8660, 8960 and 8064
28d5b0e70fSEmmanuel Vadot      - qcom,spi-qup-v2.1.1 # for 8974 and later
29d5b0e70fSEmmanuel Vadot      - qcom,spi-qup-v2.2.1 # for 8974 v2 and later
30d5b0e70fSEmmanuel Vadot
31d5b0e70fSEmmanuel Vadot  clocks:
32d5b0e70fSEmmanuel Vadot    maxItems: 2
33d5b0e70fSEmmanuel Vadot
34d5b0e70fSEmmanuel Vadot  clock-names:
35d5b0e70fSEmmanuel Vadot    items:
36d5b0e70fSEmmanuel Vadot      - const: core
37d5b0e70fSEmmanuel Vadot      - const: iface
38d5b0e70fSEmmanuel Vadot
39d5b0e70fSEmmanuel Vadot  dmas:
40d5b0e70fSEmmanuel Vadot    maxItems: 2
41d5b0e70fSEmmanuel Vadot
42d5b0e70fSEmmanuel Vadot  dma-names:
43d5b0e70fSEmmanuel Vadot    items:
44d5b0e70fSEmmanuel Vadot      - const: tx
45d5b0e70fSEmmanuel Vadot      - const: rx
46d5b0e70fSEmmanuel Vadot
47*84943d6fSEmmanuel Vadot  interconnects:
48*84943d6fSEmmanuel Vadot    maxItems: 1
49*84943d6fSEmmanuel Vadot
50d5b0e70fSEmmanuel Vadot  interrupts:
51d5b0e70fSEmmanuel Vadot    maxItems: 1
52d5b0e70fSEmmanuel Vadot
53*84943d6fSEmmanuel Vadot  operating-points-v2: true
54*84943d6fSEmmanuel Vadot
55*84943d6fSEmmanuel Vadot  power-domains:
56*84943d6fSEmmanuel Vadot    maxItems: 1
57*84943d6fSEmmanuel Vadot
58d5b0e70fSEmmanuel Vadot  reg:
59d5b0e70fSEmmanuel Vadot    maxItems: 1
60d5b0e70fSEmmanuel Vadot
61d5b0e70fSEmmanuel Vadotrequired:
62d5b0e70fSEmmanuel Vadot  - compatible
63d5b0e70fSEmmanuel Vadot  - clocks
64d5b0e70fSEmmanuel Vadot  - clock-names
65d5b0e70fSEmmanuel Vadot  - interrupts
66d5b0e70fSEmmanuel Vadot  - reg
67d5b0e70fSEmmanuel Vadot
68d5b0e70fSEmmanuel VadotunevaluatedProperties: false
69d5b0e70fSEmmanuel Vadot
70d5b0e70fSEmmanuel Vadotexamples:
71d5b0e70fSEmmanuel Vadot  - |
72d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
73*84943d6fSEmmanuel Vadot    #include <dt-bindings/interconnect/qcom,msm8996.h>
74d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
75*84943d6fSEmmanuel Vadot    #include <dt-bindings/power/qcom-rpmpd.h>
76d5b0e70fSEmmanuel Vadot
77d5b0e70fSEmmanuel Vadot    spi@7575000 {
78d5b0e70fSEmmanuel Vadot        compatible = "qcom,spi-qup-v2.2.1";
79d5b0e70fSEmmanuel Vadot        reg = <0x07575000 0x600>;
80d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
81d5b0e70fSEmmanuel Vadot        clocks = <&gcc GCC_BLSP1_QUP1_SPI_APPS_CLK>,
82d5b0e70fSEmmanuel Vadot                 <&gcc GCC_BLSP1_AHB_CLK>;
83d5b0e70fSEmmanuel Vadot        clock-names = "core", "iface";
84d5b0e70fSEmmanuel Vadot        pinctrl-names = "default", "sleep";
85d5b0e70fSEmmanuel Vadot        pinctrl-0 = <&blsp1_spi1_default>;
86d5b0e70fSEmmanuel Vadot        pinctrl-1 = <&blsp1_spi1_sleep>;
87d5b0e70fSEmmanuel Vadot        dmas = <&blsp1_dma 12>, <&blsp1_dma 13>;
88d5b0e70fSEmmanuel Vadot        dma-names = "tx", "rx";
89*84943d6fSEmmanuel Vadot        power-domains = <&rpmpd MSM8996_VDDCX>;
90*84943d6fSEmmanuel Vadot        operating-points-v2 = <&spi_opp_table>;
91*84943d6fSEmmanuel Vadot        interconnects = <&pnoc MASTER_BLSP_1 &bimc SLAVE_EBI_CH0>;
92d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
93d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
94d5b0e70fSEmmanuel Vadot    };
95