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: 28*84943d6fSEmmanuel Vadot - qcom,sc7280-cci 29b97ee269SEmmanuel Vadot - qcom,sdm845-cci 30cb7aa33aSEmmanuel Vadot - qcom,sm6350-cci 31b97ee269SEmmanuel Vadot - qcom,sm8250-cci 32b97ee269SEmmanuel Vadot - qcom,sm8450-cci 33cb7aa33aSEmmanuel Vadot - const: qcom,msm8996-cci # CCI v2 34b97ee269SEmmanuel Vadot 35b97ee269SEmmanuel Vadot "#address-cells": 36b97ee269SEmmanuel Vadot const: 1 37b97ee269SEmmanuel Vadot 38b97ee269SEmmanuel Vadot "#size-cells": 39b97ee269SEmmanuel Vadot const: 0 40b97ee269SEmmanuel Vadot 41b97ee269SEmmanuel Vadot clocks: 427ef62cebSEmmanuel Vadot minItems: 3 43b97ee269SEmmanuel Vadot maxItems: 6 44b97ee269SEmmanuel Vadot 45b97ee269SEmmanuel Vadot clock-names: 467ef62cebSEmmanuel Vadot minItems: 3 47b97ee269SEmmanuel Vadot maxItems: 6 48b97ee269SEmmanuel Vadot 49b97ee269SEmmanuel Vadot interrupts: 50b97ee269SEmmanuel Vadot maxItems: 1 51b97ee269SEmmanuel Vadot 52b97ee269SEmmanuel Vadot power-domains: 53b97ee269SEmmanuel Vadot maxItems: 1 54b97ee269SEmmanuel Vadot 55b97ee269SEmmanuel Vadot reg: 56b97ee269SEmmanuel Vadot maxItems: 1 57b97ee269SEmmanuel Vadot 58b97ee269SEmmanuel VadotpatternProperties: 59b97ee269SEmmanuel Vadot "^i2c-bus@[01]$": 60b97ee269SEmmanuel Vadot $ref: /schemas/i2c/i2c-controller.yaml# 61b97ee269SEmmanuel Vadot unevaluatedProperties: false 62b97ee269SEmmanuel Vadot 63b97ee269SEmmanuel Vadot properties: 64b97ee269SEmmanuel Vadot reg: 65b97ee269SEmmanuel Vadot maxItems: 1 66b97ee269SEmmanuel Vadot 67b97ee269SEmmanuel Vadot clock-frequency: 68b97ee269SEmmanuel Vadot default: 100000 69b97ee269SEmmanuel Vadot 70b97ee269SEmmanuel Vadotrequired: 71b97ee269SEmmanuel Vadot - compatible 72b97ee269SEmmanuel Vadot - clock-names 73b97ee269SEmmanuel Vadot - clocks 74b97ee269SEmmanuel Vadot - interrupts 75b97ee269SEmmanuel Vadot - reg 76b97ee269SEmmanuel Vadot 77b97ee269SEmmanuel VadotallOf: 78b97ee269SEmmanuel Vadot - if: 79b97ee269SEmmanuel Vadot properties: 80b97ee269SEmmanuel Vadot compatible: 81b97ee269SEmmanuel Vadot contains: 82b97ee269SEmmanuel Vadot enum: 83b97ee269SEmmanuel Vadot - qcom,msm8996-cci 84b97ee269SEmmanuel Vadot then: 85b97ee269SEmmanuel Vadot required: 86b97ee269SEmmanuel Vadot - power-domains 87b97ee269SEmmanuel Vadot 88b97ee269SEmmanuel Vadot - if: 89b97ee269SEmmanuel Vadot properties: 90b97ee269SEmmanuel Vadot compatible: 91b97ee269SEmmanuel Vadot contains: 92b97ee269SEmmanuel Vadot enum: 937ef62cebSEmmanuel Vadot - qcom,msm8226-cci 94b97ee269SEmmanuel Vadot - qcom,msm8916-cci 95b97ee269SEmmanuel Vadot then: 96b97ee269SEmmanuel Vadot properties: 97b97ee269SEmmanuel Vadot i2c-bus@1: false 98b97ee269SEmmanuel Vadot 99b97ee269SEmmanuel Vadot - if: 100b97ee269SEmmanuel Vadot properties: 101b97ee269SEmmanuel Vadot compatible: 102cb7aa33aSEmmanuel Vadot oneOf: 103cb7aa33aSEmmanuel Vadot - contains: 104b97ee269SEmmanuel Vadot enum: 1057ef62cebSEmmanuel Vadot - qcom,msm8974-cci 106cb7aa33aSEmmanuel Vadot 107cb7aa33aSEmmanuel Vadot - const: qcom,msm8226-cci 1087ef62cebSEmmanuel Vadot then: 1097ef62cebSEmmanuel Vadot properties: 1107ef62cebSEmmanuel Vadot clocks: 1117ef62cebSEmmanuel Vadot maxItems: 3 1127ef62cebSEmmanuel Vadot clock-names: 1137ef62cebSEmmanuel Vadot items: 1147ef62cebSEmmanuel Vadot - const: camss_top_ahb 1157ef62cebSEmmanuel Vadot - const: cci_ahb 1167ef62cebSEmmanuel Vadot - const: cci 1177ef62cebSEmmanuel Vadot 1187ef62cebSEmmanuel Vadot - if: 1197ef62cebSEmmanuel Vadot properties: 1207ef62cebSEmmanuel Vadot compatible: 121cb7aa33aSEmmanuel Vadot oneOf: 122cb7aa33aSEmmanuel Vadot - contains: 1237ef62cebSEmmanuel Vadot enum: 124b97ee269SEmmanuel Vadot - qcom,msm8916-cci 125cb7aa33aSEmmanuel Vadot 126cb7aa33aSEmmanuel Vadot - const: qcom,msm8996-cci 127b97ee269SEmmanuel Vadot then: 128b97ee269SEmmanuel Vadot properties: 129b97ee269SEmmanuel Vadot clocks: 130b97ee269SEmmanuel Vadot maxItems: 4 131b97ee269SEmmanuel Vadot clock-names: 132b97ee269SEmmanuel Vadot items: 133b97ee269SEmmanuel Vadot - const: camss_top_ahb 134b97ee269SEmmanuel Vadot - const: cci_ahb 135b97ee269SEmmanuel Vadot - const: cci 136b97ee269SEmmanuel Vadot - const: camss_ahb 137b97ee269SEmmanuel Vadot 138b97ee269SEmmanuel Vadot - if: 139b97ee269SEmmanuel Vadot properties: 140b97ee269SEmmanuel Vadot compatible: 141b97ee269SEmmanuel Vadot contains: 142b97ee269SEmmanuel Vadot enum: 143b97ee269SEmmanuel Vadot - qcom,sdm845-cci 144cb7aa33aSEmmanuel Vadot - qcom,sm6350-cci 145b97ee269SEmmanuel Vadot then: 146b97ee269SEmmanuel Vadot properties: 147b97ee269SEmmanuel Vadot clocks: 148b97ee269SEmmanuel Vadot minItems: 6 149b97ee269SEmmanuel Vadot clock-names: 150b97ee269SEmmanuel Vadot items: 151b97ee269SEmmanuel Vadot - const: camnoc_axi 152b97ee269SEmmanuel Vadot - const: soc_ahb 153b97ee269SEmmanuel Vadot - const: slow_ahb_src 154b97ee269SEmmanuel Vadot - const: cpas_ahb 155b97ee269SEmmanuel Vadot - const: cci 156b97ee269SEmmanuel Vadot - const: cci_src 157b97ee269SEmmanuel Vadot 158b97ee269SEmmanuel Vadot - if: 159b97ee269SEmmanuel Vadot properties: 160b97ee269SEmmanuel Vadot compatible: 161b97ee269SEmmanuel Vadot contains: 162b97ee269SEmmanuel Vadot enum: 163*84943d6fSEmmanuel Vadot - qcom,sc7280-cci 164b97ee269SEmmanuel Vadot - qcom,sm8250-cci 1657ef62cebSEmmanuel Vadot - qcom,sm8450-cci 166b97ee269SEmmanuel Vadot then: 167b97ee269SEmmanuel Vadot properties: 168b97ee269SEmmanuel Vadot clocks: 169b97ee269SEmmanuel Vadot minItems: 5 170b97ee269SEmmanuel Vadot maxItems: 5 171b97ee269SEmmanuel Vadot clock-names: 172b97ee269SEmmanuel Vadot items: 173b97ee269SEmmanuel Vadot - const: camnoc_axi 174b97ee269SEmmanuel Vadot - const: slow_ahb_src 175b97ee269SEmmanuel Vadot - const: cpas_ahb 176b97ee269SEmmanuel Vadot - const: cci 177b97ee269SEmmanuel Vadot - const: cci_src 178b97ee269SEmmanuel Vadot 179b97ee269SEmmanuel VadotadditionalProperties: false 180b97ee269SEmmanuel Vadot 181b97ee269SEmmanuel Vadotexamples: 182b97ee269SEmmanuel Vadot - | 183b97ee269SEmmanuel Vadot #include <dt-bindings/clock/qcom,camcc-sdm845.h> 184b97ee269SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 185b97ee269SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 186b97ee269SEmmanuel Vadot 187b97ee269SEmmanuel Vadot cci@ac4a000 { 188b97ee269SEmmanuel Vadot reg = <0x0ac4a000 0x4000>; 189cb7aa33aSEmmanuel Vadot compatible = "qcom,sdm845-cci", "qcom,msm8996-cci"; 190b97ee269SEmmanuel Vadot #address-cells = <1>; 191b97ee269SEmmanuel Vadot #size-cells = <0>; 192b97ee269SEmmanuel Vadot 193b97ee269SEmmanuel Vadot interrupts = <GIC_SPI 460 IRQ_TYPE_EDGE_RISING>; 194b97ee269SEmmanuel Vadot power-domains = <&clock_camcc TITAN_TOP_GDSC>; 195b97ee269SEmmanuel Vadot 196b97ee269SEmmanuel Vadot clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, 197b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_SOC_AHB_CLK>, 198b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>, 199b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CPAS_AHB_CLK>, 200b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CCI_CLK>, 201b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CCI_CLK_SRC>; 202b97ee269SEmmanuel Vadot clock-names = "camnoc_axi", 203b97ee269SEmmanuel Vadot "soc_ahb", 204b97ee269SEmmanuel Vadot "slow_ahb_src", 205b97ee269SEmmanuel Vadot "cpas_ahb", 206b97ee269SEmmanuel Vadot "cci", 207b97ee269SEmmanuel Vadot "cci_src"; 208b97ee269SEmmanuel Vadot 209b97ee269SEmmanuel Vadot assigned-clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>, 210b97ee269SEmmanuel Vadot <&clock_camcc CAM_CC_CCI_CLK>; 211b97ee269SEmmanuel Vadot assigned-clock-rates = <80000000>, 212b97ee269SEmmanuel Vadot <37500000>; 213b97ee269SEmmanuel Vadot 214b97ee269SEmmanuel Vadot pinctrl-names = "default", "sleep"; 215b97ee269SEmmanuel Vadot pinctrl-0 = <&cci0_default &cci1_default>; 216b97ee269SEmmanuel Vadot pinctrl-1 = <&cci0_sleep &cci1_sleep>; 217b97ee269SEmmanuel Vadot 218b97ee269SEmmanuel Vadot i2c-bus@0 { 219b97ee269SEmmanuel Vadot reg = <0>; 220b97ee269SEmmanuel Vadot clock-frequency = <1000000>; 221b97ee269SEmmanuel Vadot #address-cells = <1>; 222b97ee269SEmmanuel Vadot #size-cells = <0>; 223b97ee269SEmmanuel Vadot 224b97ee269SEmmanuel Vadot camera@10 { 225b97ee269SEmmanuel Vadot compatible = "ovti,ov8856"; 226b97ee269SEmmanuel Vadot reg = <0x10>; 227b97ee269SEmmanuel Vadot 228b97ee269SEmmanuel Vadot reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; 229b97ee269SEmmanuel Vadot pinctrl-names = "default"; 230b97ee269SEmmanuel Vadot pinctrl-0 = <&cam0_default>; 231b97ee269SEmmanuel Vadot 232b97ee269SEmmanuel Vadot clocks = <&clock_camcc CAM_CC_MCLK0_CLK>; 233b97ee269SEmmanuel Vadot clock-names = "xvclk"; 234b97ee269SEmmanuel Vadot clock-frequency = <19200000>; 235b97ee269SEmmanuel Vadot 236b97ee269SEmmanuel Vadot dovdd-supply = <&vreg_lvs1a_1p8>; 237b97ee269SEmmanuel Vadot avdd-supply = <&cam0_avdd_2v8>; 238b97ee269SEmmanuel Vadot dvdd-supply = <&cam0_dvdd_1v2>; 239b97ee269SEmmanuel Vadot 240b97ee269SEmmanuel Vadot port { 241b97ee269SEmmanuel Vadot ov8856_ep: endpoint { 242b97ee269SEmmanuel Vadot link-frequencies = /bits/ 64 <360000000 180000000>; 243b97ee269SEmmanuel Vadot data-lanes = <1 2 3 4>; 244b97ee269SEmmanuel Vadot remote-endpoint = <&csiphy0_ep>; 245b97ee269SEmmanuel Vadot }; 246b97ee269SEmmanuel Vadot }; 247b97ee269SEmmanuel Vadot }; 248b97ee269SEmmanuel Vadot }; 249b97ee269SEmmanuel Vadot 250b97ee269SEmmanuel Vadot cci_i2c1: i2c-bus@1 { 251b97ee269SEmmanuel Vadot reg = <1>; 252b97ee269SEmmanuel Vadot clock-frequency = <1000000>; 253b97ee269SEmmanuel Vadot #address-cells = <1>; 254b97ee269SEmmanuel Vadot #size-cells = <0>; 255b97ee269SEmmanuel Vadot 256b97ee269SEmmanuel Vadot camera@60 { 257b97ee269SEmmanuel Vadot compatible = "ovti,ov7251"; 258b97ee269SEmmanuel Vadot reg = <0x60>; 259b97ee269SEmmanuel Vadot 260b97ee269SEmmanuel Vadot enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; 261b97ee269SEmmanuel Vadot pinctrl-names = "default"; 262b97ee269SEmmanuel Vadot pinctrl-0 = <&cam3_default>; 263b97ee269SEmmanuel Vadot 264b97ee269SEmmanuel Vadot clocks = <&clock_camcc CAM_CC_MCLK3_CLK>; 265b97ee269SEmmanuel Vadot clock-names = "xclk"; 266b97ee269SEmmanuel Vadot clock-frequency = <24000000>; 267b97ee269SEmmanuel Vadot 268b97ee269SEmmanuel Vadot vdddo-supply = <&vreg_lvs1a_1p8>; 269b97ee269SEmmanuel Vadot vdda-supply = <&cam3_avdd_2v8>; 270b97ee269SEmmanuel Vadot 271b97ee269SEmmanuel Vadot port { 272b97ee269SEmmanuel Vadot ov7251_ep: endpoint { 273b97ee269SEmmanuel Vadot data-lanes = <0 1>; 274aa1a8ff2SEmmanuel Vadot link-frequencies = /bits/ 64 <240000000 319200000>; 275b97ee269SEmmanuel Vadot remote-endpoint = <&csiphy3_ep>; 276b97ee269SEmmanuel Vadot }; 277b97ee269SEmmanuel Vadot }; 278b97ee269SEmmanuel Vadot }; 279b97ee269SEmmanuel Vadot }; 280b97ee269SEmmanuel Vadot }; 281