1+ /dts-v1/;
2+ /plugin/;
3+
4+ #include <dt-bindings/clock/rk3588-cru.h>
5+ #include <dt-bindings/power/rk3588-power.h>
6+ #include <dt-bindings/gpio/gpio.h>
7+ #include <dt-bindings/pinctrl/rockchip.h>
8+
9+ / {
10+ compatible = "rockchip,rk3588";
11+
12+ fragment@0 {
13+ target = <&camera_pwdn_gpio>;
14+ __overlay__ {
15+ status = "okay";
16+ compatible = "regulator-fixed";
17+ regulator-name = "camera_pwdn_gpio";
18+ regulator-always-on;
19+ regulator-boot-on;
20+ enable-active-high;
21+ gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
22+ pinctrl-names = "default";
23+ pinctrl-0 = <&cam_pwdn_gpio>;
24+ };
25+ };
26+
27+ fragment@1 {
28+ target = <&clk_cam_24m>;
29+ __overlay__ {
30+ status = "okay";
31+ compatible = "fixed-clock";
32+ clock-frequency = <24000000>;
33+ clock-output-names = "clk_cam_24m";
34+ #clock-cells = <0>;
35+ };
36+ };
37+
38+ fragment@2 {
39+ target = <&i2c3>;
40+ __overlay__ {
41+ status = "okay";
42+
43+ imx415: imx415@1a {
44+ status = "okay";
45+ compatible = "sony,imx415";
46+ reg = <0x1a>;
47+ clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
48+ clock-names = "xvclk";
49+ pinctrl-names = "default";
50+ pinctrl-0 = <&mipim0_camera3_clk>;
51+ power-domains = <&power RK3588_PD_VI>;
52+ pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
53+ reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
54+ rockchip,camera-module-index = <0>;
55+ rockchip,camera-module-facing = "back";
56+ rockchip,camera-module-name = "CMK-OT2022-PX1";
57+ rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20";
58+ port {
59+ imx415_out0: endpoint {
60+ remote-endpoint = <&mipidphy0_in_ucam0>;
61+ data-lanes = <1 2 3 4>;
62+ };
63+ };
64+ };
65+
66+ camera_imx219: camera-imx219@10 {
67+ status = "disabled";
68+ compatible = "sony,imx219";
69+ reg = <0x10>;
70+ clocks = <&clk_cam_24m>;
71+ clock-names = "xvclk";
72+ rockchip,camera-module-index = <0>;
73+ rockchip,camera-module-facing = "back";
74+ rockchip,camera-module-name = "rpi-camera-v2";
75+ rockchip,camera-module-lens-name = "default";
76+ port {
77+ imx219_out0: endpoint {
78+ remote-endpoint = <&mipidphy0_in_ucam1>;
79+ data-lanes = <1 2>;
80+ };
81+ };
82+ };
83+ };
84+ };
85+
86+ fragment@3 {
87+ target = <&csi2_dphy0_hw>;
88+ __overlay__ {
89+ status = "okay";
90+ };
91+ };
92+
93+ fragment@4 {
94+ target = <&csi2_dphy0>;
95+ __overlay__ {
96+ status = "okay";
97+
98+ ports {
99+ #address-cells = <1>;
100+ #size-cells = <0>;
101+
102+ port@0 {
103+ reg = <0>;
104+ #address-cells = <1>;
105+ #size-cells = <0>;
106+
107+ mipidphy0_in_ucam0: endpoint@1 {
108+ reg = <1>;
109+ remote-endpoint = <&imx415_out0>;
110+ data-lanes = <1 2 3 4>;
111+ };
112+
113+ mipidphy0_in_ucam1: endpoint@2 {
114+ reg = <2>;
115+ remote-endpoint = <&imx219_out0>;
116+ data-lanes = <1 2>;
117+ };
118+ };
119+
120+ port@1 {
121+ reg = <1>;
122+ #address-cells = <1>;
123+ #size-cells = <0>;
124+
125+ csidphy0_out: endpoint@0 {
126+ reg = <0>;
127+ remote-endpoint = <&mipi2_csi2_input>;
128+ };
129+ };
130+ };
131+ };
132+ };
133+
134+ fragment@5 {
135+ target = <&mipi2_csi2>;
136+ __overlay__ {
137+ status = "okay";
138+
139+ ports {
140+ #address-cells = <1>;
141+ #size-cells = <0>;
142+
143+ port@0 {
144+ reg = <0>;
145+ #address-cells = <1>;
146+ #size-cells = <0>;
147+
148+ mipi2_csi2_input: endpoint@1 {
149+ reg = <1>;
150+ remote-endpoint = <&csidphy0_out>;
151+ };
152+ };
153+
154+ port@1 {
155+ reg = <1>;
156+ #address-cells = <1>;
157+ #size-cells = <0>;
158+
159+ mipi2_csi2_output: endpoint@0 {
160+ reg = <0>;
161+ remote-endpoint = <&cif_mipi2_in0>;
162+ };
163+ };
164+ };
165+ };
166+ };
167+
168+ fragment@6 {
169+ target = <&rkcif>;
170+ __overlay__ {
171+ status = "okay";
172+ };
173+ };
174+
175+ fragment@7 {
176+ target = <&rkcif_mipi_lvds2>;
177+ __overlay__ {
178+ status = "okay";
179+
180+ port {
181+ cif_mipi2_in0: endpoint {
182+ remote-endpoint = <&mipi2_csi2_output>;
183+ };
184+ };
185+ };
186+ };
187+
188+ fragment@8 {
189+ target = <&rkcif_mmu>;
190+ __overlay__ {
191+ status = "okay";
192+ };
193+ };
194+
195+ fragment@9 {
196+ target = <&rkisp0>;
197+ __overlay__ {
198+ status = "okay";
199+ };
200+ };
201+
202+ fragment@10 {
203+ target = <&isp0_mmu>;
204+ __overlay__ {
205+ status = "okay";
206+ };
207+ };
208+
209+ fragment@11 {
210+ target = <&rkisp0_vir0>;
211+ __overlay__ {
212+ status = "okay";
213+
214+ port {
215+ #address-cells = <1>;
216+ #size-cells = <0>;
217+
218+ isp0_vir0: endpoint@0 {
219+ reg = <0>;
220+ remote-endpoint = <&mipi_lvds2_sditf>;
221+ };
222+ };
223+ };
224+ };
225+
226+ fragment@12 {
227+ target = <&pinctrl>;
228+ __overlay__ {
229+ camera {
230+ cam_pwdn_gpio: cam-pwdn-gpio {
231+ rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
232+ };
233+ };
234+ };
235+ };
236+ };
0 commit comments