next steps ---
Following the parallel Camera section from the SMARC design guide I pull the pin PCAM_ON_CSI1 to GND.
As a next step I figured out I was missing the required ipu2 settings including port related information. So here is my current configuration:
#ifdef SMX6_CPU_IMX6Q
adv7180: adv7180@20 {
compatible = "adv,adv7180";
reg = <0x20>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu2_csi>;
clocks = <&clks 201>;
clock-names = "csi_mclk";
DOVDD-supply = <®_3p3v>; /* 3.3v, enabled via 2.8 VGEN6 */
AVDD-supply = <®_3p3v>; /* 1.8v */
DVDD-supply = <®_3p3v>; /* 1.8v */
PVDD-supply = <®_3p3v>; /* 1.8v */
pwn-gpios = <&gpio3 16 0>; /* currently on an undefied gpio */
rst-gpios = <&gpio3 3 0>; /* tied to P111 GPIO3_CAM1_RST */
csi_id = <1>;
mclk = <24000000>;
mclk_source = <0>;
cvbs = <1>;
port {
adv7180_1: endpoint {
remote-endpoint = <&csi1>;
bus-width = <8>;
data-shift = <12>; /* Lines 19:12 used */
hsync-active = <1>;
vsync-active = <1>;
inputs = <0x00 0x01>;
input-names = "ADV7180 Composite on Ain1",
"ADV7180 Composite on Ain2";
};
};
};
#endif
/
soc {
ipu2: ipu@02800000 {
compatible = "fsl,imx6q-ipu";
// compatible = "fsl,imx6q-ipuv3";
reg = <0x02800000 0x400000>;
interrupts = <0 8 0x4 0 7 0x4>;
clocks = <&clks 133>, <&clks 134>, <&clks 137>, <&clks 41>, <&clks 42>;
// clock-names = "bus", "di0", "di1", "di0_sel", "di1_sel", "ldb_di0", "ldb_di1";
clock-names = "ipu2", "ipu2_di0", "ipu2_di1", "ipu2_di0_sel", "ipu2_di1_sel";
resets = <&src 4>;
bypass_reset = <0>;
ipu2_csi0: port@0 {
reg = <0>;
};
ipu2_csi1: port@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
/* Parallel bus */
csi1: endpoint@0 {
reg = <0>;
remote-endpoint = <&adv7180_1>;
};
};
};
};
Now I get the following error on Linux boot-up:
DBG sensor data is at 7f002110
ERROR: v4l2 capture: get invalid ipu
Unable to handle kernel NULL pointer dereference at virtual address 00000034
pgd = a8b9c000
[00000034] *pgd=389d8831, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT SMP ARM
Modules linked in: mxc_v4l2_capture(+) ipu_fg_overlay_sdc ipu_csi_enc ipu_prp_enc ipu_still ipu_bg_overlay_sdc adv7180_tvin
CPU: 3 PID: 483 Comm: modprobe Not tainted 3.10.17-rel1.0+g232293e #3
task: a8ae1a40 ti: a8b6e000 task.ti: a8b6e000
PC is at mxc_v4l2_probe+0x348/0x4ac [mxc_v4l2_capture]
LR is at mxc_v4l2_probe+0x494/0x4ac [mxc_v4l2_capture]
pc : [<7f01e6fc>] lr : [<7f01e848>] psr: 400f0013
sp : a8b6fd88 ip : 00000000 fp : 00000000
r10: a85d6fe4 r9 : 7f020cbc r8 : 8105ad0c
r7 : a81a5e10 r6 : 808243d8 r5 : 7f021d28 r4 : a8772000
r3 : 00000000 r2 : a8b6fd00 r1 : 81076a94 r0 : 00000024
Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: 38b9c04a DAC: 00000015
Process modprobe (pid: 483, stack limit = 0xa8b6e238)
Stack: (0xa8b6fd88 to 0xa8b70000)
...
...
...
Code: e5853160 e3015d28 e5943874 e3475f02 (e5834034)
---[ end trace 789dd23e0b664d13 ]---
I notice my IPU is not being properly initialized. May be I am not feeding/connecting the clocks & clock-names correctly. At this point I would really appreciate an IPU expert to comment on this.