uboot-tools/dragonboard-fixes.patch

207 lines
5.6 KiB
Diff
Raw Normal View History

2017-12-22 01:35:59 +00:00
From ce71ddd50a6752b805974893464a88a0f145fe42 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 20 Dec 2017 08:22:08 +0000
Subject: [PATCH] Dragonboard fixes
2017-12-22 01:35:59 +00:00
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
2017-12-22 01:35:59 +00:00
arch/arm/dts/dragonboard410c.dts | 9 +++++-
board/qualcomm/dragonboard410c/Makefile | 1 +
board/qualcomm/dragonboard410c/dragonboard410c.c | 8 ++++++
board/qualcomm/dragonboard410c/lowlevel_init.S | 36 ++++++++++++++++++++++++
common/usb_storage.c | 4 +--
configs/dragonboard410c_defconfig | 11 ++++++++
include/configs/dragonboard410c.h | 4 +--
7 files changed, 68 insertions(+), 5 deletions(-)
create mode 100644 board/qualcomm/dragonboard410c/lowlevel_init.S
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
2017-12-22 01:35:59 +00:00
index 7746622dda..a47b95264c 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
2017-12-22 01:35:59 +00:00
@@ -23,11 +23,16 @@
reg = <0 0x80000000 0 0x3da00000>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ };
+
chosen {
stdout-path = "/soc/serial@78b0000";
};
-
soc {
#address-cells = <0x1>;
#size-cells = <0x1>;
@@ -67,6 +72,7 @@
reg = <0x78d9000 0x400>;
};
+/*
sdhci@07824000 {
compatible = "qcom,sdhci-msm-v4";
reg = <0x7824900 0x11c 0x7824000 0x800>;
2017-12-22 01:35:59 +00:00
@@ -76,6 +82,7 @@
clock = <&clkc 0>;
clock-frequency = <100000000>;
};
+*/
sdhci@07864000 {
compatible = "qcom,sdhci-msm-v4";
diff --git a/board/qualcomm/dragonboard410c/Makefile b/board/qualcomm/dragonboard410c/Makefile
index cd678088fa..5082383be4 100644
--- a/board/qualcomm/dragonboard410c/Makefile
+++ b/board/qualcomm/dragonboard410c/Makefile
@@ -5,4 +5,5 @@
#
obj-y := dragonboard410c.o
+obj-y += lowlevel_init.o
extra-y += head.o
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
2017-12-22 01:35:59 +00:00
index 848e27848b..da1cd2cbc9 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -27,6 +27,14 @@ int dram_init_banksize(void)
return 0;
}
+extern unsigned long fw_dtb_pointer;
+
+void *board_fdt_blob_setup(void)
+{
+ if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
+ return NULL;
+ return (void *)fw_dtb_pointer;
+}
int board_prepare_usb(enum usb_init_type type)
{
diff --git a/board/qualcomm/dragonboard410c/lowlevel_init.S b/board/qualcomm/dragonboard410c/lowlevel_init.S
new file mode 100644
index 0000000000..cdbd8e14db
--- /dev/null
+++ b/board/qualcomm/dragonboard410c/lowlevel_init.S
@@ -0,0 +1,36 @@
+/*
+ * (C) Copyright 2016
+ * Cédric Schieli <cschieli@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <config.h>
+
+.align 8
+.global fw_dtb_pointer
+fw_dtb_pointer:
+#ifdef CONFIG_ARM64
+ .dword 0x0
+#else
+ .word 0x0
+#endif
+
+/*
+ * Routine: save_boot_params (called after reset from start.S)
+ * Description: save ATAG/FDT address provided by the firmware at boot time
+ */
+
+.global save_boot_params
+save_boot_params:
+
+ /* The firmware provided ATAG/FDT address can be found in r2/x0 */
+#ifdef CONFIG_ARM64
+ adr x8, fw_dtb_pointer
+ str x0, [x8]
+#else
+ str r2, fw_dtb_pointer
+#endif
+
+ /* Returns */
+ b save_boot_params_ret
2017-12-22 01:35:59 +00:00
diff --git a/common/usb_storage.c b/common/usb_storage.c
index a91b1c0d2f..caea87a09f 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1018,7 +1018,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss)
2017-12-22 01:35:59 +00:00
static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
{
- int retries = 10;
+ int retries = 20;
2017-12-22 01:35:59 +00:00
do {
memset(&srb->cmd[0], 0, 12);
@@ -1041,7 +1041,7 @@ static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
if ((srb->sense_buf[2] == 0x02) &&
(srb->sense_buf[12] == 0x3a))
return -1;
- mdelay(100);
+ mdelay(250);
} while (retries--);
return -1;
2017-09-19 08:30:31 +00:00
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
2017-12-22 01:35:59 +00:00
index b71bff7592..4738f3a08b 100644
2017-09-19 08:30:31 +00:00
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
2017-10-17 09:43:37 +00:00
@@ -9,6 +9,7 @@ CONFIG_BOOTARGS="console=ttyMSM0,115200n8"
# CONFIG_DISPLAY_BOARDINFO is not set
2017-09-19 08:30:31 +00:00
CONFIG_SYS_PROMPT="dragonboard410c => "
# CONFIG_CMD_IMI is not set
+CONFIG_CMD_POWEROFF=y
CONFIG_CMD_MD5SUM=y
CONFIG_CMD_MEMINFO=y
2017-10-17 09:43:37 +00:00
CONFIG_CMD_GPIO=y
2017-12-22 01:35:59 +00:00
@@ -21,6 +22,8 @@ CONFIG_ENV_IS_IN_MMC=y
2017-09-19 08:30:31 +00:00
CONFIG_CLK=y
CONFIG_MSM_GPIO=y
CONFIG_PM8916_GPIO=y
+CONFIG_DM_KEYBOARD=y
2017-10-17 09:43:37 +00:00
+CONFIG_DM_ETH=y
2017-09-19 08:30:31 +00:00
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_DM_MMC=y
2017-12-22 01:35:59 +00:00
@@ -37,10 +40,18 @@ CONFIG_USB_EHCI_HCD=y
2017-10-17 09:43:37 +00:00
CONFIG_USB_EHCI_MSM=y
2017-09-19 08:30:31 +00:00
CONFIG_USB_ULPI_VIEWPORT=y
CONFIG_USB_ULPI=y
+CONFIG_USB_KEYBOARD=y
2017-10-17 09:43:37 +00:00
CONFIG_USB_STORAGE=y
2017-09-19 08:30:31 +00:00
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_ASIX88179=y
CONFIG_USB_ETHER_MCS7830=y
+CONFIG_USB_ETHER_RTL8152=y
CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_DM_VIDEO=y
+# CONFIG_VIDEO_BPP8 is not set
+CONFIG_NO_FB_CLEAR=y
+CONFIG_VIDEO_SIMPLE=y
+CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
2017-12-22 01:35:59 +00:00
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index d2447b27d8..5dbd4dcaa1 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -92,8 +92,8 @@ REFLASH(dragonboard/u-boot.img, 8)\
"initrd_high=0xffffffffffffffff\0" \
"linux_image=Image\0" \
"kernel_addr_r=0x81000000\0"\
- "fdtfile=apq8016-sbc.dtb\0" \
- "fdt_addr_r=0x83000000\0"\
+ "fdtfile=qcom/apq8016-sbc.dtb\0" \
+ "fdt_addr_r=0x81e00000\0"\
"ramdisk_addr_r=0x84000000\0"\
"scriptaddr=0x90000000\0"\
"pxefile_addr_r=0x90100000\0"\
2017-09-19 08:30:31 +00:00
--
2017-12-22 01:35:59 +00:00
2.14.3