nanopi/allwinner i2c not working.

Daniel Braniss danny at cs.huji.ac.il
Tue Oct 6 14:00:57 UTC 2020



> On 6 Oct 2020, at 16:47, Andriy Gapon <avg at FreeBSD.org> wrote:
> 
> On 06/10/2020 16:30, Daniel Braniss wrote:
>> 
>> 
>>> On 6 Oct 2020, at 16:26, Andriy Gapon <avg at FreeBSD.org> wrote:
>>> 
>>> On 06/10/2020 16:23, Daniel Braniss wrote:
>>>> 
>>>> 
>>>>> On 6 Oct 2020, at 15:53, Andriy Gapon <avg at FreeBSD.org> wrote:
>>>>> 
>>>>> On 06/10/2020 15:47, Daniel Braniss wrote:
>>>>>> i2c -s works - finds the devices
>>>>>> 
>>>>>> but can’t do much else, can’t talk to the device (pn532)
>>>>>> trying to write i get
>>>>>> 	I2CRWR: errno 1: Operation not permitted’
>>>>> 
>>>>> You have to use -m tr with twsi.
>>>> 
>>>> please translate :-)
>>> 
>>> Okay, please show the command line :)
>> 
>> ah, got it, but i use ioctl(fd, I2CRDWR,  data).
>> 
>> i’ll recompile and see if it’s still not working.
> 
> I2CRDWR should work actually, it uses iicbus_transfer.
> Can you share / show your code?
not too proud of it, but i’ll make it available.
it’s in https://www.cs.huji.ac.il/~danny/elockc.tar.bz <https://www.cs.huji.ac.il/~danny/elockc.tar.bz>
look in i2c.c

in any case it works fine in 12.1.

> 
> 
> -- 
> Andriy Gapon



More information about the freebsd-arm mailing list