Re: omap3-isp: can't register subdev for new sensor driver mt9t001

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bastian,

thank you, that'll be great.

I have a clock oscillator soldered on my board feeding the CLKIN of
the MT9T001, so I have no issue with I2C not working. The sensor
responds and does i2c writes and reads just fine. Just the v4l2_subdev
isn't created when I load the omap3-isp module, so I guess I have
messed up some configuration somewhere.

Best wishes,
  Stefan.


On Wed, Dec 1, 2010 at 12:50 PM, Bastian Hecht <hechtb@xxxxxxxxxxxxxx> wrote:
> Hello Stefan,
>
> I can send you my code tomorrow. Meanwhile a short hint, that may help
> you: The mt9p031 needs a not only the i2c clock to work but also the
> cam_clk signals.
>
> Right now this is hacked into the isp-driver in my setup but I want to
> do it like the nokia code (pass a clock-setup function defined in the
> board-code to the sensor driver, so that the driver can setup the
> clock itself before i2c-checking is done).
>
> best greetings,
>
> Bastian
>
>
> 2010/12/1 Stefan Steuerwald <salsasepp@xxxxxxxxxxxxxx>:
>> Hi,
>>
>> may I please have your help with the following:
>>
>> I have adapted the MT9T001 driver from Laurent's tree at
>> Âhttp://git.linuxtv.org/pinchartl/media.git?a=shortlog;h=refs/heads/media-mt9t001
>> to the current state of the media-framework in this kernel tree (devel branch):
>> Âhttp://meego.gitorious.org/maemo-multimedia/omap3isp-rx51
>> to run this on a gumstix overo (OMAP3) board.
>> (Duplicating Bastian's recent work, I know, but he's on hoilday...).
>>
>> The mt9t001 driver module loads and probes ok, however, the creation
>> of a v4l2 subdev
>> for the sensor fails (i2c says -EBUSY, see below). It seems to choke
>> on the fact that the
>> sensor's I2C address of 0x5D is already in use after loading the
>> mt9t001 module,
>> which I think is fine:
>>
>> root@overo:~# modprobe iommu2
>> omap-iommu omap-iommu.0: isp registered
>>
>> root@overo:~# modprobe omap3-isp
>> Linux media interface: v0.10
>> Linux video capture interface: v2.00
>> omap3isp omap3isp: Revision 2.0 found
>> omap-iommu omap-iommu.0: isp: version 1.1
>> isp_register_subdev_group: i2c_adapter_id 3, type mt9t001, i2c_addr 93
>> mt9t001 3-005d: mt9t001_probe()
>> mt9t001 3-005d: mt9t001_video_probe()
>> mt9t001 3-005d: MT9T001 detected
>> v4l2_i2c_new_subdev_board: info->addr=0x5d, probe_addrs=(null)
>> i2c i2c-3: Failed to register i2c client mt9t001 at 0x5d (-16)
>> isp_register_subdev_group: Unable to register subdev mt9t001
>>
>> This creates these subdevs:
>> root@overo:~# cat /sys/class/video4linux/v4l-subdev*/name
>> OMAP3 ISP CCP2
>> OMAP3 ISP CSI2a
>> OMAP3 ISP CCDC
>> OMAP3 ISP preview
>> OMAP3 ISP resizer
>> OMAP3 ISP AEWB
>> OMAP3 ISP AF
>> OMAP3 ISP histogram
>> which has the sensor missing, I believe.
>>
>> I am using platform_device_register() in my
>> arch/arm/mach-omap2/board-overo.c file
>> to register my iof_isp_platform_data as follows:
>>
>> static struct i2c_board_info overo_i2c_boardinfo_3[] = {
>> Â Â Â Â{
>> Â Â Â Â Â Â Â ÂI2C_BOARD_INFO("mt9t001", 0x5d),
>> Â Â Â Â},
>> };
>>
>> static struct v4l2_subdev_i2c_board_info iof_camera_mt9t001[] = {
>> Â Â Â Â{
>> Â Â Â Â Â Â Â Â.board_info = &overo_i2c_boardinfo_3[0],
>> Â Â Â Â Â Â Â Â.i2c_adapter_id = 3,
>> Â Â Â Â},
>> Â Â Â Â{ NULL, 0, },
>> };
>>
>> static struct isp_v4l2_subdevs_group iof_camera_subdevs[] = {
>> Â Â Â Â{
>> Â Â Â Â Â Â Â Â.subdevs = iof_camera_mt9t001,
>> Â Â Â Â Â Â Â Â.interface = ISP_INTERFACE_PARALLEL,
>> Â Â Â Â Â Â Â Â.bus = { .parallel = {
>>            Â.data_lane_shift    Â= 0,
>>            Â.clk_pol        Â= 1,
>>            Â.bridge         = ISPCTRL_PAR_BRIDGE_DISABLE,
>> Â Â Â Â Â Â Â Â} },
>> Â Â Â Â},
>> Â Â Â Â{ NULL, 0, },
>> };
>>
>> static struct isp_platform_data iof_isp_platform_data = {
>> Â Â Â Â.subdevs = iof_camera_subdevs,
>> };
>>
>> I have followed the recent conversation between Bastian, Laurent and
>> others on the
>> similar Âsubject of a mt9p031 driver used with omap3-isp.
>> Any pointers on what to check are greatly appreciated.
>>
>> Thank you,
>> ÂStefan.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux