From owner-freebsd-arm@freebsd.org Tue Oct 6 20:29:33 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCDFC43AFCE for ; Tue, 6 Oct 2020 20:29:33 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5TbK42fFz3dg0 for ; Tue, 6 Oct 2020 20:29:33 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.nyi.freebsd.org (Postfix) id 88A1B43B38F; Tue, 6 Oct 2020 20:29:33 +0000 (UTC) Delivered-To: arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 872A243B38E for ; Tue, 6 Oct 2020 20:29:33 +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 4C5TbJ3MxYz3dlV; Tue, 6 Oct 2020 20:29:32 +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=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=ByaUBi9Z0WZdA5l1V8VadPeJuSfT8U8kU9ZOoLR+sgg=; b=GdXjRR3itX/Bgw/MYk6fk3YhgTw6iXWlsjDESAIjEtPQ0mFhami5DVWSA8m8iIn8ClycInntDF68zS1Kgkk+n4Ph7RuCwtO0ZkFlkUEoYr7Zp+DW/vysb3NK7qUdIDXjlZ3M70VfthHgS3L4cwmTY67qvRGtMK3vmpOgvn7oy7O0UvJNHEip3pApBLMQXqhpXrOMEIR510bqRBfDTUz2TkkBaH9DMVdtxcoVWXQsMVCZ4WVm6YpjDT4v6WimA2kp+7qcRKig/lOfe0AAWh4+OB3jLEl1rMPTbskbiktL6RQ29uL44Vw+/sfGC5x4g62TypHmJfyU0oYonePRFCqhNg==; Received: from mbpro2.bk.cs.huji.ac.il ([132.65.179.20] helo=localhost.localdomain) by kabab.cs.huji.ac.il with esmtp id 1kPtaR-0005NO-5H; Tue, 06 Oct 2020 23:29:27 +0300 From: Daniel Braniss Message-Id: <260839FF-7297-4FDC-82AC-13797938AC29@cs.huji.ac.il> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.0.3.2.33\)) Subject: Re: nanopi/allwinner i2c not working. Date: Tue, 6 Oct 2020 23:29:26 +0300 In-Reply-To: Cc: Emmanuel Vadot , "freebsd-arm@freebsd.org" To: Andriy Gapon References: <234D06ED-C99F-477E-8D95-492979084E7A@cs.huji.ac.il> <7934CE38-DC3F-450A-A131-19A7F88DA9EC@cs.huji.ac.il> <20201006104119.28f2262d47107d41025d193f@bidouilliste.com> <29A34854-E792-48CE-AF0A-E4C605BDFC3B@cs.huji.ac.il> <6416CA90-AB4C-4F8A-BCF4-7C9E5A4F2F8D@cs.huji.ac.il> <0ba109b4-784f-19ed-e52d-a40b75af872c@FreeBSD.org> <7C27FB6C-BF0D-4DAE-99D0-50849D2FBA5E@cs.huji.ac.il> <43a5d626-634c-2cc2-e8a5-ad4326a2d6e2@FreeBSD.org> <77DC054E-07B2-48F8-8051-C2796EE991B2@cs.huji.ac.il> X-Mailer: Apple Mail (2.3654.0.3.2.33) X-Rspamd-Queue-Id: 4C5TbJ3MxYz3dlV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:IL] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 20:29:34 -0000 > On 6 Oct 2020, at 17:22, Andriy Gapon wrote: >=20 > On 06/10/2020 17:00, Daniel Braniss wrote: >> not too proud of it, but i=E2=80=99ll make it available. >> it=E2=80=99s in https://www.cs.huji.ac.il/~danny/elockc.tar.bz >> look in i2c.c >>=20 >> in any case it works fine in 12.1. >=20 > And it looks good to me as well. > Could you please collect twsi debug output again? > In head you do not need to recompile, you can just set = hw.i2c.twsi_debug. i did have to recompile iichb0: twsi_calc_baud_rate: Bus clock is at 24000000 iichb0: twsi_reset: Using clock param=3D59 iichb0: TWSI_WRITE: Writing 0 to 18 iichb0: TWSI_WRITE: Writing 59 to 14 iichb0: TWSI_WRITE: Writing 40 to c iichb0: twsi_calc_baud_rate: Bus clock is at 24000000 iichb0: twsi_reset: Using clock param=3D59 iichb0: TWSI_WRITE: Writing 0 to 18 iichb0: TWSI_WRITE: Writing 59 to 14 iichb0: TWSI_WRITE: Writing 40 to c iichb0: TWSI_WRITE: Writing c4 to c iichb0: twsi_transfer: transmitting 2 messages iichb0: TWSI_READ: read f8 from 10 iichb0: twsi_transfer: status=3Df8 iichb0: twsi_transfer: msg 0 is 9 bytes long iichb0: twsi_transfer: msg 1 is 7 bytes long iichb0: TWSI_WRITE: Writing e4 to c iichb0: twsi_intr: Got interrupt Current msg=3D0 iichb0: TWSI_READ: read 8 from 10 iichb0: TWSI_READ: read cc from c iichb0: twsi_intr: reg control=3Dcc iichb0: twsi_intr: Send the address (48)iichb0: TWSI_WRITE: Writing 48 = to 8 iichb0: TWSI_WRITE: Writing c4 to c iichb0: twsi_intr: Refresh reg_control iichb0: TWSI_WRITE: Writing cc to c iichb0: twsi_intr: Done with interrupts iichb0: twsi_intr: Got interrupt Current msg=3D0 iichb0: TWSI_READ: read 20 from 10 iichb0: TWSI_READ: read cc from c iichb0: twsi_intr: reg control=3Dcc iichb0: twsi_intr: No ack received after transmitting the address iichb0: twsi_intr: Refresh reg_control iichb0: twsi_transfer: pause finish iichb0: TWSI_WRITE: Writing 8 to c iichb0: twsi_transfer: Error, aborting (2) iichb0: twsi_intr: Done with interrupts iichb0: TWSI_WRITE: Writing 0 to c iichb0: TWSI_READ: read 30 from 10 iichb0: twsi_transfer: status=3D30 iichb0: TWSI_WRITE: Writing 0 to c iichb0: TWSI_READ: read 30 from 10 iichb0: twsi_transfer: status=3D30 iichb0: TWSI_WRITE: Writing c4 to c iichb0: twsi_transfer: transmitting 2 messages iichb0: twsi_intr: Got interrupt Current msg=3D0 iichb0: TWSI_READ: read 30 from 10 iichb0: TWSI_READ: read 30 from 10 iichb0: twsi_transfer: status=3D30 iichb0: TWSI_READ: read cc from c iichb0: twsi_transfer: msg 0 is 9 bytes long iichb0: twsi_intr: reg control=3Dcc iichb0: twsi_transfer: msg 1 is 7 bytes long iichb0: twsi_intr: status=3D30 hot handled iichb0: TWSI_WRITE: Writing e4 to c iichb0: twsi_intr: Refresh reg_control iichb0: twsi_transfer: pause finish iichb0: TWSI_WRITE: Writing 8 to c iichb0: twsi_transfer: Error, aborting (1) iichb0: twsi_intr: Done with interrupts iichb0: TWSI_WRITE: Writing 0 to c iichb0: TWSI_READ: read 10 from 10 iichb0: twsi_transfer: status=3D10 iichb0: TWSI_WRITE: Writing 0 to c iichb0: TWSI_READ: read 10 from 10 iichb0: twsi_transfer: status=3D10 >=20 > --=20 > Andriy Gapon