Re: i2c driver for SiFive Unmatched

From: Philip Paeps <philip_at_freebsd.org>
Date: Mon, 01 Nov 2021 05:35:55 UTC
On 2021-10-30 02:24:23 (+0800), Thomas Skibo wrote:
> On Thu, Oct 28, 2021 at 11:40:34AM +0800, Philip Paeps wrote:
>> On 2021-10-23 05:05:47 (+0800), Thomas Skibo wrote:
>>> I have the OpenCores i2c driver (dev/iicbus/iicoc.c) up and running 
>>> on the
>>> SiFive Unmatched.  It was just a matter of adding the right 
>>> compatibility
>>> strings and implementing iicoc_iicbus_repeated_start() which, oddly, 
>>> was
>>> stubbed out.  (Seems to me it should have returned an error if not
>>> implemented.)
>>>
>>> I can put it up on Phabricator if there is interest.
>>
>> Yes please!
>
> It's up at https://reviews.freebsd.org/D32737

Awesome!  Thanks for doing this work.  I've just committed your changes 
to main.  I'll merge them to stable/13 in a couple of days.

As Jess suggested in the review, I've also added the driver to GENERIC.  
It's a small amount of code and it measurably lowers the friction of 
actually getting productive with a RISC-V board on FreeBSD.  We've 
already got the SPI drivers in there too.

And thanks for fixing the repeated start.  I remember noticing this when 
I added the FDT attachment two years ago.  I never had a chance to look 
into it more closely.

Philip

-- 
Philip Paeps
Senior Reality Engineer
Alternative Enterprises