All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: "Wolfram Sang" <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org,
	"Mauro Carvalho Chehab" <mchehab@osg.samsung.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	linux-pm@vger.kernel.org,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"Enric Balletbo i Serra" <eballetbo@gmail.com>,
	"Agustí Fontquerni" <af@iseebcn.com>
Subject: Re: tvp5150 regression after commit 9f924169c035
Date: Fri, 15 Apr 2016 07:58:29 -0700	[thread overview]
Message-ID: <20160415145828.GT5973@atomide.com> (raw)
In-Reply-To: <57102EE3.3020707@osg.samsung.com>

* Javier Martinez Canillas <javier@osg.samsung.com> [160414 17:00]:
> On 04/14/2016 11:12 AM, Tony Lindgren wrote:
> > Is this with omap3 and does tvp5150 have a reset GPIO pin?
> 
> Yes, it's a DM3730 (OMAP3) and yes the tvp5150 (actually it's a tvp5151) has
> a reset pin that has to be toggled, along with a power-down pin for the chip
> to be in an operative state before accessing the I2C registers. That is the
> power/reset sequence I mentioned before.
>  
> > If so, you could be hitting the GPIO errata where a glitch can happen
> > when restoring the GPIO state coming back from off mode in idle. This
> > happes for GPIO pins that are not in GPIO bank1 and have an external
> > pull down resistor on the line.
> >
> 
> The GPIO lines connected to these pins are:
> 
> GPIO126 (bank4 pin 30) -> tvp5150 power-down pin
> GPIO167 (bank6 pin 7)  -> tvp5150 reset pin
> 
> Neither are in GPIO bank1 so they could be affected by the errata you
> mention but there isn't external pull down (or up) resistors on these
> lines AFAICT by looking at the board schematics. I've added to the cc
> list to other people that are familiar with the board in case I missed
> something.
> 
> > The short term workaround is to mux the reset pin to use the internal
> > pulls by using PIN_INPUT_PULLUP | MUX_MODE7, or depending on the direction,
> > PIN_INPUT_PULLDOWN | MUX_MODE7.
> 
> I guess you meant MUX_MODE4 here since the pin has to be in GPIO mode?

No, the glitch affects the GPIO mode, so that's why direction + pull +
safe mode is needed.

> Also, I wonder how the issue could be related to the GPIO controller
> since is when enabling runtime PM for the I2C controller that things
> fail. IOW, disabling runtime PM for the I2C adapter shouldn't make
> things to work if the problem was caused by the mentioned GPIO errata.

If you block PM runtime for I2C, then it blocks deeper idle states
for the whole device. Note that you can disable off mode during idle
and suspend with:

# echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode

> In any case, I've tried to use the internal pulls as you suggested but
> that didn't solve the issue.

OK. Just to be sure.. Did you use the safe mode mux option instead
of the GPIO mux option?

Note that in some cases the internal pull is not strong enough to
keep the reset line up if there's an external pull down resistor.

Regards,

Tony

  reply	other threads:[~2016-04-15 14:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 13:46 tvp5150 regression after commit 9f924169c035 Javier Martinez Canillas
2016-02-03 14:23 ` Wolfram Sang
2016-02-03 14:42   ` Javier Martinez Canillas
2016-02-08 10:54 ` Wolfram Sang
2016-02-12 22:09   ` Javier Martinez Canillas
2016-02-12 22:13     ` Tony Lindgren
2016-02-12 22:28       ` Javier Martinez Canillas
2016-02-12 22:40         ` Tony Lindgren
2016-02-12 23:08           ` Javier Martinez Canillas
2016-02-12 23:46             ` Tony Lindgren
2016-02-13  2:47               ` Javier Martinez Canillas
2016-04-12 22:32                 ` Wolfram Sang
2016-04-13 22:39                   ` Javier Martinez Canillas
2016-04-14 11:12                     ` Wolfram Sang
2016-04-14 13:41                       ` Javier Martinez Canillas
2016-04-14 14:19                         ` Wolfram Sang
2016-04-14 14:27                           ` Javier Martinez Canillas
2016-04-14 15:12                             ` Tony Lindgren
2016-04-14 23:59                               ` Javier Martinez Canillas
2016-04-15 14:58                                 ` Tony Lindgren [this message]
2016-04-15 16:48                                   ` Javier Martinez Canillas
2016-04-15 17:08                                     ` Tony Lindgren
2016-02-12 22:22     ` Wolfram Sang
2016-02-12 22:26       ` Javier Martinez Canillas

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=20160415145828.GT5973@atomide.com \
    --to=tony@atomide.com \
    --cc=af@iseebcn.com \
    --cc=eballetbo@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=stern@rowland.harvard.edu \
    --cc=wsa@the-dreams.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 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.