Page MenuHomeFreeBSD

Add driver for RK3399 non-secure efuse.
Needs ReviewPublic

Authored by kjopek_gmail.com on Oct 18 2020, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 15 2024, 8:24 AM
Unknown Object (File)
Oct 8 2024, 9:00 AM
Unknown Object (File)
Oct 2 2024, 7:02 AM
Unknown Object (File)
Oct 1 2024, 5:51 PM
Unknown Object (File)
Sep 21 2024, 7:46 AM
Unknown Object (File)
Sep 10 2024, 9:05 PM
Unknown Object (File)
Sep 8 2024, 1:30 AM
Unknown Object (File)
Sep 4 2024, 9:52 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 - subversion
Lint
Lint Skipped
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.