From: Daniel Golle <daniel@makrotopia.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: "Sjoerd Simons" <sjoerd@collabora.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Ryder Lee" <ryder.lee@mediatek.com>,
"Jianjun Wang" <jianjun.wang@mediatek.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
"Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Lee Jones" <lee@kernel.org>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Felix Fietkau" <nbd@nbd.name>,
kernel@collabora.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org,
linux-phy@lists.infradead.org, netdev@vger.kernel.org,
"Bryan Hinton" <bryan@bryanhinton.com>
Subject: Re: [PATCH 02/15] arm64: dts: mediatek: mt7981b-openwrt-one: Configure UART0 pinmux
Date: Mon, 20 Oct 2025 13:28:17 +0100 [thread overview]
Message-ID: <aPYq4cnaAHu5ags5@makrotopia.org> (raw)
In-Reply-To: <82594ce7-f093-4753-b808-cd234845aed8@collabora.com>
On Mon, Oct 20, 2025 at 12:23:14PM +0200, AngeloGioacchino Del Regno wrote:
> Il 16/10/25 18:37, Daniel Golle ha scritto:
> > On Thu, Oct 16, 2025 at 04:29:14PM +0200, AngeloGioacchino Del Regno wrote:
> > > Il 16/10/25 14:38, Daniel Golle ha scritto:
> > > > On Thu, Oct 16, 2025 at 12:08:38PM +0200, Sjoerd Simons wrote:
> > > > > Add explicit pinctrl configuration for UART0 on the OpenWrt One board,
> > > > >
> > > > > Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> > > > > ---
> > > > > arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts | 11 +++++++++++
> > > > > 1 file changed, 11 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
> > > > > index 968b91f55bb27..f836059d7f475 100644
> > > > > --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
> > > > > +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
> > > > > @@ -22,6 +22,17 @@ memory@40000000 {
> > > > > };
> > > > > };
> > > > > +&pio {
> > > > > + uart0_pins: uart0-pins {
> > > > > + mux {
> > > > > + function = "uart";
> > > > > + groups = "uart0";
> > > > > + };
> > > > > + };
> > > > > +};
> > > > > +
> > > > > &uart0 {
> > > > > + pinctrl-names = "default";
> > > > > + pinctrl-0 = <&uart0_pins>;
> > > > > status = "okay";
> > > > > };
> > > >
> > > > As there is only a single possible pinctrl configuration for uart0,
> > > > both the pinmux definition as well as the pinctrl properties should go
> > > > into mt7981b.dtsi rather than in the board's dts.
> > >
> > > If there's really one single possible pin configuration for the UART0 pins,
> > > as in, those pins *do not* have a GPIO mode, then yes I agree.
> > >
> > > If those pins can be as well configured as GPIOs, this goes to board DTS.
> >
> > I respectfully disagree and will explain below.
> >
>
> Thanks a lot for taking the time to write all this - explains everything,
> and even too much :) :)
>
> Though, there's something funny here! The following snippet of "main" text
> does explain stuff that is interesting, but that I (not other people, so
> thanks again for saying all this) know already, but.....
>
> > All pinmux pins on the MediaTek platform also allow being configured as
> > GPIOs. However, if you configure those as GPIOs the consequence is that
> > you cannot use UART0 any more at all. So using UART0 at all always
> > implies using exactly those pins, there is no alternative to that.
> >
> > Hence every board with every possible uses of pins 32 and 33 (there is
> > only RX and TX for UART0, RTS/CTS flow-control is not possible) can be
> > represented without needing to configure the pinctrl for uart0 on the
> > board level. There isn't going to be any variation on the board-level
> > when it comes to uart0. Either it is enabled (status = "okay";), and
> > that will always imply using the 'uart0' group in mode 'uart', or, in
> > case any of the two pins of uart0 is used for something else that means
> > uart0 cannot be enabled. Simple as that.
> >
> > Hence there is no need to duplicate that pinctrl settings on each and
> > every board, as controlling the 'status' property on the board-level
> > already gives 100% freedom.
> >
>
> ...all of this is not justifying your point.
So what is the rule then? I understand the logic of describing the
pins eg. for uart1 only on board-level as there are actual alternatives
regarding the pins to be used, and if also including RTS/CTS pins.
Hence, for uart1, there are several possible pingroups which can be
used. What would be the argument to keep a pinctrl description for
which the SoC doesn't offer any alternatives to be on the board-level?
There is nothing to be decided by the board, literally 0 freedom.
>
> > (Sidenote: As even the BootROM already uses those two pins as UART for
> > debug output,
>
> Funny thing is, your side note is what *fully* justifies your disagreement
> and it's also what triggers me to say that you're right, lol :)
>
> Okay then, I am fine with this commit now and I can renew my
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Note that the patch you have just added your Reviewed-by:-tag to does
*not* add the uart0 pinctrl on SoC-level but board-level, so different
from what I argued for above. Did you mean to add Reviewed-by: for that
(which contraticts what you just wrote) or rather to the to-be-submitted
v2 of this series which includes the change to move the uart0 pinctrl
to mt7981b.dtsi?
next prev parent reply other threads:[~2025-10-20 12:28 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 10:08 [PATCH 00/15] arm64: dts: mediatek: Add Openwrt One AP functionality Sjoerd Simons
2025-10-16 10:08 ` [PATCH 01/15] arm64: dts: mediatek: mt7981b: Add labels to commonly referenced nodes Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 02/15] arm64: dts: mediatek: mt7981b-openwrt-one: Configure UART0 pinmux Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 12:38 ` Daniel Golle
2025-10-16 14:29 ` AngeloGioacchino Del Regno
2025-10-16 16:37 ` Daniel Golle
2025-10-20 10:23 ` AngeloGioacchino Del Regno
2025-10-20 12:28 ` Daniel Golle [this message]
2025-10-20 14:02 ` AngeloGioacchino Del Regno
2025-10-20 17:05 ` Daniel Golle
2025-10-16 10:08 ` [PATCH 03/15] arm64: dts: mediatek: mt7981b: Add reserved memory for TF-A Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 04/15] dt-bindings: mfd: syscon: Add mt7981-topmisc Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:29 ` Conor Dooley
2025-10-16 10:08 ` [PATCH 05/15] dt-bindings: pci: mediatek-pcie-gen3: Add MT7981 PCIe compatible Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:28 ` Conor Dooley
2025-10-16 15:55 ` Bjorn Helgaas
2025-10-16 10:08 ` [PATCH 06/15] dt-bindings: phy: mediatek,tphy: Add support for MT7981 Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:28 ` Conor Dooley
2025-10-16 10:08 ` [PATCH 07/15] arm64: dts: mediatek: mt7981b: Add PCIe and USB support Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 08/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable PCIe and USB Sjoerd Simons
2025-10-16 10:08 ` [PATCH 09/15] dt-bindings: net: mediatek,net: Correct bindings for MT7981 Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:27 ` Conor Dooley
2025-10-16 10:08 ` [PATCH 10/15] arm64: dts: mediatek: mt7981b: Add Ethernet and WiFi offload support Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-16 16:47 ` Daniel Golle
2025-10-20 10:27 ` AngeloGioacchino Del Regno
2025-10-20 12:17 ` Daniel Golle
2025-10-30 20:34 ` Sjoerd Simons
2025-10-16 10:08 ` [PATCH 11/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable SPI NOR Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-30 21:26 ` Sjoerd Simons
2025-10-16 10:08 ` [PATCH 12/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable Ethernet Sjoerd Simons
2025-10-17 17:31 ` Andrew Lunn
2025-10-21 20:21 ` Sjoerd Simons
2025-10-21 20:40 ` Andrew Lunn
2025-10-22 6:56 ` Sjoerd Simons
2025-10-28 11:14 ` Eric Woudstra
2025-10-28 13:24 ` Sjoerd Simons
2025-10-29 15:41 ` Lucien.Jheng
2025-10-16 10:08 ` [PATCH 13/15] arm64: dts: mediatek: mt7981b: Add wifi memory region Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-11-01 12:40 ` Sjoerd Simons
2025-10-16 10:08 ` [PATCH 14/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable wifi Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 15/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable leds Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-17 17:35 ` Andrew Lunn
2025-10-22 7:26 ` Sjoerd Simons
2025-10-22 12:35 ` Andrew Lunn
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=aPYq4cnaAHu5ags5@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bhelgaas@google.com \
--cc=bryan@bryanhinton.com \
--cc=chunfeng.yun@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=jianjun.wang@mediatek.com \
--cc=kernel@collabora.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=sjoerd@collabora.com \
--cc=vkoul@kernel.org \
/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