android-sdk/kernel-video.git
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video p-ti-linux-3.8.y-video
Rakesh Movva [Thu, 1 May 2014 19:36:43 +0000 (14:36 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  v4l: ti-vps: vip: Different list_head for dequeue list
  v4l: ti-vps: vip: Populate sequence number for frame
  v4l: ti-vps: vip: Handle short frames irqs
  arm: dts: dra7xx: Add gpio properties for fpdlink camera
  i2c: fpdlink: Parse and set gpios in probe
  v4l: ti-vps: vip: Populate field ID for interlaced capture
  v4l: ti-vps: vpdma: Use write desciptor bit in dtd
  v4l: ti-vps: vpdma: Add enum for max width height
  v4l: ti-vps: vip: Dequeue only once while dropping
  v4l: ti-vps: vip: Improve buffer dropping logic

Conflicts:
drivers/media/platform/ti-vps/vpdma.c
drivers/media/platform/ti-vps/vpe.c

7 years agov4l: ti-vps: vip: Different list_head for dequeue list vip
Nikhil Devshatwar [Mon, 28 Apr 2014 14:21:14 +0000 (19:51 +0530)]
v4l: ti-vps: vip: Different list_head for dequeue list

VIP driver maintains two lists
stream->vidq = List of buffers which are queued by user space (queue)
dev->vip_bufs = List of buffers waiting for DMA completion (dequeue)

At any point of time, a buffer would be present in only one of them.
But when buffers are dropped continously, and suddenly user space starts
queueing the buffers, some buffers need to be held by the dequeue list
even if they are already dequeued. This scenario causes list corruption
and eventually kernel crash.

Solution to this problem would be to use a different list for maintaining
buffers which are waiting for DMA. This would allow referencing the buffer
from both lists.

Change-Id: I5a615f32a183eecc33e01a3f71b2a4885be9b047
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Populate sequence number for frame
Nikhil Devshatwar [Mon, 28 Apr 2014 13:09:08 +0000 (18:39 +0530)]
v4l: ti-vps: vip: Populate sequence number for frame

When the capture driver is dropping frmaes, there is no way for user space
to identify wheather a frame is dropped or not.

struct v4l2_buffer has a field 'sequence' which should be populated with the
sequence number of the frame. A change in the sequence is suffiecient to know
the frame drop.

This patch fills in the stream->sequence in the vb2->v4l2_buf before dequeue.
The stream->sequence is incremented at every interrupt (Even for frame drops)

Change-Id: I00de4dac3afa200eed55a3ba3943c509a00d9323
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Handle short frames irqs
Nikhil Devshatwar [Sun, 6 Apr 2014 08:58:26 +0000 (14:28 +0530)]
v4l: ti-vps: vip: Handle short frames irqs

At any point of time, lists for FIFO_SIZE number of buffers are posted.
And driver expects those many distinct IRQs.

If a short frame comes, DMA for the frame would be completed immediately.
If VPDMA generates IRQ for short frame even before the IRQ for last frame
was cleared, both IRQs can be combined into one.

Once an IRQ is missed, number of buffers posted reduces by one.
This would lead to FIFO being empty, resulting in frame drop.

A better appraoch would be to post only one list in the streamON
In the IRQ handler, post for next buffer.
Do not dequeue the buffer only for first two IRQs

With this change, at any point of time, driver is posting only one list
So there is no chance of combining IRQs and leading to deadlock.

If a short frame occurs, only problem is that the next buffer would be missed
But capture continues as normal.

Change-Id: If5c8f09bc191fbe548543f7422740172a8d9e6a1
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Add gpio properties for fpdlink camera
Nikhil Devshatwar [Mon, 14 Apr 2014 11:11:16 +0000 (16:41 +0530)]
arm: dts: dra7xx: Add gpio properties for fpdlink camera

The gpios will be parsed and set by the driver before use.
CAMP_FPD_MUX_S0 is pcf_hdmi 3 0      (P0)
SEL_TVP_FPD_S0  is i2c1 pcf_lcd3 8 0 (P10)

Change-Id: I5f006286421764393707a26e26be91b861e4a942
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoi2c: fpdlink: Parse and set gpios in probe
Nikhil Devshatwar [Mon, 14 Apr 2014 11:04:24 +0000 (16:34 +0530)]
i2c: fpdlink: Parse and set gpios in probe

Signals from FPDlink deserializer on JAMR3 board is connected
to J6 EVM via two board muxes. These are driven by two gpios
camp_fpd_mux_s0 and sel_tvp_fpd_s0 signals.

This patch allows the driver to parse and sets the corresponding gpios
in probe and also in the set format callbcak.

Change-Id: If896fd0d9c385754aa9fbb3bdefabd9c98eae28b
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Populate field ID for interlaced capture
Nikhil Devshatwar [Fri, 11 Apr 2014 17:47:18 +0000 (23:17 +0530)]
v4l: ti-vps: vip: Populate field ID for interlaced capture

When capturing interlaced video, read field ID from the write descriptor
and populate the v4l2_buffer before dequeueing.

Reading field id through write descriptor is preferred over reading it
directly from parser register as the field ID can change anytime
while the frame is being parsed.

Change-Id: I09f6b01c1538431768c3df29be74ee862dbf8ccd
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: Use write desciptor bit in dtd
Nikhil Devshatwar [Fri, 11 Apr 2014 17:46:48 +0000 (23:16 +0530)]
v4l: ti-vps: vpdma: Use write desciptor bit in dtd

VPDMA can create a descriptor after an outbound descriptor is processed.
The output descriptor contains useful information like the width height
of the DMA transfer, Also it contains field id of the data.

update_dma_addr function changes the descriptor so that, every time the
write descriptor bit is set allowing the driver to read these properties.

Change-Id: I69db45fe86b79f00dbd6d0ab4ed42bd86a166782
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: Add enum for max width height
Nikhil Devshatwar [Fri, 11 Apr 2014 10:38:22 +0000 (16:08 +0530)]
v4l: ti-vps: vpdma: Add enum for max width height

Added enums for max_width and max_height fields of the
outbound data descriptor.

Changed vpdma_add_out_dtd to accept two more arguments
for max width and height.

Change-Id: Iab8b4dcbde618232af0369aa959a6c2abcfba387
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Dequeue only once while dropping
Nikhil Devshatwar [Tue, 8 Apr 2014 15:05:44 +0000 (20:35 +0530)]
v4l: ti-vps: vip: Dequeue only once while dropping

When buffers are dropped continuously, driver decrements the
buffer count and calls the buffer_ready.
Calling it multiple times is ok as long as buffer is dequeued only once
If user space queues back the same buffer while next buffers are being
dropped, calling buf_ready would actually dequeue the buffer immediately.

This patch adds a flag in the vip_buffer which would allow the driver to
dequeue the buffer(call buf_ready) only once.

Change-Id: I14b632451ee8894e6361cee493342cfb380f8111
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Improve buffer dropping logic
Nikhil Devshatwar [Fri, 4 Apr 2014 13:55:22 +0000 (19:25 +0530)]
v4l: ti-vps: vip: Improve buffer dropping logic

Current implemtation for dropping buffer allocates a struct vb2_buffer
(around 100 bytes) inside irq handler whenever a buffer has to be allocated.

A better approach can be used where the driver would mark the buffer as ready
for dequeing but not delete from the list.
On every interrupt, drop_count of the first buffer is decremented, if it
reaches zero, delete it from the list.

While queuing, initialize the count to 1 and when there is no buffer to post,
increment drop_count of last element in the posted list.

This approach works for both cases
    - user space completely stopped queueing buffers
    - user space is slow in queueing buffers (alternate drops)

Change-Id: Ieb8274e14ff61fc63e9cb7119c5a07c3ef66eb80
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoMerge branch 'hdmi-linux' into p-ti-linux-3.8.y-video
srinivas pulukuru [Thu, 10 Apr 2014 23:26:10 +0000 (18:26 -0500)]
Merge branch 'hdmi-linux' into p-ti-linux-3.8.y-video

* hdmi-linux:
  omapdss: dra7x hdmi: optimize hdmi PLL calculations

7 years agoomapdss: dra7x hdmi: optimize hdmi PLL calculations hdmi-linux
Archit Taneja [Wed, 9 Apr 2014 13:25:53 +0000 (18:55 +0530)]
omapdss: dra7x hdmi: optimize hdmi PLL calculations

Based on inputs from SiVal team, the PLL computation has been tweaked
to support most of timings.

Change-Id: Id4bd02a4641633e9663c4401063f1e2bf0bc66d5
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoTEMP: v4l: ti-vpe: unmap vpdma buffers in vpe_release
Harinarayan Bhatta [Wed, 9 Apr 2014 14:51:09 +0000 (20:21 +0530)]
TEMP: v4l: ti-vpe: unmap vpdma buffers in vpe_release

Unmap vpdma buffers in vpe_release. Otherwise it was generating
random backtraces. However, this is not an ideal way of unmapping
the buffers. A more permanent solution needs to be found later,

Change-Id: I32ed3b1698e98cd03dd98ded642d7a477b4fc3bc
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agov4l: ti-vpe: Free vpdma buffers in vpe_release
Harinarayan Bhatta [Wed, 9 Apr 2014 14:44:52 +0000 (20:14 +0530)]
v4l: ti-vpe: Free vpdma buffers in vpe_release

Free vpdma buffers in vpe_release. Otherwise it was generating random
backtraces.

Change-Id: Ia2e4b6d09081a435b79f15bd63abd96cb1018eac
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agov4l: ti-vps: vpe: Populate capability for multiplanar buffers
Nikhil Devshatwar [Sat, 29 Mar 2014 13:31:13 +0000 (19:01 +0530)]
v4l: ti-vps: vpe: Populate capability for multiplanar buffers

VPE driver supports only multiplanar ioctls.
But the querycap returns single planar m2m capabilities.

Change-Id: I889081a1b45bb50b4d764963db10c9f08b41d8f9
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpe: Return NULL for invalid buffer type
Nikhil Devshatwar [Sat, 29 Mar 2014 13:28:41 +0000 (18:58 +0530)]
v4l: ti-vps: vpe: Return NULL for invalid buffer type

get_q_data can be called with different values for type
e.g. vpe_try_crop calls it with the buffer type which gets passed
from user space

Framework doesn't check wheather its correct type or not
If user space passes wrong type, kernel should not crash.
Return NULL when the passed type is invalid.

Change-Id: I4268208cad5933db1e7239b2fb732a5660d4f146
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Wed, 9 Apr 2014 22:17:03 +0000 (17:17 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  v4l: ti-vps: vip: Set max width height as capture size
  i2c: tvp5158: Register subdevice only when analog camera detected

Change-Id: Iceeab47ecaad73d793111a3de206292b4dbc0338

7 years agoMerge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-linux-3.8.y-video
Sundar Raman [Wed, 9 Apr 2014 22:13:28 +0000 (17:13 -0500)]
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-linux-3.8.y-video

7 years agov4l: ti-vps: vip: Set max width height as capture size
Nikhil Devshatwar [Sat, 5 Apr 2014 06:31:23 +0000 (12:01 +0530)]
v4l: ti-vps: vip: Set max width height as capture size

When an outbound descriptor is created, max width and height for
VPDMA are set to 1920x1080
When cameras give out data more than the size allocated, it may lead
to buffer corruption.

This patch uses different max width & height sets for different slices
and overrides the descriptor with width & height same as capture size.

Change-Id: I55b8c3098abb8841d4aba26e01a30ff612424f20
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoi2c: tvp5158: Register subdevice only when analog camera detected
Nikhil Devshatwar [Thu, 3 Apr 2014 13:58:49 +0000 (19:28 +0530)]
i2c: tvp5158: Register subdevice only when analog camera detected

Registering a subdevice would mean that the camera is present
and the v4l2_device can use it and call subdev callbacks.
If the priority for the TVP camera is higher and no camera is connected,
Still it would be selected for capture resulting in a failure

This patch registers the subdevice only when the camera is detected and
signal is present.

Change-Id: I74ba9e399bf01a246fe7bc44f31482d203fd5c22
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Fri, 28 Mar 2014 05:21:24 +0000 (00:21 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  i2c: ov1063x: Fix probe failure for cam5,6
  v4l: ti-vps: vip: Fix multiple video device registration

7 years agoi2c: ov1063x: Fix probe failure for cam5,6
Nikhil Devshatwar [Wed, 26 Mar 2014 15:04:39 +0000 (20:34 +0530)]
i2c: ov1063x: Fix probe failure for cam5,6

For cam5 and cam6, ret was used uninitialized,
Therefore, cam5 and cam6 instances failed to probe
This patch fixes it by calling set_gpio correctly

Change-Id: I477d752113226b9716050126d11015b90f2fdcf1
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Fix multiple video device registration
Nikhil Devshatwar [Thu, 20 Mar 2014 14:46:17 +0000 (20:16 +0530)]
v4l: ti-vps: vip: Fix multiple video device registration

Video device should be registered once per stream
Currently, it is registered in the async_bound callback
This patch would register it only once per stream

This reverts commit 0aa59b0d94767ae65625be6afd9ff2cebe334021.

Change-Id: I3155771515901664af99a0b2bb4d4f6cbf0eb0e3
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vpe: Increasing max buffer height and width
Harinarayan Bhatta [Sat, 15 Mar 2014 08:20:32 +0000 (13:50 +0530)]
v4l: ti-vpe: Increasing max buffer height and width

Increasing max buffer height and width to allow for padded buffers.

Change-Id: I21467d03a50a9fd860e059937fa7d3b687657da4
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
7 years agoUAPI: Increasing the FRAME size to 128.
Somnath Mukherjee [Mon, 24 Mar 2014 15:34:56 +0000 (21:04 +0530)]
UAPI: Increasing the FRAME size to 128.

This is required because on TI SoC, the IVA_HD can consume as many as
32 buffers for some H.264 streams. And each buffer can contain plane/field
data as Y-top, Y-bottom, UV-top and UV-bottom. Each field will be treated
as a separate FRAME.

Change-Id: Ibc004ad6f5c7c92a13cd060a7242a8edaa6b55e3
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agov4l: ti-vpe: Using data_offset of v4l2_plane structure for vpe
Harinarayan Bhatta [Tue, 18 Mar 2014 08:49:17 +0000 (14:19 +0530)]
v4l: ti-vpe: Using data_offset of v4l2_plane structure for vpe

The data_offset in v4l2_planes structure will help us point to the data
content for that particular plane. This may be useful when a single buffer
contains the data for different planes e.g. Y followed by UV in the same buffer.
The idea is to pass the same buffer pointers for both planes but use the
data_offset to reach to the particular point of starting for Y or UV data.

Change-Id: Ib1512ae0300c5ed2731acc3ae2f1256e6a358bda
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
[resolved conflicts]
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agov4l: ti-vpe: Add support for SEQ_TB buffers
Archit Taneja [Tue, 25 Feb 2014 11:02:59 +0000 (16:32 +0530)]
v4l: ti-vpe: Add support for SEQ_TB buffers

The video source can generate the data in the SEQ_TB buffer format.
In the case of TI SoC, the IVA_HD can generate the interlaced content in
the SEQ_TB buffer format. This is the format where the Y or UV plane data
can be contained in a single buffer. For example, for NV12, interlaced
format, the data in Y buffer will be arranged as Y-top followed by Y-bottom.
And likewise for UV plane.
On the other hand, the FIELD_ALTERNATE parameter tells the VPE driver and
the v4l2-core that every field data is placed in a different buffer.
For example, Y-top-buffer contains data for Y-top, the Y-bottom-buffer
contains data for Y-bottom. And likewise for UV top and bottom.

Change-Id: Iaf28b1bdf98781a41432df3812a71747a53f17ce
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
Tested-by: Somnath Mukherjee <somnath@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Wed, 26 Mar 2014 21:30:56 +0000 (16:30 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  v4l: ti-vps: vip: Add optional ioctls for ctrl and std
  v4l: ti-vps: vip: Remove delay in buf_prepare qop

7 years agov4l: ti-vps: vip: Add optional ioctls for ctrl and std
Nikhil Devshatwar [Wed, 19 Mar 2014 10:34:48 +0000 (16:04 +0530)]
v4l: ti-vps: vip: Add optional ioctls for ctrl and std

Add optional ioctls to query/get/set input, controls and video standard
These ioctls always succeed returning 0

The s_input ioctls can be used later to allow switching between different
cameras at runtime.

Change-Id: I08019926d63f7ab15ac1245f33d320d7c518f096
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Remove delay in buf_prepare qop
Nikhil Devshatwar [Sat, 22 Mar 2014 14:07:41 +0000 (19:37 +0530)]
v4l: ti-vps: vip: Remove delay in buf_prepare qop

This delay isn't required for any of the reason
This increases queue time by 33ms for every queue.

buf_prepare gets called for every QBUF ioctl
Because of this, Queue latency increases and frames get dropped
when capturing at 60fps

Removing it as its not required

Change-Id: Ie1e2cd2630b019c32317461d82781cac516fce0e
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Sat, 22 Mar 2014 02:09:22 +0000 (21:09 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  arm: dts: dra7xx: Keep LVDS cam2 disabled by default

7 years agoarm: dts: dra7xx: Keep LVDS cam2 disabled by default
Nikhil Devshatwar [Fri, 21 Mar 2014 20:32:42 +0000 (02:02 +0530)]
arm: dts: dra7xx: Keep LVDS cam2 disabled by default

On board level, vin2a singals are muxed with emac1 signals
Only one of them can be used at the same time
This patch disables LVDS cam2 by default

Change-Id: I7134d9e5062cbeabefd84883041ffb31055fd0f1
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Fri, 21 Mar 2014 23:33:44 +0000 (18:33 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  i2c: ov1063x: set vin2_s0 gpio only for LVDS cam2
  ti-ec: Fix up the buffering logic
  v4l: ti-vps: vip: Use an array to communicate dma bufs
  v4l: ti-vps: vip: fix multiple vip_open issue
  Revert "v4l: ti-vps: vip: Use a more safer api for releasing v4l fh"

7 years agoi2c: ov1063x: set vin2_s0 gpio only for LVDS cam2
Nikhil Devshatwar [Fri, 21 Mar 2014 19:35:06 +0000 (01:05 +0530)]
i2c: ov1063x: set vin2_s0 gpio only for LVDS cam2

vin2a_s0 gpio is needed only when LVDS cam2 is used
For other sensors, it should be don't care

Also, the CPLD muxes need to be changed only for cam1 and cam3
Only if cam2 is enabled, this gpio would be touched
All other sensors would not change the gpio

Change-Id: I2d873bacd7c72385d153c2b85e739cb58dc2f765
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoti-ec: Fix up the buffering logic
Sundar Raman [Fri, 21 Mar 2014 20:39:40 +0000 (15:39 -0500)]
ti-ec: Fix up the buffering logic

The buffering logic was having issues. It was using
only one buffer from the VIP driver. Moreover, the
start streaming and setformat apis were being called
every time. Fixed both these issues.

Change-Id: I7a07a01d27bb72aee29d2156635b30b34f40acc1
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agov4l: ti-vps: vip: Use an array to communicate dma bufs
Sundar Raman [Fri, 21 Mar 2014 21:00:25 +0000 (16:00 -0500)]
v4l: ti-vps: vip: Use an array to communicate dma bufs

Early camera will require each buffer that is completed
to be available in the form of an array so that it can
index it using the buffer index and display it.
Add support for this.

Change-Id: I15e68bc3ee2d279567890f77eedcc6d77b1ef706
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agov4l: ti-vps: vip: fix multiple vip_open issue
Sundar Raman [Fri, 21 Mar 2014 20:44:33 +0000 (15:44 -0500)]
v4l: ti-vps: vip: fix multiple vip_open issue

Sometimes the application tries to open the camera
multiple times. We should return proper error if
the driver is already open. Also, added some
NULL checks for file->private_data before calling
the fh close.

Change-Id: I56bde106c3090a0f7a6c711a399f23880d64b8b5
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoRevert "v4l: ti-vps: vip: Use a more safer api for releasing v4l fh"
Sundar Raman [Fri, 21 Mar 2014 20:46:15 +0000 (15:46 -0500)]
Revert "v4l: ti-vps: vip: Use a more safer api for releasing v4l fh"

This reverts commit d78c645d1d6549e1168b24a91c031b6b5192fcfb.

The patch had issues that v4l2_fh_release was also freeing the fh
using kfree which is incorrect. Also, the file pointer was not
passed as input to the api which was a bug.

Change-Id: I28f7bd5ca2bb5f0bd60f85d537cd1bbe8882955f
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoarm: dts: dra7xx: Add voltage-tolerance to avs_dspeve and avs_iva
Vishal Mahaveer [Fri, 21 Mar 2014 20:23:52 +0000 (15:23 -0500)]
arm: dts: dra7xx: Add voltage-tolerance to avs_dspeve and avs_iva

Introduce tolerance values for dspeve and iva avs regulators.
This accounts for variations in PMIC supplied voltages.

Change-Id: I033696f0522376043afa6730fce70874ff417312
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoregulator: ti-avs-class0: consider voltage tolerance for boot voltage detection
Nishanth Menon [Mon, 17 Mar 2014 13:55:27 +0000 (08:55 -0500)]
regulator: ti-avs-class0: consider voltage tolerance for boot voltage detection

Voltage tolerance must be considered when comparing current voltage
against efuse voltages as PMIC might not be integral multiple voltage
steps considered in efuse defined voltage.

Change-Id: Ia8c1d90b20eddb801c519cbcfadca57ae3008c33
Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoeth: dra7x: DT: add device tree data for cpsw emac1
Ravi Babu [Mon, 10 Mar 2014 12:04:06 +0000 (17:34 +0530)]
eth: dra7x: DT: add device tree data for cpsw emac1

Add device tree data for cpsw-emac1 for dra7x platform.

Change-Id: I452cbf699ec8ffa09dceacee3223923a5b0e0da2
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoMerge "thermal: re-work poweroff strategy when critical temp is hit" into p-ti-linux...
Praneeth Bajjuri [Tue, 18 Mar 2014 21:30:33 +0000 (16:30 -0500)]
Merge "thermal: re-work poweroff strategy when critical temp is hit" into p-ti-linux-3.8.y

7 years agothermal: re-work poweroff strategy when critical temp is hit
Subramaniam Chanderashekarapuram [Thu, 13 Mar 2014 16:37:31 +0000 (11:37 -0500)]
thermal: re-work poweroff strategy when critical temp is hit

The software controlled thermal driver, monitors for
cirital temperatures and triggers an orderly_poweroff() if
critical temperature is hit. This approach poses 2 problems:

1. orderly_poweroff() lets the userspace handle the poweroff
scenario before trying to do an emergency shutdown. Reaching
critical temperature calls for emergency shutdown. It is not
a good idea for the kernel to wait for the userspace to shutdown
the system.

2. The orderly_poweroff() implementation itself might be
asynchronous (the poweroff routine might be scheduled in a
workqueue), and thats not a good thing given the severity
of the event.

Hence trigger a kernel_poweroff() instead of an
orderly_poweroff().

However, there are platforms that cannot poweroff the system
(platform limitation, for eg: dra7xx where the PMIC cannot
be powered off). Hence as a last resort, provide a fallback
to restart the platform in case kernel_poweroff() is
not supported.

This patch takes an approach similar to the one present in the
emif driver introduced by Nishanth Menon <nm@ti.com> with the
commit:
cf653bbd9b346432a47373dd0fefd239ed34ad17

Change-Id: I94f3d52f5417671f967d2accb28a04a3408e9b99
Suggested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video...
Praneeth Bajjuri [Tue, 18 Mar 2014 21:28:39 +0000 (16:28 -0500)]
Merge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video:
  v4l: ti-vps: vip: Use a more safer api for releasing v4l fh
  v4l: ti-vps: vip: Register the video device only if sensor is probed

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Tue, 18 Mar 2014 21:00:27 +0000 (16:00 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  v4l: ti-vps: vip: Use a more safer api for releasing v4l fh
  v4l: ti-vps: vip: Register the video device only if sensor is probed

7 years agov4l: ti-vps: vip: Use a more safer api for releasing v4l fh
Sundar Raman [Tue, 18 Mar 2014 20:27:10 +0000 (15:27 -0500)]
v4l: ti-vps: vip: Use a more safer api for releasing v4l fh

v4l2_fh_del is not NULL safe and crashes if fh is NULL.
Use v4L2_fh_release which checks for NULL and hence more
safer. In addition, it also calls v4l2_fh_exit internally
and as it is saves an additional invocation in code.

Change-Id: I270853d655bc611e35ac886e640860bd965675d4
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agov4l: ti-vps: vip: Register the video device only if sensor is probed
Sundar Raman [Tue, 18 Mar 2014 20:23:23 +0000 (15:23 -0500)]
v4l: ti-vps: vip: Register the video device only if sensor is probed

The V4L devices should be registered only if the sensor is probed.
Move the registration logic to async bound callback from sensor
so that we are sure that the sensor is present before registering
the device.

Change-Id: Iaff635af794a42fe3a0c9ca7f9385314d4cd318e
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agonet: cpsw: fix cpdma rx descriptor leak on down interface
Schuyler Patton [Tue, 18 Mar 2014 17:51:58 +0000 (12:51 -0500)]
net: cpsw: fix cpdma rx descriptor leak on down interface

This patch fixes a CPDMA RX Descriptor leak that occurs after taking
the interface down when the CPSW is in Dual MAC mode. Previously
the CPSW_ALE port was left open up which causes packets to be received
and processed by the RX interrupt handler and were passed to the
non active network interface where they were ignored.

The fix is for the slave_stop function of the selected interface
to disable the respective CPSW_ALE Port from forwarding packets. This
blocks traffic from being received on the inactive interface.

Change-Id: Ic0cdc4d9392127db36423d6f33f67be431d0a4e1
Signed-off-by: Schuyler Patton <spatton@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: extcon: fix: invoke kthread after extcon dev registration
Ravi Babu [Fri, 7 Mar 2014 08:05:47 +0000 (13:35 +0530)]
usb: extcon: fix: invoke kthread after extcon dev registration

this patch fixes the bug where usbvid polling thread invoked
before the extcon device registration.

Change-Id: I9ab0b37cca04463c9f3b6fb87ddeaedc421c8274
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video...
Praneeth Bajjuri [Mon, 17 Mar 2014 03:28:39 +0000 (22:28 -0500)]
Merge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video:
  v4l: ti-vps: vip: switch verbose log from error to debug

Change-Id: I7f6e5967c34c8980c76c8b4529188abb13c704d2
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Sundar Raman [Sun, 16 Mar 2014 20:52:13 +0000 (15:52 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  v4l: ti-vps: vip: switch verbose log from error to debug

7 years agov4l: ti-vps: vip: switch verbose log from error to debug
Sundar Raman [Fri, 14 Mar 2014 19:02:26 +0000 (14:02 -0500)]
v4l: ti-vps: vip: switch verbose log from error to debug

Every time there are no free buffers in the driver, an error
message is constantly printed in the kernel console. This hogs
the cpu and thus slows down the entire system. Switch this print
to debug so that it can be enabled only whenever it's required.

Change-Id: I04ce1eec19b06ca11279303f840c268690e08785
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoti81xx: enable multiple retries for SATA link reset.
Sriramakrishnan A G [Thu, 24 Oct 2013 06:33:27 +0000 (12:03 +0530)]
ti81xx: enable multiple retries for SATA link reset.

On ti81xx, the sata module doesnt always establish link with
Gen3 SATA HDDs. Added retry logic, which will attempt multiple
retries for Link at 3Gbps speed and then drop down to 1.5 Gbps
mode after that.

Even with this patch some Gen3 HDDs may fail to establish link.

Change-Id: Ic7dc2750b3302a0e2e5f43846e8e2dc6e21445fc
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agousb: dra7x: omap2plus defconfig update to enable dwc3 usb configuration
Ravi Babu [Tue, 4 Mar 2014 11:31:03 +0000 (17:01 +0530)]
usb: dra7x: omap2plus defconfig update to enable dwc3 usb configuration

update the omap2plus_defconfig to enable dwc3 usb and its dependent modules
following configs are enabled for dwc3 usb configuration
CONFIG_USB_DWC3_DUAL_ROLE=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_EXTCON=y
CONFIG_OF_EXTCON=y
CONFIG_EXTCON_GPIO_USBVID=y

Change-Id: Ieb9701545bf398d51d346c5f97eac416144830eb
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: DT: configure usb1 to peripheral-mode and usb2 to host mode (Android Confi...
Ravi Babu [Tue, 4 Mar 2014 11:04:39 +0000 (16:34 +0530)]
usb: dwc3: DT: configure usb1 to peripheral-mode and usb2 to host mode (Android Configuration)

Android kernel uses usb1 as peripheral mode and usb2 as host mode.
update the Device tree for dra7xx/omap5 as android usb configuration.

Change-Id: I60d46a00c6c99871852b807fba3aa15fde489475
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: omap5-DT: set dr_mode to otg for DRD omap5 configuration
Ravi Babu [Mon, 3 Mar 2014 16:05:17 +0000 (21:35 +0530)]
usb: dwc3: omap5-DT: set dr_mode to otg for DRD omap5 configuration

udpate the DT to enable the DRD mode for omap5-dwc3

Change-Id: Id02d6b9abbfe862a8e8dcbe65efbddae2537500d
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: dra7x-DT: set dr_mode to otg for DRD dra7xx configuration
Ravi Babu [Tue, 4 Mar 2014 08:48:27 +0000 (14:18 +0530)]
usb: dwc3: dra7x-DT: set dr_mode to otg for DRD dra7xx configuration

udpate the DT to enable the DRD mode for dra7x-dwc3
adding dr_mode at dwc31 usbss to configure extcon usage

Change-Id: I0f63b1c991e446f16c9c2e503a2888039327fb8e
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoextcon: usb: adding extcon support for dynamic usb-id detection by polling
Ravi Babu [Mon, 3 Mar 2014 15:16:41 +0000 (20:46 +0530)]
extcon: usb: adding extcon support for dynamic usb-id detection by polling

Adding extcon suppport for dynamic usb-id detection by polling mechanism
in the interval of 2 seconds.

Change-Id: I0069a3a630456cf88f378eae21816d5d2593bbc9
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: dwc3-omap: Adding extcon support for dynamic usb cable detection
Ravi Babu [Mon, 3 Mar 2014 14:36:52 +0000 (20:06 +0530)]
usb: dwc3: dwc3-omap: Adding extcon support for dynamic usb cable detection

Adding extcon support for dynamic detection of usb cable detection
and initialize the usb-modes accordingly.

Change-Id: Ie9c671eba0414bdfc9ba4a69cd6d8e53eb5394b5
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agogpio: pcf857x: call the gpio user handler iff gpio_to_irq is done
Ravi Babu [Thu, 20 Feb 2014 11:21:39 +0000 (16:51 +0530)]
gpio: pcf857x: call the gpio user handler iff gpio_to_irq is done

For pcf857x driver if the initial state is not set properly (proper
n_latch is not passed), we get bad irq prints on console.
We get this only for the first interrupt and doesnot repeat for further
interrupts unles and until there are other gpio pins which are not flipping
continously.

following prints are seen on console.

[   40.983924] irq 0, desc: ce004080, depth: 1, count: 0, unhandled: 0
[   40.990511] ->handle_irq():  c00aa538, handle_bad_irq+0x0/0x260
[   40.996768] ->irq_data.chip(): c080b6ec, no_irq_chip+0x0/0x60
[   41.002842] ->action():   (null)
[   41.006242]    IRQ_NOPROBE set
[   41.009465]  IRQ_NOREQUEST set

Change-Id: I31aaad42257bb445aa4b620320e0e72279692c2b
Signed-off-by: George Cherian <george.cherian@ti.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dra7x: DT: adding DT support for dynamic usb-id pin detection
Ravi Babu [Tue, 4 Mar 2014 11:55:57 +0000 (17:25 +0530)]
usb: dra7x: DT: adding DT support for dynamic usb-id pin detection

In dra7x, the usb-id pin connected though gpio i2c expander.
This patch adds necessary DT support to enable dynamic
usb id pin detection based on the A-type or B-type cable
is inserted.

Change-Id: I1f05fa3f966b684ed8e381a850e8636d7d186d7b
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoextcon: Add an API to get extcon device from dt node
Ravi Babu [Thu, 13 Feb 2014 11:02:34 +0000 (16:32 +0530)]
extcon: Add an API to get extcon device from dt node

Added an API of_extcon_get_extcon_dev() to be used by drivers to get
extcon device in the case of dt boot (this can be used instead of
extcon_get_extcon_dev()).

Change-Id: I781fd61f9d89107df611379b1148a0ad5ee93994
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoextcon: extcon-gpio-usbvid: Generic USB VBUS/ID detection via GPIO
Ravi Babu [Mon, 3 Feb 2014 08:21:54 +0000 (13:51 +0530)]
extcon: extcon-gpio-usbvid: Generic USB VBUS/ID detection via GPIO

Add a generic USB VBUS/ID detection EXTCON driver. This driver expects
the ID/VBUS pin are connected via GPIOs. This driver is tested on
DRA7x board were the ID pin is routed via GPIOs. The driver supports
both VBUS and ID pin configuration and ID pin only configuration.

Change-Id: I94188899a55b22da6a7485307011c3646222774b
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: dra7xx: control drvvbus for usb1/2 using gpio6
Ravi Babu [Mon, 3 Mar 2014 14:10:37 +0000 (19:40 +0530)]
usb: dwc3: dra7xx: control drvvbus for usb1/2 using gpio6

-drive the drvvbus using gpio control
-by default the VBUS is set high

Change-Id: Icdd3a6ab0f45c93db16278cdb7aa53bc653e35d8
Signed-off-by: Shankar Rao <shankar.nrao@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: core: Adding support for dwc3 DRD support
Ravi Babu [Mon, 3 Mar 2014 14:02:11 +0000 (19:32 +0530)]
usb: dwc3: core: Adding support for dwc3 DRD support

Adding support for dwc3 DRD support.

Change-Id: Ic7ee04a0904b173586bdb4259f74a781ab63de84
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: debugfs: dual role switch through debugfs entries
Ravi Babu [Mon, 3 Mar 2014 13:51:50 +0000 (19:21 +0530)]
usb: dwc3: debugfs: dual role switch through debugfs entries

dual role switch through debugfs entries
usage:
1) mount debugfs
        # mount -t debugfs debugfs /mnt

2) To switch usb1 to device/host mode
        # echo "device" > /mnt/4889000.dwc3/mode
        # echo "host" > /mnt/4889000.dwc3/mode

3) To switch usb2 to device/host mode
        # echo "device" > /mnt/488d000.dwc3/mode
        # echo "host" > /mnt/488d000.dwc3/mode

To switch to device mode: make sure previous mode is host.
To switch to host mode: make sure previous mode is device.

Change-Id: I3fcecd59cd4910efe38d54d7196b8686a00f1e87
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: omap5: adding device tree support to otg interrupts
Ravi Babu [Thu, 21 Nov 2013 06:12:26 +0000 (11:42 +0530)]
usb: dwc3: omap5: adding device tree support to otg interrupts

Adding DT support to handle otg interrupts for omap5 platform

Change-Id: I19e82e545b361ecffb973308dc7623afd3ad66af
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: dra7x: adding device tree support to otg interrupts
Ravi Babu [Tue, 28 Jan 2014 12:30:42 +0000 (18:00 +0530)]
usb: dwc3: dra7x: adding device tree support to otg interrupts

Adding DT support to handle otg interrupts for dra7x platform

Change-Id: Ic3347d1faed5809cc8f8c42615f50088dad1eb64
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: dwc3-omap: handle pm_runtime_enable/get_sync errors properly
Ravi Babu [Mon, 3 Mar 2014 12:55:28 +0000 (18:25 +0530)]
usb: dwc3: dwc3-omap: handle pm_runtime_enable/get_sync errors properly

handle the pm_runtime_enable() & pm_runtime_get_sync() errors
properly in the driver otherwise leads to unstable enabling of
pm-runtime clocks.

Change-Id: I790790b80eebdd532470a463a8fda07fb7555c8b
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: drd: adding usb-id handler to support drd
Ravi Babu [Mon, 3 Mar 2014 12:48:52 +0000 (18:18 +0530)]
usb: dwc3: drd: adding usb-id handler to support drd

adding usbid handler to update the utmi status based
on the usb-mode is device or host to support dual role

Change-Id: I352898814faed8aed66e4165270bbd067850dc98
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: omap: make the dwc3 wrapper interrupt shared
Ravi Babu [Tue, 12 Nov 2013 13:20:32 +0000 (18:50 +0530)]
usb: dwc3: omap: make the dwc3 wrapper interrupt shared

The dwc3 wrapper interrupt is made as shared interrupt to
handle the otg events

Change-Id: Id1a51414ada74b4c6e71c0a87047f4fbccbadd4f
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb:dwc3:otg: Add the initial otg driver fro dwc3.
Ravi Babu [Tue, 12 Nov 2013 13:13:10 +0000 (18:43 +0530)]
usb:dwc3:otg: Add the initial otg driver fro dwc3.

this supports only the DRD mode as of now.

Change-Id: Ia738211b9dad8d49cbed3775f2a3db32487f90b9
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: gadget: generate completion events for every TRBs queued for ep
Ravi Babu [Mon, 30 Dec 2013 06:19:03 +0000 (11:49 +0530)]
usb: dwc3: gadget: generate completion events for every TRBs queued for ep

generate the TRB completion for every TRB boundary either on short packet
on TRB length data is received.

Change-Id: I7fa5150a375fe81264ae236007174398d99d70ae
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: device: added device suspend callback support
Ravi Babu [Tue, 17 Dec 2013 13:01:02 +0000 (18:31 +0530)]
usb: dwc3: device: added device suspend callback support

-when the device is disconnect the controller enter U3 state
and generates suspend event.
-adding support to invoke device suspend callback during
 device disconnect.

Change-Id: Ib7de000853160be0d79aeaeb994c1bd12f8a10c0
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: dwc3: gadget: Add start_peripheral and stop_peripheral
Ravi Babu [Wed, 6 Nov 2013 11:54:57 +0000 (17:24 +0530)]
usb: dwc3: gadget: Add start_peripheral and stop_peripheral

Add start_peripheral and stop_peripheral API's
for otg driver to call.

Also refactor dwc3_gadget_start function.

Signed-off-by: George Cherian <george.cherian@ti.com>
Subject: [PATCH 06/12] usb: dwc3: gadget: Add start_peripheral and stop_peripheral

Add start_peripheral and stop_peripheral API's
for otg driver to call.

Also refactor dwc3_gadget_start function.

Change-Id: Ib52b6e16b3030dbd43dc65f2ab6e0451eda4fdf9
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoThis adds OTG support to the xhci driver, specifically for the Synopsys PCI controlle...
Ravi Babu [Wed, 6 Nov 2013 07:57:55 +0000 (13:27 +0530)]
This adds OTG support to the xhci driver, specifically for the Synopsys PCI controller, but the code should be reusable for other controllers.

The Synopsys controller requires disabling the host mode driver when
switching to peripheral mode, then re-enabling it when switching
back to host mode. We do that by calling usb_remove_hcd() /
usb_add_hcd().

This requires a small change to usb_hcd_pci_remove(), to test
whether usb_remove_hcd() has already been called and so should not
be called again when the driver is unloaded. We use the
hcd->rh_pollable flag for this

Change-Id: I6ec6b600506d2d5e4781d800c06739133b71b702
Signed-off-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agousb: xhci: fix up deallocation code
Ravi Babu [Wed, 6 Nov 2013 07:43:20 +0000 (13:13 +0530)]
usb: xhci: fix up deallocation code

This fixes up the deallocation code in the xhci driver, so that
usb_add_hcd()/usb_remove_hcd() can be called repeatedly without
crashing
From: Paul Zimmerman <Paul.Zimmerman@synopsys.com>

Change-Id: Ia1c2a9887b3f709eb970b5a50af52c14044d787c
Signed-off-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y/audio-for-next' of git.ti.com:android-sdk/kernel-audio...
Praneeth Bajjuri [Fri, 14 Mar 2014 20:41:51 +0000 (15:41 -0500)]
Merge branch 'p-ti-linux-3.8.y/audio-for-next' of git.ti.com:android-sdk/kernel-audio into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y/audio-for-next' of git.ti.com:android-sdk/kernel-audio:
  ASoC: tlv320aic3x: Output on both (L&R) channels for mono
  ASoC: DRA7: dra7-evm: Add sample rate constraints
  ASoC: DRA7: dra7-evm: Warn if DAI sel gpio is not present

Change-Id: I6119d673189ea078d3c8cb309f45b6972b9eae05
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoASoC: tlv320aic3x: Output on both (L&R) channels for mono
Harinarayan Bhatta [Thu, 13 Mar 2014 04:41:02 +0000 (10:11 +0530)]
ASoC: tlv320aic3x: Output on both (L&R) channels for mono

Configure the CODEC to feed the left channel input data
to the Left and Right DACs for mono streams (mono-to-stereo).

Change-Id: I828f4347cc5dba69e8f3a32c5cfec754a11ad656
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
7 years agoASoC: DRA7: dra7-evm: Add sample rate constraints
Misael Lopez Cruz [Thu, 13 Mar 2014 19:58:20 +0000 (14:58 -0500)]
ASoC: DRA7: dra7-evm: Add sample rate constraints

The number of slots and the high-freq clock (AHCLKX) supplied
to McASP are fixed, so the supported samples rates are those
whose BCLK rate is an integer multiple of the high-freq clock.

An ALSA constraint is being added to reflect above restriction
instead of just returning an error.

Change-Id: I4687f5da7f4ac8047167991619dbf765f0031bc7
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: DRA7: dra7-evm: Warn if DAI sel gpio is not present
Misael Lopez Cruz [Tue, 11 Mar 2014 18:27:06 +0000 (13:27 -0500)]
ASoC: DRA7: dra7-evm: Warn if DAI sel gpio is not present

DAI sel gpio pin is driven by the pcf8575 which is on i2c2
bus. This bus shares pins with HDMI in DRA7 EVM, so the
DAI sel gpio request fails if HDMI is using the shared pins.

The default state for the gpio pin in the pcf8575 sets the
DAI sel switch to the correct state, so the gpio request
error is now treated just as a warning.

Change-Id: Ia713ae70c10287bd2c26b740694790618c5fe1ef
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoarm: dts: dra7-evm: fix boot failure
Praneeth Bajjuri [Fri, 14 Mar 2014 03:59:31 +0000 (22:59 -0500)]
arm: dts: dra7-evm: fix boot failure

dra7-evm fails to boot due to introduction of bug by
dra7_pmx_core: pinctrl-0 with mmc1_pins
commit e5c5e3c
arm: dts: dra7xx: The SD/MMC card detect gpio has been added.

this patch fixes boot failure.

Change-Id: Ie3f21817a16e6bff8e6120c0accfaf281d50c8df
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoarm: dts: dra7xx: The SD/MMC card detect gpio has been added.
Ravikumar Kattekola [Fri, 28 Feb 2014 03:52:19 +0000 (09:22 +0530)]
arm: dts: dra7xx: The SD/MMC card detect gpio has been added.

In order to use the hot swap feature, the gpio6_27 has been
added to detect the presence of the card.

The mentioned fix is needed for DRA7 evm Rev E onwards

Change-Id: Iebab30370ee4dc129c6e29fa89603f9930a4ea4d
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
Signed-off-by: Ravikumar Kattekola <rk@ti.com>
[minor fix in commit msg and dra7-evm.dts]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoDT: export of_get_next_parent() for use by modules: fix modular V4L2
Guennadi Liakhovetski [Tue, 2 Apr 2013 15:28:11 +0000 (12:28 -0300)]
DT: export of_get_next_parent() for use by modules: fix modular V4L2

Currently modular V4L2 build with enabled OF is broken dur to the
of_get_next_parent() function being unavailable to modules. Export it to
fix the build.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7 years agoMerge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video...
Vishal Mahaveer [Wed, 12 Mar 2014 00:20:32 +0000 (19:20 -0500)]
Merge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video:
  ti-ec: Adds the vip_s_fmt_vid_cap API
  v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
  i2c: fpdlink: camera: Add fpdlink camera driver
  v4l: ti-vps: vip: Add support for RGB capture
  v4l: ti-vps: vpdma: Set background color
  arm: dts: dra7xx: Add d16-d23 for vin1a
  arm: dts: dra7xx: Device tree node for tvp5158
  i2c: ov1063x: Free gpios after use
  i2c: tvp5158: Analog camera Driver Support
  v4l: ti-vps: vip: Configure parser for chosen sensor
  v4l: ti-vps: vip: Functions for setting parser props
  v4l: ti-vps: vip: Parse sensor endpoints in probe
  arm: dts: dra7xx: Endpoint nodes for vip and i2c
  v4l: of: New property to specify number of channels
  v4l: of: Drop acquired reference to node when getting next endpoint
  v4l: of: Use of_get_child_by_name()
  V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
  Add a V4L2 OF parser
  Add common video interfaces OF bindings documentation

Change-Id: I3aa539caf5336a8f0d4fb1abf0e8bc11340f94d1
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Arthur Philpott [Wed, 12 Mar 2014 00:07:44 +0000 (19:07 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  ti-ec: Adds the vip_s_fmt_vid_cap API
  v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
  i2c: fpdlink: camera: Add fpdlink camera driver
  v4l: ti-vps: vip: Add support for RGB capture
  v4l: ti-vps: vpdma: Set background color
  arm: dts: dra7xx: Add d16-d23 for vin1a
  arm: dts: dra7xx: Device tree node for tvp5158
  i2c: ov1063x: Free gpios after use
  i2c: tvp5158: Analog camera Driver Support
  v4l: ti-vps: vip: Configure parser for chosen sensor
  v4l: ti-vps: vip: Functions for setting parser props
  v4l: ti-vps: vip: Parse sensor endpoints in probe
  arm: dts: dra7xx: Endpoint nodes for vip and i2c
  v4l: of: New property to specify number of channels
  v4l: of: Drop acquired reference to node when getting next endpoint
  v4l: of: Use of_get_child_by_name()
  V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
  Add a V4L2 OF parser
  Add common video interfaces OF bindings documentation

7 years agoti-ec: Adds the vip_s_fmt_vid_cap API
Arthur Philpott [Tue, 11 Mar 2014 23:17:38 +0000 (18:17 -0500)]
ti-ec: Adds the vip_s_fmt_vid_cap API

This patch is a temporary patch that hard codes
the parameters expected for an omnivision sensor
and passes those parameters to the vip_s_fmt_vid_cap
API

Change-Id: I8d7b50dc7b8efa01d54dec30bb3a0d94bd53936e
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agov4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
Arthur Philpott [Tue, 11 Mar 2014 23:16:16 +0000 (18:16 -0500)]
v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API

This patch exports the vip_s_fmt_vid_cap API which
is needed by earlycamera module to ensure that the
proper GPIOs are configured for the appropriate
sensor.

Change-Id: I2b496622115cd1ce35d0355445368089bd8c6ab9
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoi2c: fpdlink: camera: Add fpdlink camera driver
Nikhil Devshatwar [Mon, 10 Mar 2014 18:12:08 +0000 (23:42 +0530)]
i2c: fpdlink: camera: Add fpdlink camera driver

It is possible to use output of FPDLink display as a camera
if it is connected to the deserializer of JAMR3 board.
Deserializer output is given to Vin1a

As, VIP can communicate with only subdevices, we need a subdevice to
use the fpdlink display as camera.

This patch adds a device tree node for the camera and the compatible driver.
The i2c driver for the fpdlink camera only registers a v4l2 subdevice
The display can be looped back from the same EVM or can come externally
via the FPDLink. In any case, deserializer configuration is done at the
remote end (serializer side), so this driver won't configure the deserializer.

Change-Id: I910aff26ff31444c38afda8fe5acd59ee2d8ec8f
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Add support for RGB capture
Nikhil Devshatwar [Mon, 10 Mar 2014 11:32:27 +0000 (17:02 +0530)]
v4l: ti-vps: vip: Add support for RGB capture

Add ARGB capture format (32 bits including alpha)
Corrected channel number to be used for RGB capture
Allow setting RGB_LO mux select from the slice

Currently, CSC is not enabled, so input and output formats are same
For now, RGB capture is only passthrough mode.

Change-Id: Ic8b2256607b0df21b7e34e58634b1de367d1d74a
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: Set background color
Nikhil Devshatwar [Thu, 27 Feb 2014 09:54:24 +0000 (15:24 +0530)]
v4l: ti-vps: vpdma: Set background color

If a VPDMA client doesn't provide data for any component, it is taken from
the background color register. e.g. for ARGB capture, alpha component
is not provided by VIP client.

VPDMA picks the value from this registers and repeats for all the pixels.

Change-Id: Ib61f7d632356492efa6479d4639b408d38c895db
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Add d16-d23 for vin1a
Nikhil Devshatwar [Fri, 7 Mar 2014 10:39:19 +0000 (16:09 +0530)]
arm: dts: dra7xx: Add d16-d23 for vin1a

For RGB capture to work, vin1a should be configured for 24bit interface
The d16-d23 pins conflict with vin2a pins
By default, this is commented, if using RGB camera, enable this and
disable the vin2a pins

Change-Id: Ia448b7c1d87584a2d083a2741931480f0789211a
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Device tree node for tvp5158
Sathishkumar S [Wed, 5 Mar 2014 14:57:05 +0000 (20:27 +0530)]
arm: dts: dra7xx: Device tree node for tvp5158

Add a dts entry for TVP5158 video decoder chip.

Change-Id: I183ddd42a4aa3cf621b66fc5c93c83a5924be60d
Signed-off-by: Sathishkumar S <sathish.omap@gmail.com>
7 years agoi2c: ov1063x: Free gpios after use
Sathishkumar S [Fri, 28 Feb 2014 11:16:35 +0000 (16:46 +0530)]
i2c: ov1063x: Free gpios after use

Request gpios with appropriate settings and
free them after use for other drivers, as
there are multiple sensors sharing the gpios

Change-Id: If2206fac8673dc8915e34da32d544e2b04e30c33
Signed-off-by: Sathishkumar S <sathish.omap@gmail.com>
7 years agoi2c: tvp5158: Analog camera Driver Support
Sathishkumar S [Tue, 25 Feb 2014 07:12:56 +0000 (12:42 +0530)]
i2c: tvp5158: Analog camera Driver Support

Add support for TVP5158 video decoder. This driver
does the default initialization for single channel
NTSC decode. It is tested with NTSC camera source.

Change-Id: Ida5a9b45414a917bd6f515882fe72a4b4b8e0947
Signed-off-by: Sathishkumar S <sathish.omap@gmail.com>
7 years agov4l: ti-vps: vip: Configure parser for chosen sensor
Nikhil Devshatwar [Thu, 27 Feb 2014 17:17:12 +0000 (22:47 +0530)]
v4l: ti-vps: vip: Configure parser for chosen sensor

Whenever a sensor (v4l2_subdev) is bound via async notifier,
save check the priority based on the index in the array

Maintain a pointer to the v4l2_endpoint of the chosen sensor in vip_dev
Added a new function to setup the parser according to the way sensor
interface is described in endpoint

Cuurently, only BT656 and parallel busses are suppoted
Following properties are set:
- hsync, vsync, actvid, pclk polarities
- Port interfaces and sync typei

Change-Id: Ib60a99d0901f69e72aff21cf0e12f23457b5f6a4
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Functions for setting parser props
Nikhil Devshatwar [Thu, 27 Feb 2014 17:14:02 +0000 (22:44 +0530)]
v4l: ti-vps: vip: Functions for setting parser props

Add helper functions for configuring the parser so that
pixel clock sampling and hsync method(using actvid) can be set

Change-Id: I0ff8d10345ac6024633279e5abfd509269b064c9
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Parse sensor endpoints in probe
Nikhil Devshatwar [Tue, 18 Feb 2014 08:24:50 +0000 (13:54 +0530)]
v4l: ti-vps: vip: Parse sensor endpoints in probe

Modified of_probe to iterate over all endpoints
Get the i2c address of the sensors (parent nodes of remote-endpoint)
Save all the parsed data in the v4l2_of_endpoint

Change-Id: I6290d1f8ae28aabc6d64a7ce2d3f1e1a774530b8
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Endpoint nodes for vip and i2c
Nikhil Devshatwar [Tue, 18 Feb 2014 06:00:32 +0000 (11:30 +0530)]
arm: dts: dra7xx: Endpoint nodes for vip and i2c

Following the binding doc video-interfaces
Every VIP has some ports - 0A and 1A
Every port can have multiple endpoints - one can be chosen to use

Added ports and endpoint nodes for all the sensor nodes
Sensor endpoints specify the interface used - hsync, vsync, etc
Order of endpoints still decides the priority

Change-Id: Ibcce7f477795942f60df2702444c4ae6fb185143
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>