1
0
Fork 0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-11-23 11:29:43 +01:00

Merge branch 'feature/upgrades'

This commit is contained in:
Samuel Dionne-Riel 2020-07-14 17:45:37 -04:00
commit 3746c617f8
19 changed files with 12218 additions and 296 deletions

View file

@ -9,5 +9,8 @@ PS4=" $ "
# way to go.
set -x
exec env -i NIXPKGS_ALLOW_UNFREE=1 NIX_PATH="nixpkgs=channel:nixos-19.09" nix-build \
system.nix -A config.system.build.sdImage "$@"
exec env -i \
NIXPKGS_ALLOW_UNFREE=1 \
NIX_PATH="nixpkgs=channel:nixos-unstable" \
"$(command -v nix-build)" \
system.nix -A config.system.build.sdImage "$@"

View file

@ -7,6 +7,25 @@
(self: super: {
# Does not cross-compile...
alsa-firmware = pkgs.runCommandNoCC "neutered-firmware" {} "mkdir -p $out";
# A "regression" in nixpkgs, where python3 pycryptodome does not cross-compile.
crda = pkgs.runCommandNoCC "neutered-firmware" {} "mkdir -p $out";
})
(final: super:
let
pkgconfig-helper = final.writeShellScriptBin "pkg-config" ''
exec ${super.buildPackages.pkgconfig}/bin/${super.buildPackages.pkgconfig.targetPrefix}pkg-config "$@"
'';
in
{
efibootmgr = super.efibootmgr
.overrideAttrs(old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
pkgconfig-helper
];
})
;
})
];
@ -23,4 +42,8 @@
# `xterm` is being included even though this is GUI-less.
# → https://github.com/NixOS/nixpkgs/pull/62852
services.xserver.desktopManager.xterm.enable = lib.mkForce false;
# ec6224b6cd147943eee685ef671811b3683cb2ce re-introduced udisks in the installer
# udisks fails due to gobject-introspection being not cross-compilation friendly.
services.udisks2.enable = lib.mkForce false;
}

View file

