From: Heiko Schocher <hs@denx.de>
To: Fabio Estevam <festevam@gmail.com>, U-Boot-Denx <u-boot@lists.denx.de>
Cc: "Francesco Dolcini" <francesco.dolcini@toradex.com>,
"Schrempf Frieder" <frieder.schrempf@kontron.de>,
"Michael Trimarchi" <michael@amarulasolutions.com>,
"Marek Vašut" <marex@denx.de>
Subject: Re: i.MX6UL: Adding bootcount support
Date: Mon, 7 Jul 2025 06:31:02 +0200 [thread overview]
Message-ID: <072c3a1f-7501-891c-b2b7-a55ea47be0f4@denx.de> (raw)
In-Reply-To: <CAOMZO5Ag7CmRBhpvOB5btNvHiAMayBoxSYMoBJXbV3-w1ET7jA@mail.gmail.com>
Hi Fabio,
On 07.07.25 03:18, Fabio Estevam wrote:
> Hi,
>
> I'm trying to enable bootcount support on the imx6ul-evk board like this:
>
> --- a/configs/mx6ul_14x14_evk_defconfig
> +++ b/configs/mx6ul_14x14_evk_defconfig
> @@ -110,3 +110,8 @@ CONFIG_SPLASH_SCREEN=y
> CONFIG_SPLASH_SCREEN_ALIGN=y
> CONFIG_BMP_16BPP=y
> CONFIG_IMX_WATCHDOG=y
> +CONFIG_SYS_BOOTCOUNT_ADDR=0x020B0068
> +CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
> +CONFIG_BOOTCOUNT_LIMIT=y
> +CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4000
> +CONFIG_SYS_BOOTCOUNT_BE=y
>
> However, the 'bootcount' variable does not increment after a 'reset' command:
>
> => print bootcount
> bootcount=1
>
> Has anyone managed to get bootcount working on it?MX6UL?
Have you checked if CONFIG_SYS_BOOTCOUNT_ADDR address is stable over
reset? May someone overwrites it...
I had it working on imx6ull
CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0x20d8024
CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
CONFIG_BOOTCOUNT_LIMIT=y
I did not needed
> +CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4000
> +CONFIG_SYS_BOOTCOUNT_BE=y
but may because I have an older base...
Hmm.. your register seems fine ... I read in RM:
"""
For backward compatibility with earlier
versions of SNVS LPGPR0 is aliased at its original offset of 68h.The GPR will be
automatically zeroized when a tamper event occurs, unless GPR zeroization is disabled
via the GPR_Z_DIS bit in the LP Control Register.
"""
May try 0x20b00090 ... just a try...
May tamper event occurs? And the register is in "low power domain" ... may
there is a problem... so no real idea here from my side, just speculation...
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Johanna Denk, Tabea Lutz
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de
next prev parent reply other threads:[~2025-07-07 4:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 1:18 i.MX6UL: Adding bootcount support Fabio Estevam
2025-07-07 4:31 ` Heiko Schocher [this message]
2025-07-08 1:36 ` Fabio Estevam
2025-07-08 3:50 ` Heiko Schocher
2025-07-08 11:37 ` Fabio Estevam
2025-07-11 4:00 ` Peng Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=072c3a1f-7501-891c-b2b7-a55ea47be0f4@denx.de \
--to=hs@denx.de \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=frieder.schrempf@kontron.de \
--cc=marex@denx.de \
--cc=michael@amarulasolutions.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox