From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Justin Swartz <justin.swartz@risingedge.co.za>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v2 1/3] mips: dts: ralink: mt7621: associate uart1_pins with serial0
Date: Fri, 8 Mar 2024 16:24:28 +0300 [thread overview]
Message-ID: <cbbbe5f8-6505-4f0f-80ce-77759e03235b@arinc9.com> (raw)
In-Reply-To: <9634b4fe726e711bd6bec7e487caab76@risingedge.co.za>
On 8.03.2024 15:40, Justin Swartz wrote:
> Hi Angelo
>
> On 2024-03-08 10:41, AngeloGioacchino Del Regno wrote:
>> Il 07/03/24 20:04, Justin Swartz ha scritto:
>>> Add missing pinctrl-name and pinctrl-0 properties to declare
>>> that the uart1_pins group is associated with serial0.
>>>
>>> Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
>>> ---
>>> arch/mips/boot/dts/ralink/mt7621.dtsi | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>> index 35a10258f..dca415fdd 100644
>>> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
>>> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>> @@ -123,6 +123,9 @@ serial0: serial@c00 {
>>> reg-shift = <2>;
>>> reg-io-width = <4>;
>>> no-loopback-test;
>>> +
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&uart1_pins>;
>>> };
>>> spi0: spi@b00 {
>>
>> The pins are muxed and can be either UART, or some other function that
>> is supported by the mux: this means that the pinctrl-xxx properties shall
>> *not* go into the SoC dtsi file, but in board dts files instead.
>>
>> Said differently: the usage of the UART pins is board-specific, not SoC-wide.
>
> Thanks for the explanation. I agree that the pinctrl properties
> would make more sense in a serial node extension in a board's dts,
> but my reason for including them in the SoC's dtsi is due to the
> precedent set with these existing nodes:
>
> i2c
> spi0
> mmc
> ethernet
> pcie
>
> There is also a default function declared for each of the pin
> groups defined under the pinctrl node. These functions co-incide
> with what is intended for each of those device nodes to function
> correctly, rather than in the alternative GPIO-mode.
>
> So I thought that sticking with that existing pattern would get
> the least resistance from the community.
>
> I can imagine how moving the pinctrl node to the board dts, and
> then moving all of the pinctrl properties associated with device
> nodes to their board dts references could be a better separation
> logically.
>
> What do you recommend?
As a maintainer, this is the logic I follow on the MT7621 device tree
source files regarding the description of pin groups:
- Claim the relevant pin group with the default function (pinctrl-names &
pinctrl-0) on the node that describes a component of the SoC.
- Keep the node disabled and leave it to the board DTS file to enable it.
I don't disable serial@c00 as we can expect every board to use it. Same
goes for ethernet@1e100000. Some boards use the pins on the rgmii2 pin
group as GPIO, so the pinctrl-0 property on ethernet@1e100000 is
overwritten on the board DTS file without rgmii2_pins listed.
So I'm fine with this patch as is.
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Arınç
next prev parent reply other threads:[~2024-03-08 13:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 20:10 [PATCH 1/2] mips: dts: ralink: mt7621: associate uart1_pins with serial0 Justin Swartz
2024-03-06 20:10 ` [PATCH 2/2] mips: dts: ralink: mt7621: add serial1 and serial2 nodes Justin Swartz
2024-03-07 10:04 ` Sergio Paracuellos
2024-03-07 15:14 ` Justin Swartz
2024-03-07 16:36 ` Sergio Paracuellos
2024-03-07 19:04 ` [PATCH v2 1/3] mips: dts: ralink: mt7621: associate uart1_pins with serial0 Justin Swartz
2024-03-07 19:04 ` [PATCH v2 2/3] mips: dts: ralink: mt7621: reorder serial0 properties Justin Swartz
2024-03-08 7:29 ` Sergio Paracuellos
2024-03-08 8:42 ` AngeloGioacchino Del Regno
2024-03-07 19:04 ` [PATCH v2 3/3] mips: dts: ralink: mt7621: add serial1 and serial2 nodes Justin Swartz
2024-03-08 7:28 ` Sergio Paracuellos
2024-03-08 8:44 ` AngeloGioacchino Del Regno
2024-03-08 10:56 ` Arınç ÜNAL
2024-03-08 13:50 ` Arınç ÜNAL
2024-03-08 13:56 ` Justin Swartz
2024-03-08 7:27 ` [PATCH v2 1/3] mips: dts: ralink: mt7621: associate uart1_pins with serial0 Sergio Paracuellos
2024-03-08 7:30 ` Sergio Paracuellos
2024-03-08 8:41 ` AngeloGioacchino Del Regno
2024-03-08 12:40 ` Justin Swartz
2024-03-08 13:24 ` Arınç ÜNAL [this message]
2024-03-07 11:33 ` [PATCH 1/2] " Sergio Paracuellos
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=cbbbe5f8-6505-4f0f-80ce-77759e03235b@arinc9.com \
--to=arinc.unal@arinc9.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=justin.swartz@risingedge.co.za \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sergio.paracuellos@gmail.com \
--cc=tsbogend@alpha.franken.de \
/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).