Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Oct 2017 08:04:21 +0900 (JST)
From:      Mori Hiroki <yamori813@yahoo.co.jp>
To:        Ian Lepore <ian@freebsd.org>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: about iicdev_writeto() on ralink soc
Message-ID:  <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp>
In-Reply-To: <1508511627.1383.48.camel@freebsd.org>
References:  <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> <1508511627.1383.48.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi=0A=0A=0A----- Original Message -----=0A> From: Ian Lepore <ian@freebsd.o=
rg>=0A> To: Mori Hiroki <yamori813@yahoo.co.jp>=0A> Cc: "freebsd-mips@freeb=
sd.org" <freebsd-mips@freebsd.org>=0A> Date: 2017/10/21, Sat 00:00=0A> Subj=
ect: Re: about iicdev_writeto() on ralink soc=0A> =0A> On Fri, 2017-10-20 a=
t 20:24 +0900, Mori Hiroki wrote:=0A>>  Hi=0A>> =0A>>  I make mips mediatek=
 iic driver. Mediatek(Ralink) soc(RT2880=A0and=A0=0A>>  RT3050) is not supp=
ort=A0nostop option at I2C device. This soc i2c=0A>>  device is set transfe=
r=A0length and automatically=A0send stop. And=0A>>  Always send device addr=
ess at first byte.=0A>> =0A>>  your added=A0iicdev_writeto() not work in th=
ese soc i2c device.=0A>> =0A>> =0A>> =0A>>  https://svnweb.freebsd.org/base=
?view=3Drevision&revision=3D321583=0A>> =0A>> =0A>>  Could you please chang=
e single transfer in=A0iicdev_writeto() at=0A>>  iiconf.c.=0A>> =0A>>  Rega=
rds=0A>> =0A>>  Hiroki Mori=0A>=A0=0A=0AThanks check RT datasheet.=0A=0A> i=
icdev_writeto() does the correct sequence of operations.=0A> =0A> I think i=
f you set the ADDRDIS bit in the device control register and=0A> ignore the=
 NOSTOP flag in the messages, it will work for most slave=0A> devices. =A0S=
ome slave devices require a repeat-start to work correctly,=0A> and those w=
ill never work right on a controller like this.=0A> =0A> -- Ian=0A> =0A=0AN=
o.=0A=0ARalink Datasheet is very confuse. ADDRDIR is register address disab=
le.=0ADEVADDIS is device address disable.=A0=0A=0AIf not set=A0DEVADDIS and=
=A0ADDRDIR then=0A=0A<Device address>=A0<Register address>=A0<data> ...=0A=
=0AIf set ADDRDIR then=A0=0A=0A<Device address> <data> ...=0A=0AIf set DEVA=
DDIS then ignore ADDRDIR=0A=0A<Register address> <data> ...=0A=0Aalways two=
 more byte send this soc.=0A=0ADriver review is this.=0A=0Ahttps://reviews.=
freebsd.org/D12736=0A=0A=0AThanks=0A=0AHiroki Mori



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