| 1 |
// SPDX-License-Identifier: GPL-2.0-only OR MIT |
| 2 |
/* |
| 3 |
* DT Overlay for 4 x TEVI OV5640 MIPI Camera module on J722S-EVM board. |
| 4 |
* |
| 5 |
* Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/ |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
/plugin/; |
| 10 |
|
| 11 |
#include <dt-bindings/gpio/gpio.h> |
| 12 |
#include "k3-pinctrl.h" |
| 13 |
|
| 14 |
&main_pmx0 { |
| 15 |
cam0_reset_pins_default: cam0-default-reset-pins { |
| 16 |
pinctrl-single,pins = < |
| 17 |
J722S_IOPAD(0x03c, PIN_OUTPUT, 7) /* (R22) GPIO0_15 */ |
| 18 |
>; |
| 19 |
}; |
| 20 |
|
| 21 |
cam1_reset_pins_default: cam1-default-reset-pins { |
| 22 |
pinctrl-single,pins = < |
| 23 |
J722S_IOPAD(0x044, PIN_OUTPUT, 7) /* (R26) GPIO0_17 */ |
| 24 |
>; |
| 25 |
}; |
| 26 |
|
| 27 |
cam2_reset_pins_default: cam2-default-reset-pins { |
| 28 |
pinctrl-single,pins = < |
| 29 |
J722S_IOPAD(0x04c, PIN_OUTPUT, 7) /* (T25) GPIO0_19 */ |
| 30 |
>; |
| 31 |
}; |
| 32 |
|
| 33 |
cam3_reset_pins_default: cam3-default-reset-pins { |
| 34 |
pinctrl-single,pins = < |
| 35 |
J722S_IOPAD(0x054, PIN_OUTPUT, 7) /* (T21) GPIO0_21 */ |
| 36 |
>; |
| 37 |
}; |
| 38 |
}; |
| 39 |
|
| 40 |
&{/} { |
| 41 |
clk_ov5640_fixed: clock-24000000 { |
| 42 |
compatible = "fixed-clock"; |
| 43 |
#clock-cells = <0>; |
| 44 |
clock-frequency = <24000000>; |
| 45 |
}; |
| 46 |
|
| 47 |
reg_2p8v: regulator-2p8v { |
| 48 |
compatible = "regulator-fixed"; |
| 49 |
regulator-name = "2P8V"; |
| 50 |
regulator-min-microvolt = <2800000>; |
| 51 |
regulator-max-microvolt = <2800000>; |
| 52 |
vin-supply = <&vsys_3v3_exp>; |
| 53 |
regulator-always-on; |
| 54 |
}; |
| 55 |
|
| 56 |
reg_1p8v: regulator-1p8v { |
| 57 |
compatible = "regulator-fixed"; |
| 58 |
regulator-name = "1P8V"; |
| 59 |
regulator-min-microvolt = <1800000>; |
| 60 |
regulator-max-microvolt = <1800000>; |
| 61 |
vin-supply = <&vsys_3v3_exp>; |
| 62 |
regulator-always-on; |
| 63 |
}; |
| 64 |
|
| 65 |
reg_3p3v: regulator-3p3v { |
| 66 |
compatible = "regulator-fixed"; |
| 67 |
regulator-name = "3P3V"; |
| 68 |
regulator-min-microvolt = <3300000>; |
| 69 |
regulator-max-microvolt = <3300000>; |
| 70 |
vin-supply = <&vsys_3v3_exp>; |
| 71 |
regulator-always-on; |
| 72 |
}; |
| 73 |
}; |
| 74 |
|
| 75 |
&csi01_mux { |
| 76 |
idle-state = <1>; |
| 77 |
}; |
| 78 |
|
| 79 |
&csi23_mux { |
| 80 |
idle-state = <1>; |
| 81 |
}; |
| 82 |
|
| 83 |
&pca9543_0 { |
| 84 |
#address-cells = <1>; |
| 85 |
#size-cells = <0>; |
| 86 |
|
| 87 |
/* CAM0 I2C */ |
| 88 |
i2c@0 { |
| 89 |
#address-cells = <1>; |
| 90 |
#size-cells = <0>; |
| 91 |
reg = <0>; |
| 92 |
|
| 93 |
ov5640_0: camera@3c { |
| 94 |
compatible = "ovti,ov5640"; |
| 95 |
reg = <0x3c>; |
| 96 |
clocks = <&clk_ov5640_fixed>; |
| 97 |
clock-names = "xclk"; |
| 98 |
|
| 99 |
AVDD-supply = <®_2p8v>; |
| 100 |
DOVDD-supply = <®_1p8v>; |
| 101 |
DVDD-supply = <®_3p3v>; |
| 102 |
|
| 103 |
pinctrl-names = "default"; |
| 104 |
pinctrl-0 = <&cam0_reset_pins_default>; |
| 105 |
|
| 106 |
reset-gpios = <&main_gpio0 15 GPIO_ACTIVE_HIGH>; |
| 107 |
|
| 108 |
port { |
| 109 |
csi2_cam0: endpoint { |
| 110 |
remote-endpoint = <&csi2rx0_in_sensor>; |
| 111 |
clock-lanes = <0>; |
| 112 |
data-lanes = <1 2>; |
| 113 |
}; |
| 114 |
}; |
| 115 |
}; |
| 116 |
}; |
| 117 |
|
| 118 |
/* CAM1 I2C */ |
| 119 |
i2c@1 { |
| 120 |
#address-cells = <1>; |
| 121 |
#size-cells = <0>; |
| 122 |
reg = <1>; |
| 123 |
|
| 124 |
ov5640_1: camera@3c { |
| 125 |
compatible = "ovti,ov5640"; |
| 126 |
reg = <0x3c>; |
| 127 |
clocks = <&clk_ov5640_fixed>; |
| 128 |
clock-names = "xclk"; |
| 129 |
|
| 130 |
AVDD-supply = <®_2p8v>; |
| 131 |
DOVDD-supply = <®_1p8v>; |
| 132 |
DVDD-supply = <®_3p3v>; |
| 133 |
|
| 134 |
pinctrl-names = "default"; |
| 135 |
pinctrl-0 = <&cam1_reset_pins_default>; |
| 136 |
|
| 137 |
reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>; |
| 138 |
|
| 139 |
port { |
| 140 |
csi2_cam1: endpoint { |
| 141 |
remote-endpoint = <&csi2rx1_in_sensor>; |
| 142 |
clock-lanes = <0>; |
| 143 |
data-lanes = <1 2>; |
| 144 |
}; |
| 145 |
}; |
| 146 |
}; |
| 147 |
}; |
| 148 |
}; |
| 149 |
|
| 150 |
&pca9543_1 { |
| 151 |
#address-cells = <1>; |
| 152 |
#size-cells = <0>; |
| 153 |
|
| 154 |
/* CAM0 I2C */ |
| 155 |
i2c@0 { |
| 156 |
#address-cells = <1>; |
| 157 |
#size-cells = <0>; |
| 158 |
reg = <0>; |
| 159 |
|
| 160 |
ov5640_2: camera@3c { |
| 161 |
compatible = "ovti,ov5640"; |
| 162 |
reg = <0x3c>; |
| 163 |
clocks = <&clk_ov5640_fixed>; |
| 164 |
clock-names = "xclk"; |
| 165 |
|
| 166 |
AVDD-supply = <®_2p8v>; |
| 167 |
DOVDD-supply = <®_1p8v>; |
| 168 |
DVDD-supply = <®_3p3v>; |
| 169 |
|
| 170 |
pinctrl-names = "default"; |
| 171 |
pinctrl-0 = <&cam2_reset_pins_default>; |
| 172 |
|
| 173 |
reset-gpios = <&main_gpio0 19 GPIO_ACTIVE_HIGH>; |
| 174 |
|
| 175 |
port { |
| 176 |
csi2_cam2: endpoint { |
| 177 |
remote-endpoint = <&csi2rx2_in_sensor>; |
| 178 |
clock-lanes = <0>; |
| 179 |
data-lanes = <1 2>; |
| 180 |
}; |
| 181 |
}; |
| 182 |
}; |
| 183 |
}; |
| 184 |
|
| 185 |
/* CAM1 I2C */ |
| 186 |
i2c@1 { |
| 187 |
#address-cells = <1>; |
| 188 |
#size-cells = <0>; |
| 189 |
reg = <1>; |
| 190 |
|
| 191 |
ov5640_3: camera@3c { |
| 192 |
compatible = "ovti,ov5640"; |
| 193 |
reg = <0x3c>; |
| 194 |
clocks = <&clk_ov5640_fixed>; |
| 195 |
clock-names = "xclk"; |
| 196 |
|
| 197 |
AVDD-supply = <®_2p8v>; |
| 198 |
DOVDD-supply = <®_1p8v>; |
| 199 |
DVDD-supply = <®_3p3v>; |
| 200 |
|
| 201 |
pinctrl-names = "default"; |
| 202 |
pinctrl-0 = <&cam3_reset_pins_default>; |
| 203 |
|
| 204 |
reset-gpios = <&main_gpio0 21 GPIO_ACTIVE_HIGH>; |
| 205 |
|
| 206 |
port { |
| 207 |
csi2_cam3: endpoint { |
| 208 |
remote-endpoint = <&csi2rx3_in_sensor>; |
| 209 |
clock-lanes = <0>; |
| 210 |
data-lanes = <1 2>; |
| 211 |
}; |
| 212 |
}; |
| 213 |
}; |
| 214 |
}; |
| 215 |
}; |
| 216 |
|
| 217 |
&cdns_csi2rx0 { |
| 218 |
ports { |
| 219 |
#address-cells = <1>; |
| 220 |
#size-cells = <0>; |
| 221 |
|
| 222 |
csi0_port0: port@0 { |
| 223 |
reg = <0>; |
| 224 |
status = "okay"; |
| 225 |
|
| 226 |
csi2rx0_in_sensor: endpoint { |
| 227 |
remote-endpoint = <&csi2_cam0>; |
| 228 |
bus-type = <4>; /* CSI2 DPHY */ |
| 229 |
clock-lanes = <0>; |
| 230 |
data-lanes = <1 2>; |
| 231 |
}; |
| 232 |
}; |
| 233 |
}; |
| 234 |
}; |
| 235 |
|
| 236 |
&cdns_csi2rx1 { |
| 237 |
ports { |
| 238 |
#address-cells = <1>; |
| 239 |
#size-cells = <0>; |
| 240 |
|
| 241 |
csi1_port0: port@0 { |
| 242 |
reg = <0>; |
| 243 |
status = "okay"; |
| 244 |
|
| 245 |
csi2rx1_in_sensor: endpoint { |
| 246 |
remote-endpoint = <&csi2_cam1>; |
| 247 |
bus-type = <4>; /* CSI2 DPHY */ |
| 248 |
clock-lanes = <0>; |
| 249 |
data-lanes = <1 2>; |
| 250 |
}; |
| 251 |
}; |
| 252 |
}; |
| 253 |
}; |
| 254 |
|
| 255 |
&cdns_csi2rx2 { |
| 256 |
ports { |
| 257 |
#address-cells = <1>; |
| 258 |
#size-cells = <0>; |
| 259 |
|
| 260 |
csi2_port0: port@0 { |
| 261 |
reg = <0>; |
| 262 |
status = "okay"; |
| 263 |
|
| 264 |
csi2rx2_in_sensor: endpoint { |
| 265 |
remote-endpoint = <&csi2_cam2>; |
| 266 |
bus-type = <4>; /* CSI2 DPHY */ |
| 267 |
clock-lanes = <0>; |
| 268 |
data-lanes = <1 2>; |
| 269 |
}; |
| 270 |
}; |
| 271 |
}; |
| 272 |
}; |
| 273 |
|
| 274 |
&cdns_csi2rx3 { |
| 275 |
ports { |
| 276 |
#address-cells = <1>; |
| 277 |
#size-cells = <0>; |
| 278 |
|
| 279 |
csi3_port0: port@0 { |
| 280 |
reg = <0>; |
| 281 |
status = "okay"; |
| 282 |
|
| 283 |
csi2rx3_in_sensor: endpoint { |
| 284 |
remote-endpoint = <&csi2_cam3>; |
| 285 |
bus-type = <4>; /* CSI2 DPHY */ |
| 286 |
clock-lanes = <0>; |
| 287 |
data-lanes = <1 2>; |
| 288 |
}; |
| 289 |
}; |
| 290 |
}; |
| 291 |
}; |
| 292 |
|
| 293 |
&ti_csi2rx0 { |
| 294 |
status = "okay"; |
| 295 |
}; |
| 296 |
|
| 297 |
&dphy0 { |
| 298 |
status = "okay"; |
| 299 |
}; |
| 300 |
|
| 301 |
&ti_csi2rx1 { |
| 302 |
status = "okay"; |
| 303 |
}; |
| 304 |
|
| 305 |
&dphy1 { |
| 306 |
status = "okay"; |
| 307 |
}; |
| 308 |
|
| 309 |
&ti_csi2rx2 { |
| 310 |
status = "okay"; |
| 311 |
}; |
| 312 |
|
| 313 |
&dphy2 { |
| 314 |
status = "okay"; |
| 315 |
}; |
| 316 |
|
| 317 |
&ti_csi2rx3 { |
| 318 |
status = "okay"; |
| 319 |
}; |
| 320 |
|
| 321 |
&dphy3 { |
| 322 |
status = "okay"; |
| 323 |
}; |