I think you should try to diagnose why CAM0 isn't working for you.
In cam1 mode (using the ov5647 overlay with no parameters), the kernel expects the camera to be on I2C0 on GPIOs 44 & 45. When the cam0 parameter is used, it switches I2C0 to GPIOs 0 & 1. There is a mux between the two sets of pins that presents the options as different virtual I2C busses - "i2cdetect -l" will list the ones which are currently enabled.
The following investigation might be clearer if you comment out the use of the ov5647 overlay and reboot.
1. Run "i2cdetect -l" to list the available I2C buses, and "pinctrl 0-1,44-45" to see the state of the pins, which should be inputs.
2. Run "sudo dtparam i2c_csi_dsi" to enable the CAM1 bus, and "i2cdetect -l" to see which bus number has been added. I'll call this i2c-cam1.
3. Run "sudo dtparam i2c_csi_dsi0" to enable the CAM0 bus, and "i2cdetect -l" to see which bus number has been added. I'll call this i2c-cam0.
4. Run "i2cdetect -y <i2c-cam1>", where <i2c-cam1> is the bus number found in step 2. Now "pinctrl 0-1,44-45" should show GPIOs 44 & 45 are SDA0 and SCL0, with GPIOs 0 & 1 being inputs.
5. Run "i2cdetect -y <i2c-cam0>", where <i2c-cam1> is the bus number found in step 3. Now "pinctrl 0-1,44-45" should show GPIOs 0 & 1 are SDA0 and SCL0, with GPIOs 44 & 45 being inputs.
Did any devices appear in the i2cdetect scans in steps 4 & 5?
Do you have appropriate pull-ups on the buses?
In cam1 mode (using the ov5647 overlay with no parameters), the kernel expects the camera to be on I2C0 on GPIOs 44 & 45. When the cam0 parameter is used, it switches I2C0 to GPIOs 0 & 1. There is a mux between the two sets of pins that presents the options as different virtual I2C busses - "i2cdetect -l" will list the ones which are currently enabled.
The following investigation might be clearer if you comment out the use of the ov5647 overlay and reboot.
1. Run "i2cdetect -l" to list the available I2C buses, and "pinctrl 0-1,44-45" to see the state of the pins, which should be inputs.
2. Run "sudo dtparam i2c_csi_dsi" to enable the CAM1 bus, and "i2cdetect -l" to see which bus number has been added. I'll call this i2c-cam1.
3. Run "sudo dtparam i2c_csi_dsi0" to enable the CAM0 bus, and "i2cdetect -l" to see which bus number has been added. I'll call this i2c-cam0.
4. Run "i2cdetect -y <i2c-cam1>", where <i2c-cam1> is the bus number found in step 2. Now "pinctrl 0-1,44-45" should show GPIOs 44 & 45 are SDA0 and SCL0, with GPIOs 0 & 1 being inputs.
5. Run "i2cdetect -y <i2c-cam0>", where <i2c-cam1> is the bus number found in step 3. Now "pinctrl 0-1,44-45" should show GPIOs 0 & 1 are SDA0 and SCL0, with GPIOs 44 & 45 being inputs.
Did any devices appear in the i2cdetect scans in steps 4 & 5?
Do you have appropriate pull-ups on the buses?
Statistics: Posted by PhilE — Fri Oct 11, 2024 9:31 am