4a906716fbe4ad17046d96a53d1a99db44198d9a
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / imx296-overlay.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 // Definitions for IMX296 camera module on VC I2C bus
3 /dts-v1/;
4 /plugin/;
5
6 #include <dt-bindings/gpio/gpio.h>
7
8 /{
9         compatible = "brcm,bcm2835";
10
11         fragment@0 {
12                 target = <&i2c0if>;
13                 __overlay__ {
14                         status = "okay";
15                 };
16         };
17
18         clk_frag: fragment@1 {
19                 target = <&cam1_clk>;
20                 clk_over: __overlay__ {
21                         status = "okay";
22                         clock-frequency = <54000000>;
23                 };
24         };
25
26         fragment@2 {
27                 target = <&i2c0mux>;
28                 __overlay__ {
29                         status = "okay";
30                 };
31         };
32
33         reg_frag: fragment@5 {
34                 target = <&cam1_reg>;
35                 cam_reg: __overlay__ {
36                         startup-delay-us = <500000>;
37                 };
38         };
39
40         i2c_frag: fragment@100 {
41                 target = <&i2c_csi_dsi>;
42                 __overlay__ {
43                         #address-cells = <1>;
44                         #size-cells = <0>;
45                         status = "okay";
46
47                         imx296: imx296@1a {
48                                 compatible = "sony,imx296";
49                                 reg = <0x1a>;
50                                 status = "okay";
51
52                                 clocks = <&cam1_clk>;
53                                 clock-names = "inck";
54
55                                 avdd-supply = <&cam1_reg>;      /* 3.3v */
56                                 dvdd-supply = <&cam_dummy_reg>; /* 1.8v */
57                                 ovdd-supply = <&cam_dummy_reg>; /* 1.2v */
58
59                                 rotation = <180>;
60                                 orientation = <2>;
61
62                                 port {
63                                         imx296_0: endpoint {
64                                                 remote-endpoint = <&csi_ep>;
65                                                 clock-lanes = <0>;
66                                                 data-lanes = <1>;
67                                                 clock-noncontinuous;
68                                                 link-frequencies =
69                                                         /bits/ 64 <594000000>;
70                                         };
71                                 };
72                         };
73                 };
74         };
75
76         csi_frag: fragment@101 {
77                 target = <&csi1>;
78                 csi: __overlay__ {
79                         status = "okay";
80                         brcm,media-controller;
81
82                         port {
83                                 csi_ep: endpoint {
84                                         remote-endpoint = <&imx296_0>;
85                                         clock-lanes = <0>;
86                                         data-lanes = <1>;
87                                         clock-noncontinuous;
88                                 };
89                         };
90                 };
91         };
92
93         __overrides__ {
94                 rotation = <&imx296>,"rotation:0";
95                 orientation = <&imx296>,"orientation:0";
96                 media-controller = <&csi>,"brcm,media-controller?";
97                 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
98                        <&csi_frag>, "target:0=",<&csi0>,
99                        <&clk_frag>, "target:0=",<&cam0_clk>,
100                        <&imx296>, "clocks:0=",<&cam0_clk>,
101                        <&imx296>, "VANA-supply:0=",<&cam0_reg>;
102                 clock-frequency = <&clk_over>, "clock-frequency:0";
103         };
104 };