overlays: Add "always-on" parameter to imx477 and imx296
[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         reg_alwayson_frag: fragment@99 {
41                 target = <&cam1_reg>;
42                 __dormant__ {
43                         regulator-always-on;
44                 };
45         };
46
47         i2c_frag: fragment@100 {
48                 target = <&i2c_csi_dsi>;
49                 __overlay__ {
50                         #address-cells = <1>;
51                         #size-cells = <0>;
52                         status = "okay";
53
54                         imx296: imx296@1a {
55                                 compatible = "sony,imx296";
56                                 reg = <0x1a>;
57                                 status = "okay";
58
59                                 clocks = <&cam1_clk>;
60                                 clock-names = "inck";
61
62                                 avdd-supply = <&cam1_reg>;      /* 3.3v */
63                                 dvdd-supply = <&cam_dummy_reg>; /* 1.8v */
64                                 ovdd-supply = <&cam_dummy_reg>; /* 1.2v */
65
66                                 rotation = <180>;
67                                 orientation = <2>;
68
69                                 port {
70                                         imx296_0: endpoint {
71                                                 remote-endpoint = <&csi_ep>;
72                                                 clock-lanes = <0>;
73                                                 data-lanes = <1>;
74                                                 clock-noncontinuous;
75                                                 link-frequencies =
76                                                         /bits/ 64 <594000000>;
77                                         };
78                                 };
79                         };
80                 };
81         };
82
83         csi_frag: fragment@101 {
84                 target = <&csi1>;
85                 csi: __overlay__ {
86                         status = "okay";
87                         brcm,media-controller;
88
89                         port {
90                                 csi_ep: endpoint {
91                                         remote-endpoint = <&imx296_0>;
92                                         clock-lanes = <0>;
93                                         data-lanes = <1>;
94                                         clock-noncontinuous;
95                                 };
96                         };
97                 };
98         };
99
100         __overrides__ {
101                 rotation = <&imx296>,"rotation:0";
102                 orientation = <&imx296>,"orientation:0";
103                 media-controller = <&csi>,"brcm,media-controller?";
104                 cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
105                        <&csi_frag>, "target:0=",<&csi0>,
106                        <&clk_frag>, "target:0=",<&cam0_clk>,
107                        <&reg_frag>, "target:0=",<&cam0_reg>,
108                        <&reg_alwayson_frag>, "target:0=",<&cam0_reg>,
109                        <&imx296>, "clocks:0=",<&cam0_clk>,
110                        <&imx296>, "avdd-supply:0=",<&cam0_reg>;
111                 clock-frequency = <&clk_over>, "clock-frequency:0";
112                 always-on = <0>, "+99";
113         };
114 };