xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/qcom,i2c-geni-qcom.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#"
5d5b0e70fSEmmanuel Vadot$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: Qualcomm Geni based QUP I2C Controller
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Andy Gross <agross@kernel.org>
11d5b0e70fSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
12d5b0e70fSEmmanuel Vadot
13d5b0e70fSEmmanuel Vadotproperties:
14d5b0e70fSEmmanuel Vadot  compatible:
15*8bab661aSEmmanuel Vadot    enum:
16*8bab661aSEmmanuel Vadot      - qcom,geni-i2c
17*8bab661aSEmmanuel Vadot      - qcom,geni-i2c-master-hub
18d5b0e70fSEmmanuel Vadot
19d5b0e70fSEmmanuel Vadot  clocks:
20*8bab661aSEmmanuel Vadot    minItems: 1
21*8bab661aSEmmanuel Vadot    maxItems: 2
22d5b0e70fSEmmanuel Vadot
23d5b0e70fSEmmanuel Vadot  clock-names:
24*8bab661aSEmmanuel Vadot    minItems: 1
25*8bab661aSEmmanuel Vadot    maxItems: 2
26d5b0e70fSEmmanuel Vadot
27d5b0e70fSEmmanuel Vadot  clock-frequency:
28d5b0e70fSEmmanuel Vadot    default: 100000
29d5b0e70fSEmmanuel Vadot
30d5b0e70fSEmmanuel Vadot  dmas:
31d5b0e70fSEmmanuel Vadot    maxItems: 2
32d5b0e70fSEmmanuel Vadot
33d5b0e70fSEmmanuel Vadot  dma-names:
34d5b0e70fSEmmanuel Vadot    items:
35d5b0e70fSEmmanuel Vadot      - const: tx
36d5b0e70fSEmmanuel Vadot      - const: rx
37d5b0e70fSEmmanuel Vadot
38d5b0e70fSEmmanuel Vadot  interconnects:
39*8bab661aSEmmanuel Vadot    minItems: 2
40d5b0e70fSEmmanuel Vadot    maxItems: 3
41d5b0e70fSEmmanuel Vadot
42d5b0e70fSEmmanuel Vadot  interconnect-names:
43*8bab661aSEmmanuel Vadot    minItems: 2
44*8bab661aSEmmanuel Vadot    maxItems: 3
45d5b0e70fSEmmanuel Vadot
46d5b0e70fSEmmanuel Vadot  interrupts:
47d5b0e70fSEmmanuel Vadot    maxItems: 1
48d5b0e70fSEmmanuel Vadot
49d5b0e70fSEmmanuel Vadot  pinctrl-0: true
50d5b0e70fSEmmanuel Vadot  pinctrl-1: true
51d5b0e70fSEmmanuel Vadot
52d5b0e70fSEmmanuel Vadot  pinctrl-names:
53d5b0e70fSEmmanuel Vadot    minItems: 1
54d5b0e70fSEmmanuel Vadot    items:
55d5b0e70fSEmmanuel Vadot      - const: default
56d5b0e70fSEmmanuel Vadot      - const: sleep
57d5b0e70fSEmmanuel Vadot
58d5b0e70fSEmmanuel Vadot  power-domains:
59d5b0e70fSEmmanuel Vadot    maxItems: 1
60d5b0e70fSEmmanuel Vadot
61d5b0e70fSEmmanuel Vadot  reg:
62d5b0e70fSEmmanuel Vadot    maxItems: 1
63d5b0e70fSEmmanuel Vadot
64d5b0e70fSEmmanuel Vadot  required-opps:
65d5b0e70fSEmmanuel Vadot    maxItems: 1
66d5b0e70fSEmmanuel Vadot
67d5b0e70fSEmmanuel Vadotrequired:
68d5b0e70fSEmmanuel Vadot  - compatible
69d5b0e70fSEmmanuel Vadot  - interrupts
70d5b0e70fSEmmanuel Vadot  - clocks
71d5b0e70fSEmmanuel Vadot  - clock-names
72d5b0e70fSEmmanuel Vadot  - reg
73d5b0e70fSEmmanuel Vadot
74*8bab661aSEmmanuel VadotallOf:
75*8bab661aSEmmanuel Vadot  - $ref: /schemas/i2c/i2c-controller.yaml#
76*8bab661aSEmmanuel Vadot  - if:
77*8bab661aSEmmanuel Vadot      properties:
78*8bab661aSEmmanuel Vadot        compatible:
79*8bab661aSEmmanuel Vadot          contains:
80*8bab661aSEmmanuel Vadot            const: qcom,geni-i2c-master-hub
81*8bab661aSEmmanuel Vadot    then:
82*8bab661aSEmmanuel Vadot      properties:
83*8bab661aSEmmanuel Vadot        clocks:
84*8bab661aSEmmanuel Vadot          minItems: 2
85*8bab661aSEmmanuel Vadot
86*8bab661aSEmmanuel Vadot        clock-names:
87*8bab661aSEmmanuel Vadot          items:
88*8bab661aSEmmanuel Vadot            - const: se
89*8bab661aSEmmanuel Vadot            - const: core
90*8bab661aSEmmanuel Vadot
91*8bab661aSEmmanuel Vadot        dmas: false
92*8bab661aSEmmanuel Vadot        dma-names: false
93*8bab661aSEmmanuel Vadot
94*8bab661aSEmmanuel Vadot        interconnects:
95*8bab661aSEmmanuel Vadot          maxItems: 2
96*8bab661aSEmmanuel Vadot
97*8bab661aSEmmanuel Vadot        interconnect-names:
98*8bab661aSEmmanuel Vadot          items:
99*8bab661aSEmmanuel Vadot            - const: qup-core
100*8bab661aSEmmanuel Vadot            - const: qup-config
101*8bab661aSEmmanuel Vadot    else:
102*8bab661aSEmmanuel Vadot      properties:
103*8bab661aSEmmanuel Vadot        clocks:
104*8bab661aSEmmanuel Vadot          maxItems: 1
105*8bab661aSEmmanuel Vadot
106*8bab661aSEmmanuel Vadot        clock-names:
107*8bab661aSEmmanuel Vadot          const: se
108*8bab661aSEmmanuel Vadot
109*8bab661aSEmmanuel Vadot        interconnects:
110*8bab661aSEmmanuel Vadot          minItems: 3
111*8bab661aSEmmanuel Vadot
112*8bab661aSEmmanuel Vadot        interconnect-names:
113*8bab661aSEmmanuel Vadot          items:
114*8bab661aSEmmanuel Vadot            - const: qup-core
115*8bab661aSEmmanuel Vadot            - const: qup-config
116*8bab661aSEmmanuel Vadot            - const: qup-memory
117*8bab661aSEmmanuel Vadot
118d5b0e70fSEmmanuel VadotunevaluatedProperties: false
119d5b0e70fSEmmanuel Vadot
120d5b0e70fSEmmanuel Vadotexamples:
121d5b0e70fSEmmanuel Vadot  - |
122d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
123d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
124d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interconnect/qcom,sc7180.h>
125d5b0e70fSEmmanuel Vadot    #include <dt-bindings/power/qcom-rpmpd.h>
126d5b0e70fSEmmanuel Vadot
127d5b0e70fSEmmanuel Vadot    i2c@88000 {
128d5b0e70fSEmmanuel Vadot        compatible = "qcom,geni-i2c";
129d5b0e70fSEmmanuel Vadot        reg = <0x00880000 0x4000>;
130d5b0e70fSEmmanuel Vadot        clock-names = "se";
131d5b0e70fSEmmanuel Vadot        clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
132d5b0e70fSEmmanuel Vadot        pinctrl-names = "default";
133d5b0e70fSEmmanuel Vadot        pinctrl-0 = <&qup_i2c0_default>;
134d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>;
135d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
136d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
137d5b0e70fSEmmanuel Vadot        interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
138d5b0e70fSEmmanuel Vadot                        <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>,
139d5b0e70fSEmmanuel Vadot                        <&aggre1_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI1 0>;
140d5b0e70fSEmmanuel Vadot        interconnect-names = "qup-core", "qup-config", "qup-memory";
141d5b0e70fSEmmanuel Vadot        power-domains = <&rpmhpd SC7180_CX>;
142d5b0e70fSEmmanuel Vadot        required-opps = <&rpmhpd_opp_low_svs>;
143d5b0e70fSEmmanuel Vadot    };
144d5b0e70fSEmmanuel Vadot...
145