<div dir="ltr"><div>Thanks!</div><div><br></div>We have an old system using this branch and we don't plan on migrating the u-boot version for it. We don't have any system that is using aspeed other than this one.<br><div><br></div><div>Wily Tu</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 26, 2021 at 7:03 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">On Wed, 26 May 2021 at 15:51, Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>> wrote:<br>
><br>
> ping.<br>
><br>
> I also missed the branch for this patch, but this should be in the v2016.07-aspeed-openbmc u-boot branch.<br>
><br>
> On Tue, Apr 13, 2021 at 9:12 AM Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>> wrote:<br>
>><br>
>> Add option to enable register for SGPIO in SCU<br>
>> for ast-g4.<br>
>><br>
>> Signed-off-by: Willy Tu <<a href="mailto:wltu@google.com" target="_blank">wltu@google.com</a>><br>
<br>
I've applied this, but I strongly encourage you to move to a newer<br>
branch. The 2019.04 branch is based off the latest aspeed SDK which<br>
claims support for the ast2400.<br>
<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.1.295.g9ea45b61b8-goog<br>
>><br>
</blockquote></div>