xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/qcom,i2c-geni-qcom.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#
5*fac71e4eSEmmanuel 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:
158bab661aSEmmanuel Vadot    enum:
168bab661aSEmmanuel Vadot      - qcom,geni-i2c
178bab661aSEmmanuel Vadot      - qcom,geni-i2c-master-hub
18d5b0e70fSEmmanuel Vadot
19d5b0e70fSEmmanuel Vadot  clocks:
208bab661aSEmmanuel Vadot    minItems: 1
218bab661aSEmmanuel Vadot    maxItems: 2
22d5b0e70fSEmmanuel Vadot
23d5b0e70fSEmmanuel Vadot  clock-names:
248bab661aSEmmanuel Vadot    minItems: 1
258bab661aSEmmanuel 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:
398bab661aSEmmanuel Vadot    minItems: 2
40d5b0e70fSEmmanuel Vadot    maxItems: 3
41d5b0e70fSEmmanuel Vadot
42d5b0e70fSEmmanuel Vadot  interconnect-names:
438bab661aSEmmanuel Vadot    minItems: 2
448bab661aSEmmanuel Vadot    maxItems: 3
45d5b0e70fSEmmanuel Vadot
46d5b0e70fSEmmanuel Vadot  interrupts:
47d5b0e70fSEmmanuel Vadot    maxItems: 1
48d5b0e70fSEmmanuel Vadot
49cb7aa33aSEmmanuel Vadot  operating-points-v2: true
50cb7aa33aSEmmanuel Vadot
51d5b0e70fSEmmanuel Vadot  pinctrl-0: true
52d5b0e70fSEmmanuel Vadot  pinctrl-1: true
53d5b0e70fSEmmanuel Vadot
54d5b0e70fSEmmanuel Vadot  pinctrl-names:
55d5b0e70fSEmmanuel Vadot    minItems: 1
56d5b0e70fSEmmanuel Vadot    items:
57d5b0e70fSEmmanuel Vadot      - const: default
58d5b0e70fSEmmanuel Vadot      - const: sleep
59d5b0e70fSEmmanuel Vadot
60d5b0e70fSEmmanuel Vadot  power-domains:
61d5b0e70fSEmmanuel Vadot    maxItems: 1
62d5b0e70fSEmmanuel Vadot
63d5b0e70fSEmmanuel Vadot  reg:
64d5b0e70fSEmmanuel Vadot    maxItems: 1
65d5b0e70fSEmmanuel Vadot
66d5b0e70fSEmmanuel Vadot  required-opps:
67d5b0e70fSEmmanuel Vadot    maxItems: 1
68d5b0e70fSEmmanuel Vadot
69d5b0e70fSEmmanuel Vadotrequired:
70d5b0e70fSEmmanuel Vadot  - compatible
71d5b0e70fSEmmanuel Vadot  - interrupts
72d5b0e70fSEmmanuel Vadot  - clocks
73d5b0e70fSEmmanuel Vadot  - clock-names
74d5b0e70fSEmmanuel Vadot  - reg
75d5b0e70fSEmmanuel Vadot
768bab661aSEmmanuel VadotallOf:
778bab661aSEmmanuel Vadot  - $ref: /schemas/i2c/i2c-controller.yaml#
788bab661aSEmmanuel Vadot  - if:
798bab661aSEmmanuel Vadot      properties:
808bab661aSEmmanuel Vadot        compatible:
818bab661aSEmmanuel Vadot          contains:
828bab661aSEmmanuel Vadot            const: qcom,geni-i2c-master-hub
838bab661aSEmmanuel Vadot    then:
848bab661aSEmmanuel Vadot      properties:
858bab661aSEmmanuel Vadot        clocks:
868bab661aSEmmanuel Vadot          minItems: 2
878bab661aSEmmanuel Vadot
888bab661aSEmmanuel Vadot        clock-names:
898bab661aSEmmanuel Vadot          items:
908bab661aSEmmanuel Vadot            - const: se
918bab661aSEmmanuel Vadot            - const: core
928bab661aSEmmanuel Vadot
938bab661aSEmmanuel Vadot        dmas: false
948bab661aSEmmanuel Vadot        dma-names: false
958bab661aSEmmanuel Vadot
968bab661aSEmmanuel Vadot        interconnects:
978bab661aSEmmanuel Vadot          maxItems: 2
988bab661aSEmmanuel Vadot
998bab661aSEmmanuel Vadot        interconnect-names:
1008bab661aSEmmanuel Vadot          items:
1018bab661aSEmmanuel Vadot            - const: qup-core
1028bab661aSEmmanuel Vadot            - const: qup-config
1038bab661aSEmmanuel Vadot    else:
1048bab661aSEmmanuel Vadot      properties:
1058bab661aSEmmanuel Vadot        clocks:
1068bab661aSEmmanuel Vadot          maxItems: 1
1078bab661aSEmmanuel Vadot
1088bab661aSEmmanuel Vadot        clock-names:
1098bab661aSEmmanuel Vadot          const: se
1108bab661aSEmmanuel Vadot
1118bab661aSEmmanuel Vadot        interconnects:
1128bab661aSEmmanuel Vadot          minItems: 3
1138bab661aSEmmanuel Vadot
1148bab661aSEmmanuel Vadot        interconnect-names:
1158bab661aSEmmanuel Vadot          items:
1168bab661aSEmmanuel Vadot            - const: qup-core
1178bab661aSEmmanuel Vadot            - const: qup-config
1188bab661aSEmmanuel Vadot            - const: qup-memory
1198bab661aSEmmanuel Vadot
120d5b0e70fSEmmanuel VadotunevaluatedProperties: false
121d5b0e70fSEmmanuel Vadot
122d5b0e70fSEmmanuel Vadotexamples:
123d5b0e70fSEmmanuel Vadot  - |
124d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
125d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
126d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interconnect/qcom,sc7180.h>
127d5b0e70fSEmmanuel Vadot    #include <dt-bindings/power/qcom-rpmpd.h>
128d5b0e70fSEmmanuel Vadot
129d5b0e70fSEmmanuel Vadot    i2c@88000 {
130d5b0e70fSEmmanuel Vadot        compatible = "qcom,geni-i2c";
131d5b0e70fSEmmanuel Vadot        reg = <0x00880000 0x4000>;
132d5b0e70fSEmmanuel Vadot        clock-names = "se";
133d5b0e70fSEmmanuel Vadot        clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
134d5b0e70fSEmmanuel Vadot        pinctrl-names = "default";
135d5b0e70fSEmmanuel Vadot        pinctrl-0 = <&qup_i2c0_default>;
136d5b0e70fSEmmanuel Vadot        interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>;
137d5b0e70fSEmmanuel Vadot        #address-cells = <1>;
138d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
139d5b0e70fSEmmanuel Vadot        interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
140d5b0e70fSEmmanuel Vadot                        <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>,
141d5b0e70fSEmmanuel Vadot                        <&aggre1_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI1 0>;
142d5b0e70fSEmmanuel Vadot        interconnect-names = "qup-core", "qup-config", "qup-memory";
143d5b0e70fSEmmanuel Vadot        power-domains = <&rpmhpd SC7180_CX>;
144d5b0e70fSEmmanuel Vadot        required-opps = <&rpmhpd_opp_low_svs>;
145d5b0e70fSEmmanuel Vadot    };
146d5b0e70fSEmmanuel Vadot...
147