From 92806ecb85123081809707421401df2eeb9fd6c8 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 5 Apr 2023 22:53:23 +0100 Subject: [PATCH 1/2] 2023.04 GA --- ...rrect-constant-name-in-RAM-init-code.patch | 136 ------------------ sources | 2 +- uboot-tools.spec | 10 +- 3 files changed, 7 insertions(+), 141 deletions(-) delete mode 100644 rockchip-Fix-incorrect-constant-name-in-RAM-init-code.patch diff --git a/rockchip-Fix-incorrect-constant-name-in-RAM-init-code.patch b/rockchip-Fix-incorrect-constant-name-in-RAM-init-code.patch deleted file mode 100644 index 381105d..0000000 --- a/rockchip-Fix-incorrect-constant-name-in-RAM-init-code.patch +++ /dev/null @@ -1,136 +0,0 @@ -From patchwork Thu Mar 30 21:51:14 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: David Sebek -X-Patchwork-Id: 1763526 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de - (client-ip=85.214.62.61; helo=phobos.denx.de; - envelope-from=u-boot-bounces@lists.denx.de; receiver=) -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20210112 header.b=Ur2Foz7G; - dkim-atps=neutral -Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature ECDSA (P-384)) - (No client certificate requested) - by legolas.ozlabs.org (Postfix) with ESMTPS id 4PnccK6Hkyz1yY8 - for ; Fri, 31 Mar 2023 08:53:21 +1100 (AEDT) -Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) - by phobos.denx.de (Postfix) with ESMTP id 504A385F3F; - Thu, 30 Mar 2023 23:53:19 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de -Authentication-Results: phobos.denx.de; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ur2Foz7G"; - dkim-atps=neutral -Received: by phobos.denx.de (Postfix, from userid 109) - id D179285F40; Thu, 30 Mar 2023 23:52:42 +0200 (CEST) -X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de -X-Spam-Level: -X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, - DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, - SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 -Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com - [IPv6:2607:f8b0:4864:20::f36]) - (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) - (No client certificate requested) - by phobos.denx.de (Postfix) with ESMTPS id 2033985F3F - for ; Thu, 30 Mar 2023 23:52:38 +0200 (CEST) -Authentication-Results: phobos.denx.de; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: phobos.denx.de; - spf=pass smtp.mailfrom=dasebek@gmail.com -Received: by mail-qv1-xf36.google.com with SMTP id kr22so1200478qvb.5 - for ; Thu, 30 Mar 2023 14:52:38 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20210112; t=1680213157; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:from:to:cc:subject:date:message-id:reply-to; - bh=WlhaDeGiQSnfOs2/9s0KCU263BnBJ6NBdaytsU9sg7g=; - b=Ur2Foz7G2I7plUDBFoUSZnvUqm1qe6isgeZchzTJizjuyScb9aIr+l4Y7kNOOQGdc/ - i8jKZkeikuONySQd2OO0XRKZNsG/OFDotB5PuxnuzojmdEHLUeXPR4vVr2U7w1evC0FV - WsRdQjKNHExVuqC6pCdfDypiLeHxlI3xjzZAX1ZdZ3vL1HpjEdOz5F+LkX4/q2n+k8hQ - 6kj71uph8Vc1tfmdNLxaVOCuSLjBjtKSvwQwndqfZhp55MBSwZOBC7E79tzprByA+2jm - gPusk25eDFTS4KdF99vyViFflzZcdCOd/3aivHFm22w8656KQMnTYqdcg+FVhbWCvXMB - boWw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20210112; t=1680213157; - h=content-transfer-encoding:mime-version:message-id:date:subject:cc - :to:from:x-gm-message-state:from:to:cc:subject:date:message-id - :reply-to; - bh=WlhaDeGiQSnfOs2/9s0KCU263BnBJ6NBdaytsU9sg7g=; - b=ju+uXKxSg4L6GOqfy8tiSrBoKUIlAScW/CP1ukEGXtEXfQBiFwcqNzCc3Sj6j9Bdg1 - oLjqUkd0VXXt/hSpdFlSPOP8eqY9tHRLv8BJkRjlIuuCJDRNEAUUEeQhs9Q3EqltT1r7 - IPyM/TrkpuUWbr0PYVKQy2MUFTM1BK1UnqrJ9nKdQ21P+IbMhFz3LkTGbR0mIyW3aBws - Lafp9pABfuq4IomjoHD04o2f3M499dxlzmeSWM5VM4G6Jn/fDhvUZQhKU/vOdJVICUBM - eTp2laeeQo3dU45NqTZAuHRExqWvXVfhRPCOjVhv4NGd1ZhXTyJlw58Sq8t1kogMaZYZ - Ig8g== -X-Gm-Message-State: AAQBX9dHjWPG3k4IU3/uooZuMWlvPPp07Gf3iAuGftQx7/rI9tIH2/9E - 2RpZKACqRmNgqLHljBDY0Ikog6vfLUjUCQ== -X-Google-Smtp-Source: - AKy350ZwCjCcvTc/JU/KbyOydxFmq/ZQNkIyCK/MsKcufgGLOKBKj9hxPMBrRLLgXzD6BdzMNiAVSA== -X-Received: by 2002:ad4:5c6b:0:b0:5ce:7b40:8999 with SMTP id - i11-20020ad45c6b000000b005ce7b408999mr45081108qvh.22.1680213156729; - Thu, 30 Mar 2023 14:52:36 -0700 (PDT) -Received: from pc4.lan ([2605:a601:a620:5c00::d89]) - by smtp.gmail.com with ESMTPSA id - k5-20020a0cebc5000000b005dd8b9345d3sm129269qvq.107.2023.03.30.14.52.36 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Thu, 30 Mar 2023 14:52:36 -0700 (PDT) -From: David Sebek -To: u-boot@lists.denx.de -Cc: jagan@amarulasolutions.com, kever.yang@rock-chips.com, - David Sebek -Subject: [PATCH 1/1] rockchip: Fix incorrect constant name in RAM init code -Date: Thu, 30 Mar 2023 17:51:14 -0400 -Message-Id: <20230330215114.248481-1-dasebek@gmail.com> -X-Mailer: git-send-email 2.40.0 -MIME-Version: 1.0 -X-Mailman-Approved-At: Thu, 30 Mar 2023 23:53:17 +0200 -X-BeenThere: u-boot@lists.denx.de -X-Mailman-Version: 2.1.39 -Precedence: list -List-Id: U-Boot discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: u-boot-bounces@lists.denx.de -Sender: "U-Boot" -X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de -X-Virus-Status: Clean - -A condition in the rk3399 RAM initialization code used the old -CONFIG_RAM_RK3399_LPDDR4 constant name. This commit changes the -condition to use the correct CONFIG_RAM_ROCKCHIP_LPDDR4 constant. -Reviewed-by: Simon Glass ---- - drivers/ram/rockchip/sdram_rk3399.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c -index b1fea04e84..963a05c244 100644 ---- a/drivers/ram/rockchip/sdram_rk3399.c -+++ b/drivers/ram/rockchip/sdram_rk3399.c -@@ -2954,7 +2954,7 @@ static int sdram_init(struct dram_info *dram, - params->ch[ch].cap_info.rank = rank; - } - --#if defined(CONFIG_RAM_RK3399_LPDDR4) -+#if defined(CONFIG_RAM_ROCKCHIP_LPDDR4) - /* LPDDR4 needs to be trained at 400MHz */ - lpddr4_set_rate(dram, params, 0); - params->base.ddr_freq = dfs_cfgs_lpddr4[0].base.ddr_freq / MHz; diff --git a/sources b/sources index 154228d..6466983 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (u-boot-2023.04-rc5.tar.bz2) = e953585d3b59f53aec1e17179fe5c84cbc56d5a5150815aaf9b01a73dc6384a9cbe89e6848f8c4fd85c00bf61de4487018fa6df9411caff2f0c9a8a175a5dd28 +SHA512 (u-boot-2023.04.tar.bz2) = 31a44083af8084cd657c08233f485ff9503002bbaf95114c6135d483881fa14dc5a1b7ab42fd91f1fdd6b330556e76958d475280115018cb59c62b6ab4b508e6 diff --git a/uboot-tools.spec b/uboot-tools.spec index 42ac2eb..5169271 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,4 +1,4 @@ -%global candidate rc5 +#global candidate rc0 %if 0%{?rhel} %bcond_with toolsonly %else @@ -7,7 +7,7 @@ Name: uboot-tools Version: 2023.04 -Release: 0.4%{?candidate:.%{candidate}}%{?dist} +Release: 1%{?candidate:.%{candidate}}%{?dist} Summary: U-Boot utilities License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot @@ -25,7 +25,6 @@ Patch2: smbios-Simplify-reporting-of-unknown-values.patch # RPi - uses RPI firmware device tree for HAT support Patch3: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch # Rockchips improvements -Patch5: rockchip-Fix-incorrect-constant-name-in-RAM-init-code.patch Patch6: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch BuildRequires: bc @@ -99,7 +98,7 @@ do rk3328=(evb-rk3328 nanopi-r2s-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328) if [[ " ${rk3328[*]} " == *" $board "* ]]; then echo "Board: $board using rk3328" - cp /usr/share/arm-trusted-firmware/rk3328/* builds/$(echo $board)/ + cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31 fi rk3399=(evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399) if [[ " ${rk3399[*]} " == *" $board "* ]]; then @@ -211,6 +210,9 @@ cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand %endif %changelog +* Tue Apr 04 2023 Peter Robinson - 2023.04-1 +- Update to 2023.04 GA + * Tue Mar 28 2023 Peter Robinson - 2023.04-0.4.rc5 - Update to 2023.04 RC5 - Drop upstreamed patches From 7733014fef4351f4ab9b128ca847eb0f96620f92 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 11 Jun 2023 18:33:50 +0100 Subject: [PATCH 2/2] Fixes for the Pinephone Pro --- rockchip-PinePhone-Pro-fixes.patch | 127 +++++++++++++++++++++++++++++ uboot-tools.spec | 6 +- 2 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 rockchip-PinePhone-Pro-fixes.patch diff --git a/rockchip-PinePhone-Pro-fixes.patch b/rockchip-PinePhone-Pro-fixes.patch new file mode 100644 index 0000000..74d0bab --- /dev/null +++ b/rockchip-PinePhone-Pro-fixes.patch @@ -0,0 +1,127 @@ +From 671b2e758900f4a733d6840b2f39bc24dd63cfdb Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman +Date: Thu, 25 May 2023 14:18:17 +0200 +Subject: [PATCH] i2c: rockchip: De-initialize the bus after start bit failure + +Failure can happen when i2c is used without initializing pinctrl properly, +which U-Boot happily allows in SPL. Without this fix, further I2C access would +fail, even after proper pinctrl initialization. + +Signed-off-by: Ondrej Jirman +Cc: Heiko Schocher +Reviewed-by: Kever Yang +Reviewed-by: Heiko Schocher +--- + drivers/i2c/rk_i2c.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c +index f8fac45b6ca..9927af94a80 100644 +--- a/drivers/i2c/rk_i2c.c ++++ b/drivers/i2c/rk_i2c.c +@@ -342,7 +342,7 @@ static int rockchip_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, + int nmsgs) + { + struct rk_i2c *i2c = dev_get_priv(bus); +- int ret; ++ int ret = 0; + + debug("i2c_xfer: %d messages\n", nmsgs); + for (; nmsgs > 0; nmsgs--, msg++) { +@@ -356,14 +356,15 @@ static int rockchip_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, + } + if (ret) { + debug("i2c_write: error sending\n"); +- return -EREMOTEIO; ++ ret = -EREMOTEIO; ++ break; + } + } + + rk_i2c_send_stop_bit(i2c); + rk_i2c_disable(i2c); + +- return 0; ++ return ret; + } + + int rockchip_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) +-- +2.41.0 + +From 1af5e42f170d2c4b944beeb875b80ec7f061038a Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman +Date: Thu, 25 May 2023 15:27:08 +0200 +Subject: [PATCH] pinephone-pro: Fix I/O port voltage (GPIO3D4A is 1.8V) + +This fixes access to camera sensor over I2C during probe time in +the kernel. (Kernel will fix I/0 port voltage by itself, but the +timing depends on probe order of the drivers, so the fix can +come after the camera sensor driver already failed to probe.) + +Signed-off-by: Ondrej Jirman +Cc: Kever Yang +Reviewed-by: Kever Yang +--- + board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c b/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c +index eb639cd0d07..b6ccbb9c1c4 100644 +--- a/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c ++++ b/board/pine64/pinephone-pro-rk3399/pinephone-pro-rk3399.c +@@ -15,7 +15,8 @@ + #include + #include + +-#define GRF_IO_VSEL_BT565_SHIFT 0 ++#define GRF_IO_VSEL_BT565_GPIO2AB 1 ++#define GRF_IO_VSEL_AUDIO_GPIO3D4A 2 + #define PMUGRF_CON0_VSEL_SHIFT 8 + + #ifndef CONFIG_SPL_BUILD +@@ -48,7 +49,8 @@ static void setup_iodomain(void) + syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); + + /* BT565 is in 1.8v domain */ +- rk_setreg(&grf->io_vsel, 1 << GRF_IO_VSEL_BT565_SHIFT); ++ rk_setreg(&grf->io_vsel, ++ GRF_IO_VSEL_BT565_GPIO2AB | GRF_IO_VSEL_AUDIO_GPIO3D4A); + + /* Set GPIO1 1.8v/3.0v source select to PMU1830_VOL */ + rk_setreg(&pmugrf->soc_con0, 1 << PMUGRF_CON0_VSEL_SHIFT); +-- +2.41.0 + +From 6a7f8be74b44013513e51f5e7979dcc410ca2723 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 11 Jun 2023 18:13:19 +0100 +Subject: [PATCH] rockchip: Pinephone Pro: Add DDR RAM type config + +Add the RAM_ROCKCHIP_LPDDR4 to fix the Pinephone Pro booting. +When the configs were updated in 26f92be07e2 it somehow broke +the PPP boot process so let's fix it. + +Signed-off-by: Peter Robinson +CC: Jagan Teki +CC: Kever Yang + +--- + configs/pinephone-pro-rk3399_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configs/pinephone-pro-rk3399_defconfig b/configs/pinephone-pro-rk3399_defconfig +index 4edea88665f..e4a8beeb1ab 100644 +--- a/configs/pinephone-pro-rk3399_defconfig ++++ b/configs/pinephone-pro-rk3399_defconfig +@@ -73,6 +73,7 @@ CONFIG_PMIC_RK8XX=y + CONFIG_REGULATOR_PWM=y + CONFIG_REGULATOR_RK8XX=y + CONFIG_PWM_ROCKCHIP=y ++CONFIG_RAM_ROCKCHIP_LPDDR4=y + CONFIG_DM_RNG=y + CONFIG_RNG_ROCKCHIP=y + CONFIG_BAUDRATE=1500000 +-- +2.41.0 + diff --git a/uboot-tools.spec b/uboot-tools.spec index e754741..98eb8d8 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -7,7 +7,7 @@ Name: uboot-tools Version: 2023.04 -Release: 1%{?candidate:.%{candidate}}%{?dist} +Release: 2%{?candidate:.%{candidate}}%{?dist} Summary: U-Boot utilities License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot @@ -26,6 +26,7 @@ Patch2: smbios-Simplify-reporting-of-unknown-values.patch Patch3: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch # Rockchips improvements Patch6: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch +Patch7: rockchip-PinePhone-Pro-fixes.patch BuildRequires: bc BuildRequires: bison @@ -210,6 +211,9 @@ cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand %endif %changelog +* Sun Jun 11 2023 Peter Robinson - 2023.04-2 +- Fixes for the Pinephone Pro + * Tue Apr 04 2023 Peter Robinson - 2023.04-1 - Update to 2023.04 GA