bootcount support for AM62 RTCSS

Thom Nichols thom.nichols at voltserver.com
Thu Apr 10 14:02:18 CEST 2025


Hi Bryan - I realized what I think you were trying to say - the bootcount_davinci driver uses the davinci_rtc​ struct which is a completely different register layout between the AM33 and AM62 RTCSS.  I imagine I could make an alternate davinci_rtc struct in my new header file just to remap the kick and scratch registers but that feels icky.  Of course I could just make a bootcount_am62x driver instead of trying to reuse bootcount_davinci.  Or change bootcount_davinci so that it uses offsets instead of the davinci_rtc struct.  Do you have any suggestion for which would be the preferred approach?

Thanks again.

-Thom


From: Bryan Brattlof <bb at ti.com>
Date: Tuesday, April 8, 2025 at 3:05 PM
To: Thom Nichols <thom.nichols at voltserver.com>
Cc: u-boot at lists.denx.de <u-boot at lists.denx.de>
Subject: Re: bootcount support for AM62 RTCSS

[You don't often get email from bb at ti.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hi Thorm!

On April  8, 2025 thus sayeth Thom Nichols:
> I’d like to get bootcount support for the AM62 RTCSS.  The RTCSS on
> the AM62 is very similar to the AM33.  In fact, I’m pretty sure the
> bootcount_davinci driver would work for AM62, with just the register
> address/ offset and KICK_WE constants redefined for the correct AM62
> values.  A while back I tested the AM62 scratch register from
> userspace [1] and confirmed it works the same as the AM33.
>

Wonderful! It is a different IP from the AM335 but not completely
different however I think your approach should work.

> I’ve never contributed to u-boot but I believe I could get a working
> PR that modifies the davinci_bootcount driver, if this would be
> acceptable.
>

You should feel free to start if you want! U-Boot is very welcoming in
this regard. The more devs we have in U-Boot the better :)

> Alternately I don’t know if there’s any near-term plan for any of the
> AM62 maintainers to port the rtc driver so that bootcount/rtc could be
> used.  I think doing this would be beyond my capabilities.
>

So we do have some plans to improve RTC support in both in Linux and in
U-Boot to extend some features needed for the latest Sitara class SoC
but I'm unsure about timelines. I've added a ticket internally to track
this if we get to it before you do though :)

~Bryan

> Thanks in advance.
>
> Thom Nichols
>
> 1. https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FVoltServer%2Fuboot-bootcount%2Fpull%2F15%2Ffiles&data=05%7C02%7Cthom.nichols%40voltserver.com%7Cbf306542d0ce48c4bc4308dd76d056ec%7C9d9544062c0145a39cc8be64a19fb626%7C0%7C0%7C638797359401626648%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=MgIfiZ5MnTaFkOfpH9kVXXxwarhhj1d73qoX76TYTuo%3D&reserved=0<https://github.com/VoltServer/uboot-bootcount/pull/15/files>

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.


More information about the U-Boot mailing list