-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[RFC] drivers: Added retention register API #50105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] drivers: Added retention register API #50105
Conversation
f8fbef6
to
fa0c099
Compare
fa0c099
to
32debf0
Compare
Added general purpose API for access retention registers. Signed-off-by: Andrzej Puzdrowski <[email protected]>
32debf0
to
5ac01e9
Compare
A few questions/comments prior to todays Architecture WG meeting:
|
API meeting:
|
To expand upon my idea regarding similar DTS approach to partitions:
If storing retained registers on EEPROM, this is what that would look like:
The retained_registers compatible property is used to specify what API its parent uses, to translate from the ret_reg API to the parent device appropriate API, be that syscon, EEPROM or other. SummaryTo summarize, we should add some sort of retained register section similar to flash partitions, which have an offset and a size. This sections should be placable inside SOCs which contain retained registers, like nordic and atmel controllers with GPBR and GPRR registers, EEPROMs, some I2C attached ICs, etc. With this design, we can place and point to retained registers of varying sizes spread around the system, and use chosen nodes to bind a register to a feature, like zephyr,boot-mode-ret-reg. @galak @carlescufi What do you think? |
Would also be good to allow a RAM region to be used too, so that it would be removed from kernel/application usage and placed in a non-initialise area, that way more data than the retention register can hold could be used and it can be used on platforms without a retention register (@gregshue this may be useful for your signing request, as such a request would need a larger storage size). |
After Looking at the syscon API I see one problem with that - It is too low level. I'm expecting that we are using vendor provided hardware abstraction layer for manipulate peripherals - syscon is an interface for manipulate registers for given device driver. In reality we won't (and it is unwanted) give any possibility for manipulation on register level of all the peripheral - instead just a few like retention registers. Creating a fake syscon like register device might be an option, but real addressing isn't required for that. I'm doubting in that It will be proper solution. |
RFC for consideration on retention registers: #51298 |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Added general purpose API for access retention registers.
Work in progress
Not ready for review
Signed-off-by: Andrzej Puzdrowski [email protected]