mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
raspberrypi/4: fix many option rendering
This commit is contained in:
parent
3441b5242a
commit
eb9e8e10ac
14 changed files with 74 additions and 75 deletions
|
|
@ -11,9 +11,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".audio = {
|
raspberry-pi."4".audio = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "configuration for audio";
|
||||||
configuration for audio
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".backlight = {
|
raspberry-pi."4".backlight = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "the backlight support for the Raspberry Pi official Touch Display";
|
||||||
Enable the backlight support for the Raspberry Pi official Touch Display
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".bluetooth = {
|
raspberry-pi."4".bluetooth = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "configuration for bluetooth";
|
||||||
configuration for bluetooth
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,13 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".digi-amp-plus = {
|
raspberry-pi."4".digi-amp-plus = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the IQaudIO DigiAMP+ Hat";
|
||||||
support for the IQaudIO DigiAMP+ Hat.
|
|
||||||
'';
|
|
||||||
|
|
||||||
unmuteAmp = lib.mkOption {
|
unmuteAmp = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
"one-shot" unmute when kernel module first loads.
|
Whether to "one-shot" unmute when kernel module first loads.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".dwc2 = {
|
raspberry-pi."4".dwc2 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
Enable the UDC controller to support USB OTG gadget functions.
|
Enable the UDC controller to support USB OTG gadget functions.
|
||||||
|
|
||||||
In order to verify that this works, connect the Raspberry Pi with
|
In order to verify that this works, connect the Raspberry Pi with
|
||||||
|
|
@ -24,6 +28,7 @@ in
|
||||||
guides on how to test them, please refer to:
|
guides on how to test them, please refer to:
|
||||||
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
|
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
dr_mode = lib.mkOption {
|
dr_mode = lib.mkOption {
|
||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
"host"
|
"host"
|
||||||
|
|
|
||||||
|
|
@ -31,28 +31,32 @@ in
|
||||||
{
|
{
|
||||||
options.hardware.raspberry-pi."4" = {
|
options.hardware.raspberry-pi."4" = {
|
||||||
i2c0 = {
|
i2c0 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group.
|
Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group.
|
||||||
After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c.
|
After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
frequency = lib.mkOption {
|
frequency = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.int;
|
type = lib.types.nullOr lib.types.int;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
interface clock-frequency
|
The interface clock-frequency to configure.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
i2c1 = {
|
i2c1 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group.
|
Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group.
|
||||||
After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c.
|
After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
frequency = lib.mkOption {
|
frequency = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.int;
|
type = lib.types.nullOr lib.types.int;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
interface clock-frequency
|
The interface clock-frequency to configure.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,14 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".apply-overlays-dtmerge = {
|
raspberry-pi."4".apply-overlays-dtmerge = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
|
description = ''
|
||||||
this can resolve issues with applying dtbs for the pi.
|
Whether replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
|
||||||
|
This can resolve issues with applying dtbs for the pi.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
nixpkgs.overlays = [ dt_ao_overlay ];
|
nixpkgs.overlays = [ dt_ao_overlay ];
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".poe-hat = {
|
raspberry-pi."4".poe-hat = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the Raspberry Pi POE Hat";
|
||||||
support for the Raspberry Pi POE Hat.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".poe-plus-hat = {
|
raspberry-pi."4".poe-plus-hat = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the Raspberry Pi PoE+ HAT";
|
||||||
support for the Raspberry Pi PoE+ HAT.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".pwm0 = {
|
raspberry-pi."4".pwm0 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the hardware pwm0 channel on GPIO_18";
|
||||||
Enable support for the hardware pwm0 channel on GPIO_18
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,15 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".tc358743 = {
|
raspberry-pi."4".tc358743 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter.
|
Enable support for the Toshiba TC358743 HDMI-to-CSI-2 converter.
|
||||||
|
|
||||||
This can be tested with a plugged in converter device and for example
|
This can be tested with a plugged in converter device and for example
|
||||||
running ustreamer (which starts webservice providing a camera stream):
|
running ustreamer (which starts webservice providing a camera stream):
|
||||||
''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
|
''${pkgs.ustreamer}/bin/ustreamer --persistent --dv-timings
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
lanes = lib.mkOption {
|
lanes = lib.mkOption {
|
||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
2
|
2
|
||||||
|
|
@ -23,13 +25,15 @@ in
|
||||||
Number of CSI lanes available
|
Number of CSI lanes available
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
media-controller = lib.mkEnableOption ''
|
media-controller = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
Enable support for the Media Controller API.
|
Enable support for the Media Controller API.
|
||||||
|
|
||||||
See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details
|
See https://forums.raspberrypi.com/viewtopic.php?t=322076 for details
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".touch-ft5406 = {
|
raspberry-pi."4".touch-ft5406 = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "" // {
|
||||||
|
description = ''
|
||||||
Enable the touch controller of the official Raspberry Pi touch diplay.
|
Enable the touch controller of the official Raspberry Pi touch diplay.
|
||||||
|
|
||||||
The overlay is taken from the official Raspberry Pi Linux fork, and
|
The overlay is taken from the official Raspberry Pi Linux fork, and
|
||||||
|
|
@ -18,6 +19,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
hardware.deviceTree = {
|
hardware.deviceTree = {
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".tv-hat = {
|
raspberry-pi."4".tv-hat = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "support for the Raspberry Pi TV Hat";
|
||||||
support for the Raspberry Pi TV Hat.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,7 @@ in
|
||||||
{
|
{
|
||||||
options.hardware = {
|
options.hardware = {
|
||||||
raspberry-pi."4".xhci = {
|
raspberry-pi."4".xhci = {
|
||||||
enable = lib.mkEnableOption ''
|
enable = lib.mkEnableOption "builtin XHCI controller for USB with otg_mode=1 in config.txt";
|
||||||
Enable builtin XHCI controller for USB with otg_mode=1 in config.txt
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue