Hi, I would like to connect an adv7180 to my solox.
I found only example with ipu but in the 6SoloX ipu is not present.
Where can I find an example?
Thanks
Hi Mirko
one can reuse ov5640 dts, it also work in CCIR656 mode
linux-2.6-imx.git - Freescale i.MX Linux Tree
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks
I have modify my dts and after boot I have the following devices:
/dev/video0
/dev/video1
/dev/video2
Unfortunately when I try the command:
gst-launch-1.0 -v v4l2src do-timestamp=true device=/dev/video0 ! avimux ! filesink location=test.avi
or
gst-launch-1.0 -v v4l2src do-timestamp=true device=/dev/video1 ! avimux ! filesink location=test.avi
I have the following error (/dev/video2 is not a capture device) :
""""
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstAviMux:avimux0.GstPad:src: caps = video/x-msvideo
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-msvideo
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
/home/user/yocto/fido/imx6sx/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer1.0/1.4.5-r0/gstreamer-1.4.5/libs/gst/base/gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2s:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.003625333
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
""""
and if I use mplayer
./mplayer tv:// -tv driver=v4l2:device=/dev/video[0-1]
I have the following error:
MPlayer UNKNOWN-4.9.2 (C) 2000-20unknown pixelformat:' '
16 MPlayer Team
Playing tv://.mx6s-csi 221c000.csi: Fourcc format (0x00000000) invalid.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: i.MX6S_CSI
Capabilities: video capture streaming
supported norms:
inputs: 0 = Camera;
Current input: 0
Current format: unknown (0x0)
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set mute failed: Inappropriate ioctl for device
v4l2: 0 frames successfully processed, 0 frames dropped.
Exiting... (End of file)
Any ideas????
Thanks
Follows my dts
/*
* Copyright (C) 2014 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "imx6sx.dtsi"
#include "imx6sx-icore-pads.dtsi"
/ {
model = "Engicam i.Core M6 SoloX";
compatible = "fsl,imx6sx-icore", "fsl,imx6sx";
backlight {
compatible = "pwm-backlight";
pwms = <&pwm5 0 50000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
memory {
reg = <0x80000000 0x40000000>;
};
pxp_v4l2_out {
compatible = "fsl,imx6sx-pxp-v4l2", "fsl,imx6sl-pxp-v4l2";
status = "okay";
};
regulators {
compatible = "simple-bus";
reg_3V3: 3V3{
compatible = "regulator-fixed";
regulator-name = "+3V3";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-always-on;
};
reg_vref_3v3: regulator@0 {
compatible = "regulator-fixed";
regulator-name = "vref-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
reg_psu_5v: psu_5v0 {
compatible = "regulator-fixed";
regulator-name = "PSU-5V0";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
};
reg_usb_otg1_vbus: usb_otg1_vbus {
compatible = "regulator-fixed";
regulator-name = "usb_otg1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 9 0>;
enable-active-high;
};
reg_usb_otg2_vbus: usb_otg2_vbus {
compatible = "regulator-fixed";
regulator-name = "usb_otg2_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 12 0>;
enable-active-high;
};
};
sound {
compatible = "fsl,imx6-icore-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "imx6q-icore-sgtl5000";
cpu-dai = <&ssi1>;
audio-codec = <&codec>;
audio-routing =
"LINE_IN", "Line In Jack",
"Headphone Jack", "HP_OUT";
mux-int-port = <1>;
mux-ext-port = <6>;
};
};
&csi1 {
status = "okay";
port {
csi1_ep: endpoint {
remote-endpoint = <&adv7180_ep>;
};
};
};
&csi2 {
status = "okay";
port {
csi2_ep: endpoint {
remote-endpoint = <&vadc_ep>;
};
};
};
&dcic1 {
dcic_id = <0>;
dcic_mux = "dcic-lcdif1";
status = "okay";
};
&dcic2 {
dcic_id = <1>;
dcic_mux = "dcic-lvds";
status = "okay";
};
&adc1 {
vref-supply = <®_vref_3v3>;
status = "okay";
};
&adc2 {
vref-supply = <®_vref_3v3>;
status = "okay";
};
&audmux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_audmux_4>;
status = "okay";
};
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1_2 &pinctrl_enet1_clkout_2>;
pinctrl-assert-gpios = <&gpio6 19 GPIO_ACTIVE_HIGH>;
phy-mode = "mii";
fsl,num_tx_queues=<3>;
fsl,num_rx_queues=<3>;
status = "okay";
};
&fec2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet2_2>;
pinctrl-assert-gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>;
phy-mode = "mii";
fsl,num_tx_queues=<3>;
fsl,num_rx_queues=<3>;
status = "okay";
};
&gpc {
fsl,cpu_pupscr_sw2iso = <0xf>;
fsl,cpu_pupscr_sw = <0xf>;
fsl,cpu_pdnscr_iso2sw = <0x1>;
fsl,cpu_pdnscr_iso = <0x1>;
fsl,wdog-reset = <1>; /* watchdog select of reset source */
};
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1_1>;
status = "okay";
codec: sgtl5000@0a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&clks IMX6SX_CLK_SSI1>;
VDDA-supply = <®_3V3>;
VDDIO-supply = <®_3V3>;
};
polytouch: edt-ft5x06@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_edt_ft5x06>;
interrupt-parent = <&gpio1>;
interrupts = <14 0>;
reset-gpios = <&gpio1 0 16>;
};
adv7180: adv7180@21 {
compatible = "adv,adv7180";
reg = <0x21>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi_2>;
clocks = <&clks IMX6SX_CLK_CSI>;
clock-names = "csi_mclk";
DOVDD-supply = <®_3V3>; // 3.3v, enabled via 2.8 VGEN6
AVDD-supply = <®_3V3>; // 1.8v
DVDD-supply = <®_3V3>; // 1.8v
PVDD-supply = <®_3V3>; // 1.8v
pwn-gpios = <&gpio3 19 0>; // put on not used pin
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
cvbs = <1>;
status = "okay";
port {
adv7180_ep: endpoint {
remote-endpoint = <&csi1_ep>;
};
};
};
};
&i2c2 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2_2>;
status = "okay";
hdmi: edid@50 {
compatible = "fsl,imx6-hdmi-i2c";
reg = <0x50>;
};
};
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3_2>;
status = "okay";
max11801@48 {
compatible = "maxim,max11801";
reg = <0x48>;
interrupt-parent = <&gpio6>;
interrupts = <18 2>;
work-mode = <0>;/*DCM mode*/
};
};
&flexcan1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan1_2>;
status = "okay";
};
&flexcan2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan2_2>;
status = "okay";
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
touchpanel{
pinctrl_edt_ft5x06: edt-ft5x06grp {
fsl,pins = <
MX6SX_PAD_CSI_DATA00__GPIO1_IO_14 0x17059 /*interrupt*/
MX6SX_PAD_CSI_DATA02__GPIO1_IO_16 0x17059 /*reset*/
>;
};
};
hog {
pinctrl_hog: hoggrp {
fsl,pins = <
MX6SX_PAD_KEY_COL0__GPIO2_IO_10 0x17059 /* GPIO_SP0 */
MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059 /* GPIO_SP1 */
MX6SX_PAD_KEY_ROW0__GPIO2_IO_15 0x17059 /* GPIO_SP2 */
MX6SX_PAD_KEY_ROW1__GPIO2_IO_16 0x17059 /* GPIO_SP3 */
MX6SX_PAD_KEY_COL2__GPIO2_IO_12 0x17059 /* GPIO_SP4 */
MX6SX_PAD_KEY_COL3__GPIO2_IO_13 0x17059 /* GPIO_SP5 */
MX6SX_PAD_KEY_ROW2__GPIO2_IO_17 0x17059 /* GPIO_SP6 */
MX6SX_PAD_KEY_ROW3__GPIO2_IO_18 0x17059 /* GPIO_SP7 */
MX6SX_PAD_GPIO1_IO08__GPIO1_IO_8 0x17059 /* GPIO_SP8 */
MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9 0x17059 /* GPIO_SP9 */
MX6SX_PAD_SD3_CLK__GPIO7_IO_0 0x17059 /* GPIO_SP10 */
MX6SX_PAD_SD3_CMD__GPIO7_IO_1 0x17059 /* GPIO_SP11 */
MX6SX_PAD_QSPI1B_SS1_B__GPIO4_IO_31 0x17059 /* GPIO_SP12 */
MX6SX_PAD_QSPI1B_DQS__GPIO4_IO_28 0x17059 /* GPIO_SP13 */
MX6SX_PAD_QSPI1B_DATA2__GPIO4_IO_26 0x17059 /* GPIO_SP14 */
MX6SX_PAD_QSPI1B_DATA3__GPIO4_IO_27 0x17059 /* GPIO_SP15 */
MX6SX_PAD_GPIO1_IO02__GPIO1_IO_2 0x17059 /* SD1_CD */
MX6SX_PAD_SD4_DATA4__GPIO6_IO_18 0x17059 /* PEN_IRQ */
MX6SX_PAD_SD4_DATA5__GPIO6_IO_19 0x17059 /* ETH_PHY1_RES */
MX6SX_PAD_SD4_DATA6__GPIO6_IO_20 0x17059 /* ETH_PHY2_RES */
>;
};
};
};
&pcie {
power-on-gpio = <&gpio2 0 0>;
reset-gpio = <&gpio2 1 0>;
status = "okay";
};
&sai1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1_2>;
status = "disabled";
};
&ssi1 {
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1_1>;
status = "okay";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2_1>;
status = "okay";
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3_1>;
fsl,uart-has-rtscts;
status = "okay";
};
&gpmi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpmi_nand_1>;
status = "okay";
};
&usbotg1 {
vbus-supply = <®_usb_otg1_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg1_1>;
imx6-usb-charger-detection;
status = "okay";
};
&usbotg2 {
vbus-supply = <®_usb_otg2_vbus>;
dr_mode = "host";
status = "okay";
};
&usdhc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1_1>;
cd-gpios = <&gpio1 2 0>;
non-removable;
no-1-8-v;
vmmc-supply = <®_3V3>;
status = "okay";
};
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2_1>;
non-removable;
no-1-8-v;
keep-power-in-suspend;
vmmc-supply = <®_3V3>;
enable-sdio-wakeup;
status = "okay";
};
&lcdif1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcdif_dat_1
&pinctrl_lcdif_ctrl_0>;
lcd-supply = <®_3V3>;
display = <&display0>;
status = "okay";
display0: display {
bits-per-pixel = <16>;
bus-width = <18>;
display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <33500000>;
hactive = <800>;
vactive = <480>;
hback-porch = <89>;
hfront-porch = <164>;
vback-porch = <23>;
vfront-porch = <10>;
hsync-len = <10>;
vsync-len = <10>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
};
};
&lcdif2 {
display = <&display1>;
disp-dev = "ldb";
status = "okay";
display1: display {
bits-per-pixel = <16>;
bus-width = <18>;
};
};
&ldb {
status = "okay";
lvds-channel@0 {
fsl,data-mapping = "spwg";
fsl,data-width = <18>;
crtc = "lcdif2";
status = "okay";
display-timings {
native-mode = <&timing1>;
timing1: hsd100pxn1 {
clock-frequency = <65000000>;
hactive = <1024>;
vactive = <768>;
hback-porch = <220>;
hfront-porch = <40>;
vback-porch = <21>;
vfront-porch = <7>;
hsync-len = <60>;
vsync-len = <10>;
};
};
};
};
&pwm2 {
pinctrl-names = "default";
};
&pwm3 {
pinctrl-names = "default";
};
&pwm4 {
pinctrl-names = "default";
};
&pwm5 { /* LCD CONTRAST */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm5_0>;
status = "okay";
};
&pxp {
status = "okay";
};
&vadc {
vadc_in = <0>;
csi_id = <1>;
status = "okay";
port {
vadc_ep: endpoint {
remote-endpoint = <&csi2_ep>;
};
};
};
for adv7180 it is necessary to use tv-in source plugin as described in attached Linux Guide
sect.7.3.8 Recording the TV-in source
Also I think one can try to test with imx-test, please check folder pxp_v4l2_test
http://repository.timesys.com/buildsources/i/imx-test/imx-test-3.14.28-1.0.0/
~igor
I'm using CONFIG_MXC_TVIN_ADV7180 in kernel config (I used CONFIG_VIDEO_AD7180 too but the result is the same). Doesn't work!
The result of pxp_v4l2_out_test.sh is:
unable to open /dev/video for output, continue searching device.
Found v4l2 output device /dev/video2.
V4L output 0 (0x8de00000): PxP Display Output
Video input format: 352x240 YUV 4:2:0 Planar
request count 6
win.w.l/t/w/h = 0/0/352/240
crop.c.l/t/w/h = 0/0/352/240
s0 data open failed: No such file or directory
unable to open /dev/video for output, continue searching device.
Found v4l2 output device /dev/video2.
V4L output 0 (0x8de00000): PxP Display Output
Video input format: 352x240 YUV 4:2:0 Planar
request count 6
win.w.l/t/w/h = 0/0/352/240
crop.c.l/t/w/h = 0/0/264/152
s0 data open failed: No such file or directory
unable to open /dev/video for output, continue searching device.
Found v4l2 output device /dev/video2.
V4L output 0 (0x8de00000): PxP Display Output
Video input format: 352x240 YUV 4:2:0 Planar
request count 6
win.w.l/t/w/h = 0/0/352/240
crop.c.l/t/w/h = 0/0/352/240
s0 data open failed: No such file or directory
unable to open /dev/video for output, continue searching device.
Found v4l2 output device /dev/video2.
V4L output 0 (0x8de00000): PxP Display Output
Video input format: 352x240 YUV 4:2:0 Planar
request count 6
s1 data open failed: No such file or directory