From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD73CEC8742 for ; Thu, 7 Sep 2023 17:28:44 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1qeInx-0001Lg-2T; Thu, 07 Sep 2023 13:28:33 -0400 Received: from [2001:4d48:ad52:32c8:5054:ff:fe00:142] (helo=pandora.armlinux.org.uk) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qeInw-0001LP-1w for kernelnewbies@kernelnewbies.org; Thu, 07 Sep 2023 13:28:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e3sbmtikRY69TAsDKmcau5vqebtKawBbX+Q/ivAEisE=; b=c62wQh3PD8tyy7+OJkND0FuxVp vSB9FeWWP4sx22lnqZyGTp4BBpE/GfPpIW+KAe2blgEiFXYhKlKBLviCpWELJ1+ZhPO2Dw3ngklcd QYa+bv+euVRKyifDj68xQVQM7K3wQYTYK3wDL67jVRalBMAuMwfby+NfQ6OjiVj8LlvZsGrFDwnTr ixtnax2jPcZpJ8vKd8Qr3BAMQaI8zTikVljgjMZ1Ix5DiixDPIr8Oc1mj4hB/7SR+S+fvrM+Rha9M A+l7si4YlKTFOoTV27KRvKgTiUl6Vw2Sw70LwLBZ/WMEZrT6MvSMUZFYEa/HmU2ZREYk5BkXyXphp Sx/BFMFQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:42468) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qeIna-00049j-35; Thu, 07 Sep 2023 18:28:10 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qeIna-00061L-Ok; Thu, 07 Sep 2023 18:28:10 +0100 Date: Thu, 7 Sep 2023 18:28:10 +0100 From: "Russell King (Oracle)" To: Lucas Tanure Subject: Re: Debugging i2c : i2cdetect cant detect a device on i2c line Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: Linux Devicetree , Conor Dooley , Andi Shyti , Krzysztof Kozlowski , kernelnewbies , Linus Walleij , LKML , Rob Herring , Linux I2C , Bagas Sanjaya , Raul Piper , Linux ARM X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Thu, Sep 07, 2023 at 05:17:47PM +0100, Lucas Tanure wrote: > On Thu, 7 Sept 2023, 14:56 Russell King (Oracle), > 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! _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79B81EC8726 for ; Thu, 7 Sep 2023 17:29:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234814AbjIGRaB (ORCPT ); Thu, 7 Sep 2023 13:30:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239233AbjIGRaB (ORCPT ); Thu, 7 Sep 2023 13:30:01 -0400 Received: from pandora.armlinux.org.uk (unknown [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33D71FFA; Thu, 7 Sep 2023 10:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e3sbmtikRY69TAsDKmcau5vqebtKawBbX+Q/ivAEisE=; b=c62wQh3PD8tyy7+OJkND0FuxVp vSB9FeWWP4sx22lnqZyGTp4BBpE/GfPpIW+KAe2blgEiFXYhKlKBLviCpWELJ1+ZhPO2Dw3ngklcd QYa+bv+euVRKyifDj68xQVQM7K3wQYTYK3wDL67jVRalBMAuMwfby+NfQ6OjiVj8LlvZsGrFDwnTr ixtnax2jPcZpJ8vKd8Qr3BAMQaI8zTikVljgjMZ1Ix5DiixDPIr8Oc1mj4hB/7SR+S+fvrM+Rha9M A+l7si4YlKTFOoTV27KRvKgTiUl6Vw2Sw70LwLBZ/WMEZrT6MvSMUZFYEa/HmU2ZREYk5BkXyXphp Sx/BFMFQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:42468) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qeIna-00049j-35; Thu, 07 Sep 2023 18:28:10 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qeIna-00061L-Ok; Thu, 07 Sep 2023 18:28:10 +0100 Date: Thu, 7 Sep 2023 18:28:10 +0100 From: "Russell King (Oracle)" To: Lucas Tanure Cc: Bagas Sanjaya , Linux Devicetree , Conor Dooley , Andi Shyti , kernelnewbies , Linus Walleij , LKML , Rob Herring , Linux I2C , Krzysztof Kozlowski , Raul Piper , Linux ARM Subject: Re: Debugging i2c : i2cdetect cant detect a device on i2c line Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On Thu, Sep 07, 2023 at 05:17:47PM +0100, Lucas Tanure wrote: > On Thu, 7 Sept 2023, 14:56 Russell King (Oracle), > 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! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBFA1EC8742 for ; Thu, 7 Sep 2023 17:29:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ghYSEBP8PoKE9CAYS8h3Rf1p2BQeC4YhDL47OEVxAn4=; b=NjDyA+QD+nmiiC zekhb55DClT/PDgGT8pQ3Yt7JNYbVXNEra9Sb0NojpFQS5R2B5oT31hzSveZ8/zhF6q9KamMT0umF KDOnPY8WnXGaZON6vWzsWPWm1C+9oHMHkdUrSxL1FMGz9jOoLFZwuAMYT8GUS1Y6hoiOEHDRONyXX Kul9/zZYU3srZRIC/mHFlpRK2LpVBMI2E4qjj/Q6Uwr+N5FrIWEJqwi8DYtPhDko7ruPIVFI/datf 5TIkA482Xu1Sg6iBl87y0LxEutZBL3oKEFP+H8NNtSI3yPkbpROl1N62VTw6nh12h9C8/yroyo+Mg aK+RLja89jTJIrDnk3Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qeIo0-00CTgE-2b; Thu, 07 Sep 2023 17:28:36 +0000 Received: from [2001:4d48:ad52:32c8:5054:ff:fe00:142] (helo=pandora.armlinux.org.uk) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qeInv-00CTfR-2P for linux-arm-kernel@lists.infradead.org; Thu, 07 Sep 2023 17:28:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e3sbmtikRY69TAsDKmcau5vqebtKawBbX+Q/ivAEisE=; b=c62wQh3PD8tyy7+OJkND0FuxVp vSB9FeWWP4sx22lnqZyGTp4BBpE/GfPpIW+KAe2blgEiFXYhKlKBLviCpWELJ1+ZhPO2Dw3ngklcd QYa+bv+euVRKyifDj68xQVQM7K3wQYTYK3wDL67jVRalBMAuMwfby+NfQ6OjiVj8LlvZsGrFDwnTr ixtnax2jPcZpJ8vKd8Qr3BAMQaI8zTikVljgjMZ1Ix5DiixDPIr8Oc1mj4hB/7SR+S+fvrM+Rha9M A+l7si4YlKTFOoTV27KRvKgTiUl6Vw2Sw70LwLBZ/WMEZrT6MvSMUZFYEa/HmU2ZREYk5BkXyXphp Sx/BFMFQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:42468) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qeIna-00049j-35; Thu, 07 Sep 2023 18:28:10 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qeIna-00061L-Ok; Thu, 07 Sep 2023 18:28:10 +0100 Date: Thu, 7 Sep 2023 18:28:10 +0100 From: "Russell King (Oracle)" To: Lucas Tanure Cc: Bagas Sanjaya , Linux Devicetree , Conor Dooley , Andi Shyti , kernelnewbies , Linus Walleij , LKML , Rob Herring , Linux I2C , Krzysztof Kozlowski , Raul Piper , Linux ARM Subject: Re: Debugging i2c : i2cdetect cant detect a device on i2c line Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230907_102831_809323_4D632F0F X-CRM114-Status: GOOD ( 33.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 07, 2023 at 05:17:47PM +0100, Lucas Tanure wrote: > On Thu, 7 Sept 2023, 14:56 Russell King (Oracle), > 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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel