2018.01 GA, various Dragonboard fixes and rebases

This commit is contained in:
Peter Robinson 2018-01-16 03:31:08 +00:00
parent d09dfd414d
commit ffcdd29013
8 changed files with 2961 additions and 173 deletions

View File

@ -1,5 +1,6 @@
bananapi_m64
dragonboard410c
dragonboard820c
espresso7420
evb-rk3328
evb-rk3399

View File

@ -111,6 +111,7 @@ Sinovoip_BPI_M3
smdkv310
stih410-b2260
sunxi_Gemei_G9
tbs_a711
tinker-rk3288
trimslice
turris_omnia

164
db-generic-fixes.patch Normal file
View File

@ -0,0 +1,164 @@
From 7921dacbe23c5430c8a6e12a7d3201eb55372297 Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Thu, 14 Dec 2017 12:09:07 +0100
Subject: [PATCH 01/15] spmi: msm: display the PMIC Arb version (debug)
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
drivers/spmi/spmi-msm.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index c226913f9e..e9bfbb0203 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -17,6 +17,11 @@
DECLARE_GLOBAL_DATA_PTR;
+
+/* PMIC Arbiter configuration registers */
+#define PMIC_ARB_VERSION 0x0000
+#define PMIC_ARB_VERSION_V2_MIN 0x20010000
+
#define ARB_CHANNEL_OFFSET(n) (0x4 * (n))
#define SPMI_CH_OFFSET(chnl) ((chnl) * 0x8000)
@@ -148,6 +153,8 @@ static int msm_spmi_probe(struct udevice *dev)
struct udevice *parent = dev->parent;
struct msm_spmi_priv *priv = dev_get_priv(dev);
int node = dev_of_offset(dev);
+ u32 hw_ver;
+ bool is_v1;
int i;
priv->arb_chnl = devfdt_get_addr(dev);
@@ -155,6 +162,12 @@ static int msm_spmi_probe(struct udevice *dev)
dev_of_offset(parent), node, "reg", 1, NULL, false);
priv->spmi_obs = fdtdec_get_addr_size_auto_parent(gd->fdt_blob,
dev_of_offset(parent), node, "reg", 2, NULL, false);
+
+ hw_ver = readl(priv->arb_chnl + PMIC_ARB_VERSION - 0x800);
+ is_v1 = (hw_ver < PMIC_ARB_VERSION_V2_MIN);
+
+ dev_dbg(dev, "PMIC Arb Version-%d (0x%x)\n", (is_v1 ? 1 : 2), hw_ver);
+
if (priv->arb_chnl == FDT_ADDR_T_NONE ||
priv->spmi_core == FDT_ADDR_T_NONE ||
priv->spmi_obs == FDT_ADDR_T_NONE)
--
2.14.3
From e254dae128f67bf46fd651570edd2d139306e0af Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Tue, 19 Dec 2017 10:17:31 +0100
Subject: [PATCH 02/15] poplar: configs: increase gunzip buffer size for the
kernel
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
include/configs/poplar.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/poplar.h b/include/configs/poplar.h
index 1c39ed153f..8a12b526a8 100644
--- a/include/configs/poplar.h
+++ b/include/configs/poplar.h
@@ -18,7 +18,7 @@
#define CONFIG_NR_DRAM_BANKS 2
/* SYS */
-#define CONFIG_SYS_BOOTM_LEN 0x1400000
+#define CONFIG_SYS_BOOTM_LEN SZ_64M
#define CONFIG_SYS_INIT_SP_ADDR 0x200000
#define CONFIG_SYS_LOAD_ADDR 0x800000
#define CONFIG_SYS_MALLOC_LEN SZ_32M
--
2.14.3
From 85f2939d2130decf299bceb94086eb3fcbb2a5f1 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Fri, 23 Jun 2017 15:36:33 -0400
Subject: [PATCH 03/15] dm: core: parse chosen node
This is the node that would contain, for example, the framebuffer setup
by an earlier stage.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
arch/sandbox/dts/test.dts | 7 +++++++
drivers/core/root.c | 12 ++++++++++++
test/dm/bus.c | 2 +-
test/dm/test-fdt.c | 2 +-
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index e67d428eb2..3f9e788e6c 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -478,6 +478,13 @@
wdt0: wdt@0 {
compatible = "sandbox,wdt";
};
+
+ chosen {
+ chosen-test {
+ compatible = "denx,u-boot-fdt-test";
+ reg = <9 1>;
+ };
+ };
};
#include "sandbox_pmic.dtsi"
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 976e2c4fdd..5a1c5994f6 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -266,6 +266,18 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
for (offset = fdt_first_subnode(blob, offset);
offset > 0;
offset = fdt_next_subnode(blob, offset)) {
+
+ /* "chosen" node isn't a device itself but may contain some: */
+ if (!strcmp(fdt_get_name(blob, offset, NULL), "chosen")) {
+ pr_debug("parsing subnodes of \"chosen\"\n");
+
+ err = dm_scan_fdt_node(parent, blob, offset,
+ pre_reloc_only);
+ if (err && !ret)
+ ret = err;
+ continue;
+ }
+
if (pre_reloc_only &&
!dm_fdt_pre_reloc(blob, offset))
continue;
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 7006d4163d..1da398ae3a 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -105,7 +105,7 @@ UCLASS_DRIVER(testbus) = {
/* Test that we can probe for children */
static int dm_test_bus_children(struct unit_test_state *uts)
{
- int num_devices = 6;
+ int num_devices = 7;
struct udevice *bus;
struct uclass *uc;
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index dcc2ef8b65..920ccbf016 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -167,7 +167,7 @@ int dm_check_devices(struct unit_test_state *uts, int num_devices)
/* Test that FDT-based binding works correctly */
static int dm_test_fdt(struct unit_test_state *uts)
{
- const int num_devices = 6;
+ const int num_devices = 7;
struct udevice *dev;
struct uclass *uc;
int ret;
--
2.14.3

530
db410c-fixes.patch Normal file
View File

@ -0,0 +1,530 @@
From 38527d254b1d2c439c9e3ebbe2c82ecd7c729023 Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Wed, 13 Dec 2017 21:55:10 +0100
Subject: [PATCH 09/15] db410c: configs: increase gunzip buffer size for the
kernel
the kernel fails to boot when it goes over the limit.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
include/configs/dragonboard410c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index d2447b27d8..3c5bb8a678 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -23,7 +23,7 @@
#define CONFIG_SYS_TEXT_BASE 0x80080000
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x80000)
-#define CONFIG_SYS_BOOTM_LEN 0x1000000 /* 16MB max kernel size */
+#define CONFIG_SYS_BOOTM_LEN SZ_64M
/* UART */
--
2.14.3
From ddc4e0d38d32d6a8a65780cf00a337c639628ca1 Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Thu, 14 Dec 2017 11:12:12 +0100
Subject: [PATCH 10/15] db410c: update wlan and bt mac addresses from firmware
The firmware that runs before u-boot modifies u-boot's device tree
adding the local-mac-address and local-bd-address properties for the
compatibles "qcom,wcnss-bt" and "qcom,wcnss-wlan".
This commit reads that firmware, retrieves the properties and fixups
the device tree that is passed to the kernel before booting.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
arch/arm/dts/dragonboard410c.dts | 10 +++++
board/qualcomm/dragonboard410c/Makefile | 1 +
board/qualcomm/dragonboard410c/dragonboard410c.c | 49 +++++++++++++++++++++---
board/qualcomm/dragonboard410c/lowlevel_init.S | 28 ++++++++++++++
configs/dragonboard410c_defconfig | 3 ++
5 files changed, 85 insertions(+), 6 deletions(-)
create mode 100644 board/qualcomm/dragonboard410c/lowlevel_init.S
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 7746622dda..25aeac46b1 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -86,6 +86,16 @@
clock-frequency = <200000000>;
};
+ wcnss {
+ bt {
+ compatible="qcom,wcnss-bt";
+ };
+
+ wifi {
+ compatible="qcom,wcnss-wlan";
+ };
+ };
+
spmi@200f000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0x200f800 0x200 0x2400000 0x400000 0x2c00000 0x400000>;
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
index 848e27848b..9e5242170d 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -10,9 +10,16 @@
#include <dm.h>
#include <usb.h>
#include <asm/gpio.h>
+#include <fdt_support.h>
DECLARE_GLOBAL_DATA_PTR;
+/* pointer to the device tree ammended by the firmware */
+extern const void *fw_dtb;
+
+static char wlan_mac[ARP_HLEN];
+static char bt_mac[ARP_HLEN];
+
int dram_init(void)
{
gd->ram_size = PHYS_SDRAM_1_SIZE;
@@ -27,7 +34,6 @@ int dram_init_banksize(void)
return 0;
}
-
int board_prepare_usb(enum usb_init_type type)
{
static struct udevice *pmic_gpio;
@@ -96,11 +102,6 @@ int board_prepare_usb(enum usb_init_type type)
return 0;
}
-int board_init(void)
-{
- return 0;
-}
-
/* Check for vol- button - if pressed - stop autoboot */
int misc_init_r(void)
{
@@ -134,3 +135,39 @@ int misc_init_r(void)
return 0;
}
+
+int board_init(void)
+{
+ int offset, len;
+ const char *mac;
+
+ /* take a copy of the firmware information (the user could unknownly
+ overwrite that DDR via tftp or other means) */
+
+ offset = fdt_node_offset_by_compatible(fw_dtb, -1, "qcom,wcnss-wlan");
+ if (offset >= 0) {
+ mac = fdt_getprop(fw_dtb, offset, "local-mac-address", &len);
+ if (mac)
+ memcpy(wlan_mac, mac, ARP_HLEN);
+ }
+
+ offset = fdt_node_offset_by_compatible(fw_dtb, -1, "qcom,wcnss-bt");
+ if (offset >= 0) {
+ mac = fdt_getprop(fw_dtb, offset, "local-bd-address", &len);
+ if (mac)
+ memcpy(bt_mac, mac, ARP_HLEN);
+ }
+
+ return 0;
+}
+
+int ft_board_setup(void *blob, bd_t *bd)
+{
+ do_fixup_by_compat(blob, "qcom,wcnss-wlan", "local-mac-address",
+ wlan_mac, ARP_HLEN, 1);
+
+ do_fixup_by_compat(blob, "qcom,wcnss-bt", "local-bd-address",
+ bt_mac, ARP_HLEN, 1);
+
+ return 0;
+}
diff --git a/board/qualcomm/dragonboard410c/lowlevel_init.S b/board/qualcomm/dragonboard410c/lowlevel_init.S
new file mode 100644
index 0000000000..15b2d0c7fd
--- /dev/null
+++ b/board/qualcomm/dragonboard410c/lowlevel_init.S
@@ -0,0 +1,28 @@
+/*
+ * (C) Copyright 2016
+ * Cédric Schieli <cschieli@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <config.h>
+
+.align 8
+.global fw_dtb
+fw_dtb:
+ .dword 0x0
+
+/*
+ * 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 */
+ adr x8, fw_dtb
+ str x0, [x8]
+
+ /* Returns */
+ b save_boot_params_ret
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index b71bff7592..cfe9be97f3 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -44,3 +44,6 @@ CONFIG_USB_ETHER_ASIX88179=y
CONFIG_USB_ETHER_MCS7830=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_OF_CONTROL=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_OF_BOARD_SETUP=y
--
2.14.3
From 5bdb47f83df86729d770601e294207dc42fb68be Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Thu, 21 Dec 2017 11:27:56 +0100
Subject: [PATCH 11/15] db410c: replace reset driver with psci
this should be the norm for armv8 platforms.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
arch/arm/dts/dragonboard410c.dts | 5 ---
board/qualcomm/dragonboard410c/dragonboard410c.c | 5 +++
configs/dragonboard410c_defconfig | 2 +-
drivers/sysreset/Makefile | 2 --
drivers/sysreset/sysreset_snapdragon.c | 40 ------------------------
5 files changed, 6 insertions(+), 48 deletions(-)
delete mode 100644 drivers/sysreset/sysreset_snapdragon.c
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 25aeac46b1..b67e58882a 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -48,11 +48,6 @@
clock = <&clkc 4>;
};
- restart@4ab000 {
- compatible = "qcom,pshold";
- reg = <0x4ab000 0x4>;
- };
-
soc_gpios: pinctrl@1000000 {
compatible = "qcom,apq8016-pinctrl";
reg = <0x1000000 0x300000>;
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 9e5242170d..1c5ab7b175 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -171,3 +171,8 @@ int ft_board_setup(void *blob, bd_t *bd)
return 0;
}
+
+void reset_cpu(ulong addr)
+{
+ psci_system_reset();
+}
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index cfe9be97f3..de923adbc3 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -30,7 +30,6 @@ CONFIG_DM_PMIC=y
CONFIG_PMIC_PM8916=y
CONFIG_MSM_SERIAL=y
CONFIG_SPMI_MSM=y
-CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
@@ -47,3 +46,4 @@ CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_OF_BOARD_SETUP=y
+CONFIG_PSCI_RESET=y
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
index 2e9598e300..000c288eeb 100644
--- a/drivers/sysreset/Makefile
+++ b/drivers/sysreset/Makefile
@@ -8,10 +8,8 @@ obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
-
obj-$(CONFIG_ARCH_ROCKCHIP) += sysreset_rockchip.o
obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o
-obj-$(CONFIG_ARCH_SNAPDRAGON) += sysreset_snapdragon.o
obj-$(CONFIG_ARCH_STI) += sysreset_sti.o
obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o
obj-$(CONFIG_ARCH_ASPEED) += sysreset_ast.o
diff --git a/drivers/sysreset/sysreset_snapdragon.c b/drivers/sysreset/sysreset_snapdragon.c
deleted file mode 100644
index 9869813978..0000000000
--- a/drivers/sysreset/sysreset_snapdragon.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Qualcomm APQ8016 reset controller driver
- *
- * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-#include <dm.h>
-#include <errno.h>
-#include <sysreset.h>
-#include <asm/io.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static int msm_sysreset_request(struct udevice *dev, enum sysreset_t type)
-{
- phys_addr_t addr = devfdt_get_addr(dev);
- if (!addr)
- return -EINVAL;
- writel(0, addr);
- return -EINPROGRESS;
-}
-
-static struct sysreset_ops msm_sysreset_ops = {
- .request = msm_sysreset_request,
-};
-
-static const struct udevice_id msm_sysreset_ids[] = {
- { .compatible = "qcom,pshold" },
- { }
-};
-
-U_BOOT_DRIVER(msm_reset) = {
- .name = "msm_sysreset",
- .id = UCLASS_SYSRESET,
- .of_match = msm_sysreset_ids,
- .ops = &msm_sysreset_ops,
-};
--
2.14.3
From 0d607c98eaead3b14b15da821128b920b2bb7b13 Mon Sep 17 00:00:00 2001
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Date: Thu, 4 Jan 2018 19:27:56 +0100
Subject: [PATCH 13/15] db410c: use the device tree parsed by the lk loader.
We dont need to keep copies of the properties that we are going to
fixup since we will be using the dtb provided by the firmware.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
board/qualcomm/dragonboard410c/dragonboard410c.c | 71 ++++++++++++++----------
configs/dragonboard410c_defconfig | 1 +
2 files changed, 44 insertions(+), 28 deletions(-)
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 1c5ab7b175..236160afd4 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -15,14 +15,22 @@
DECLARE_GLOBAL_DATA_PTR;
/* pointer to the device tree ammended by the firmware */
-extern const void *fw_dtb;
+extern void *fw_dtb;
-static char wlan_mac[ARP_HLEN];
-static char bt_mac[ARP_HLEN];
+void *board_fdt_blob_setup(void)
+{
+ if (fdt_magic(fw_dtb) != FDT_MAGIC) {
+ printf("Firmware provided invalid dtb!\n");
+ return NULL;
+ }
+
+ return fw_dtb;
+}
int dram_init(void)
{
gd->ram_size = PHYS_SDRAM_1_SIZE;
+
return 0;
}
@@ -138,36 +146,43 @@ int misc_init_r(void)
int board_init(void)
{
- int offset, len;
- const char *mac;
-
- /* take a copy of the firmware information (the user could unknownly
- overwrite that DDR via tftp or other means) */
-
- offset = fdt_node_offset_by_compatible(fw_dtb, -1, "qcom,wcnss-wlan");
- if (offset >= 0) {
- mac = fdt_getprop(fw_dtb, offset, "local-mac-address", &len);
- if (mac)
- memcpy(wlan_mac, mac, ARP_HLEN);
- }
-
- offset = fdt_node_offset_by_compatible(fw_dtb, -1, "qcom,wcnss-bt");
- if (offset >= 0) {
- mac = fdt_getprop(fw_dtb, offset, "local-bd-address", &len);
- if (mac)
- memcpy(bt_mac, mac, ARP_HLEN);
- }
-
return 0;
}
int ft_board_setup(void *blob, bd_t *bd)
{
- do_fixup_by_compat(blob, "qcom,wcnss-wlan", "local-mac-address",
- wlan_mac, ARP_HLEN, 1);
-
- do_fixup_by_compat(blob, "qcom,wcnss-bt", "local-bd-address",
- bt_mac, ARP_HLEN, 1);
+ int offset, len, i;
+ const char *mac;
+ struct {
+ const char *compatible;
+ const char *property;
+ } fix[] = {
+ [0] = {
+ /* update the kernel's dtb with wlan mac */
+ .compatible = "qcom,wcnss-wlan",
+ .property = "local-mac-address",
+ },
+ [1] = {
+ /* update the kernel's dtb with bt mac */
+ .compatible = "qcom,wcnss-bt",
+ .property = "local-bd-address",
+ },
+ };
+
+ for ( i = 0; i < sizeof(fix)/sizeof(fix[0]); i++) {
+
+ offset = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
+ fix[i].compatible);
+ if (offset < 0)
+ continue;
+
+ mac = fdt_getprop(gd->fdt_blob, offset, fix[i].property, &len);
+ if (mac)
+ do_fixup_by_compat(blob,
+ fix[i].compatible,
+ fix[i].property,
+ mac, ARP_HLEN, 1);
+ }
return 0;
}
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index de923adbc3..4389f52b5c 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -47,3 +47,4 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_PSCI_RESET=y
+CONFIG_OF_SEPARATE=y
--
2.14.3
From ff6b1225ccc02e5bb963bd72f68a5a36f96ca816 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Wed, 19 Jul 2017 11:40:15 -0400
Subject: [PATCH 14/15] db410c: add reserved-memory node to dts
If lk lights up display and populates simple-framebuffer node, it will
also setup a reserved-memory node (needed by simplefb on linux). But
it isn't clever enough to cope when the reserved-memory node is not
present.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
arch/arm/dts/dragonboard410c.dts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index b67e58882a..5ccfe7f8c8 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -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>;
--
2.14.3
From ab8c14f869c2cdfe09a36619c965785fd60b9a3c Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Mon, 26 Jun 2017 10:29:40 -0400
Subject: [PATCH 15/15] db410c: on aarch64 the fdtfile is in per-vendor
subdirectory
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
include/configs/dragonboard410c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index 3c5bb8a678..530d667da8 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -92,7 +92,7 @@ REFLASH(dragonboard/u-boot.img, 8)\
"initrd_high=0xffffffffffffffff\0" \
"linux_image=Image\0" \
"kernel_addr_r=0x81000000\0"\
- "fdtfile=apq8016-sbc.dtb\0" \
+ "fdtfile=qcom/apq8016-sbc.dtb\0" \
"fdt_addr_r=0x83000000\0"\
"ramdisk_addr_r=0x84000000\0"\
"scriptaddr=0x90000000\0"\
--
2.14.3

