Ah, I hadn't appreciated that there were different versions of the sensor when it came to PD shielded pixels.sohonomura2020 wrote: ↑Tue Jun 21, 2022 6:10 amThis is the version w/o PD pixels, then the initial value of the registers are slightly different.6by9 wrote: ↑Mon Jun 20, 2022 1:16 pmSorry, it's taken a couple of days to find the time to test this.
imx258 on a CM3 has just worked fine for me.
I'm trying to find a Pi02 to try it on, but there shouldn't be any significant difference between CM3 and Pi02.
I am seeing very definite speckles on the image in a fairly regular pattern as if the shield pixel correction isn't working. The docs I have from Sony on this sensor imply that the SPC table must be programmed into the OTP, so it's possible that that table is blank.
As I shown past writing in this thread, please modify some registers in the initial sequence.
Those regular speckles must be erased.Maybe I need to find out the way to distinguish the version of w/ and w/o PD pixels.It looks like you've:
- removed registers 0x3052 and 0x4e21.
- changed 0x7b25 from 0x00 to 0x01
- reset 0x7bcd from 1 to 0 in 2104x1560 mode.
This is a mainline driver that we're modifying, so if these image differences are down to PD pixels, then we do need to either add an autodetect based on I2C reads, or an alternate device tree compatible string to distinguish between the two. The register configuration then needs adjusting accordingly.
0x3052 defaults to 0x01 (driver set it to 0x00)
0x4e21 defaults to 0x10 (driver set it to 0x14). This appears to be the critical one for the speckled images.
If you have a helpful Sony contact to query these settings with, then that's great. Otherwise I can go back to our contact and see if he can help.