Initial commit
This commit is contained in:
+235
@@ -0,0 +1,235 @@
|
||||
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>
|
||||
---
|
||||
arch/arm/mach-aspeed/ast2500/platform.S | 191 ++++++++++++++++++++----
|
||||
1 file changed, 162 insertions(+), 29 deletions(-)
|
||||
|
||||
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 r0, =0x1e780020
|
||||
+ ldr r1, [r0]
|
||||
+ and r1, r1, #0xFFFFFFF0
|
||||
+ orr r1, r1, #0xC
|
||||
+ str r1, [r0]
|
||||
+ .endm
|
||||
+
|
||||
+.macro console_sel
|
||||
+
|
||||
+ // Disable SoL UARTs[1-4]
|
||||
+ ldr r0, =0x1e6e2080
|
||||
+ ldr r1, [r0]
|
||||
+ ldr r2, =0xBFBFFFFF
|
||||
+ and r1, r1, r2
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1e6e2084
|
||||
+ ldr r1, [r0]
|
||||
+ and r1, r1, r2
|
||||
+ str r1, [r0]
|
||||
+ // Enable GPIOE[0-3] Tolerant
|
||||
+ ldr r0, =0x1e78003c
|
||||
+ ldr r1, [r0]
|
||||
+ orr r1, r1, #0xF
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ // Read debug card present
|
||||
+ ldr r2, =0x1e780080
|
||||
+ ldr r0, [r2]
|
||||
+ and r0, r0, #0x00000800
|
||||
+ ldr r1, =0x0800
|
||||
+ cmp r0, r1
|
||||
+ bne dbg_card_pres\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+
|
||||
+dbg_card_pres\@:
|
||||
+ // Read key position
|
||||
+ ldr r2, =0x1e7801e0
|
||||
+ ldr r0, [r2]
|
||||
+ bic r1, r0, #0xFF0FFFFF
|
||||
+ mov r0, r1, lsr #20
|
||||
+ //Test for position#1
|
||||
+ ldr r1, =0x00
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos2\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos2\@:
|
||||
+ //Test for position#2
|
||||
+ ldr r1, =0x01
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos3\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos3\@:
|
||||
+ //Test for position#3
|
||||
+ ldr r1, =0x02
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos4\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos4\@:
|
||||
+//Test for position#4
|
||||
+ ldr r1, =0x03
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos5\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos5\@:
|
||||
+ //Test for position#5
|
||||
+ ldr r1, =0x04
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos6\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos6\@:
|
||||
+ //Test for position#6
|
||||
+ ldr r1, =0x05
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos7\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos7\@:
|
||||
+ //Test for position#7
|
||||
+ ldr r1, =0x06
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos8\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos8\@:
|
||||
+ //Test for position#8
|
||||
+ ldr r1, =0x07
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos9\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos9\@:
|
||||
+ //Test for position#9
|
||||
+ ldr r1, =0x08
|
||||
+ cmp r0, r1
|
||||
+ bne case_pos10\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_pos10\@:
|
||||
+ //Test for position#10
|
||||
+ ldr r1, =0x09
|
||||
+ cmp r0, r1
|
||||
+ bne case_end\@
|
||||
+ console_bmc
|
||||
+ b case_end\@
|
||||
+case_end\@:
|
||||
+.endm
|
||||
+
|
||||
+ .macro uart_console_setup
|
||||
+ console_sel
|
||||
+ /* setup UART console */
|
||||
+ ldr r0, =0x1E78400C
|
||||
+ mov r1, #0x83
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1e6e202c
|
||||
+ ldr r2, [r0]
|
||||
+ mov r2, r2, lsr #12
|
||||
+ tst r2, #0x01
|
||||
+ ldr r0, =0x1E784000
|
||||
+ moveq r1, #0x1A @ Baudrate 57600
|
||||
+ movne r1, #0x02 @ Baudrate 57600, div13
|
||||
+
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1E784004
|
||||
+ mov r1, #0x00
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1E78400C
|
||||
+ mov r1, #0x03
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1E784008
|
||||
+ mov r1, #0x07
|
||||
+ str r1, [r0]
|
||||
+ .endm
|
||||
+
|
||||
.macro print_hex_char
|
||||
and r1, r1, #0xF
|
||||
cmp r1, #9
|
||||
@@ -321,6 +471,16 @@ init_dram:
|
||||
/********************************************
|
||||
Initial Reset Procedure : Begin
|
||||
*******************************************/
|
||||
+ /* save into SRAM */
|
||||
+ ldr r0, =0x1e720200 /* vbs.uboot_exec_address */
|
||||
+ str r4, [r0]
|
||||
+
|
||||
+ uart_console_setup
|
||||
+
|
||||
+ ldr r0, =0x1E720204
|
||||
+ mov r1, #0x0
|
||||
+ str r1, [r0]
|
||||
+
|
||||
/* Clear AHB bus lock condition */
|
||||
ldr r0, =0x1e600000
|
||||
ldr r1, =0xAEED1A03
|
||||
@@ -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
|
||||
@@ -807,35 +969,6 @@ wait_ddr_reset:
|
||||
str r1, [r0]
|
||||
#endif
|
||||
|
||||
- ldr r0, =0x1e78400c
|
||||
- mov r1, #0x83
|
||||
- str r1, [r0]
|
||||
-
|
||||
- ldr r0, =0x1e6e202c
|
||||
- ldr r2, [r0]
|
||||
- mov r2, r2, lsr #12
|
||||
- tst r2, #0x01
|
||||
- ldr r0, =0x1e784000
|
||||
- moveq r1, #0x0D @ Baudrate 115200
|
||||
- movne r1, #0x01 @ Baudrate 115200, div13
|
||||
-#ifdef CONFIG_DRAM_UART_38400
|
||||
- moveq r1, #0x27 @ Baudrate 38400
|
||||
- movne r1, #0x03 @ Baudrate 38400 , div13
|
||||
-#endif
|
||||
- str r1, [r0]
|
||||
-
|
||||
- ldr r0, =0x1e784004
|
||||
- mov r1, #0x00
|
||||
- str r1, [r0]
|
||||
-
|
||||
- ldr r0, =0x1e78400c
|
||||
- mov r1, #0x03
|
||||
- str r1, [r0]
|
||||
-
|
||||
- ldr r0, =0x1e784008
|
||||
- mov r1, #0x07
|
||||
- str r1, [r0]
|
||||
-
|
||||
ldr r0, =0x1e784000
|
||||
mov r1, #0x0D @ '\r'
|
||||
str r1, [r0]
|
||||
--
|
||||
2.17.1
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
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
|
||||
connected to YosemiteV2 during boot.
|
||||
|
||||
Handswitch in the adaptor card connected to AST2500 GPIOs as below,
|
||||
GPIOAA7 ---SW_ID8
|
||||
GPIOAA6 ---SW_ID4
|
||||
GPIOAA5 ---SW_ID2
|
||||
GPIOAA4 ---SW_ID1
|
||||
|
||||
SW_ID8 SW_ID4 SW_ID2 SW_ID1 Position Descritpion
|
||||
L L L L 1 1s server slot1 select
|
||||
|
||||
L L L H 2 1s server slot2 select
|
||||
|
||||
L L H L 3 1s server slot3 select
|
||||
|
||||
L L H H 4 1s server slot4 select
|
||||
|
||||
L H L L 5 BMC Debug port select
|
||||
|
||||
L H L H 6 1s server slot1 select
|
||||
|
||||
L H H L 7 1s server slot2 select
|
||||
|
||||
L H H H 8 1s server slot3 select
|
||||
|
||||
H L L L 9 1s server slot4 select
|
||||
|
||||
H L L H 10 BMC Debug port select
|
||||
|
||||
BMC and Hosts UART control flow
|
||||
GPIOE0 --- DEBUG_UART_SEL_0
|
||||
GPIOE1 --- DEBUG_UART_SEL_1
|
||||
GPIOE2 --- DEBUG_UART_SEL_2
|
||||
GPIOE2 --- DEBUG_UART_RX_SEL_N
|
||||
|
||||
SEL_2 SEL_1 SEL_0 RX_SEL_N CONSOLE
|
||||
0 0 0 0 SLOT1
|
||||
0 0 1 0 SLOT2
|
||||
0 1 0 0 SLOT3
|
||||
0 1 1 0 SLOT4
|
||||
1 0 0 1 BMC Debug
|
||||
|
||||
Signed-off-by: Logananth Sundararaj <logananth_s@hcl.com>
|
||||
---
|
||||
arch/arm/mach-aspeed/ast2500/platform.S | 69 ++++++++++++++++++++++---
|
||||
1 file changed, 61 insertions(+), 8 deletions(-)
|
||||
|
||||
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
|
||||
+ ldr r1, [r0]
|
||||
+ orr r1, r1, #0xF
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1e780020
|
||||
+ ldr r1, [r0]
|
||||
+ and r1, r1, #0xFFFFFFF0
|
||||
+ orr r1, r1, #0x0
|
||||
+ str r1, [r0]
|
||||
+ .endm
|
||||
+
|
||||
+ .macro console_slot2
|
||||
+ ldr r0, =0x1e780024
|
||||
+ ldr r1, [r0]
|
||||
+ orr r1, r1, #0xF
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1e780020
|
||||
+ ldr r1, [r0]
|
||||
+ and r1, r1, #0xFFFFFFF0
|
||||
+ orr r1, r1, #0x1
|
||||
+ str r1, [r0]
|
||||
+ .endm
|
||||
+
|
||||
+ .macro console_slot3
|
||||
+ ldr r0, =0x1e780024
|
||||
+ ldr r1, [r0]
|
||||
+ orr r1, r1, #0xF
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1e780020
|
||||
+ ldr r1, [r0]
|
||||
+ and r1, r1, #0xFFFFFFF0
|
||||
+ orr r1, r1, #0x2
|
||||
+ str r1, [r0]
|
||||
+ .endm
|
||||
+
|
||||
+ .macro console_slot4
|
||||
+ ldr r0, =0x1e780024
|
||||
+ ldr r1, [r0]
|
||||
+ orr r1, r1, #0xF
|
||||
+ str r1, [r0]
|
||||
+
|
||||
+ ldr r0, =0x1e780020
|
||||
+ ldr r1, [r0]
|
||||
+ and r1, r1, #0xFFFFFFF0
|
||||
+ orr r1, r1, #0x3
|
||||
+ str r1, [r0]
|
||||
+ .endm
|
||||
+
|
||||
+
|
||||
.macro console_sel
|
||||
|
||||
// Disable SoL UARTs[1-4]
|
||||
@@ -354,28 +407,28 @@ dbg_card_pres\@:
|
||||
ldr r1, =0x00
|
||||
cmp r0, r1
|
||||
bne case_pos2\@
|
||||
- console_bmc
|
||||
+ console_slot1
|
||||
b case_end\@
|
||||
case_pos2\@:
|
||||
//Test for position#2
|
||||
ldr r1, =0x01
|
||||
cmp r0, r1
|
||||
bne case_pos3\@
|
||||
- console_bmc
|
||||
+ console_slot2
|
||||
b case_end\@
|
||||
case_pos3\@:
|
||||
//Test for position#3
|
||||
ldr r1, =0x02
|
||||
cmp r0, r1
|
||||
bne case_pos4\@
|
||||
- console_bmc
|
||||
+ console_slot3
|
||||
b case_end\@
|
||||
case_pos4\@:
|
||||
//Test for position#4
|
||||
ldr r1, =0x03
|
||||
cmp r0, r1
|
||||
bne case_pos5\@
|
||||
- console_bmc
|
||||
+ console_slot4
|
||||
b case_end\@
|
||||
case_pos5\@:
|
||||
//Test for position#5
|
||||
@@ -389,28 +442,28 @@ case_pos6\@:
|
||||
ldr r1, =0x05
|
||||
cmp r0, r1
|
||||
bne case_pos7\@
|
||||
- console_bmc
|
||||
+ console_slot1
|
||||
b case_end\@
|
||||
case_pos7\@:
|
||||
//Test for position#7
|
||||
ldr r1, =0x06
|
||||
cmp r0, r1
|
||||
bne case_pos8\@
|
||||
- console_bmc
|
||||
+ console_slot2
|
||||
b case_end\@
|
||||
case_pos8\@:
|
||||
//Test for position#8
|
||||
ldr r1, =0x07
|
||||
cmp r0, r1
|
||||
bne case_pos9\@
|
||||
- console_bmc
|
||||
+ console_slot3
|
||||
b case_end\@
|
||||
case_pos9\@:
|
||||
//Test for position#9
|
||||
ldr r1, =0x08
|
||||
cmp r0, r1
|
||||
bne case_pos10\@
|
||||
- console_bmc
|
||||
+ console_slot4
|
||||
b case_end\@
|
||||
case_pos10\@:
|
||||
//Test for position#10
|
||||
--
|
||||
2.17.1
|
||||
@@ -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
|
||||
@@ -0,0 +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"
|
||||
@@ -0,0 +1,2 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-aspeed-sdk:"
|
||||
SRC_URI += "file://yosemitev2.cfg"
|
||||
Reference in New Issue
Block a user