pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/u-boot-pinebook-pro add a u-boot for pinebook...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6ea429d19936
branches:  trunk
changeset: 346995:6ea429d19936
user:      mrg <mrg%pkgsrc.org@localhost>
date:      Mon Jan 06 08:41:44 2020 +0000

description:
add a u-boot for pinebook pro.  it's mostly functional though reboot
is not working for me currently, and the power LED stays off until
netbsd boots still.

this is based upon u-boot 2020.01-rc5 with patches from:

https://patchwork.ozlabs.org/project/uboot/list/?series=142716

which add specific pinebook pro support.  (these sources are known
to have a working reboot, but not from a build i've made.)

diffstat:

 sysutils/u-boot-pinebook-pro/DESCR                                                                |    5 +
 sysutils/u-boot-pinebook-pro/MESSAGE                                                              |   14 +
 sysutils/u-boot-pinebook-pro/Makefile                                                             |   17 +
 sysutils/u-boot-pinebook-pro/PLIST                                                                |    3 +
 sysutils/u-boot-pinebook-pro/distinfo                                                             |   16 +
 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_Makefile                                  |   16 +
 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro-u-boot.dtsi           |   35 +
 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts                   |  641 ++++++++++
 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_mach-rockchip_rk3399_Kconfig                  |   28 +
 sysutils/u-boot-pinebook-pro/patches/patch-board_pine64_pinebook_pro_rk3399_Kconfig               |   25 +
 sysutils/u-boot-pinebook-pro/patches/patch-board_pine64_pinebook_pro_rk3399_MAINTAINERS           |   18 +
 sysutils/u-boot-pinebook-pro/patches/patch-board_pine64_pinebook_pro_rk3399_Makefile              |   11 +
 sysutils/u-boot-pinebook-pro/patches/patch-board_pine64_pinebook_pro_rk3399_pinebook-pro-rk3399.c |  202 +++
 sysutils/u-boot-pinebook-pro/patches/patch-configs-pinebook_pro-rk3399_defconfig                  |   86 +
 sysutils/u-boot-pinebook-pro/patches/patch-include-configs-pinebook_pro_rk3399.h                  |   39 +
 15 files changed, 1156 insertions(+), 0 deletions(-)

diffs (truncated from 1216 to 300 lines):

diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/DESCR        Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,5 @@
+U-Boot is a bootloader for embedded boards based on PowerPC, ARM, MIPS and
+several other processors, which can be installed in a boot ROM and used to
+initialize and test the hardware or to download and run application code.
+
+This package provides U-Boot for the rk3399-based Pinebook Pro from PINE64.
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/MESSAGE      Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2020/01/06 08:41:44 mrg Exp $
+
+Examples command to install U-Boot to an empty SD card:
+
+# dd if=${LOCALBASE}/share/u-boot/pinebook-pro/idbloader.img seek=64 of=/dev/rld0d
+# dd if=${LOCALBASE}/share/u-boot/pinebook-pro/boot.itb seek=16384 of=/dev/rld0d
+
+You should make sure that the space is otherwise cleared of data, as old
+images may fool the boot loader paths.
+
+See also http://opensource.rock-chips.com/wiki_Boot_option
+
+===========================================================================
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/Makefile     Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2020/01/06 08:41:44 mrg Exp $
+
+UBOOT_TARGET=          pinebook-pro
+UBOOT_CONFIG=          pinebook_pro-rk3399_defconfig
+UBOOT_BIN=             idbloader.img u-boot.itb
+
+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
+
+.include "../../sysutils/arm-trusted-firmware-rk3399/buildlink3.mk"
+.include "../../sysutils/u-boot/u-boot-arm64.mk"
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/PLIST        Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2020/01/06 08:41:44 mrg Exp $
+share/u-boot/pinebook-pro/idbloader.img
+share/u-boot/pinebook-pro/u-boot.itb
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/distinfo     Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.1 2020/01/06 08:41:44 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) = a8dd5b7569a5ca849fb907633b57f249ac68f2a7
+SHA1 (patch-arch_arm_mach-rockchip_rk3399_Kconfig) = 5db42b2120030bd6deae15bad020bc216283606e
+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) = 794b7c59d9c21be77bc88f4eac2987778e8679d0
+SHA1 (patch-include-configs-pinebook_pro_rk3399.h) = a8edaa170fb6403a912d6ddda11e3e37c8b2442c
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_Makefile  Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-arch_arm_dts_Makefile,v 1.1 2020/01/06 08:41:44 mrg Exp $
+
+Pinebook Pro support from https://patchwork.ozlabs.org/patch/1194525/
+
+diff --git arch/arm/dts/Makefile arch/arm/dts/Makefile
+index 5a64fcc5a7..affedfd666 100644
+--- arch/arm/dts/Makefile
++++ arch/arm/dts/Makefile
+@@ -116,6 +116,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
+       rk3399-nanopi-m4.dtb \
+       rk3399-nanopi-neo4.dtb \
+       rk3399-orangepi.dtb \
++      rk3399-pinebook-pro.dtb \
+       rk3399-puma-ddr1333.dtb \
+       rk3399-puma-ddr1600.dtb \
+       rk3399-puma-ddr1866.dtb \
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro-u-boot.dtsi
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro-u-boot.dtsi   Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-arch_arm_dts_rk3399-pinebook-pro-u-boot.dtsi,v 1.1 2020/01/06 08:41:44 mrg Exp $
+
+Pinebook Pro support from https://patchwork.ozlabs.org/patch/1194525/
+
+diff --git arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
+new file mode 100644
+index 0000000000..9b0cb7010f
+--- /dev/null
++++ arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
+@@ -0,0 +1,25 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * Copyright (C) 2019 Peter Robinson <pbrobinson at gmail.com>
++ */
++
++#include "rk3399-u-boot.dtsi"
++#include "rk3399-sdram-lpddr4-100.dtsi"
++
++/ {
++      chosen {
++              u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
++      };
++};
++
++&pmugrf {
++      u-boot,dm-pre-reloc;
++};
++
++&spiflash {
++        u-boot,dm-pre-reloc;
++};
++
++&uart2 {
++        u-boot,dm-pre-reloc;
++};
diff -r 8bb02a38cba3 -r 6ea429d19936 sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook-pro/patches/patch-arch_arm_dts_rk3399-pinebook-pro.dts   Mon Jan 06 08:41:44 2020 +0000
@@ -0,0 +1,641 @@
+$NetBSD: patch-arch_arm_dts_rk3399-pinebook-pro.dts,v 1.1 2020/01/06 08:41:44 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 @@
++/*
++ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
++ *
++ * SPDX-License-Identifier:     GPL-2.0+
++ */
++
++/dts-v1/;
++#include <dt-bindings/input/linux-event-codes.h>
++#include <dt-bindings/pwm/pwm.h>
++#include <dt-bindings/pinctrl/rockchip.h>
++#include "rk3399.dtsi"
++#include "rk3399-opp.dtsi"
++
++/ {
++      model = "Pine64 Pinebook Pro";
++      compatible = "pine64,pinebook-pro", "rockchip,rk3399";
++
++      chosen {
++              stdout-path = &uart2;
++      };
++
++      aliases {
++              spi0 = &spi1;
++      };
++
++      backlight: backlight {
++              compatible = "pwm-backlight";
++              enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
++              pwms = <&pwm0 0 740740 0>;
++      };
++
++      gpio-keys {
++              compatible = "gpio-keys";
++              autorepeat;
++              pinctrl-names = "default";
++              pinctrl-0 = <&pwrbtn>;
++
++              power {
++                      debounce-interval = <100>;
++                      gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
++                      label = "GPIO Key Power";
++                      linux,code = <KEY_POWER>;
++                      wakeup-source;
++              };
++      };
++
++      leds {
++              status = "okay";
++              compatible = "gpio-leds";
++
++              work-led {
++                      label = "work";
++                      gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
++              };
++
++              standby-led {
++                      label = "standby";
++                      gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
++              };
++      };
++
++      sdio_pwrseq: sdio-pwrseq {
++              compatible = "mmc-pwrseq-simple";
++              clocks = <&rk808 1>;
++              clock-names = "ext_clock";
++              pinctrl-names = "default";
++              pinctrl-0 = <&wifi_enable_h>;
++
++              /*
++               * On the module itself this is one of these (depending
++               * on the actual card populated):
++               * - SDIO_RESET_L_WL_REG_ON
++               * - PDN (power down when low)
++               */
++              reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
++      };
++
++      /* switched by pmic_sleep */
++      vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
++              compatible = "regulator-fixed";
++              regulator-name = "vcc1v8_s3";
++              regulator-always-on;
++              regulator-boot-on;
++              regulator-min-microvolt = <1800000>;
++              regulator-max-microvolt = <1800000>;
++              vin-supply = <&vcc_1v8>;
++      };
++
++      dc_12v: dc-12v {
++              compatible = "regulator-fixed";
++              regulator-name = "dc_12v";
++              regulator-always-on;
++              regulator-boot-on;
++              regulator-min-microvolt = <12000000>;
++              regulator-max-microvolt = <12000000>;
++      };
++
++      vcc3v3_sys: vcc3v3-sys {
++              compatible = "regulator-fixed";
++              regulator-name = "vcc3v3_sys";
++              regulator-always-on;
++              regulator-boot-on;
++              regulator-min-microvolt = <3300000>;
++              regulator-max-microvolt = <3300000>;
++              vin-supply = <&vcc_sys>;
++      };
++
++      vcc5v0_host: vcc5v0-host-regulator {
++              compatible = "regulator-fixed";
++              gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
++              pinctrl-names = "default";
++              pinctrl-0 = <&host_vbus_drv>;
++              regulator-name = "vcc5v0_host";
++      };
++
++      vcc5v0_usb3_host: vcc5v0-usb3-host-regulator {
++              compatible = "regulator-fixed";
++              enable-active-high;
++              gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
++              pinctrl-names = "default";
++              pinctrl-0 = <&host_usb3_drv>;
++              regulator-name = "vcc5v0_usb3_host";
++              regulator-always-on;
++      };
++
++      vcc_sys: vcc-sys {
++              compatible = "regulator-fixed";
++              regulator-name = "vcc_sys";
++              regulator-always-on;
++              regulator-boot-on;
++              regulator-min-microvolt = <5000000>;
++              regulator-max-microvolt = <5000000>;
++              vin-supply = <&dc_12v>;
++      };
++
++      vdd_log: vdd-log {
++              compatible = "pwm-regulator";
++              pwms = <&pwm2 0 25000 1>;
++              pwm-supply = <&vcc_sys>;
++              regulator-name = "vdd_log";
++              regulator-always-on;
++              regulator-boot-on;
++              regulator-init-microvolt = <950000>;
++              regulator-min-microvolt = <800000>;
++              regulator-max-microvolt = <1400000>;
++      };
++};
++
++&cpu_l0 {
++      cpu-supply = <&vdd_cpu_l>;
++};
++



Home | Main Index | Thread Index | Old Index