hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/dts-v1/;
/plugin/;
 
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
 
 
/ {
   metadata {
       title = "Enable Raspberry Pi Camera v2";
       compatible = "radxa,zero3";
       category = "camera";
       exclusive = "csi2_dphy0";
       description = "Enable Raspberry Pi Camera v2.";
   };
 
   fragment@0 {
       target-path = "/";
 
       __overlay__ {
           clk_cam_24m: external-camera-clock-24m {
               status = "okay";
               compatible = "fixed-clock";
               clock-frequency = <24000000>;
               clock-output-names = "clk_cam_24m";
               #clock-cells = <0>;
           };
 
           camera_pwdn_gpio: camera-pwdn-gpio {
               status = "okay";
               compatible = "regulator-fixed";
               regulator-name = "camera_pwdn_gpio";
               regulator-always-on;
               regulator-boot-on;
               enable-active-high;
               gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
           };
       };
   };
 
   fragment@1 {
       target = <&i2c2>;
 
       __overlay__ {
           status = "okay";
           pinctrl-names = "default";
           pinctrl-0 = <&i2c2m1_xfer>;
           #address-cells = <1>;
           #size-cells = <0>;
 
           camera_imx219: camera-imx219@10 {
               status = "okay";
               compatible = "sony,imx219";
               reg = <0x10>;
               clocks = <&clk_cam_24m>;
               clock-names = "xvclk";
               rockchip,camera-module-index = <0>;
               rockchip,camera-module-facing = "back";
               rockchip,camera-module-name = "rpi-camera-v2";
               rockchip,camera-module-lens-name = "default";
 
               port {
                   ucam_out0: endpoint {
                       remote-endpoint = <&mipi_in_ucam0>;
                       data-lanes = <1 2>;
                   };
               };
           };
       };
   };
 
   fragment@2 {
       target = <&csi2_dphy_hw>;
 
       __overlay__ {
           status = "okay";
       };
   };
 
   fragment@3 {
       target = <&csi2_dphy0>;
 
       __overlay__ {
           status = "okay";
 
           ports {
               #address-cells = <1>;
               #size-cells = <0>;
 
               port@0 {
                   reg = <0>;
                   #address-cells = <1>;
                   #size-cells = <0>;
 
                   mipi_in_ucam0: endpoint@1 {
                       reg = <1>;
                       remote-endpoint = <&ucam_out0>;
                       data-lanes = <1 2>;
                   };
               };
 
               port@1 {
                   reg = <1>;
                   #address-cells = <1>;
                   #size-cells = <0>;
 
                   dphy0_out: endpoint@1 {
                       reg = <1>;
                       remote-endpoint = <&isp0_in>;
                   };
               };
           };
       };
   };
 
   fragment@4 {
       target = <&rkisp_vir0>;
 
       __overlay__ {
           status = "okay";
 
           port {
               #address-cells = <1>;
               #size-cells = <0>;
 
               isp0_in: endpoint@0 {
                   reg = <0>;
                   remote-endpoint = <&dphy0_out>;
               };
           };
       };
   };
 
   fragment@5 {
       target = <&rkisp>;
 
       __overlay__ {
           status = "okay";
       };
   };
 
   fragment@6 {
       target = <&rkisp_mmu>;
 
       __overlay__ {
           status = "okay";
       };
   };
 
   fragment@7 {
       target = <&rkcif_mmu>;
 
       __overlay__ {
           status = "okay";
       };
   };
 
   fragment@8 {
       target = <&rkcif>;
 
       __overlay__ {
           status = "okay";
       };
   };
};