mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Rockchip: switch to mainline u-boot
This commit is contained in:
parent
94aa7c57b3
commit
109b7bc2d0
@ -19,12 +19,6 @@ if [ "${PROJECT}" = "Rockchip" -a "${DEVICE}" = "RK3399" ]; then
|
||||
export M0_CROSS_COMPILE="${TOOLCHAIN}/bin/arm-none-eabi-"
|
||||
fi
|
||||
|
||||
if [ "${PROJECT}" = "Rockchip" ]; then
|
||||
BL31="bl31/bl31.elf"
|
||||
else
|
||||
BL31="bl31.bin"
|
||||
fi
|
||||
|
||||
make_target() {
|
||||
if [ "${DEVICE}" = "iMX8" ]; then
|
||||
CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="--no-warn-rwx-segments" CFLAGS="--param=min-pagesize=0" make PLAT=${ATF_PLATFORM} bl31
|
||||
@ -35,5 +29,5 @@ make_target() {
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/share/bootloader
|
||||
cp -a build/${ATF_PLATFORM}/release/${BL31} ${INSTALL}/usr/share/bootloader
|
||||
cp -a build/${ATF_PLATFORM}/release/${ATF_BL31_BINARY:-bl31.bin} ${INSTALL}/usr/share/bootloader
|
||||
}
|
||||
|
@ -3,9 +3,12 @@
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="u-boot"
|
||||
PKG_VERSION="2022.07"
|
||||
PKG_SHA256="92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://www.denx.de/wiki/U-Boot"
|
||||
PKG_URL="https://ftp.denx.de/pub/u-boot/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain openssl:host pkg-config:host Python3:host swig:host"
|
||||
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
|
||||
|
||||
@ -21,20 +24,6 @@ fi
|
||||
PKG_NEED_UNPACK="${PROJECT_DIR}/${PROJECT}/bootloader"
|
||||
[ -n "${DEVICE}" ] && PKG_NEED_UNPACK+=" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader"
|
||||
|
||||
case "${PROJECT}" in
|
||||
Rockchip)
|
||||
PKG_VERSION="8659d08d2b589693d121c1298484e861b7dafc4f"
|
||||
PKG_SHA256="3f9f2bbd0c28be6d7d6eb909823fee5728da023aca0ce37aef3c8f67d1179ec1"
|
||||
PKG_URL="https://github.com/rockchip-linux/u-boot/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_PATCH_DIRS="rockchip"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="2022.07"
|
||||
PKG_SHA256="92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e"
|
||||
PKG_URL="https://ftp.denx.de/pub/u-boot/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
;;
|
||||
esac
|
||||
|
||||
post_patch() {
|
||||
if [ -n "${UBOOT_SYSTEM}" ] && find_file_path bootloader/config; then
|
||||
PKG_CONFIG_FILE="${PKG_BUILD}/configs/$(${ROOT}/${SCRIPTS}/uboot_helper ${PROJECT} ${DEVICE} ${UBOOT_SYSTEM} config)"
|
||||
|
@ -1,99 +0,0 @@
|
||||
From 61b0555d3b8e962f3cac5cf17ab149f4fb318ca3 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 20 Aug 2018 22:55:34 +0200
|
||||
Subject: [PATCH] rockchip: board: use efuse cpuid to set ethaddr
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/board.c | 51 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
|
||||
index b56edebf13..155871f5bf 100644
|
||||
--- a/arch/arm/mach-rockchip/board.c
|
||||
+++ b/arch/arm/mach-rockchip/board.c
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <mmc.h>
|
||||
#include <of_live.h>
|
||||
#include <dm/root.h>
|
||||
+#include <hash.h>
|
||||
+#include <u-boot/sha256.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
/* define serialno max length, the max length is 512 Bytes
|
||||
@@ -44,6 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static int rockchip_set_serialno(void)
|
||||
{
|
||||
char serialno_str[VENDOR_SN_MAX];
|
||||
+ char cpuid_str[CPUID_LEN * 2 + 1];
|
||||
int ret = 0, i;
|
||||
u8 cpuid[CPUID_LEN] = {0};
|
||||
u8 low[CPUID_LEN / 2], high[CPUID_LEN / 2];
|
||||
@@ -73,6 +76,13 @@ static int rockchip_set_serialno(void)
|
||||
printf("%s: reading cpuid from the efuses failed\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+ memset(cpuid_str, 0, sizeof(cpuid_str));
|
||||
+ for (i = 0; i < CPUID_LEN; i++) {
|
||||
+ sprintf(&cpuid_str[i * 2], "%02x", cpuid[i]);
|
||||
+ }
|
||||
+
|
||||
+ env_set("cpuid#", cpuid_str);
|
||||
#else
|
||||
/* generate random cpuid */
|
||||
for (i = 0; i < CPUID_LEN; i++) {
|
||||
@@ -95,6 +105,45 @@ static int rockchip_set_serialno(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void rockchip_set_ethaddr(void)
|
||||
+{
|
||||
+#if CONFIG_IS_ENABLED(CMD_NET)
|
||||
+ int ret;
|
||||
+ const char *cpuid = env_get("cpuid#");
|
||||
+ u8 hash[SHA256_SUM_LEN];
|
||||
+ int size = sizeof(hash);
|
||||
+ u8 mac_addr[6];
|
||||
+
|
||||
+ /* Only generate a MAC address, if none is set in the environment */
|
||||
+ if (env_get("ethaddr"))
|
||||
+ return;
|
||||
+
|
||||
+ if (!cpuid) {
|
||||
+ debug("%s: could not retrieve 'cpuid#'\n", __func__);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret = hash_block("sha256", (void *)cpuid, strlen(cpuid), hash, &size);
|
||||
+ if (ret) {
|
||||
+ debug("%s: failed to calculate SHA256\n", __func__);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Copy 6 bytes of the hash to base the MAC address on */
|
||||
+ memcpy(mac_addr, hash, 6);
|
||||
+
|
||||
+ /* Make this a valid MAC address and set it */
|
||||
+ mac_addr[0] &= 0xfe; /* clear multicast bit */
|
||||
+ mac_addr[0] |= 0x02; /* set local assignment bit (IEEE802) */
|
||||
+ eth_env_set_enetaddr("ethaddr", mac_addr);
|
||||
+
|
||||
+ /* Make a valid MAC address for eth1 */
|
||||
+ mac_addr[5] += 0x20;
|
||||
+ mac_addr[5] &= 0xff;
|
||||
+ eth_env_set_enetaddr("eth1addr", mac_addr);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
#if defined(CONFIG_USB_FUNCTION_FASTBOOT)
|
||||
int fb_set_reboot_flag(void)
|
||||
{
|
||||
@@ -162,6 +211,8 @@ int board_late_init(void)
|
||||
#endif
|
||||
rockchip_set_serialno();
|
||||
|
||||
+ rockchip_set_ethaddr();
|
||||
+
|
||||
soc_clk_dump();
|
||||
|
||||
return rk_board_late_init();
|
@ -1,48 +0,0 @@
|
||||
From c871e961036d58bf1d66b7e79be85777158b7137 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 18 Aug 2018 17:26:35 +0200
|
||||
Subject: [PATCH] rockchip: rk3328: get serial and ethaddr from efuse
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3328.dtsi | 14 ++++++++++++++
|
||||
configs/evb-rk3328_defconfig | 2 ++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3328.dtsi b/arch/arm/dts/rk3328.dtsi
|
||||
index 670b98d6fa..88cc185b96 100644
|
||||
--- a/arch/arm/dts/rk3328.dtsi
|
||||
+++ b/arch/arm/dts/rk3328.dtsi
|
||||
@@ -341,6 +341,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ efuse: efuse@ff260000 {
|
||||
+ compatible = "rockchip,rk3328-efuse";
|
||||
+ reg = <0x0 0xff260000 0x0 0x80>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ clocks = <&cru SCLK_EFUSE>;
|
||||
+ clock-names = "pclk_efuse";
|
||||
+
|
||||
+ /* Data cells */
|
||||
+ cpu_id: cpu-id@7 {
|
||||
+ reg = <0x07 0x10>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
saradc: saradc@ff280000 {
|
||||
compatible = "rockchip,rk3328-saradc", "rockchip,saradc";
|
||||
reg = <0x0 0xff280000 0x0 0x100>;
|
||||
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
|
||||
index 79535c760d..0897a28e1d 100644
|
||||
--- a/configs/evb-rk3328_defconfig
|
||||
+++ b/configs/evb-rk3328_defconfig
|
||||
@@ -52,6 +52,8 @@ CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_DM_KEY=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_PHY=y
|
@ -1,63 +0,0 @@
|
||||
From caec69d5fc737f971439a1dae391c9b3d5ff4c31 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Wed, 10 Jan 2018 19:56:16 +0100
|
||||
Subject: [PATCH] rk3328-evb: fix sdmmc vmmc-supply
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3328-evb.dts | 7 +++++--
|
||||
arch/arm/dts/rk3328.dtsi | 10 ++++++----
|
||||
2 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3328-evb.dts b/arch/arm/dts/rk3328-evb.dts
|
||||
index aafafec649..497b040f56 100644
|
||||
--- a/arch/arm/dts/rk3328-evb.dts
|
||||
+++ b/arch/arm/dts/rk3328-evb.dts
|
||||
@@ -28,8 +28,10 @@
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3";
|
||||
gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0m1_gpio>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
vcc5v0_otg: vcc5v0-otg-drv {
|
||||
@@ -75,6 +77,7 @@
|
||||
num-slots = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
|
||||
+ vmmc-supply = <&vcc3v3_sdmmc>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/dts/rk3328.dtsi b/arch/arm/dts/rk3328.dtsi
|
||||
index 88cc185b96..e920d692ff 100644
|
||||
--- a/arch/arm/dts/rk3328.dtsi
|
||||
+++ b/arch/arm/dts/rk3328.dtsi
|
||||
@@ -475,8 +475,9 @@
|
||||
compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
|
||||
reg = <0x0 0xff500000 0x0 0x4000>;
|
||||
max-frequency = <150000000>;
|
||||
- clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
|
||||
- clock-names = "biu", "ciu";
|
||||
+ clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
|
||||
+ <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
|
||||
+ clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
@@ -498,8 +499,9 @@
|
||||
compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
|
||||
reg = <0x0 0xff520000 0x0 0x4000>;
|
||||
max-frequency = <150000000>;
|
||||
- clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>;
|
||||
- clock-names = "biu", "ciu";
|
||||
+ clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
|
||||
+ <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
|
||||
+ clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
@ -1,54 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 5 Aug 2018 20:58:54 +0200
|
||||
Subject: [PATCH] rockchip: rk3288: get serial and ethaddr from efuse
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3288.dtsi | 5 ++---
|
||||
configs/miqi-rk3288_defconfig | 3 +++
|
||||
configs/tinker-rk3288_defconfig | 2 ++
|
||||
3 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3288.dtsi b/arch/arm/dts/rk3288.dtsi
|
||||
index 20adb0dece..8b085ee6dc 100644
|
||||
--- a/arch/arm/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/dts/rk3288.dtsi
|
||||
@@ -936,9 +936,8 @@
|
||||
};
|
||||
|
||||
efuse: efuse@ffb40000 {
|
||||
- compatible = "rockchip,rk3288-efuse";
|
||||
- reg = <0xffb40000 0x10000>;
|
||||
- status = "disabled";
|
||||
+ compatible = "rockchip,rockchip-efuse";
|
||||
+ reg = <0xffb40000 0x20>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@ffc01000 {
|
||||
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
|
||||
index 09d5979dff..77d8f7dffc 100644
|
||||
--- a/configs/miqi-rk3288_defconfig
|
||||
+++ b/configs/miqi-rk3288_defconfig
|
||||
@@ -48,6 +48,9 @@ CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_DM_KEY=y
|
||||
CONFIG_ADC_KEY=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_ROCKCHIP_EFUSE=y
|
||||
+CONFIG_SHA256=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_DM_ETH=y
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index 3abf7c1088..52196194c9 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -46,6 +46,8 @@ CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_MISC=y
|
||||
+CONFIG_ROCKCHIP_EFUSE=y
|
||||
+CONFIG_SHA256=y
|
||||
CONFIG_I2C_EEPROM=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
@ -1,172 +0,0 @@
|
||||
From 400e9e6b21878e8570ce1cb0242d93baa6c21c99 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 20 Aug 2018 23:01:10 +0200
|
||||
Subject: [PATCH] rk3399-evb: use common get serial and ethaddr from efuse
|
||||
|
||||
---
|
||||
board/rockchip/evb_rk3399/evb-rk3399.c | 119 -------------------------
|
||||
include/configs/evb_rk3399.h | 3 -
|
||||
2 files changed, 122 deletions(-)
|
||||
|
||||
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
|
||||
index b6f730852a..3a6b802a3f 100644
|
||||
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
|
||||
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
|
||||
@@ -6,23 +6,17 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
-#include <misc.h>
|
||||
#include <ram.h>
|
||||
#include <dm/pinctrl.h>
|
||||
#include <dm/uclass-internal.h>
|
||||
-#include <asm/setup.h>
|
||||
#include <asm/arch/periph.h>
|
||||
#include <power/regulator.h>
|
||||
-#include <u-boot/sha256.h>
|
||||
#include <usb.h>
|
||||
#include <dwc3-uboot.h>
|
||||
#include <spl.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
-#define RK3399_CPUID_OFF 0x7
|
||||
-#define RK3399_CPUID_LEN 0x10
|
||||
-
|
||||
int rk_board_init(void)
|
||||
{
|
||||
struct udevice *pinctrl, *regulator;
|
||||
@@ -74,119 +68,6 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void setup_macaddr(void)
|
||||
-{
|
||||
-#if CONFIG_IS_ENABLED(CMD_NET)
|
||||
- int ret;
|
||||
- const char *cpuid = env_get("cpuid#");
|
||||
- u8 hash[SHA256_SUM_LEN];
|
||||
- int size = sizeof(hash);
|
||||
- u8 mac_addr[6];
|
||||
-
|
||||
- /* Only generate a MAC address, if none is set in the environment */
|
||||
- if (env_get("ethaddr"))
|
||||
- return;
|
||||
-
|
||||
- if (!cpuid) {
|
||||
- debug("%s: could not retrieve 'cpuid#'\n", __func__);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- ret = hash_block("sha256", (void *)cpuid, strlen(cpuid), hash, &size);
|
||||
- if (ret) {
|
||||
- debug("%s: failed to calculate SHA256\n", __func__);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- /* Copy 6 bytes of the hash to base the MAC address on */
|
||||
- memcpy(mac_addr, hash, 6);
|
||||
-
|
||||
- /* Make this a valid MAC address and set it */
|
||||
- mac_addr[0] &= 0xfe; /* clear multicast bit */
|
||||
- mac_addr[0] |= 0x02; /* set local assignment bit (IEEE802) */
|
||||
- eth_env_set_enetaddr("ethaddr", mac_addr);
|
||||
-#endif
|
||||
-
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-static void setup_serial(void)
|
||||
-{
|
||||
-#if CONFIG_IS_ENABLED(ROCKCHIP_EFUSE)
|
||||
- struct udevice *dev;
|
||||
- int ret, i;
|
||||
- u8 cpuid[RK3399_CPUID_LEN];
|
||||
- u8 low[RK3399_CPUID_LEN/2], high[RK3399_CPUID_LEN/2];
|
||||
- char cpuid_str[RK3399_CPUID_LEN * 2 + 1];
|
||||
- u64 serialno;
|
||||
- char serialno_str[16];
|
||||
-
|
||||
- /* retrieve the device */
|
||||
- ret = uclass_get_device_by_driver(UCLASS_MISC,
|
||||
- DM_GET_DRIVER(rockchip_efuse), &dev);
|
||||
- if (ret) {
|
||||
- debug("%s: could not find efuse device\n", __func__);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- /* read the cpu_id range from the efuses */
|
||||
- ret = misc_read(dev, RK3399_CPUID_OFF, &cpuid, sizeof(cpuid));
|
||||
- if (ret) {
|
||||
- debug("%s: reading cpuid from the efuses failed\n",
|
||||
- __func__);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- memset(cpuid_str, 0, sizeof(cpuid_str));
|
||||
- for (i = 0; i < 16; i++)
|
||||
- sprintf(&cpuid_str[i * 2], "%02x", cpuid[i]);
|
||||
-
|
||||
- debug("cpuid: %s\n", cpuid_str);
|
||||
-
|
||||
- /*
|
||||
- * Mix the cpuid bytes using the same rules as in
|
||||
- * ${linux}/drivers/soc/rockchip/rockchip-cpuinfo.c
|
||||
- */
|
||||
- for (i = 0; i < 8; i++) {
|
||||
- low[i] = cpuid[1 + (i << 1)];
|
||||
- high[i] = cpuid[i << 1];
|
||||
- }
|
||||
-
|
||||
- serialno = crc32_no_comp(0, low, 8);
|
||||
- serialno |= (u64)crc32_no_comp(serialno, high, 8) << 32;
|
||||
- snprintf(serialno_str, sizeof(serialno_str), "%llx", serialno);
|
||||
-
|
||||
- env_set("cpuid#", cpuid_str);
|
||||
- env_set("serial#", serialno_str);
|
||||
-#endif
|
||||
-
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-int misc_init_r(void)
|
||||
-{
|
||||
- setup_serial();
|
||||
- setup_macaddr();
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-#ifdef CONFIG_SERIAL_TAG
|
||||
-void get_board_serial(struct tag_serialnr *serialnr)
|
||||
-{
|
||||
- char *serial_string;
|
||||
- u64 serial = 0;
|
||||
-
|
||||
- serial_string = env_get("serial#");
|
||||
-
|
||||
- if (serial_string)
|
||||
- serial = simple_strtoull(serial_string, NULL, 16);
|
||||
-
|
||||
- serialnr->high = (u32)(serial >> 32);
|
||||
- serialnr->low = (u32)(serial & 0xffffffff);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
#ifdef CONFIG_USB_DWC3
|
||||
static struct dwc3_device dwc3_device_data = {
|
||||
.maximum_speed = USB_SPEED_HIGH,
|
||||
diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h
|
||||
index 5565c7ce53..840d63ff6d 100644
|
||||
--- a/include/configs/evb_rk3399.h
|
||||
+++ b/include/configs/evb_rk3399.h
|
||||
@@ -18,9 +18,6 @@
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
|
||||
#define SDRAM_BANK_SIZE (2UL << 30)
|
||||
-#define CONFIG_MISC_INIT_R
|
||||
-#define CONFIG_SERIAL_TAG
|
||||
-#define CONFIG_ENV_OVERWRITE
|
||||
|
||||
#define CONFIG_BMP_16BPP
|
||||
#define CONFIG_BMP_24BPP
|
@ -1,175 +0,0 @@
|
||||
From dd573f1b6c8e9bd09cb9e8573270bce599553feb Mon Sep 17 00:00:00 2001
|
||||
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Date: Mon, 7 May 2018 22:18:27 +0200
|
||||
Subject: [PATCH] include: update log2 header from the Linux kernel
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Without the patch gcc 8 produces:
|
||||
warning: ignoring attribute ‘noreturn’ because it conflicts with
|
||||
attribute ‘const’ [-Wattributes]
|
||||
int ____ilog2_NaN(void);
|
||||
|
||||
So let's update the include from Linux kernel v4.16.
|
||||
|
||||
This removes static checks of ilog2() arguments.
|
||||
|
||||
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
(cherry picked from commit 4a8e72954e11f2c2c37ee138b88a1d9362dba4da)
|
||||
---
|
||||
include/linux/log2.h | 63 ++++++++++++++++++++++++++------------------
|
||||
1 file changed, 37 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/include/linux/log2.h b/include/linux/log2.h
|
||||
index aa1de63090..b62c07b29f 100644
|
||||
--- a/include/linux/log2.h
|
||||
+++ b/include/linux/log2.h
|
||||
@@ -4,6 +4,11 @@
|
||||
* Written by David Howells (dhowells@redhat.com)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_LOG2_H
|
||||
@@ -12,12 +17,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
-/*
|
||||
- * deal with unrepresentable constant logarithms
|
||||
- */
|
||||
-extern __attribute__((const, noreturn))
|
||||
-int ____ilog2_NaN(void);
|
||||
-
|
||||
/*
|
||||
* non-constant log of base 2 calculators
|
||||
* - the arch may override these in asm/bitops.h if they can be implemented
|
||||
@@ -40,19 +39,23 @@ int __ilog2_u64(u64 n)
|
||||
}
|
||||
#endif
|
||||
|
||||
-/*
|
||||
- * Determine whether some value is a power of two, where zero is
|
||||
+/**
|
||||
+ * is_power_of_2() - check if a value is a power of two
|
||||
+ * @n: the value to check
|
||||
+ *
|
||||
+ * Determine whether some value is a power of two, where zero is
|
||||
* *not* considered a power of two.
|
||||
+ * Return: true if @n is a power of 2, otherwise false.
|
||||
*/
|
||||
-
|
||||
static inline __attribute__((const))
|
||||
bool is_power_of_2(unsigned long n)
|
||||
{
|
||||
return (n != 0 && ((n & (n - 1)) == 0));
|
||||
}
|
||||
|
||||
-/*
|
||||
- * round up to nearest power of two
|
||||
+/**
|
||||
+ * __roundup_pow_of_two() - round up to nearest power of two
|
||||
+ * @n: value to round up
|
||||
*/
|
||||
static inline __attribute__((const))
|
||||
unsigned long __roundup_pow_of_two(unsigned long n)
|
||||
@@ -60,8 +63,9 @@ unsigned long __roundup_pow_of_two(unsigned long n)
|
||||
return 1UL << fls_long(n - 1);
|
||||
}
|
||||
|
||||
-/*
|
||||
- * round down to nearest power of two
|
||||
+/**
|
||||
+ * __rounddown_pow_of_two() - round down to nearest power of two
|
||||
+ * @n: value to round down
|
||||
*/
|
||||
static inline __attribute__((const))
|
||||
unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
@@ -70,19 +74,19 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
}
|
||||
|
||||
/**
|
||||
- * ilog2 - log of base 2 of 32-bit or a 64-bit unsigned value
|
||||
- * @n - parameter
|
||||
+ * ilog2 - log base 2 of 32-bit or a 64-bit unsigned value
|
||||
+ * @n: parameter
|
||||
*
|
||||
* constant-capable log of base 2 calculation
|
||||
* - this can be used to initialise global variables from constant data, hence
|
||||
- * the massive ternary operator construction
|
||||
+ * the massive ternary operator construction
|
||||
*
|
||||
* selects the appropriately-sized optimised version depending on sizeof(n)
|
||||
*/
|
||||
#define ilog2(n) \
|
||||
( \
|
||||
__builtin_constant_p(n) ? ( \
|
||||
- (n) < 1 ? ____ilog2_NaN() : \
|
||||
+ (n) < 2 ? 0 : \
|
||||
(n) & (1ULL << 63) ? 63 : \
|
||||
(n) & (1ULL << 62) ? 62 : \
|
||||
(n) & (1ULL << 61) ? 61 : \
|
||||
@@ -145,10 +149,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
(n) & (1ULL << 4) ? 4 : \
|
||||
(n) & (1ULL << 3) ? 3 : \
|
||||
(n) & (1ULL << 2) ? 2 : \
|
||||
- (n) & (1ULL << 1) ? 1 : \
|
||||
- (n) & (1ULL << 0) ? 0 : \
|
||||
- ____ilog2_NaN() \
|
||||
- ) : \
|
||||
+ 1) : \
|
||||
(sizeof(n) <= 4) ? \
|
||||
__ilog2_u32(n) : \
|
||||
__ilog2_u64(n) \
|
||||
@@ -156,7 +157,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
|
||||
/**
|
||||
* roundup_pow_of_two - round the given value up to nearest power of two
|
||||
- * @n - parameter
|
||||
+ * @n: parameter
|
||||
*
|
||||
* round the given value up to the nearest power of two
|
||||
* - the result is undefined when n == 0
|
||||
@@ -173,7 +174,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
|
||||
/**
|
||||
* rounddown_pow_of_two - round the given value down to nearest power of two
|
||||
- * @n - parameter
|
||||
+ * @n: parameter
|
||||
*
|
||||
* round the given value down to the nearest power of two
|
||||
* - the result is undefined when n == 0
|
||||
@@ -186,6 +187,12 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
__rounddown_pow_of_two(n) \
|
||||
)
|
||||
|
||||
+static inline __attribute_const__
|
||||
+int __order_base_2(unsigned long n)
|
||||
+{
|
||||
+ return n > 1 ? ilog2(n - 1) + 1 : 0;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* order_base_2 - calculate the (rounded up) base 2 order of the argument
|
||||
* @n: parameter
|
||||
@@ -199,7 +206,11 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
* ob2(5) = 3
|
||||
* ... and so on.
|
||||
*/
|
||||
-
|
||||
-#define order_base_2(n) ilog2(roundup_pow_of_two(n))
|
||||
-
|
||||
+#define order_base_2(n) \
|
||||
+( \
|
||||
+ __builtin_constant_p(n) ? ( \
|
||||
+ ((n) == 0 || (n) == 1) ? 0 : \
|
||||
+ ilog2((n) - 1) + 1) : \
|
||||
+ __order_base_2(n) \
|
||||
+)
|
||||
#endif /* _LINUX_LOG2_H */
|
@ -1,192 +0,0 @@
|
||||
From d0c3abbbecfe69a73b157451857ca061870ec49b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 18 Aug 2018 17:27:32 +0200
|
||||
Subject: [PATCH] rockchip: disable android boot and config
|
||||
|
||||
---
|
||||
arch/arm/mach-rockchip/boot_mode.c | 2 +-
|
||||
configs/evb-rk3328_defconfig | 5 ++---
|
||||
configs/evb-rk3399_defconfig | 17 +----------------
|
||||
configs/miqi-rk3288_defconfig | 12 +-----------
|
||||
configs/tinker-rk3288_defconfig | 3 ---
|
||||
include/configs/rockchip-common.h | 2 --
|
||||
6 files changed, 5 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
|
||||
index 8a20a3a31e..9441c49477 100644
|
||||
--- a/arch/arm/mach-rockchip/boot_mode.c
|
||||
+++ b/arch/arm/mach-rockchip/boot_mode.c
|
||||
@@ -123,9 +123,9 @@ int setup_boot_mode(void)
|
||||
int boot_mode = BOOT_MODE_NORMAL;
|
||||
char env_preboot[256] = {0};
|
||||
|
||||
+#ifdef CONFIG_RKIMG_BOOTLOADER
|
||||
devtype_num_envset();
|
||||
rockchip_dnl_mode_check();
|
||||
-#ifdef CONFIG_RKIMG_BOOTLOADER
|
||||
boot_mode = rockchip_get_boot_mode();
|
||||
#endif
|
||||
switch (boot_mode) {
|
||||
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
|
||||
index 0897a28e1d..85ee85741e 100644
|
||||
--- a/configs/evb-rk3328_defconfig
|
||||
+++ b/configs/evb-rk3328_defconfig
|
||||
@@ -39,8 +39,8 @@ CONFIG_TPL_OF_CONTROL=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_TPL_OF_PLATDATA=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
-CONFIG_TPL_DM=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_TPL_DM=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_TPL_REGMAP=y
|
||||
@@ -56,12 +56,11 @@ CONFIG_MISC=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
-CONFIG_PHY=y
|
||||
-CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_ETH_DESIGNWARE=y
|
||||
CONFIG_GMAC_ROCKCHIP=y
|
||||
CONFIG_PHY=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_DM_PMIC=y
|
||||
CONFIG_PMIC_RK8XX=y
|
||||
diff --git a/configs/evb-rk3399_defconfig b/configs/evb-rk3399_defconfig
|
||||
index 305f0a405d..96aa34b2c0 100644
|
||||
--- a/configs/evb-rk3399_defconfig
|
||||
+++ b/configs/evb-rk3399_defconfig
|
||||
@@ -5,16 +5,14 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
CONFIG_ROCKCHIP_RK3399=y
|
||||
CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000
|
||||
-CONFIG_RKIMG_BOOTLOADER=y
|
||||
-# CONFIG_USING_KERNEL_DTB is not set
|
||||
CONFIG_SPL_STACK_R_ADDR=0x80000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3399-evb"
|
||||
CONFIG_DEBUG_UART=y
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
-CONFIG_ANDROID_BOOTLOADER=y
|
||||
CONFIG_SPL_STACK_R=y
|
||||
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
|
||||
CONFIG_SPL_ATF=y
|
||||
@@ -26,18 +24,13 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
CONFIG_CMD_GPT=y
|
||||
-CONFIG_CMD_LOAD_ANDROID=y
|
||||
-CONFIG_CMD_BOOT_ANDROID=y
|
||||
-CONFIG_CMD_BOOT_ROCKCHIP=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_TIME=y
|
||||
-CONFIG_RKPARM_PARTITION=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
-CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_REGMAP=y
|
||||
@@ -94,13 +87,5 @@ CONFIG_USB_ETHER_ASIX88179=y
|
||||
CONFIG_USB_ETHER_MCS7830=y
|
||||
CONFIG_USB_ETHER_RTL8152=y
|
||||
CONFIG_USB_ETHER_SMSC95XX=y
|
||||
-CONFIG_DM_VIDEO=y
|
||||
-CONFIG_DISPLAY=y
|
||||
-CONFIG_DRM_ROCKCHIP=y
|
||||
-CONFIG_DRM_ROCKCHIP_DW_MIPI_DSI=y
|
||||
-CONFIG_DRM_ROCKCHIP_ANALOGIX_DP=y
|
||||
-CONFIG_DRM_ROCKCHIP_LVDS=y
|
||||
-CONFIG_DRM_ROCKCHIP_RGB=y
|
||||
-CONFIG_LCD=y
|
||||
CONFIG_USE_TINY_PRINTF=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
|
||||
index ffbe701cfd..0aa4c903e4 100644
|
||||
--- a/configs/miqi-rk3288_defconfig
|
||||
+++ b/configs/miqi-rk3288_defconfig
|
||||
@@ -3,12 +3,11 @@ CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
CONFIG_ROCKCHIP_RK3288=y
|
||||
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
||||
-CONFIG_RKIMG_BOOTLOADER=y
|
||||
CONFIG_TARGET_MIQI_RK3288=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x80000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3288-miqi"
|
||||
CONFIG_DEBUG_UART=y
|
||||
-# CONFIG_SILENT_CONSOLE is not set
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_SPL_STACK_R=y
|
||||
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
|
||||
@@ -16,10 +15,6 @@ CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
-CONFIG_ANDROID_BOOT_IMAGE=y
|
||||
-CONFIG_ANDROID_BOOTLOADER=y
|
||||
-CONFIG_CMD_BOOT_ANDROID=y
|
||||
-CONFIG_CMD_BOOT_ROCKCHIP=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_SPI=y
|
||||
@@ -80,11 +75,6 @@ CONFIG_G_DNL_PRODUCT_NUM=0x320a
|
||||
CONFIG_USB_HOST_ETHER=y
|
||||
CONFIG_USB_ETHER_ASIX=y
|
||||
CONFIG_USB_ETHER_SMSC95XX=y
|
||||
-CONFIG_DM_VIDEO=y
|
||||
-CONFIG_DISPLAY=y
|
||||
-CONFIG_VIDEO_ROCKCHIP=y
|
||||
-CONFIG_DISPLAY_ROCKCHIP_HDMI=y
|
||||
-CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_USE_TINY_PRINTF=y
|
||||
CONFIG_CMD_DHRYSTONE=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index 0afc0a35e1..a6f8c0cb51 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -3,13 +3,11 @@ CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
CONFIG_ROCKCHIP_RK3288=y
|
||||
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
|
||||
-CONFIG_RKIMG_BOOTLOADER=y
|
||||
CONFIG_TARGET_TINKER_RK3288=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x80000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker"
|
||||
CONFIG_DEBUG_UART=y
|
||||
# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
-# CONFIG_SILENT_CONSOLE is not set
|
||||
CONFIG_CONSOLE_MUX=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_SPL_STACK_R=y
|
||||
@@ -19,7 +17,6 @@ CONFIG_SPL_I2C_SUPPORT=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
-CONFIG_CMD_BOOT_ROCKCHIP=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_SPI=y
|
||||
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
|
||||
index f159cbddf3..75a0963953 100644
|
||||
--- a/include/configs/rockchip-common.h
|
||||
+++ b/include/configs/rockchip-common.h
|
||||
@@ -105,8 +105,6 @@
|
||||
"fi; \0"
|
||||
|
||||
#define RKIMG_BOOTCOMMAND \
|
||||
- "boot_android ${devtype} ${devnum};" \
|
||||
- "bootrkp;" \
|
||||
"run distro_bootcmd;"
|
||||
|
||||
#endif
|
@ -1,188 +0,0 @@
|
||||
From b9d513e7d18f16cb06ef93a109fb5755f695cb60 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Wed, 29 Aug 2018 23:03:07 +0200
|
||||
Subject: [PATCH] configs: sync rk3288, rk3328 and rk3399 defconfig
|
||||
|
||||
---
|
||||
configs/evb-rk3328_defconfig | 6 +++++-
|
||||
configs/evb-rk3399_defconfig | 5 +++++
|
||||
configs/miqi-rk3288_defconfig | 1 -
|
||||
configs/tinker-rk3288_defconfig | 2 +-
|
||||
4 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
|
||||
index 85ee85741e..4388ba32e0 100644
|
||||
--- a/configs/evb-rk3328_defconfig
|
||||
+++ b/configs/evb-rk3328_defconfig
|
||||
@@ -29,16 +29,20 @@ CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=1
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_TPL_OF_CONTROL=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_TPL_OF_PLATDATA=y
|
||||
-CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_TPL_DM=y
|
||||
CONFIG_REGMAP=y
|
||||
diff --git a/configs/evb-rk3399_defconfig b/configs/evb-rk3399_defconfig
|
||||
index 96aa34b2c0..84b14a0a6a 100644
|
||||
--- a/configs/evb-rk3399_defconfig
|
||||
+++ b/configs/evb-rk3399_defconfig
|
||||
@@ -10,6 +10,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-evb"
|
||||
CONFIG_DEBUG_UART=y
|
||||
# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
@@ -23,6 +24,7 @@ CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
@@ -30,6 +32,8 @@ CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_TIME=y
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
@@ -41,6 +45,7 @@ CONFIG_CLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_DM_KEY=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_MMC_DW=y
|
||||
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
|
||||
index 0aa4c903e4..9559fcbaa2 100644
|
||||
--- a/configs/miqi-rk3288_defconfig
|
||||
+++ b/configs/miqi-rk3288_defconfig
|
||||
@@ -30,7 +30,6 @@ CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_PARTITION_UUIDS=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
-CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
|
||||
index a6f8c0cb51..9c4a9f47cf 100644
|
||||
--- a/configs/tinker-rk3288_defconfig
|
||||
+++ b/configs/tinker-rk3288_defconfig
|
||||
@@ -32,7 +32,6 @@ CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_PARTITION_UUIDS=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
-CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
@@ -42,6 +41,7 @@ CONFIG_CLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_DM_KEY=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_I2C_EEPROM=y
|
||||
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
|
||||
index f0931266aa..af0ad7d5aa 100644
|
||||
--- a/configs/firefly-rk3399_defconfig
|
||||
+++ b/configs/firefly-rk3399_defconfig
|
||||
@@ -5,16 +5,15 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
CONFIG_ROCKCHIP_RK3399=y
|
||||
CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000
|
||||
-CONFIG_RKIMG_BOOTLOADER=y
|
||||
CONFIG_SPL_STACK_R_ADDR=0x80000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3399-firefly"
|
||||
CONFIG_DEBUG_UART=y
|
||||
-CONFIG_ANDROID_BOOTLOADER=y
|
||||
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||
CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
-CONFIG_ANDROID_BOOTLOADER=y
|
||||
CONFIG_SPL_STACK_R=y
|
||||
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
|
||||
CONFIG_SPL_ATF=y
|
||||
@@ -25,20 +24,19 @@ CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
-CONFIG_CMD_LOAD_ANDROID=y
|
||||
-CONFIG_CMD_BOOT_ANDROID=y
|
||||
-CONFIG_CMD_BOOT_ROCKCHIP=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_TIME=y
|
||||
-CONFIG_RKPARM_PARTITION=y
|
||||
+CONFIG_CMD_PMIC=y
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
-CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SYSCON=y
|
||||
@@ -47,6 +45,7 @@ CONFIG_CLK=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_DM_KEY=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_MMC_DW=y
|
||||
@@ -77,14 +76,16 @@ CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_USB_OHCI_GENERIC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_GADGET=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
CONFIG_G_DNL_MANUFACTURER="Rockchip"
|
||||
-CONFIG_G_DNL_VENDOR_NUM=0x18d1
|
||||
-CONFIG_G_DNL_PRODUCT_NUM=0xd00d
|
||||
+CONFIG_G_DNL_VENDOR_NUM=0x2207
|
||||
+CONFIG_G_DNL_PRODUCT_NUM=0x330a
|
||||
CONFIG_USB_HOST_ETHER=y
|
||||
CONFIG_USB_ETHER_ASIX=y
|
||||
CONFIG_USB_ETHER_ASIX88179=y
|
||||
@@ -93,3 +94,5 @@ CONFIG_USB_ETHER_RTL8152=y
|
||||
CONFIG_USB_ETHER_SMSC95XX=y
|
||||
CONFIG_USE_TINY_PRINTF=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_BOOTDELAY=1
|
||||
+# CONFIG_EFI_LOADER is not set
|
@ -1,57 +0,0 @@
|
||||
From f6ac1287103cf1abae453ddaf3e78ef9c204542a Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Thu, 13 Sep 2018 22:23:48 +0200
|
||||
Subject: [PATCH] rk3288-tinker: enable emmc
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3288-tinker.dtsi | 11 +++++++++++
|
||||
include/configs/tinker_rk3288.h | 13 ++++---------
|
||||
2 files changed, 15 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3288-tinker.dtsi b/arch/arm/dts/rk3288-tinker.dtsi
|
||||
index 81f8d5a6c3..91f6e78ad3 100644
|
||||
--- a/arch/arm/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/dts/rk3288-tinker.dtsi
|
||||
@@ -129,6 +129,17 @@
|
||||
cpu0-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
+&emmc {
|
||||
+ bus-width = <8>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ disable-wp;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&sdmmc {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
diff --git a/include/configs/tinker_rk3288.h b/include/configs/tinker_rk3288.h
|
||||
index 58eea3c405..42878ed8fa 100644
|
||||
--- a/include/configs/tinker_rk3288.h
|
||||
+++ b/include/configs/tinker_rk3288.h
|
||||
@@ -7,16 +7,11 @@
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
-#define ROCKCHIP_DEVICE_SETTINGS
|
||||
-#include <configs/rk3288_common.h>
|
||||
-
|
||||
-#undef BOOT_TARGET_DEVICES
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "stdout=serial,vidconsole\0" \
|
||||
+ "stderr=serial,vidconsole\0"
|
||||
|
||||
-#define BOOT_TARGET_DEVICES(func) \
|
||||
- func(MMC, mmc, 1) \
|
||||
- func(USB, usb, 0) \
|
||||
- func(PXE, pxe, na) \
|
||||
- func(DHCP, dchp, na)
|
||||
+#include <configs/rk3288_common.h>
|
||||
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 1
|
||||
|
@ -1,68 +0,0 @@
|
||||
From fc0ea138b00b1a0fb35b5b4e3e2d26c19e2f2d6a Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 16 Sep 2018 11:56:50 +0200
|
||||
Subject: [PATCH] Revert "rockchip: dts: rk3328-evb: Enable gmac2io for
|
||||
rk3328-evb"
|
||||
|
||||
This reverts commit 895e4b943b18d21b2c0c5c24f04bcc626bc3ad91.
|
||||
|
||||
Fixes SDIO issue on RockBox
|
||||
---
|
||||
arch/arm/dts/rk3328-evb.dts | 30 ------------------------------
|
||||
1 file changed, 30 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3328-evb.dts b/arch/arm/dts/rk3328-evb.dts
|
||||
index 497b040f56..6a5225b48c 100644
|
||||
--- a/arch/arm/dts/rk3328-evb.dts
|
||||
+++ b/arch/arm/dts/rk3328-evb.dts
|
||||
@@ -17,13 +17,6 @@
|
||||
stdout-path = &uart2;
|
||||
};
|
||||
|
||||
- gmac_clkin: external-gmac-clock {
|
||||
- compatible = "fixed-clock";
|
||||
- clock-frequency = <125000000>;
|
||||
- clock-output-names = "gmac_clkin";
|
||||
- #clock-cells = <0>;
|
||||
- };
|
||||
-
|
||||
vcc3v3_sdmmc: sdmmc-pwren {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3";
|
||||
@@ -51,13 +44,6 @@
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
-
|
||||
- vcc_phy: vcc-phy-regulator {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "vcc_phy";
|
||||
- regulator-always-on;
|
||||
- regulator-boot-on;
|
||||
- };
|
||||
};
|
||||
|
||||
&saradc {
|
||||
@@ -93,22 +79,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&gmac2io {
|
||||
- phy-supply = <&vcc_phy>;
|
||||
- phy-mode = "rgmii";
|
||||
- clock_in_out = "input";
|
||||
- snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
- snps,reset-active-low;
|
||||
- snps,reset-delays-us = <0 10000 50000>;
|
||||
- assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
|
||||
- assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&rgmiim1_pins>;
|
||||
- tx_delay = <0x26>;
|
||||
- rx_delay = <0x11>;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
&u2phy {
|
||||
status = "okay";
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
From 45be7edd81e458ca90985a0c687e769aa9ebaf5b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 9 Sep 2019 05:59:12 +0000
|
||||
Subject: [PATCH] Revert "Makefile: enable -Werror option"
|
||||
|
||||
This reverts commit 76ba1d8a713bc964fc8e0a639f90344c4c60f026.
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f81ac1f9f9..fe2a57fa58 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -360,7 +360,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
|
||||
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
|
||||
-Wno-format-security \
|
||||
-fno-builtin -ffreestanding
|
||||
-KBUILD_CFLAGS += -fshort-wchar -Werror
|
||||
+KBUILD_CFLAGS += -fshort-wchar
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
|
||||
# Read UBOOTRELEASE from include/config/uboot.release (if it exists)
|
@ -1,48 +0,0 @@
|
||||
From 4270dca0656b872ac44dc860151bba76c257cfe2 Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
||||
Date: Mon, 14 May 2018 15:22:06 +0200
|
||||
Subject: [PATCH] Makefile: adopt --std=gnu11 for HOSTCFLAGS on Linux
|
||||
|
||||
Following the conversion of the SPDX license tags, a number of files
|
||||
compiled with -pedantic now generate warnings similar to the following
|
||||
for using C99-style '//' comments in ISO C90 code:
|
||||
|
||||
tools/gen_eth_addr.c:1:1: warning: C++ style comments are not allowed in ISO C90
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
^
|
||||
|
||||
The SPDX comment-style change means that these files have adopted C99,
|
||||
so need to change the language-standard to --std=gnu99 or --std=gnu11
|
||||
to let the compiler know this.
|
||||
|
||||
As we now require GCC 6 or newer for the cross-compiler, the project has
|
||||
implicitly moved the project to GNU11: let older GCC versions on various
|
||||
Linux distros know to treat our host tools as GNU11 as well.
|
||||
|
||||
References: commit 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
|
||||
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
||||
Reviewed-by: Tom Rini <trini@konsulko.com>
|
||||
---
|
||||
Makefile | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index fe2a57fa58..484a1eb01d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -260,6 +260,15 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
|
||||
$(if $(CONFIG_TOOLS_DEBUG),-g)
|
||||
HOSTCXXFLAGS = -O2
|
||||
|
||||
+# With the move to GCC 6, we have implicitly upgraded our language
|
||||
+# standard to GNU11 (see https://gcc.gnu.org/gcc-5/porting_to.html).
|
||||
+# Some Linux distributions (including RHEL7, SLES13, Debian 8) still
|
||||
+# have older compilers as their default, so we make it explicit for
|
||||
+# these that our host tools are GNU11 (i.e. C11 w/ GNU extensions).
|
||||
+ifeq ($(HOSTOS),linux)
|
||||
+HOSTCFLAGS += --std=gnu11
|
||||
+endif
|
||||
+
|
||||
ifeq ($(HOSTOS),cygwin)
|
||||
HOSTCFLAGS += -ansi
|
||||
endif
|
@ -1,41 +0,0 @@
|
||||
From 7fcf14b5dafa574cb9f565afebc8428c50f0be02 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rini <trini@konsulko.com>
|
||||
Date: Tue, 19 Jun 2018 23:53:54 -0400
|
||||
Subject: [PATCH] Makefile: Ensure we build with -std=gnu11
|
||||
|
||||
As many targets are now commonly built with gcc-6 or later (which
|
||||
defaults to a newer C standard than older compilers), certain C
|
||||
constructs are now being used as they produce more readable code. And
|
||||
while all compilers that we support building with support the C11
|
||||
standard (and GNU11) they do not default to that standard. Ensure that
|
||||
we pass along -std=gnu11 when building.
|
||||
|
||||
Signed-off-by: Tom Rini <trini@konsulko.com>
|
||||
---
|
||||
Makefile | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 484a1eb01d..752bff499e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -265,8 +265,9 @@ HOSTCXXFLAGS = -O2
|
||||
# Some Linux distributions (including RHEL7, SLES13, Debian 8) still
|
||||
# have older compilers as their default, so we make it explicit for
|
||||
# these that our host tools are GNU11 (i.e. C11 w/ GNU extensions).
|
||||
+CSTD_FLAG := -std=gnu11
|
||||
ifeq ($(HOSTOS),linux)
|
||||
-HOSTCFLAGS += --std=gnu11
|
||||
+HOSTCFLAGS += $(CSTD_FLAG)
|
||||
endif
|
||||
|
||||
ifeq ($(HOSTOS),cygwin)
|
||||
@@ -368,7 +369,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
|
||||
|
||||
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
|
||||
-Wno-format-security \
|
||||
- -fno-builtin -ffreestanding
|
||||
+ -fno-builtin -ffreestanding $(CSTD_FLAG)
|
||||
KBUILD_CFLAGS += -fshort-wchar
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
|
@ -1,45 +0,0 @@
|
||||
From dcee38742d6376e3fec6e5997077c681d28d1656 Mon Sep 17 00:00:00 2001
|
||||
From: Bin Meng <bmeng.cn@gmail.com>
|
||||
Date: Sun, 16 Sep 2018 22:35:28 -0700
|
||||
Subject: [PATCH] Makefile: Use -fno-strict-aliasing globally
|
||||
|
||||
The -fstrict-aliasing option is implicitly enabled at levels -O2,
|
||||
-O3, -Os by GCC. This option allows the compiler to assume the
|
||||
strictest aliasing rules applicable to the language being compiled.
|
||||
For example, the practice of reading from a different union member
|
||||
than the one most recently written to (called "type-punning") is
|
||||
common. In this case, "type-punning" only works if the memory is
|
||||
accessed through the union type, but might not work by taking the
|
||||
address, casting the resulting pointer and dereferencing the result,
|
||||
which is an undefined behavior per the "strict aliasing rules".
|
||||
|
||||
GCC's -Wstrict-aliasing (included in -Wall) option does not catch
|
||||
all cases, but does attempt to catch the more common pitfalls. So
|
||||
there are cases that GCC does not report but the codes are violating
|
||||
the "strict aliasing rules".
|
||||
|
||||
Given lots of codes that may be written to rely on "type-punning",
|
||||
and Linux kernel disables it by -fno-strict-aliasing globally, since
|
||||
U-Boot currently does this on nds32/riscv/x86 builds only, extend
|
||||
this for all architecture builds.
|
||||
|
||||
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
||||
Reviewed-by: Tom Rini <trini@konsulko.com>
|
||||
Reviewed-by: Simon Glass <sjg@chromium.org>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 752bff499e..14cf1fae33 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -370,7 +370,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
|
||||
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
|
||||
-Wno-format-security \
|
||||
-fno-builtin -ffreestanding $(CSTD_FLAG)
|
||||
-KBUILD_CFLAGS += -fshort-wchar
|
||||
+KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
|
||||
# Read UBOOTRELEASE from include/config/uboot.release (if it exists)
|
@ -1,96 +0,0 @@
|
||||
From e8fbd5e12c5aa1decf37c6d2baf5c0f00d4ac058 Mon Sep 17 00:00:00 2001
|
||||
From: Jagan Teki <jagan@amarulasolutions.com>
|
||||
Date: Tue, 7 May 2019 23:51:49 +0530
|
||||
Subject: [PATCH] dts: Makefile: Build rockchip dtbs based on SoC types
|
||||
|
||||
- Sometimes u-boot specific dtsi files are included
|
||||
automatically which would build for entire rockchip SoC,
|
||||
even-though the respective dtsi should used it for specific
|
||||
family of rockchip SoC.
|
||||
- Sometimes u-boot specific dts nodes or properties can use
|
||||
config macros from respective rockchip family include/configs
|
||||
files, example CONFIG_SPL_PAD_TO.
|
||||
|
||||
So, it's better to compile the dtbs based on the respective
|
||||
rockchip family types rather than rockchip itself to avoid
|
||||
compilation issues.
|
||||
|
||||
This patch organize the existing dtb's based on the rockchip
|
||||
family types.
|
||||
|
||||
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
|
||||
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
---
|
||||
arch/arm/dts/Makefile | 44 ++++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 33 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index 594614a2c6..7e42e612a9 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -27,12 +27,23 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
|
||||
exynos5800-peach-pi.dtb \
|
||||
exynos5422-odroidxu3.dtb
|
||||
dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb
|
||||
-dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
- rk3036-sdk.dtb \
|
||||
- rk3066a-mk808.dtb \
|
||||
- rk3126-evb.dtb \
|
||||
- rk3128-evb.dtb \
|
||||
- rk3188-radxarock.dtb \
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3036) += \
|
||||
+ rk3036-sdk.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3066) += \
|
||||
+ rk3066a-mk808.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3126) += \
|
||||
+ rk3126-evb.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3128) += \
|
||||
+ rk3128-evb.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3188) += \
|
||||
+ rk3188-radxarock.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3288) += \
|
||||
rk3288-evb.dtb \
|
||||
rk3288-fennec.dtb \
|
||||
rk3288-firefly.dtb \
|
||||
@@ -44,19 +55,30 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3288-veyron-jerry.dtb \
|
||||
rk3288-veyron-mickey.dtb \
|
||||
rk3288-veyron-minnie.dtb \
|
||||
- rk3288-vyasa.dtb \
|
||||
- rk3308-evb.dtb \
|
||||
- rk3328-evb.dtb \
|
||||
+ rk3288-vyasa.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3308) += \
|
||||
+ rk3308-evb.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||||
+ rk3328-evb.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3368) += \
|
||||
rk3368-lion.dtb \
|
||||
rk3368-sheep.dtb \
|
||||
rk3368-geekbox.dtb \
|
||||
- rk3368-px5-evb.dtb \
|
||||
+ rk3368-px5-evb.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3399) += \
|
||||
rk3399-evb.dtb \
|
||||
rk3399-firefly.dtb \
|
||||
rk3399-puma-ddr1333.dtb \
|
||||
rk3399-puma-ddr1600.dtb \
|
||||
- rk3399-puma-ddr1866.dtb \
|
||||
+ rk3399-puma-ddr1866.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RV1108) += \
|
||||
rv1108-evb.dtb
|
||||
+
|
||||
dtb-$(CONFIG_ARCH_MESON) += \
|
||||
meson-gxbb-odroidc2.dtb
|
||||
dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
|
@ -1,70 +0,0 @@
|
||||
From ce513359d8507123e63f34b56e67ad558074be22 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Mueller <dmueller@suse.com>
|
||||
Date: Tue, 14 Jan 2020 18:53:41 +0100
|
||||
Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
|
||||
|
||||
commit e33a814e772cdc36436c8c188d8c42d019fda639 upstream.
|
||||
|
||||
gcc 10 will default to -fno-common, which causes this error at link
|
||||
time:
|
||||
|
||||
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||
|
||||
This is because both dtc-lexer as well as dtc-parser define the same
|
||||
global symbol yyloc. Before with -fcommon those were merged into one
|
||||
defintion. The proper solution would be to to mark this as "extern",
|
||||
however that leads to:
|
||||
|
||||
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
|
||||
26 | extern YYLTYPE yylloc;
|
||||
| ^~~~~~
|
||||
In file included from dtc-lexer.l:24:
|
||||
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
|
||||
127 | extern YYLTYPE yylloc;
|
||||
| ^~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
which means the declaration is completely redundant and can just be
|
||||
dropped.
|
||||
|
||||
Signed-off-by: Dirk Mueller <dmueller@suse.com>
|
||||
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||
[robh: cherry-pick from upstream]
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Rob Herring <robh@kernel.org>
|
||||
[nc: Also apply to dtc-lexer.lex.c_shipped due to a lack of
|
||||
e039139be8c2, where dtc-lexer.l started being used]
|
||||
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
scripts/dtc/dtc-lexer.l | 1 -
|
||||
scripts/dtc/dtc-lexer.lex.c_shipped | 1 -
|
||||
2 files changed, 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
|
||||
index 0ee1caf03dd0..a9b58b71e25e 100644
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
index 11cd78e72305..26932b00cf2d 100644
|
||||
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
@@ -637,7 +637,6 @@ char *yytext;
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
--
|
||||
2.27.0
|
||||
|
@ -1,4 +1,11 @@
|
||||
CONFIG_BOOTDELAY=1
|
||||
# CONFIG_EFI_LOADER is not set
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_SIGNATURE=y
|
||||
# CONFIG_DM_VIDEO is not set
|
||||
# CONFIG_DISPLAY is not set
|
||||
# CONFIG_ENV_IS_IN_MMC is not set
|
||||
# CONFIG_NET_RANDOM_ETHADDR is not set
|
||||
# CONFIG_USB_KEYBOARD is not set
|
||||
# CONFIG_TPL_DRIVERS_MISC is not set
|
||||
CONFIG_MISC=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_SHA256=y
|
||||
|
13
projects/Rockchip/bootloader/firmware
Normal file
13
projects/Rockchip/bootloader/firmware
Normal file
@ -0,0 +1,13 @@
|
||||
export ROCKCHIP_LEGACY_BOOT=$("${ROOT}"/"${SCRIPTS}"/uboot_helper "${PROJECT}" "${DEVICE}" "${UBOOT_SYSTEM}" rockchip_legacy_boot) || "${ROCKCHIP_LEGACY_BOOT:-}"
|
||||
|
||||
if [ "${ROCKCHIP_LEGACY_BOOT}" = "1" ]; then
|
||||
export UBOOT_TARGET="u-boot-dtb.bin"
|
||||
else
|
||||
export UBOOT_TARGET=""
|
||||
fi
|
||||
|
||||
if [ -n "${ATF_PLATFORM}" ]; then
|
||||
if [ -f "$(get_install_dir atf)/usr/share/bootloader/bl31.elf" ]; then
|
||||
export BL31="$(get_install_dir atf)/usr/share/bootloader/bl31.elf"
|
||||
fi
|
||||
fi
|
@ -3,63 +3,53 @@
|
||||
|
||||
PKG_RKBIN="$(get_build_dir rkbin)"
|
||||
PKG_SOC="${DEVICE/RK/rk}"
|
||||
UBOOT_CONFIG=$("${ROOT}"/"${SCRIPTS}"/uboot_helper "${PROJECT}" "${DEVICE}" "${UBOOT_SYSTEM}" config)
|
||||
|
||||
case "${PKG_SOC}" in
|
||||
rk3036)
|
||||
PKG_DATAFILE="spl/u-boot-spl-nodtb.bin"
|
||||
PKG_LOADER="u-boot-dtb.bin"
|
||||
;;
|
||||
rk3288)
|
||||
PKG_DATAFILE="${PKG_RKBIN}/rk32/rk3288_ddr_400MHz_v1.08.bin"
|
||||
PKG_LOADER="${PKG_RKBIN}/rk32/rk3288_miniloader_v2.58.bin"
|
||||
PKG_LOAD_ADDR="0x0"
|
||||
;;
|
||||
rk3328)
|
||||
PKG_DATAFILE="${PKG_RKBIN}/rk33/rk3328_ddr_786MHz_v1.16.bin"
|
||||
PKG_LOADER="${PKG_RKBIN}/rk33/rk3328_miniloader_v2.50.bin"
|
||||
PKG_BL31="${PKG_RKBIN}/rk33/rk3328_bl31_v1.42.elf"
|
||||
PKG_BL31_ADDR="0x10000"
|
||||
PKG_LOAD_ADDR="0x200000"
|
||||
;;
|
||||
rk3399)
|
||||
PKG_DATAFILE="${PKG_RKBIN}/rk33/rk3399_ddr_800MHz_v1.24.bin"
|
||||
PKG_LOADER="${PKG_RKBIN}/rk33/rk3399_miniloader_v1.24.bin"
|
||||
PKG_BL31="${PKG_RKBIN}/rk33/rk3399_bl31_v1.31.elf"
|
||||
PKG_BL31_ADDR="0x40000"
|
||||
PKG_LOAD_ADDR="0x200000"
|
||||
;;
|
||||
*)
|
||||
PKG_DATAFILE="spl/u-boot-spl-dtb.bin"
|
||||
PKG_LOADER="u-boot-dtb.bin"
|
||||
;;
|
||||
esac
|
||||
if [ "${ROCKCHIP_LEGACY_BOOT}" = "1" ]; then
|
||||
echo "install: building Rockchip legacy boot chain ..."
|
||||
|
||||
if [ -n "${PKG_DATAFILE}" -a -n "${PKG_LOADER}" ]; then
|
||||
tools/mkimage -n ${PKG_SOC} -T rksd -d "${PKG_DATAFILE}" idbloader.img
|
||||
cat "${PKG_LOADER}" >> idbloader.img
|
||||
cp -av idbloader.img ${INSTALL}/usr/share/bootloader
|
||||
if [ ! -f u-boot-dtb.bin ]; then
|
||||
echo "install: u-boot-dtb.bin does not exist UBOOT_TARGET: ${UBOOT_TARGET}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKG_BOOT_INI="${PKG_RKBIN}"/RKBOOT/"${DEVICE}"MINIALL.ini
|
||||
if [ ! -f "${PKG_BOOT_INI}" ]; then
|
||||
echo "install: ${PKG_BOOT_INI} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PKG_DDR_BIN="${PKG_RKBIN}"/$(sed -n "/FlashData/s/FlashData=//p" "${PKG_BOOT_INI}")
|
||||
PKG_MINILOADER="${PKG_RKBIN}"/$(sed -n "/FlashBoot/s/FlashBoot=//p" "${PKG_BOOT_INI}")
|
||||
PKG_LOAD_ADDR=$(sed -n "/SYS_TEXT_BASE/s/#define CONFIG_SYS_TEXT_BASE //p" u-boot.cfg)
|
||||
|
||||
# Override sdram frequency
|
||||
if [ "${DEVICE}" = "RK3328" ]; then
|
||||
sed -s 's/\x4d\x1\x4d\x1\x4d\x1\x4d\x1\x4d\x1\x4d\x1/\x20\x3\x20\x3\x20\x3\x20\x3\x20\x3\x20\x3/g' -i "${PKG_DDR_BIN}"
|
||||
sed -s 's/\x90\x1\x90\x1\x90\x1\x90\x1\x90\x1\x90\x1/\x20\x3\x20\x3\x20\x3\x20\x3\x20\x3\x20\x3/g' -i "${PKG_DDR_BIN}"
|
||||
fi
|
||||
|
||||
${PKG_RKBIN}/tools/mkimage -n "${PKG_SOC}" -T rksd -d "${PKG_DDR_BIN}":"${PKG_MINILOADER}" idbloader.img.rk || exit 1
|
||||
${PKG_RKBIN}/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img.rk "${PKG_LOAD_ADDR}" || exit 1
|
||||
|
||||
dd if=idbloader.img.rk of="${UBOOT_FIT_IMAGE}" seek=0 conv=fsync,notrunc > /dev/null 2>&1 || exit 1
|
||||
dd if=uboot.img.rk of="${UBOOT_FIT_IMAGE}" seek=16320 conv=fsync,notrunc > /dev/null 2>&1 || exit 1
|
||||
|
||||
if [ "${TARGET_ARCH}" = "aarch64" -o "${TARGET_KERNEL_ARCH}" = "arm64" ]; then
|
||||
PKG_ATF_INI="${PKG_RKBIN}"/RKTRUST/"${DEVICE}"TRUST.ini
|
||||
if [ ! -f "${PKG_ATF_INI}" ]; then
|
||||
echo "install: ${PKG_ATF_INI} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"${PKG_RKBIN}"/tools/trust_merger --ignore-bl32 --prepath "${PKG_RKBIN}"/ "${PKG_ATF_INI}" || exit 1
|
||||
dd if=trust.img of="${UBOOT_FIT_IMAGE}" seek=24512 conv=fsync,notrunc > /dev/null 2>&1 || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${PKG_LOAD_ADDR}" ]; then
|
||||
${PKG_RKBIN}/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img ${PKG_LOAD_ADDR}
|
||||
cp -av uboot.img ${INSTALL}/usr/share/bootloader
|
||||
fi
|
||||
|
||||
if [ -n "${PKG_BL31}" ]; then
|
||||
cat >trust.ini <<EOF
|
||||
[BL30_OPTION]
|
||||
SEC=0
|
||||
[BL31_OPTION]
|
||||
SEC=1
|
||||
PATH=${PKG_BL31}
|
||||
ADDR=${PKG_BL31_ADDR}
|
||||
[BL32_OPTION]
|
||||
SEC=0
|
||||
[BL33_OPTION]
|
||||
SEC=0
|
||||
[OUTPUT]
|
||||
PATH=trust.img
|
||||
EOF
|
||||
${PKG_RKBIN}/tools/trust_merger --verbose trust.ini
|
||||
cp -av trust.img ${INSTALL}/usr/share/bootloader
|
||||
if [ -f "${UBOOT_FIT_IMAGE}" ]; then
|
||||
cp -av "${UBOOT_FIT_IMAGE}" "${INSTALL}"/usr/share/bootloader
|
||||
else
|
||||
echo "install: bootloader ${UBOOT_FIT_IMAGE} was not built."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -1,15 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/idbloader.img" ]; then
|
||||
echo "image: burn idbloader.img to image..."
|
||||
dd if="${RELEASE_DIR}/3rdparty/bootloader/idbloader.img" of="${DISK}" bs=32k seek=1 conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/uboot.img" ]; then
|
||||
echo "image: burn uboot.img to image..."
|
||||
dd if="${RELEASE_DIR}/3rdparty/bootloader/uboot.img" of="${DISK}" bs=64k seek=128 conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
fi
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/trust.img" ]; then
|
||||
echo "image: burn trust.img to image..."
|
||||
dd if="${RELEASE_DIR}/3rdparty/bootloader/trust.img" of="${DISK}" bs=64k seek=192 conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
if [ -n "${UBOOT_SYSTEM}" ]; then
|
||||
BOOTLOADER_PATH="${RELEASE_DIR}/3rdparty/bootloader/u-boot-rockchip.bin"
|
||||
if [ -f "${BOOTLOADER_PATH}" ]; then
|
||||
echo "image: burn bootloader to image..."
|
||||
dd if="${BOOTLOADER_PATH}" of="${DISK}" seek=64 conv=fsync,notrunc >"${SAVE_ERROR}" 2>&1 || show_error
|
||||
else
|
||||
echo "image: bootloader ${BOOTLOADER_PATH} does not exist.";
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
@ -1,20 +1,23 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
SRCDIR="${BUILD}/image/system/usr/share/bootloader"
|
||||
DSTDIR="${RELEASE_DIR}/3rdparty/bootloader"
|
||||
SRCDIR="${BUILD}"/image/system/usr/share/bootloader
|
||||
DSTDIR="${RELEASE_DIR}"/3rdparty/bootloader
|
||||
|
||||
mkdir -p "${DSTDIR}"
|
||||
if [ -n "${UBOOT_SYSTEM}" ]; then
|
||||
if [ -f "${SRCDIR}/idbloader.img" ]; then
|
||||
cp -a "${SRCDIR}/idbloader.img" "${DSTDIR}"
|
||||
fi
|
||||
if [ -f "${SRCDIR}/uboot.img" ]; then
|
||||
cp -a "${SRCDIR}/uboot.img" "${DSTDIR}"
|
||||
fi
|
||||
if [ -f "${SRCDIR}/trust.img" ]; then
|
||||
cp -a "${SRCDIR}/trust.img" "${DSTDIR}"
|
||||
if [ -n "${UBOOT_SYSTEM}" ]; then
|
||||
if [ -f "${SRCDIR}"/"${UBOOT_FIT_IMAGE}" ]; then
|
||||
cp -av "${SRCDIR}"/"${UBOOT_FIT_IMAGE}" "${DSTDIR}" && \
|
||||
ln -sfv "${UBOOT_FIT_IMAGE}" "${DSTDIR}"/idbloader.img || exit 1
|
||||
if [ "${ROCKCHIP_LEGACY_BOOT}" = "1" ]; then
|
||||
touch "${DSTDIR}"/.rockchip_boot_chain_old
|
||||
else
|
||||
touch "${DSTDIR}"/.rockchip_boot_chain_new
|
||||
fi
|
||||
else
|
||||
echo "release: bootloader image ${SRCDIR}/${UBOOT_FIT_IMAGE} does not exist."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cp -a "${SRCDIR}"/${DEVICE,,}*.dtb "${DSTDIR}"
|
||||
cp -av "${SRCDIR}"/"${DEVICE,,}"*.dtb "${DSTDIR}"
|
||||
|
@ -57,19 +57,9 @@ fi
|
||||
done
|
||||
|
||||
# update bootloader
|
||||
if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/idbloader.img ]; then
|
||||
echo -n "Updating idbloader.img... "
|
||||
dd if=${SYSTEM_ROOT}/usr/share/bootloader/idbloader.img of=${BOOT_DISK} bs=32k seek=1 conv=fsync &>/dev/null
|
||||
echo "done"
|
||||
fi
|
||||
if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/uboot.img ]; then
|
||||
echo -n "Updating uboot.img... "
|
||||
dd if=${SYSTEM_ROOT}/usr/share/bootloader/uboot.img of=${BOOT_DISK} bs=64k seek=128 conv=fsync &>/dev/null
|
||||
echo "done"
|
||||
fi
|
||||
if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/trust.img ]; then
|
||||
echo -n "Updating trust.img... "
|
||||
dd if=${SYSTEM_ROOT}/usr/share/bootloader/trust.img of=${BOOT_DISK} bs=64k seek=192 conv=fsync &>/dev/null
|
||||
if [ -f ${SYSTEM_ROOT}/usr/share/bootloader/u-boot-rockchip.bin ]; then
|
||||
echo -n "Updating fit image u-boot-rockchip.bin ... "
|
||||
dd if=${SYSTEM_ROOT}/usr/share/bootloader/u-boot-rockchip.bin of=${BOOT_DISK} seek=64 conv=fsync &>/dev/null
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
|
21
projects/Rockchip/devices/RK3288/bootloader/config
Normal file
21
projects/Rockchip/devices/RK3288/bootloader/config
Normal file
@ -0,0 +1,21 @@
|
||||
CONFIG_BOOTDELAY=1
|
||||
# CONFIG_DM_VIDEO is not set
|
||||
# CONFIG_DISPLAY is not set
|
||||
# CONFIG_ENV_IS_IN_MMC is not set
|
||||
# CONFIG_NET_RANDOM_ETHADDR is not set
|
||||
# CONFIG_USB_KEYBOARD is not set
|
||||
# CONFIG_FIT is not set
|
||||
# CONFIG_FIT_VERBOSE is not set
|
||||
# CONFIG_SPL_LOAD_FIT is not set
|
||||
# CONFIG_SPL_OPTEE_IMAGE
|
||||
# CONFIG_TPL_DRIVERS_MISC is not set
|
||||
# CONFIG_SPL_TEXT_BASE is not set
|
||||
# CONFIG_SPL_ROCKCHIP_BACK_TO_BROM is not set
|
||||
CONFIG_SPL_TEXT_BASE=0x0
|
||||
CONFIG_MISC=y
|
||||
CONFIG_MISC_INIT_R=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_SHA256=y
|
||||
CONFIG_TPL=y
|
||||
CONFIG_SPL_SIZE_LIMIT=0x4b000
|
||||
CONFIG_SYS_TEXT_BASE=0x01000000
|
@ -18,6 +18,11 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Firmware
|
||||
UBOOT_FIRMWARE+=" atf"
|
||||
ATF_PLATFORM="rk3328"
|
||||
ATF_BL31_BINARY="bl31/bl31.elf"
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
@ -26,10 +31,7 @@
|
||||
GRAPHIC_DRIVERS="lima"
|
||||
|
||||
# kernel serial console
|
||||
EXTRA_CMDLINE="console=tty0 coherent_pool=2M cec.debounce_ms=5000"
|
||||
if [ "$UBOOT_SYSTEM" != "box-trn9" ]; then
|
||||
EXTRA_CMDLINE="console=uart8250,mmio32,0xff130000 $EXTRA_CMDLINE"
|
||||
fi
|
||||
EXTRA_CMDLINE="console=uart8250,mmio32,0xff130000 console=tty0 coherent_pool=2M cec.debounce_ms=5000"
|
||||
|
||||
# set the addon project
|
||||
ADDON_PROJECT="ARMv8"
|
||||
|
@ -18,6 +18,11 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Firmware
|
||||
UBOOT_FIRMWARE+=" atf"
|
||||
ATF_PLATFORM="rk3399"
|
||||
ATF_BL31_BINARY="bl31/bl31.elf"
|
||||
|
||||
# Kernel target
|
||||
KERNEL_TARGET="Image"
|
||||
|
||||
|
@ -5,11 +5,9 @@
|
||||
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
|
||||
BOOTLOADER="u-boot"
|
||||
|
||||
# U-Boot make target
|
||||
UBOOT_TARGET="u-boot-dtb.bin"
|
||||
|
||||
# U-Boot firmware package(s) to use
|
||||
UBOOT_FIRMWARE="rkbin"
|
||||
UBOOT_FIT_IMAGE="u-boot-rockchip.bin"
|
||||
|
||||
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
|
||||
KERNEL_MAKE_EXTRACMD="dtbs"
|
||||
|
13
projects/Rockchip/patches/atf/0001-rk3399-atf-fix-baud.patch
Normal file
13
projects/Rockchip/patches/atf/0001-rk3399-atf-fix-baud.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/plat/rockchip/rk3399/rk3399_def.h b/plat/rockchip/rk3399/rk3399_def.h
|
||||
index ba83242ebe..8d6ecfbe66 100644
|
||||
--- a/plat/rockchip/rk3399/rk3399_def.h
|
||||
+++ b/plat/rockchip/rk3399/rk3399_def.h
|
||||
@@ -17,7 +17,7 @@
|
||||
/**************************************************************************
|
||||
* UART related constants
|
||||
**************************************************************************/
|
||||
-#define RK3399_BAUDRATE 115200
|
||||
+#define RK3399_BAUDRATE 1500000
|
||||
#define RK3399_UART_CLOCK 24000000
|
||||
|
||||
/******************************************************************************
|
@ -0,0 +1,292 @@
|
||||
From ae3121ae4a50702c8e52078ed52bd279d339b68b Mon Sep 17 00:00:00 2001
|
||||
From: Francis Fan <francis.fan@rock-chips.com>
|
||||
Date: Tue, 7 Nov 2017 17:50:11 +0800
|
||||
Subject: [PATCH] rockchip: efuse: add support for RK322x non-secure efuse
|
||||
block
|
||||
|
||||
Signed-off-by: Francis Fan <francis.fan@rock-chips.com>
|
||||
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
|
||||
---
|
||||
drivers/misc/rockchip-efuse.c | 96 +++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 92 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
|
||||
index 083ee65e0a..85a9384581 100644
|
||||
--- a/drivers/misc/rockchip-efuse.c
|
||||
+++ b/drivers/misc/rockchip-efuse.c
|
||||
@@ -27,6 +27,17 @@
|
||||
#define RK3399_STROBE BIT(1)
|
||||
#define RK3399_CSB BIT(0)
|
||||
|
||||
+#define RK3288_A_SHIFT 6
|
||||
+#define RK3288_A_MASK 0x3ff
|
||||
+#define RK3288_NFUSES 32
|
||||
+#define RK3288_BYTES_PER_FUSE 1
|
||||
+#define RK3288_PGENB BIT(3)
|
||||
+#define RK3288_LOAD BIT(2)
|
||||
+#define RK3288_STROBE BIT(1)
|
||||
+#define RK3288_CSB BIT(0)
|
||||
+
|
||||
+typedef int (*EFUSE_READ)(struct udevice *dev, int offset, void *buf, int size);
|
||||
+
|
||||
struct rockchip_efuse_regs {
|
||||
u32 ctrl; /* 0x00 efuse control register */
|
||||
u32 dout; /* 0x04 efuse data out register */
|
||||
@@ -53,7 +64,7 @@ static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
|
||||
*/
|
||||
|
||||
struct udevice *dev;
|
||||
- u8 fuses[128];
|
||||
+ u8 fuses[128] = {0};
|
||||
int ret;
|
||||
|
||||
/* retrieve the device */
|
||||
@@ -77,7 +88,7 @@ static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
- rk3399_dump_efuses, 1, 1, dump_efuses,
|
||||
+ rockchip_dump_efuses, 1, 1, dump_efuses,
|
||||
"Dump the content of the efuses",
|
||||
""
|
||||
);
|
||||
@@ -127,10 +138,59 @@ static int rockchip_rk3399_efuse_read(struct udevice *dev, int offset,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int rockchip_rk3288_efuse_read(struct udevice *dev, int offset,
|
||||
+ void *buf, int size)
|
||||
+{
|
||||
+ struct rockchip_efuse_plat *plat = dev_get_plat(dev);
|
||||
+ struct rockchip_efuse_regs *efuse =
|
||||
+ (struct rockchip_efuse_regs *)plat->base;
|
||||
+ u8 *buffer = buf;
|
||||
+ int max_size = RK3288_NFUSES * RK3288_BYTES_PER_FUSE;
|
||||
+
|
||||
+ if (size > (max_size - offset))
|
||||
+ size = max_size - offset;
|
||||
+
|
||||
+ /* Switch to read mode */
|
||||
+ writel(RK3288_LOAD | RK3288_PGENB, &efuse->ctrl);
|
||||
+ udelay(1);
|
||||
+
|
||||
+ while (size--) {
|
||||
+ writel(readl(&efuse->ctrl) &
|
||||
+ (~(RK3288_A_MASK << RK3288_A_SHIFT)),
|
||||
+ &efuse->ctrl);
|
||||
+ /* set addr */
|
||||
+ writel(readl(&efuse->ctrl) |
|
||||
+ ((offset++ & RK3288_A_MASK) << RK3288_A_SHIFT),
|
||||
+ &efuse->ctrl);
|
||||
+ udelay(1);
|
||||
+ /* strobe low to high */
|
||||
+ writel(readl(&efuse->ctrl) |
|
||||
+ RK3288_STROBE, &efuse->ctrl);
|
||||
+ ndelay(60);
|
||||
+ /* read data */
|
||||
+ *buffer++ = readl(&efuse->dout);
|
||||
+ /* reset strobe to low */
|
||||
+ writel(readl(&efuse->ctrl) &
|
||||
+ (~RK3288_STROBE), &efuse->ctrl);
|
||||
+ udelay(1);
|
||||
+ }
|
||||
+
|
||||
+ /* Switch to standby mode */
|
||||
+ writel(RK3288_PGENB | RK3288_CSB, &efuse->ctrl);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rockchip_efuse_read(struct udevice *dev, int offset,
|
||||
void *buf, int size)
|
||||
{
|
||||
- return rockchip_rk3399_efuse_read(dev, offset, buf, size);
|
||||
+ EFUSE_READ efuse_read = NULL;
|
||||
+
|
||||
+ efuse_read = (EFUSE_READ)dev_get_driver_data(dev);
|
||||
+ if (!efuse_read)
|
||||
+ return -ENOSYS;
|
||||
+
|
||||
+ return (*efuse_read)(dev, offset, buf, size);
|
||||
}
|
||||
|
||||
static const struct misc_ops rockchip_efuse_ops = {
|
||||
@@ -146,7 +206,35 @@ static int rockchip_efuse_of_to_plat(struct udevice *dev)
|
||||
}
|
||||
|
||||
static const struct udevice_id rockchip_efuse_ids[] = {
|
||||
- { .compatible = "rockchip,rk3399-efuse" },
|
||||
+ /* deprecated but kept around for dts binding compatibility */
|
||||
+ {
|
||||
+ .compatible = "rockchip,rockchip-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3066a-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3188-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3228-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3288-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3368-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3399-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3399_efuse_read,
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
From 8b1ce76598895a8979c98cdf27a408b19727d708 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Chen <chenjh@rock-chips.com>
|
||||
Date: Thu, 2 Aug 2018 20:33:16 +0800
|
||||
Subject: [PATCH] rockchip: efuse: add support for RK3328 non-secure efuse
|
||||
block
|
||||
|
||||
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
|
||||
---
|
||||
drivers/misc/rockchip-efuse.c | 67 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 67 insertions(+)
|
||||
|
||||
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
|
||||
index 85a9384581..1b0e81f4ad 100644
|
||||
--- a/drivers/misc/rockchip-efuse.c
|
||||
+++ b/drivers/misc/rockchip-efuse.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <dm.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <malloc.h>
|
||||
#include <misc.h>
|
||||
|
||||
#define RK3399_A_SHIFT 16
|
||||
@@ -36,6 +37,13 @@
|
||||
#define RK3288_STROBE BIT(1)
|
||||
#define RK3288_CSB BIT(0)
|
||||
|
||||
+#define RK3328_INT_STATUS 0x0018
|
||||
+#define RK3328_DOUT 0x0020
|
||||
+#define RK3328_AUTO_CTRL 0x0024
|
||||
+#define RK3328_INT_FINISH BIT(0)
|
||||
+#define RK3328_AUTO_ENB BIT(0)
|
||||
+#define RK3328_AUTO_RD BIT(1)
|
||||
+
|
||||
typedef int (*EFUSE_READ)(struct udevice *dev, int offset, void *buf, int size);
|
||||
|
||||
struct rockchip_efuse_regs {
|
||||
@@ -46,6 +54,10 @@ struct rockchip_efuse_regs {
|
||||
u32 jtag_pass; /* 0x10 JTAG password */
|
||||
u32 strobe_finish_ctrl;
|
||||
/* 0x14 efuse strobe finish control register */
|
||||
+ u32 int_status;/* 0x18 */
|
||||
+ u32 reserved; /* 0x1c */
|
||||
+ u32 dout2; /* 0x20 */
|
||||
+ u32 auto_ctrl; /* 0x24 */
|
||||
};
|
||||
|
||||
struct rockchip_efuse_plat {
|
||||
@@ -181,6 +193,57 @@ static int rockchip_rk3288_efuse_read(struct udevice *dev, int offset,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int rockchip_rk3328_efuse_read(struct udevice *dev, int offset,
|
||||
+ void *buf, int size)
|
||||
+{
|
||||
+ struct rockchip_efuse_plat *plat = dev_get_plat(dev);
|
||||
+ struct rockchip_efuse_regs *efuse =
|
||||
+ (struct rockchip_efuse_regs *)plat->base;
|
||||
+ unsigned int addr_start, addr_end, addr_offset, addr_len;
|
||||
+ u32 out_value, status;
|
||||
+ u8 *buffer;
|
||||
+ int ret = 0, i = 0, j = 0;
|
||||
+
|
||||
+ /* Max non-secure Byte */
|
||||
+ if (size > 32)
|
||||
+ size = 32;
|
||||
+
|
||||
+ /* 128 Byte efuse, 96 Byte for secure, 32 Byte for non-secure */
|
||||
+ offset += 96;
|
||||
+ addr_start = rounddown(offset, RK3399_BYTES_PER_FUSE) /
|
||||
+ RK3399_BYTES_PER_FUSE;
|
||||
+ addr_end = roundup(offset + size, RK3399_BYTES_PER_FUSE) /
|
||||
+ RK3399_BYTES_PER_FUSE;
|
||||
+ addr_offset = offset % RK3399_BYTES_PER_FUSE;
|
||||
+ addr_len = addr_end - addr_start;
|
||||
+
|
||||
+ buffer = calloc(1, sizeof(*buffer) * addr_len * RK3399_BYTES_PER_FUSE);
|
||||
+ if (!buffer)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ for (j = 0; j < addr_len; j++) {
|
||||
+ writel(RK3328_AUTO_RD | RK3328_AUTO_ENB |
|
||||
+ ((addr_start++ & RK3399_A_MASK) << RK3399_A_SHIFT),
|
||||
+ &efuse->auto_ctrl);
|
||||
+ udelay(5);
|
||||
+ status = readl(&efuse->int_status);
|
||||
+ if (!(status & RK3328_INT_FINISH)) {
|
||||
+ ret = -EIO;
|
||||
+ goto err;
|
||||
+ }
|
||||
+ out_value = readl(&efuse->dout2);
|
||||
+ writel(RK3328_INT_FINISH, &efuse->int_status);
|
||||
+
|
||||
+ memcpy(&buffer[i], &out_value, RK3399_BYTES_PER_FUSE);
|
||||
+ i += RK3399_BYTES_PER_FUSE;
|
||||
+ }
|
||||
+ memcpy(buf, buffer + addr_offset, size);
|
||||
+err:
|
||||
+ free(buffer);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int rockchip_efuse_read(struct udevice *dev, int offset,
|
||||
void *buf, int size)
|
||||
{
|
||||
@@ -231,6 +294,10 @@ static const struct udevice_id rockchip_efuse_ids[] = {
|
||||
.compatible = "rockchip,rk3368-efuse",
|
||||
.data = (ulong)&rockchip_rk3288_efuse_read,
|
||||
},
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3328-efuse",
|
||||
+ .data = (ulong)&rockchip_rk3328_efuse_read,
|
||||
+ },
|
||||
{
|
||||
.compatible = "rockchip,rk3399-efuse",
|
||||
.data = (ulong)&rockchip_rk3399_efuse_read,
|
||||
|
||||
From add1c5f168cdf625813e5a159af1057e6a9f96e2 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sun, 11 Sep 2022 10:56:43 +0200
|
||||
Subject: [PATCH] arm: dts: enable efuse for RK3288
|
||||
|
||||
---
|
||||
arch/arm/dts/rk3288.dtsi | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/rk3288.dtsi b/arch/arm/dts/rk3288.dtsi
|
||||
index 9fb6d86bc1..4d0a7190f0 100644
|
||||
--- a/arch/arm/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/dts/rk3288.dtsi
|
||||
@@ -866,8 +866,7 @@
|
||||
|
||||
efuse: efuse@ffb40000 {
|
||||
compatible = "rockchip,rk3288-efuse";
|
||||
- reg = <0xffb40000 0x10000>;
|
||||
- status = "disabled";
|
||||
+ reg = <0xffb40000 0x20>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@ffc01000 {
|
@ -0,0 +1,39 @@
|
||||
From 16bcb2e9a7e187d76d0f627668ad2babf66126e4 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
|
||||
Date: Sat, 23 Jul 2022 13:23:19 +0200
|
||||
Subject: [PATCH] rockchip: rk3328: Set VOP QoS to high priority
|
||||
|
||||
The default priority for the quality of service for the video
|
||||
output results in unsightly glitches on the output whenever there
|
||||
is memory pressure on the system, which happens a lot.
|
||||
|
||||
This sets the VOP QoS to high priority, which fixes this issue.
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
|
||||
---
|
||||
arch/arm/mach-rockchip/rk3328/rk3328.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
|
||||
index de17b88682..58300bdf3f 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
|
||||
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
|
||||
@@ -19,6 +19,8 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#define GRF_BASE 0xFF100000
|
||||
#define UART2_BASE 0xFF130000
|
||||
#define FW_DDR_CON_REG 0xFF7C0040
|
||||
+#define QOS_VOP_OFFSET 0xFF760080
|
||||
+#define QOS_VOP_PRIORITY 0x8
|
||||
|
||||
const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
|
||||
[BROM_BOOTSOURCE_EMMC] = "/mmc@ff520000",
|
||||
@@ -54,6 +56,9 @@ int arch_cpu_init(void)
|
||||
|
||||
/* Disable the ddr secure region setting to make it non-secure */
|
||||
rk_setreg(FW_DDR_CON_REG, 0x200);
|
||||
+#else
|
||||
+ printf("Setting VOP QoS\n");
|
||||
+ rk_setreg(QOS_VOP_OFFSET + QOS_VOP_PRIORITY, 0xF);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/arch/arm/dts/rk3288-u-boot.dtsi b/arch/arm/dts/rk3288-u-boot.dtsi
|
||||
index 9eb696b141..3f3c77ca64 100644
|
||||
--- a/arch/arm/dts/rk3288-u-boot.dtsi
|
||||
+++ b/arch/arm/dts/rk3288-u-boot.dtsi
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
chosen {
|
||||
u-boot,spl-boot-order = \
|
||||
- "same-as-spl", &emmc, &sdmmc;
|
||||
+ "same-as-spl", &sdmmc, &emmc;
|
||||
};
|
||||
|
||||
dmc: dmc@ff610000 {
|
@ -271,75 +271,78 @@ devices = \
|
||||
},
|
||||
'tinker': {
|
||||
'dtb': 'rk3288-tinker-s.dtb',
|
||||
'config': 'tinker-rk3288_defconfig'
|
||||
'config': 'tinker-s-rk3288_defconfig'
|
||||
},
|
||||
},
|
||||
'RK3328': {
|
||||
'a1': {
|
||||
'dtb': 'rk3328-a1.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
'config': 'evb-rk3328_defconfig',
|
||||
'rockchip_legacy_boot': '1'
|
||||
},
|
||||
'roc-cc': {
|
||||
'dtb': 'rk3328-roc-cc.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
'config': 'roc-cc-rk3328_defconfig'
|
||||
},
|
||||
'rock64': {
|
||||
'dtb': 'rk3328-rock64.dtb',
|
||||
'config': 'evb-rk3328_defconfig'
|
||||
'config': 'rock64-rk3328_defconfig'
|
||||
},
|
||||
},
|
||||
'RK3399': {
|
||||
'hugsun-x99': {
|
||||
'dtb': 'rk3399-hugsun-x99.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'evb-rk3399_defconfig',
|
||||
'rockchip_legacy_boot': '1'
|
||||
},
|
||||
'khadas-edge': {
|
||||
'dtb': 'rk3399-khadas-edge.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'khadas-edge-rk3399_defconfig'
|
||||
},
|
||||
'nanopc-t4': {
|
||||
'dtb': 'rk3399-nanopc-t4.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'nanopc-t4-rk3399_defconfig'
|
||||
},
|
||||
'nanopi-m4': {
|
||||
'dtb': 'rk3399-nanopi-m4.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'nanopi-m4-rk3399_defconfig'
|
||||
},
|
||||
'orangepi': {
|
||||
'dtb': 'rk3399-orangepi.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'orangepi-rk3399_defconfig'
|
||||
},
|
||||
'rock960': {
|
||||
'dtb': 'rk3399-rock960.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'rock960-rk3399_defconfig'
|
||||
},
|
||||
'rock-pi-4': {
|
||||
'dtb': 'rk3399-rock-pi-4b.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'rock-pi-4-rk3399_defconfig'
|
||||
},
|
||||
'rock-pi-4-plus': {
|
||||
'dtb': 'rk3399-rock-pi-4b-plus.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'rock-pi-4-rk3399_defconfig'
|
||||
},
|
||||
'rock-pi-n10': {
|
||||
'dtb': 'rk3399pro-rock-pi-n10.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'rock-pi-n10-rk3399pro_defconfig'
|
||||
},
|
||||
'rockpro64': {
|
||||
'dtb': 'rk3399-rockpro64.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'rockpro64-rk3399_defconfig'
|
||||
},
|
||||
'roc-pc': {
|
||||
'dtb': 'rk3399-roc-pc-mezzanine.dtb',
|
||||
'config': 'firefly-rk3399_defconfig'
|
||||
'config': 'roc-pc-mezzanine-rk3399_defconfig'
|
||||
},
|
||||
'roc-pc-plus': {
|
||||
'dtb': 'rk3399-roc-pc-plus.dtb',
|
||||
'config': 'firefly-rk3399_defconfig'
|
||||
'config': 'roc-pc-rk3399_defconfig'
|
||||
},
|
||||
'sapphire': {
|
||||
'dtb': 'rk3399-sapphire.dtb',
|
||||
'config': 'evb-rk3399_defconfig'
|
||||
'config': 'evb-rk3399_defconfig',
|
||||
'rockchip_legacy_boot': '1'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user