u-boot-sdk: Use OpenBMC fork

This is a fork that is based on ASPEED's 2019.04 SDK fork. The goal is
to move to a mainline based tree, but while that work is underway, this
allows ast2600 support to move forward.

This gains support for NC-SI, and uses kconfig for the default
boot command allowing us to drop the patch to aspeed-common.h.

Machines will need to indicate which device tree to use. If possible we
should look to having a few common device trees, but for now they are
machine specific. The AST2600 is configured to use the ast2600a1-evb
device tree, which will also work on the a0 variant.

(From meta-aspeed rev: 22ccf4648a776c458300c97a6d001a843b2b5c9b)

Change-Id: Ib21dc9962761aac3f3148fe4908439b975545e1e
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-aspeed/conf/machine/evb-ast2600.conf b/meta-aspeed/conf/machine/evb-ast2600.conf
index 9c8c649..9fb38e0 100644
--- a/meta-aspeed/conf/machine/evb-ast2600.conf
+++ b/meta-aspeed/conf/machine/evb-ast2600.conf
@@ -1,5 +1,6 @@
 KERNEL_DEVICETREE = "aspeed-ast2600-evb.dtb"
-UBOOT_MACHINE = "evb-ast2600_defconfig"
+UBOOT_MACHINE = "ast2600_openbmc_defconfig"
+UBOOT_DEVICETREE = "ast2600a1-evb"
 
 require conf/machine/include/ast2600.inc
 
diff --git a/meta-aspeed/recipes-bsp/u-boot/files/0001-arm-evb-ast2600-put-environment-back-at-512KiB.patch b/meta-aspeed/recipes-bsp/u-boot/files/0001-arm-evb-ast2600-put-environment-back-at-512KiB.patch
deleted file mode 100644
index e010f26..0000000
--- a/meta-aspeed/recipes-bsp/u-boot/files/0001-arm-evb-ast2600-put-environment-back-at-512KiB.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2add5b8d1216be2e446a3d707767c2a5ec6be9f4 Mon Sep 17 00:00:00 2001
-From: Brad Bishop <bradleyb@fuzziesquirrel.com>
-Date: Thu, 5 Sep 2019 20:39:57 -0400
-Subject: [PATCH u-boot aspeed-dev-v2019.04] arm: evb-ast2600: put environment
- back at 512KiB
-
-Prior to 473f430b90 the environment was at 512KiB, and compatible with
-OpenBMC.  Restore OpenBMC compatibility by moving the environment back
-to 512KiB.
-
-Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
----
- include/configs/aspeed-common.h | 4 +++-
- include/configs/evb_ast2600.h   | 2 +-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
-index 7a730d17ad..d1eb4688e6 100644
---- a/include/configs/aspeed-common.h
-+++ b/include/configs/aspeed-common.h
-@@ -52,7 +52,9 @@
- /*
-  * Miscellaneous configurable options
-  */
--#define CONFIG_BOOTCOMMAND		"bootm 200a0000"
-+#ifndef CONFIG_BOOTCOMMAND
-+#define CONFIG_BOOTCOMMAND		"bootm 20080000"
-+#endif
- #define CONFIG_ENV_OVERWRITE
- 
- #define CONFIG_SYS_BOOTM_LEN 		(0x800000 * 2)
-diff --git a/include/configs/evb_ast2600.h b/include/configs/evb_ast2600.h
-index b4de42a05a..3a12f2f0d4 100644
---- a/include/configs/evb_ast2600.h
-+++ b/include/configs/evb_ast2600.h
-@@ -18,7 +18,7 @@
- 
- /* Environment */
- #define CONFIG_ENV_SIZE			0x10000
--#define CONFIG_ENV_OFFSET		0x90000
-+#define CONFIG_ENV_OFFSET		0x60000
- #define CONFIG_ENV_SECT_SIZE		(4 << 10)
- 
- #endif	/* __CONFIG_H */
--- 
-2.21.0
-
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk/flash-131072/bootcmd.cfg b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk/flash-131072/bootcmd.cfg
deleted file mode 100644
index 6862aae..0000000
--- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk/flash-131072/bootcmd.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="bootm 20100000"
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb
index fe85338..4910685 100644
--- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb
+++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb
@@ -1,6 +1,6 @@
 require u-boot-common-aspeed-sdk_${PV}.inc
 
-UBOOT_MAKE_TARGET ?= "u-boot.${UBOOT_SUFFIX}"
+UBOOT_MAKE_TARGET ?= "u-boot.${UBOOT_SUFFIX} DEVICE_TREE=${UBOOT_DEVICETREE}"
 
 require recipes-bsp/u-boot/u-boot.inc
 
diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc b/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc
index 31dc5f2..176981f 100644
--- a/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc
+++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-common-aspeed-sdk_2019.04.inc
@@ -8,16 +8,9 @@
 
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "4d29b04c7aca4121d542b759575fbb93e52aef47"
+SRCREV = "0a1334330ffe43d13eef58efdcf59a2c10c13e20"
 
-UBRANCH = "aspeed-dev-v2019.04"
-SRC_URI = "git://github.com/AspeedTech-BMC/u-boot;branch=${UBRANCH};protocol=https"
-SRC_URI += "file://0001-arm-evb-ast2600-put-environment-back-at-512KiB.patch"
-
-# There are different BOOTCOMMANDS for differently sized raw flash modules.
-ASPEED_IMAGE_SIZE_KB ?= "32768"
-MACHINEOVERRIDES .= ":flash-${ASPEED_IMAGE_SIZE_KB}"
-SRC_URI_append_flash-131072 = " file://bootcmd.cfg"
+SRC_URI = "git://git@github.com/openbmc/u-boot.git;nobranch=1;protocol=https"
 
 S = "${WORKDIR}/git"