NixOS on ARM/PINE A64-LTS: Difference between revisions

imported>Samueldr
mNo edit summary
imported>Hypnotize75
No edit summary
Line 153: Line 153:
}
}
</syntaxhighlight>
</syntaxhighlight>
=== Clusterboard Ethernet ===
It appears that Ethernet with the [https://www.pine64.org/clusterboard/ pine64 clusterboard] requires [https://forum.pine64.org/showthread.php?tid=10432 a slightly modified device tree to work].  There's some conflicting information about exactly what is needed to get Ethernet working but currently, mainline linux (5.4.58 at the time of testing) plus a modified device tree is sufficient to get a full speed 1gbps connection.
First create the device tree overlay.
<pre>
/* sopine-baseboard-ethernet.dts */
/dts-v1/;
/ {
model = "SoPine with baseboard";
compatible = "pine64,sopine-baseboard\0pine64,sopine\0allwinner,sun50i-a64";
fragment@0 {
target-path = "/soc/ethernet@1c30000";
__overlay__ {
allwinner,tx-delay-ps = <500>;
};
};
};
</pre>
Create the device tree binary from that.
<pre>
dtc -O dtb -o sopine-baseboard-ethernet.dtbo -b 0 sopine-baseboard-ethernet.dts
</pre>
And add it to your configuration.nix
<pre>
...
  hardware.deviceTree.enable = true;
  hardware.deviceTree.overlays = [
    "${/path/to/sopine-baseboard-ethernet.dtbo}"
  ];
...
</pre>


== SPI NOR flash ==
== SPI NOR flash ==