-
Notifications
You must be signed in to change notification settings - Fork 232
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
SiP: SoC dependent RAM init #142
Comments
Yes, I think what you are saying is possible. However it's not implemented and not in the current roadmap. We will be happy to try out a patch if you decide to implement this. |
Thanks for your feedback so far.
I can select those, no issues. So there's no urgent demand here. After reading the code again today, I noticed some things, more or less related to the problem field:
|
There was something called a 'virtual board' because we had to support the lpddr2 sip but we had no board to actually add to at91bootstrap. So this was more like an 'example' that could be used by people wanting to use the sip.
That was one of the main goals of at91bootstrap4 . I am glad it's appreciated
That's right. We do not have things in bootstrap that are not covered by our evaluation kits, with a few notable exceptions. |
Not sure if I find time for this. 😞 Background: I had to find a way to move forward quickly. I already had code to support the ATSAMA5D27C-D5M in a custom v3.9.x branch since summer 2020. For the new board (where either D5M or D1G is soldered depending what can be bought at the time) I let ptxdist build at91bootstrap twice with different configurations for each SoC variant, the at91bootstrap code uses the RAM size defines resulting from kconfig and ifdefs to build either one ore the other variant. When flashing the NAND flash on the boards with a SAM-BA qml script, I let the script read the CPU register with the EXID and flash the correct image depending on that. This is working, it is in production and I won't get time to test newer versions of the bootstrap soon. 🤷🏼♂️ |
FTR: due to ongoing chip delivery shortages, we have to do the same move (populating one or the other variant on the PCB) for another product, which can also boot from SD card. It would be great if we could avoid making different SD cards, and have the second stage bootloader (aka at91bootstrap) decide at runtime. If it's not easily possible to let at91bootstrap do it, maybe U-Boot SPL is a possibility? 🤔 |
I got some time assigned to implement this "decide at runtime" feature for booting from SD card now. Just looking at the current state of master aka v4.0.6-rc1 to see if there's a way to implement this. Meanwhile board specific code has gone completely. Also configurations for non-microchip boards gone (folder contrib deleted without any reasoning in the git commit messages). I can select different RAM presets from Kconfig like Would appreciate any sort of guidance how some sort of automatic runtime selection (maybe based on one configured base SiP type) could and should be implemented here. Will look into it now to see if I can come up with something in a few hours. If not I will probably hack something on top of our old v3.9.x modifications. |
It was a lot easier to hack this on top of v3.9.x for just the one board I need this for. Leaving this open, because I still think it's a useful feature. But I won't come with a patch for v4.x anytime soon, still open for ideas anyways. |
Anyone else having an idea for an elegant solution for this problem in the v4.x branch? |
The SAMA5D2 SiP variants ATSAMA5D27C-D5M and ATSAMA5D27C-D1G have the same pin/ball layout and are mostly the same, but differ only in RAM attached, so it is possible to use one or the other on a PCB (we did that already by accident).
Those chips can be distinguished by reading chip id from CIDR register, the values are
SAMA5D27C_D1G_EXID
andSAMA5D27C_D5M_EXID
for this example. The bootstrap could do matrix and memory init (or is there more?) based on the actual variant found. However currently the menu only allows to select one specific memory size, there's no flexibility.Would it be possible to extend the bootstrap in a way it could detect drop-in compatible SoC variants and act depending on what was detected?
The text was updated successfully, but these errors were encountered: