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 1313 running ustreamer (which starts webservice providing a camera stream):
1414 '' ${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
1515 '' ;
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+ } ;
1626 } ;
1727 } ;
1828
7484 fragment@2 {
7585 target = <0x03>;
7686
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+ }
8097 };
8198
8299 fragment@3 {
83100 target = <0x03>;
84101
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+ }
88112 };
89113
90114 fragment@4 {
120144 fragment@7 {
121145 target = <0x02>;
122146
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+ }
126157 };
127158
128159 fragment@8 {
129160 target = <0x02>;
130161
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+ }
134172 };
135173
136174 __overrides__ {
137- 4lane = "\0\0\0\0-2+3-7+8";
138175 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];
139176 };
140177
You can’t perform that action at this time.
0 commit comments