unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Herman Rimm via Guix-patches via <guix-patches@gnu.org>
To: 70131@debbugs.gnu.org
Subject: [bug#70131] [PATCH v2 2/8] gnu: u-boot: Use DDR3 patch for Nano Pi R4S.
Date: Mon, 26 Aug 2024 16:45:01 +0200	[thread overview]
Message-ID: <20240826144511.3770-2-herman@rimm.ee> (raw)
In-Reply-To: <20240826144511.3770-1-herman@rimm.ee>

* gnu/packages/bootloaders.scm (%u-boot-nanopi-r4s-ddr3-patch): Add
variable.
(u-boot)[source]: Use patch.
* gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch: Add file.
* gnu/local.mk (dist_patch_DATA): Register patch.

Change-Id: Ibbf952f2806c9cac7fc29e1264d427bf6ee67d01
---
 gnu/local.mk                                  |  3 +-
 gnu/packages/bootloaders.scm                  |  7 +++-
 .../patches/u-boot-nanopi-r4s-ddr3.patch      | 35 +++++++++++++++++++
 3 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 11dff1c6c4..93cd03fbd7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -62,7 +62,7 @@
 # Copyright © 2023 B. Wilson <elaexuotee@wilsonb.com>
 # Copyright © 2023 Bruno Victal <mirai@makinata.eu>
 # Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
-# Copyright © 2023 Herman Rimm <herman@rimm.ee>
+# Copyright © 2023-2024 Herman Rimm <herman@rimm.ee>
 # Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
 # Copyright © 2024 David Elsing <david.elsing@posteo.net>
 # Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
@@ -2168,6 +2168,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/u-boot-build-without-libcrypto.patch	\
   %D%/packages/patches/u-boot-nintendo-nes-serial.patch		\
   %D%/packages/patches/u-boot-rockchip-inno-usb.patch		\
+  %D%/packages/patches/u-boot-nanopi-r4s-ddr3.patch		\
   %D%/packages/patches/ucx-tcp-iface-ioctl.patch		\
   %D%/packages/patches/ultrastar-deluxe-no-freesans.patch		\
   %D%/packages/patches/ungoogled-chromium-extension-search-path.patch	\
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index f42d42c1c4..1036c62de3 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -747,6 +747,10 @@ (define %u-boot-build-without-libcrypto-patch
   ;; Upstream commit to fix Amlogic builds in u-boot 2024.01.
   (search-patch "u-boot-build-without-libcrypto.patch"))
 
+(define %u-boot-nanopi-r4s-ddr3-patch
+  ;; Use DDR3 instead of LPDDR4 for the Nano Pi R4S U-boot.
+  (search-patch "u-boot-nanopi-r4s-ddr3.patch"))
+
 (define u-boot
   (package
     (name "u-boot")
@@ -755,7 +759,8 @@ (define u-boot
               (patches
                (list %u-boot-rockchip-inno-usb-patch
                      %u-boot-build-without-libcrypto-patch
-                     %u-boot-allow-disabling-openssl-patch))
+                     %u-boot-allow-disabling-openssl-patch
+                     %u-boot-nanopi-r4s-ddr3-patch))
               (method url-fetch)
               (uri (string-append
                     "https://ftp.denx.de/pub/u-boot/"
diff --git a/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch
new file mode 100644
index 0000000000..38825bbd1b
--- /dev/null
+++ b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch
@@ -0,0 +1,35 @@
+Someone created a thread on the U-Boot mailing list [1], referencing work
+done to support variants of RK3399 SoCs with different types of DRAM [2].
+This patch configures the Nano Pi R4S to use DDR3 instead of LPDDR4, but
+will be removed once [2] is included in a future U-Boot release.  This
+patch was created around April 2023 by Herman Rimm <herman@rimm.ee> for
+personal use and has only been submitted to GNU Guix.
+
+[1]: https://patchwork.ozlabs.org/project/uboot/patch/WwCslkoi6ts6A8RCd6KlxuRAMpItkfneEG-3BbNbG61gWVz0A2A3-0hl_Jg7W9quLr19luuiiT7naEi7djncCaEruUOnVq3pnb9dQFU_GqY=@protonmail.com/#2973664
+[2]: https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/commit/9d836044340ddef53f5d9f1946ac48c946a78284
+
+diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
+index 69800cc368..a3054849f8 100644
+--- a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
++++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
+@@ -13,7 +13,7 @@
+  */
+ 
+ #include "rk3399-nanopi4-u-boot.dtsi"
+-#include "rk3399-sdram-lpddr4-100.dtsi"
++#include "rk3399-sdram-ddr3-1866.dtsi"
+ 
+ / {
+ 	smbios {
+diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig
+index 4f4363cb0f..bfa7ee628d 100644
+--- a/configs/nanopi-r4s-rk3399_defconfig
++++ b/configs/nanopi-r4s-rk3399_defconfig
+@@ -54,7 +54,6 @@ CONFIG_PMIC_RK8XX=y
+ CONFIG_REGULATOR_PWM=y
+ CONFIG_REGULATOR_RK8XX=y
+ CONFIG_PWM_ROCKCHIP=y
+-CONFIG_RAM_ROCKCHIP_LPDDR4=y
+ CONFIG_BAUDRATE=1500000
+ CONFIG_DEBUG_UART_SHIFT=2
+ CONFIG_SYS_NS16550_MEM32=y
-- 
2.45.2





  reply	other threads:[~2024-08-26 14:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 20:20 [bug#70131] [PATCH 0/5] Add bootloaders and update U-Boot Herman Rimm via Guix-patches via
2024-04-01 20:22 ` [bug#70131] [PATCH 1/5] gnu: bootloader: Add nanopi-r4s-rk3399 bootloader Herman Rimm via Guix-patches via
2024-04-01 20:22 ` [bug#70131] [PATCH 2/5] gnu: u-boot: Use DDR3 patch for Nano Pi R4S Herman Rimm via Guix-patches via
2024-04-01 20:22 ` [bug#70131] [PATCH 3/5] gnu: firmware: Update make-arm-trusted-firmware to 2.10 Herman Rimm via Guix-patches via
2024-04-01 20:22 ` [bug#70131] [PATCH 4/5] gnu: u-boot: Update to 2024.04-rc5 Herman Rimm via Guix-patches via
2024-04-01 20:22 ` [bug#70131] [PATCH 5/5] gnu: bootloader: Add orangepi-zero2w bootloader Herman Rimm via Guix-patches via
2024-05-09  5:35 ` [bug#70131] [PATCH 0/5] Update U-boot Herman Rimm via Guix-patches via
2024-05-09  5:35   ` [bug#70131] [PATCH 1/5] gnu: bootloader: Add nanopi-r4s-rk3399 bootloader Herman Rimm via Guix-patches via
2024-05-09  5:35   ` [bug#70131] [PATCH 2/5] gnu: u-boot: Use DDR3 patch for Nano Pi R4S Herman Rimm via Guix-patches via
2024-05-15 18:16     ` Vagrant Cascadian
2024-05-09  5:35   ` [bug#70131] [PATCH 3/5] gnu: firmware: Update make-arm-trusted-firmware to 2.10 Herman Rimm via Guix-patches via
2024-05-09  5:35   ` [bug#70131] [PATCH 4/5] gnu: u-boot: Update to 2024.04 Herman Rimm via Guix-patches via
2024-05-09  5:35   ` [bug#70131] [PATCH 5/5] gnu: bootloader: Add orangepi-zero2w bootloader Herman Rimm via Guix-patches via
2024-05-15 20:26   ` [bug#70131] [PATCH 0/5] Update U-boot Vagrant Cascadian
2024-05-16  7:28     ` Herman Rimm via Guix-patches via
2024-05-16 15:56       ` Vagrant Cascadian
2024-08-26 14:45 ` [bug#70131] [PATCH v2 1/8] gnu: bootloader: Add nanopi-r4s-rk3399 bootloader Herman Rimm via Guix-patches via
2024-08-26 14:45   ` Herman Rimm via Guix-patches via [this message]
2024-08-26 14:45   ` [bug#70131] [PATCH v2 3/8] gnu: firmware: Update make-arm-trusted-firmware to 2.10 Herman Rimm via Guix-patches via
2024-08-26 14:45   ` [bug#70131] [PATCH v2 4/8] gnu: u-boot: Update to 2024.07 Herman Rimm via Guix-patches via
2024-08-26 14:45   ` [bug#70131] [PATCH v2 5/8] gnu: python-u-boot-pylib: Fix pyproject.toml Herman Rimm via Guix-patches via
2024-08-26 14:45   ` [bug#70131] [PATCH v2 6/8] gnu: u-boot-rockpro64-rk3399: Unconfigure CONFIG_DM_SCSI Herman Rimm via Guix-patches via
2024-08-26 14:45   ` [bug#70131] [PATCH v2 7/8] gnu: u-boot-sandbox: Unconfigure CONFIG_RSA and CONFIG_TOOLS_LIBCRYPTO Herman Rimm via Guix-patches via
2024-08-26 14:45   ` [bug#70131] [PATCH v2 8/8] gnu: bootloader: Add orangepi-zero2w bootloader Herman Rimm via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240826144511.3770-2-herman@rimm.ee \
    --to=guix-patches@gnu.org \
    --cc=70131@debbugs.gnu.org \
    --cc=herman@rimm.ee \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).