From patchwork Mon Mar 31 18:19:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 41087 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 72DD127BBE9; Mon, 31 Mar 2025 19:21:37 +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_DNSWL_BLOCKED, 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 8C18027BBE2 for ; Mon, 31 Mar 2025 19:21:35 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzJl0-0002lT-DM; Mon, 31 Mar 2025 14:21:11 -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 1tzJks-0002l1-Qq for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:03 -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 1tzJks-0006oc-Gz for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:02 -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=PlgkJOPOsAuUfxD6hJq6unz+k1qP9YIkxa4vnx18lTQ=; b=B6wfjho0xdKGVfV+vvfdvVGhOY0KRRIrJiMM3MmssdY/WUp7LMy9bVn9BmJ9iNUPlfUmG/Qy3tWL4ibt7MkeV+he9zcYEXMgcyGdM4oJRHpT98/22p/mQeA2ykULvSylmGPXfoFhYerzRAMR44/0GBZiks5nqTZylKLvkGVclFGl55e1vrFc6z+GWWMGuoUgcCWe4Q2x/sV6TBQpDWGlFJO6uMxsOztAgfo74i1sho5fkh6uTJk3QHFLTvuHoEjBGDwN20IvdfTvVAD468+whG21sylCIDzeELH+tmPFbFpwUr3+amMo6B+EHzUKtcSNUIbmuQFD8FOUZr8MQIWDPA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzJks-0003Io-CZ for guix-patches@gnu.org; Mon, 31 Mar 2025 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72987] [PATCH v4 1/3] gnu: bootloader: Add nanopi-r4s-rk3399-ddr3 bootloader. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72987 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72987@debbugs.gnu.org Received: via spool by 72987-submit@debbugs.gnu.org id=B72987.174344524712561 (code B ref 72987); Mon, 31 Mar 2025 18:21:02 +0000 Received: (at 72987) by debbugs.gnu.org; 31 Mar 2025 18:20:47 +0000 Received: from localhost ([127.0.0.1]:42798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzJkc-0003GV-9M for submit@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:46 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:42135 helo=email.rimm.ee) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzJkN-0003DN-Gq for 72987@debbugs.gnu.org; Mon, 31 Mar 2025 14:20:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1743445219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PlgkJOPOsAuUfxD6hJq6unz+k1qP9YIkxa4vnx18lTQ=; b=LKJB6qU7WlmFISGdAcLUN964L0NP+jjjbc/d+oBy/8gGO15d74Ih/RGOejWvwySiVlKJBp CkbN61oP7uLuk0ND5i1HzoLLW6wigr/IIzTw1DwvJaOAURuCitGT8oObt+PEYlN3KEfGt3 0NbbFBv4VBrKf7DawoEhHtmhoKbsJcuLVwpLV4QhQY7sp5IFvWAgWsN3NQsdlEXAl9Gz1H v7wrYl1KqzbZA9gFZLko79/NNNz8p1vCpMmp11MlKS5eWTKB2wz2GUOGZorLji72GSrcgm /RyIBk9hMxIyU7PR/7PGwCNkRr7j39D9vfjNThDWJdMZ7zFgAyIYhQ7//TrngQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 1df0c2d8 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <72987@debbugs.gnu.org>; Mon, 31 Mar 2025 18:20:19 +0000 (UTC) Date: Mon, 31 Mar 2025 20:19:25 +0200 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: 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/bootloader/u-boot.scm (u-boot-nanopi-r4s-rk3399-ddr3-bootloader): Add variable. * gnu/packages/bootloaders.scm (u-boot-nanopi-r4s-rk3399-ddr3): Add variable. * gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register patch. Change-Id: I6d4cb098727fe4027aea33a39c59d34000dfc4db --- gnu/bootloader/u-boot.scm | 6 ++++ gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 10 ++++++ .../patches/u-boot-nanopi-r4s-ddr3.patch | 33 +++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 64fb319f50f..a7c73093bd6 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -38,6 +38,7 @@ (define-module (gnu bootloader u-boot) u-boot-cubietruck-bootloader u-boot-firefly-rk3399-bootloader u-boot-mx6cuboxi-bootloader + u-boot-nanopi-r4s-rk3399-ddr3-bootloader u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader u-boot-orangepi-r1-plus-lts-rk3328-bootloader @@ -221,6 +222,11 @@ (define u-boot-novena-bootloader (inherit u-boot-imx-bootloader) (package u-boot-novena))) +(define u-boot-nanopi-r4s-rk3399-ddr3-bootloader + (bootloader + (inherit u-boot-rockchip-bootloader) + (package u-boot-nanopi-r4s-rk3399-ddr3))) + (define u-boot-orangepi-r1-plus-lts-rk3328-bootloader (bootloader (inherit u-boot-rockchip-bootloader) diff --git a/gnu/local.mk b/gnu/local.mk index f03fcb14fcc..955b8fb1ddf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2342,6 +2342,7 @@ dist_patch_DATA = \ %D%/packages/patches/u-boot-allow-disabling-openssl.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 8ece61f11c3..1953222ae12 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1303,6 +1303,16 @@ (define-public u-boot-novena version, contrary to Novena upstream, does not load u-boot.img from the first partition.")) +(define-public u-boot-nanopi-r4s-rk3399-ddr3 + (let ((base (make-u-boot-rockchip-package "nanopi-r4s" 'rk3399))) + (package + (inherit base) + (source + (origin + (inherit (package-source base)) + (patches (cons (search-patch "u-boot-nanopi-r4s-ddr3.patch") + (origin-patches (package-source base))))))))) + (define-public u-boot-orangepi-r1-plus-lts-rk3328 (make-u-boot-rockchip-package "orangepi-r1-plus-lts" 'rk3328)) 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 00000000000..435ffd55546 --- /dev/null +++ b/gnu/packages/patches/u-boot-nanopi-r4s-ddr3.patch @@ -0,0 +1,33 @@ +From: Herman Rimm +Date: Sun, 2 Jul 2023 13:43:18 +0200 +Subject: [PATCH] Configure the Nano Pi R4S with DDR3. + +--- +This patch should be removed once something like this is upstream: +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 69800cc368d..a3054849f88 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 ada04b46cb1..b39e350bbed 100644 +--- a/configs/nanopi-r4s-rk3399_defconfig ++++ b/configs/nanopi-r4s-rk3399_defconfig +@@ -48,7 +48,6 @@ CONFIG_PMIC_RK8XX=y + CONFIG_SPL_DM_REGULATOR_FIXED=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