blob: 270515a0b532e2e592f982f6c224940a7862e587 [file] [log] [blame]
Vijay kumar Tumati299fec02018-02-24 15:30:31 +05301/*
Shreyas Narayandc9444c2019-07-25 14:52:29 +05302 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
Vijay kumar Tumati299fec02018-02-24 15:30:31 +05303 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14&cci {
Tengfei Fanf08a94f2019-04-12 15:59:52 +080015 #address-cells = <1>;
16 #size-cells = <0>;
17
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053018 actuator0: qcom,actuator@0 {
19 cell-index = <0>;
20 reg = <0x0>;
21 compatible = "qcom,actuator";
22 qcom,cci-master = <0>;
frankcheng049cc9e2020-05-09 20:59:58 +080023// cam_vaf-supply = <&pm8953_l17>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053024 qcom,cam-vreg-name = "cam_vaf";
25 qcom,cam-vreg-min-voltage = <2850000>;
26 qcom,cam-vreg-max-voltage = <2850000>;
27 qcom,cam-vreg-op-mode = <80000>;
28 };
29
30 actuator1: qcom,actuator@1 {
31 cell-index = <1>;
32 reg = <0x1>;
33 compatible = "qcom,actuator";
34 qcom,cci-master = <1>;
35 cam_vaf-supply = <&pm8953_l17>;
36 qcom,cam-vreg-name = "cam_vaf";
37 qcom,cam-vreg-min-voltage = <2850000>;
38 qcom,cam-vreg-max-voltage = <2850000>;
39 qcom,cam-vreg-op-mode = <80000>;
40 };
41
42 eeprom0: qcom,eeprom@0 {
43 cell-index = <0>;
44 compatible = "qcom,eeprom";
45 qcom,cci-master = <0>;
46 reg = <0x0>;
frankcheng049cc9e2020-05-09 20:59:58 +080047 cam_vana-supply = <&pm8953_l22>;
48 cam_v_custom1-supply = <&pm8953_l2>;
49 qcom,cam-vreg-name = "cam_vana", "cam_v_custom1";
50 qcom,cam-vreg-min-voltage = <2800000 1175000>;
51 qcom,cam-vreg-max-voltage = <2800000 1175000>;
52 qcom,cam-vreg-op-mode = <80000 105000>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053053 pinctrl-names = "cam_default", "cam_suspend";
frankcheng049cc9e2020-05-09 20:59:58 +080054 pinctrl-0 = <&cam_sensor_mclk0_default &cam_sensor_rear_default>;
55 pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053056 gpios = <&tlmm 26 0>,
57 <&tlmm 40 0>,
frankcheng049cc9e2020-05-09 20:59:58 +080058 <&tlmm 130 0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053059 qcom,gpio-reset = <1>;
frankcheng049cc9e2020-05-09 20:59:58 +080060 qcom,gpio-vio = <2>;
61 qcom,gpio-req-tbl-num = <0 1 2>;
62 qcom,gpio-req-tbl-flags = <1 0 0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053063 qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
64 "CAM_RESET0",
frankcheng049cc9e2020-05-09 20:59:58 +080065 "CAM_VIO";
66 qcom,sensor-position = <0>;
67 qcom,sensor-mode = <0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053068 status = "ok";
69 clocks = <&clock_gcc clk_mclk0_clk_src>,
70 <&clock_gcc clk_gcc_camss_mclk0_clk>;
71 clock-names = "cam_src_clk", "cam_clk";
frankcheng049cc9e2020-05-09 20:59:58 +080072 qcom,clock-rates = <24000000 0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053073 };
74
frankcheng049cc9e2020-05-09 20:59:58 +080075/*<2018/10/18-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][]Modified for new front camera device driver S5K4H7YX. */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053076 eeprom1: qcom,eeprom@1 {
77 cell-index = <1>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +053078 compatible = "qcom,eeprom";
Samyukta Mogily304ac0d2018-08-31 12:21:28 +053079 qcom,cci-master = <1>;
frankcheng049cc9e2020-05-09 20:59:58 +080080 reg = <0x1>;
81
82#if 0
83 qcom,eeprom-name = "samsung_s5k4h7yx";
84 qcom,slave-addr = <0x20>;
85 qcom,num-blocks = <2>;
86
87 qcom,page0 = <1 0x0100 2 0x01 1 1>;
88 qcom,poll0 = <0 0x0 2 0x0 1 0>;
89 qcom,mem0 = <0 0x0 2 0x0 1 0>;
90#endif
91
92 /* cam_vio-supply = <&cam_vio_gpio_regulator>; */ /* IOVDD */
93 cam_vana-supply = <&pm8953_l22>; /* AVDD */
94 /* cam_vdig-supply = <&cam_front_dvdd_gpio_regulator>; */ /* DVDD */
95 /* cam_vaf-supply = <&pm8953_l17>; */ /* AFVDD is not usage */
96 qcom,cam-vreg-name = "cam_vana"; /* "cam_vio", "cam_vana", "cam_vdig"; */
97 qcom,cam-vreg-min-voltage = <2800000>;
98 qcom,cam-vreg-max-voltage = <2800000>;
99 qcom,cam-vreg-op-mode = <80000>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530100 qcom,gpio-no-mux = <0>;
frankcheng049cc9e2020-05-09 20:59:58 +0800101
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530102 pinctrl-names = "cam_default", "cam_suspend";
103 pinctrl-0 = <&cam_sensor_mclk1_default
frankcheng049cc9e2020-05-09 20:59:58 +0800104 &cam_sensor_front1_default
105 &cam_sensor_front1_vdig_default
106 &cam_sensor_front1_vio_default>;
Samyukta Mogily304ac0d2018-08-31 12:21:28 +0530107 pinctrl-1 = <&cam_sensor_mclk1_sleep
frankcheng049cc9e2020-05-09 20:59:58 +0800108 &cam_sensor_front1_sleep
109 &cam_sensor_front1_vdig_sleep
110 &cam_sensor_front1_vio_sleep>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530111
frankcheng049cc9e2020-05-09 20:59:58 +0800112/*<2018/11/14-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][]VOI control pin.PCBA EP0 is GPIO123;EP1 and above is GPIO130 */
113 gpios = <&tlmm 27 0>,
114 <&tlmm 129 0>,
115 <&tlmm 46 0>,
116#if 1
117 <&tlmm 130 0>;
118#else /* PCBA EP0 */
119 <&tlmm 123 0>;
120#endif
121/*>2018/11/14-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][] */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530122 qcom,gpio-reset = <1>;
frankcheng049cc9e2020-05-09 20:59:58 +0800123 qcom,gpio-vdig = <2>;
124 qcom,gpio-vio = <3>;
125 qcom,gpio-req-tbl-num = <0 1 2 3>;
126 qcom,gpio-req-tbl-flags = <1 0 0 0>;
127 qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
128 "CAM_RESET2",
129 "CAM_VDIG2",
130 "CAM_VIO2";
131
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530132 status = "ok";
frankcheng049cc9e2020-05-09 20:59:58 +0800133#if 1
134 qcom,cam-power-seq-val = "sensor_gpio_reset",
135 "cam_vana", "sensor_gpio_vdig",
136 "sensor_gpio_vio", "sensor_gpio_reset",
137 "sensor_cam_mclk";
138 qcom,cam-power-seq-type = "sensor_gpio",
139 "sensor_vreg", "sensor_gpio",
140 "sensor_gpio", "sensor_gpio",
141 "sensor_clk";
142 qcom,cam-power-seq-cfg-val = <0 1 1 1 1 24000000>;
143 qcom,cam-power-seq-delay = <5 1 1 3 3 10>; /* <1 1 1 1 1 10>; */
144#endif
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530145 clock-names = "cam_src_clk", "cam_clk";
frankcheng049cc9e2020-05-09 20:59:58 +0800146 clocks = <&clock_gcc clk_mclk1_clk_src>,
147 <&clock_gcc clk_gcc_camss_mclk1_clk>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530148 qcom,clock-rates = <19200000 0>;
149 };
frankcheng049cc9e2020-05-09 20:59:58 +0800150/*>2018/10/18-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][]. */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530151
Vijay kumar Tumati408b0962018-03-16 17:28:31 +0530152 camera0: qcom,camera@0 {
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530153 cell-index = <0>;
154 compatible = "qcom,camera";
155 reg = <0x0>;
156 qcom,csiphy-sd-index = <0>;
157 qcom,csid-sd-index = <0>;
158 qcom,mount-angle = <270>;
Swetha Chikkaboraiah9f00a242019-10-28 15:59:30 +0530159 qcom,led-flash-src = <&led_flash0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530160 qcom,eeprom-src = <&eeprom0>;
161 qcom,actuator-src = <&actuator0>;
frankcheng049cc9e2020-05-09 20:59:58 +0800162// cam_vio-supply = <&pm8953_l6>;
163// cam_vdig-supply = <&pm8953_l2>;
164// cam_vaf-supply = <&pm8953_l17>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530165 cam_vana-supply = <&pm8953_l22>;
frankcheng049cc9e2020-05-09 20:59:58 +0800166 cam_v_custom1-supply = <&pm8953_l2>;
167 qcom,cam-vreg-name = "cam_vana", "cam_v_custom1";
168 qcom,cam-vreg-min-voltage = <2800000 1175000>;
169 qcom,cam-vreg-max-voltage = <2800000 1175000>;
170 qcom,cam-vreg-op-mode = <80000 105000>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530171 pinctrl-names = "cam_default", "cam_suspend";
172 pinctrl-0 = <&cam_sensor_mclk0_default
173 &cam_sensor_rear_default
174 &cam_sensor_rear_vana>;
175 pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep
176 &cam_sensor_rear_vana_sleep>;
177 gpios = <&tlmm 26 0>,
178 <&tlmm 40 0>,
frankcheng049cc9e2020-05-09 20:59:58 +0800179 <&tlmm 130 0>,
180 <&tlmm 128 0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530181 qcom,gpio-reset = <1>;
frankcheng049cc9e2020-05-09 20:59:58 +0800182 qcom,gpio-vio = <2>;
183 qcom,gpio-vaf = <3>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530184 qcom,gpio-req-tbl-num = <0 1 2 3>;
185 qcom,gpio-req-tbl-flags = <1 0 0 0>;
186 qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
187 "CAM_RESET0",
frankcheng049cc9e2020-05-09 20:59:58 +0800188 "CAM_VIO",
189 "CAM_VAF";
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530190 qcom,sensor-position = <0>;
191 qcom,sensor-mode = <0>;
192 qcom,cci-master = <0>;
193 status = "ok";
194 clocks = <&clock_gcc clk_mclk0_clk_src>,
195 <&clock_gcc clk_gcc_camss_mclk0_clk>;
196 clock-names = "cam_src_clk", "cam_clk";
197 qcom,clock-rates = <24000000 0>;
198 };
199
frankcheng049cc9e2020-05-09 20:59:58 +0800200/*<2018/10/18-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][]Modified for new front camera device driver S5K4H7YX. */
201 camera2: qcom,camera@2 {
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530202 cell-index = <2>;
203 compatible = "qcom,camera";
204 reg = <0x02>;
205 qcom,csiphy-sd-index = <2>;
frankcheng049cc9e2020-05-09 20:59:58 +0800206 qcom,csid-sd-index = <1>; /* SDM450 support 2 CSID cores. MSM8953 is 3 CSID cores */
207 qcom,mount-angle = <270>; /* <90>; */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530208 qcom,eeprom-src = <&eeprom1>;
frankcheng049cc9e2020-05-09 20:59:58 +0800209 /* qcom,actuator-src = <&actuator1>; */ /* The auto focus is not support */
210
211 /* cam_vio-supply = <&cam_vio_gpio_regulator>; */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530212 cam_vana-supply = <&pm8953_l22>;
frankcheng049cc9e2020-05-09 20:59:58 +0800213 /* cam_vdig-supply = <&cam_front_dvdd_gpio_regulator>; */
214 /* cam_vaf-supply = <&pm8953_l17>; */ /* The AFVDD is not support */
215 qcom,cam-vreg-name = "cam_vana";
216 qcom,cam-vreg-min-voltage = <2800000>;
217 qcom,cam-vreg-max-voltage = <2800000>;
218 qcom,cam-vreg-op-mode = <80000>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530219 qcom,gpio-no-mux = <0>;
frankcheng049cc9e2020-05-09 20:59:58 +0800220
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530221 pinctrl-names = "cam_default", "cam_suspend";
222 pinctrl-0 = <&cam_sensor_mclk1_default
frankcheng049cc9e2020-05-09 20:59:58 +0800223 &cam_sensor_front1_default
224 &cam_sensor_front1_vdig_default
225 &cam_sensor_front1_vio_default>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530226 pinctrl-1 = <&cam_sensor_mclk1_sleep
frankcheng049cc9e2020-05-09 20:59:58 +0800227 &cam_sensor_front1_sleep
228 &cam_sensor_front1_vdig_sleep
229 &cam_sensor_front1_vio_sleep>;
230
231/*<2018/11/14-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][]VOI control pin.PCBA EP0 is GPIO123;EP1 and above is GPIO130 */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530232 gpios = <&tlmm 27 0>,
frankcheng049cc9e2020-05-09 20:59:58 +0800233 <&tlmm 129 0>,
234 <&tlmm 46 0>,
235#if 1
236 <&tlmm 130 0>;
237#else /* PCBA EP0 */
238 <&tlmm 123 0>;
239#endif
240/*>2018/11/14-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][] */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530241 qcom,gpio-reset = <1>;
frankcheng049cc9e2020-05-09 20:59:58 +0800242 qcom,gpio-vdig = <2>;
243 qcom,gpio-vio = <3>;
244 qcom,gpio-req-tbl-num = <0 1 2 3>;
245 qcom,gpio-req-tbl-flags = <1 0 0 0>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530246 qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
frankcheng049cc9e2020-05-09 20:59:58 +0800247 "CAM_RESET2",
248 "CAM_VDIG2",
249 "CAM_VIO2";
250
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530251 qcom,sensor-position = <1>;
252 qcom,sensor-mode = <0>;
253 qcom,cci-master = <1>;
254 status = "ok";
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530255 clock-names = "cam_src_clk", "cam_clk";
frankcheng049cc9e2020-05-09 20:59:58 +0800256 clocks = <&clock_gcc clk_mclk1_clk_src>,
257 <&clock_gcc clk_gcc_camss_mclk1_clk>;
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530258 qcom,clock-rates = <24000000 0>;
259 };
frankcheng049cc9e2020-05-09 20:59:58 +0800260/*>2018/10/18-Yuting Shih.[FAIRPHONE][MISC][COMMON][CAMERA][][]. */
Vijay kumar Tumati299fec02018-02-24 15:30:31 +0530261};