mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19:42 +01:00
rpi4: bluetooth fix
This commit is contained in:
parent
5ca7d128e6
commit
f17f79c796
2 changed files with 45 additions and 0 deletions
44
raspberry-pi/4/bluetooth.nix
Normal file
44
raspberry-pi/4/bluetooth.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.hardware.raspberry-pi."4".bluetooth;
|
||||
in
|
||||
{
|
||||
options.hardware = {
|
||||
raspberry-pi."4".bluetooth = {
|
||||
enable = lib.mkEnableOption ''
|
||||
configuration for bluetooth
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
||||
# doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts
|
||||
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
||||
|
||||
hardware.deviceTree = {
|
||||
overlays = [
|
||||
{
|
||||
name = "bluetooth-overlay";
|
||||
dtsText = ''
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&uart0_pins>;
|
||||
__overlay__ {
|
||||
brcm,pins = <30 31 32 33>;
|
||||
brcm,pull = <2 0 0 2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
imports = [
|
||||
./audio.nix
|
||||
./backlight.nix
|
||||
./bluetooth.nix
|
||||
./cpu-revision.nix
|
||||
./digi-amp-plus.nix
|
||||
./dwc2.nix
|
||||
|
|
Loading…
Reference in a new issue