Skip to content

Conversation

@bith3ad
Copy link

@bith3ad bith3ad commented Nov 10, 2025

Hi,

this v2 is based on the review I received on #7453. Unfortunately I couldn't follow the contributors guideline and had to open a new PR because the PR got closed by the bot. Therefore I added the changes but squashed them directly.

@bith3ad
Copy link
Author

bith3ad commented Nov 10, 2025

Question: Is it really required to keep the 80-char limit?

@jenswi-linaro
Copy link
Contributor

Question: Is it really required to keep the 80-char limit?

Generally, yes, but there are exceptions for prints. Problems with following the limit usually stem from unwieldy local variables. If there's a place apart from prints where you think an exception is needed, feel free to point it out.

@bith3ad
Copy link
Author

bith3ad commented Nov 11, 2025

Okay thanks and good to know. I asked because most projects have lifted this hard requirement to 100-chars.
E.g. the lines, the CI is complaining about, could be split of course, but for the sake of readability I would rather keep them as their are right now.

@jenswi-linaro
Copy link
Contributor

Okay thanks and good to know. I asked because most projects have lifted this hard requirement to 100-chars.
E.g. the lines, the CI is complaining about, could be split of course, but for the sake of readability I would rather keep them as their are right now.

The 80-char limit is for the sake of readability; A standard terminal window is 80 characters wide. I don't see a problem with breaking those lines; better than the wrapping at 80.

@bith3ad
Copy link
Author

bith3ad commented Nov 12, 2025

  • Fixed the 80-char style issues.

@sahilnxp
Copy link
Contributor

@bith3ad Can you please tell me how you tested writing of fuse and did you update the ocotp pta also for this ?

@jenswi-linaro
Copy link
Contributor

Please fix the style issues and use only C-style comments (no //).

@sahilnxp
Copy link
Contributor

@bith3ad Can you please tell me how you tested writing of fuse and did you update the ocotp pta also for this ?

@bith3ad Please check this.

@github-actions
Copy link

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Dec 21, 2025
@bith3ad
Copy link
Author

bith3ad commented Dec 22, 2025

@bith3ad Can you please tell me how you tested writing of fuse and did you update the ocotp pta also for this ?

@bith3ad Please check this.

We tested this via the mechanism proposed in #7597

@github-actions github-actions bot removed the Stale label Dec 23, 2025
Emantor and others added 4 commits January 11, 2026 13:39
The Cortex-A9 inside of the i.MX6Q/D/QP/DL/S/SL/SLL SoCs has no generic
timer support, but all variants should boot with 792Mhz out of the boot
rom. Set the Generic Timer configuration variable to n and implement the
required plat_get_freq() call to support the udelay() calls.

Signed-off-by: Rouven Czerwinski <[email protected]>
The i.MX8MP has an OCOTP_CTRL_ADDR field which is 8-bit wide compared to
all other current supported i.MX SoCs. Due to the larger ADDR field all
bits shifted by 1 bit.

Also make some minor style fixes while on it by replacing the mix of
tabs and spaces with tabs-only.

Signed-off-by: Marco Felsch <[email protected]>
According the reference manuals the ERROR bit should be cleared by
writing a '1' to the OCOTP_CTRL_CLR register and not by writing to the
OCOTP_CTRL direct.

Signed-off-by: Marco Felsch <[email protected]>
Check the g_base_addr and g_ocotp before do the first access.

Signed-off-by: Marco Felsch <[email protected]>
@bith3ad bith3ad force-pushed the vmaster/topic/ocotp-v2 branch from 2ee5f03 to 0da930b Compare January 11, 2026 14:31
@github-actions
Copy link

FYI @sdininno @bryanodonoghue @MrVan

@bith3ad
Copy link
Author

bith3ad commented Jan 11, 2026

  • rebased to 4.9.0-rc1
  • fixed comment style issues (//)
  • squashed the !fixup commits.

@sahilnxp
Copy link
Contributor

sahilnxp commented Jan 12, 2026

@bith3ad Can you please tell me how you tested writing of fuse and did you update the ocotp pta also for this ?

@bith3ad Please check this.

We tested this via the mechanism proposed in #7597

On which platforms ?

@bith3ad
Copy link
Author

bith3ad commented Jan 12, 2026

@bith3ad Can you please tell me how you tested writing of fuse and did you update the ocotp pta also for this ?

@bith3ad Please check this.

We tested this via the mechanism proposed in #7597

On which platforms ?

i.MX6ULL, i.MX6DL, i.MX6Q, i.MX6D, i.MX8MM, i.MX8MP

Use the ARM architected timer instead of assuming that the CPU is
running at 500MHz and the poll takes around ~20us.

Signed-off-by: Marco Felsch <[email protected]>
@sahilnxp
Copy link
Contributor

Tested this one on i.MX8MM and able to write the fuse, will be testing on other platforms too.

Marco Felsch and others added 3 commits January 16, 2026 17:32
Make use of the udelay() function and the newly added
OCOTP_OP_BUSY_TIMEOUT_US to align platforms which don't support
architected timers, like i.MX6Q with the ones that support architected
timers.

udelay() can be used since we have added the plat_get_freq() support for
all i.MX SoCs which don't support architected timers previously.

While on it drop the dsb() since the memory is mapped as non-cacheable
device-memory. So there is no need for a data barrier. Keep the isb() to
not send use-less register loads.

Signed-off-by: Marco Felsch <[email protected]>
This adds the support to burn fuses on i.MX8M SoCs. This approach assume
that the IPG clock is running at 66.67 MHz which is AHB/2 (AHB max.
clock = 133 MHz). Due to lack of HW I added only the i.MX8M support.

Signed-off-by: Marco Felsch <[email protected]>
Reuse the same write functions as for i.MX8M SoC since they seem to use
the same OCOTP IP core according to the reference manual.

Signed-off-by: Rouven Czerwinski <[email protected]>
Reuse the same write function as the other i.MX6 SoCs since
the OCOTP IP is the same. i.MX6ULL just has fewer fuse banks
than i.MX6UL.

Signed-off-by: Philipp Zabel <[email protected]>
@bith3ad bith3ad force-pushed the vmaster/topic/ocotp-v2 branch from 0da930b to 2d8cdcf Compare January 16, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants