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
} ;
17
27
} ;
18
28
74
84
fragment@2 {
75
85
target = <0x03>;
76
86
77
- __overlay__ {
78
- data-lanes = <0x01 0x02>;
79
- };
87
+ ${
88
+ if cfg . lanes == 2 then
89
+ ''
90
+ __overlay__ {
91
+ data-lanes = <0x01 0x02>;
92
+ };
93
+ ''
94
+ else
95
+ ""
96
+ }
80
97
};
81
98
82
99
fragment@3 {
83
100
target = <0x03>;
84
101
85
- __dormant__ {
86
- data-lanes = <0x01 0x02 0x03 0x04>;
87
- };
102
+ ${
103
+ if cfg . lanes == 4 then
104
+ ''
105
+ __overlay__ {
106
+ data-lanes = <0x01 0x02 0x03 0x04>;
107
+ };
108
+ ''
109
+ else
110
+ ""
111
+ }
88
112
};
89
113
90
114
fragment@4 {
120
144
fragment@7 {
121
145
target = <0x02>;
122
146
123
- __overlay__ {
124
- data-lanes = <0x01 0x02>;
125
- };
147
+ ${
148
+ if cfg . lanes == 2 then
149
+ ''
150
+ __overlay__ {
151
+ data-lanes = <0x01 0x02>;
152
+ };
153
+ ''
154
+ else
155
+ ""
156
+ }
126
157
};
127
158
128
159
fragment@8 {
129
160
target = <0x02>;
130
161
131
- __dormant__ {
132
- data-lanes = <0x01 0x02 0x03 0x04>;
133
- };
162
+ ${
163
+ if cfg . lanes == 4 then
164
+ ''
165
+ __overlay__ {
166
+ data-lanes = <0x01 0x02 0x03 0x04>;
167
+ };
168
+ ''
169
+ else
170
+ ""
171
+ }
134
172
};
135
173
136
174
__overrides__ {
137
- 4lane = "\0\0\0\0-2+3-7+8";
138
175
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];
139
176
};
140
177
You can’t perform that action at this time.
0 commit comments