Page MenuHomeFreeBSD

Introduce VF610 I2C controller support.
ClosedPublic

Authored by dgr_semihalf.com on Apr 10 2020, 11:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 9:42 PM
Unknown Object (File)
Thu, Mar 28, 2:02 PM
Unknown Object (File)
Feb 8 2024, 10:34 PM
Unknown Object (File)
Feb 5 2024, 10:01 PM
Unknown Object (File)
Jan 17 2024, 2:50 PM
Unknown Object (File)
Dec 29 2023, 8:02 AM
Unknown Object (File)
Dec 28 2023, 6:46 AM
Unknown Object (File)
Dec 26 2023, 8:50 AM
Subscribers

Details

Summary

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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/arm/freescale/vybrid/vf_i2c.c
250

Missing call to bus_release_resources

sys/conf/files.arm64
109

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.

sys/arm/freescale/vybrid/vf_i2c.c
192

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

sys/conf/files.arm64
109

That should be optional <driver_name> iicbus SOC_NXP_LS1046A

sys/arm/freescale/vybrid/vf_i2c.c
192

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.