From patchwork Mon Aug 26 14:45:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 30343 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C3FD427BBED; Mon, 26 Aug 2024 15:48:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1B2EE27BBE2 for ; Mon, 26 Aug 2024 15:48:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siazx-0004ei-O1; Mon, 26 Aug 2024 10:47:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1siazw-0004dO-5S for guix-patches@gnu.org; Mon, 26 Aug 2024 10:47:12 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1siazv-0005sq-RX for guix-patches@gnu.org; Mon, 26 Aug 2024 10:47:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=hOwE/rQcu+h0Smx9elWmH0EyYZjUMnF2XQF63Pv+ZBg=; b=tLENbRTVUuKHHMmlB73A5Zh6v4rC36ET1S+kR++Cpl5xSzL1RqLjRLxUuR34DuNPbkyOCe701bx12ESIVAROPd7H+aNhzxRA/zQLeqwznvmqtPbJaR6szaPtGGxI5uCbZO29aXPLFxQ6eFWIP9TOMUAYugQVZpLOyh6n1/16QW2pPBDXOqWj1VM3PdS5A6mg2mimk7RSn9n93UIzss80RPD33I9UAW/rGSunG62D7DjjNuzFDGCyhgnzAZjwGBzAZRX72//R9ElSsqI+eGyep02F5J2qKOim65pdBoiTcNro3xtbKn1AMdlut8eaXAAJLkHpa/U2sy/+UTmgj9IlhA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sib0k-0008B8-Ut for guix-patches@gnu.org; Mon, 26 Aug 2024 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70131] [PATCH v2 2/8] gnu: u-boot: Use DDR3 patch for Nano Pi R4S. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 26 Aug 2024 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70131 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70131@debbugs.gnu.org Received: via spool by 70131-submit@debbugs.gnu.org id=B70131.172468362931313 (code B ref 70131); Mon, 26 Aug 2024 14:48:02 +0000 Received: (at 70131) by debbugs.gnu.org; 26 Aug 2024 14:47:09 +0000 Received: from localhost ([127.0.0.1]:45047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siazs-00088y-7x for submit@debbugs.gnu.org; Mon, 26 Aug 2024 10:47:09 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:58375 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siazk-000871-C6 for 70131@debbugs.gnu.org; Mon, 26 Aug 2024 10:47:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1724683556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hOwE/rQcu+h0Smx9elWmH0EyYZjUMnF2XQF63Pv+ZBg=; b=dxOn4np7C3W26cKVR0qy12GFmv2v2Mp5Kh7tTJXLptgR7BsYQwyJLm0mcyTC38KAHphqlQ cL/6eXw5PG/gTOo4SxwU38Fat+tG0PzOckOvTsMljIdfg9VK84QjP2Sjd7u+DQsvIo0Im8 IyGAJgrHfD21L2eYzl5pPs1On7War+j+4XsiLpeovsIaX5jCPEKMNDX2y262OdrRB8wIkN /ZVQYhyRASb5BQpB2Z/N50HdgH6hV0GIak2HTqMRXP/x8yY2Wau+GRMqwnmPZyr59W+yLZ yegrbTs+rKAfG1rvCo5sYznPzwrRDyxxrdnrO9c/zYKRhEgGUupUItt+9ZoGgg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 4893b3e3 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70131@debbugs.gnu.org>; Mon, 26 Aug 2024 14:45:56 +0000 (UTC) Date: Mon, 26 Aug 2024 16:45:01 +0200 Message-ID: <20240826144511.3770-2-herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240826144511.3770-1-herman@rimm.ee> References: <20240826144511.3770-1-herman@rimm.ee> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 # Copyright © 2023 Bruno Victal # Copyright © 2023 gemmaro -# Copyright © 2023 Herman Rimm +# Copyright © 2023-2024 Herman Rimm # Copyright © 2023 Troy Figiel # Copyright © 2024 David Elsing # Copyright © 2024 Ashish SHUKLA @@ -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 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