@ -1,5 +1,5 @@
{
pkgs ? import (builtins.fetchTarball "channel:nixos-19.09") {
pkgs ? import <nixpkgs> {
overlays = [
(import ./overlay.nix)
];

View file

@ -1,47 +0,0 @@
{ stdenv
, buildPackages
, fetchFromGitLab
, perl
, buildLinux
, modDirVersionArg ? null
, ... } @ args:
let
inherit (stdenv.lib)
concatStrings
intersperse
take
splitString
optionalString
;
in
(
buildLinux (args // rec {
version = "5.6";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
src = fetchFromGitLab {
domain = "gitlab.manjaro.org";
owner = "tsys";
repo = "linux-pinebook-pro";
rev = "93293259039d6fc3a725961d42b4f11bfc3f5127";
sha256 = "0yrn22j10f3f6hxmbd23ccis35f9s8cbjvzxiyxnsch2zab9349s";
};
postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
mkdir -p "$out/nix-support"
cp -v "$buildRoot/.config" "$out/nix-support/build.config"
'';
} // (args.argsOverride or {}))
)
#).overrideAttrs(args: {
# postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
# mkdir -p "$out/nix-support"
# cp -v "$buildRoot/.config" "$out/nix-support/build.config"
# '';
#})

71
kernel/latest/default.nix Normal file
View file

@ -0,0 +1,71 @@
{ stdenv
, pkgs
, lib
, kernelPatches
, buildPackages
, fetchFromGitLab
, perl
, buildLinux
, modDirVersionArg ? null
, ... } @ args:
let
inherit (stdenv.lib)
concatStrings
intersperse
take
splitString
optionalString
;
version = "5.7";
additionalConfig = {
name = "pinebookpro-config-fixes";
patch = null;
extraConfig = ''
PCIE_ROCKCHIP y
PCIE_ROCKCHIP_HOST y
PCIE_DW_PLAT y
PCIE_DW_PLAT_HOST y
PHY_ROCKCHIP_PCIE y
PHY_ROCKCHIP_INNO_HDMI y
PHY_ROCKCHIP_DP y
ROCKCHIP_MBOX y
STAGING_MEDIA y
VIDEO_HANTRO y
VIDEO_HANTRO_ROCKCHIP y
USB_DWC2_PCI y
ROCKCHIP_LVDS y
ROCKCHIP_RGB y
'';
};
in
buildLinux (args // {
inherit version;
kernelPatches = lib.lists.unique (kernelPatches ++ [
pkgs.kernelPatches.bridge_stp_helper
pkgs.kernelPatches.request_key_helper
pkgs.kernelPatches.export_kernel_fpu_functions."5.3"
additionalConfig
]);
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
src = fetchFromGitLab {
domain = "gitlab.manjaro.org";
owner = "tsys";
repo = "linux-pinebook-pro";
rev = "a8f4db8a726e5e4552e61333dcd9ea1ff35f39f9";
sha256 = "1vbach0y28c29hjjx4sc9hda4jxyqfhv4wlip3ky93vf4gxm2fij";
};
postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
mkdir -p "$out/nix-support"
cp -v "$buildRoot/.config" "$out/nix-support/build.config"
'';
} // (args.argsOverride or {}))

37
kernel/lts/default.nix Normal file
View file

@ -0,0 +1,37 @@
{ pkgs, lib, linux_5_4, kernelPatches, ... } @ args:
linux_5_4.override({
# The way the linux kernel is composed, kernelPatches will end up filled-in twice...
# Not entirely sure why.
kernelPatches = lib.lists.unique (kernelPatches ++ [
pkgs.kernelPatches.bridge_stp_helper
pkgs.kernelPatches.request_key_helper
pkgs.kernelPatches.export_kernel_fpu_functions."5.3"
{
name = "pinebookpro-5.4-lts.patch";
patch = ./pinebookpro-5.4-lts.patch;
}
{
name = "pinebookpro-config-fixes";
patch = null;
extraConfig = ''
PCIE_ROCKCHIP y
PCIE_ROCKCHIP_HOST y
PCIE_DW_PLAT y
PCIE_DW_PLAT_HOST y
PHY_ROCKCHIP_PCIE y
PHY_ROCKCHIP_INNO_HDMI y
PHY_ROCKCHIP_DP y
ROCKCHIP_MBOX y
STAGING_MEDIA y
VIDEO_HANTRO m
VIDEO_HANTRO_ROCKCHIP y
USB_DWC2_PCI y
ROCKCHIP_LVDS y
ROCKCHIP_RGB y
'';
}
]);
})
//
(args.argsOverride or {})

File diff suppressed because it is too large Load diff

View file

@ -10,33 +10,17 @@ in
uBootPinebookProExternalFirst = callPackage ./u-boot {
externalFirst = true;
};
linux_pinebookpro = callPackage ./kernel {
kernelPatches = [
kernelPatches.bridge_stp_helper
#kernelPatches.export_kernel_fpu_functions
{
name = "pinebookpro-config-fixes";
patch = null;
extraConfig = ''
PCIE_ROCKCHIP y
PCIE_ROCKCHIP_HOST y
PCIE_DW_PLAT y
PCIE_DW_PLAT_HOST y
PHY_ROCKCHIP_PCIE y
PHY_ROCKCHIP_INNO_HDMI y
PHY_ROCKCHIP_DP y
ROCKCHIP_MBOX y
STAGING_MEDIA y
VIDEO_HANTRO y
VIDEO_HANTRO_ROCKCHIP y
USB_DWC2_PCI y
ROCKCHIP_LVDS y
ROCKCHIP_RGB y
'';
}
];
};
linuxPackages_pinebookpro = linuxPackagesFor final.linux_pinebookpro;
# The unqualified kernel attr is deprecated.
linux_pinebookpro = throw "The linux_pinebookpro attribute has been replaced by linux_pinebookpro_latest.";
linuxPackages_pinebookpro = throw "The linuxPackages_pinebookpro attribute has been replaced by linuxPackages_pinebookpro_latest.";
linux_pinebookpro_latest = callPackage ./kernel/latest { kernelPatches = []; };
linuxPackages_pinebookpro_latest = linuxPackagesFor final.linux_pinebookpro_latest;
linux_pinebookpro_lts = callPackage ./kernel/lts { kernelPatches = []; };
linuxPackages_pinebookpro_lts = linuxPackagesFor final.linux_pinebookpro_lts;
pinebookpro-firmware = callPackage ./firmware {};
pinebookpro-keyboard-updater = callPackage ./keyboard-updater {};
}

View file

@ -6,7 +6,7 @@
(import ./overlay.nix)
];
boot.kernelPackages = pkgs.linuxPackages_pinebookpro;
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_pinebookpro_latest;
# This list of modules is not entirely minified, but represents
# a set of modules that is required for the display to work in stage-1.

View file

@ -1,25 +0,0 @@
From a737fd023f4f98d7789e9aafbe938acb78e4c191 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Mon, 6 Jan 2020 20:16:27 -0500
Subject: [PATCH] HACK: Add changing LEDs signal at boot on pinebook pro
---
include/configs/pinebook_pro_rk3399.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/configs/pinebook_pro_rk3399.h b/include/configs/pinebook_pro_rk3399.h
index f383becbf8..749713c025 100644
--- a/include/configs/pinebook_pro_rk3399.h
+++ b/include/configs/pinebook_pro_rk3399.h
@@ -9,6 +9,8 @@
#define __PINEBOOKPRO_RK3399_H
#define ROCKCHIP_DEVICE_SETTINGS \
+ "beep_boop=led work on; led standby on; sleep 0.1; led work off; sleep 0.1; led work on; sleep 0.1; led standby off; sleep 0.1; led standby on\0" \
+ "bootcmd=run beep_boop; run distro_bootcmd\0" \
"stdin=serial,usbkbd\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
--
2.23.0

View file

@ -1,7 +1,7 @@
From 1a01021c9361c4e017cb5b032300f5555c393710 Mon Sep 17 00:00:00 2001
From f62ba28ac93ebc759d9774cbffe7ce6ae22a51c0 Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:04:46 +0100
Subject: [PATCH 3/6] rk3399: light pinebook power and standby leds during
Subject: [PATCH 1/5] rk3399: light pinebook power and standby leds during
early boot
this is a hack, but it works for now.
@ -10,19 +10,19 @@ this is a hack, but it works for now.
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index 863024d0710..cf37129d557 100644
index 4fda93b1527..e24b39486d0 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>
@@ -19,6 +19,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;
@@ -115,8 +117,8 @@ void board_debug_uart_init(void)
@@ -119,8 +121,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;
@ -32,7 +32,7 @@ index 863024d0710..cf37129d557 100644
#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)
@@ -153,6 +155,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 */
@ -48,5 +48,5 @@ index 863024d0710..cf37129d557 100644
rk_clrsetreg(&grf->gpio4c_iomux,
GRF_GPIO4C3_SEL_MASK,
--
2.23.1
2.25.3

View file

@ -1,46 +0,0 @@
From 2778aa7cb70946c4729ed6ae13dea5bd1cc688dc Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:02:44 +0100
Subject: [PATCH 1/6] 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.
---
arch/arm/dts/rk3399-pinebook-pro.dts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/rk3399-pinebook-pro.dts b/arch/arm/dts/rk3399-pinebook-pro.dts
index 85ce0206d74..1234f715c1e 100644
--- a/arch/arm/dts/rk3399-pinebook-pro.dts
+++ b/arch/arm/dts/rk3399-pinebook-pro.dts
@@ -65,6 +65,8 @@
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
@@ -503,8 +505,16 @@
&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 {
--
2.23.1

View file

@ -0,0 +1,25 @@
From f44bd5bb5fefea8404489c3e14f8537300fa3fb6 Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:12:34 +0100
Subject: [PATCH 2/5] reduce pinebook_pro bootdelay to 1
---
configs/pinebook-pro-rk3399_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig
index 18b2d74253b..297cc5f17a5 100644
--- a/configs/pinebook-pro-rk3399_defconfig
+++ b/configs/pinebook-pro-rk3399_defconfig
@@ -10,7 +10,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
CONFIG_DEBUG_UART=y
-CONFIG_BOOTDELAY=3
+CONFIG_BOOTDELAY=1
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
CONFIG_MISC_INIT_R=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
--
2.25.3

View file

@ -1,7 +1,7 @@
From 30c7d9054de2b43dfac742b968586707964f4b96 Mon Sep 17 00:00:00 2001
From dd52b971005271d615e63f4f946a0ee9331925bc Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:04:04 +0100
Subject: [PATCH 2/6] rockchip: move mmc1 before mmc0 in default boot order
Subject: [PATCH 3/5] rockchip: move mmc1 before mmc0 in default boot order
on pinebooks mmc1 is the external card, which should take boot priority
over the internal emmc even if the emmc is bootable.
@ -10,10 +10,10 @@ over the internal emmc even if the emmc is bootable.
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 68e1105a4b1..906c22ed0fb 100644
index 0b9e24d1db4..6610f95b7b9 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -14,8 +14,8 @@
@@ -17,8 +17,8 @@
/* First try to boot from SD (index 0), then eMMC (index 1) */
#if CONFIG_IS_ENABLED(CMD_MMC)
#define BOOT_TARGET_MMC(func) \
@ -25,5 +25,5 @@ index 68e1105a4b1..906c22ed0fb 100644
#define BOOT_TARGET_MMC(func)
#endif
--
2.23.1
2.25.3

View file

@ -1,25 +0,0 @@
From b3e8d27cca05508cddeda534956f13e88f2428cd Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:12:34 +0100
Subject: [PATCH 4/6] reduce pinebook_pro bootdelay to 1
---
configs/pinebook_pro-rk3399_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/pinebook_pro-rk3399_defconfig b/configs/pinebook_pro-rk3399_defconfig
index 28577256e70..a11a10243c5 100644
--- a/configs/pinebook_pro-rk3399_defconfig
+++ b/configs/pinebook_pro-rk3399_defconfig
@@ -36,7 +36,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinebook-pro"
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=1
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_MISC=y
--
2.23.1

View file

@ -1,19 +1,19 @@
From 908d441fefc2203affe1bb0d79f75f611888fc1f Mon Sep 17 00:00:00 2001
From 4b11a4444983c997addc5c581da1ec287f27fa47 Mon Sep 17 00:00:00 2001
From: dhivael <dhivael.git@eno.space>
Date: Sat, 11 Jan 2020 15:04:04 +0100
Subject: [PATCH 6/6] rockchip: move usb0 after mmc1 in default boot order
Subject: [PATCH 4/5] 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 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
include/configs/rockchip-common.h | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 906c22ed0fb..90e06e120f8 100644
index 6610f95b7b9..d743ebe83e6 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -13,11 +13,10 @@
@@ -16,11 +16,10 @@
/* First try to boot from SD (index 0), then eMMC (index 1) */
#if CONFIG_IS_ENABLED(CMD_MMC)
@ -27,10 +27,21 @@ index 906c22ed0fb..90e06e120f8 100644
+ #define BOOT_TARGET_MMC(func, idx)
#endif
#if CONFIG_IS_ENABLED(CMD_USB)
@@ -39,8 +38,9 @@
#endif
#if CONFIG_IS_ENABLED(CMD_NVME)
@@ -55,16 +54,18 @@
#ifdef CONFIG_ROCKCHIP_RK3399
#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_MMC(func) \
- BOOT_TARGET_NVME(func) \
+ BOOT_TARGET_MMC(func, 1) \
BOOT_TARGET_USB(func) \
+ BOOT_TARGET_NVME(func) \
+ BOOT_TARGET_MMC(func, 0) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func) \
BOOT_TARGET_SF(func)
#else
#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_MMC(func) \
+ BOOT_TARGET_MMC(func, 1) \
@ -38,7 +49,7 @@ index 906c22ed0fb..90e06e120f8 100644
+ BOOT_TARGET_MMC(func, 0) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
#endif
--
2.23.1
2.25.3

View file

@ -0,0 +1,25 @@
From 70ea0ddc9cea88ef06a685a09b2d407db60bceae Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Mon, 6 Jan 2020 20:16:27 -0500
Subject: [PATCH 5/5] HACK: Add changing LEDs signal at boot on pinebook pro
---
include/configs/pinebook-pro-rk3399.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/configs/pinebook-pro-rk3399.h b/include/configs/pinebook-pro-rk3399.h
index d478b19917d..3c7ca9e7600 100644
--- a/include/configs/pinebook-pro-rk3399.h
+++ b/include/configs/pinebook-pro-rk3399.h
@@ -8,6 +8,8 @@
#define __PINEBOOK_PRO_RK3399_H
#define ROCKCHIP_DEVICE_SETTINGS \
+ "beep_boop=led green:power on; led red:standby on; sleep 0.1; led green:power off; sleep 0.1; led green:power on; sleep 0.1; led red:standby off; sleep 0.1; led red:standby on\0" \
+ "bootcmd=run beep_boop; run distro_bootcmd\0" \
"stdin=serial,usbkbd\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
--
2.25.3

View file

@ -1,76 +0,0 @@
From fd41e9330cf1635fa3bf4dabdfac42ee1bba963c Mon Sep 17 00:00:00 2001
From: Emmanuel Vadot <manu@freebsd.org>
Date: Tue, 31 Dec 2019 22:13:03 +0100
Subject: [PATCH 5/6] 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>
---
arch/arm/dts/rk3399-pinebook-pro.dts | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/rk3399-pinebook-pro.dts b/arch/arm/dts/rk3399-pinebook-pro.dts
index 1234f715c1e..f334f9e8ef2 100644
--- a/arch/arm/dts/rk3399-pinebook-pro.dts
+++ b/arch/arm/dts/rk3399-pinebook-pro.dts
@@ -125,6 +125,16 @@
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";
@@ -347,8 +357,8 @@
};
};
- vcc3v3_s0: SWITCH_REG2 {
- regulator-name = "vcc3v3_s0";
+ unused: SWITCH_REG2 {
+ regulator-name = "SWITCH_REG2";
regulator-always-on;
regulator-boot-on;
regulator-state-mem {
@@ -484,6 +494,11 @@
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>;
+ };
};
};
@@ -581,10 +596,12 @@
};
&usb_host1_ehci {
+ phy-supply = <&vcc3v3_s0>;
status = "okay";
};
&usb_host1_ohci {
+ phy-supply = <&vcc3v3_s0>;
status = "okay";
};
--
2.23.1

