From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Anson Huang <anson.huang@nxp.com>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ARM: dts: imx6sx: Add missing uart mux function
Date: Thu, 13 Feb 2020 10:51:19 +0100 [thread overview]
Message-ID: <20200213095119.f6obrdqb6ql76qqy@pengutronix.de> (raw)
In-Reply-To: <DB3PR0402MB39163A56BF6AA37E3C691964F51A0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
Hello Anson,
On Thu, Feb 13, 2020 at 09:18:10AM +0000, Anson Huang wrote:
> > On Thu, Feb 13, 2020 at 02:43:09PM +0800, Anson Huang wrote:
> > > From: Anson Huang <b20788@freescale.com>
> > >
> > > Update i.MX6SX pinfunc header to add uart mux function.
> >
> > I'm aware you add the macros in a consistent way to the already existing
> > stuff. Still I think there is something to improve here. We now have
> > definitions like:
> >
> > MX6SX_PAD_GPIO1_IO06__UART1_RTS_B
> > MX6SX_PAD_GPIO1_IO06__UART1_CTS_B
> >
> > MX6SX_PAD_GPIO1_IO07__UART1_CTS_B
> > MX6SX_PAD_GPIO1_IO07__UART1_RTS_B
> >
> > where (ignoring other pins that could be used) only the following
> > combinations are valid:
> >
> > MX6SX_PAD_GPIO1_IO04__UART1_TX
> > MX6SX_PAD_GPIO1_IO05__UART1_RX
> > MX6SX_PAD_GPIO1_IO06__UART1_RTS_B
> > MX6SX_PAD_GPIO1_IO07__UART1_CTS_B
> >
> > (in DCE mode) and
> >
> > MX6SX_PAD_GPIO1_IO04__UART1_RX
> > MX6SX_PAD_GPIO1_IO05__UART1_TX
> > MX6SX_PAD_GPIO1_IO06__UART1_CTS_B
> > MX6SX_PAD_GPIO1_IO07__UART1_RTS_B
> >
> > (in DTE mode).
>
> Is it possible the using below combination, if possible, then I think the prefix "DTE/DCE" are
> NOT impacting real functions, they are just different names for better identification:
>
> MX6SX_PAD_GPIO1_IO04__UART1_TX
> MX6SX_PAD_GPIO1_IO05__UART1_RX
> MX6SX_PAD_GPIO1_IO06__UART1_CTS_B
> MX6SX_PAD_GPIO1_IO07__UART1_RTS_B
This is wrong according to my experience. If you look at the diagram in
the i.MX6SX RM in the External Signals chapter (page 4111 in the
IMX6SXRM Rev. 2, 9/2017) you can only either use RX/TX and RTS/CTS for
their original purpose, or swap both pairs together.
> > For i.MX6SLL, i.MX6UL, imx6ULL and i.MX7 the naming convention is saner, a
> > typical definition there is:
> >
> > MX7D_PAD_LPSR_GPIO1_IO04__UART5_DTE_RTS
> >
> > where the name includes DTE and where is it (more) obvious that this cannot
> > be combined with
> >
> > MX7D_PAD_LPSR_GPIO1_IO07__UART5_DCE_TX
> >
> > .
> >
> > I suggest to adapt the latter naming convention also for the other i.MX
> > pinfunc headers, probably with introducing defines for not breaking existing
> > dts files.
>
> If to improve the name, just change the existing dts files which use them should be OK,
> as this header file ONLY used by DT and should be no compatible issues. So should I
> change the dts files together?
My approach would be one patch for each of:
- rename existing imx6sx symbols to contain DTE or DCE
(introducing defines that map the old name to the new)
- introduce the new defines you added in your patch under discussion
here (with the new naming scheme obviously)
- switch all in-tree consumers to the new names
(maybe offering to split per machine)
I would also drop the _B suffix in the first patch which serves no
useful purpose.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
next prev parent reply other threads:[~2020-02-13 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 6:43 Anson Huang
2020-02-13 7:27 ` Uwe Kleine-König
2020-02-13 9:18 ` Anson Huang
2020-02-13 9:51 ` Uwe Kleine-König [this message]
2020-02-14 5:11 ` Anson Huang
2020-02-14 7:02 ` Uwe Kleine-König
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=20200213095119.f6obrdqb6ql76qqy@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=anson.huang@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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
all inboxes | Powered by JetHome®