* [PR PATCH] PinebookPro U-Boot 2022.04
@ 2022-05-27 19:30 CameronNemo
2022-05-28 23:10 ` Piraty
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: CameronNemo @ 2022-05-27 19:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
There is a new pull request by CameronNemo against master on the void-packages repository
https://github.com/CameronNemo/void-packages pbp-uboot
https://github.com/void-linux/void-packages/pull/37313
PinebookPro U-Boot 2022.04
- atf-rk3399-bl31: update to 2.6
- pinebookpro-uboot: update to 2022.04
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64 (cross)
A patch file from https://github.com/void-linux/void-packages/pull/37313.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pbp-uboot-37313.patch --]
[-- Type: text/x-diff, Size: 12606 bytes --]
From 3c002bee6e6ab4840e90655fef4cca5e6d4bc0ef Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Fri, 23 Jul 2021 17:16:49 -0700
Subject: [PATCH 1/2] atf-rk3399-bl31: update to 2.6
---
srcpkgs/atf-rk3399-bl31/template | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/atf-rk3399-bl31/template b/srcpkgs/atf-rk3399-bl31/template
index 9eb9330fbae1..234d1b3febb1 100644
--- a/srcpkgs/atf-rk3399-bl31/template
+++ b/srcpkgs/atf-rk3399-bl31/template
@@ -1,6 +1,6 @@
# Template file for 'atf-rk3399-bl31'
pkgname=atf-rk3399-bl31
-version=2.4
+version=2.6
revision=1
archs="aarch64*"
wrksrc="trusted-firmware-a-${version}"
@@ -10,9 +10,15 @@ maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="BSD-3-Clause"
homepage="https://developer.trustedfirmware.org/dashboard/view/6/"
distfiles="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-${version}.tar.gz"
-checksum=bf3eb3617a74cddd7fb0e0eacbfe38c3258ee07d4c8ed730deef7a175cc3d55b
+checksum=4e59f02ccb042d5d18c89c849701b96e6cf4b788709564405354b5d313d173f7
nostrip=yes
+post_patch() {
+ # Adjust the baud rate to match uboot and the kernel for the PBP
+ vsed -i -e 's/\(RK3399_BAUDRATE\s*\)115200/\11500000/' \
+ plat/rockchip/rk3399/rk3399_def.h
+}
+
do_build() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
if [ "$CROSS_BUILD" ]; then
From 15f9606c27dae44649882102cee8bbf26a2c0d1c Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Fri, 23 Jul 2021 17:17:14 -0700
Subject: [PATCH 2/2] pinebookpro-uboot: update to 2022.04
---
...mc-sdhci-allow-disabling-sdma-in-spl.patch | 70 +++++++++++++++++++
.../patches/no-delay-autoboot.patch | 12 ++--
.../patches/rk3399-power-led.patch | 54 +++++++-------
.../patches/sdcard-boot.patch | 39 -----------
srcpkgs/pinebookpro-uboot/template | 6 +-
5 files changed, 107 insertions(+), 74 deletions(-)
create mode 100644 srcpkgs/pinebookpro-uboot/patches/0004-mmc-sdhci-allow-disabling-sdma-in-spl.patch
delete mode 100644 srcpkgs/pinebookpro-uboot/patches/sdcard-boot.patch
diff --git a/srcpkgs/pinebookpro-uboot/patches/0004-mmc-sdhci-allow-disabling-sdma-in-spl.patch b/srcpkgs/pinebookpro-uboot/patches/0004-mmc-sdhci-allow-disabling-sdma-in-spl.patch
new file mode 100644
index 000000000000..a25014fe7244
--- /dev/null
+++ b/srcpkgs/pinebookpro-uboot/patches/0004-mmc-sdhci-allow-disabling-sdma-in-spl.patch
@@ -0,0 +1,70 @@
+Source: https://lore.kernel.org/u-boot/20220222013131.3114990-3-pgwipeout@gmail.com/
+Upstream: no
+
+From: Peter Geis <pgwipeout@gmail.com>
+To: Peng Fan <peng.fan@nxp.com>, Jaehoon Chung <jh80.chung@samsung.com>
+Cc: Peter Geis <pgwipeout@gmail.com>, u-boot@lists.denx.de
+Subject: [PATCH v1 02/11] mmc: sdhci: allow disabling sdma in spl
+Date: Mon, 21 Feb 2022 20:31:21 -0500
+
+Rockchip emmc devices have a similar issue to Rockchip dwmmc devices,
+where performing dma to sram causes errors with suspend/resume.
+Allow us to toggle sdma in spl for sdhci similar to adma support, so we
+can ensure dma is not used when loading the sram code.
+
+Signed-off-by: Peter Geis <pgwipeout@gmail.com>
+Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
+---
+ drivers/mmc/Kconfig | 7 +++++++
+ drivers/mmc/sdhci.c | 6 +++---
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
+index f04cc44e1973..1e4342285ce7 100644
+--- a/drivers/mmc/Kconfig
++++ b/drivers/mmc/Kconfig
+@@ -468,6 +468,13 @@ config MMC_SDHCI_SDMA
+ This enables support for the SDMA (Single Operation DMA) defined
+ in the SD Host Controller Standard Specification Version 1.00 .
+
++config SPL_MMC_SDHCI_SDMA
++ bool "Support SDHCI SDMA in SPL"
++ depends on MMC_SDHCI
++ help
++ This enables support for the SDMA (Single Operation DMA) defined
++ in the SD Host Controller Standard Specification Version 1.00 in SPL.
++
+ config MMC_SDHCI_ADMA
+ bool "Support SDHCI ADMA2"
+ depends on MMC_SDHCI
+diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
+index 766e4a6b0c5e..6285e53d12a2 100644
+--- a/drivers/mmc/sdhci.c
++++ b/drivers/mmc/sdhci.c
+@@ -70,7 +70,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host, struct mmc_data *data)
+ }
+ }
+
+-#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
++#if (CONFIG_IS_ENABLED(MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
+ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
+ int *is_aligned, int trans_bytes)
+ {
+@@ -177,7 +177,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)
+ }
+ } while (!(stat & SDHCI_INT_DATA_END));
+
+-#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
++#if (CONFIG_IS_ENABLED(MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
+ dma_unmap_single(host->start_addr, data->blocks * data->blocksize,
+ mmc_get_dma_dir(data));
+ #endif
+@@ -836,7 +836,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
+ #endif
+ debug("%s, caps: 0x%x\n", __func__, caps);
+
+-#ifdef CONFIG_MMC_SDHCI_SDMA
++#if CONFIG_IS_ENABLED(MMC_SDHCI_SDMA)
+ if ((caps & SDHCI_CAN_DO_SDMA)) {
+ host->flags |= USE_SDMA;
+ } else {
diff --git a/srcpkgs/pinebookpro-uboot/patches/no-delay-autoboot.patch b/srcpkgs/pinebookpro-uboot/patches/no-delay-autoboot.patch
index 1b2420a1029f..092a8686d901 100644
--- a/srcpkgs/pinebookpro-uboot/patches/no-delay-autoboot.patch
+++ b/srcpkgs/pinebookpro-uboot/patches/no-delay-autoboot.patch
@@ -1,3 +1,5 @@
+Upstream: no
+
commit e061f5477ee8e8d14267c4ab98dd451d7ce137be
Author: Cameron Nemo <cnemo@tutanota.com>
Date: Mon Sep 7 09:14:07 2020 -0700
@@ -13,16 +15,16 @@ diff --git configs/pinebook-pro-rk3399_defconfig configs/pinebook-pro-rk3399_def
index 9a7487b04f..e9605a0ffd 100644
--- a/configs/pinebook-pro-rk3399_defconfig
+++ b/configs/pinebook-pro-rk3399_defconfig
-@@ -11,7 +11,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
- CONFIG_SPL_SPI_SUPPORT=y
- CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinebook-pro"
+@@ -13,7 +13,7 @@
+ CONFIG_SPL_SPI=y
CONFIG_DEBUG_UART=y
+ CONFIG_SYS_LOAD_ADDR=0x800800
-CONFIG_BOOTDELAY=3
+CONFIG_BOOTDELAY=0
CONFIG_USE_PREBOOT=y
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
- CONFIG_MISC_INIT_R=y
-@@ -87,3 +87,7 @@ CONFIG_VIDEO_ROCKCHIP=y
+ CONFIG_DISPLAY_BOARDINFO_LATE=y
+@@ -93,3 +93,7 @@
CONFIG_DISPLAY_ROCKCHIP_EDP=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/srcpkgs/pinebookpro-uboot/patches/rk3399-power-led.patch b/srcpkgs/pinebookpro-uboot/patches/rk3399-power-led.patch
index f3c08bf33c61..83348b6f84fd 100644
--- a/srcpkgs/pinebookpro-uboot/patches/rk3399-power-led.patch
+++ b/srcpkgs/pinebookpro-uboot/patches/rk3399-power-led.patch
@@ -1,44 +1,44 @@
-From 1a01021c9361c4e017cb5b032300f5555c393710 Mon Sep 17 00:00:00 2001
-From: dhivael <dhivael.git@eno.space>
-Date: Sat, 11 Jan 2020 15:04:46 +0100
-Subject: rk3399: light pinebook power and standby leds during early boot
+Source: https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro/-/raw/master/0003-Turn-power-and-standby-LEDs-on-early.patch
+Upstream: no
-this is a hack, but it works for now.
+From 354d4f9072b5c41e91d70d1569ba364603889868 Mon Sep 17 00:00:00 2001
+From: Dragan Simic <dragan.simic@gmail.com>
+Date: Fri, 22 Apr 2022 03:51:56 +0200
+Subject: [PATCH] Turn power and standby LEDs on early
+
+Temporary (and ugly) hack to turn the Pinebook Pro's RGB status
+LED on as early as possible during boot.
+
+Based on a patch created by dhivael <dhivael.git@eno.space>.
---
- arch/arm/mach-rockchip/rk3399/rk3399.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
+ arch/arm/mach-rockchip/rk3399/rk3399.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
-index 863024d071..cf37129d55 100644
+index 01a05599cd..58b5cd1ce7 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
-@@ -15,6 +15,8 @@
- #include <asm/arch-rockchip/grf_rk3399.h>
+@@ -20,6 +20,7 @@
#include <asm/arch-rockchip/hardware.h>
+ #include <linux/bitops.h>
#include <power/regulator.h>
-+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
DECLARE_GLOBAL_DATA_PTR;
-@@ -115,8 +117,8 @@ void board_debug_uart_init(void)
- struct rk3399_grf_regs * const grf = (void *)GRF_BASE;
- #ifdef CONFIG_TARGET_CHROMEBOOK_BOB
- struct rk3399_pmugrf_regs * const pmugrf = (void *)PMUGRF_BASE;
-- struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
- #endif
-+ struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
-
- #if defined(CONFIG_DEBUG_UART_BASE) && (CONFIG_DEBUG_UART_BASE == 0xff180000)
- /* Enable early UART0 on the RK3399 */
-@@ -149,6 +151,14 @@ void board_debug_uart_init(void)
- spl_gpio_set_pull(&pmugrf->gpio0_p, GPIO(BANK_B, 4), GPIO_PULL_NORMAL);
- #endif /* CONFIG_TARGET_CHROMEBOOK_BOB */
+@@ -157,6 +158,19 @@ void board_debug_uart_init(void)
+ GPIO_PULL_NORMAL);
+ }
+ {
-+ // set GPIO0_A2/B3 to GPIO_ACTIVE_HIGH
-+ // set GPIO0_A2/B3 to OUTPUT
++ /*
++ * Temporary (and ugly) hack to turn the Pinebook Pro's
++ * RGB status LED on as early as possible during boot:
++ * - Set GPIO0_A2/B3 to GPIO_ACTIVE_HIGH
++ * - Set GPIO0_A2/B3 to OUTPUT
++ */
+ int mask = (1UL << RK_PA2) | (1UL << RK_PB3);
++
+ setbits_le32(&gpio->swport_dr, mask);
+ setbits_le32(&gpio->swport_ddr, mask);
+ }
@@ -47,5 +47,5 @@ index 863024d071..cf37129d55 100644
rk_clrsetreg(&grf->gpio4c_iomux,
GRF_GPIO4C3_SEL_MASK,
--
-cgit v1.2.3
+2.33.1
diff --git a/srcpkgs/pinebookpro-uboot/patches/sdcard-boot.patch b/srcpkgs/pinebookpro-uboot/patches/sdcard-boot.patch
deleted file mode 100644
index 27f6a5b704d9..000000000000
--- a/srcpkgs/pinebookpro-uboot/patches/sdcard-boot.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-commit 265376282a58c71f1ec9215653e98c602524b91c
-Author: Cameron Nemo <cnemo@tutanota.com>
-Date: Mon Sep 7 08:37:24 2020 -0700
-
- rockchip: Pinebook Pro: fix mmc boot ordering
-
- On the Pinebook Pro, and perhaps some other boards, the mmc indices are
- opposite from what is implied by the comment in
- include/configs/rockchip-common.h.
-
- This commit fixes the boot ordering to prioritize the SD card over eMMC.
-
- Most distributions of U-Boot that actually target rk3399 boards apply a
- similar patch, such as Manjaro (shipped by default on PBP) and armbian.
-
- https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro/-/blob/60ed56b9bf8809309ec6252bfc45bca38c2b858a/0002-Correct-boot-order-to-be-USB-SD-eMMC.patch
- https://github.com/armbian/build/blob/5a2b2c360b9c26ca4bd0d309af7cd3994fd08b7d/patch/u-boot/u-boot-rockchip64-mainline/general-prioritize-sd.patch
-
- Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
-
-diff --git include/configs/pinebook-pro-rk3399.h include/configs/pinebook-pro-rk3399.h
-index d478b19917..59780bfb0b 100644
---- a/include/configs/pinebook-pro-rk3399.h
-+++ b/include/configs/pinebook-pro-rk3399.h
-@@ -14,6 +14,14 @@
-
- #include <configs/rk3399_common.h>
-
-+/* On Pinebook Pro, mmc1 is SD and mmc0 is eMMC */
-+#if CONFIG_IS_ENABLED(CMD_MMC)
-+ #undef BOOT_TARGET_MMC
-+ #define BOOT_TARGET_MMC(func) \
-+ func(MMC, mmc, 1) \
-+ func(MMC, mmc, 0)
-+#endif
-+
- #define SDRAM_BANK_SIZE (2UL << 30)
-
- #define CONFIG_USB_OHCI_NEW
diff --git a/srcpkgs/pinebookpro-uboot/template b/srcpkgs/pinebookpro-uboot/template
index db629c4a8e53..38f4c39ff163 100644
--- a/srcpkgs/pinebookpro-uboot/template
+++ b/srcpkgs/pinebookpro-uboot/template
@@ -1,11 +1,11 @@
# Template file for 'pinebookpro-uboot'
pkgname=pinebookpro-uboot
reverts="20200212_1 20200212_2"
-version=2020.10
+version=2022.04
revision=1
archs="aarch64*"
wrksrc="u-boot-${version}"
-hostmakedepends="flex bc dtc python3"
+hostmakedepends="flex bc dtc python3 openssl-devel"
makedepends="atf-rk3399-bl31"
depends="u-boot-tools"
short_desc="U-Boot for Pinebook Pro"
@@ -13,7 +13,7 @@ maintainer="Renato Aguiar <renato@renatoaguiar.net>"
license="GPL-2.0-only, BSD-3-Clause"
homepage="https://www.denx.de/wiki/U-Boot/"
distfiles="https://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
-checksum=0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622
+checksum=68e065413926778e276ec3abd28bb32fa82abaa4a6898d570c1f48fbdb08bcd0
do_configure() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PinebookPro U-Boot 2022.04
2022-05-27 19:30 [PR PATCH] PinebookPro U-Boot 2022.04 CameronNemo
@ 2022-05-28 23:10 ` Piraty
2022-05-29 1:51 ` CameronNemo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Piraty @ 2022-05-28 23:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New comment by Piraty on void-packages repository
https://github.com/void-linux/void-packages/pull/37313#issuecomment-1140341648
Comment:
@renatoaguiar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PinebookPro U-Boot 2022.04
2022-05-27 19:30 [PR PATCH] PinebookPro U-Boot 2022.04 CameronNemo
2022-05-28 23:10 ` Piraty
@ 2022-05-29 1:51 ` CameronNemo
2022-06-14 16:01 ` sgn
2022-06-14 16:05 ` [PR PATCH] [Merged]: " sgn
3 siblings, 0 replies; 5+ messages in thread
From: CameronNemo @ 2022-05-29 1:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/37313#issuecomment-1140356742
Comment:
@Piraty he has not been active in over a year, I would not expect a response. https://github.com/void-linux/void-packages/pulls?q=author%3Arenatoaguiar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PinebookPro U-Boot 2022.04
2022-05-27 19:30 [PR PATCH] PinebookPro U-Boot 2022.04 CameronNemo
2022-05-28 23:10 ` Piraty
2022-05-29 1:51 ` CameronNemo
@ 2022-06-14 16:01 ` sgn
2022-06-14 16:05 ` [PR PATCH] [Merged]: " sgn
3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2022-06-14 16:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 161 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/37313#issuecomment-1155397445
Comment:
I will just merge then.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Merged]: PinebookPro U-Boot 2022.04
2022-05-27 19:30 [PR PATCH] PinebookPro U-Boot 2022.04 CameronNemo
` (2 preceding siblings ...)
2022-06-14 16:01 ` sgn
@ 2022-06-14 16:05 ` sgn
3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2022-06-14 16:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 481 bytes --]
There's a merged pull request on the void-packages repository
PinebookPro U-Boot 2022.04
https://github.com/void-linux/void-packages/pull/37313
Description:
Note: this gets deep suspend working.
- atf-rk3399-bl31: update to 2.6
- pinebookpro-uboot: update to 2022.04
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64 (cross)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-14 16:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 19:30 [PR PATCH] PinebookPro U-Boot 2022.04 CameronNemo
2022-05-28 23:10 ` Piraty
2022-05-29 1:51 ` CameronNemo
2022-06-14 16:01 ` sgn
2022-06-14 16:05 ` [PR PATCH] [Merged]: " sgn
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 NNTP newsgroup(s).