I'm trying to get the libcamera-still
to work on a compute module 4 with an imx219 but I'm getting a
ERROR: *** no cameras available ***
Running dmesg
returns
[ 6.060283] pinctrl-bcm2835 fe200000.gpio: pin gpio44 already requested by fe804000.i2c; cannot claim for soc:i2c0mux
[ 6.060310] pinctrl-bcm2835 fe200000.gpio: pin-44 (soc:i2c0mux) status -22
[ 6.060331] pinctrl-bcm2835 fe200000.gpio: could not request pin 44 (gpio44) from group gpio44 on device pinctrl-bcm2711
[ 6.060350] i2c-mux-pinctrl soc:i2c0mux: Error applying setting, reverse things back
[ 6.060370] imx219 10-0010: failed to read chip id 219
So I'm guessing it's probing the I2C bus at startup for a camera but the pins are still routed to the default pins so there is obviously no answer.
If I run raspi-gpio set 44 a2
and raspi-gpio set 45 a2
I can communicate with the camera but at this point its apparently too late for the libcamera.
So how do I make the pi use the gpio pins 44/45 for I2C at startup?
My /boot/config.txt looks something like this
dtparam=i2c1=on
#dtparam=i2c0=on
dtparam=i2c_arm=on
dtoverlay=i2c1,pins_44_45
#dtparam=i2s=on
#dtparam=spi=on
# dtoverlay=i2c-gpio,bus=5
# dtoverlay=i2c-gpio,bus=4
# dtoverlay=i2c-gpio,bus=3
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable USB
dtoverlay=dwc2,dr_mode=host
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-kms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
start_x=1
gpu_mem=256
dtoverlay=imx219
i2c
interface - in my case for a RTC.