AnsweredAssumed Answered

imx8qxp parallel-csi tw9912(4.14.62 AndroidP)

Question asked by jiu jin hong on May 16, 2019
Latest reply on May 17, 2019 by jiu jin hong

Hi,

 

we use tw9912 in imx8qxp with parallel-csi, tw9912(yuv422) reg config is from imx6d which works fine. but camera preview data is not correct. there are not  detail parallel-csi reg explantation in reference manual. can you do some help? 

 

tw9912: tw9912@44 {
compatible = "ovti,tw9912";
reg = <0x44>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_parallel_csi>;
clocks = <&clk IMX8QXP_PARALLEL_CSI_MISC0_CLK>;
clock-names = "csi_mclk";
/*ldo-gpios = <&gpio3 2 0>;*/
rst-gpios = <&gpio3 3 1>;
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
status = "okay";
port {
tw9912_ep: endpoint {
remote-endpoint = <&parallel_csi_ep>;
};
};
};

 

 

&cameradev {
parallel_csi;
status = "okay";
};

&parallel_csi {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
parallel_csi_ep: endpoint {
remote-endpoint = <&tw9912_ep>;
};
};
};

 

&isi_0 { │

interface = <6 0 2>; /* INPUT: 6-PARALLEL CSI */ 
parallel_csi;
status = "okay"; 
};

run log:

 

[ 147.477963] tw9912 8-0044: tw9912:ioctl_enum_frameintervals
[ 147.484567] tw9912 8-0044: tw9912:ioctl_enum_framesizes
[ 147.490501] tw9912 8-0044: In tw9912:ioctl_s_parm
[ 147.495372] mxc-isi 58100000.isi: mxc_isi_cap_s_fmt_mplane, fmt=0x56595559
[ 147.502600] mxc-isi 58100000.isi: num_planes = 1
[ 147.507433] mxc-isi 58100000.isi: bpl = 0, sizeimage = 0
[ 147.513051] mxc-isi 58100000.isi: sizeimage = 691200
[ 147.518396] tw9912 8-0044: ioctl_g_fmt_cap code=0x2008, w/h=(720,480), colorspace=7, field=1
[ 147.527143] mxc-parallel-csi 58261000.pcsi: width=720, height=480, fmt.code=0x2008
[ 147.542839] bypass csc
[ 147.545284] input fmt RGB4
[ 147.548584] output fmt YUYV
[ 148.278537] mxc-parallel-csi 58261000.pcsi: mxc_pcsi_s_stream: 442, pcsidev: 0x1
[ 148.286705] tw9912 8-0044: ioctl_g_fmt_cap code=0x2008, w/h=(720,480), colorspace=7, field=1
[ 148.295350] mxc-parallel-csi 58261000.pcsi: width=720, height=480, fmt.code=0x2008
[ 148.314522] mxc-parallel-csi 58261000.pcsi: HW_IF_CTRL_REG = 0x00001003
[ 148.321171] mxc-parallel-csi 58261000.pcsi: HW_CSI_CTRL_REG = 0x1ad04805
[ 148.328597] mxc-parallel-csi 58261000.pcsi: HW_CSI_STATUS = 0x00000000
[ 148.335816] mxc-parallel-csi 58261000.pcsi: HW_CSI_CTRL_REG1 = 0x05a002cf

 

 

console:/ #
console:/ #
console:/ #
console:/ # dmesg | grep tw9912
[ 4.918491] tw9912 8-0044: tw9912_probe sensor_clk = 0
[ 4.923678] tw9912 8-0044: tw9912_probe:tw9912 probe i2c address is 0x44
[ 4.930901] tw9912 8-0044: tw9912_probe:Analog Device TW9912 detected!
[ 4.937487] mx8-img-md: Registered sensor subdevice: tw9912 8-0044 (1)
[ 4.957514] mx8-img-md: created link [tw9912 8-0044] => [mxc-parallel-csi]
[ 5.004876] tw9912 8-0044: tw9912_probe camera tw9912, is found
[ 13.251612] tw9912 8-0044: tw9912:ioctl_enum_framesizes
[ 13.318726] tw9912 8-0044: tw9912:ioctl_enum_frameintervals
[ 13.376363] tw9912 8-0044: tw9912:ioctl_enum_frameintervals
[ 13.438577] tw9912 8-0044: tw9912:ioctl_enum_framesizes
[ 13.560456] tw9912 8-0044: tw9912:ioctl_enum_framesizes
[ 13.638747] tw9912 8-0044: tw9912:ioctl_enum_frameintervals
[ 13.694569] tw9912 8-0044: tw9912:ioctl_enum_frameintervals
[ 13.814599] tw9912 8-0044: tw9912:ioctl_enum_framesizes
[ 147.477963] tw9912 8-0044: tw9912:ioctl_enum_frameintervals
[ 147.484567] tw9912 8-0044: tw9912:ioctl_enum_framesizes
[ 147.490501] tw9912 8-0044: In tw9912:ioctl_s_parm
[ 147.518396] tw9912 8-0044: ioctl_g_fmt_cap code=0x2008, w/h=(720,480), colorspace=7, field=1
[ 148.286705] tw9912 8-0044: ioctl_g_fmt_cap code=0x2008, w/h=(720,480), colorspace=7, field=1
console:/ #
console:/ #
console:/ #
console:/ #
console:/ #

Outcomes