devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Jacky Huang" <ychuang570808@gmail.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	krzysztof.kozlowski+dt@linaro.org, "Lee Jones" <lee@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Tomer Maimon" <tmaimon77@gmail.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial <linux-serial@vger.kernel.org>,
	schung@nuvoton.com, mjchen@nuvoton.com,
	"Jacky Huang" <ychuang3@nuvoton.com>
Subject: Re: [PATCH v10 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support
Date: Wed, 10 May 2023 12:57:26 +0200	[thread overview]
Message-ID: <6b35ee35-0567-473c-9f76-d8bdda0e90a3@app.fastmail.com> (raw)
In-Reply-To: <6bee2314-043d-e1af-016b-779df88f1868@gmail.com>

On Wed, May 10, 2023, at 03:26, Jacky Huang wrote:
> On 2023/5/9 下午 08:32, Arnd Bergmann wrote:
>> On Tue, May 9, 2023, at 14:25, Ilpo Järvinen wrote:
>>> On Tue, 9 May 2023, Arnd Bergmann wrote:
>>>> On Tue, May 9, 2023, at 12:17, Ilpo Järvinen wrote:
>>>>> On Mon, 8 May 2023, Jacky Huang wrote:
>>>>>> +
>>>>>> +#define UART_NR			17
>>>>>> +
>>>>>> +#define UART_REG_RBR		0x00
>>>>>> +#define UART_REG_THR		0x00
>>>>>> +#define UART_REG_IER		0x04
>>>>>> +#define UART_REG_FCR		0x08
>>>>>> +#define UART_REG_LCR		0x0C
>>>>>> +#define UART_REG_MCR		0x10
>>>>> These duplicate include/uapi/linux/serial_reg.h ones, use the std ones
>>>>> directly.
...
>>
>> There is clearly some family lineage, but there are differences
>> everywhere, and I don't think it was designed by extending a 8250
>> compatible hardware block with extra features, but rather built
>> from scratch (sigh) based only loosely on a register description
>> but then extending it with no intent of retaining compatibility.
>>
>
> Yes, the design of this UART IP is indeed incompatible with the 8250, but it
> does imitate the 8250 in some register and register bit field naming, and
> even in usage definitions, which can easily lead to misunderstandings.
>
> In order to distinguish it from the 8250 and make it clear that it has 
> nothing
> to do with the 8250, I hope you can agree with me not to use the existing
> register and bit field definitions of the 8250 in this driver.
>
> In fact, this UART design has been used for more than 15 years and is used
> in our M0/M23/M4, ARM7/ARM9 MCUs and MPUs. The MA35 series will also
> continue to use this design. I will add the MA35_ prefix to all 
> registers and bit
> fields, and make the modifications suggested by Ilpo that are unrelated to
> this 8250 issue.

Sounds good to me, thanks! It would be good if Jiri or GregKH can also
weigh in to make sure they agree on this approach.

On the topic of tty namespace, please also add the change that I suggested
to pick an unused major/minor number range. I'm not entirely sure about
whether using name="ttyS" is actually preferred here or if you should
pick something else here as well. I see that "ttyN" has no other users
are the moment, though "ttyn" is what drivers/tty/serial/jsm/ has.

Maybe Jiri can also recommend what to pick here.

       Arnd

      reply	other threads:[~2023-05-10 10:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08  2:59 [PATCH v10 00/10] Introduce Nuvoton ma35d1 SoC Jacky Huang
2023-05-08  2:59 ` [PATCH v10 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform Jacky Huang
2023-05-08  2:59 ` [PATCH v10 02/10] arm64: defconfig: Add support for Nuvoton MA35 family SoCs Jacky Huang
2023-05-08  2:59 ` [PATCH v10 03/10] dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller Jacky Huang
2023-05-08  3:26   ` Rob Herring
2023-05-08  6:30     ` Krzysztof Kozlowski
2023-05-08  2:59 ` [PATCH v10 04/10] dt-bindings: reset: nuvoton: Document ma35d1 reset control Jacky Huang
2023-05-08  3:26   ` Rob Herring
2023-05-08  2:59 ` [PATCH v10 05/10] dt-bindings: arm: Add initial bindings for Nuvoton platform Jacky Huang
2023-05-08  3:26   ` Rob Herring
2023-05-08  2:59 ` [PATCH v10 06/10] dt-bindings: serial: Document ma35d1 uart controller Jacky Huang
2023-05-08  3:26   ` Rob Herring
2023-05-08  6:31     ` Krzysztof Kozlowski
2023-05-08  7:01       ` Jacky Huang
2023-05-08  8:05         ` Krzysztof Kozlowski
2023-05-08  8:15           ` Jacky Huang
2023-05-08  2:59 ` [PATCH v10 07/10] arm64: dts: nuvoton: Add initial ma35d1 device tree Jacky Huang
2023-05-08  2:59 ` [PATCH v10 08/10] clk: nuvoton: Add clock driver for ma35d1 clock controller Jacky Huang
2023-05-08 10:52   ` Ilpo Järvinen
2023-05-09  0:58     ` Jacky Huang
2023-05-08  2:59 ` [PATCH v10 09/10] reset: Add Nuvoton ma35d1 reset driver support Jacky Huang
2023-05-08  8:20   ` Philipp Zabel
2023-05-08 11:00   ` Ilpo Järvinen
2023-05-09  1:09     ` Jacky Huang
2023-05-08  2:59 ` [PATCH v10 10/10] tty: serial: Add Nuvoton ma35d1 serial " Jacky Huang
2023-05-09 10:17   ` Ilpo Järvinen
2023-05-09 12:14     ` Arnd Bergmann
2023-05-09 12:25       ` Ilpo Järvinen
2023-05-09 12:32         ` Arnd Bergmann
2023-05-10  1:26           ` Jacky Huang
2023-05-10 10:57             ` Arnd Bergmann [this message]

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=6b35ee35-0567-473c-9f76-d8bdda0e90a3@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mjchen@nuvoton.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=schung@nuvoton.com \
    --cc=tmaimon77@gmail.com \
    --cc=will@kernel.org \
    --cc=ychuang3@nuvoton.com \
    --cc=ychuang570808@gmail.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).