Re: [PATCH v9 13/13] V4L: Add driver for s5k4e5 image sensor

2013-10-17 Thread Arun Kumar K
Hi Sylwester,

On Thu, Oct 17, 2013 at 10:40 PM, Sylwester Nawrocki
 wrote:
> On 27/09/13 12:59, Arun Kumar K wrote:
>> This patch adds subdev driver for Samsung S5K4E5 raw image sensor.
>> Like s5k6a3, it is also another fimc-is firmware controlled
>> sensor. This minimal sensor driver doesn't do any I2C communications
>> as its done by ISP firmware. It can be updated if needed to a
>> regular sensor driver by adding the I2C communication.
>>
>> Signed-off-by: Arun Kumar K 
>> Reviewed-by: Sylwester Nawrocki 
>> ---
>>  .../devicetree/bindings/media/i2c/s5k4e5.txt   |   45 +++
>>  drivers/media/i2c/Kconfig  |8 +
>>  drivers/media/i2c/Makefile |1 +
>>  drivers/media/i2c/s5k4e5.c |  347 
>> 
>>  4 files changed, 401 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
>>  create mode 100644 drivers/media/i2c/s5k4e5.c
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt 
>> b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
>> new file mode 100644
>> index 000..0fca087
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
>
> Could you make a separate patch adding DT binding only ?
> And can you please rename this file to:
> Documentation/devicetree/bindings/media/samsung-s5k4e5.txt, like
> it's done in case of other sensors ?

Ok will do that.

>
> Should I apply patches 02...11/13 already or would you like send
> the whole series updated ? AFAICS there are minor things pointed
> out by Hans not addressed yet ?

Yes I will send the full series with the review comments addressed.

Regards
Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 13/13] V4L: Add driver for s5k4e5 image sensor

2013-10-17 Thread Sylwester Nawrocki
On 27/09/13 12:59, Arun Kumar K wrote:
> This patch adds subdev driver for Samsung S5K4E5 raw image sensor.
> Like s5k6a3, it is also another fimc-is firmware controlled
> sensor. This minimal sensor driver doesn't do any I2C communications
> as its done by ISP firmware. It can be updated if needed to a
> regular sensor driver by adding the I2C communication.
> 
> Signed-off-by: Arun Kumar K 
> Reviewed-by: Sylwester Nawrocki 
> ---
>  .../devicetree/bindings/media/i2c/s5k4e5.txt   |   45 +++
>  drivers/media/i2c/Kconfig  |8 +
>  drivers/media/i2c/Makefile |1 +
>  drivers/media/i2c/s5k4e5.c |  347 
> 
>  4 files changed, 401 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
>  create mode 100644 drivers/media/i2c/s5k4e5.c
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt 
> b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
> new file mode 100644
> index 000..0fca087
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt

Could you make a separate patch adding DT binding only ?
And can you please rename this file to:
Documentation/devicetree/bindings/media/samsung-s5k4e5.txt, like
it's done in case of other sensors ?

Should I apply patches 02...11/13 already or would you like send 
the whole series updated ? AFAICS there are minor things pointed 
out by Hans not addressed yet ?

Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v9 13/13] V4L: Add driver for s5k4e5 image sensor

2013-09-27 Thread Arun Kumar K
This patch adds subdev driver for Samsung S5K4E5 raw image sensor.
Like s5k6a3, it is also another fimc-is firmware controlled
sensor. This minimal sensor driver doesn't do any I2C communications
as its done by ISP firmware. It can be updated if needed to a
regular sensor driver by adding the I2C communication.

Signed-off-by: Arun Kumar K 
Reviewed-by: Sylwester Nawrocki 
---
 .../devicetree/bindings/media/i2c/s5k4e5.txt   |   45 +++
 drivers/media/i2c/Kconfig  |8 +
 drivers/media/i2c/Makefile |1 +
 drivers/media/i2c/s5k4e5.c |  347 
 4 files changed, 401 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
 create mode 100644 drivers/media/i2c/s5k4e5.c

diff --git a/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt 
b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
new file mode 100644
index 000..0fca087
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
@@ -0,0 +1,45 @@
+* Samsung S5K4E5 Raw Image Sensor
+
+S5K4E5 is a raw image sensor with maximum resolution of 2560x1920
+pixels. Data transfer is carried out via MIPI CSI-2 port and controls
+via I2C bus.
+
+Required Properties:
+- compatible   : must be "samsung,s5k4e5"
+- reg  : I2C device address
+- reset-gpios  : specifier of a GPIO connected to the RESET pin
+- clocks   : should contain the sensor's EXTCLK clock specifier, from
+ the common clock bindings
+- clock-names  : should contain "extclk" entry
+- svdda-supply : core voltage supply
+- svddio-supply: I/O voltage supply
+
+Optional Properties:
+- clock-frequency : the frequency at which the "extclk" clock should be
+   configured to operate, in Hz; if this property is not
+   specified default 24 MHz value will be used
+
+The device node should be added to respective control bus controller
+(e.g. I2C0) nodes and linked to the csis port node, using the common
+video interfaces bindings, defined in video-interfaces.txt.
+
+Example:
+
+   i2c-isp@1313 {
+   s5k4e5@20 {
+   compatible = "samsung,s5k4e5";
+   reg = <0x20>;
+   reset-gpios = <&gpx1 2 1>;
+   clock-frequency = <2400>;
+   clocks = <&clock 129>;
+   clock-names = "extclk"
+   svdda-supply = <...>;
+   svddio-supply = <...>;
+   port {
+   is_s5k4e5_ep: endpoint {
+   data-lanes = <1 2 3 4>;
+   remote-endpoint = <&csis0_ep>;
+   };
+   };
+   };
+   };
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index f7e9147..271028b 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -572,6 +572,14 @@ config VIDEO_S5K6A3
  This is a V4L2 sensor-level driver for Samsung S5K6A3 raw
  camera sensor.
 
+config VIDEO_S5K4E5
+   tristate "Samsung S5K4E5 sensor support"
+   depends on MEDIA_CAMERA_SUPPORT
+   depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && OF
+   ---help---
+ This is a V4L2 sensor-level driver for Samsung S5K4E5 raw
+ camera sensor.
+
 config VIDEO_S5K4ECGX
 tristate "Samsung S5K4ECGX sensor support"
 depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index cf3cf03..0aeed8e 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
 obj-$(CONFIG_VIDEO_NOON010PC30)+= noon010pc30.o
 obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o
 obj-$(CONFIG_VIDEO_S5K6A3) += s5k6a3.o
+obj-$(CONFIG_VIDEO_S5K4E5) += s5k4e5.o
 obj-$(CONFIG_VIDEO_S5K4ECGX)   += s5k4ecgx.o
 obj-$(CONFIG_VIDEO_S5C73M3)+= s5c73m3/
 obj-$(CONFIG_VIDEO_ADP1653)+= adp1653.o
diff --git a/drivers/media/i2c/s5k4e5.c b/drivers/media/i2c/s5k4e5.c
new file mode 100644
index 000..639062b
--- /dev/null
+++ b/drivers/media/i2c/s5k4e5.c
@@ -0,0 +1,347 @@
+/*
+ * Samsung S5K4E5 image sensor driver
+ *
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ * Author: Arun Kumar K 
+ *
+ * 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.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define S5K4E5_SENSOR_MAX_WIDTH2576
+#define S5K4E5_SENSOR_MAX_HEIGHT   1930
+
+#define S5K4E5_SENSOR_ACTIVE_WIDTH 2560
+#define S5K4E5_SENSOR