02-28-2024, 05:01 AM (This post was last modified: 02-28-2024, 05:32 AM by cringeops.
Edit Reason: DTS screenshot
)
I'm trying to figure out missing pieces in the endeavor of making cameras work. I see that the kernel module for OV5648 is present in 6.6.13-danctnix1-1-pinetab2 kernel and it's linked to the v4l2 subsystem, however none of the /dev/video* devices are operational. Maybe some of you, guys, have already investigated it.
The sad part is that the driver exists only in 4.19 necrorepo, and (surprisingly) APIs have changed since then... I'm a real dummy in kernel coding, but will try my best to make it compile and (hopefully) work.
I've made some progress: the thing compiles against 6.6 kernel at the very least and manages to fetch module information from the device-tree. However, there is a lot of tinkering ahead.
Code:
[ 161.593750] gc02m2 2-0037: driver version: 00.01.02
[ 161.593808] gc02m2 2-0037: Failed to get reset-gpios
[ 161.593829] gc02m2 2-0037: Failed to get pwdn-gpios
[ 161.593842] gc02m2 2-0037: lane_num(1) pixel_rate(67200000)
[ 161.593856] gc02m2 2-0037: could not get default pinstate
[ 161.594429] gc02m2 2-0037: could not get sleep pinstate
[ 161.594944] gc02m2 2-0037: supply dovdd-supply not found, using dummy regulator
[ 161.595269] gc02m2 2-0037: supply avdd-supply not found, using dummy regulator
[ 161.595365] gc02m2 2-0037: supply dvdd-supply not found, using dummy regulator
[ 161.595449] gc02m2 2-0037: Enter gc02m2_initialize_controls(1238) !
[ 161.597622] gc02m2 2-0037: gc02m2 read reg:0xf0 failed !
[ 161.598174] gc02m2 2-0037: Read chip ID H register error
03-01-2024, 04:59 AM (This post was last modified: 03-01-2024, 10:19 AM by cringeops.)
Moving a bit forward: I found the i2c address for the camera module: 0x0c. The DTS description should be complete at this point (I hope).
UPD1: I got bamboozled by dw9714 device, which resides on this bus. It was its address. Investigating further.
UPD2: I have no idea where the frontal camera should reside. According to the schematics, it's on the i2c2 bus, but I can't probe anything other than dw9714 on address 0x0c, and ov5648 on address 0x36. Just for the sake of it, I probed all i2c busses and found nothing.
03-05-2024, 03:54 AM (This post was last modified: 03-05-2024, 03:56 AM by cringeops.
Edit Reason: typo
)
Guys on the chat has suggested that the device is not properly powered-on, hence nothing to be seen on i2cdetect. I decided to do my research about power-up sequence and how it's supposed to be implemented in a Linux driver. So, I found the piece of code in the driver responsible for that and added some debug messages to help me see what's going on.
The power-up sequence is performed by the driver, and it is successful. I thought to myself: "yeak, ok, let's just brute-force this thing upon sensor ID check within the driver itself".
0x0c is occupied with dw9714, so that's the reason we got an interrupt. 0x36 (back camera) has not responded because it's powered-off, I presume. But the gc02m2 must be powered, because the power-up was done by the probe function of the driver, and yet there is nothing.
Powerdown and reset pins are correct (if the schematics are). I'm at the end of my wits here.
03-08-2024, 09:10 AM (This post was last modified: 03-08-2024, 10:01 AM by cringeops.
Edit Reason: bitshift
)
I've contacted GalaxyCore and they were kind enough to give me access to their customers' FTP server. There is a ton of gc02m2 drivers for various platforms (mostly MTK), but what matters is that now I know the sensor slave address for sure: 0x6e >> 1, which is 0x37.
i wish i had something constructive to offer to your development efforts for the cameras, but i do want give you huge props and kudos for deciding to tackle this! people like you are what make this community awesome!
(03-08-2024, 09:10 AM)cringeops Wrote: I've contacted GalaxyCore and they were kind enough to give me access to their customers' FTP server. There is a ton of gc02m2 drivers for various platforms (mostly MTK), but what matters is that now I know the sensor slave address for sure: 0x6e >> 1, which is 0x37.
awesome, glad to know GalaxyCore open up their FTP server. Thumbs up.