about iicdev_writeto() on ralink soc
Mori Hiroki
yamori813 at yahoo.co.jp
Fri Oct 20 23:47:19 UTC 2017
Hi
FYI
This is RT2880 i2c signal by my driver code.
https://flic.kr/p/ZC3HQZ
----- Original Message -----
> From: Mori Hiroki <yamori813 at yahoo.co.jp>
> To: Ian Lepore <ian at freebsd.org>
> Cc: "freebsd-mips at freebsd.org" <freebsd-mips at freebsd.org>
> Date: 2017/10/21, Sat 08:04
> Subject: Re: about iicdev_writeto() on ralink soc
>
> Hi
>
>
> ----- Original Message -----
>> From: Ian Lepore <ian at freebsd.org>
>> To: Mori Hiroki <yamori813 at yahoo.co.jp>
>> Cc: "freebsd-mips at freebsd.org" <freebsd-mips at freebsd.org>
>> Date: 2017/10/21, Sat 00:00
>> Subject: Re: about iicdev_writeto() on ralink soc
>>
>> On Fri, 2017-10-20 at 20:24 +0900, Mori Hiroki wrote:
>>> Hi
>>>
>>> I make mips mediatek iic driver. Mediatek(Ralink) soc(RT2880 and
>>> RT3050) is not support nostop option at I2C device. This soc i2c
>>> device is set transfer length and automatically send stop. And
>>> Always send device address at first byte.
>>>
>>> your added iicdev_writeto() not work in these soc i2c device.
>>>
>>>
>>>
>>> https://svnweb.freebsd.org/base?view=revision&revision=321583
>>>
>>>
>>> Could you please change single transfer in iicdev_writeto() at
>>> iiconf.c.
>>>
>>> Regards
>>>
>>> Hiroki Mori
>>
>
> Thanks check RT datasheet.
>
>> iicdev_writeto() does the correct sequence of operations.
>>
>> I think if you set the ADDRDIS bit in the device control register and
>> ignore the NOSTOP flag in the messages, it will work for most slave
>> devices. Some slave devices require a repeat-start to work correctly,
>> and those will never work right on a controller like this.
>>
>> -- Ian
>>
>
> No.
>
> Ralink Datasheet is very confuse. ADDRDIR is register address disable.
> DEVADDIS is device address disable.
>
> If not set DEVADDIS and ADDRDIR then
>
> <Device address> <Register address> <data> ...
>
> If set ADDRDIR then
>
> <Device address> <data> ...
>
> If set DEVADDIS then ignore ADDRDIR
>
> <Register address> <data> ...
>
> always two more byte send this soc.
>
> Driver review is this.
>
> https://reviews.freebsd.org/D12736
>
>
> Thanks
>
> Hiroki Mori
> _______________________________________________
> freebsd-mips at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to
> "freebsd-mips-unsubscribe at freebsd.org"
>
More information about the freebsd-mips
mailing list