From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"Jamin Lin" <jamin_lin@aspeedtech.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: troy_lee@aspeedtech.com
Subject: Re: [PATCH v0 1/2] aspeed: support uart controller both 0 and 1 base
Date: Mon, 5 Feb 2024 14:15:51 +0100 [thread overview]
Message-ID: <da2708e0-c3f3-4e11-af24-07817bc0cdfd@linaro.org> (raw)
In-Reply-To: <aab5b2fb-e7f0-434b-935c-ff5ad5d39f21@kaod.org>
On 5/2/24 11:46, Cédric Le Goater wrote:
> Hello Jamin,
>
> On 2/5/24 10:14, Jamin Lin wrote:
>> According to the design of ASPEED SOCS, the uart controller
>> is 1 base for ast10x0, ast2600, ast2500 and ast2400.
>>
>> However, the uart controller is 0 base for ast2700.
>> To support uart controller both 0 and 1 base,
>> adds uasrt_bases parameter in AspeedSoCClass
>> and set the default uart controller 1 base
>> for ast10x0, astt2600, ast2500 and ast2400.
>
> The board definition can set 'amc->uart_default' to choose a different
> default serial port for the console, or use the "bmc-console" machine
> option . Isn't it enough ? May be I am misunderstanding the need.
>
> To clarify,
>
> ASPEED_DEV_UART1 is in the first serial port on the boards.
>
> I think we chose to start the indexing at 1 because the Aspeed QEMU
> modeling began first with the UART model (console) and for simplicity,
> we copied the definitions of the device tree from Linux :
>
> serial0 = &uart1;
> serial1 = &uart2;
> serial2 = &uart3;
> serial3 = &uart4;
> serial4 = &uart5;
> serial5 = &vuart;
>
> We replicated this indexing starting at 1 to nearly all device models :
>
> ASPEED_DEV_UART1 - 13
> ASPEED_DEV_SPI1 -2
> ASPEED_DEV_EHCI1 -2
> ASPEED_DEV_TIMER1 - 8
> ASPEED_DEV_ETH1 -4
> ASPEED_DEV_MII1 - 4
> ASPEED_DEV_JTAG0 - 1 <--- !!
> ASPEED_DEV_FSI1 - 2
>
> I don't know what would be ASPEED_DEV_UART0 in this context.
>
> May be you could send a simplified AST2700 SoC model with definitions
> of a minimum address space and IRQ space ?
Looking at TF-A definitions,
https://github.com/ARM-software/arm-trusted-firmware/commit/85f199b77447
#define UART_BASE U(0x14c33000)
#define UART12_BASE (UART_BASE + 0xb00)
#define CONSOLE_UART_BASE UART12_BASE
As Cédric described, we have TF-A UART12_BASE -> QEMU ASPEED_DEV_UART13.
next prev parent reply other threads:[~2024-02-05 13:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 9:14 [v0 0/2] uart base and hardcode boot address 0 Jamin Lin via
2024-02-05 9:14 ` [PATCH v0 1/2] aspeed: support uart controller both 0 and 1 base Jamin Lin via
2024-02-05 10:46 ` Cédric Le Goater
2024-02-05 13:15 ` Philippe Mathieu-Daudé [this message]
2024-02-06 3:08 ` Jamin Lin
2024-02-06 16:46 ` Cédric Le Goater
2024-02-05 14:25 ` Cédric Le Goater
2024-02-06 3:29 ` Jamin Lin
2024-02-06 16:59 ` Cédric Le Goater
2024-02-07 3:43 ` Jamin Lin
2024-02-06 17:36 ` Cédric Le Goater
2024-02-05 9:14 ` [PATCH v0 2/2] aspeed: fix hardcode boot address 0 Jamin Lin via
2024-02-05 13:20 ` Philippe Mathieu-Daudé
2024-02-06 1:48 ` Jamin Lin
2024-02-06 16:54 ` Cédric Le Goater
2024-02-05 13:34 ` Cédric Le Goater
2024-02-06 2:15 ` Jamin Lin
2024-02-06 16:47 ` [v0 0/2] uart base and " Cédric Le Goater
2024-02-07 3:41 ` Jamin Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da2708e0-c3f3-4e11-af24-07817bc0cdfd@linaro.org \
--to=philmd@linaro.org \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).