AnsweredAssumed Answered

Linux 3.0.35下移植TW6865驱动运行在imx6s上遇到问题

Question asked by wang liang on Sep 26, 2017

我们采用imx6s+TW6865接收摄像头视频输入,linux内核是3.0.35。在驱动移植中遇到一些问题,不知道各位是否有遇到类似问题。

1:imx6s+TW6865通过pcie连接,原理图如下(6S和6Q pin2pin)。硬件工程师说pcie时钟信号正常。

 

2:配置文件和booting log如附件所示

 

3:移植步骤及问题如下:

(1)移植步骤

1 .  I add the patch file to the kernel, version is L3.0.35

2.   Change the kernel configure within make menuconfig to enable tw6865.

3.   Build the kernel and write it to emmc on board. I am using i.mx6S sabreSDB board.

 

(2)问题

log里面“IMX PCIe port: link up.”显示pcie启动正常,但是后面看不到tw6865设备的任何信息;

 

[ 2.046059] Linux video capture interface: v2.00
[ 2.050840] TW6868_: v4l2 driver version 2.0.1 loaded
[ 2.055895] pci register driver for TW6868
[ 2.060150] driver_register return for TW6868 is:0

从上面的log看我认为,TW6865驱动初始化时没有探测到设备,驱动和设备不能匹配。

 

系统启动后

root@freescale /sys/bus$ cd pci
root@freescale /sys/bus/pci$ ls
devices drivers_autoprobe rescan slots
drivers drivers_probe resource_alignment uevent
root@freescale /sys/bus/pci$ ls drivers
TW6868 ehci_hcd pci-stub pcieport
root@freescale /sys/bus/pci$ ls devices
0000:00:00.0

 

在/dev/下没有video0设备。如果我把改内核烧到pin2pin的6Q板子上,启动log中可以看到tw6865的打印信息,在/sys/bus/pci/devices除了0000:00:00.0 外还有一个0000:00:01.0,/dev/video0   也会出现。不知道什么原因,各位遇到类似问题请回复一下。

谢谢!

 

 

 

Original Attachment has been moved to: putty.log.zip

Original Attachment has been moved to: board_config.zip

Outcomes