* [PATCH 0/2] palmetto-bmc: Add ast2500-edk HW strapping value
@ 2016-07-28 1:25 Andrew Jeffery
2016-07-28 1:25 ` [PATCH 1/2] palmetto-bmc: Cleanup whitespace to make checkpatch happy Andrew Jeffery
2016-07-28 1:25 ` [PATCH 2/2] ast2500-edk: Configure HW strap register Andrew Jeffery
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Jeffery @ 2016-07-28 1:25 UTC (permalink / raw)
To: openbmc
The two patches are trivial*: A whitespace fix and a patch to configure the
hardware strapping value for the ast2500-edk.
Cheers,
Andrew
* Though apparently sending them isn't.
Andrew Jeffery (2):
palmetto-bmc: Cleanup whitespace to make checkpatch happy
ast2500-edk: Configure HW strap register
hw/arm/palmetto-bmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.9.2.597.g66765a4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] palmetto-bmc: Cleanup whitespace to make checkpatch happy
2016-07-28 1:25 [PATCH 0/2] palmetto-bmc: Add ast2500-edk HW strapping value Andrew Jeffery
@ 2016-07-28 1:25 ` Andrew Jeffery
2016-07-28 8:22 ` Cédric Le Goater
2016-07-28 1:25 ` [PATCH 2/2] ast2500-edk: Configure HW strap register Andrew Jeffery
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Jeffery @ 2016-07-28 1:25 UTC (permalink / raw)
To: openbmc
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
hw/arm/palmetto-bmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
index 71b9ca73d2d4..ec4aed306e7b 100644
--- a/hw/arm/palmetto-bmc.c
+++ b/hw/arm/palmetto-bmc.c
@@ -45,9 +45,9 @@ enum {
};
static const AspeedBoardConfig aspeed_boards[] = {
- [ PALMETTO_BMC ] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
+ [PALMETTO_BMC] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
AST2400_SDRAM_BASE },
- [ AST2500_EDK ] = { 0x00000200, AST2500_A1_SILICON_REV,
+ [AST2500_EDK] = { 0x00000200, AST2500_A1_SILICON_REV,
AST2500_SDRAM_BASE },
};
--
2.9.2.597.g66765a4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ast2500-edk: Configure HW strap register
2016-07-28 1:25 [PATCH 0/2] palmetto-bmc: Add ast2500-edk HW strapping value Andrew Jeffery
2016-07-28 1:25 ` [PATCH 1/2] palmetto-bmc: Cleanup whitespace to make checkpatch happy Andrew Jeffery
@ 2016-07-28 1:25 ` Andrew Jeffery
2016-07-28 8:21 ` Cédric Le Goater
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Jeffery @ 2016-07-28 1:25 UTC (permalink / raw)
To: openbmc
Strap register value was read off the hardware after boot.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
hw/arm/palmetto-bmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
index ec4aed306e7b..9e9c7e403133 100644
--- a/hw/arm/palmetto-bmc.c
+++ b/hw/arm/palmetto-bmc.c
@@ -47,7 +47,7 @@ enum {
static const AspeedBoardConfig aspeed_boards[] = {
[PALMETTO_BMC] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
AST2400_SDRAM_BASE },
- [AST2500_EDK] = { 0x00000200, AST2500_A1_SILICON_REV,
+ [AST2500_EDK] = { 0x7100c2e6, AST2500_A1_SILICON_REV,
AST2500_SDRAM_BASE },
};
--
2.9.2.597.g66765a4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ast2500-edk: Configure HW strap register
2016-07-28 1:25 ` [PATCH 2/2] ast2500-edk: Configure HW strap register Andrew Jeffery
@ 2016-07-28 8:21 ` Cédric Le Goater
2016-07-28 13:40 ` Cédric Le Goater
0 siblings, 1 reply; 6+ messages in thread
From: Cédric Le Goater @ 2016-07-28 8:21 UTC (permalink / raw)
To: Andrew Jeffery, openbmc
On 07/28/2016 03:25 AM, Andrew Jeffery wrote:
> Strap register value was read off the hardware after boot.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> hw/arm/palmetto-bmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
> index ec4aed306e7b..9e9c7e403133 100644
> --- a/hw/arm/palmetto-bmc.c
> +++ b/hw/arm/palmetto-bmc.c
> @@ -47,7 +47,7 @@ enum {
> static const AspeedBoardConfig aspeed_boards[] = {
> [PALMETTO_BMC] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
> AST2400_SDRAM_BASE },
> - [AST2500_EDK] = { 0x00000200, AST2500_A1_SILICON_REV,
> + [AST2500_EDK] = { 0x7100c2e6, AST2500_A1_SILICON_REV,
> AST2500_SDRAM_BASE },
so maybe we could define the ast2500 hw-strap1 value in :
include/hw/misc/aspeed_scu.h,
comments are sufficient enough. So you can replace the version I did
for the ast2400. We can always come back to the macros when the u-boot
code is merged.
Thanks,
C.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] palmetto-bmc: Cleanup whitespace to make checkpatch happy
2016-07-28 1:25 ` [PATCH 1/2] palmetto-bmc: Cleanup whitespace to make checkpatch happy Andrew Jeffery
@ 2016-07-28 8:22 ` Cédric Le Goater
0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2016-07-28 8:22 UTC (permalink / raw)
To: Andrew Jeffery, openbmc
On 07/28/2016 03:25 AM, Andrew Jeffery wrote:
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> hw/arm/palmetto-bmc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
> index 71b9ca73d2d4..ec4aed306e7b 100644
> --- a/hw/arm/palmetto-bmc.c
> +++ b/hw/arm/palmetto-bmc.c
> @@ -45,9 +45,9 @@ enum {
> };
>
> static const AspeedBoardConfig aspeed_boards[] = {
> - [ PALMETTO_BMC ] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
> + [PALMETTO_BMC] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
> AST2400_SDRAM_BASE },
> - [ AST2500_EDK ] = { 0x00000200, AST2500_A1_SILICON_REV,
> + [AST2500_EDK] = { 0x00000200, AST2500_A1_SILICON_REV,
> AST2500_SDRAM_BASE },
> };
>
>
yes. I clearly missed the checkpatch step. I will include the fix in v2.
Thanks,
C.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ast2500-edk: Configure HW strap register
2016-07-28 8:21 ` Cédric Le Goater
@ 2016-07-28 13:40 ` Cédric Le Goater
0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2016-07-28 13:40 UTC (permalink / raw)
To: Andrew Jeffery, openbmc
On 07/28/2016 10:21 AM, Cédric Le Goater wrote:
> On 07/28/2016 03:25 AM, Andrew Jeffery wrote:
>> Strap register value was read off the hardware after boot.
>>
>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>> ---
>> hw/arm/palmetto-bmc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
>> index ec4aed306e7b..9e9c7e403133 100644
>> --- a/hw/arm/palmetto-bmc.c
>> +++ b/hw/arm/palmetto-bmc.c
>> @@ -47,7 +47,7 @@ enum {
>> static const AspeedBoardConfig aspeed_boards[] = {
>> [PALMETTO_BMC] = { AST2400_HW_STRAP1, AST2400_A0_SILICON_REV,
>> AST2400_SDRAM_BASE },
>> - [AST2500_EDK] = { 0x00000200, AST2500_A1_SILICON_REV,
>> + [AST2500_EDK] = { 0x7100c2e6, AST2500_A1_SILICON_REV,
>> AST2500_SDRAM_BASE },
>
> so maybe we could define the ast2500 hw-strap1 value in :
>
> include/hw/misc/aspeed_scu.h,
>
> comments are sufficient enough. So you can replace the version I did
> for the ast2400. We can always come back to the macros when the u-boot
> code is merged.
So after a second look, I think macros are better.
The ast2500 eval board has a HW_STRAP1 value of 0xf100c2e6, so I came up
with a definition of AST2500_HW_STRAP1 which is below.
Cheers,
C.
+/*
+ * Hardware strapping register definition (for Aspeed AST2500 SOC and
+ * higher)
+ */
+#define SCU_AST2500_HW_STRAP_SPI_AUTOFETCH_ENABLE (0x1 << 31)
+#define SCU_AST2500_HW_STRAP_GPIO_STRAP_ENABLE (0x1 << 30)
+#define SCU_AST2500_HW_STRAP_UART_DEBUG (0x1 << 29)
+#define UART_DEBUG_UART1 0
+#define UART_DEBUG_UART5 1
+#define SCU_AST2500_HW_STRAP_RESERVED28 (0x1 << 28)
+
+#define SCU_AST2500_HW_STRAP_FAST_RESET_DBG (0x1 << 27)
+#define SCU_AST2500_HW_STRAP_ESPI_FLASH_ENABLE (0x1 << 26)
+#define SCU_AST2500_HW_STRAP_ESPI_ENABLE (0x1 << 25)
+#define SCU_AST2500_HW_STRAP_DDR4_ENABLE (0x1 << 24)
+
+#define SCU_AST2500_HW_STRAP_ACPI_ENABLE (0x1 << 19)
+#define SCU_AST2500_HW_STRAP_USBCKI_FREQ (0x1 << 18)
+#define USBCKI_FREQ_24MHZ 0
+#define USBCKI_FREQ_28MHZ 1
+
+#define SCU_AST2500_HW_STRAP_SET_AXI_AHB_RATIO(x) (x << 9)
+#define SCU_AST2500_HW_STRAP_GET_AXI_AHB_RATIO(x) ((x >> 9) & 7)
+#define SCU_AST2500_HW_STRAP_CPU_AXI_RATIO_MASK (0x7 << 9)
+#define AXI_AHB_RATIO_UNDEFINED 0
+#define AXI_AHB_RATIO_2_1 1
+#define AXI_AHB_RATIO_3_1 2
+#define AXI_AHB_RATIO_4_1 3
+#define AXI_AHB_RATIO_5_1 4
+#define AXI_AHB_RATIO_6_1 5
+#define AXI_AHB_RATIO_7_1 6
+#define AXI_AHB_RATIO_8_1 7
+
+#define SCU_AST2500_HW_STRAP_RESERVED1 (0x1 << 1)
+#define SCU_AST2500_HW_STRAP_DIS_BOOT (0x1 << 0)
+
+#define AST2500_HW_STRAP1_DEFAULTS ( \
+ SCU_AST2500_HW_STRAP_RESERVED28 | \
+ SCU_HW_STRAP_2ND_BOOT_WDT | \
+ SCU_HW_STRAP_VGA_CLASS_CODE | \
+ SCU_HW_STRAP_LPC_RESET_PIN | \
+ SCU_AST2500_HW_STRAP_SET_AXI_AHB_RATIO(AXI_AHB_RATIO_2_1) | \
+ SCU_HW_STRAP_VGA_SIZE_SET(VGA_16M_DRAM) | \
+ SCU_AST2500_HW_STRAP_RESERVED1)
+
+#define AST2500_HW_STRAP1 (( \
+ AST2500_HW_STRAP1_DEFAULTS | \
+ SCU_AST2500_HW_STRAP_SPI_AUTOFETCH_ENABLE | \
+ SCU_AST2500_HW_STRAP_GPIO_STRAP_ENABLE | \
+ SCU_AST2500_HW_STRAP_UART_DEBUG | \
+ SCU_AST2500_HW_STRAP_DDR4_ENABLE | \
+ SCU_HW_STRAP_MAC1_RGMII | \
+ SCU_HW_STRAP_MAC0_RGMII) & \
+ ~SCU_HW_STRAP_2ND_BOOT_WDT)
+
#endif /* ASPEED_SCU_H */
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-07-28 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 1:25 [PATCH 0/2] palmetto-bmc: Add ast2500-edk HW strapping value Andrew Jeffery
2016-07-28 1:25 ` [PATCH 1/2] palmetto-bmc: Cleanup whitespace to make checkpatch happy Andrew Jeffery
2016-07-28 8:22 ` Cédric Le Goater
2016-07-28 1:25 ` [PATCH 2/2] ast2500-edk: Configure HW strap register Andrew Jeffery
2016-07-28 8:21 ` Cédric Le Goater
2016-07-28 13:40 ` Cédric Le Goater
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.