mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
Merge pull request #1530 from Gigahawk/tc358743-4-lane
raspberry-pi/4: support 4lane csi
This commit is contained in:
commit
ba6fab2976
1 changed files with 50 additions and 13 deletions
|
|
@ -13,6 +13,16 @@ in
|
|||
running ustreamer (which starts webservice providing a camera stream):
|
||||
''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
|
||||
'';
|
||||
lanes = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
2
|
||||
4
|
||||
];
|
||||
default = 2;
|
||||
description = ''
|
||||
Number of CSI lanes available
|
||||
'';
|
||||
};
|
||||
media-controller = lib.mkEnableOption ''
|
||||
Enable support for the Media Controller API.
|
||||
|
||||
|
|
@ -89,17 +99,31 @@ in
|
|||
fragment@2 {
|
||||
target = <0x03>;
|
||||
|
||||
__overlay__ {
|
||||
data-lanes = <0x01 0x02>;
|
||||
};
|
||||
${
|
||||
if cfg.lanes == 2 then
|
||||
''
|
||||
__overlay__ {
|
||||
data-lanes = <0x01 0x02>;
|
||||
};
|
||||
''
|
||||
else
|
||||
""
|
||||
}
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <0x03>;
|
||||
|
||||
__dormant__ {
|
||||
data-lanes = <0x01 0x02 0x03 0x04>;
|
||||
};
|
||||
${
|
||||
if cfg.lanes == 4 then
|
||||
''
|
||||
__overlay__ {
|
||||
data-lanes = <0x01 0x02 0x03 0x04>;
|
||||
};
|
||||
''
|
||||
else
|
||||
""
|
||||
}
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
|
|
@ -135,21 +159,34 @@ in
|
|||
fragment@7 {
|
||||
target = <0x02>;
|
||||
|
||||
__overlay__ {
|
||||
data-lanes = <0x01 0x02>;
|
||||
};
|
||||
${
|
||||
if cfg.lanes == 2 then
|
||||
''
|
||||
__overlay__ {
|
||||
data-lanes = <0x01 0x02>;
|
||||
};
|
||||
''
|
||||
else
|
||||
""
|
||||
}
|
||||
};
|
||||
|
||||
fragment@8 {
|
||||
target = <0x02>;
|
||||
|
||||
__dormant__ {
|
||||
data-lanes = <0x01 0x02 0x03 0x04>;
|
||||
};
|
||||
${
|
||||
if cfg.lanes == 4 then
|
||||
''
|
||||
__overlay__ {
|
||||
data-lanes = <0x01 0x02 0x03 0x04>;
|
||||
};
|
||||
''
|
||||
else
|
||||
""
|
||||
}
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
4lane = "\0\0\0\0-2+3-7+8";
|
||||
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];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue