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)
Thu, Apr 18, 11:54 AM
Unknown Object (File)
Wed, Apr 17, 11:24 AM
Unknown Object (File)
Tue, Apr 9, 8:25 AM
Unknown Object (File)
Mar 2 2024, 4:52 PM
Unknown Object (File)
Jan 19 2024, 1:59 AM
Unknown Object (File)
Dec 20 2023, 5:01 AM
Unknown Object (File)
Dec 13 2023, 6:20 AM
Unknown Object (File)
Nov 26 2023, 1:37 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.