<div dir="ltr">Hi Joel,<div><br></div><div>Thanks for the update.</div><div><br></div><div>I have tested the change in v2016.07 to bring up a system for 2400 and verified that it works fine. I'll fix the patch with git-send-email and hopefully can get the change merged.<br></div><div><br></div><div>I'll take a look at v2019.04 to see where I can fit this in probably in <a href="https://github.com/openbmc/u-boot/tree/v2019.04-aspeed-openbmc/board/aspeed">https://github.com/openbmc/u-boot/tree/v2019.04-aspeed-openbmc/board/aspeed</a>? I don't think we have a system to fully test the changes for 2500 and 2600 chips. I'll look through it.</div><div><br></div><div>Best,</div><div><br></div><div>Willy Tu</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 31, 2021 at 3:51 PM Joel Stanley <<a href="mailto:joel@jms.id.au">joel@jms.id.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Willy,<br>
<br>
On Wed, 31 Mar 2021 at 21:33, Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>> wrote:<br>
><br>
> I am not exactly sure if this is the way to send the patch for u-boot. But I am trying to update a patch for <a href="https://github.com/openbmc/u-boot/tree/v2016.07-aspeed-openbmc" rel="noreferrer" target="_blank">https://github.com/openbmc/u-boot/tree/v2016.07-aspeed-openbmc</a>.<br>
><br>
> It just gives the options to have the u-boot enable the SGPIO registers for SCU.<br>
<br>
I strongly encourage you to bring up your new systems using a newer<br>
u-boot tree; ASPEED's v2019.04 based SDK contains support for the<br>
2400, 2500 and 2600 chips.<br>
<br>
If you have already done the work to bring up v2016.07, I can merge<br>
your fix into the v2016.07 tree. However the patch you sent is<br>
corrupt. I recommend using git-send-email to send patches, as they<br>
preserve whitespace in a way our email clients do not.<br>
<br>
Cheers,<br>
<br>
Joel<br>
<br>
><br>
> Please take a look.<br>
><br>
> Best,<br>
><br>
> Willy Tu<br>
><br>
> On Wed, Mar 31, 2021 at 2:31 PM Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>> wrote:<br>
>><br>
>> From a2d7336bb59df8f2ef622d4369fc035b2aafd74c Mon Sep 17 00:00:00 2001<br>
>> From: Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>><br>
>> Date: Mon, 22 Mar 2021 17:01:56 -0700<br>
>> Subject: [PATCH] board: aspeed: Enable SGPIO in SCU<br>
>><br>
>> Add option to enable register for SGPIO in SCU<br>
>><br>
>> Signed-off-by: Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>><br>
>> ---<br>
>> board/aspeed/ast-g4/Kconfig | 4 ++++<br>
>> board/aspeed/ast-g4/ast-g4.c | 13 +++++++++++++<br>
>> 2 files changed, 17 insertions(+)<br>
>><br>
>> diff --git a/board/aspeed/ast-g4/Kconfig b/board/aspeed/ast-g4/Kconfig<br>
>> index 2bec9a733a..e78030ae34 100644<br>
>> --- a/board/aspeed/ast-g4/Kconfig<br>
>> +++ b/board/aspeed/ast-g4/Kconfig<br>
>> @@ -19,4 +19,8 @@ config SYS_CONFIG_NAME<br>
>> default "ast-g4-phy" if ASPEED_NET_PHY<br>
>> default "ast-g4-ncsi" if ASPEED_NET_NCSI<br>
>><br>
>> +config ENABLE_SGPIO<br>
>> + tristate "Enable SGPIO in SCU"<br>
>> + default n<br>
>> +<br>
>> endif<br>
>> diff --git a/board/aspeed/ast-g4/ast-g4.c b/board/aspeed/ast-g4/ast-g4.c<br>
>> index 656495307b..e2463d4524 100644<br>
>> --- a/board/aspeed/ast-g4/ast-g4.c<br>
>> +++ b/board/aspeed/ast-g4/ast-g4.c<br>
>> @@ -22,6 +22,19 @@ int board_init(void)<br>
>> /* address of boot parameters */<br>
>> gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;<br>
>> gd->flags = 0;<br>
>> +<br>
>> +#ifdef CONFIG_ENABLE_SGPIO<br>
>> + /* Unlock SCU */<br>
>> + writel(SCU_PROTECT_UNLOCK, AST_SCU_BASE);<br>
>> +<br>
>> + /* Enable SGPIO Master */<br>
>> + u32 reg = readl(AST_SCU_BASE + AST_SCU_FUN_PIN_CTRL2);<br>
>> + reg |= (SCU_FUN_PIN_SGPMI |<br>
>> + SCU_FUN_PIN_SGPMO |<br>
>> + SCU_FUN_PIN_SGPMLD |<br>
>> + SCU_FUN_PIN_SGPMCK);<br>
>> + writel(reg, AST_SCU_BASE + AST_SCU_FUN_PIN_CTRL2);<br>
>> +#endif<br>
>> return 0;<br>
>> }<br>
>><br>
>> --<br>
>> 2.31.0.208.g409f899ff0-goog<br>
>><br>
</blockquote></div>