From 2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Mon, 24 May 2021 12:54:37 -0700 Subject: Update to internal 0.52 Signed-off-by: Jason M. Bills --- ...acturing-mode-physical-presence-detection.patch | 89 +++++++++++++++++++--- ...g-uart1-uart2-in-u-boot-for-BIOS-messages.patch | 14 ++-- ...33-Reboot-into-UBOOT-on-Watchdog-Failures.patch | 50 ++++++------ ...ncrease-default-fan-speed-for-cooper-city.patch | 2 +- ...ip-counting-WDT2-event-when-EXTRST-is-set.patch | 14 ++-- .../0050-Set-UART-routing-in-lowlevel_init.patch | 43 +++++++++++ 6 files changed, 166 insertions(+), 46 deletions(-) create mode 100644 meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch (limited to 'meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files') diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch index 6932aebf0..76606db0a 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch @@ -1,4 +1,4 @@ -From 008edb2487358bb3f0f0ec1d753cc5bff7b08182 Mon Sep 17 00:00:00 2001 +From 3ed477feebb959749bd20a22e3acd8b39e22c193 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Thu, 20 Jun 2019 18:11:43 +0530 Subject: [PATCH] Manufacturing mode physical presence detection @@ -22,15 +22,15 @@ and no physical indication has been provided Change-Id: Id7e7c7e7860c7ef3ae8e3a7a7cfda7ff506c0f2b Signed-off-by: Richard Marian Thomaiyar Signed-off-by: AppaRao Puli - - --- board/aspeed/ast-g5/ast-g5-gpio.h | 2 +- - board/aspeed/ast-g5/ast-g5-intel.c | 35 ++++++++++++++++++++++++++++++ - 2 files changed, 36 insertions(+), 1 deletion(-) + board/aspeed/ast-g5/ast-g5-intel.c | 42 ++++++++++++++++++++++++++++++ + board/aspeed/ast-g5/ast-g5.c | 2 -- + common/autoboot.c | 16 ++++++++++-- + 4 files changed, 57 insertions(+), 5 deletions(-) diff --git a/board/aspeed/ast-g5/ast-g5-gpio.h b/board/aspeed/ast-g5/ast-g5-gpio.h -index 54b7388a22..8ccf437346 100644 +index 54b7388a22f5..8ccf4373460b 100644 --- a/board/aspeed/ast-g5/ast-g5-gpio.h +++ b/board/aspeed/ast-g5/ast-g5-gpio.h @@ -73,7 +73,7 @@ @@ -43,7 +43,7 @@ index 54b7388a22..8ccf437346 100644 // GPIO Configuration Register bits #define GPCFG_EVENT_TO_SMI (1 << 7) // 1 == enabled diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index 45ecd83fd3..efc3315caf 100644 +index 45ecd83fd3f0..79de13caa0af 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c @@ -24,6 +24,7 @@ enum gpio_names { @@ -65,7 +65,16 @@ index 45ecd83fd3..efc3315caf 100644 }; #define LPC_SNOOP_ADDR 0x80 -@@ -403,6 +408,30 @@ static void update_bootargs_cmd(const char *key, const char *value) +@@ -109,6 +114,8 @@ static const GPIOValue gpio_table[] = { + #define HOST_SERIAL_A_HIGH_SPEED (1 << 0) + #define HOST_SERIAL_B_HIGH_SPEED (1 << 1) + ++#define POWERON_RESET_BIT BIT(0) ++ + static void sgpio_init(void) + { + uint32_t value; +@@ -403,6 +410,30 @@ static void update_bootargs_cmd(const char *key, const char *value) free(buf); } @@ -96,16 +105,76 @@ index 45ecd83fd3..efc3315caf 100644 void ast_g5_intel_late_init(void) { char value[32]; -@@ -450,6 +479,12 @@ void ast_g5_intel_late_init(void) +@@ -450,6 +481,17 @@ void ast_g5_intel_late_init(void) ast_scu_write(0, AST_SCU_SYS_CTRL); update_bootargs_cmd("resetreason", value); + + /* Update the special mode in bootargs */ -+ if (is_mfg_mode_phy_req()) ++ if (reset_reason & POWERON_RESET_BIT && is_mfg_mode_phy_req()) + update_bootargs_cmd("special", "mfg"); + else + update_bootargs_cmd("special", NULL); ++} ++ ++void board_pre_abort_autoboot(void) ++{ ++ ast_enable_pass_through(); } static void pwm_init(void) +diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c +index d89a2b799a05..a4f3681c0602 100644 +--- a/board/aspeed/ast-g5/ast-g5.c ++++ b/board/aspeed/ast-g5/ast-g5.c +@@ -28,8 +28,6 @@ int board_early_init_f(void) + { + /* make sure uart5 is using 24MHz clock */ + ast_config_uart5_clk(); +- /*enable pass through*/ +- ast_enable_pass_through(); + arch_interrupt_init_early(); + + return 0; +diff --git a/common/autoboot.c b/common/autoboot.c +index d66c0fa63a3e..570d8956988c 100644 +--- a/common/autoboot.c ++++ b/common/autoboot.c +@@ -256,13 +256,21 @@ static int __abortboot(int bootdelay) + } + # endif /* CONFIG_AUTOBOOT_KEYED */ + ++/* Allow for board specific config when we check abort condition */ ++__weak void board_pre_abort_autoboot(void) ++{ ++ /* please define board specific board_pre_abort_autoboot() */ ++} ++ + static int abortboot(int bootdelay) + { + int abort = 0; + + # ifdef AST_G5_INTEL +- if (intel_force_firmware_jumper_enabled()) +- return 1; ++ if (intel_force_firmware_jumper_enabled()) { ++ abort = 1; ++ goto exit; ++ } + # endif + + if (bootdelay >= 0) +@@ -273,6 +281,10 @@ static int abortboot(int bootdelay) + gd->flags &= ~GD_FLG_SILENT; + #endif + ++exit: ++ if (abort) ++ board_pre_abort_autoboot(); ++ + return abort; + } + +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch index e3864db6e..fe95ef466 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0028-Enabling-uart1-uart2-in-u-boot-for-BIOS-messages.patch @@ -1,4 +1,4 @@ -From f387e9be00ccaa49d77c82d4340dff6f84bb4bb3 Mon Sep 17 00:00:00 2001 +From 777d3db853a7a9e6ec6e19d97ed12db689faa051 Mon Sep 17 00:00:00 2001 From: AppaRao Puli Date: Mon, 13 May 2019 23:49:02 +0530 Subject: [PATCH] Enabling uart1&uart2 in u-boot for BIOS messages @@ -13,17 +13,16 @@ to uefi, checked bios serial logs working fine and accessed keyboard in uefi without any issues. Signed-off-by: AppaRao Puli - --- board/aspeed/ast-g5/ast-g5-intel.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index efc3315caf..a8b65658b3 100644 +index 4eaed429e327..4190fb05acbe 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c -@@ -487,6 +487,26 @@ void ast_g5_intel_late_init(void) - update_bootargs_cmd("special", NULL); +@@ -492,6 +492,26 @@ void board_pre_abort_autoboot(void) + ast_enable_pass_through(); } +static void uart_init(void) @@ -49,7 +48,7 @@ index efc3315caf..a8b65658b3 100644 static void pwm_init(void) { uint32_t val; -@@ -538,6 +558,7 @@ extern void espi_init(void); +@@ -543,6 +563,7 @@ extern void espi_init(void); extern void kcs_init(void); void ast_g5_intel(void) { @@ -57,3 +56,6 @@ index efc3315caf..a8b65658b3 100644 pwm_init(); gpio_init(gpio_table, ARRAY_SIZE(gpio_table)); espi_init(); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch index 8a00ccc3d..3e7727c32 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0033-Reboot-into-UBOOT-on-Watchdog-Failures.patch @@ -1,4 +1,4 @@ -From a4ba855a0dfac7af9720e94d82720d1fd916cb4b Mon Sep 17 00:00:00 2001 +From 655a30e879704b72e1934bdc8e47d93166978c38 Mon Sep 17 00:00:00 2001 From: James Feist Date: Wed, 31 Jul 2019 16:01:49 -0700 Subject: [PATCH] Reboot into UBOOT on Watchdog Failures @@ -11,15 +11,14 @@ Tested: watchdog -T 0 -F /dev/watchdog1 reboots into uboot after 3 times Signed-off-by: James Feist - --- .../include/asm/arch-aspeed/ast-g5-intel.h | 1 + - board/aspeed/ast-g5/ast-g5-intel.c | 31 +++++++++++++++++++ - common/autoboot.c | 2 ++ - 3 files changed, 34 insertions(+) + board/aspeed/ast-g5/ast-g5-intel.c | 29 +++++++++++++++++++ + common/autoboot.c | 5 ++++ + 3 files changed, 35 insertions(+) diff --git a/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h b/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h -index a88521a1b3..64f4ed17bf 100644 +index a88521a1b3c7..64f4ed17bfd5 100644 --- a/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h +++ b/arch/arm/include/asm/arch-aspeed/ast-g5-intel.h @@ -14,6 +14,7 @@ @@ -31,14 +30,15 @@ index a88521a1b3..64f4ed17bf 100644 #endif diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index a8b65658b3..12216922ac 100644 +index d05de5c4a274..9b546cffee77 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c -@@ -114,6 +114,24 @@ static const GPIOValue gpio_table[] = { +@@ -114,7 +114,23 @@ static const GPIOValue gpio_table[] = { #define HOST_SERIAL_A_HIGH_SPEED (1 << 0) #define HOST_SERIAL_B_HIGH_SPEED (1 << 1) -+#define WATCHDOG_RESET_BIT 0x8 ++#define WATCHDOG_RESET_BIT BIT(3) + #define POWERON_RESET_BIT BIT(0) +#define BOOT_FAILURE_LIMIT 0x3 + +static int get_boot_failures(void) @@ -54,12 +54,10 @@ index a8b65658b3..12216922ac 100644 + setenv_ulong("bootfailures", count); + saveenv(); +} -+ -+ + static void sgpio_init(void) { - uint32_t value; -@@ -275,6 +293,11 @@ int intel_force_firmware_jumper_enabled(void) +@@ -277,6 +293,11 @@ int intel_force_firmware_jumper_enabled(void) return gpio_get_value(GPIO_FF_UPD_JUMPER); } @@ -71,7 +69,7 @@ index a8b65658b3..12216922ac 100644 void arch_preboot_os(void) { // last second before booting... set the LEDs -@@ -436,6 +459,7 @@ void ast_g5_intel_late_init(void) +@@ -438,6 +459,7 @@ void ast_g5_intel_late_init(void) { char value[32]; u32 reset_reason = 0; @@ -79,7 +77,7 @@ index a8b65658b3..12216922ac 100644 /* By default host serail A and B use normal speed */ uint32_t host_serial_cfg = 0; -@@ -480,6 +504,13 @@ void ast_g5_intel_late_init(void) +@@ -482,6 +504,13 @@ void ast_g5_intel_late_init(void) update_bootargs_cmd("resetreason", value); @@ -91,18 +89,24 @@ index a8b65658b3..12216922ac 100644 + set_boot_failures(0); + /* Update the special mode in bootargs */ - if (is_mfg_mode_phy_req()) + if (reset_reason & POWERON_RESET_BIT && is_mfg_mode_phy_req()) update_bootargs_cmd("special", "mfg"); diff --git a/common/autoboot.c b/common/autoboot.c -index 3647d5fb21..0e7f7b0965 100644 +index 393738ce0f4c..35dad222ff7c 100644 --- a/common/autoboot.c +++ b/common/autoboot.c -@@ -263,6 +263,8 @@ static int abortboot(int bootdelay) - # ifdef AST_G5_INTEL - if (intel_force_firmware_jumper_enabled()) - return 1; -+ if (intel_failed_boot()) -+ return 1; +@@ -271,6 +271,11 @@ static int abortboot(int bootdelay) + abort = 1; + goto exit; + } ++ ++ if (intel_failed_boot()) { ++ abort = 1; ++ goto exit; ++ } # endif if (bootdelay >= 0) +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch index 96172cbac..456763398 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0038-Increase-default-fan-speed-for-cooper-city.patch @@ -75,7 +75,7 @@ index e05a6da468..4b017269f9 100644 #define LPC_SNOOP_ADDR 0x80 @@ -117,6 +138,8 @@ static const GPIOValue gpio_table[] = { - #define WATCHDOG_RESET_BIT 0x8 + #define POWERON_RESET_BIT BIT(0) #define BOOT_FAILURE_LIMIT 0x3 +#define COOPER_CITY_BOARD_ID 40 diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch index bbab94421..ad99773d1 100644 --- a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0043-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch @@ -1,4 +1,4 @@ -From 0bae11a932e57c968394dd533bbd853ee2e9493f Mon Sep 17 00:00:00 2001 +From 94cecaf3d944ee0b2a24b5628131db92de7cbaf3 Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy Date: Wed, 18 Mar 2020 21:47:11 +0530 Subject: [PATCH] PFR- Skip counting WDT2 event when EXTRST# is set @@ -14,23 +14,22 @@ Tested: Verified BMC updates 4 times and checked that the boot is not aborted at u-boot. Signed-off-by: Vikram Bodireddy - --- board/aspeed/ast-g5/ast-g5-intel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c -index 2d260a7759..1d426db659 100644 +index 511bf32f94ac..66423d9b55a8 100644 --- a/board/aspeed/ast-g5/ast-g5-intel.c +++ b/board/aspeed/ast-g5/ast-g5-intel.c @@ -137,6 +137,7 @@ static const GPIOValue gpio_table[] = { #define HOST_SERIAL_B_HIGH_SPEED (1 << 1) - #define WATCHDOG_RESET_BIT 0x8 -+#define EXTRST_RESET_BIT 0x2 + #define WATCHDOG_RESET_BIT BIT(3) ++#define EXTRST_RESET_BIT BIT(1) + #define POWERON_RESET_BIT BIT(0) #define BOOT_FAILURE_LIMIT 0x3 - #define COOPER_CITY_BOARD_ID 40 @@ -551,7 +552,8 @@ void ast_g5_intel_late_init(void) boot_failures = get_boot_failures(); @@ -41,3 +40,6 @@ index 2d260a7759..1d426db659 100644 set_boot_failures(boot_failures + 1); else set_boot_failures(0); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch new file mode 100644 index 000000000..5a83ee467 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0050-Set-UART-routing-in-lowlevel_init.patch @@ -0,0 +1,43 @@ +From 03487b1de06f1caa4e0bb0597da21f0690125bac Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo +Date: Mon, 26 Apr 2021 13:32:29 -0700 +Subject: [PATCH] Set UART routing in lowlevel_init + +This commit sets the UART routing back to default in lowlevel_init +to prevent any data dropping from the physical host serial until +SOL service is activated. + +Signed-off-by: Jae Hyun Yoo +--- + arch/arm/mach-aspeed/platform_g5.S | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S +index 2c8bf03b0eff..7c4722688f90 100644 +--- a/arch/arm/mach-aspeed/platform_g5.S ++++ b/arch/arm/mach-aspeed/platform_g5.S +@@ -111,6 +111,9 @@ + #include + #include + ++#define AST_LPC_BASE 0x1E789000 ++#define AST_LPC_HICRA (AST_LPC_BASE + 0x09C) ++ + /****************************************************************************** + r4 : return program counter + r5 : DDR speed timing table base address +@@ -2445,6 +2448,11 @@ spi_cbr_end: + orr r1, r1, r2 + str r1, [r0] + ++ /* set UART routing back to default */ ++ ldr r0, =AST_LPC_HICRA ++ ldr r1, =0x0 ++ str r1, [r0] ++ + ldr r0, =0x1e6e2008 @ Set Video ECLK phase + ldr r1, [r0] + ldr r2, =0x0ffffff3 +-- +2.17.1 + -- cgit v1.2.3