From 6df7542f052fa2e1b3d5ed3240a3d56d14ddd1d9 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 30 May 2024 19:58:53 -0400 Subject: [PATCH 1/2] starfive visionfive2: let u-boot set device tree name u-boot is able to automatically set the correct device tree name on VisionFive 2 boards by reading their EEPROM since v2023.10. This allows our image to work with either revision of the boards. Reference: https://github.com/u-boot/u-boot/commit/16dbe3d9d45527f67d479535a22dc4054ae93e99 --- starfive/visionfive/v2/README.md | 6 ------ starfive/visionfive/v2/default.nix | 3 --- 2 files changed, 9 deletions(-) diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 6ec261213..1ab7918a3 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -56,12 +56,6 @@ 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: diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index c1042e1d5..973db4124 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -18,7 +18,4 @@ generic-extlinux-compatible.enable = lib.mkDefault true; }; }; - - hardware.deviceTree.name = - lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; } From 4f7ef41f0db453a0fa55f22566fef4dd61d4ce40 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 30 May 2024 20:10:18 -0400 Subject: [PATCH 2/2] starfive visionfive2: drop dtb overlay for 8GB version u-boot is able to automatically set the correct memory size in fdt on VisionFive 2 boards by reading their EEPROM since v2023.10. This allows our image to work with either variant of the boards. Reference: https://github.com/u-boot/u-boot/commit/38d900b409199df02a1a26dfcb464d4d2b6e27d2 Reference: https://github.com/u-boot/u-boot/commit/43177705ab29ed1ccca970096de1ef3c6095e7e6 --- starfive/visionfive/v2/8gb-patch.dts | 11 ----------- starfive/visionfive/v2/README.md | 13 ------------- 2 files changed, 24 deletions(-) delete mode 100644 starfive/visionfive/v2/8gb-patch.dts diff --git a/starfive/visionfive/v2/8gb-patch.dts b/starfive/visionfive/v2/8gb-patch.dts deleted file mode 100644 index 342dcba0c..000000000 --- a/starfive/visionfive/v2/8gb-patch.dts +++ /dev/null @@ -1,11 +0,0 @@ -/dts-v1/; -/plugin/; -/ { - compatible = "starfive,jh7110"; - fragment@0 { - target-path = "/memory@40000000"; - __overlay__ { - reg = <0x0 0x40000000 0x2 0x0>; - }; - }; -}; diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 1ab7918a3..6ceb59bb6 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -54,19 +54,6 @@ Build the sd image. nix build .# ``` -## Additional configuration -Additional configuration may be needed depending on your specific hardware configuration. - -### 8GB memory -If your board has 8GB of RAM add the following to your config: - -``` nix -hardware.deviceTree.overlays = [{ - name = "8GB-patch"; - dtsFile = "${nixos-hardware}/starfive/visionfive/v2/8gb-patch.dts"; -}]; -``` - # Updating the bootloader ## SD-Card Install the firmware update script