fakeKMS for PI4
This commit is contained in:
parent
e205a56dfb
commit
a07c7d961d
@ -9,6 +9,7 @@
|
||||
./dtb-cpi-i2c1.nix
|
||||
./dtb-cpi-bluetooth.nix
|
||||
./dtb-vc4-kms-v3d.nix
|
||||
./dtb-vc4-fkms-v3d.nix
|
||||
./dtb-cpi-spi4.nix
|
||||
./dtb-rpi4-disable-pwrled.nix
|
||||
];
|
||||
|
30
raspberry-pi/overlays/dtb-vc4-fkms-v3d.nix
Normal file
30
raspberry-pi/overlays/dtb-vc4-fkms-v3d.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkMerge mkOption types;
|
||||
cfg = config.hardware.raspberry-pi."4".overlays.vc4-fkms-v3d;
|
||||
in {
|
||||
options.hardware.raspberry-pi."4".overlays.vc4-fkms-v3d = {
|
||||
enable = mkEnableOption ''overlay enable'';
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "vc4-fkms-v3d";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
hardware.deviceTree = {
|
||||
overlays = [
|
||||
{
|
||||
name = "${cfg.name}";
|
||||
filter = "bcm2711-rpi-*.dtb";
|
||||
dtsFile = ./source/vc4-fkms-v3d.dts;
|
||||
}
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
69
raspberry-pi/overlays/source/vc4-fkms-v3d.dts
Normal file
69
raspberry-pi/overlays/source/vc4-fkms-v3d.dts
Normal file
@ -0,0 +1,69 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
&frag0 {
|
||||
size = <((512-4)*1024*1024)>;
|
||||
};
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&cma>;
|
||||
frag0: __overlay__ {
|
||||
/*
|
||||
* The default size when using this overlay is 256 MB
|
||||
* and should be kept as is for backwards
|
||||
* compatibility.
|
||||
*/
|
||||
size = <0x10000000>;
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&fb>;
|
||||
__overlay__ {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&firmwarekms>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&v3d>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&vc4>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@5 {
|
||||
target-path = "/chosen";
|
||||
__overlay__ {
|
||||
bootargs = "clk_ignore_unused";
|
||||
};
|
||||
};
|
||||
__overrides__ {
|
||||
cma-512 = <&frag0>,"size:0=",<0x20000000>;
|
||||
cma-448 = <&frag0>,"size:0=",<0x1c000000>;
|
||||
cma-384 = <&frag0>,"size:0=",<0x18000000>;
|
||||
cma-320 = <&frag0>,"size:0=",<0x14000000>;
|
||||
cma-256 = <&frag0>,"size:0=",<0x10000000>;
|
||||
cma-192 = <&frag0>,"size:0=",<0xC000000>;
|
||||
cma-128 = <&frag0>,"size:0=",<0x8000000>;
|
||||
cma-96 = <&frag0>,"size:0=",<0x6000000>;
|
||||
cma-64 = <&frag0>,"size:0=",<0x4000000>;
|
||||
cma-size = <&frag0>,"size:0"; /* in bytes, 4MB aligned */
|
||||
cma-default = <0>,"-0";
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user