2149
db820c-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,134 +1,17 @@
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
From a2782063c8daf9000d131e85200bc631a16450b4 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Wed, 21 Jun 2017 14:21:15 -0400
Subject: [PATCH 01/23] WIP: fix usb
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
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
common/usb_storage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 7746622dda..a47b95264c 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -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>;
@@ -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
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
diff --git a/common/usb_storage.c b/common/usb_storage.c
index a91b1c0d2f..caea87a09f 100644
index df0b057308..b2a3ab49ec 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)
@@ -996,7 +996,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss)
static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
{
@ -137,7 +20,7 @@ index a91b1c0d2f..caea87a09f 100644
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)
@@ -1019,7 +1019,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;
@ -146,61 +29,116 @@ index a91b1c0d2f..caea87a09f 100644
} while (retries--);
return -1;
--
2.13.3
From 40b06f8d422efc1d9674f081ef22445904c01f4f Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Mon, 3 Jul 2017 08:34:37 -0400
Subject: [PATCH 02/23] HACK: disable emmc
Hitting some timeout which makes boot take much longer. And
uefi/boot/rootfs partitions will be on sd-card or usb disk, etc,
so we can just ignore emmc.
---
arch/arm/dts/dragonboard410c.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index 7746622dda..0d3b7a35f4 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -67,6 +67,7 @@
reg = <0x78d9000 0x400>;
};
+/*
sdhci@07824000 {
compatible = "qcom,sdhci-msm-v4";
reg = <0x7824900 0x11c 0x7824000 0x800>;
@@ -76,6 +77,7 @@
clock = <&clkc 0>;
clock-frequency = <100000000>;
};
+*/
sdhci@07864000 {
compatible = "qcom,sdhci-msm-v4";
--
2.13.3
From 7f9d2f7d2ba72cbf62bdabaa98c489b514dc136c Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 16 Jan 2018 03:16:35 +0000
Subject: [PATCH 1/2] db410c: config updates
Enable USB keyboards and video output, VFAT writes (useful for EFI boot)
and a common USB eth adapter
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/dragonboard410c_defconfig | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index b71bff7592..4738f3a08b 100644
index 4389f52b5c..9dcadb938c 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -9,6 +9,7 @@ CONFIG_BOOTARGS="console=ttyMSM0,115200n8"
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_SYS_PROMPT="dragonboard410c => "
# CONFIG_CMD_IMI is not set
+CONFIG_CMD_POWEROFF=y
CONFIG_CMD_MD5SUM=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_GPIO=y
@@ -21,6 +22,8 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_CLK=y
CONFIG_MSM_GPIO=y
CONFIG_PM8916_GPIO=y
+CONFIG_DM_KEYBOARD=y
+CONFIG_DM_ETH=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_DM_MMC=y
@@ -37,10 +40,18 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MSM=y
CONFIG_USB_ULPI_VIEWPORT=y
CONFIG_USB_ULPI=y
+CONFIG_USB_KEYBOARD=y
CONFIG_USB_STORAGE=y
CONFIG_USB_HOST_ETHER=y
@@ -41,10 +41,20 @@ 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_DM_ETH=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_PSCI_RESET=y
CONFIG_OF_SEPARATE=y
+CONFIG_DM_KEYBOARD=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_DM_VIDEO=y
+# CONFIG_VIDEO_BPP8 is not set
+# CONFG_VIDEO_BPP8 is not set
+CONFIG_NO_FB_CLEAR=y
+CONFIG_VIDEO_SIMPLE=y
+CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
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"\
--
2.14.3
From 5d4690815f188a46a2eebad023403819fe4d053a Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 16 Jan 2018 03:23:07 +0000
Subject: [PATCH 2/2] db820c: config updates
Enable LEDs, FAT write, and various DT functionality
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/dragonboard820c_defconfig | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configs/dragonboard820c_defconfig b/configs/dragonboard820c_defconfig
index 8af54aa3c4..dcec65d212 100644
--- a/configs/dragonboard820c_defconfig
+++ b/configs/dragonboard820c_defconfig
@@ -35,9 +35,15 @@ CONFIG_DM_GPIO=y
CONFIG_DM_PMIC=y
CONFIG_PMIC_PM8916=y
CONFIG_PM8916_GPIO=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
CONFIG_CLK=y
CONFIG_PSCI_RESET=y
CONFIG_ENV_IS_IN_EXT4=y
CONFIG_ENV_EXT4_INTERFACE="mmc"
CONFIG_ENV_EXT4_DEVICE_AND_PART="0:1"
CONFIG_ENV_EXT4_FILE="/uboot.env"
+CONFIG_FAT_WRITE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_SEPARATE=y
--
2.14.3

View File

@ -1 +1 @@
SHA512 (u-boot-2018.01-rc3.tar.bz2) = c5c896b29f16e57ee1886d2905b9c19f16fe2294267604edfce7eb3cc0c50d149841e44da9c6b42805d672437966d0a7e5ebba6ca845ea28708554a6e12c0ae6
SHA512 (u-boot-2018.01.tar.bz2) = d5be907c2b7c54083ce5ce26d005d356355d2ad4dabcde7432eff8e90a6750dcd7a4b1eeafae52c79187defcf555f9e08b91b0085dc2245e86bc62696b44c5f2

View File

@ -1,8 +1,8 @@
%global candidate rc3
#global candidate rc3
Name: uboot-tools
Version: 2018.01
Release: 0.2%{?candidate:.%{candidate}}%{?dist}
Release: 1%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
@ -20,10 +20,12 @@ Patch1: uefi-use-Fedora-specific-path-name.patch
# general fixes
Patch2: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
Patch3: usb-kbd-fixes.patch
#Patch4: fdt-fixes.patch
# Board fixes and enablement
#Patch10: dragonboard-fixes.patch
Patch10: db-generic-fixes.patch
Patch11: db410c-fixes.patch
Patch12: db820c-support.patch
Patch13: dragonboard-fixes.patch
# Patch14: mvebu-enable-generic-distro-boot-config.patch
# Patch15: mx6-Initial-Hummingboard-2-support.patch
@ -283,6 +285,9 @@ cp -p board/warp7/README builds/docs/README.warp7
%endif
%changelog
* Tue Jan 9 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.01-1
- 2018.01
* Tue Jan 2 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.01-0.2.rc3
- 2018.01 RC3