hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
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
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
 *
 */
 
/ {
   vcc_mipicsi0: vcc-mipicsi0-regulator {
       compatible = "regulator-fixed";
       gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
       pinctrl-names = "default";
       pinctrl-0 = <&mipicsi0_pwr>;
       regulator-name = "vcc_mipicsi0";
       enable-active-high;
       regulator-always-on;
       regulator-boot-on;
   };
};
 
&csi2_dphy0 {
   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 = <&n4_out>;
               data-lanes = <1 2 3 4>;
           };
       };
       port@1 {
           reg = <1>;
           #address-cells = <1>;
           #size-cells = <0>;
 
           csidphy0_out: endpoint@0 {
               reg = <0>;
               remote-endpoint = <&mipi0_csi2_input>;
           };
       };
   };
};
 
&i2c4 {
   status = "okay";
 
   jaguar1: jaguar1@30 {
       compatible = "jaguar1-v4l2";
       status = "okay";
       reg = <0x30>;
       clocks = <&cru CLK_CAM0_OUT2IO>;
       clock-names = "xvclk";
       pinctrl-names = "default";
       pinctrl-0 = <&camm0_clk0_out>;
       pd-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
       rst-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
       rockchip,camera-module-index = <0>;
       rockchip,camera-module-facing = "back";
       rockchip,camera-module-name = "jaguar1";
       rockchip,camera-module-lens-name = "jaguar1";
       rockchip,default_rect= <1920 1080>; // default resolution
       port {
           n4_out: endpoint {
               remote-endpoint = <&mipi_in_ucam0>;
               data-lanes = <1 2 3 4>;
           };
       };
   };
};
 
&csi2_dphy0_hw {
   status = "okay";
};
 
&mipi0_csi2 {
   status = "okay";
 
   ports {
       #address-cells = <1>;
       #size-cells = <0>;
 
       port@0 {
           reg = <0>;
           #address-cells = <1>;
           #size-cells = <0>;
 
           mipi0_csi2_input: endpoint@1 {
               reg = <1>;
               remote-endpoint = <&csidphy0_out>;
           };
       };
 
       port@1 {
           reg = <1>;
           #address-cells = <1>;
           #size-cells = <0>;
 
           mipi0_csi2_output: endpoint@0 {
               reg = <0>;
               remote-endpoint = <&cif_mipi_in0>;
           };
       };
   };
};
 
&rkcif {
   status = "okay";
   rockchip,android-usb-camerahal-enable;
};
 
&rkcif_mipi_lvds {
   status = "okay";
 
   port {
       cif_mipi_in0: endpoint {
           remote-endpoint = <&mipi0_csi2_output>;
       };
   };
};
 
&rkcif_mmu {
   status = "okay";
};
 
&pinctrl {
   cam {
       mipicsi0_pwr: mipicsi0-pwr {
           rockchip,pins =
               /* camera power en */
               <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
       };
   };
};