From owner-freebsd-arm@freebsd.org Wed Apr 24 11:15:22 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07ADB159552E for ; Wed, 24 Apr 2019 11:15:22 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DA06F880B8 for ; Wed, 24 Apr 2019 11:15:20 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: by mailman.ysv.freebsd.org (Postfix) id 9AFD3159552D; Wed, 24 Apr 2019 11:15:20 +0000 (UTC) Delivered-To: arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D059159552C for ; Wed, 24 Apr 2019 11:15:20 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AA608880B6; Wed, 24 Apr 2019 11:15:19 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 2c63cb17; Wed, 24 Apr 2019 13:15:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=5IJwOkjXiVrz H4cD9eoB0PmTIn8=; b=mBysUwgQW/rTNxTprWRKVKrhCbcxNr4L20Wi27iOjMhD dfS2yRbosbKYGokHSniVZoj1+Cua1EMBIvKf2PxPUtuVihLlzLjUhwOSCI2I2ZgD 4Jx7IkIcVVvPSS2FvOg7akJr5m7iqrzWcXfysDfsUI+Mjys8/AgbYzuHM83KYCA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=pRTszF JGZdPTP0f+R7889BOjv9UmPF7X+Qdh6FmAJCKjwQb4xOBRx2O5FfuV3tyPPWIMes df9cHBCVXzlgZ0hkCJ0+Fq3bRpXOCRTcG+UsBafaJpjVj8OpXz79VQWGl+8Td9dI UhOom9ArjJH3Tk4tEMKJvyRvMj1QmVE3T47rk= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id ea26f177 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 24 Apr 2019 13:15:18 +0200 (CEST) Date: Wed, 24 Apr 2019 13:15:17 +0200 From: Emmanuel Vadot To: Daniel Braniss , "freebsd-arm@freebsd.org" , Ian Lepore Subject: Re: i2c almost working for me, was Re: i2c still not working for me Message-Id: <20190424131517.140d6d4839d2435e08b67d43@bidouilliste.com> In-Reply-To: <20190424130211.7a575f57150882eb3dfabc76@bidouilliste.com> References: <12F641C3-9FAA-4A3A-BA18-A7302F3A0F5E@cs.huji.ac.il> <20190409095819.c560dbc156c46e5ca0244e3e@bidouilliste.com> <23A47048-642A-481C-B7BE-B61E55F82955@cs.huji.ac.il> <20190409171604.GA4581@bluezbox.com> <6119CE3B-6042-4DDC-82BE-B0C0C7ADA838@cs.huji.ac.il> <5D4799BC-08DF-4F3D-81A4-C2D938F4AF93@cs.huji.ac.il> <20190417222601.c037efe0cb48987c81032bac@bidouilliste.com> <64b5598e2c8c7265f89a31b1f191cb1be318788a.camel@freebsd.org> <20190419100502.5546770a5795c20e3f4fa9db@bidouilliste.com> <0FDE4A01-D79E-4AFE-BA4C-3F39C4360AF8@cs.huji.ac.il> <20190424130211.7a575f57150882eb3dfabc76@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: AA608880B6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2019 11:15:22 -0000 On Wed, 24 Apr 2019 13:02:11 +0200 Emmanuel Vadot wrote: > On Fri, 19 Apr 2019 11:35:09 +0300 > Daniel Braniss wrote: > > > > > > > > On 19 Apr 2019, at 11:05, Emmanuel Vadot wrote: > > > > > > On Fri, 19 Apr 2019 10:20:47 +0300 > > > Daniel Braniss > wrote: > > > > > >> > > >> > > >>> On 18 Apr 2019, at 17:19, Ian Lepore wrote: > > >>> > > >>> On Thu, 2019-04-18 at 10:12 +0300, Daniel Braniss wrote: > > >>>>> On 17 Apr 2019, at 23:26, Emmanuel Vadot > > >>>>> wrote: > > >>>>> > > >>>>> On Tue, 16 Apr 2019 09:16:02 +0300 > > >>>>> Daniel Braniss > > > >>>>> wrote: > > >>>>> > > >>>>>> > > >>>>>> > > >>>>>>> On 11 Apr 2019, at 09:56, Daniel Braniss > > >>>>>>> wrote: > > >>>>>>> > > >>>>>>> if no device is connected, I2CRDWR hangs, > > >>>>>>> it also happens with i2c(8) -s, only reboot helps. > > >>>>>>> > > >>>>>>> ichb1: twsi_reset: Using IIC_FASTEST/UNKNOWN mode with speed > > >>>>>>> param=2a > > >>>>>>> iichb1: TWSI_WRITE: Writing 0 to 18 > > >>>>>>> iichb1: TWSI_WRITE: Writing 2a to 14 > > >>>>>>> iichb1: TWSI_WRITE: Writing 40 to c > > >>>>>>> iichb1: TWSI_WRITE: Writing c4 to c > > >>>>>>> iichb1: twsi_transfer: transmitting 2 messages > > >>>>>>> iichb1: TWSI_READ: read f8 from 10 > > >>>>>>> iichb1: twsi_transfer: status=f8 > > >>>>>>> iichb1: twsi_transfer: msg[0] flags: 0 > > >>>>>>> iichb1: twsi_transfer: msg[0] len: 9 > > >>>>>>> iichb1: TWSI_WRITE: Writing e4 to c So looking at this is seems that the "START condition transmitted" interrupt is never triggered, I'll see to add some type of timeout around the pause_sbt. > > >>>>>>> and now it?s hung > > >>>>>> > > >>>>>> [?] > > >>>>> > > >>>>> I don't see that on my OrangePi One or Pine64-LTS. > > >>>> > > >>>> well, mine is are Nanopi Neo, maybe it?s a dts issue? > > >>>> I also have a orangepi-zero but it will take me some time to make > > >>>> a sdcard > > >> > > >> I managed to boot my OrangePi Zero, and i2c -s has no issues, does not hang. > > >> still, with the latest (r346368) my NanoPi Neo hangs when no i2c device is present, > > >> so what is the difference? or where can I look? > > > > > > Are you using the same i2c controller on both ? > > yes, and have tested with several controllers and nanopies, > > > > > Could you paste somewhere the overlays or dts patches ? > > cat ./allwinner/dts/12/h3-i2c.dtso > > /dts-v1/; > > /plugin/; > > > > //#include "sun8i-h3-nanopi-neo.dts" > > > > / { > > compatible = "allwinner,sun8i-h3"; > > }; > > > > &i2c0 { > > ##frequency = <50000>; > > status = "okay"; > > }; > > > > &i2c1 { > > ##frequency = <50000>; > > status = "okay"; > > }; > > > > > > And you have hang on both i2c0 and i2c1 ? > Also please note that i2c1 pins aren't routed on this PCB, I don't > think that this could/should make the i2c controller hangs but ... > > -- > Emmanuel Vadot > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" -- Emmanuel Vadot