File tree Expand file tree Collapse file tree 1 file changed +50
-13
lines changed Expand file tree Collapse file tree 1 file changed +50
-13
lines changed Original file line number Diff line number Diff line change 13
13
running ustreamer (which starts webservice providing a camera stream):
14
14
'' ${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
15
15
'' ;
16
+ lanes = lib . mkOption {
17
+ type = lib . types . enum [
18
+ 2
19
+ 4
20
+ ] ;
21
+ default = 2 ;
22
+ description = ''
23
+ Number of CSI lanes available
24
+ '' ;
25
+ } ;
16
26
media-controller = lib . mkEnableOption ''
17
27
Enable support for the Media Controller API.
18
28
89
99
fragment@2 {
90
100
target = <0x03>;
91
101
92
- __overlay__ {
93
- data-lanes = <0x01 0x02>;
94
- };
102
+ ${
103
+ if cfg . lanes == 2 then
104
+ ''
105
+ __overlay__ {
106
+ data-lanes = <0x01 0x02>;
107
+ };
108
+ ''
109
+ else
110
+ ""
111
+ }
95
112
};
96
113
97
114
fragment@3 {
98
115
target = <0x03>;
99
116
100
- __dormant__ {
101
- data-lanes = <0x01 0x02 0x03 0x04>;
102
- };
117
+ ${
118
+ if cfg . lanes == 4 then
119
+ ''
120
+ __overlay__ {
121
+ data-lanes = <0x01 0x02 0x03 0x04>;
122
+ };
123
+ ''
124
+ else
125
+ ""
126
+ }
103
127
};
104
128
105
129
fragment@4 {
135
159
fragment@7 {
136
160
target = <0x02>;
137
161
138
- __overlay__ {
139
- data-lanes = <0x01 0x02>;
140
- };
162
+ ${
163
+ if cfg . lanes == 2 then
164
+ ''
165
+ __overlay__ {
166
+ data-lanes = <0x01 0x02>;
167
+ };
168
+ ''
169
+ else
170
+ ""
171
+ }
141
172
};
142
173
143
174
fragment@8 {
144
175
target = <0x02>;
145
176
146
- __dormant__ {
147
- data-lanes = <0x01 0x02 0x03 0x04>;
148
- };
177
+ ${
178
+ if cfg . lanes == 4 then
179
+ ''
180
+ __overlay__ {
181
+ data-lanes = <0x01 0x02 0x03 0x04>;
182
+ };
183
+ ''
184
+ else
185
+ ""
186
+ }
149
187
};
150
188
151
189
__overrides__ {
152
- 4lane = "\0\0\0\0-2+3-7+8";
153
190
link-frequency = [00 00 00 03 6c 69 6e 6b 2d 66 72 65 71 75 65 6e 63 69 65 73 23 30 00];
154
191
};
155
192
You can’t perform that action at this time.
0 commit comments