View file

@ -19,14 +19,14 @@ let
src = fetchFromGitHub {
owner = "ARM-software";
repo = "arm-trusted-firmware";
rev = "38aac6d4059ed11d6c977c9081a9bf4364227b5a";
sha256 = "0s08zrw0s0dvrc7229dwk6rzasrj3mrb71q232aiznnv9n5aszkz";
rev = "9935047b2086faa3bf3ccf0b95a76510eb5a160b";
sha256 = "1a6pm0nbgm5r3a41nwlkrli90l2blcijb02li7h75xcri6rb7frk";
};
version = "2019-01-16";
version = "2020-06-17";
});
in
(buildUBoot {
defconfig = "pinebook_pro-rk3399_defconfig";
defconfig = "pinebook-pro-rk3399_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${atf}/bl31.elf";
filesToInstall = [
@ -36,32 +36,31 @@ in
];
extraPatches = [
(pw "1194523" "07l19km7vq4xrrc3llcwxwh6k1cx5lj5vmmzml1ji8abqphwfin6")
(pw "1194524" "071rval4r683d1wxh75nbf22qs554spq8rk0499z6zac0x8q1qvc")
(pw "1194525" "0biiwimjp25abxqazqbpxx2wh90zgy3k786h484x9wsdvnv4yjl6")
(pw "1203678" "0l3l88cc9xkxkraql82pfgpx6nqn4dj7cvfaagh5pzfwkxyw0n3p")
# Dhivael patchset
# ----------------
#
# Origin: https://git.eno.space/pbp-uboot.git/
# Forward ported to 2020.07
# Patches from this fork:
# https://git.eno.space/pbp-uboot.git
./0001-rk3399-pinebook-fix-sdcard-boot-from-emmc.patch
./0003-rk3399-light-pinebook-power-and-standby-leds-during-.patch
./0004-reduce-pinebook_pro-bootdelay-to-1.patch
./0005-PBP-Add-regulator-needed-for-usb.patch
./0001-rk3399-light-pinebook-power-and-standby-leds-during-.patch
./0002-reduce-pinebook_pro-bootdelay-to-1.patch
# My own patch
./0001-HACK-Add-changing-LEDs-signal-at-boot-on-pinebook-pr.patch
# samueldr's patchset
# -------------------
./0005-HACK-Add-changing-LEDs-signal-at-boot-on-pinebook-pr.patch
] ++ lib.optionals (externalFirst) [
# Patches from this fork:
# https://git.eno.space/pbp-uboot.git
./0002-rockchip-move-mmc1-before-mmc0-in-default-boot-order.patch
./0006-rockchip-move-usb0-after-mmc1-in-default-boot-order.patch
# Origin: https://git.eno.space/pbp-uboot.git/
# Forward ported to 2020.07
./0003-rockchip-move-mmc1-before-mmc0-in-default-boot-order.patch
./0004-rockchip-move-usb0-after-mmc1-in-default-boot-order.patch
];
})
.overrideAttrs(oldAttrs: {
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
python
];
postPatch = oldAttrs.postPatch + ''
patchShebangs arch/arm/mach-rockchip/
'';
@ -70,7 +69,7 @@ in
domain = "gitlab.denx.de";
owner = "u-boot";
repo = "u-boot";
sha256 = "1fb8135gq8md2gr9sng1q2s1wj74xhy7by16dafzp4263b6vbwyv";
rev = "3ff1ff3ff76c15efe0451309af084ee6c096c583";
sha256 = "11154cxycw81dnmxfl10n2mgyass18jhjpwygqp7w1vjk9hgi4lw";
rev = "v2020.07";
};
})