mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-06 16:03:29 +01:00
raspberry-pi: avoid USB setup and serial-console pins in overlay examples
This commit is contained in:
1 parent
54987e6989
commit
428be44435
1 file changed
+12
-6
+12
-6
@@ -105,13 +105,18 @@ Filters nest the same way, and the leaf is an ordered list where each element na
|
|||||||
boot.loader.generic-extlinux-compatible.useGenerationDeviceTree = false;
|
boot.loader.generic-extlinux-compatible.useGenerationDeviceTree = false;
|
||||||
|
|
||||||
hardware.raspberry-pi.configtxt.deviceTreeOverlays.pi4 = [
|
hardware.raspberry-pi.configtxt.deviceTreeOverlays.pi4 = [
|
||||||
{ dwc2.dr_mode = "host"; }
|
|
||||||
{
|
{
|
||||||
gpio-fan = {
|
gpio-fan = {
|
||||||
gpiopin = 14;
|
gpiopin = 12;
|
||||||
temp = 80000;
|
temp = 80000;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
gpio-led = {
|
||||||
|
gpio = 16;
|
||||||
|
label = "status";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -121,13 +126,14 @@ This renders after `configtxt.settings` as:
|
|||||||
```ini
|
```ini
|
||||||
[all]
|
[all]
|
||||||
[pi4]
|
[pi4]
|
||||||
dtoverlay=dwc2
|
|
||||||
dtparam=dr_mode=host
|
|
||||||
dtoverlay=
|
|
||||||
dtoverlay=gpio-fan
|
dtoverlay=gpio-fan
|
||||||
dtparam=gpiopin=14
|
dtparam=gpiopin=12
|
||||||
dtparam=temp=80000
|
dtparam=temp=80000
|
||||||
dtoverlay=
|
dtoverlay=
|
||||||
|
dtoverlay=gpio-led
|
||||||
|
dtparam=gpio=16
|
||||||
|
dtparam=label=status
|
||||||
|
dtoverlay=
|
||||||
```
|
```
|
||||||
|
|
||||||
A separate option is necessary because `settings` groups values by key.
|
A separate option is necessary because `settings` groups values by key.
|
||||||
|
|||||||
Reference in new issue
Block a user