pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/u-boot-pinebook-pro
Module Name: pkgsrc
Committed By: mrg
Date: Tue Jan 14 08:44:03 UTC 2020
Modified Files:
pkgsrc/sysutils/u-boot-pinebook-pro: MESSAGE Makefile PLIST distinfo
pkgsrc/sysutils/u-boot-pinebook-pro/patches:
patch-arch_arm_dts_rk3399-pinebook-pro.dts
patch-configs-pinebook_pro-rk3399_defconfig
Added Files:
pkgsrc/sysutils/u-boot-pinebook-pro: u-boot-rockchip.mk
pkgsrc/sysutils/u-boot-pinebook-pro/patches:
patch-arch_arm_mach-rockchip_rk3399_rk3399.c
patch-configs_rock64-rk3328_defconfig
patch-configs_rockpro64-rk3399_defconfig
patch-include_configs_rockchip-common.h
Log Message:
pull in various patches for pinebook pro that:
- turn on the power led
- reduce a timeout slightly
- possibly enable usb boot (untested)
- possibly enable sd boot from emmc uboot (untested)
from Emmanuel Vadot <manu%freebsd.org@localhost> and dhivael <dhivael.git@eno.space>
and some minor massaging from myself.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE \
pkgsrc/sysutils/u-boot-pinebook-pro/Makefile \
pkgsrc/sysutils/u-boot-pinebook-pro/PLIST \
pkgsrc/sysutils/u-boot-pinebook-pro/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/u-boot-pinebook-pro/u-boot-rockchip.mk
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts
cvs rdiff -u -r0 -r1.1 \
pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_mach-rockchip_rk3399_rk3399.c \
pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rock64-rk3328_defconfig \
pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rockpro64-rk3399_defconfig \
pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-include_configs_rockchip-common.h
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE:1.2 pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE:1.3
--- pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE:1.2 Mon Jan 6 09:43:16 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE Tue Jan 14 08:44:03 2020
@@ -1,10 +1,14 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.2 2020/01/06 09:43:16 mrg Exp $
+$NetBSD: MESSAGE,v 1.3 2020/01/14 08:44:03 mrg Exp $
Examples command to install U-Boot to an empty SD card:
# dd if=${LOCALBASE}/share/u-boot/pinebook-pro/rksd_loader.img seek=64 of=/dev/rld0d
+Alternatively, to install to SPI flash:
+
+dd if=${LOCALBASE}/share/u-boot/rockpro64/rkspi_loader.img bs=64k of=/dev/spiflash0
+
You should make sure that the space is otherwise cleared of data, as old
images may fool the boot loader paths.
Index: pkgsrc/sysutils/u-boot-pinebook-pro/Makefile
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/Makefile:1.2 pkgsrc/sysutils/u-boot-pinebook-pro/Makefile:1.3
--- pkgsrc/sysutils/u-boot-pinebook-pro/Makefile:1.2 Mon Jan 6 09:43:16 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/Makefile Tue Jan 14 08:44:03 2020
@@ -1,23 +1,11 @@
-# $NetBSD: Makefile,v 1.2 2020/01/06 09:43:16 mrg Exp $
+# $NetBSD: Makefile,v 1.3 2020/01/14 08:44:03 mrg Exp $
+
+PKGREVISION= 1
-PKGREVISION= 1
UBOOT_TARGET= pinebook-pro
UBOOT_CONFIG= pinebook_pro-rk3399_defconfig
-UBOOT_BIN= idbloader.img u-boot.itb rksd_loader.img
-
-UBOOT_VERSION= 2020.01-rc5
-
-DISTINFO_FILE= ${.CURDIR}/../../sysutils/u-boot-pinebook-pro/distinfo
-PATCHDIR= ${.CURDIR}/../../sysutils/u-boot-pinebook-pro/patches
-
-USE_TOOLS+= gawk
-
-MAKE_ENV+= BL31=${PREFIX}/share/arm-trusted-firmware/rk3399/bl31.elf
+UBOOT_BIN= idbloader.img rksd_loader.img rkspi_loader.img u-boot.itb
-post-build:
-# wrap everything up into a single file that can be written to an SD card
- cp ${WRKSRC}/idbloader.img ${WRKSRC}/rksd_loader.img
- dd if=${WRKSRC}/u-boot.itb seek=448 conv=notrunc of=${WRKSRC}/rksd_loader.img
+U_BOOT_IMAGE_TYPE= rk3399
-.include "../../sysutils/arm-trusted-firmware-rk3399/buildlink3.mk"
-.include "../../sysutils/u-boot/u-boot-arm64.mk"
+.include "../../sysutils/u-boot-pinebook-pro/u-boot-rockchip.mk"
Index: pkgsrc/sysutils/u-boot-pinebook-pro/PLIST
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/PLIST:1.2 pkgsrc/sysutils/u-boot-pinebook-pro/PLIST:1.3
--- pkgsrc/sysutils/u-boot-pinebook-pro/PLIST:1.2 Mon Jan 6 09:43:16 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/PLIST Tue Jan 14 08:44:03 2020
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.2 2020/01/06 09:43:16 mrg Exp $
+@comment $NetBSD: PLIST,v 1.3 2020/01/14 08:44:03 mrg Exp $
share/u-boot/pinebook-pro/idbloader.img
share/u-boot/pinebook-pro/rksd_loader.img
+share/u-boot/pinebook-pro/rkspi_loader.img
share/u-boot/pinebook-pro/u-boot.itb
Index: pkgsrc/sysutils/u-boot-pinebook-pro/distinfo
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/distinfo:1.2 pkgsrc/sysutils/u-boot-pinebook-pro/distinfo:1.3
--- pkgsrc/sysutils/u-boot-pinebook-pro/distinfo:1.2 Mon Jan 6 09:43:16 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/distinfo Tue Jan 14 08:44:03 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2020/01/06 09:43:16 mrg Exp $
+$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
@@ -6,11 +6,15 @@ SHA512 (u-boot-2020.01-rc5.tar.bz2) = f3
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) = a8dd5b7569a5ca849fb907633b57f249ac68f2a7
+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) = 33232c1b62e6ce5974251b2e477f28413ef99d0d
+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
Index: pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts:1.1 pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts:1.2
--- pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts:1.1 Mon Jan 6 08:41:44 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts Tue Jan 14 08:44:03 2020
@@ -1,13 +1,35 @@
-$NetBSD: patch-arch_arm_dts_rk3399-pinebook-pro.dts,v 1.1 2020/01/06 08:41:44 mrg Exp $
+$NetBSD: patch-arch_arm_dts_rk3399-pinebook-pro.dts,v 1.2 2020/01/14 08:44:03 mrg Exp $
Pinebook Pro support from https://patchwork.ozlabs.org/patch/1194525/
-diff --git arch/arm/dts/rk3399-pinebook-pro.dts arch/arm/dts/rk3399-pinebook-pro.dts
-new file mode 100644
-index 0000000000..85ce0206d7
---- /dev/null
-+++ arch/arm/dts/rk3399-pinebook-pro.dts
-@@ -0,0 +1,631 @@
+commit 2778aa7cb70946c4729ed6ae13dea5bd1cc688dc
+Author: dhivael <dhivael.git@eno.space>
+Date: Sat Jan 11 15:02:44 2020 +0100
+
+ rk3399: pinebook: fix sdcard boot from emmc
+
+ booting from emmc does not set all DT properties required for the sd
+ slot to function properly. this is a copy of the linux DT configuration
+ for the slot now.
+
+commit fd41e9330cf1635fa3bf4dabdfac42ee1bba963c
+Author: Emmanuel Vadot <manu%freebsd.org@localhost>
+Date: Tue Dec 31 22:13:03 2019 +0100
+
+ PBP: Add regulator needed for usb
+
+ The schematics indicate that the vcc3v3_s0 voltage is controlled by
+ the LDO2 of the RK808 but this isn't true.
+ It's controller by a gpio (named lcdvcc_en).
+ Remove the name from the RK808 regulator and add a regulator-fixed
+ controller by this gpio.
+
+ Signed-off-by: Emmanuel Vadot <manu%freebsd.org@localhost>
+
+
+--- arch/arm/dts/rk3399-pinebook-pro.dts.orig 2020-01-13 16:59:26.353181190 -0800
++++ arch/arm/dts/rk3399-pinebook-pro.dts 2020-01-13 23:16:08.263344492 -0800
+@@ -0,0 +1,660 @@
+/*
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
+ *
@@ -54,6 +76,7 @@ index 0000000000..85ce0206d7
+ };
+ };
+
++ /*
+ leds {
+ status = "okay";
+ compatible = "gpio-leds";
@@ -68,6 +91,7 @@ index 0000000000..85ce0206d7
+ gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
+ };
+ };
++ */
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
@@ -75,6 +99,8 @@ index 0000000000..85ce0206d7
+ clock-names = "ext_clock";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable_h>;
++ power-off-delay-us = <500000>;
++ post-power-on-delay-ms = <100>;
+
+ /*
+ * On the module itself this is one of these (depending
@@ -133,6 +159,16 @@ index 0000000000..85ce0206d7
+ regulator-always-on;
+ };
+
++ vcc3v3_s0: vcc3v3-s0-regulator {
++ compatible = "regulator-fixed";
++ enable-active-high;
++ gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&lcdvcc_en>;
++ regulator-name = "vcc3v3_s0";
++ regulator-always-on;
++ };
++
+ vcc_sys: vcc-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_sys";
@@ -355,8 +391,8 @@ index 0000000000..85ce0206d7
+ };
+ };
+
-+ vcc3v3_s0: SWITCH_REG2 {
-+ regulator-name = "vcc3v3_s0";
++ unused: SWITCH_REG2 {
++ regulator-name = "SWITCH_REG2";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-state-mem {
@@ -492,6 +528,11 @@ index 0000000000..85ce0206d7
+ host_usb3_drv: host-usb3-drv {
+ rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
++
++ /* Shared between LCD and usb */
++ lcdvcc_en: lcdvcc-en {
++ rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
+ };
+};
+
@@ -513,8 +554,16 @@ index 0000000000..85ce0206d7
+
+&sdmmc {
+ bus-width = <4>;
-+ status = "okay";
++ cap-mmc-highspeed;
++ cap-sd-highspeed;
++ cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
++ disable-wp;
++ sd-uhs-sdr104;
+ max-frequency = <20000000>;
++ vqmmc-supply = <&vcc_sdio>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
++ status = "okay";
+};
+
+&sdhci {
@@ -581,10 +630,12 @@ index 0000000000..85ce0206d7
+};
+
+&usb_host1_ehci {
++ phy-supply = <&vcc3v3_s0>;
+ status = "okay";
+};
+
+&usb_host1_ohci {
++ phy-supply = <&vcc3v3_s0>;
+ status = "okay";
+};
+
Index: pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig:1.2 pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig:1.3
--- pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig:1.2 Mon Jan 6 09:43:16 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig Tue Jan 14 08:44:03 2020
@@ -1,12 +1,13 @@
-$NetBSD: patch-configs-pinebook_pro-rk3399_defconfig,v 1.2 2020/01/06 09:43:16 mrg Exp $
+$NetBSD: patch-configs-pinebook_pro-rk3399_defconfig,v 1.3 2020/01/14 08:44:03 mrg Exp $
Pinebook Pro support from https://patchwork.ozlabs.org/patch/1194525/
-diff --git configs/pinebook_pro-rk3399_defconfig configs/pinebook_pro-rk3399_defconfig
-new file mode 100644
-index 0000000000..28577256e7
---- /dev/null
-+++ configs/pinebook_pro-rk3399_defconfig
+reduce pinebook_pro bootdelay to 2
+put uboot at 256K.
+
+
+--- configs/pinebook_pro-rk3399_defconfig.orig 2020-01-13 16:59:26.374914888 -0800
++++ configs/pinebook_pro-rk3399_defconfig 2020-01-13 23:15:39.294542172 -0800
@@ -0,0 +1,77 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ROCKCHIP=y
@@ -47,7 +48,7 @@ index 0000000000..28577256e7
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
-+CONFIG_BOOTDELAY=3
++CONFIG_BOOTDELAY=2
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_MISC=y
Added files:
Index: pkgsrc/sysutils/u-boot-pinebook-pro/u-boot-rockchip.mk
diff -u /dev/null pkgsrc/sysutils/u-boot-pinebook-pro/u-boot-rockchip.mk:1.1
--- /dev/null Tue Jan 14 08:44:03 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/u-boot-rockchip.mk Tue Jan 14 08:44:03 2020
@@ -0,0 +1,46 @@
+# $NetBSD: u-boot-rockchip.mk,v 1.1 2020/01/14 08:44:03 mrg Exp $
+#
+# should be used by sysutils/u-boot-rock64/Makefile
+# used by sysutils/u-boot-rockpro64/Makefile
+# used by sysutils/u-boot-pinebook-pro/Makefile
+
+# Common makefile fragment for rockchip based u-boot targets.
+#
+# Set these variables:
+#
+# U_BOOT_IMAGE_TYPE ("rk3399", "rk3328")
+#
+
+UBOOT_VERSION?= 2020.01-rc5
+
+# Patches kept in pinebook-pro; first worked there.
+DISTINFO_FILE?= ${.CURDIR}/../../sysutils/u-boot-pinebook-pro/distinfo
+PATCHDIR?= ${.CURDIR}/../../sysutils/u-boot-pinebook-pro/patches
+
+MAKE_ENV+= BL31=${PREFIX}/share/arm-trusted-firmware/${U_BOOT_IMAGE_TYPE}/bl31.elf
+
+post-build:
+# wrap everything up into a single file that can be written to an SD card
+ cp ${WRKSRC}/idbloader.img ${WRKSRC}/rksd_loader.img
+ dd if=${WRKSRC}/u-boot.itb seek=448 conv=notrunc of=${WRKSRC}/rksd_loader.img
+# build SPI NOR flash image. See dev-ayufan/build.mk.
+ set -e; b=0; while [ "$$b" != 128 ]; do \
+ dd bs=2k count=1; \
+ dd if=/dev/zero bs=2k count=1; \
+ b=$$(expr $$b + 1); \
+ done < ${WRKSRC}/idbloader.img > ${WRKSRC}/rkspi_loader.img 2> /dev/null
+ dd if=${WRKSRC}/u-boot.itb seek=1024 conv=notrunc of=${WRKSRC}/rkspi_loader.img
+
+SUBST_CLASSES+= makefitpath
+SUBST_STAGE.makefitpath= pre-configure
+SUBST_FILES.makefitpath= arch/arm/mach-rockchip/make_fit_atf.py
+SUBST_SED.makefitpath= -e "s| python3| python|g"
+
+PYTHON_VERSIONS_ACCEPTED+= 37 38
+REPLACE_INTERPRETER+= python3
+REPLACE.python3.old= python3
+REPLACE.python3.new= ${PYTHON3BIN}
+REPLACE_FILES.python2= arch/arm/mach-rockchip/make_fit_atf.py
+
+.include "../../sysutils/u-boot/u-boot-arm64.mk"
+.include "../../sysutils/arm-trusted-firmware-${U_BOOT_IMAGE_TYPE}/buildlink3.mk"
Index: pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_mach-rockchip_rk3399_rk3399.c
diff -u /dev/null pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_mach-rockchip_rk3399_rk3399.c:1.1
--- /dev/null Tue Jan 14 08:44:03 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_mach-rockchip_rk3399_rk3399.c Tue Jan 14 08:44:03 2020
@@ -0,0 +1,51 @@
+$NetBSD: patch-arch_arm_mach-rockchip_rk3399_rk3399.c,v 1.1 2020/01/14 08:44:03 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 2019-12-16 04:39:56.000000000 -0800
++++ arch/arm/mach-rockchip/rk3399/rk3399.c 2020-01-13 23:15:15.174280309 -0800
+@@ -15,6 +15,8 @@
+ #include <asm/arch-rockchip/grf_rk3399.h>
+ #include <asm/arch-rockchip/hardware.h>
+ #include <power/regulator.h>
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/pinctrl/rockchip.h>
+
+ DECLARE_GLOBAL_DATA_PTR;
+
+@@ -117,6 +119,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 */
+@@ -149,6 +154,16 @@
+ 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,
Index: pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rock64-rk3328_defconfig
diff -u /dev/null pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rock64-rk3328_defconfig:1.1
--- /dev/null Tue Jan 14 08:44:03 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rock64-rk3328_defconfig Tue Jan 14 08:44:03 2020
@@ -0,0 +1,14 @@
+$NetBSD: patch-configs_rock64-rk3328_defconfig,v 1.1 2020/01/14 08:44:03 mrg Exp $
+
+Put u-boot at 256KB.
+
+--- configs/rock64-rk3328_defconfig.orig 2019-12-16 04:39:56.000000000 -0800
++++ configs/rock64-rk3328_defconfig 2020-01-09 12:47:03.348721688 -0800
+@@ -1,6 +1,7 @@
+ CONFIG_ARM=y
+ CONFIG_ARCH_ROCKCHIP=y
+ CONFIG_SYS_TEXT_BASE=0x00200000
++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+ CONFIG_ROCKCHIP_RK3328=y
+ CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
+ CONFIG_TPL_LIBCOMMON_SUPPORT=y
Index: pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rockpro64-rk3399_defconfig
diff -u /dev/null pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rockpro64-rk3399_defconfig:1.1
--- /dev/null Tue Jan 14 08:44:03 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-configs_rockpro64-rk3399_defconfig Tue Jan 14 08:44:03 2020
@@ -0,0 +1,14 @@
+$NetBSD: patch-configs_rockpro64-rk3399_defconfig,v 1.1 2020/01/14 08:44:03 mrg Exp $
+
+Put u-boot at 256KB.
+
+--- configs/rockpro64-rk3399_defconfig.orig 2019-12-16 04:39:56.000000000 -0800
++++ configs/rockpro64-rk3399_defconfig 2020-01-09 12:44:48.889763217 -0800
+@@ -1,6 +1,7 @@
+ CONFIG_ARM=y
+ CONFIG_ARCH_ROCKCHIP=y
+ CONFIG_SYS_TEXT_BASE=0x00200000
++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+ CONFIG_ROCKCHIP_RK3399=y
+ CONFIG_ENV_OFFSET=0x3F8000
+ CONFIG_TARGET_ROCKPRO64_RK3399=y
Index: pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-include_configs_rockchip-common.h
diff -u /dev/null pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-include_configs_rockchip-common.h:1.1
--- /dev/null Tue Jan 14 08:44:03 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/patches/patch-include_configs_rockchip-common.h Tue Jan 14 08:44:03 2020
@@ -0,0 +1,48 @@
+$NetBSD: patch-include_configs_rockchip-common.h,v 1.1 2020/01/14 08:44:03 mrg Exp $
+
+Author: dhivael <dhivael.git@eno.space>
+Date: Sat Jan 11 15:04:04 2020 +0100
+
+ rockchip: move usb0 after mmc1 in default boot order
+
+ now that we support booting from USB we should prefer USB boot over eMMC
+ boot. we still try to boot from SD cards first.
+
+commit 908d441fefc2203affe1bb0d79f75f611888fc1f
+Author: dhivael <dhivael.git@eno.space>
+Date: Sat Jan 11 15:04:04 2020 +0100
+
+ rockchip: move usb0 after mmc1 in default boot order
+
+ now that we support booting from USB we should prefer USB boot over eMMC
+ boot. we still try to boot from SD cards first.
+
+
+--- include/configs/rockchip-common.h.orig 2019-12-16 04:39:56.000000000 -0800
++++ include/configs/rockchip-common.h 2020-01-13 23:17:05.743249968 -0800
+@@ -13,11 +13,10 @@
+
+ /* First try to boot from SD (index 0), then eMMC (index 1) */
+ #if CONFIG_IS_ENABLED(CMD_MMC)
+- #define BOOT_TARGET_MMC(func) \
+- func(MMC, mmc, 0) \
+- func(MMC, mmc, 1)
++ #define BOOT_TARGET_MMC(func, idx) \
++ func(MMC, mmc, idx)
+ #else
+- #define BOOT_TARGET_MMC(func)
++ #define BOOT_TARGET_MMC(func, idx)
+ #endif
+
+ #if CONFIG_IS_ENABLED(CMD_USB)
+@@ -39,8 +38,9 @@
+ #endif
+
+ #define BOOT_TARGET_DEVICES(func) \
+- BOOT_TARGET_MMC(func) \
++ BOOT_TARGET_MMC(func, 1) \
+ BOOT_TARGET_USB(func) \
++ BOOT_TARGET_MMC(func, 0) \
+ BOOT_TARGET_PXE(func) \
+ BOOT_TARGET_DHCP(func)
+
Home |
Main Index |
Thread Index |
Old Index