devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Lucas Tanure <tanure@linux.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	Linux Devicetree <devicetree@vger.kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andi Shyti <andi.shyti@kernel.org>,
	kernelnewbies <kernelnewbies@kernelnewbies.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Linux I2C <linux-i2c@vger.kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Raul Piper <raulpblooper@gmail.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: Debugging i2c : i2cdetect cant detect a device on i2c line
Date: Thu, 7 Sep 2023 18:28:10 +0100	[thread overview]
Message-ID: <ZPoIKhytmUQqtONp@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAJX_Q+0-v=oadJ697VDawyEhDSPBAS_oqakZFHWVUfsnbCanMA@mail.gmail.com>

On Thu, Sep 07, 2023 at 05:17:47PM +0100, Lucas Tanure wrote:
> On Thu, 7 Sept 2023, 14:56 Russell King (Oracle), <linux@armlinux.org.uk>
> wrote:
> 
> > On Thu, Sep 07, 2023 at 08:36:32PM +0700, Bagas Sanjaya wrote:
> > > [also Cc: devicetree and ARM folks]
> > >
> > > On Thu, Sep 07, 2023 at 08:21:44AM +0530, Raul Piper wrote:
> > > > Hello ,
> > > > I am trying to detect an i2c device A on i2c1 line on  one of the Arm
> > > > Cortex A7 platform but not able to see any device on a given address (
> > > > 0x3d) .
> > > >
> > > > Is there any parameters of i2c which i can change like rise/fall time
> > > > , timeout etc in a device tree or kernel source and re test it?
> > > > I have tried changing the i2c speed from 100KHz to 400 KHz  but no
> > success.
> > > > I have even tried removing the 1.5K pull ups on the i2c lines but no
> > result.
> >
> > Honestly, from this description, I'm wondering if this posting is a joke.
> >
> > I2C is entirely _reliant_ on pull-ups. It's a wire-or bus, and the
> > logic 1 state is created by no device pulling the signal low, thereby
> > allowing the pull-up resistor to pull the line to the logic 1 state.
> >
> > The pull-up must be the correct strength for the devices on the bus.
> > If it is too strong, then a driver may not be able to pull the signal
> > sufficiently low for other devices to register it as a logic 0.
> >
> > Conversely, the pull-up must be strong enough so that the rise-time
> > of the signal is sufficient to register as a logic 1.
> >
> > If it's a problem with the rise time, then increasing the clock rate
> > will just make the situation worse.
> >
> > So, if other devices work on the bus, it could be that the Vil
> > threshold of this device is not being achieved, whereas the other
> > devices are happy. Therefore, I would suggest you study the data
> > sheets of the device that isn't being detected.
> >
> > Lastly, if the undetectable device has a reset line, it's possible
> > that the device isn't responding because it's being held in reset.
> >
> Please try to use an logic analyser like saleae logic.
> Probe the i2c bus, reset line, power lines, pins that set the i2c address
> for the device.
> Can tell us which device it is?

I assume you are replying to Bagas? Please me it clear in future.
Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

      parent reply	other threads:[~2023-09-07 17:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEwN+MCorDCS7EhN40Qgja_nY+SFc3G61Zd6yntqAS+w26YO9Q@mail.gmail.com>
2023-09-07 13:36 ` Debugging i2c : i2cdetect cant detect a device on i2c line Bagas Sanjaya
2023-09-07 13:55   ` Russell King (Oracle)
     [not found]     ` <CAJX_Q+0-v=oadJ697VDawyEhDSPBAS_oqakZFHWVUfsnbCanMA@mail.gmail.com>
2023-09-07 17:08       ` Raul Piper
2023-09-07 18:00         ` Russell King (Oracle)
2023-09-07 17:28       ` Russell King (Oracle) [this message]

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=ZPoIKhytmUQqtONp@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andi.shyti@kernel.org \
    --cc=bagasdotme@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raulpblooper@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=tanure@linux.com \
    /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).