This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: U-boot bootcount support AM625 RTCSS SCRATCH registers?

Part Number: AM625

Tool/software:

I would like to use the u-boot "bootcount" feature on the AM62x.  I have used it on AM33 and the stmp15x, both of which have registers which survive chip reset. I know you TI folks are familiar with the bootcount-davinci driver. Slight smile

I'm evaluating what options exist to support bootcount on AM62x:

- the AM62x RTCSS register block is nearly identical to the AM33, except the address, offset, and KICK magic values are different.  It seems the bootcount-davinci driver could be either copied and modified for AM62x, or use DEFINEs to change the relevant values when building for the AM62x target.  This seems like it would be the easiest path however it is custom code.

- it seems like the bootcount-rtc method would be the "right" way to do it, however it looks to me like there is no driver support in u-boot for the AM62x RTC (I have not attempted this yet.) So the platform functions to read/write the RTC registers do not exist as far as I can tell, please correct me if I am wrong.

- the bootcount-mem driver doesn't (from what I can tell) support writing the necessary KICK magic registers to unlock the RTCSS block before writing the SCRATCH register.

Barring any of these options, I could use the generic EEPROM driver.  I would prefer to leave this as a last resort if it's possible to support the AM62x without additional hardware.  I do not want to use any bootcount method that relies on the filesystem or uboot env.

I am wondering if anyone at TI could confirm my assessment and advise on a best approach.  I don't think I could implement a proper rtc driver but I could probably modify the bootcount-davinci driver.  Assuming there is support for that approach I would be happy to submit a patch for inclusion upstream.