public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Dösinger" <stefandoesinger@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Russell King <linux@armlinux.org.uk>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Linus Walleij <linusw@kernel.org>,
	Drew Fustini <fustini@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	soc@lists.linux.dev, linux-serial@vger.kernel.org
Subject: Re: [PATCH v4 7/8] ARM: dts: Declare UART1 on zx297520v3 boards
Date: Fri, 17 Apr 2026 20:24:05 +0300	[thread overview]
Message-ID: <D3228B7D-0C11-4087-9547-0D1F7D5FB628@gmail.com> (raw)
In-Reply-To: <0d80dcbe-cb46-45e5-821a-de5299d6a663@app.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 2283 bytes --]

Hi Arnd,

Thanks for your comments.

> Am 17.04.2026 um 11:59 schrieb Arnd Bergmann <arnd@arndb.de>:
> 
> On Thu, Apr 16, 2026, at 22:19, Stefan Dösinger wrote:
>> 
>> The reason why I add the serial1=uart1 alias is to keep console=ttyAMA1
>> stable regardless of the other enabled UARTs. UART0, as the name
>> implies, has a lower MMIO address, but uart1 is the one that usually has
>> the boot output and console.
> 
> I'm not sure I'm following here. You generally want to either make
> sure the alias matches whatever number is printed on the product
> if there are multiple numbered ports, or you just use 'serial0'
> as the only alias if there is only one port.

Not all boards have their uart pins labeled, but those that do have the pins that connect to the UART at 0x01408000 named UART1RX/UART1TX. Most boards have only one though. I have seen a picture of only one that has UART0 and UART1. I could not test that board myself yet.

My original reason is one of developer convenience: If I have

uart0=serial@131000{
    reg = <0x00131000 0x1000>;
    ...
    status = "disabled";
};
uart1=serial@1408000{
    reg = <0x01408000 0x1000>;
    ...
    status = "okay";
};

cmdline="... console=ttyAMA{0/1} ..."

changing uart0.status between disabled and okay (e.g. to experiment with uart0 and pinctrl) required changing the command line to match. I found that pretty annoying and the aliases seemed like the best way to avoid this.

Either way I am open to do whatever. I can keep the current naming for the reasons stated above, I can name serial@1408000 "uart0" and leave the others without an alias or I can drop the alias altogether.

> Either way, the alias should go into the board specific file, not
> the general SoC file, as a board might be using a different
> set of UARTs.

That works for me, I'll move them. The aliases will most likely be the same for all boards based on this chipset, meaning duplicate code, but matching the alias to the board labels makes sense to me.

> Since you know the addresses of the other uart instances, I would
> suggest you add all of them at the same time.

Will do.

I'll hold off for a bit before I resend the patches to see if some other comments come up.

Cheers,
Stefan

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-04-17 17:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 20:19 [PATCH v4 0/8] Add support for ZTE zx297520v3 Stefan Dösinger
2026-04-16 20:19 ` [PATCH v4 1/8] ARM: zte: Add zx297520v3 platform support Stefan Dösinger
2026-04-16 21:17   ` Randy Dunlap
2026-04-16 20:19 ` [PATCH v4 2/8] dt-bindings: arm: Add zx297520v3 board binding Stefan Dösinger
2026-04-17 21:08   ` Rob Herring (Arm)
2026-04-16 20:19 ` [PATCH v4 3/8] ARM: dts: Add D-Link DWR-932M support Stefan Dösinger
2026-04-16 20:19 ` [PATCH v4 4/8] ARM: zte: Add support for zx29 low level debug Stefan Dösinger
2026-04-16 20:19 ` [PATCH v4 5/8] ARM: dts: Add an armv7 timer for zx297520v3 Stefan Dösinger
2026-04-16 20:19 ` [PATCH v4 6/8] ARM: zte: Bring back zx29 UART support Stefan Dösinger
2026-04-16 20:19 ` [PATCH v4 7/8] ARM: dts: Declare UART1 on zx297520v3 boards Stefan Dösinger
2026-04-17  8:59   ` Arnd Bergmann
2026-04-17 17:24     ` Stefan Dösinger [this message]
2026-04-16 20:19 ` [PATCH v4 8/8] ARM: defconfig: Add a zx29 defconfig file Stefan Dösinger

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=D3228B7D-0C11-4087-9547-0D1F7D5FB628@gmail.com \
    --to=stefandoesinger@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=fustini@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=soc@lists.linux.dev \
    /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