1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-27 05:19:43 +01:00
634: starfive visionfive2: replace 8GB memory patch with overlay r=Mic92 a=leifhelm



Co-authored-by: Jakob Leifhelm <jakob.leifhelm@gmail.com>
This commit is contained in:
bors[bot] 2023-05-24 03:29:39 +00:00 committed by GitHub
commit f6792e7c7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 18 deletions

View file

@ -31,10 +31,6 @@ Create and configure the `flake.nix` file:
# networking.interfaces.end0.useDHCP = true;
# networking.interfaces.end1.useDHCP = true;
# If you have the 2A variant uncomment the following line
# hardware.deviceTree.name =
# lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
# Additional configuration goes here
sdImage.compressImage = false;
@ -57,3 +53,33 @@ Build the sd image.
``` sh
nix build .#
```
## Additional configuration
Additional configuration may be needed depending on your specific hardware configuration.
### Board rev 1.2A
If you have the 1.2A board revision add the following to your config:
``` nix
hardware.deviceTree.name =
lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
```
### 8GB memory
If your board has 8GB of RAM add the following to your config:
#### Board rev 1.3B
``` nix
hardware.deviceTree.overlays = [{
name = "8GB-patch";
dtsFile =
"${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts";
}];
```
#### Board rev 1.2A
``` nix
hardware.deviceTree.overlays = [{
name = "8GB-patch";
dtsFile =
"${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts";
}];
```

View file

@ -1,13 +0,0 @@
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
index 752bb0b6fd00..93670da6cabd 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -30,7 +30,7 @@ cpus {
memory@40000000 {
device_type = "memory";
- reg = <0x0 0x40000000 0x1 0x0>;
+ reg = <0x0 0x40000000 0x2 0x0>;
};
thermal-zones {

View file

@ -15,7 +15,6 @@ let
inherit modDirVersion;
kernelPatches = [
{ patch = ./fix-memory-size.patch; }
{
patch = fetchpatch {
url =

View file

@ -0,0 +1,11 @@
/dts-v1/;
/plugin/;
/ {
compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110";
fragment@0 {
target-path = "/memory@40000000";
__overlay__ {
reg = <0x0 0x40000000 0x2 0x0>;
};
};
};

View file

@ -0,0 +1,11 @@
/dts-v1/;
/plugin/;
/ {
compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
fragment@0 {
target-path = "/memory@40000000";
__overlay__ {
reg = <0x0 0x40000000 0x2 0x0>;
};
};
};