07-07-2021, 07:25 PM
(This post was last modified: 07-07-2021, 07:29 PM by dsimic.
Edit Reason: Fixed a couple of typos
)
My apologies for the delayed response.
Quite frankly, we'll never be able to get the source code of the autofocus firmware. Making that happen would require an Act of Congress.
I've created a semi-throwaway utility that converts the autofocus firmware image "dumps" contained in C header files into binary images expected by the Linux kernel's firmware loading subsystem. I've already included a few image "dumps" (i.e., C header files) that are available in various source repositories on the Internet, and I've already converted those header files into binary images that are available as .bin files in the "firmware" directory in the repository.
Please note that the "firmware" directory also contains human-readable .regs files, which contain additional values for the registers that, according to the original C header files, should be configured at the same time when the autofocus firmware is loaded, before and/or after the actual loading. Just have a look at the .regs files and all this will make much more sense.
As a side note, loading the firmware image into the OV5640 MCU should be performed using the i2c_transfer() function directly, instead of poking individual registers, but we can get back to that once we discover which firmware image needs to be used.
(06-28-2021, 12:01 PM)kqlnut Wrote: Thanks a lot for trying that out! Unfortunately I have no other idea so far and no time at the moment to get deeper into this. Maybe it's possible to get the source code from the vendor directly?
Quite frankly, we'll never be able to get the source code of the autofocus firmware. Making that happen would require an Act of Congress.
I've created a semi-throwaway utility that converts the autofocus firmware image "dumps" contained in C header files into binary images expected by the Linux kernel's firmware loading subsystem. I've already included a few image "dumps" (i.e., C header files) that are available in various source repositories on the Internet, and I've already converted those header files into binary images that are available as .bin files in the "firmware" directory in the repository.
Please note that the "firmware" directory also contains human-readable .regs files, which contain additional values for the registers that, according to the original C header files, should be configured at the same time when the autofocus firmware is loaded, before and/or after the actual loading. Just have a look at the .regs files and all this will make much more sense.
As a side note, loading the firmware image into the OV5640 MCU should be performed using the i2c_transfer() function directly, instead of poking individual registers, but we can get back to that once we discover which firmware image needs to be used.