pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils update u-boot for rockpro64 and pinebook-pro ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/887c2a0f674b
branches: trunk
changeset: 456334:887c2a0f674b
user: mrg <mrg%pkgsrc.org@localhost>
date: Mon Jul 26 06:36:41 2021 +0000
description:
update u-boot for rockpro64 and pinebook-pro to u-boot 2021.07.
- adds support for panel on pinebook-pro (needs rk_anxdp.c r1.4)
- enable ahci/sata for rockpro64
- workaround usb_stop() bug in u-boot. see eg:
https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy%aosc.io@localhost/
- remove long obsolete files
tested on original iso pbp that was upgraded to ansi key, and a
first generation ansi pbp, as well as two rockpro64 v2.1s.
diffstat:
sysutils/u-boot-pinebook-pro/Makefile | 10 +-
sysutils/u-boot-pinebook-pro/distinfo | 20 ---
sysutils/u-boot-rockpro64/Makefile | 6 +-
sysutils/u-boot/distinfo-2021.07 | 14 ++
sysutils/u-boot/patches-2021.07/patch-arch_arm_mach-rockchip_rk3399_rk3399.c | 52 ++++++++
sysutils/u-boot/patches-2021.07/patch-board_pine64_pinebook-pro-rk3399_pinebook-pro-rk3399.c | 60 ++++++++++
sysutils/u-boot/patches-2021.07/patch-configs_pinebook-pro-rk3399_defconfig | 14 ++
sysutils/u-boot/patches-2021.07/patch-configs_rock64-rk3328_defconfig | 13 ++
sysutils/u-boot/patches-2021.07/patch-configs_rockpro64-rk3399_defconfig | 28 ++++
sysutils/u-boot/patches-2021.07/patch-drivers_usb_host_usb-uclass.c | 30 +++++
sysutils/u-boot/patches-2021.07/patch-include_configs_rockchip-common.h | 53 ++++++++
sysutils/u-boot/patches-2021.07/patch-include_configs_rockpro64_rk3399.h | 20 +++
12 files changed, 291 insertions(+), 29 deletions(-)
diffs (truncated from 383 to 300 lines):
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot-pinebook-pro/Makefile
--- a/sysutils/u-boot-pinebook-pro/Makefile Mon Jul 26 05:16:43 2021 +0000
+++ b/sysutils/u-boot-pinebook-pro/Makefile Mon Jul 26 06:36:41 2021 +0000
@@ -1,13 +1,11 @@
-# $NetBSD: Makefile,v 1.11 2021/06/25 08:28:57 mrg Exp $
-
-PKGREVISION= 5
+# $NetBSD: Makefile,v 1.12 2021/07/26 06:36:41 mrg Exp $
UBOOT_TARGET= pinebook-pro
-UBOOT_CONFIG= pinebook_pro-rk3399_defconfig
+UBOOT_CONFIG= pinebook-pro-rk3399_defconfig
UBOOT_BIN= idbloader.img rksd_loader.img rkspi_loader.img u-boot.itb
+UBOOT_IMAGE_TYPE= rk3399
+UBOOT_VERSION?= 2021.07
UBOOT_INSTALLBOOT_PLIST= installboot.plist
-UBOOT_IMAGE_TYPE= rk3399
-
.include "../../sysutils/u-boot/u-boot-rockchip.mk"
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot-pinebook-pro/distinfo
--- a/sysutils/u-boot-pinebook-pro/distinfo Mon Jul 26 05:16:43 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-$NetBSD: distinfo,v 1.3 2020/01/14 08:44:03 mrg Exp $
-
-SHA1 (u-boot-2020.01-rc5.tar.bz2) = 464dec492bd12bf561468b5560d5465bee708de1
-RMD160 (u-boot-2020.01-rc5.tar.bz2) = 2fd9b608a182a783e7e1e07003d2303376de7b4f
-SHA512 (u-boot-2020.01-rc5.tar.bz2) = f39ef40e4a8a030a779d1732bb588fba808140c91d4d92b6228f752b58ecbbdb90a4b8feae1646a42c64ba044d6c503228f877b33e221330b3f96f3c9006d60a
-Size (u-boot-2020.01-rc5.tar.bz2) = 14703368 bytes
-SHA1 (patch-arch_arm_dts_Makefile) = b0f39f16c87b51490fcc5f27dc2b720c2b5a5076
-SHA1 (patch-arch_arm_dts_rk3399-pinebook-pro-u-boot.dtsi) = 50e461b2da4b763a853fa66e90fe39465d8f65cc
-SHA1 (patch-arch_arm_dts_rk3399-pinebook-pro.dts) = d5e240e5a6c79fbc33ab838bf33c356adc7a5b55
-SHA1 (patch-arch_arm_mach-rockchip_rk3399_Kconfig) = 5db42b2120030bd6deae15bad020bc216283606e
-SHA1 (patch-arch_arm_mach-rockchip_rk3399_rk3399.c) = 109ab42dd22ffb23d19f2cf77bc8bb113749d867
-SHA1 (patch-board_pine64_pinebook_pro_rk3399_Kconfig) = 50f0a64ec93446bc962712643b6d9734321be0ff
-SHA1 (patch-board_pine64_pinebook_pro_rk3399_MAINTAINERS) = 81933bcfb75ec0a28f92d7c9823982dae075b699
-SHA1 (patch-board_pine64_pinebook_pro_rk3399_Makefile) = 9dca0a93221ae2a7fa6a6a1794e22750ab105e07
-SHA1 (patch-board_pine64_pinebook_pro_rk3399_pinebook-pro-rk3399.c) = f06846db31ce5f07f9aa77019efb5b6ca6dc8966
-SHA1 (patch-configs-pinebook_pro-rk3399_defconfig) = 0dbc684b30470f96d10db914e9c3631948be5528
-SHA1 (patch-configs_rock64-rk3328_defconfig) = a32cd0e440b0bfd0b8bb00d463eac3b3c99ce9d0
-SHA1 (patch-configs_rockpro64-rk3399_defconfig) = 0775662b76d8875845d75294e43a2897fad6740e
-SHA1 (patch-include-configs-pinebook_pro_rk3399.h) = a8edaa170fb6403a912d6ddda11e3e37c8b2442c
-SHA1 (patch-include_configs_rockchip-common.h) = c619b01d9f1303ed2105b2673122be10b6d141aa
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot-rockpro64/Makefile
--- a/sysutils/u-boot-rockpro64/Makefile Mon Jul 26 05:16:43 2021 +0000
+++ b/sysutils/u-boot-rockpro64/Makefile Mon Jul 26 06:36:41 2021 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.12 2021/06/25 08:28:57 mrg Exp $
+# $NetBSD: Makefile,v 1.13 2021/07/26 06:36:41 mrg Exp $
UBOOT_TARGET= rockpro64
UBOOT_CONFIG= rockpro64-rk3399_defconfig
UBOOT_BIN= idbloader.img rksd_loader.img rkspi_loader.img u-boot.itb
+UBOOT_IMAGE_TYPE= rk3399
+UBOOT_VERSION?= 2021.07
UBOOT_INSTALLBOOT_PLIST= installboot.plist
-UBOOT_IMAGE_TYPE= rk3399
-
.include "../../sysutils/u-boot/u-boot-rockchip.mk"
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/distinfo-2021.07
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/distinfo-2021.07 Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,14 @@
+$NetBSD: distinfo-2021.07,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+SHA1 (u-boot-2021.07.tar.bz2) = fc997c4efbb93df340c41e0c7b8a4137ab8b6ee3
+RMD160 (u-boot-2021.07.tar.bz2) = cffcaf0b1600b76da8176c2f7495ee8a15c86c6e
+SHA512 (u-boot-2021.07.tar.bz2) = 210b206a4626feb0985580d9448a97b499b09bf9b9313ca847a66624785e9e9b0fae8f2e329acd344f5f75cb722d2093dd0ee394311ddd1fde05e400ee71a24d
+Size (u-boot-2021.07.tar.bz2) = 17275746 bytes
+SHA1 (patch-arch_arm_mach-rockchip_rk3399_rk3399.c) = caa4068c635eaef5997501e154ec5cb11dcbf490
+SHA1 (patch-board_pine64_pinebook-pro-rk3399_pinebook-pro-rk3399.c) = 49954716240e93b33e13288f92b14f527ba15bdf
+SHA1 (patch-configs_pinebook-pro-rk3399_defconfig) = 6f9ddd87ef1486fa0785b2f00c6819ace1436853
+SHA1 (patch-configs_rock64-rk3328_defconfig) = 59076a9934c1ec0a492d600b3179209769753fd1
+SHA1 (patch-configs_rockpro64-rk3399_defconfig) = 4d355140bc2b70667827fde7165ce2541612572c
+SHA1 (patch-drivers_usb_host_usb-uclass.c) = 0e90ccfbc908d0bd1d35eff31c2d1a2ed52e9dd0
+SHA1 (patch-include_configs_rockchip-common.h) = 8d2fcde173fd6f5c2b27c8fe6eb9994b2b40e099
+SHA1 (patch-include_configs_rockpro64_rk3399.h) = 7efd0b09cbf627dc59d2a23a76dd6506c9efc4c9
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/patches-2021.07/patch-arch_arm_mach-rockchip_rk3399_rk3399.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/patches-2021.07/patch-arch_arm_mach-rockchip_rk3399_rk3399.c Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,52 @@
+$NetBSD: patch-arch_arm_mach-rockchip_rk3399_rk3399.c,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+adjusted by mrg to restrict to CONFIG_TARGET_PINEBOOK_PRO_RK3399.
+
+
+Author: dhivael <dhivael.git@eno.space>
+Date: Sat Jan 11 15:04:46 2020 +0100
+
+ rk3399: light pinebook power and standby leds during early boot
+
+ this is a hack, but it works for now.
+
+
+--- arch/arm/mach-rockchip/rk3399/rk3399.c.orig 2021-04-05 08:03:29.000000000 -0700
++++ arch/arm/mach-rockchip/rk3399/rk3399.c 2021-05-08 00:46:34.547804408 -0700
+@@ -20,6 +20,8 @@
+ #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;
+
+@@ -122,6 +124,9 @@
+ struct rk3399_pmugrf_regs * const pmugrf = (void *)PMUGRF_BASE;
+ struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
+ #endif
++#ifdef CONFIG_TARGET_PINEBOOK_PRO_RK3399
++ struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
++#endif
+
+ #if defined(CONFIG_DEBUG_UART_BASE) && (CONFIG_DEBUG_UART_BASE == 0xff180000)
+ /* Enable early UART0 on the RK3399 */
+@@ -154,6 +159,17 @@
+ spl_gpio_set_pull(&pmugrf->gpio0_p, GPIO(BANK_B, 4), GPIO_PULL_NORMAL);
+ #endif /* CONFIG_TARGET_CHROMEBOOK_BOB */
+
++#ifdef CONFIG_TARGET_PINEBOOK_PRO_RK3399
++
++ {
++ // 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);
++ }
++#endif
++
+ /* Enable early UART2 channel C on the RK3399 */
+ rk_clrsetreg(&grf->gpio4c_iomux,
+ GRF_GPIO4C3_SEL_MASK,
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/patches-2021.07/patch-board_pine64_pinebook-pro-rk3399_pinebook-pro-rk3399.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/patches-2021.07/patch-board_pine64_pinebook-pro-rk3399_pinebook-pro-rk3399.c Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,60 @@
+$NetBSD: patch-board_pine64_pinebook-pro-rk3399_pinebook-pro-rk3399.c,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+Fix panel reset.
+
+
+From 352cb7b28bf4a16330f148043e8d10b0141bbfcb Mon Sep 17 00:00:00 2001
+From: Arnaud Patard <arnaud.patard%rtp-net.org@localhost>
+Date: Wed, 8 Jul 2020 21:43:36 -0400
+Subject: [PATCH 4/4] PBP: Fix panel reset
+
+On warm reset, the pinebook pro panel is not working correctly.
+The issue is not yet debugged so, for now, this hack seems to be
+enough. It toggles the GPIO1_C6 gpio [ LCDVCC_EN signal in the
+schematics ] used by the vcc3v3_panel regulator.
+
+There's no gpio_request, since the gpio is already in use at this
+stage, so it can only fail.
+
+Origin: http://people.hupstream.com/~rtp/pbp/20200706/patches/hack-reset.patch
+
+
+--- board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c.orig 2021-04-26 17:53:51.000000000 -0700
++++ board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c 2021-05-08 15:36:55.355143117 -0700
+@@ -7,13 +7,15 @@
+ #include <common.h>
+ #include <dm.h>
+ #include <syscon.h>
++#include <linux/delay.h>
++#include <asm/gpio.h>
+ #include <asm/io.h>
+ #include <asm/arch-rockchip/clock.h>
+ #include <asm/arch-rockchip/grf_rk3399.h>
++#include <asm/arch-rockchip/gpio.h>
+ #include <asm/arch-rockchip/hardware.h>
+ #include <asm/arch-rockchip/misc.h>
+ #include <power/regulator.h>
+-
+ #define GRF_IO_VSEL_BT565_SHIFT 0
+ #define PMUGRF_CON0_VSEL_SHIFT 8
+
+@@ -59,6 +61,7 @@
+ const u32 cpuid_length = 0x10;
+ u8 cpuid[cpuid_length];
+ int ret;
++ unsigned int gpio;
+
+ setup_iodomain();
+
+@@ -70,6 +73,11 @@
+ if (ret)
+ return ret;
+
++ gpio_lookup_name("B22", NULL, NULL, &gpio);
++ gpio_direction_output(gpio, 0);
++ udelay(500000);
++ gpio_direction_output(gpio, 1);
++
+ return ret;
+ }
+ #endif
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/patches-2021.07/patch-configs_pinebook-pro-rk3399_defconfig
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/patches-2021.07/patch-configs_pinebook-pro-rk3399_defconfig Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-configs_pinebook-pro-rk3399_defconfig,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+Load u-boot from 256KB.
+
+--- configs/pinebook-pro-rk3399_defconfig.orig 2021-07-05 08:11:28.000000000 -0700
++++ configs/pinebook-pro-rk3399_defconfig 2021-07-25 14:05:30.629973309 -0700
+@@ -3,6 +3,7 @@
+ CONFIG_SYS_TEXT_BASE=0x00200000
+ CONFIG_NR_DRAM_BANKS=1
+ CONFIG_ENV_SIZE=0x8000
++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+ CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinebook-pro"
+ CONFIG_ROCKCHIP_RK3399=y
+ CONFIG_TARGET_PINEBOOK_PRO_RK3399=y
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/patches-2021.07/patch-configs_rock64-rk3328_defconfig
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/patches-2021.07/patch-configs_rock64-rk3328_defconfig Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-configs_rock64-rk3328_defconfig,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+Load u-boot from 256KB.
+
+--- configs/rock64-rk3328_defconfig.orig 2021-04-05 08:03:29.000000000 -0700
++++ configs/rock64-rk3328_defconfig 2021-05-08 00:27:17.257028102 -0700
+@@ -1,5 +1,6 @@
+ CONFIG_ARM=y
+ CONFIG_ARCH_ROCKCHIP=y
++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+ CONFIG_SYS_TEXT_BASE=0x00200000
+ CONFIG_SPL_GPIO_SUPPORT=y
+ CONFIG_NR_DRAM_BANKS=1
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/patches-2021.07/patch-configs_rockpro64-rk3399_defconfig
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/patches-2021.07/patch-configs_rockpro64-rk3399_defconfig Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-configs_rockpro64-rk3399_defconfig,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+Load u-boot from 256KB.
+Enable AHCI and Silicon Image PCIe SATA controllers.
+
+--- configs/rockpro64-rk3399_defconfig.orig 2021-04-26 17:53:51.000000000 -0700
++++ configs/rockpro64-rk3399_defconfig 2021-05-22 16:09:08.812523859 -0700
+@@ -1,5 +1,6 @@
+ CONFIG_ARM=y
+ CONFIG_ARCH_ROCKCHIP=y
++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+ CONFIG_SYS_TEXT_BASE=0x00200000
+ CONFIG_NR_DRAM_BANKS=1
+ CONFIG_ENV_SIZE=0x8000
+@@ -62,6 +63,13 @@
+ CONFIG_DEBUG_UART_SHIFT=2
+ CONFIG_ROCKCHIP_SPI=y
+ CONFIG_SYSRESET=y
++CONFIG_AHCI=y
++CONFIG_AHCI_PCI=y
++CONFIG_SATA=y
++CONFIG_SATA_SIL=y
++CONFIG_SCSI=y
++CONFIG_SCSI_AHCI=y
++CONFIG_DM_SCSI=y
+ CONFIG_USB=y
+ CONFIG_USB_XHCI_HCD=y
+ CONFIG_USB_XHCI_DWC3=y
diff -r b3176db3158a -r 887c2a0f674b sysutils/u-boot/patches-2021.07/patch-drivers_usb_host_usb-uclass.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot/patches-2021.07/patch-drivers_usb_host_usb-uclass.c Mon Jul 26 06:36:41 2021 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-drivers_usb_host_usb-uclass.c,v 1.1 2021/07/26 06:36:41 mrg Exp $
+
+Disable USB. Hangs in usb_stop() / 'usb stop', if started.
+
+--- drivers/usb/host/usb-uclass.c.orig 2021-07-05 08:11:28.000000000 -0700
++++ drivers/usb/host/usb-uclass.c 2021-07-24 12:49:38.736439999 -0700
+@@ -173,6 +173,15 @@
+
+ int usb_stop(void)
+ {
++#if 1
++ /*
++ * XXXMRG
++ *
++ * This hangs when called either from EFI's ExitBootServices() or
++ * explicit call to usb_stop(), say "usb stop" from the command prompt.
++ */
++ printf("Not doing usb_stop().\n");
++#else
+ struct udevice *bus;
+ struct udevice *rh;
+ struct uclass *uc;
+@@ -211,6 +220,7 @@
+ usb_started = 0;
+
+ return err;
++#endif
+ }
Home |
Main Index |
Thread Index |
Old Index