1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/qcom,i2c-cci.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 7b97ee269SEmmanuel Vadottitle: Qualcomm Camera Control Interface (CCI) I2C controller 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Loic Poulain <loic.poulain@linaro.org> 11b97ee269SEmmanuel Vadot - Robert Foss <robert.foss@linaro.org> 12b97ee269SEmmanuel Vadot 13b97ee269SEmmanuel Vadotproperties: 14b97ee269SEmmanuel Vadot compatible: 15cb7aa33aSEmmanuel Vadot oneOf: 16cb7aa33aSEmmanuel Vadot - enum: 177ef62cebSEmmanuel Vadot - qcom,msm8226-cci 18b97ee269SEmmanuel Vadot - qcom,msm8974-cci 19b97ee269SEmmanuel Vadot - qcom,msm8996-cci 20cb7aa33aSEmmanuel Vadot 21cb7aa33aSEmmanuel Vadot - items: 22cb7aa33aSEmmanuel Vadot - enum: 23cb7aa33aSEmmanuel Vadot - qcom,msm8916-cci 24cb7aa33aSEmmanuel Vadot - const: qcom,msm8226-cci # CCI v1 25cb7aa33aSEmmanuel Vadot 26cb7aa33aSEmmanuel Vadot - items: 27cb7aa33aSEmmanuel Vadot - enum: 2884943d6fSEmmanuel Vadot - qcom,sc7280-cci 297d0873ebSEmmanuel Vadot - qcom,sc8280xp-cci 30b97ee269SEmmanuel Vadot - qcom,sdm845-cci 31cb7aa33aSEmmanuel Vadot - qcom,sm6350-cci 32b97ee269SEmmanuel Vadot - qcom,sm8250-cci 33b97ee269SEmmanuel Vadot - qcom,sm8450-cci 340e8011faSEmmanuel Vadot - qcom,sm8550-cci 350e8011faSEmmanuel Vadot - qcom,sm8650-cci 36cb7aa33aSEmmanuel Vadot - const: qcom,msm8996-cci # CCI v2 37b97ee269SEmmanuel Vadot 38b97ee269SEmmanuel Vadot "#address-cells": 39b97ee269SEmmanuel Vadot const: 1 40b97ee269SEmmanuel Vadot 41b97ee269SEmmanuel Vadot "#size-cells": 42b97ee269SEmmanuel Vadot const: 0 43b97ee269SEmmanuel Vadot 44b97ee269SEmmanuel Vadot clocks: 457ef62cebSEmmanuel Vadot minItems: 3 46b97ee269SEmmanuel Vadot maxItems: 6 47b97ee269SEmmanuel Vadot 48b97ee269SEmmanuel Vadot clock-names: 497ef62cebSEmmanuel Vadot minItems: 3 50b97ee269SEmmanuel Vadot maxItems: 6 51b97ee269SEmmanuel Vadot 52b97ee269SEmmanuel Vadot interrupts: 53b97ee269SEmmanuel Vadot maxItems: 1 54b97ee269SEmmanuel Vadot 55b97ee269SEmmanuel Vadot power-domains: 56b97ee269SEmmanuel Vadot maxItems: 1 57b97ee269SEmmanuel Vadot 58b97ee269SEmmanuel Vadot reg: 59b97ee269SEmmanuel Vadot maxItems: 1 60b97ee269SEmmanuel Vadot 61b97ee269SEmmanuel VadotpatternProperties: 62b97ee269SEmmanuel Vadot "^i2c-bus@[01]$": 63b97ee269SEmmanuel Vadot $ref: /schemas/i2c/i2c-controller.yaml# 64b97ee269SEmmanuel Vadot unevaluatedProperties: false 65b97ee269SEmmanuel Vadot 66b97ee269SEmmanuel Vadot properties: 67b97ee269SEmmanuel Vadot reg: 68b97ee269SEmmanuel Vadot maxItems: 1 69b97ee269SEmmanuel Vadot 70b97ee269SEmmanuel Vadot clock-frequency: 71b97ee269SEmmanuel Vadot default: 100000 72b97ee269SEmmanuel Vadot 73b97ee269SEmmanuel Vadotrequired: 74b97ee269SEmmanuel Vadot - compatible 75b97ee269SEmmanuel Vadot - clock-names 76b97ee269SEmmanuel Vadot - clocks 77b97ee269SEmmanuel Vadot - interrupts 78b97ee269SEmmanuel Vadot - reg 79b97ee269SEmmanuel Vadot 80b97ee269SEmmanuel VadotallOf: 81b97ee269SEmmanuel Vadot - if: 82b97ee269SEmmanuel Vadot properties: 83b97ee269SEmmanuel Vadot compatible: 84b97ee269SEmmanuel Vadot contains: 85b97ee269SEmmanuel Vadot enum: 86b97ee269SEmmanuel Vadot - qcom,msm8996-cci 87b97ee269SEmmanuel Vadot then: 88b97ee269SEmmanuel Vadot required: 89b97ee269SEmmanuel Vadot - power-domains 90b97ee269SEmmanuel Vadot 91b97ee269SEmmanuel Vadot - if: 92b97ee269SEmmanuel Vadot properties: 93b97ee269SEmmanuel Vadot compatible: 94b97ee269SEmmanuel Vadot contains: 95b97ee269SEmmanuel Vadot enum: 967ef62cebSEmmanuel Vadot - qcom,msm8226-cci 97b97ee269SEmmanuel Vadot - qcom,msm8916-cci 98b97ee269SEmmanuel Vadot then: 99b97ee269SEmmanuel Vadot properties: 100b97ee269SEmmanuel Vadot i2c-bus@1: false 101b97ee269SEmmanuel Vadot 102b97ee269SEmmanuel Vadot - if: 103b97ee269SEmmanuel Vadot properties: 104b97ee269SEmmanuel Vadot compatible: 105cb7aa33aSEmmanuel Vadot oneOf: 106cb7aa33aSEmmanuel Vadot - contains: 107b97ee269SEmmanuel Vadot enum: 1087ef62cebSEmmanuel Vadot - qcom,msm8974-cci 109cb7aa33aSEmmanuel Vadot 110cb7aa33aSEmmanuel Vadot - const: qcom,msm8226-cci 1117ef62cebSEmmanuel Vadot then: 1127ef62cebSEmmanuel Vadot properties: 1137ef62cebSEmmanuel Vadot clocks: 1147ef62cebSEmmanuel Vadot maxItems: 3 1157ef62cebSEmmanuel Vadot clock-names: 1167ef62cebSEmmanuel Vadot items: 1177ef62cebSEmmanuel Vadot - const: camss_top_ahb 1187ef62cebSEmmanuel Vadot - const: cci_ahb 1197ef62cebSEmmanuel Vadot - const: cci 1207ef62cebSEmmanuel Vadot 1217ef62cebSEmmanuel Vadot - if: 1227ef62cebSEmmanuel Vadot properties: 1237ef62cebSEmmanuel Vadot compatible: 124cb7aa33aSEmmanuel Vadot oneOf: 125cb7aa33aSEmmanuel Vadot - contains: 1267ef62cebSEmmanuel Vadot enum: 127b97ee269SEmmanuel Vadot - qcom,msm8916-cci 128cb7aa33aSEmmanuel Vadot 129cb7aa33aSEmmanuel Vadot - const: qcom,msm8996-cci 130b97ee269SEmmanuel Vadot then: 131b97ee269SEmmanuel Vadot properties: 132b97ee269SEmmanuel Vadot clocks: 133*b2d2a78aSEmmanuel Vadot minItems: 4 134b97ee269SEmmanuel Vadot maxItems: 4 135b97ee269SEmmanuel Vadot clock-names: 136b97ee269SEmmanuel Vadot items: 137b97ee269SEmmanuel Vadot - const: camss_top_ahb 138b97ee269SEmmanuel Vadot - const: cci_ahb 139b97ee269SEmmanuel Vadot - const: cci 140b97ee269SEmmanuel Vadot - const: camss_ahb 141b97ee269SEmmanuel Vadot 142b97ee269SEmmanuel Vadot - if: 143b97ee269SEmmanuel Vadot properties: 144b97ee269SEmmanuel Vadot compatible: 145b97ee269SEmmanuel Vadot contains: 146b97ee269SEmmanuel Vadot enum: 147b97ee269SEmmanuel Vadot - qcom,sdm845-cci 148cb7aa33aSEmmanuel Vadot - qcom,sm6350-cci 149b97ee269SEmmanuel Vadot then: 150b97ee269SEmmanuel Vadot properties: 151b97ee269SEmmanuel Vadot clocks: 152b97ee269SEmmanuel Vadot minItems: 6 153b97ee269SEmmanuel Vadot clock-names: 154b97ee269SEmmanuel Vadot items: 155b97ee269SEmmanuel Vadot - const: camnoc_axi 156b97ee269SEmmanuel Vadot - const: soc_ahb 157b97ee269SEmmanuel Vadot - const: slow_ahb_src 158b97ee269SEmmanuel Vadot - const: cpas_ahb 159b97ee269SEmmanuel Vadot - const: cci 160b97ee269SEmmanuel Vadot - const: cci_src 161b97ee269SEmmanuel Vadot 162b97ee269SEmmanuel Vadot - if: 163b97ee269SEmmanuel Vadot properties: 164b97ee269SEmmanuel Vadot compatible: 165b97ee269SEmmanuel Vadot contains: 166b97ee269SEmmanuel Vadot enum: 16784943d6fSEmmanuel Vadot - qcom,sc7280-cci 168b97ee269SEmmanuel Vadot - qcom,sm8250-cci 1697ef62cebSEmmanuel Vadot - qcom,sm8450-cci 170b97ee269SEmmanuel Vadot then: 171b97ee269SEmmanuel Vadot properties: 172b97ee269SEmmanuel Vadot clocks: 173b97ee269SEmmanuel Vadot minItems: 5 174b97ee269SEmmanuel Vadot maxItems: 5 175b97ee269SEmmanuel Vadot clock-names: 176b97ee269SEmmanuel Vadot items: 177b97ee269SEmmanuel Vadot - const: camnoc_axi 178b97ee269SEmmanuel Vadot - const: slow_ahb_src 179b97ee269SEmmanuel Vadot - const: cpas_ahb 180b97ee269SEmmanuel Vadot - const: cci 181b97ee269SEmmanuel Vadot - const: cci_src 182b97ee269SEmmanuel Vadot 1837d0873ebSEmmanuel Vadot - if: 1847d0873ebSEmmanuel Vadot properties: 1857d0873ebSEmmanuel Vadot compatible: 1867d0873ebSEmmanuel Vadot contains: 1877d0873ebSEmmanuel Vadot enum: 1887d0873ebSEmmanuel Vadot - qcom,sc8280xp-cci 1897d0873ebSEmmanuel Vadot then: 1907d0873ebSEmmanuel Vadot properties: 1917d0873ebSEmmanuel Vadot clocks: 1927d0873ebSEmmanuel Vadot minItems: 4 1937d0873ebSEmmanuel Vadot maxItems: 4 1947d0873ebSEmmanuel Vadot clock-names: 1957d0873ebSEmmanuel Vadot items: 1967d0873ebSEmmanuel Vadot - const: camnoc_axi 1977d0873ebSEmmanuel Vadot - const: slow_ahb_src 1987d0873ebSEmmanuel Vadot - const: cpas_ahb 1997d0873ebSEmmanuel Vadot - const: cci 2007d0873ebSEmmanuel Vadot 2010e8011faSEmmanuel Vadot - if: 2020e8011faSEmmanuel Vadot properties: 2030e8011faSEmmanuel Vadot compatible: 2040e8011faSEmmanuel Vadot contains: 2050e8011faSEmmanuel Vadot enum: 2060e8011faSEmmanuel Vadot - qcom,sm8550-cci 2070e8011faSEmmanuel Vadot - qcom,sm8650-cci 2080e8011faSEmmanuel Vadot then: 2090e8011faSEmmanuel Vadot properties: 2100e8011faSEmmanuel Vadot clocks: 2110e8011faSEmmanuel Vadot minItems: 3 2120e8011faSEmmanuel Vadot maxItems: 3 2130e8011faSEmmanuel Vadot clock-names: 2140e8011faSEmmanuel Vadot items: 2150e8011faSEmmanuel Vadot - const: camnoc_axi 2160e8011faSEmmanuel Vadot - const: cpas_ahb 2170e8011faSEmmanuel Vadot - const: cci 2180e8011faSEmmanuel Vadot 219b97ee269SEmmanuel VadotadditionalProperties: false 220b97ee269SEmmanuel Vadot 221b97ee269SEmmanuel Vadotexamples: 222b97ee269SEmmanuel Vadot - | 223b97ee269SEmmanuel Vadot #include <dt-bindings/clock/qcom,camcc-sdm845.h> 224b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 225b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 226b97ee269SEmmanuel Vadot 227b97ee269SEmmanuel Vadot cci@ac4a000 { 228b97ee269SEmmanuel Vadot reg = <0x0ac4a000 0x4000>; 229cb7aa33aSEmmanuel Vadot compatible = "qcom,sdm845-cci", "qcom,msm8996-cci"; 230b97ee269SEmmanuel Vadot #address-cells = <1>; 231b97ee269SEmmanuel Vadot #size-cells = <0>; 232b97ee269SEmmanuel Vadot 233b97ee269SEmmanuel Vadot interrupts = <GIC_SPI 460 IRQ_TYPE_EDGE_RISING>; 234b97ee269SEmmanuel Vadot power-domains = <&clock_camcc TITAN_TOP_GDSC>; 235b97ee269SEmmanuel Vadot 236b97ee269SEmmanuel Vadot clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, 237b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_SOC_AHB_CLK>, 238b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>, 239b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CPAS_AHB_CLK>, 240b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CCI_CLK>, 241b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CCI_CLK_SRC>; 242b97ee269SEmmanuel Vadot clock-names = "camnoc_axi", 243b97ee269SEmmanuel Vadot "soc_ahb", 244b97ee269SEmmanuel Vadot "slow_ahb_src", 245b97ee269SEmmanuel Vadot "cpas_ahb", 246b97ee269SEmmanuel Vadot "cci", 247b97ee269SEmmanuel Vadot "cci_src"; 248b97ee269SEmmanuel Vadot 249b97ee269SEmmanuel Vadot assigned-clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, 250b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CCI_CLK>; 251b97ee269SEmmanuel Vadot assigned-clock-rates = <80000000>, 252b97ee269SEmmanuel Vadot <37500000>; 253b97ee269SEmmanuel Vadot 254b97ee269SEmmanuel Vadot pinctrl-names = "default", "sleep"; 255b97ee269SEmmanuel Vadot pinctrl-0 = <&cci0_default &cci1_default>; 256b97ee269SEmmanuel Vadot pinctrl-1 = <&cci0_sleep &cci1_sleep>; 257b97ee269SEmmanuel Vadot 258b97ee269SEmmanuel Vadot i2c-bus@0 { 259b97ee269SEmmanuel Vadot reg = <0>; 260b97ee269SEmmanuel Vadot clock-frequency = <1000000>; 261b97ee269SEmmanuel Vadot #address-cells = <1>; 262b97ee269SEmmanuel Vadot #size-cells = <0>; 263b97ee269SEmmanuel Vadot 264b97ee269SEmmanuel Vadot camera@10 { 265b97ee269SEmmanuel Vadot compatible = "ovti,ov8856"; 266b97ee269SEmmanuel Vadot reg = <0x10>; 267b97ee269SEmmanuel Vadot 268b97ee269SEmmanuel Vadot reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; 269b97ee269SEmmanuel Vadot pinctrl-names = "default"; 270b97ee269SEmmanuel Vadot pinctrl-0 = <&cam0_default>; 271b97ee269SEmmanuel Vadot 272b97ee269SEmmanuel Vadot clocks = <&clock_camcc CAM_CC_MCLK0_CLK>; 273b97ee269SEmmanuel Vadot clock-names = "xvclk"; 274b97ee269SEmmanuel Vadot clock-frequency = <19200000>; 275b97ee269SEmmanuel Vadot 276b97ee269SEmmanuel Vadot dovdd-supply = <&vreg_lvs1a_1p8>; 277b97ee269SEmmanuel Vadot avdd-supply = <&cam0_avdd_2v8>; 278b97ee269SEmmanuel Vadot dvdd-supply = <&cam0_dvdd_1v2>; 279b97ee269SEmmanuel Vadot 280b97ee269SEmmanuel Vadot port { 281b97ee269SEmmanuel Vadot ov8856_ep: endpoint { 282b97ee269SEmmanuel Vadot link-frequencies = /bits/ 64 <360000000 180000000>; 283b97ee269SEmmanuel Vadot data-lanes = <1 2 3 4>; 284b97ee269SEmmanuel Vadot remote-endpoint = <&csiphy0_ep>; 285b97ee269SEmmanuel Vadot }; 286b97ee269SEmmanuel Vadot }; 287b97ee269SEmmanuel Vadot }; 288b97ee269SEmmanuel Vadot }; 289b97ee269SEmmanuel Vadot 290b97ee269SEmmanuel Vadot cci_i2c1: i2c-bus@1 { 291b97ee269SEmmanuel Vadot reg = <1>; 292b97ee269SEmmanuel Vadot clock-frequency = <1000000>; 293b97ee269SEmmanuel Vadot #address-cells = <1>; 294b97ee269SEmmanuel Vadot #size-cells = <0>; 295b97ee269SEmmanuel Vadot 296b97ee269SEmmanuel Vadot camera@60 { 297b97ee269SEmmanuel Vadot compatible = "ovti,ov7251"; 298b97ee269SEmmanuel Vadot reg = <0x60>; 299b97ee269SEmmanuel Vadot 300b97ee269SEmmanuel Vadot enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; 301b97ee269SEmmanuel Vadot pinctrl-names = "default"; 302b97ee269SEmmanuel Vadot pinctrl-0 = <&cam3_default>; 303b97ee269SEmmanuel Vadot 304b97ee269SEmmanuel Vadot clocks = <&clock_camcc CAM_CC_MCLK3_CLK>; 305b97ee269SEmmanuel Vadot clock-names = "xclk"; 306b97ee269SEmmanuel Vadot clock-frequency = <24000000>; 307b97ee269SEmmanuel Vadot 308b97ee269SEmmanuel Vadot vdddo-supply = <&vreg_lvs1a_1p8>; 309b97ee269SEmmanuel Vadot vdda-supply = <&cam3_avdd_2v8>; 310b97ee269SEmmanuel Vadot 311b97ee269SEmmanuel Vadot port { 312b97ee269SEmmanuel Vadot ov7251_ep: endpoint { 31301950c46SEmmanuel Vadot data-lanes = <0>; 314aa1a8ff2SEmmanuel Vadot link-frequencies = /bits/ 64 <240000000 319200000>; 315b97ee269SEmmanuel Vadot remote-endpoint = <&csiphy3_ep>; 316b97ee269SEmmanuel Vadot }; 317b97ee269SEmmanuel Vadot }; 318b97ee269SEmmanuel Vadot }; 319b97ee269SEmmanuel Vadot }; 320b97ee269SEmmanuel Vadot }; 321