Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Dec 2016 09:15:38 +0100
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Oleksandr Tymoshenko <gonzo@bluezbox.com>
Cc:        Nick Hibma <Nick@ip-knowhow.com>, freebsd-arm@freebsd.org
Subject:   Re: Questions about i2c.c (TMP102 temperature sensor)
Message-ID:  <20161207091538.4d40298141773eb5ae586fd2@bidouilliste.com>
In-Reply-To: <4F71632E-2EFB-417E-898B-394E1C5CC9E8@bluezbox.com>
References:  <9424D7FD-C4B6-43D5-A0C5-76D5BE9ED1DE@ip-knowhow.com> <58B43D61-0B46-4310-868F-D7336585731B@bluezbox.com> <20161205094915.20847444789f803133b56af9@bidouilliste.com> <4F71632E-2EFB-417E-898B-394E1C5CC9E8@bluezbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 5 Dec 2016 18:41:48 -0800
Oleksandr Tymoshenko <gonzo@bluezbox.com> wrote:

>=20
> > On Dec 5, 2016, at 12:49 AM, Emmanuel Vadot <manu@bidouilliste.com> wro=
te:
> >=20
> > On Fri, 2 Dec 2016 13:11:34 -0800
> > Oleksandr Tymoshenko <gonzo@bluezbox.com> wrote:
> >=20
> >> Switching freebsd-embedded@ to freebsd-arm@ since the former does not =
get as much attention as the latter.
>=20
> .. skipped ..
>=20
> > I have an updated version of i2c(8) which support I2CRDWR here :
> > https://github.com/evadot/freebsd/tree/i2c_rdrw/usr.sbin/i2c
> >=20
> > I didn't commit it just because I want to make I2CRDWR the default
> > since there is iicbus_transfer_gen. I just need to make sure that it
> > works almost everwhere (it does on allwinner board where the driver
> > doesn't support I2CRDWR at least).
> >=20
> > Can you test using i2c(8) from my branch with your device ?
>=20
> It works on RPi2 with TMP102 attached. Although rdwr is off by default,
> I had to pass -x option to enable that behavior.

 Yes, as I said RDWR isn't the default right now but it should, having
i2c(8) working out of the box on RPI/TI would be good.

> I went through I2C drivers
> in HEAD and that?s iicbus methods they support (TRANSFER is the name
> of the method for RDWR):
>=20
> TI: TRANSFER, RESET
> i.MX: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> Vybrid: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> Exynos: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> Allwinner: TRANSFER, RESET
> Tegra: TRANSFER, RESET
> Broadcom: TRANSFER, RESET
> AT91: TRANSFER, RESET
> powerpc/powermac/kiic.c: TRANSFER
> powerpc/mpc85xx/i2c.c: START, STOP, REPEATED START, RESET, READ, WRITE, T=
RANSFER
> XLR: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
>=20
> So in theory it should work on all these platforms

 Allwinner/Marvell only support transfer through transfer_gen (driver is
in dev/iicbus/twsi so you likely matched on rsb/p2wi)

 I'll update my branch, make RDWR the default and put up a review soon.

--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161207091538.4d40298141773eb5ae586fd2>