From owner-freebsd-arm@FreeBSD.ORG Tue Dec 2 14:35:39 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 973EF123 for ; Tue, 2 Dec 2014 14:35:39 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64735AF for ; Tue, 2 Dec 2014 14:35:39 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB2EZdC8021911 for ; Tue, 2 Dec 2014 14:35:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 195009] [patch]: [arm] Use 400 kHz as the default OMAP4 I2C bus speed Date: Tue, 02 Dec 2014 14:35:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jumpnowtek@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: mfc-stable8? mfc-stable9? mfc-stable10? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2014 14:35:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195009 --- Comment #10 from Scott Ellis --- The values chosen for the OMAP4 1MHz I2C speed aren't working for me on either a Duovero or PandaBoard { 1000000, 5, 1, 3, 0, 0}, They generate the correct SCL clock speed, but the driver times out when you make a request. It's the second mtx_sleep() in ti_i2c_transfer(), line 445 in ti_i2c.c that times out. The error you get back is EWOULDBLOCK/EAGAIN. Also either the SCL never stops running and you have to reset the bus or the SCL goes idle again (high) but you cannot run a second test without resetting the bus. You get no activity on the SCL line on subsequent attempts. I don't have an explanation, but the following values also give a 1 MHz SCL and the bus behaves properly when you use it. The error you get back is a correct ENXIO if the device is not present. And the SCL clocks only the nine bits expected. { 1000000, 3, 5, 7, 0, 0}, These values also work. { 1000000, 1, 17, 19, 0, 0}, Something about the current values chosen for 1 MHz cause problems. Here's how I'm testing the PandaBoard I2C2 (/dev/iic1). Reading SCL on J4-14 No device at the address I am accessing Custom program doing an I2CRDWR request Original { 5, 1, 3, } divider values With a 560 ohm pullup, SCL runs at 1 MHz but never stops, error is EWOULDBLOCK With a 1k ohm pullup, SCL runs at ~960 kHz, but only once without a reset, EWOULDBLOCK Using { 3, 5, 7, } divider values With a 560 ohm pullup, SCL runs ~960-985 kHz, error is ENXIO, repeated tests ok With a 1k ohm pullup, SCL runs at ~960 kHz, ENXIO, repeated tests ok I get similar results with the Duovero whether or not there is a device that can respond. With the Duovero the clock always continues running though. And just to be clear, 100kHz and 400kHz work fine using the same test app and the same busses and in the case of the Duovero, when there is a device on the other end. I can test further if there is a specific request. -- You are receiving this mail because: You are the assignee for the bug.