1# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/i2c/qcom,i2c-cci.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm Camera Control Interface (CCI) I2C controller 8 9maintainers: 10 - Loic Poulain <loic.poulain@linaro.org> 11 - Robert Foss <robert.foss@linaro.org> 12 13properties: 14 compatible: 15 oneOf: 16 - enum: 17 - qcom,msm8226-cci 18 - qcom,msm8974-cci 19 - qcom,msm8996-cci 20 21 - items: 22 - enum: 23 - qcom,msm8916-cci 24 - const: qcom,msm8226-cci # CCI v1 25 26 - items: 27 - enum: 28 - qcom,sdm845-cci 29 - qcom,sm6350-cci 30 - qcom,sm8250-cci 31 - qcom,sm8450-cci 32 - const: qcom,msm8996-cci # CCI v2 33 34 "#address-cells": 35 const: 1 36 37 "#size-cells": 38 const: 0 39 40 clocks: 41 minItems: 3 42 maxItems: 6 43 44 clock-names: 45 minItems: 3 46 maxItems: 6 47 48 interrupts: 49 maxItems: 1 50 51 power-domains: 52 maxItems: 1 53 54 reg: 55 maxItems: 1 56 57patternProperties: 58 "^i2c-bus@[01]$": 59 $ref: /schemas/i2c/i2c-controller.yaml# 60 unevaluatedProperties: false 61 62 properties: 63 reg: 64 maxItems: 1 65 66 clock-frequency: 67 default: 100000 68 69required: 70 - compatible 71 - clock-names 72 - clocks 73 - interrupts 74 - reg 75 76allOf: 77 - if: 78 properties: 79 compatible: 80 contains: 81 enum: 82 - qcom,msm8996-cci 83 then: 84 required: 85 - power-domains 86 87 - if: 88 properties: 89 compatible: 90 contains: 91 enum: 92 - qcom,msm8226-cci 93 - qcom,msm8916-cci 94 then: 95 properties: 96 i2c-bus@1: false 97 98 - if: 99 properties: 100 compatible: 101 oneOf: 102 - contains: 103 enum: 104 - qcom,msm8974-cci 105 106 - const: qcom,msm8226-cci 107 then: 108 properties: 109 clocks: 110 maxItems: 3 111 clock-names: 112 items: 113 - const: camss_top_ahb 114 - const: cci_ahb 115 - const: cci 116 117 - if: 118 properties: 119 compatible: 120 oneOf: 121 - contains: 122 enum: 123 - qcom,msm8916-cci 124 125 - const: qcom,msm8996-cci 126 then: 127 properties: 128 clocks: 129 maxItems: 4 130 clock-names: 131 items: 132 - const: camss_top_ahb 133 - const: cci_ahb 134 - const: cci 135 - const: camss_ahb 136 137 - if: 138 properties: 139 compatible: 140 contains: 141 enum: 142 - qcom,sdm845-cci 143 - qcom,sm6350-cci 144 then: 145 properties: 146 clocks: 147 minItems: 6 148 clock-names: 149 items: 150 - const: camnoc_axi 151 - const: soc_ahb 152 - const: slow_ahb_src 153 - const: cpas_ahb 154 - const: cci 155 - const: cci_src 156 157 - if: 158 properties: 159 compatible: 160 contains: 161 enum: 162 - qcom,sm8250-cci 163 - qcom,sm8450-cci 164 then: 165 properties: 166 clocks: 167 minItems: 5 168 maxItems: 5 169 clock-names: 170 items: 171 - const: camnoc_axi 172 - const: slow_ahb_src 173 - const: cpas_ahb 174 - const: cci 175 - const: cci_src 176 177additionalProperties: false 178 179examples: 180 - | 181 #include <dt-bindings/clock/qcom,camcc-sdm845.h> 182 #include <dt-bindings/gpio/gpio.h> 183 #include <dt-bindings/interrupt-controller/arm-gic.h> 184 185 cci@ac4a000 { 186 reg = <0x0ac4a000 0x4000>; 187 compatible = "qcom,sdm845-cci", "qcom,msm8996-cci"; 188 #address-cells = <1>; 189 #size-cells = <0>; 190 191 interrupts = <GIC_SPI 460 IRQ_TYPE_EDGE_RISING>; 192 power-domains = <&clock_camcc TITAN_TOP_GDSC>; 193 194 clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, 195 <&clock_camcc CAM_CC_SOC_AHB_CLK>, 196 <&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>, 197 <&clock_camcc CAM_CC_CPAS_AHB_CLK>, 198 <&clock_camcc CAM_CC_CCI_CLK>, 199 <&clock_camcc CAM_CC_CCI_CLK_SRC>; 200 clock-names = "camnoc_axi", 201 "soc_ahb", 202 "slow_ahb_src", 203 "cpas_ahb", 204 "cci", 205 "cci_src"; 206 207 assigned-clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, 208 <&clock_camcc CAM_CC_CCI_CLK>; 209 assigned-clock-rates = <80000000>, 210 <37500000>; 211 212 pinctrl-names = "default", "sleep"; 213 pinctrl-0 = <&cci0_default &cci1_default>; 214 pinctrl-1 = <&cci0_sleep &cci1_sleep>; 215 216 i2c-bus@0 { 217 reg = <0>; 218 clock-frequency = <1000000>; 219 #address-cells = <1>; 220 #size-cells = <0>; 221 222 camera@10 { 223 compatible = "ovti,ov8856"; 224 reg = <0x10>; 225 226 reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; 227 pinctrl-names = "default"; 228 pinctrl-0 = <&cam0_default>; 229 230 clocks = <&clock_camcc CAM_CC_MCLK0_CLK>; 231 clock-names = "xvclk"; 232 clock-frequency = <19200000>; 233 234 dovdd-supply = <&vreg_lvs1a_1p8>; 235 avdd-supply = <&cam0_avdd_2v8>; 236 dvdd-supply = <&cam0_dvdd_1v2>; 237 238 port { 239 ov8856_ep: endpoint { 240 link-frequencies = /bits/ 64 <360000000 180000000>; 241 data-lanes = <1 2 3 4>; 242 remote-endpoint = <&csiphy0_ep>; 243 }; 244 }; 245 }; 246 }; 247 248 cci_i2c1: i2c-bus@1 { 249 reg = <1>; 250 clock-frequency = <1000000>; 251 #address-cells = <1>; 252 #size-cells = <0>; 253 254 camera@60 { 255 compatible = "ovti,ov7251"; 256 reg = <0x60>; 257 258 enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; 259 pinctrl-names = "default"; 260 pinctrl-0 = <&cam3_default>; 261 262 clocks = <&clock_camcc CAM_CC_MCLK3_CLK>; 263 clock-names = "xclk"; 264 clock-frequency = <24000000>; 265 266 vdddo-supply = <&vreg_lvs1a_1p8>; 267 vdda-supply = <&cam3_avdd_2v8>; 268 269 port { 270 ov7251_ep: endpoint { 271 data-lanes = <0 1>; 272 remote-endpoint = <&csiphy3_ep>; 273 }; 274 }; 275 }; 276 }; 277 }; 278