From owner-freebsd-arm@freebsd.org Tue Apr 9 08:04:32 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 2D78B1578773 for ; Tue, 9 Apr 2019 08:04:32 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) 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 671168130D for ; Tue, 9 Apr 2019 08:04:31 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.ysv.freebsd.org (Postfix) id 261F51578772; Tue, 9 Apr 2019 08:04:31 +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 01A061578771 for ; Tue, 9 Apr 2019 08:04:31 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F668130B for ; Tue, 9 Apr 2019 08:04:30 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=m7WwqPr9YzWPXnl2tnB2Uytqz916TeTyzSMUs2VRv0w=; b=ASOykWXerc8tN8X7MoRbsZoAgQHdEx4pwA0qvKMES+KGF8SndyBeQGzSN4l5hbPkTQao7Ez95yM2Lgamm40LrSiq9mAiK8vuqx8jmQlm4ytA8TXealvVRZiYPIfixKpUcC/48dE8nej94kpHDzRYnm10j+cZ4N0ZFpBmApVRuun10psGKLmJByBr8lnuhTf2r3s14bczGx2TnsM53tpc4gktwHvpSxHVbWr7oeFjFbXtb6If/dsEcd1wa89Fo4KV/Es6M/o8WzmMY11kUNvwhKFX719cuC39g34A52Y9NBTx0N+YXa7/0pXVyLMJ3t0ItrZjSzRdb5CGBHMeQlTQaQ==; Received: from bach.cs.huji.ac.il ([132.65.80.20]) by kabab.cs.huji.ac.il with esmtp id 1hDlk0-000NLg-3k; Tue, 09 Apr 2019 11:04:24 +0300 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: i2c still not working for me From: Daniel Braniss In-Reply-To: <20190409095819.c560dbc156c46e5ca0244e3e@bidouilliste.com> Date: Tue, 9 Apr 2019 11:04:23 +0300 Cc: "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <23A47048-642A-481C-B7BE-B61E55F82955@cs.huji.ac.il> References: <12F641C3-9FAA-4A3A-BA18-A7302F3A0F5E@cs.huji.ac.il> <20190409095819.c560dbc156c46e5ca0244e3e@bidouilliste.com> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 76F668130B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.987,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 08:04:32 -0000 > On 9 Apr 2019, at 10:58, Emmanuel Vadot wrote: >=20 > On Tue, 9 Apr 2019 10:50:22 +0300 > Daniel Braniss wrote: >=20 >> 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 method. >> 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 = meantime 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 >=20 > Based on the function names you are using directly stop/start/etc ... > My changes were only for i2c_transfer (I2CRDWR ioctls) >=20 ok, this will show my ignorance, but could you send me some sample code = that uses I2CRDWR? btw, the device i=E2=80=99m trying out is an RFID reader pn533, which = works with a modified driver =E2=80=A6 thanks, danny > --=20 > Emmanuel Vadot