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