From: Felipe Balbi Subject: Re: i2c issue on Panda with DT boot, v3.10-rc4 Date: Fri, 7 Jun 2013 21:26:47 +0300 Message-ID: <20130607182647.GA15295@arwen.pp.htv.fi> References: <51B1C9D2.6060703@ti.com> <51B1D3D6.2020803@ti.com> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Return-path: Received: from bear.ext.ti.com ([192.94.94.41]:49107 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754298Ab3FGS1w (ORCPT ); Fri, 7 Jun 2013 14:27:52 -0400 Content-Disposition: inline In-Reply-To: <51B1D3D6.2020803@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Grygorii Strashko Cc: Tomi Valkeinen , linux-omap , Tony Lindgren --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable HI, On Fri, Jun 07, 2013 at 03:36:38PM +0300, Grygorii Strashko wrote: > hi Tomi, > On 06/07/2013 02:53 PM, Tomi Valkeinen wrote: > >Hi, > > > >I was testing DT boot with 3.10-rc1 and Pandaboard, and couldn't get the > >DVI output's EDID reading to work. Testing with i2cget and i2cdump, I > >see that I can read individual bytes with i2cget, but using i2cdump > >doesn't work, it just shows 'XX'es. > > > >The same issue is there with 3.10-rc4, although with that one I get > >timeouts with i2cdump, whereas there were no timeouts with -rc1. > > > ># i2cget -y 2 0x50 0x10 > >0x0a > ># i2cget -y 2 0x50 0x20 > >0x0f > ># i2cget -y 2 0x50 0x30 > >0x01 > ># i2cget -y 2 0x50 0x40 > >0x36 > ># i2cget -y 2 0x50 0x50 > >0x4c > ># i2cdump -y 2 0x50 > >No size specified (using byte-data access) > > 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef > >00: 00 [ 72.814086] omap_i2c 48060000.i2c: timeout waiting for bus rea= dy > >XX [ 73.825134] omap_i2c 48060000.i2c: timeout waiting for bus ready > >XX [ 74.835327] omap_i2c 48060000.i2c: timeout waiting for bus ready > >XX [ 76.097167] omap_i2c 48060000.i2c: timeout waiting for bus ready > >XX [ 77.160736] omap_i2c 48060000.i2c: timeout waiting for bus ready > >XX [ 78.174682] omap_i2c 48060000.i2c: timeout waiting for bus ready > >XX [ 79.194824] omap_i2c 48060000.i2c: timeout waiting for bus ready > >XX [ 80.242980] omap_i2c 48060000.i2c: timeout waiting for bus ready > > > >i2cdump works fine with non-DT boot (but the i2c bus number is 3). > > > >Any ideas? > > > > Tomi > > > Could you check if below change will help you, pls? > iff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c > index 13d1eca..66a62e7 100644 > --- a/drivers/i2c/busses/i2c-omap.c > +++ b/drivers/i2c/busses/i2c-omap.c > @@ -615,11 +615,11 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *ad= ap, > if (dev->cmd_err & OMAP_I2C_STAT_NACK) { > if (msg->flags & I2C_M_IGNORE_NAK) > return 0; > - if (stop) { > - w =3D omap_i2c_read_reg(dev, OMAP_I2C_CON_REG); > - w |=3D OMAP_I2C_CON_STP; > - omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, w); > - } > + > + w =3D omap_i2c_read_reg(dev, OMAP_I2C_CON_REG); > + w |=3D OMAP_I2C_CON_STP; > + omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, w); > + don't do this, it will break repeated start. --=20 balbi --FCuugMFkClbJLl1L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJRsiXnAAoJEIaOsuA1yqREFbIP/2Lx7Wp4csL9domCMEbBHdmI /pywfsdGHlNtL16Phk4dUQSDpjlumvhfG6FG+LKOBrH0quAt9niUfHPDQRznBPp7 1OXTSG2Dgf1n9CH5/JUgWg3DgaDqiwfyooaRb9lRYyhOS35Ie7/exjhqiYgHeUFB R0WiY+TjLJDZGG1lP9YwWOtoWcznFLhf2IccrPPxTgAybIoEfB4JjsNlpbilxhQG HgcXsLB5J3RPdziCHk2+nEv/mrBdvA5mRKmWVeX7FNR/dVxpNRCFL2CUSkR+1zAV IOFRq2NBdRgq+eRvjUCx62c4g24aKlof+ez2giA713F7z4rCxB+t/HbvGQPdWO16 OX/49Bi90iPpBhSp5Ztzj3cjYyRpSoqM3piQHS5yAVqtPSiDJ0AfkP9ENXMDDCFD wOa8mdu+Rfq8UvkGDA2KnzH2mi0VxmX9QGXMcxKlT+xmbKG+Ugtv9bWiCToEFrPC cQx9P2yTNAc781zuRuVxccL0dcQHMzRj/PEtziaHAexTGqLj+70rHaSgAytjZv31 dh0dF9D85wqJOiCFW62DVhwqIdR8EocQzUB5ZXpQmOYdbO+iAh9Zhhz/D74+yJLP cMV+NUI+5FROGDa+jQ6nZHXx9w7MObC6qjYZv//R0cgSRNp+PT7Tm4BRcHyO9OBJ DjFlSh0mDAuh2rKhp6dZ =QcoX -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--