Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors

Adds the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor.
Both hang off the same i2c2 bus, so they require different (and non-
default) i2c slave addresses.

The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux.

The OV5640 connects to the input port on the MIPI CSI-2 receiver on
mipi_csi.

The OV5642 node is disabled temporarily while the subdev driver is
cleaned up and submitted later.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Steve Longerbeam and committed by
Shawn Guo
789459c4 4c877789

+158
+5
arch/arm/boot/dts/imx6dl-sabrelite.dts
··· 48 48 model = "Freescale i.MX6 DualLite SABRE Lite Board"; 49 49 compatible = "fsl,imx6dl-sabrelite", "fsl,imx6dl"; 50 50 }; 51 + 52 + &ipu1_csi1_from_ipu1_csi1_mux { 53 + clock-lanes = <0>; 54 + data-lanes = <1 2>; 55 + };
+5
arch/arm/boot/dts/imx6q-sabrelite.dts
··· 52 52 &sata { 53 53 status = "okay"; 54 54 }; 55 + 56 + &ipu1_csi1_from_mipi_vc1 { 57 + clock-lanes = <0>; 58 + data-lanes = <1 2>; 59 + };
+148
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
··· 39 39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 40 * OTHER DEALINGS IN THE SOFTWARE. 41 41 */ 42 + 43 + #include <dt-bindings/clock/imx6qdl-clock.h> 42 44 #include <dt-bindings/gpio/gpio.h> 43 45 #include <dt-bindings/input/input.h> 44 46 ··· 96 94 pinctrl-0 = <&pinctrl_can_xcvr>; 97 95 gpio = <&gpio1 2 GPIO_ACTIVE_LOW>; 98 96 }; 97 + 98 + reg_1p5v: regulator@4 { 99 + compatible = "regulator-fixed"; 100 + reg = <4>; 101 + regulator-name = "1P5V"; 102 + regulator-min-microvolt = <1500000>; 103 + regulator-max-microvolt = <1500000>; 104 + regulator-always-on; 105 + }; 106 + 107 + reg_1p8v: regulator@5 { 108 + compatible = "regulator-fixed"; 109 + reg = <5>; 110 + regulator-name = "1P8V"; 111 + regulator-min-microvolt = <1800000>; 112 + regulator-max-microvolt = <1800000>; 113 + regulator-always-on; 114 + }; 115 + 116 + reg_2p8v: regulator@6 { 117 + compatible = "regulator-fixed"; 118 + reg = <6>; 119 + regulator-name = "2P8V"; 120 + regulator-min-microvolt = <2800000>; 121 + regulator-max-microvolt = <2800000>; 122 + regulator-always-on; 123 + }; 124 + }; 125 + 126 + mipi_xclk: mipi_xclk { 127 + compatible = "pwm-clock"; 128 + #clock-cells = <0>; 129 + clock-frequency = <22000000>; 130 + clock-output-names = "mipi_pwm3"; 131 + pwms = <&pwm3 0 45>; /* 1 / 45 ns = 22 MHz */ 132 + status = "okay"; 99 133 }; 100 134 101 135 gpio-keys { ··· 258 220 }; 259 221 }; 260 222 223 + &ipu1_csi0_from_ipu1_csi0_mux { 224 + bus-width = <8>; 225 + data-shift = <12>; /* Lines 19:12 used */ 226 + hsync-active = <1>; 227 + vync-active = <1>; 228 + }; 229 + 230 + &ipu1_csi0_mux_from_parallel_sensor { 231 + remote-endpoint = <&ov5642_to_ipu1_csi0_mux>; 232 + }; 233 + 234 + &ipu1_csi0 { 235 + pinctrl-names = "default"; 236 + pinctrl-0 = <&pinctrl_ipu1_csi0>; 237 + }; 238 + 261 239 &audmux { 262 240 pinctrl-names = "default"; 263 241 pinctrl-0 = <&pinctrl_audmux>; ··· 352 298 pinctrl-names = "default"; 353 299 pinctrl-0 = <&pinctrl_i2c2>; 354 300 status = "okay"; 301 + 302 + ov5640: camera@40 { 303 + compatible = "ovti,ov5640"; 304 + pinctrl-names = "default"; 305 + pinctrl-0 = <&pinctrl_ov5640>; 306 + reg = <0x40>; 307 + clocks = <&mipi_xclk>; 308 + clock-names = "xclk"; 309 + DOVDD-supply = <&reg_1p8v>; 310 + AVDD-supply = <&reg_2p8v>; 311 + DVDD-supply = <&reg_1p5v>; 312 + reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; /* NANDF_D5 */ 313 + powerdown-gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* NANDF_WP_B */ 314 + 315 + port { 316 + #address-cells = <1>; 317 + #size-cells = <0>; 318 + 319 + ov5640_to_mipi_csi2: endpoint { 320 + remote-endpoint = <&mipi_csi2_in>; 321 + clock-lanes = <0>; 322 + data-lanes = <1 2>; 323 + }; 324 + }; 325 + }; 326 + 327 + ov5642: camera@42 { 328 + compatible = "ovti,ov5642"; 329 + pinctrl-names = "default"; 330 + pinctrl-0 = <&pinctrl_ov5642>; 331 + clocks = <&clks IMX6QDL_CLK_CKO2>; 332 + clock-names = "xclk"; 333 + reg = <0x42>; 334 + reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; 335 + powerdown-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; 336 + gp-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; 337 + status = "disabled"; 338 + 339 + port { 340 + ov5642_to_ipu1_csi0_mux: endpoint { 341 + remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; 342 + bus-width = <8>; 343 + hsync-active = <1>; 344 + vsync-active = <1>; 345 + }; 346 + }; 347 + }; 355 348 }; 356 349 357 350 &i2c3 { ··· 512 411 >; 513 412 }; 514 413 414 + pinctrl_ipu1_csi0: ipu1csi0grp { 415 + fsl,pins = < 416 + MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 0x1b0b0 417 + MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 0x1b0b0 418 + MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 0x1b0b0 419 + MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 0x1b0b0 420 + MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 0x1b0b0 421 + MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 0x1b0b0 422 + MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 0x1b0b0 423 + MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19 0x1b0b0 424 + MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x1b0b0 425 + MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC 0x1b0b0 426 + MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC 0x1b0b0 427 + MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x1b0b0 428 + >; 429 + }; 430 + 515 431 pinctrl_j15: j15grp { 516 432 fsl,pins = < 517 433 MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10 ··· 559 441 MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x10 560 442 MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x10 561 443 MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x10 444 + >; 445 + }; 446 + 447 + pinctrl_ov5640: ov5640grp { 448 + fsl,pins = < 449 + MX6QDL_PAD_NANDF_D5__GPIO2_IO05 0x000b0 450 + MX6QDL_PAD_NANDF_WP_B__GPIO6_IO09 0x0b0b0 451 + >; 452 + }; 453 + 454 + pinctrl_ov5642: ov5642grp { 455 + fsl,pins = < 456 + MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x1b0b0 457 + MX6QDL_PAD_GPIO_6__GPIO1_IO06 0x1b0b0 458 + MX6QDL_PAD_GPIO_8__GPIO1_IO08 0x130b0 459 + MX6QDL_PAD_GPIO_3__CCM_CLKO2 0x000b0 562 460 >; 563 461 }; 564 462 ··· 731 597 cd-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; 732 598 vmmc-supply = <&reg_3p3v>; 733 599 status = "okay"; 600 + }; 601 + 602 + &mipi_csi { 603 + status = "okay"; 604 + 605 + port@0 { 606 + reg = <0>; 607 + 608 + mipi_csi2_in: endpoint { 609 + remote-endpoint = <&ov5640_to_mipi_csi2>; 610 + clock-lanes = <0>; 611 + data-lanes = <1 2>; 612 + }; 613 + }; 734 614 };