All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>
To: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] ARM: dts: imx: ventana: add RS485 txen gpio support
Date: Tue, 9 Aug 2016 12:08:03 -0700	[thread overview]
Message-ID: <CAJ+vNU3y7LuSs2eRPcuavwJh0w0rBgnmzpqh4V2o5UHLAzBVKQ@mail.gmail.com> (raw)
In-Reply-To: <20160808084029.GE4678@tiger>

On Mon, Aug 8, 2016 at 1:40 AM, Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Wed, Jun 29, 2016 at 06:38:24AM -0700, Tim Harvey wrote:
>> The GW54xx, GW53xx, and GW52xx all have an RS485 transceiver that uses an
>> IMX GPIO for the TX enable of the transceiver. Declare this properly.
>>
>> Signed-off-by: Tim Harvey <tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>
>> ---
>>  arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++
>>  arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++
>>  arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++
>>  3 files changed, 9 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
>> index 8bf1020..25ed57d 100644
>> --- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
>> +++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
>> @@ -315,6 +315,8 @@
>>  &uart1 {
>>       pinctrl-names = "default";
>>       pinctrl-0 = <&pinctrl_uart1>;
>> +     fsl,uart-has-rtscts;
>
> This vendor specific property is deprecated.  Please use generic
> uart-has-rtscts instead.
>

ok - will do for v2

>> +     rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>;
>
> I cannot find this property in any bindings doc.  What I found is
> rts-gpios in bindings/serial/serial.txt.  Also, I'm not sure how this
> property is supported by IMX driver.
>

This is supported by serial_mctrl_gpio
(drivers/tty/serial/serial_mctrl_gpio.c) and the IMX serial driver
does support mctrl-gpio. The serial_mctrl_gpio driver calls
devm_gpiod_get_index_optional for pin names of cts,dsr,dcd,rng,rts,
and dtr. This ends up calling 'of_find_gpio' for these names which
looks for them based on 'gpio_suffixes' which is defined as { "gpios",
"gpio" } so that plural or singular is supported.

Its not documented that gpio specifies can be singular in
Documentation/devicetree/bindings/serial/serial.txt but I always hate
seeing gpio properties named '*-gpios' that only specify a single gpio
so I figured I would use the singular representation. Because this is
not clear in the documentation and there is only one other board using
'rts-gpio' (am335x-nano.dts) vs 'rts-gpios' I will go ahead and change
it for v2 to be more consistent.

Regards,

Tim
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: tharvey@gateworks.com (Tim Harvey)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: imx: ventana: add RS485 txen gpio support
Date: Tue, 9 Aug 2016 12:08:03 -0700	[thread overview]
Message-ID: <CAJ+vNU3y7LuSs2eRPcuavwJh0w0rBgnmzpqh4V2o5UHLAzBVKQ@mail.gmail.com> (raw)
In-Reply-To: <20160808084029.GE4678@tiger>

On Mon, Aug 8, 2016 at 1:40 AM, Shawn Guo <shawnguo@kernel.org> wrote:
> On Wed, Jun 29, 2016 at 06:38:24AM -0700, Tim Harvey wrote:
>> The GW54xx, GW53xx, and GW52xx all have an RS485 transceiver that uses an
>> IMX GPIO for the TX enable of the transceiver. Declare this properly.
>>
>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>> ---
>>  arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++
>>  arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++
>>  arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++
>>  3 files changed, 9 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
>> index 8bf1020..25ed57d 100644
>> --- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
>> +++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
>> @@ -315,6 +315,8 @@
>>  &uart1 {
>>       pinctrl-names = "default";
>>       pinctrl-0 = <&pinctrl_uart1>;
>> +     fsl,uart-has-rtscts;
>
> This vendor specific property is deprecated.  Please use generic
> uart-has-rtscts instead.
>

ok - will do for v2

>> +     rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>;
>
> I cannot find this property in any bindings doc.  What I found is
> rts-gpios in bindings/serial/serial.txt.  Also, I'm not sure how this
> property is supported by IMX driver.
>

This is supported by serial_mctrl_gpio
(drivers/tty/serial/serial_mctrl_gpio.c) and the IMX serial driver
does support mctrl-gpio. The serial_mctrl_gpio driver calls
devm_gpiod_get_index_optional for pin names of cts,dsr,dcd,rng,rts,
and dtr. This ends up calling 'of_find_gpio' for these names which
looks for them based on 'gpio_suffixes' which is defined as { "gpios",
"gpio" } so that plural or singular is supported.

Its not documented that gpio specifies can be singular in
Documentation/devicetree/bindings/serial/serial.txt but I always hate
seeing gpio properties named '*-gpios' that only specify a single gpio
so I figured I would use the singular representation. Because this is
not clear in the documentation and there is only one other board using
'rts-gpio' (am335x-nano.dts) vs 'rts-gpios' I will go ahead and change
it for v2 to be more consistent.

Regards,

Tim

  reply	other threads:[~2016-08-09 19:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 13:38 [PATCH] ARM: dts: imx: ventana: add RS485 txen gpio support Tim Harvey
2016-06-29 13:38 ` Tim Harvey
     [not found] ` <1467207504-5218-1-git-send-email-tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>
2016-08-08  8:40   ` Shawn Guo
2016-08-08  8:40     ` Shawn Guo
2016-08-09 19:08     ` Tim Harvey [this message]
2016-08-09 19:08       ` Tim Harvey
2016-08-09 19:18   ` [PATCH v2] " Tim Harvey
2016-08-09 19:18     ` Tim Harvey
     [not found]     ` <1470770329-25395-1-git-send-email-tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>
2016-08-15 12:16       ` Shawn Guo
2016-08-15 12:16         ` Shawn Guo
  -- strict thread matches above, loose matches on Subject: below --
2016-04-14 13:19 [PATCH] " Tim Harvey
2016-04-14 13:32 ` Baruch Siach
2016-04-14 14:39   ` Tim Harvey
2016-04-15  5:41     ` Baruch Siach
2016-04-18 12:04     ` Geert Uytterhoeven

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=CAJ+vNU3y7LuSs2eRPcuavwJh0w0rBgnmzpqh4V2o5UHLAzBVKQ@mail.gmail.com \
    --to=tharvey-ummoyl/hms+akbo8gow8eq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.