<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 7 Sept 2023, 18:08 Raul Piper, <<a href="mailto:raulpblooper@gmail.com">raulpblooper@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Sep 7, 2023 at 9:47 PM Lucas Tanure <<a href="mailto:tanure@linux.com" target="_blank" rel="noreferrer">tanure@linux.com</a>> wrote:<br>
><br>
><br>
><br>
> On Thu, 7 Sept 2023, 14:56 Russell King (Oracle), <<a href="mailto:linux@armlinux.org.uk" target="_blank" rel="noreferrer">linux@armlinux.org.uk</a>> wrote:<br>
>><br>
>> On Thu, Sep 07, 2023 at 08:36:32PM +0700, Bagas Sanjaya wrote:<br>
>> > [also Cc: devicetree and ARM folks]<br>
>> ><br>
>> > On Thu, Sep 07, 2023 at 08:21:44AM +0530, Raul Piper wrote:<br>
>> > > Hello ,<br>
>> > > I am trying to detect an i2c device A on i2c1 line on one of the Arm<br>
>> > > Cortex A7 platform but not able to see any device on a given address (<br>
>> > > 0x3d) .<br>
>> > ><br>
>> > > Is there any parameters of i2c which i can change like rise/fall time<br>
>> > > , timeout etc in a device tree or kernel source and re test it?<br>
>> > > I have tried changing the i2c speed from 100KHz to 400 KHz but no success.<br>
>> > > I have even tried removing the 1.5K pull ups on the i2c lines but no result.<br>
>><br>
>> Honestly, from this description, I'm wondering if this posting is a joke.<br>
>><br>
>> I2C is entirely _reliant_ on pull-ups. It's a wire-or bus, and the<br>
>> logic 1 state is created by no device pulling the signal low, thereby<br>
>> allowing the pull-up resistor to pull the line to the logic 1 state.<br>
>><br>
>> The pull-up must be the correct strength for the devices on the bus.<br>
>> If it is too strong, then a driver may not be able to pull the signal<br>
>> sufficiently low for other devices to register it as a logic 0.<br>
>><br>
>> Conversely, the pull-up must be strong enough so that the rise-time<br>
>> of the signal is sufficient to register as a logic 1.<br>
>><br>
>> If it's a problem with the rise time, then increasing the clock rate<br>
>> will just make the situation worse.<br>
<br>
Where can I change this time? Can you please provide example of some<br>
device/device tree?<br>
<br>
>><br>
>> So, if other devices work on the bus, it could be that the Vil<br>
>> threshold of this device is not being achieved, whereas the other<br>
>> devices are happy. Therefore, I would suggest you study the data<br>
>> sheets of the device that isn't being detected.<br>
What Vil threshold? I checked the power supply to this device and it<br>
is ~3.3 V as expected.<br>
<br>
>><br>
>> Lastly, if the undetectable device has a reset line, it's possible<br>
>> that the device isn't responding because it's being held in reset.<br>
The device is fine, I am sure about it. As the device provides data on<br>
USART as well and I am getting it.<br>
><br>
> Please try to use an logic analyser like saleae logic.<br>
> Probe the i2c bus, reset line, power lines, pins that set the i2c address for the device.<br>
> Can tell us which device it is?<br>
<br>
Its a GPS sensor(still under development) .Logic Analyser gives NACK<br>
on the given address.<br>
I may be using the wrong pull ups value which i am checking.But from<br>
software point of view is there a Device tree setting to enable the<br>
internal pull ups or adjust the rise/fall time as said above.<br></blockquote></div></div><div dir="auto">Read a little about the i2c protocol and check the signal levels of the i2c lines.</div><div dir="auto">In my experience you can understand the problem by just looking at the signal levels if understand a little bit of i2c protocol.</div><div dir="auto">Use the digital and analogue parts of you logic analyser.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
><br>
><br>
>> --<br>
>> RMK's Patch system: <a href="https://www.armlinux.org.uk/developer/patches/" rel="noreferrer noreferrer" target="_blank">https://www.armlinux.org.uk/developer/patches/</a><br>
>> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!<br>
>><br>
>> _______________________________________________<br>
>> Kernelnewbies mailing list<br>
>> <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank" rel="noreferrer">Kernelnewbies@kernelnewbies.org</a><br>
>> <a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer noreferrer" target="_blank">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div></div></div>