meta-facebook: meta-yosemitev2: switch u-boot to 2019.04

Switching the u-boot branch from the 2016.07-aspeed-openbmc
to the 2019.04-aspeed-openbmc

Added the config file to modify the defconfig file from
the uboot-machine.
Removing the files related to the 2016.07-aspeed branch.

Tested: Tested in YosemiteV2 platform and Verified.

Signed-off-by: Logananth Sundararaj <logananth_s@hcl.com>
Change-Id: I2687d92bba5dcf7602440b3ae59113093e09e379
diff --git a/meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf b/meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf
index 2573a4e..4a52054 100644
--- a/meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf
+++ b/meta-facebook/meta-yosemitev2/conf/machine/yosemitev2.conf
@@ -1,10 +1,12 @@
 KMACHINE = "aspeed"
 KERNEL_DEVICETREE = "${KMACHINE}-bmc-facebook-${MACHINE}.dtb"
 
-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-aspeed"
-PREFERRED_PROVIDER_u-boot = "u-boot-aspeed"
-PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-fw-utils-aspeed"
-UBOOT_MACHINE = "ast_g5_ncsi_config"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot-aspeed-sdk"
+PREFERRED_PROVIDER_u-boot = "u-boot-aspeed-sdk"
+PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-fw-utils-aspeed-sdk"
+
+UBOOT_DEVICETREE = "ast2500-evb"
+UBOOT_MACHINE = "evb-ast2500_defconfig"
 
 require conf/machine/include/facebook-compute-multihost.inc
 require conf/machine/include/ast2500.inc
diff --git a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0001-board-aspeed-Add-Mux-for-yosemitev2.patch
similarity index 84%
rename from meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch
rename to meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0001-board-aspeed-Add-Mux-for-yosemitev2.patch
index 9f2799f..0b34dce 100644
--- a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch
+++ b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0001-board-aspeed-Add-Mux-for-yosemitev2.patch
@@ -1,33 +1,33 @@
-From f09b84e61569f2b991cc3e257c34517a222922d3 Mon Sep 17 00:00:00 2001
-From: Logananth Sundararaj <logananth.s@hcl.com>
-Date: Fri, 3 Dec 2021 15:21:50 +0530
+From 5a649c3dd0452eba0028c51546e2981e0b04de4f Mon Sep 17 00:00:00 2001
+From: Logananth Sundararaj <logananth_s@hcl.com>
+Date: Tue, 8 Mar 2022 19:18:27 +0530
 Subject: [PATCH] board-aspeed-Add-Mux-for-yosemitev2
 
-Signed-off-by: Logananth Sundararaj <logananth.s@hcl.com>
+Signed-off-by: Logananth Sundararaj <logananth_s@hcl.com>
 ---
- arch/arm/mach-aspeed/platform_g5.S | 191 ++++++++++++++++++++++++-----
+ arch/arm/mach-aspeed/ast2500/platform.S | 191 ++++++++++++++++++++----
  1 file changed, 162 insertions(+), 29 deletions(-)
 
-diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S
-index 2ac1ca4721..e1c17ae4a3 100644
---- a/arch/arm/mach-aspeed/platform_g5.S
-+++ b/arch/arm/mach-aspeed/platform_g5.S
+diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
+index aef55c4a0a..137ed2c587 100644
+--- a/arch/arm/mach-aspeed/ast2500/platform.S
++++ b/arch/arm/mach-aspeed/ast2500/platform.S
 @@ -302,6 +302,156 @@ TIME_TABLE_DDR4_1600:
      ldr   r2, =0x00000800
      .endm
-
+ 
 +    .macro console_bmc
 +    ldr r0, =0x1e780024
-+ldr r1, [r0]
-+orr r1, r1, #0xF
-+str r1, [r0]
++    ldr r1, [r0]
++    orr r1, r1, #0xF
++    str r1, [r0]
 +
-+ldr r0, =0x1e780020
-+ldr r1, [r0]
-+and r1, r1, #0xFFFFFFF0
-+orr r1, r1, #0xC
-+str r1, [r0]
-+.endm
++    ldr r0, =0x1e780020
++    ldr r1, [r0]
++    and r1, r1, #0xFFFFFFF0
++    orr r1, r1, #0xC
++    str r1, [r0]
++    .endm
 +
 +.macro console_sel
 +
@@ -71,7 +71,7 @@
 + console_bmc
 +  b case_end\@
 +case_pos2\@:
-+  //Test for position#2
++ //Test for position#2
 +  ldr r1, =0x01
 +  cmp r0, r1
 +  bne case_pos3\@
@@ -169,7 +169,7 @@
      .macro print_hex_char
      and   r1, r1, #0xF
      cmp   r1, #9
-@@ -324,6 +474,16 @@ init_dram:
+@@ -321,6 +471,16 @@ init_dram:
      /********************************************
         Initial Reset Procedure : Begin
       *******************************************/
