From owner-freebsd-arm@freebsd.org Tue Apr 9 07:58:29 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 3C215157836E for ; Tue, 9 Apr 2019 07:58:29 +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 8FE7380F82 for ; Tue, 9 Apr 2019 07:58:28 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: by mailman.ysv.freebsd.org (Postfix) id 53ABC157836D; Tue, 9 Apr 2019 07:58:28 +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 2C32B157836B for ; Tue, 9 Apr 2019 07:58:28 +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 9E63F80F80 for ; Tue, 9 Apr 2019 07:58:27 +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 51866f79; Tue, 9 Apr 2019 09:58:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=Y7iRJM8x9nHKvL60h979yW6ZAHU=; b=ZFVjNYIXDiNvXl8CqZw184J5m4KK +esUdCSAkoLI7Cmuns6wkosZUP+vm0Tx2udn0/nYznfNw/Da7UwapM+FWhSuhWND Gb5YLXXuRz+utWatCwtvFRQgcNHuBAMb29VF87ba8LVt2dhT96hBln/UljtCOnrS l5wvH9CL4aPwd2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=r3SwKg01gwwvy/p/BQDixceYZd3bCsIJtEJvf4tVsu+xxyFrodPGUEEM 1DJ5Ex0o9ddn3Q2AisWlEv08U3IyZ8Xlul59y75E65jUf/HErvq2aBTiiJSmgQC5 KWsWlzPEjAsK9ie/ElcEEvonc1DF5TaGq9aO33aQEyykvod6oUg= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 6bd35136 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 9 Apr 2019 09:58:19 +0200 (CEST) Date: Tue, 9 Apr 2019 09:58:19 +0200 From: Emmanuel Vadot To: Daniel Braniss Cc: "freebsd-arm@freebsd.org" Subject: Re: i2c still not working for me Message-Id: <20190409095819.c560dbc156c46e5ca0244e3e@bidouilliste.com> In-Reply-To: <12F641C3-9FAA-4A3A-BA18-A7302F3A0F5E@cs.huji.ac.il> References: <12F641C3-9FAA-4A3A-BA18-A7302F3A0F5E@cs.huji.ac.il> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 9E63F80F80 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Tue, 09 Apr 2019 07:58:29 -0000 On Tue, 9 Apr 2019 10:50:22 +0300 Daniel Braniss wrote: > Hi, > after the latest changes to i2c there is a small improvement, > i2c -s finds the device but complains: >=20 > root@neo-14:~ # i2c -s > Hardware may not support START/STOP scanning; trying less-reliable read m= ethod. > Scanning I2C devices on /dev/iic0: 24 >=20 > but nothing else works. >=20 > I?ll try and connect my saleae signal analyzer later, but in the meantim= e this is what I get > on the console: > [?] > iichb0: twsi_control_clear: read val=3D58 > iichb0: twsi_control_clear: write val=3D40 > iichb0: TWSI_WRITE: Writing 40 to c > iichb0: twsi_start: twsi_start: slave=3D48 > iichb0: twsi_locked_start: send start > iichb0: TWSI_READ: read 58 from c > iichb0: twsi_control_set: read val=3D58 > iichb0: twsi_control_set: write val=3D68 > iichb0: TWSI_WRITE: Writing 68 to c > iichb0: twsi_poll_ctrl: Waiting for ctrl r. > eg to match mask 8 > iichb0: TWSI_READ: read 48 from c > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > twsi_poll_ctrl: done > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > TWSI_READ: read 8 from 10 > iichb0: twsi_locked_start: status=3D8 > iichb0: TWSI_WRITE: Writing 48 to 8 > gic0: Spurious interrupt detected: last irq: 32 on CPU1 > iichb0: TWSI_READ: read 48 from c > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > twsi_control_clear: read val=3D48 > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > twsi_control_clear: write val=3D40 > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > TWSI_WRITE: Writing 40 to c > gic0: Spurious interrupt detected: last irq: 32 on CPU1 > iichb0: twsi_poll_ctrl: Waiting for ctrl reg to match mask 8 > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > TWSI_READ: read 48 from c > iichb0: twsi_poll_ctrl: done > iichb0: TWSI_READ: read 8 from 10 > iichb0: twsi_locked_start: no ACK (status: 08) after sending slave address > gic0: iichb0: Spurious interrupt detected: last irq: 32 on CPU1 > twsi_stop: twsi_stop > [?] >=20 > BTW, the hardware is NanoPi-neo and it?s running Current 345984 >=20 > thanks, > danny >=20 Based on the function names you are using directly stop/start/etc ... My changes were only for i2c_transfer (I2CRDWR ioctls) --=20 Emmanuel Vadot