allwinner i2c [was: Options for FBSD support with LCD device - new project]

Jedi Tek'Unum jedi at jeditekunum.com
Thu Mar 21 18:34:56 UTC 2019


On Mar 20, 2019, at 10:31 AM, Ian Lepore <ian at freebsd.org> wrote:
> 
> On Tue, 2019-03-19 at 08:28 +0200, Daniel Braniss wrote:
>> I have several allwinner SoC, mainly from FriendlyArm, and neither i2c or SPI work.
>> I have a hacked i2c that mostly works, but hangs sometimes :-), mainly
>> timing issues of which I have no idea how to fix.
>> I’m willing to help here but my knowledge of the twsi tends to zero.
>> hint hint …
>> 
>> cheers,
>>        danny
> 
> Iirc, allwinner requires working i2c even to boot, because the boards
> have i2c PMIC chips on them.  I wonder if it's a case where a few small
> commands to the pmic work fine but bigger transfers fail?  I dunno,
> anything more you can say about the problem would help.

My H5 board, a NanoPi NEO 2, running vendor supplied Linux has /dev/i2c-0 through i2c-3.

Only i2c0 is available externally. Detect shows

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- 3e 3f 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 71 -- 73 -- -- -- --                         

3c is the OLED Hat. The rest are all my boards (73 is mux and the rest are SX1509s).

The only other scan that shows anything is i2c3 device 30. Maybe that is the PMIC?

i2c1 and i2c2 scan very slowly and eventually show nothing. I suppose they aren’t pulled up.


Daniel, I haven’t had any problems with hangs (Linux) but I do have intermittent troubles that could be due to a variety of things. I’ve yet to see anything “rock solid” about these boards.



More information about the freebsd-arm mailing list