|
Posted at 12/28/2018 10:32:43
Only Author
4#
@acidpero you are right, hitting the point.
At first, we are thinking of changing the OV13850's i2c address physically by
its SID pin. The SCCB address will be 0x20 when SID pin is low, be 0x6c
when high.
But it is not the best option after all, right? Asking a user to iron a copper wire to the camera
is not good. Besides, Android can support dual cameras without it.
Then we read thoroughly the chip spec, and found the cure, which is quoted:
- In the OV13850, the SCCB ID is controlled by the SID pin, and can be programmable. If SID is low, the sensor’s SCCB
- address comes from register 0x300C which has a default value of 0x20. If SID is high, the sensor’s SCCB address comes
- from register 0x3661 which has a default value of 0x6C.
Copy the code
That's what we want, to change the i2c address on demand. After some trial and error, it proves that it is completely viable.
Later we have to deal with the sharing use of power regulators and reset pin,
and more tests to ensure that both single camera (connected with either mipi port)
and dual cameras work with the same kernel image and dtb.
|
|