Page MenuHomeFreeBSD

Add driver for RK3399 non-secure efuse.
Needs ReviewPublic

Authored by kjopek_gmail.com on Oct 18 2020, 11:04 PM.

Details

Reviewers
manu
Summary

Implement support for RK3399 efuse and provide /dev/efuse device for user applications.

Test Plan

This needs to be investigated after migration to nvmem framework.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

bz added subscribers: arm64, bz.

I would prefer if the fuse values would be readable in a sysctl like it's done for aw_sid (https://cgit-beta.freebsd.org/src/tree/sys/arm/allwinner/aw_sid.c)
You might also want to add nvmem interface to this driver even if for now the cells aren't read by any other driver it could in the future.
There is also a clock that needs to be dealt with.

Thanks.

kjopek_gmail.com edited the test plan for this revision. (Show Details)

Rework patch (part 1 of 2):

  • Use nvmem framework.
  • Add write mode (experimental).
  • Remove detach routine.
  • Add more comments

TODO:

  • Provide sysctl interface.

Regarding sysctl interface: allwinner driver has data cells hardcoded - should I follow the same way and add hardcoded values to this driver also? Or maybe there is some more elegant way to do so?

Regarding sysctl interface: allwinner driver has data cells hardcoded - should I follow the same way and add hardcoded values to this driver also? Or maybe there is some more elegant way to do so?

aw_sid was done before nvmem and originaly only had one cell I think that's why it's hardcoded.
You could just loop on the subnodes and export everything that is defined in this driver or expand nvmem so it does that in a generic way.