Date: Sat, 21 Oct 2017 08:44:07 +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: <104081.95158.qm@web101711.mail.ssk.yahoo.co.jp> In-Reply-To: <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp> References: <641147.96869.qm@web101704.mail.ssk.yahoo.co.jp> <1508511627.1383.48.camel@freebsd.org> <405153.18836.qm@web101719.mail.ssk.yahoo.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi=0A=0AFYI=0A=0AThis is RT2880 i2c signal by my driver code.=0A=0Ahttps://= flic.kr/p/ZC3HQZ=0A=0A=0A----- Original Message -----=0A> From: Mori Hiroki= <yamori813@yahoo.co.jp>=0A> To: Ian Lepore <ian@freebsd.org>=0A> Cc: "free= bsd-mips@freebsd.org" <freebsd-mips@freebsd.org>=0A> Date: 2017/10/21, Sat = 08:04=0A> Subject: Re: about iicdev_writeto() on ralink soc=0A> =0A> Hi=0A>= =0A> =0A> ----- Original Message -----=0A>> From: Ian Lepore <ian@freebsd= .org>=0A>> To: Mori Hiroki <yamori813@yahoo.co.jp>=0A>> Cc: "freebsd-mips= @freebsd.org" <freebsd-mips@freebsd.org>=0A>> Date: 2017/10/21, Sat 00:00= =0A>> Subject: Re: about iicdev_writeto() on ralink soc=0A>> =0A>> On Fri= , 2017-10-20 at 20:24 +0900, Mori Hiroki wrote:=0A>>> =A0 Hi=0A>>> =0A>>> = =A0 I make mips mediatek iic driver. Mediatek(Ralink) soc(RT2880=A0and=A0= =0A>>> =A0 RT3050) is not support=A0nostop option at I2C device. This soc i= 2c=0A>>> =A0 device is set transfer=A0length and automatically=A0send stop.= And=0A>>> =A0 Always send device address at first byte.=0A>>> =0A>>> =A0 y= our added=A0iicdev_writeto() not work in these soc i2c device.=0A>>> =0A>>>= =0A>>> =0A>>> =A0 https://svnweb.freebsd.org/base?view=3Drevision&revision= =3D321583=0A>>> =0A>>> =0A>>> =A0 Could you please change single transfer i= n=A0iicdev_writeto() at=0A>>> =A0 iiconf.c.=0A>>> =0A>>> =A0 Regards=0A>>> = =0A>>> =A0 Hiroki Mori=0A>> =A0=0A> =0A> Thanks check RT datasheet.=0A> =0A= >> iicdev_writeto() does the correct sequence of operations.=0A>> =0A>> I= think if 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>> d= evices. =A0Some slave devices require a repeat-start to work correctly,=0A>= > and those will never work right on a controller like this.=0A>> =0A>> -= - Ian=0A>> =0A> =0A> No.=0A> =0A> Ralink Datasheet is very confuse. ADDRDIR= is register address disable.=0A> DEVADDIS is device address disable.=A0=0A= > =0A> If not set=A0DEVADDIS and=A0ADDRDIR then=0A> =0A> <Device address>= =A0<Register address>=A0<data> ...=0A> =0A> If set ADDRDIR then=A0=0A> =0A>= <Device address> <data> ...=0A> =0A> If set DEVADDIS then ignore ADDRDIR= =0A> =0A> <Register address> <data> ...=0A> =0A> always two more byte send = this soc.=0A> =0A> Driver review is this.=0A> =0A> https://reviews.freebsd.= org/D12736=0A> =0A> =0A> Thanks=0A> =0A> Hiroki Mori=0A> __________________= _____________________________=0A> freebsd-mips@freebsd.org mailing list=0A>= https://lists.freebsd.org/mailman/listinfo/freebsd-mips=0A>; To unsubscribe= , send any mail to =0A> "freebsd-mips-unsubscribe@freebsd.org"=0A>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?104081.95158.qm>