Page MenuHomeFreeBSD

Introduce VF610 I2C controller support.

Authored by on Apr 10 2020, 11:12 AM.
Referenced Files
Unknown Object (File)
Mon, May 27, 2:24 AM
Unknown Object (File)
Sat, May 25, 10:41 PM
Unknown Object (File)
Fri, May 24, 1:57 PM
Unknown Object (File)
Thu, May 23, 6:30 AM
Unknown Object (File)
Tue, May 21, 6:02 PM
Unknown Object (File)
Mon, May 13, 7:23 PM
Unknown Object (File)
Sat, May 11, 12:28 AM
Unknown Object (File)
Wed, May 8, 2:01 AM



NXP LS1046A contains I2C controller compatible with Vybrid VF610.
Existing Vybrid MVF600 driver can be used to support it. For that purpose
declare driver as ofw_iicbus and add methods associated with ofw_iicbus.

For VF610 add dynamic clock prescaler calculation using clock information
from clock driver and clock frequency requested in device tree.

On the occasion add detach function and add additional error handling
in i2c_attach function.

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline

250 ↗(On Diff #70394)

Missing call to bus_release_resources

109 ↗(On Diff #70394)

This should have a driver specific option. We may want iicbus enabled, but not this driver.

Added bus_release_resources call and dependency on SOC_NXP_LS1046A.

192 ↗(On Diff #71202)

Can the driver work if there is no clock ?
Since you set sc->freq below I'm not sure it can.

109 ↗(On Diff #70394)

That should be optional <driver_name> iicbus SOC_NXP_LS1046A

192 ↗(On Diff #71202)

The driver can work without clock - when no clock is found it uses the highest possible prescaler value for VF610.
For MVF600 the way driver originally worked is preserved.

Added vf_i2c as driver name in files.arm64

Hi, if you have any more comments or remarks, please let me know. Thanks.

This revision is now accepted and ready to land.May 15 2020, 10:11 AM

Replace SOC_NXP_LS1046A with SOC_NXP_LS.

This revision now requires review to proceed.May 22 2020, 8:04 PM
This revision is now accepted and ready to land.May 22 2020, 8:31 PM
This revision was automatically updated to reflect the committed changes.