I have a compute module 3 running Ubuntu MATE 16.04. I have attempted to get dual cameras to work, but I have been completely unsuccessful and it's not very clear to me why. I have tried to follow all the steps in this guide, as well as follow the steps in this thread, but to no avail. I have the same problems as described in the thread, namely that CAM1 works, but CAM0 isnt being detected. Performing the fix of removing i2c from config.txt did not solve the issue.
Output for raspi-gpio get shows up as:
Code: Select all
BANK0 (GPIO 0 to 27):
GPIO 00: level=1 fsel=4 alt=0 func=SDA0
GPIO 01: level=1 fsel=4 alt=0 func=SCL0
GPIO 02: level=0 fsel=1 alt= func=OUTPUT
GPIO 03: level=0 fsel=1 alt= func=OUTPUT
GPIO 04: level=1 fsel=0 alt= func=INPUT
GPIO 05: level=1 fsel=0 alt= func=INPUT
GPIO 06: level=1 fsel=0 alt= func=INPUT
GPIO 07: level=1 fsel=0 alt= func=INPUT
GPIO 08: level=1 fsel=0 alt= func=INPUT
GPIO 09: level=0 fsel=0 alt= func=INPUT
GPIO 10: level=0 fsel=0 alt= func=INPUT
GPIO 11: level=0 fsel=0 alt= func=INPUT
GPIO 12: level=0 fsel=0 alt= func=INPUT
GPIO 13: level=0 fsel=0 alt= func=INPUT
GPIO 14: level=1 fsel=4 alt=0 func=TXD0
GPIO 15: level=1 fsel=4 alt=0 func=RXD0
GPIO 16: level=0 fsel=0 alt= func=INPUT
GPIO 17: level=0 fsel=0 alt= func=INPUT
GPIO 18: level=0 fsel=0 alt= func=INPUT
GPIO 19: level=0 fsel=0 alt= func=INPUT
GPIO 20: level=0 fsel=0 alt= func=INPUT
GPIO 21: level=0 fsel=0 alt= func=INPUT
GPIO 22: level=0 fsel=0 alt= func=INPUT
GPIO 23: level=0 fsel=0 alt= func=INPUT
GPIO 24: level=0 fsel=0 alt= func=INPUT
GPIO 25: level=0 fsel=0 alt= func=INPUT
GPIO 26: level=0 fsel=0 alt= func=INPUT
GPIO 27: level=0 fsel=0 alt= func=INPUT
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=0 alt= func=INPUT
GPIO 29: level=1 fsel=0 alt= func=INPUT
GPIO 30: level=0 fsel=1 alt= func=OUTPUT
GPIO 31: level=0 fsel=1 alt= func=OUTPUT
GPIO 32: level=0 fsel=0 alt= func=INPUT
GPIO 33: level=0 fsel=0 alt= func=INPUT
GPIO 34: level=1 fsel=0 alt= func=INPUT
GPIO 35: level=1 fsel=0 alt= func=INPUT
GPIO 36: level=1 fsel=0 alt= func=INPUT
GPIO 37: level=0 fsel=0 alt= func=INPUT
GPIO 38: level=0 fsel=0 alt= func=INPUT
GPIO 39: level=0 fsel=0 alt= func=INPUT
GPIO 40: level=0 fsel=0 alt= func=INPUT
GPIO 41: level=0 fsel=0 alt= func=INPUT
GPIO 42: level=0 fsel=0 alt= func=INPUT
GPIO 43: level=0 fsel=0 alt= func=INPUT
GPIO 44: level=0 fsel=0 alt= func=INPUT
GPIO 45: level=0 fsel=0 alt= func=INPUT
BANK2 (GPIO 46 to 53):
GPIO 46: level=1 fsel=0 alt= func=INPUT
GPIO 47: level=1 fsel=1 alt= func=OUTPUT
GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK
GPIO 49: level=1 fsel=4 alt=0 func=SD0_CMD
GPIO 50: level=1 fsel=4 alt=0 func=SD0_DAT0
GPIO 51: level=1 fsel=4 alt=0 func=SD0_DAT1
GPIO 52: level=1 fsel=4 alt=0 func=SD0_DAT2
GPIO 53: level=1 fsel=4 alt=0 func=SD0_DAT3
I have created my dt-blob.bin file by compiling the following DTS file
Code: Select all
/dts-v1/;
/ {
videocore {
pins_cm3 {
pin_config {
pin@default {
polarity = "active_high";
termination = "pull_down";
startup_state = "inactive";
function = "input";
}; // pin
pin@p0 { function = "input"; termination = "pull_up"; }; // CAMERA 0 I2C0 SDA
pin@p1 { function = "input"; termination = "pull_up"; }; // CAMERA 0 I2C0 SCL
pin@p2 { function = "output"; termination = "no_pulling"; }; // CAMERA 0 LED
pin@p3 { function = "output"; termination = "no_pulling"; }; // CAMERA 0 SHUTDOWN
pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0
pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0
pin@p28 { function = "input"; termination = "pull_up"; }; // CAMERA 1 I2C0 SDA
pin@p29 { function = "input"; termination = "pull_up"; }; // CAMERA 1 I2C0 SCL
pin@p30 { function = "output"; termination = "no_pulling"; }; // CAMERA 1 LED
pin@p31 { function = "output"; termination = "no_pulling"; }; // CAMERA 1 SHUTDOWN
pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL
pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA
pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK
pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD
pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0
pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1
pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2
pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3
pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug
pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
}; // pin_config
pin_defines {
pin_define@HDMI_CONTROL_ATTACHED {
type = "external";
number = <0>;
};
pin_define@EMMC_ENABLE {
type = "external";
number = <1>;
};
pin_define@POWER_LOW {
type = "absent";
};
pin_define@LEDS_DISK_ACTIVITY {
type = "absent";
};
pin_define@LAN_RUN {
type = "absent";
};
pin_define@SMPS_SDA {
type = "internal";
number = <46>;
};
pin_define@SMPS_SCL {
type = "internal";
number = <47>;
};
pin_define@ETH_CLK {
type = "absent";
};
pin_define@WL_LPO_CLK {
type = "absent";
};
pin_define@USB_LIMIT_1A2 {
type = "absent";
};
pin_define@SIO_1V8_SEL {
type = "absent";
};
pin_define@PWML {
type = "absent";
};
pin_define@PWMR {
type = "absent";
};
pin_define@SAFE_MODE {
type = "absent";
};
pin_define@SD_CARD_DETECT {
type = "absent";
};
pin_define@ID_SDA {
type = "absent";
};
pin_define@ID_SCL {
type = "absent";
};
pin_define@NUM_CAMERAS {
type = "internal";
number = <2>;
};
pin_define@CAMERA_0_LED {
type = "internal";
number = <2>;
};
pin_define@CAMERA_0_SHUTDOWN {
type = "internal";
number = <3>;
};
pin_define@CAMERA_0_UNICAM_PORT {
type = "internal";
number = <1>;
};
pin_define@CAMERA_0_I2C_PORT {
type = "internal";
number = <0>;
};
pin_define@CAMERA_0_SDA_PIN {
type = "internal";
number = <0>;
};
pin_define@CAMERA_0_SCL_PIN {
type = "internal";
number = <1>;
};
pin_define@CAMERA_1_LED {
type = "internal";
number = <30>;
};
pin_define@CAMERA_1_SHUTDOWN {
type = "internal";
number = <31>;
};
pin_define@CAMERA_1_UNICAM_PORT {
type = "internal";
number = <0>;
};
pin_define@CAMERA_1_I2C_PORT {
type = "internal";
number = <0>;
};
pin_define@CAMERA_1_SDA_PIN {
type = "internal";
number = <28>;
};
pin_define@CAMERA_1_SCL_PIN {
type = "internal";
number = <29>;
};
}; // pin_defines
}; // pins_cm3
};
};
Finally, here's my config.txt file
Code: Select all
start_x=1
gpu_mem=256
dtparam=audio=off