@@ -186,19 +186,19 @@
      /* Clear AHB bus lock condition */
      ldr   r0, =0x1e600000
      ldr   r1, =0xAEED1A03
-@@ -793,6 +953,8 @@ wait_ddr_reset:
+@@ -794,6 +954,8 @@ wait_ddr_reset:
      clear_delay_timer
      /* end delay 10ms */
-
+ 
 +    uart_console_setup
 +
  /* Debug - UART console message */
  #ifdef CONFIG_DRAM_UART_TO_UART1
      ldr   r0, =0x1e78909c                        @ route UART5 to UART Port1, 2016.08.29
-@@ -806,35 +968,6 @@ wait_ddr_reset:
+@@ -807,35 +969,6 @@ wait_ddr_reset:
      str   r1, [r0]
  #endif
-
+ 
 -    ldr   r0, =0x1e78400c
 -    mov   r1, #0x83
 -    str   r1, [r0]
@@ -231,6 +231,5 @@
      ldr   r0, =0x1e784000
      mov   r1, #0x0D                              @ '\r'
      str   r1, [r0]
---
+-- 
 2.17.1
-
diff --git a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0002-spl-host-console-handle.patch
similarity index 84%
rename from meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch
rename to meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0002-spl-host-console-handle.patch
index b396595..509910e 100644
--- a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch
+++ b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/0002-spl-host-console-handle.patch
@@ -1,6 +1,6 @@
-From 99fdec9719987ce93e4582d31cb7d08c5beb51ef Mon Sep 17 00:00:00 2001
-From: Logananth Sundararaj <logananth.s@hcl.com>
-Date: Mon, 20 Dec 2021 16:51:22 +0530
+From 1fb38f86a77ec6656f87f427124a65dc6c0fdf5f Mon Sep 17 00:00:00 2001
+From: Logananth Sundararaj <logananth_s@hcl.com>
+Date: Tue, 8 Mar 2022 19:24:49 +0530
 Subject: [PATCH] spl-host-console-handle
 
 This patch adds four 1S server console through debug card
@@ -46,18 +46,18 @@
 0       1       1       0        SLOT4
 1       0       0       1        BMC Debug
 
-Signed-off-by: Logananth Sundararaj <logananth.s@hcl.com>
+Signed-off-by: Logananth Sundararaj <logananth_s@hcl.com>
 ---
- arch/arm/mach-aspeed/platform_g5.S | 69 ++++++++++++++++++++++++++----
+ arch/arm/mach-aspeed/ast2500/platform.S | 69 ++++++++++++++++++++++---
  1 file changed, 61 insertions(+), 8 deletions(-)
 
-diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S
-index f14b5acc6b..340d7b2b91 100644
---- a/arch/arm/mach-aspeed/platform_g5.S
-+++ b/arch/arm/mach-aspeed/platform_g5.S
-@@ -315,6 +315,59 @@ orr r1, r1, #0xC
- str r1, [r0]
- .endm
+diff --git a/arch/arm/mach-aspeed/ast2500/platform.S b/arch/arm/mach-aspeed/ast2500/platform.S
+index 137ed2c587..76a31c709a 100644
+--- a/arch/arm/mach-aspeed/ast2500/platform.S
++++ b/arch/arm/mach-aspeed/ast2500/platform.S
+@@ -315,6 +315,59 @@ TIME_TABLE_DDR4_1600:
+     str r1, [r0]
+     .endm
  
 +  .macro console_slot1
 +  ldr r0, =0x1e780024
@@ -120,15 +120,15 @@
    cmp r0, r1
    bne case_pos2\@
 - console_bmc
-+  console_slot1
++ console_slot1
    b case_end\@
  case_pos2\@:
-   //Test for position#2
+  //Test for position#2
    ldr r1, =0x01
    cmp r0, r1
    bne case_pos3\@
 - console_bmc
-+  console_slot2
++ console_slot2
    b case_end\@
  case_pos3\@:
   //Test for position#3
@@ -181,5 +181,5 @@
     b case_end\@
  case_pos10\@:
     //Test for position#10
---
+-- 
 2.17.1
diff --git a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/yosemitev2.cfg b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/yosemitev2.cfg
new file mode 100644
index 0000000..6cc537e
--- /dev/null
+++ b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk/yosemitev2.cfg
@@ -0,0 +1,5 @@
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttyS4,57600n8 root=/dev/ram rw"
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="bootm 20080000"
+CONFIG_BAUDRATE=57600
diff --git a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
similarity index 82%
rename from meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
rename to meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
index 298738f..e87a349 100644
--- a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
+++ b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -1,3 +1,4 @@
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 SRC_URI +="file://0001-board-aspeed-Add-Mux-for-yosemitev2.patch"
 SRC_URI +="file://0002-spl-host-console-handle.patch"
+SRC_URI +="file://yosemitev2.cfg"