-
-
Save samueldr/f4894cd1597d61bbeee50ff242c3b271 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, ... }: | |
{ | |
hardware.deviceTree = { | |
filter = "bcm2711-rpi-*.dtb"; | |
overlays = [ | |
# Equivalent to: | |
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/cma-overlay.dts | |
{ | |
name = "rpi4-cma-overlay"; | |
dtsText = '' | |
// SPDX-License-Identifier: GPL-2.0 | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2711"; | |
fragment@0 { | |
target = <&cma>; | |
__overlay__ { | |
size = <(${toString 512 /* FIXME: option ? */} * 1024 * 1024)>; | |
}; | |
}; | |
}; | |
''; | |
} | |
# Equivalent to: | |
# https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts | |
{ | |
name = "rpi4-vc4-fkms-v3d-overlay"; | |
dtsText = '' | |
// SPDX-License-Identifier: GPL-2.0 | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2711"; | |
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"; | |
}; | |
}; | |
}; | |
''; | |
} | |
]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment