All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Stephen Barber <smbarber-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	David Wu <david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	Brian Norris
	<briannorris-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Subject: Re: [PATCH] pinctrl: rockchip: fix pull setting error for rk3399
Date: Wed, 11 May 2016 11:31:25 +0800	[thread overview]
Message-ID: <5732A78D.7040308@rock-chips.com> (raw)
In-Reply-To: <CAD=FV=VrE=9=sgqUXBMwmoQin8S+yPbAgnrO1VUgx5QafYWXhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Doug,

于 2016年05月11日 05:07, Doug Anderson 写道:
> Caesar / David,
>
> On Tue, May 10, 2016 at 4:14 AM, Caesar Wang <wxt@rock-chips.com> wrote:
>> From: David Wu <david.wu@rock-chips.com>
>>
>> This patch fixes the pinctrl pull bias setting, since the pull up/down
>> setting is the contrary for gpio0.
> Commit message only mentions gpio0, but gpio2 is also fixed in the
> commit.  Please mention gpio2 in the commit message.

Fix it in next version.

>
>>  From the TRM said, the gpio0 pull polarity setting:
>> gpio0a_p (gpio0 )
>> GPIO0A PE/PS programmation section, every
>> GPIO bit corresponding to 2bits[PS:PE]
>> 2'b00: Z(Noraml operaton);
>> 2'b11: weak 1(pull-up);
>> 2'b01: weak 0(pull-down);
>> 2'b10: Z(Noraml operaton);
> Despite the fact that the typo (Noralm vs. Normal) is present in the
> TRM, maybe we should fix it here?

Yep, ditto.

> <cut>
>
> +
> +               if (ret < 0) {
> +                       dev_err(info->dev, "unknown pull setting %d\n", pull);
> nit: why change the error message?  Old message was "unsupported"
> instead of your new "unknown".  "unsupported" was better IMHO.

Okay, sound resonable.

>
>
>> -       PIN_BANK_DRV_FLAGS(2, 32, "gpio2", DRV_TYPE_IO_1V8_OR_3V0,
>> -                          DRV_TYPE_IO_1V8_OR_3V0,
>> -                          DRV_TYPE_IO_1V8_ONLY,
>> -                          DRV_TYPE_IO_1V8_ONLY
>> -                          ),
>> +       PIN_BANK_DRV_FLAGS_PULL_FLAGS(2, 32, "gpio2", DRV_TYPE_IO_1V8_OR_3V0,
>> +                                     DRV_TYPE_IO_1V8_OR_3V0,
>> +                                     DRV_TYPE_IO_1V8_ONLY,
>> +                                     DRV_TYPE_IO_1V8_ONLY,
>> +                                     PULL_TYPE_IO_DEFAULT,
>> +                                     PULL_TYPE_IO_DEFAULT,
>>
> Are you certain that gpio2 behaves the same way?  The TRM I have says
> this for GPIO2C and GPIO2D:

+                                     PULL_TYPE_IO_1V8_ONLY,
+                                     PULL_TYPE_IO_1V8_ONLY

Yep, so this just set the gpio2c&gpio2d in this function.

>
> 2'b00: pervious-state
> 2'b01: weak 0(pull-down);
> 2'b10: pervious-state
> 2'b11: weak 1(pull-up);
>
> Assuming that "pervious-state" is a simple typo for "previous state"
> that would imply that it was behaving as "bus hold" and _not_ "bias
> disable".

I will say that TRM made the mistake since this is *not* exist.
Okay, fixes by the newer TRM.

>
> Note: if it actually is a "bus hold" state then we'll have to figure
> out how this would work with existing device trees.  I'd imagine that
> they are currently specifying "bias disable" and technically that
> might not be possible?
>
>
>
> -Doug
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: wxt@rock-chips.com (Caesar Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: rockchip: fix pull setting error for rk3399
Date: Wed, 11 May 2016 11:31:25 +0800	[thread overview]
Message-ID: <5732A78D.7040308@rock-chips.com> (raw)
In-Reply-To: <CAD=FV=VrE=9=sgqUXBMwmoQin8S+yPbAgnrO1VUgx5QafYWXhA@mail.gmail.com>

Doug,

? 2016?05?11? 05:07, Doug Anderson ??:
> Caesar / David,
>
> On Tue, May 10, 2016 at 4:14 AM, Caesar Wang <wxt@rock-chips.com> wrote:
>> From: David Wu <david.wu@rock-chips.com>
>>
>> This patch fixes the pinctrl pull bias setting, since the pull up/down
>> setting is the contrary for gpio0.
> Commit message only mentions gpio0, but gpio2 is also fixed in the
> commit.  Please mention gpio2 in the commit message.

Fix it in next version.

>
>>  From the TRM said, the gpio0 pull polarity setting:
>> gpio0a_p (gpio0 )
>> GPIO0A PE/PS programmation section, every
>> GPIO bit corresponding to 2bits[PS:PE]
>> 2'b00: Z(Noraml operaton);
>> 2'b11: weak 1(pull-up);
>> 2'b01: weak 0(pull-down);
>> 2'b10: Z(Noraml operaton);
> Despite the fact that the typo (Noralm vs. Normal) is present in the
> TRM, maybe we should fix it here?

Yep, ditto.

> <cut>
>
> +
> +               if (ret < 0) {
> +                       dev_err(info->dev, "unknown pull setting %d\n", pull);
> nit: why change the error message?  Old message was "unsupported"
> instead of your new "unknown".  "unsupported" was better IMHO.

Okay, sound resonable.

>
>
>> -       PIN_BANK_DRV_FLAGS(2, 32, "gpio2", DRV_TYPE_IO_1V8_OR_3V0,
>> -                          DRV_TYPE_IO_1V8_OR_3V0,
>> -                          DRV_TYPE_IO_1V8_ONLY,
>> -                          DRV_TYPE_IO_1V8_ONLY
>> -                          ),
>> +       PIN_BANK_DRV_FLAGS_PULL_FLAGS(2, 32, "gpio2", DRV_TYPE_IO_1V8_OR_3V0,
>> +                                     DRV_TYPE_IO_1V8_OR_3V0,
>> +                                     DRV_TYPE_IO_1V8_ONLY,
>> +                                     DRV_TYPE_IO_1V8_ONLY,
>> +                                     PULL_TYPE_IO_DEFAULT,
>> +                                     PULL_TYPE_IO_DEFAULT,
>>
> Are you certain that gpio2 behaves the same way?  The TRM I have says
> this for GPIO2C and GPIO2D:

+                                     PULL_TYPE_IO_1V8_ONLY,
+                                     PULL_TYPE_IO_1V8_ONLY

Yep, so this just set the gpio2c&gpio2d in this function.

>
> 2'b00: pervious-state
> 2'b01: weak 0(pull-down);
> 2'b10: pervious-state
> 2'b11: weak 1(pull-up);
>
> Assuming that "pervious-state" is a simple typo for "previous state"
> that would imply that it was behaving as "bus hold" and _not_ "bias
> disable".

I will say that TRM made the mistake since this is *not* exist.
Okay, fixes by the newer TRM.

>
> Note: if it actually is a "bus hold" state then we'll have to figure
> out how this would work with existing device trees.  I'd imagine that
> they are currently specifying "bias disable" and technically that
> might not be possible?
>
>
>
> -Doug
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>

WARNING: multiple messages have this Message-ID (diff)
From: Caesar Wang <wxt@rock-chips.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Caesar Wang <wxt@rock-chips.com>,
	David Wu <david.wu@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Stephen Barber <smbarber@google.com>,
	Brian Norris <briannorris@google.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] pinctrl: rockchip: fix pull setting error for rk3399
Date: Wed, 11 May 2016 11:31:25 +0800	[thread overview]
Message-ID: <5732A78D.7040308@rock-chips.com> (raw)
In-Reply-To: <CAD=FV=VrE=9=sgqUXBMwmoQin8S+yPbAgnrO1VUgx5QafYWXhA@mail.gmail.com>

Doug,

于 2016年05月11日 05:07, Doug Anderson 写道:
> Caesar / David,
>
> On Tue, May 10, 2016 at 4:14 AM, Caesar Wang <wxt@rock-chips.com> wrote:
>> From: David Wu <david.wu@rock-chips.com>
>>
>> This patch fixes the pinctrl pull bias setting, since the pull up/down
>> setting is the contrary for gpio0.
> Commit message only mentions gpio0, but gpio2 is also fixed in the
> commit.  Please mention gpio2 in the commit message.

Fix it in next version.

>
>>  From the TRM said, the gpio0 pull polarity setting:
>> gpio0a_p (gpio0 )
>> GPIO0A PE/PS programmation section, every
>> GPIO bit corresponding to 2bits[PS:PE]
>> 2'b00: Z(Noraml operaton);
>> 2'b11: weak 1(pull-up);
>> 2'b01: weak 0(pull-down);
>> 2'b10: Z(Noraml operaton);
> Despite the fact that the typo (Noralm vs. Normal) is present in the
> TRM, maybe we should fix it here?

Yep, ditto.

> <cut>
>
> +
> +               if (ret < 0) {
> +                       dev_err(info->dev, "unknown pull setting %d\n", pull);
> nit: why change the error message?  Old message was "unsupported"
> instead of your new "unknown".  "unsupported" was better IMHO.

Okay, sound resonable.

>
>
>> -       PIN_BANK_DRV_FLAGS(2, 32, "gpio2", DRV_TYPE_IO_1V8_OR_3V0,
>> -                          DRV_TYPE_IO_1V8_OR_3V0,
>> -                          DRV_TYPE_IO_1V8_ONLY,
>> -                          DRV_TYPE_IO_1V8_ONLY
>> -                          ),
>> +       PIN_BANK_DRV_FLAGS_PULL_FLAGS(2, 32, "gpio2", DRV_TYPE_IO_1V8_OR_3V0,
>> +                                     DRV_TYPE_IO_1V8_OR_3V0,
>> +                                     DRV_TYPE_IO_1V8_ONLY,
>> +                                     DRV_TYPE_IO_1V8_ONLY,
>> +                                     PULL_TYPE_IO_DEFAULT,
>> +                                     PULL_TYPE_IO_DEFAULT,
>>
> Are you certain that gpio2 behaves the same way?  The TRM I have says
> this for GPIO2C and GPIO2D:

+                                     PULL_TYPE_IO_1V8_ONLY,
+                                     PULL_TYPE_IO_1V8_ONLY

Yep, so this just set the gpio2c&gpio2d in this function.

>
> 2'b00: pervious-state
> 2'b01: weak 0(pull-down);
> 2'b10: pervious-state
> 2'b11: weak 1(pull-up);
>
> Assuming that "pervious-state" is a simple typo for "previous state"
> that would imply that it was behaving as "bus hold" and _not_ "bias
> disable".

I will say that TRM made the mistake since this is *not* exist.
Okay, fixes by the newer TRM.

>
> Note: if it actually is a "bus hold" state then we'll have to figure
> out how this would work with existing device trees.  I'd imagine that
> they are currently specifying "bias disable" and technically that
> might not be possible?
>
>
>
> -Doug
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>

  parent reply	other threads:[~2016-05-11  3:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 11:14 [PATCH] pinctrl: rockchip: fix pull setting error for rk3399 Caesar Wang
2016-05-10 11:14 ` Caesar Wang
2016-05-10 11:14 ` Caesar Wang
2016-05-10 21:07 ` Doug Anderson
2016-05-10 21:07   ` Doug Anderson
     [not found]   ` <CAD=FV=VrE=9=sgqUXBMwmoQin8S+yPbAgnrO1VUgx5QafYWXhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-11  3:31     ` Caesar Wang [this message]
2016-05-11  3:31       ` Caesar Wang
2016-05-11  3:31       ` Caesar Wang

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=5732A78D.7040308@rock-chips.com \
    --to=wxt-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=briannorris-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=smbarber-hpIqsD4AKlfQT0dZR+AlfA@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.