Re: [PATCH] Asoc: Samsung: I2S: Add support for runtime S2R

2013-01-30 Thread Mark Brown
On Wed, Jan 30, 2013 at 05:41:04PM +0530, R. Chandrasekar wrote:
> From: "R. Chandrasekar" 
> 
> This patch adds runtime suspend to resume support for I2S.
> I2S clk is disabled at suspend and enabled at resume.

Applied, thanks.  Please use subject lines appropriate to the subsystem
and keep your signoffs in order:

> Signed-off-by: R. Chandrasekar 
> Signed-off-by: Padmavathi Venna 


signature.asc
Description: Digital signature


Re: [PATCH] Fix compilation error on S3C2440

2013-01-30 Thread Mark Brown
On Wed, Jan 30, 2013 at 03:35:22PM +0600, Alexey Galakhov wrote:
> The commit a08485d8 ("ASoC: Samsung: Do not register samsung audio dma
> device as pdev") introduced compilation error.

Applied, thanks.  Please use subject lines appropriate for the
subsystem and in general follow SubmittingPatches.


signature.asc
Description: Digital signature


Re: [PATCH] regulator: s2mps11: fix incorrect register for buck10

2013-01-30 Thread Mark Brown
On Wed, Jan 30, 2013 at 08:02:27AM -0500, Alim Akhtar wrote:
> For BUCK10 the control registers are wrongly set as buck9 control register
> This patch corrects the control registers for buck10

Applied, thanks.


signature.asc
Description: Digital signature


Re: [PATCH] cpufreq: exynos: Broadcast frequency change notifications for all cores

2013-01-30 Thread Viresh Kumar
On Tue, Nov 13, 2012 at 2:56 PM, Tomasz Figa  wrote:
> On Exynos SoCs all cores share the same frequency setting, so changing
> frequency of one core will affect rest of cores.
>
> This patch modifies the exynos-cpufreq driver to inform cpufreq core
> about this behavior and broadcast frequency change notifications for all
> cores.

> /* When the new frequency is lower than current frequency */
> if ((freqs.new < freqs.old) ||
> @@ -235,6 +237,7 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy 
> *policy)
> cpumask_copy(policy->related_cpus, cpu_possible_mask);
> cpumask_copy(policy->cpus, cpu_online_mask);
> } else {
> +   policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
> cpumask_setall(policy->cpus);

I couldn't understand the use of this change. Can you please explain ?
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] cpufreq: exynos: Fix hang in pm handler due to frequency mismatch

2013-01-30 Thread Jonghwan Choi
When pm handler set freq & voltage, frequency mismatch occurred.
Because freqs.new isn't set in pm handler.

Signed-off-by: Jonghwan Choi 
---
 drivers/cpufreq/exynos-cpufreq.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/exynos-cpufreq.c
b/drivers/cpufreq/exynos-cpufreq.c
index 6d6ba0d..48ee439 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -69,9 +69,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
int ret = 0;
 
freqs.old = policy->cur;
+   freqs.new = target_freq;
freqs.cpu = policy->cpu;
 
-   if (target_freq == freqs.old)
+   if (freqs.new == freqs.old)
goto out;
 
/*
@@ -159,6 +160,7 @@ static int exynos_target(struct cpufreq_policy *policy,
 {
struct cpufreq_frequency_table *freq_table =
exynos_info->freq_table;
unsigned int index;
+   unsigned int new_freq;
int ret = 0;
 
mutex_lock(&cpufreq_lock);
@@ -172,9 +174,9 @@ static int exynos_target(struct cpufreq_policy *policy,
goto out;
}
 
-   freqs.new = freq_table[index].frequency;
+   new_freq = freq_table[index].frequency;
 
-   ret = exynos_cpufreq_scale(freqs.new);
+   ret = exynos_cpufreq_scale(new_freq);
 
 out:
mutex_unlock(&cpufreq_lock);
-- 
1.7.4.1

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


Re: [PATCH RFC v4 01/14] [media] Add common video interfaces OF bindings documentation

2013-01-30 Thread Sylwester Nawrocki

Hi,

On 01/30/2013 01:40 PM, Sylwester Nawrocki wrote:

On 01/25/2013 02:52 AM, Laurent Pinchart wrote:

+Data interfaces on all video devices are described by their child 'port'
+nodes. Configuration of a port depends on other devices participating in
+the data transfer and is described by 'endpoint' subnodes.
+
+dev {
+   #address-cells =<1>;
+   #size-cells =<0>;
+   port@0 {
+   endpoint@0 { ... };
+   endpoint@1 { ... };
+   };
+   port@1 { ... };
+};
+
+If a port can be configured to work with more than one other device on
+the same bus, an 'endpoint' child node must be provided for each of
+them. If more than one port is present in a device node or there is more
+than one endpoint at a port, a common scheme, using '#address-cells',
+'#size-cells' and 'reg' properties is used.


Wouldn't this cause problems if the device has both video ports and a
child bus ? Using #address-cells and #size-cells for the video ports would
prevent the child bus from being handled in the usual way.


Indeed, it looks like a serious issue in these bindings.


A possible solution would be to number ports with a dash instead of a @,
as done in pinctrl for instance. We would then get

port-0 {
endpoint-0 { ... };
endpoint-1 { ... };
};
port-1 { ... };


Another possible solution could be putting the port nodes under
a ports node, for these cases where a device has a child bus.
Where there is no conflict, the ports node could be omitted for
simplicity. Does it sound reasonable ?

device {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
endpoint@0 {
reg = <0>;
};
endpoint@1 { ... };
};
port@1 { ... };
};
};


One problem here is that index of the port or the endpoint node can have
random value and don't need to start with 0, which is the case for the pinctrl
properties. It makes iterating over those nodes more difficult, instead
of using standard functions like of_node_cmp() we would need to search for
sub-strings in the node name.


--

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


[PATCH V2] regulator: add device tree support for s5m8767

2013-01-30 Thread Amit Daniel Kachhap
This device tree support is added for PMIC block of S5m8767 multi
function driver. The usage detail is added in the device tree
documentation section. This change is tested on exynos5250 based
arndale platform by regulator voltage set/get API's.

Reviewed-by: Thomas Abraham 
Signed-off-by: Amit Daniel Kachhap 
---
Change since V1:
* Added description of pmic-buck-ds-gpios and op_mode in the device tree
  documentation as suggested by Thomas Abraham.
* Incorporated coding guidelines review comments.

This patch is based on Mark Brown's tree next branch.
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git

 .../bindings/regulator/s5m8767-regulator.txt   |  152 
 drivers/mfd/sec-core.c |   75 -
 drivers/regulator/s5m8767.c|  188 +++-
 include/linux/mfd/samsung/core.h   |   11 +-
 4 files changed, 419 insertions(+), 7 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt 
b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
new file mode 100644
index 000..a35ff99
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
@@ -0,0 +1,152 @@
+* Samsung S5M8767 Voltage and Current Regulator
+
+The Samsung S5M8767 is a multi-function device which includes volatage and
+current regulators, rtc, charger controller and other sub-blocks. It is
+interfaced to the host controller using a i2c interface. Each sub-block is
+addressed by the host system using different i2c slave address. This document
+describes the bindings for 'pmic' sub-block of s5m8767.
+
+Required properties:
+- compatible: Should be "samsung,s5m8767-pmic".
+- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
+
+- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
+  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
+  for additional information.
+
+- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
+  units for buck3 when changing voltage using gpio dvs. Refer to [1] below
+  for additional information.
+
+- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
+  units for buck4 when changing voltage using gpio dvs. Refer to [1] below
+  for additional information.
+
+- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
+  for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
+
+[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
+property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
+property should specify atleast one voltage level (which would be a
+safe operating voltage).
+
+If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
+property is specified, then all the eight voltage values for the
+'s5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
+
+Optional properties:
+- interrupt-parent: Specifies the phandle of the interrupt controller to which
+  the interrupts from s5m8767 are delivered to.
+- interrupts: Interrupt specifiers for two interrupt sources.
+  - First interrupt specifier is for 'irq1' interrupt.
+  - Second interrupt specifier is for 'alert' interrupt.
+- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
+- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
+- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
+
+Additional properties required if either of the optional properties are used:
+
+- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
+  the possible 8 options selectable by the dvs gpios. The value of this
+  property should be between 0 and 7. If not specified or if out of range, the
+  default value of this property is set to 0.
+
+- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
+  for dvs. The format of the gpio specifier depends in the gpio controller.
+
+Regulators: The regulators of s5m8767 that have to be instantiated should be
+included in a sub-node named 'regulators'. Regulator nodes included in this
+sub-node should be of the format as listed below.
+
+   regulator_name {
+   ldo1_reg: LDO1 {
+   regulator-name = "VDD_ALIVE_1.0V";
+   regulator-min-microvolt = <110>;
+   regulator-max-microvolt = <110>;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = <1>; /* Normal Mode */
+   };
+   };
+The above regulator entries are defined in regulator bindings documentation
+except op_mode description.
+   - op_mode: describes the different operating modes of the LDO's with
+   power mode cha

Re: [PATCH v4 4/7] ARM: Exynos: allow dt based discovery of mct controller using clocksource_of_init

2013-01-30 Thread Stephen Warren
On 01/28/2013 01:57 PM, Stephen Warren wrote:
> On 01/21/2013 03:02 AM, Thomas Abraham wrote:
>> Add entries to __clksrc_of_table so that Exynos MCT controller is 
>> discoverable
>> using call to clocksource_of_init. With this change, it would be appropriate 
>> to
>> rename the function 'exynos4_timer_init' as 'mct_init' since it aptly 
>> describes
>> this function. Additionally, the 'init_time' callback of all machine 
>> descriptors
>> for exynos platforms that were previously set to 'exynos4_timer_init' are now
>> set to either 'mct_init' or 'clocksource_of_init'.
> 
>> diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
> 
>> +#ifdef CONFIG_CLKSRC_OF
>> +CLOCKSOURCE_OF_DECLARE(exynos4210, "samsung,exynos4210-mct", mct_init)
>> +CLOCKSOURCE_OF_DECLARE(exynos4412, "samsung,exynos4412-mct", mct_init)
>> +#endif
> 
> I suggested in another review (IIRC for a different SoC) that
> CLOCKSOURCE_OF_DECLARE() should always be declared so you don't need
> that ifdef. Would you care to send a patch to add to arm-soc's
> timer/cleanup branch to do that? If not, let me know and I can.

I just sent a patch for this.

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


[PATCH 5/5] s5p-fimc: Redefine platform data structure for fimc-is

2013-01-30 Thread Sylwester Nawrocki
Newer Exynos4 SoC are equipped with a local camera ISP that
controls external raw image sensor directly. Such sensors
can be connected through FIMC-LITEn (and MIPI-CSISn) IPs to
the ISP, which then feeds image data to the FIMCn IP. Thus
there can be two busses associated with an image source
(sensor). Rename struct s5p_fimc_isp_info describing external
image sensor (video decoder) to struct fimc_source_info to
avoid confusion. bus_type is split into fimc_bus_type and
sensor_bus_type. The bus type enumeration is extended to
include both FIMC Writeback input types.

The bus_type enumeration and the data structure name in the
board files are modified according to the above changes.

Cc: Kukjin Kim 
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Sylwester Nawrocki 
Signed-off-by: Kyungmin Park 
---
 arch/arm/mach-exynos/mach-nuri.c|8 ++--
 arch/arm/mach-exynos/mach-universal_c210.c  |8 ++--
 arch/arm/mach-s5pv210/mach-goni.c   |6 +--
 drivers/media/platform/s5p-fimc/fimc-lite-reg.c |8 ++--
 drivers/media/platform/s5p-fimc/fimc-lite-reg.h |4 +-
 drivers/media/platform/s5p-fimc/fimc-mdevice.c  |   16 
 drivers/media/platform/s5p-fimc/fimc-mdevice.h  |2 +-
 drivers/media/platform/s5p-fimc/fimc-reg.c  |   34 +---
 drivers/media/platform/s5p-fimc/fimc-reg.h  |6 +--
 include/media/s5p_fimc.h|   49 ++-
 10 files changed, 79 insertions(+), 62 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 27d4ed8..7c2600e 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1209,25 +1209,25 @@ static struct i2c_board_info m5mols_board_info = {
.platform_data  = &m5mols_platdata,
 };

-static struct s5p_fimc_isp_info nuri_camera_sensors[] = {
+static struct fimc_source_info nuri_camera_sensors[] = {
{
.flags  = V4L2_MBUS_PCLK_SAMPLE_RISING |
  V4L2_MBUS_VSYNC_ACTIVE_LOW,
-   .bus_type   = FIMC_ITU_601,
+   .fimc_bus_type  = FIMC_BUS_TYPE_ITU_601,
.board_info = &s5k6aa_board_info,
.clk_frequency  = 2400UL,
.i2c_bus_num= 6,
}, {
.flags  = V4L2_MBUS_PCLK_SAMPLE_FALLING |
  V4L2_MBUS_VSYNC_ACTIVE_LOW,
-   .bus_type   = FIMC_MIPI_CSI2,
+   .fimc_bus_type  = FIMC_BUS_TYPE_MIPI_CSI2,
.board_info = &m5mols_board_info,
.clk_frequency  = 2400UL,
},
 };

 static struct s5p_platform_fimc fimc_md_platdata = {
-   .isp_info   = nuri_camera_sensors,
+   .source_info= nuri_camera_sensors,
.num_clients= ARRAY_SIZE(nuri_camera_sensors),
 };

diff --git a/arch/arm/mach-exynos/mach-universal_c210.c 
b/arch/arm/mach-exynos/mach-universal_c210.c
index 9e3340f..c09290a 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -988,12 +988,12 @@ static struct i2c_board_info m5mols_board_info = {
.platform_data = &m5mols_platdata,
 };

-static struct s5p_fimc_isp_info universal_camera_sensors[] = {
+static struct fimc_source_info universal_camera_sensors[] = {
{
.mux_id = 0,
.flags  = V4L2_MBUS_PCLK_SAMPLE_FALLING |
  V4L2_MBUS_VSYNC_ACTIVE_LOW,
-   .bus_type   = FIMC_ITU_601,
+   .fimc_bus_type  = FIMC_BUS_TYPE_ITU_601,
.board_info = &s5k6aa_board_info,
.i2c_bus_num= 0,
.clk_frequency  = 2400UL,
@@ -1001,7 +1001,7 @@ static struct s5p_fimc_isp_info 
universal_camera_sensors[] = {
.mux_id = 0,
.flags  = V4L2_MBUS_PCLK_SAMPLE_FALLING |
  V4L2_MBUS_VSYNC_ACTIVE_LOW,
-   .bus_type   = FIMC_MIPI_CSI2,
+   .fimc_bus_type  = FIMC_BUS_TYPE_MIPI_CSI2,
.board_info = &m5mols_board_info,
.i2c_bus_num= 0,
.clk_frequency  = 2400UL,
@@ -1009,7 +1009,7 @@ static struct s5p_fimc_isp_info 
universal_camera_sensors[] = {
 };

 static struct s5p_platform_fimc fimc_md_platdata = {
-   .isp_info   = universal_camera_sensors,
+   .source_info= universal_camera_sensors,
.num_clients= ARRAY_SIZE(universal_camera_sensors),
 };

diff --git a/arch/arm/mach-s5pv210/mach-goni.c 
b/arch/arm/mach-s5pv210/mach-goni.c
index c72b310..423f6b6 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -841,12 +841,12 @@ static struct i2c_board_info noon010pc30_board_info = {
.platform_data = &noon010pc30_pldata,
 };

-static struct s5p_fimc_isp_info goni_camera_sensors[] = {
+static struct 

[RFC PATCH 4/4] video: display: Add Samsung s6e8ax0 display panel driver

2013-01-30 Thread Tomasz Figa
This patch adds Common Display Framework driver for Samsung s6e8ax0
MIPI DSI display panel.

Signed-off-by: Tomasz Figa 
Signed-off-by: Kyungmin Park 
---
 drivers/video/display/Kconfig |3 +
 drivers/video/display/Makefile|1 +
 drivers/video/display/panel-s6e8ax0.c | 1027 +
 include/video/panel-s6e8ax0.h |   41 ++
 4 files changed, 1072 insertions(+)
 create mode 100644 drivers/video/display/panel-s6e8ax0.c
 create mode 100644 include/video/panel-s6e8ax0.h

diff --git a/drivers/video/display/Kconfig b/drivers/video/display/Kconfig
index b14527a..f19ec04 100644
--- a/drivers/video/display/Kconfig
+++ b/drivers/video/display/Kconfig
@@ -5,6 +5,9 @@ menuconfig DISPLAY_CORE
 
 if DISPLAY_CORE
 
+config DISPLAY_PANEL_S6E8AX0
+   tristate "S6E8AX0 DSI video mode panel"
+   select OF_VIDEOMODE
 
 config DISPLAY_SOURCE_EXYNOS_DSI
tristate "Samsung SoC MIPI DSI Master"
diff --git a/drivers/video/display/Makefile b/drivers/video/display/Makefile
index 40a283a..0f7fdc2 100644
--- a/drivers/video/display/Makefile
+++ b/drivers/video/display/Makefile
@@ -1,2 +1,3 @@
 obj-$(CONFIG_DISPLAY_CORE) += display-core.o
+obj-$(CONFIG_DISPLAY_PANEL_S6E8AX0) += panel-s6e8ax0.o
 obj-$(CONFIG_DISPLAY_SOURCE_EXYNOS_DSI) += source-exynos_dsi.o
diff --git a/drivers/video/display/panel-s6e8ax0.c 
b/drivers/video/display/panel-s6e8ax0.c
new file mode 100644
index 000..4c09fe2
--- /dev/null
+++ b/drivers/video/display/panel-s6e8ax0.c
@@ -0,0 +1,1027 @@
+/* linux/drivers/video/exynos/s6e8ax0.c
+ *
+ * MIPI-DSI based s6e8ax0 AMOLED lcd 4.65 inch panel driver.
+ *
+ * Inki Dae, 
+ * Donghwa Lee, 
+ * Tomasz Figa, 
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#define LDI_MTP_LENGTH 24
+#define DSIM_PM_STABLE_TIME10
+#define MIN_BRIGHTNESS 0
+#define MAX_BRIGHTNESS 24
+#define GAMMA_TABLE_COUNT  26
+
+struct s6e8ax0 {
+   struct display_entity entity;
+   struct device *dev;
+
+   struct s6e8ax0_platform_data *pdata;
+   struct backlight_device *bd;
+   struct lcd_device *ld;
+   struct regulator_bulk_data supplies[2];
+
+   bool enabled;
+   unsigned int id;
+   unsigned int gamma;
+   unsigned int acl_enable;
+   unsigned int cur_acl;
+   int power;
+
+   unsigned int reset_gpio;
+};
+
+#define to_panel(p)container_of(p, struct s6e8ax0, entity)
+
+static const unsigned char s6e8ax0_22_gamma_30[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xf5, 0x00, 0xff, 0xad, 0xaf,
+   0xbA, 0xc3, 0xd8, 0xc5, 0x9f, 0xc6, 0x9e, 0xc1, 0xdc, 0xc0,
+   0x00, 0x61, 0x00, 0x5a, 0x00, 0x74,
+};
+
+static const unsigned char s6e8ax0_22_gamma_50[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xe8, 0x1f, 0xf7, 0xad, 0xc0,
+   0xb5, 0xc4, 0xdc, 0xc4, 0x9e, 0xc6, 0x9c, 0xbb, 0xd8, 0xbb,
+   0x00, 0x70, 0x00, 0x68, 0x00, 0x86,
+};
+
+static const unsigned char s6e8ax0_22_gamma_60[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xde, 0x1f, 0xef, 0xad, 0xc4,
+   0xb3, 0xc3, 0xdd, 0xc4, 0x9e, 0xc6, 0x9c, 0xbc, 0xd6, 0xba,
+   0x00, 0x75, 0x00, 0x6e, 0x00, 0x8d,
+};
+
+static const unsigned char s6e8ax0_22_gamma_70[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xd8, 0x1f, 0xe7, 0xaf, 0xc8,
+   0xb4, 0xc4, 0xdd, 0xc3, 0x9d, 0xc6, 0x9c, 0xbb, 0xd6, 0xb9,
+   0x00, 0x7a, 0x00, 0x72, 0x00, 0x93,
+};
+
+static const unsigned char s6e8ax0_22_gamma_80[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xc9, 0x1f, 0xde, 0xae, 0xc9,
+   0xb1, 0xc3, 0xdd, 0xc2, 0x9d, 0xc5, 0x9b, 0xbc, 0xd6, 0xbb,
+   0x00, 0x7f, 0x00, 0x77, 0x00, 0x99,
+};
+
+static const unsigned char s6e8ax0_22_gamma_90[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xc7, 0x1f, 0xd9, 0xb0, 0xcc,
+   0xb2, 0xc3, 0xdc, 0xc1, 0x9c, 0xc6, 0x9c, 0xbc, 0xd4, 0xb9,
+   0x00, 0x83, 0x00, 0x7b, 0x00, 0x9e,
+};
+
+static const unsigned char s6e8ax0_22_gamma_100[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xbd, 0x80, 0xcd, 0xba, 0xce,
+   0xb3, 0xc4, 0xde, 0xc3, 0x9c, 0xc4, 0x9, 0xb8, 0xd3, 0xb6,
+   0x00, 0x88, 0x00, 0x80, 0x00, 0xa5,
+};
+
+static const unsigned char s6e8ax0_22_gamma_120[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xb9, 0x95, 0xc8, 0xb1, 0xcf,
+   0xb2, 0xc6, 0xdf, 0xc5, 0x9b, 0xc3, 0x99, 0xb6, 0xd2, 0xb6,
+   0x00, 0x8f, 0x00, 0x86, 0x00, 0xac,
+};
+
+static const unsigned char s6e8ax0_22_gamma_130[] = {
+   0xfa, 0x01, 0x60, 0x10, 0x60, 0xb7, 0xa0, 0xc7, 0xb1, 0xd0,
+   0xb2, 0xc4, 0xdd, 0xc3, 0x9a, 0xc3, 0x98, 0xb6, 0xd0, 0xb4,
+   0x00, 0x92, 0x00, 0x8a, 0x00, 0xb1,
+};

[RFC PATCH 3/4] video: display: Add exynos-dsi video source driver

2013-01-30 Thread Tomasz Figa
This patch adds new driver for DSI master block available in Samsung
Exynos SoCs. The driver is designed and written specifically for Common
Display Framework.

Signed-off-by: Tomasz Figa 
Signed-off-by: Kyungmin Park 
---
 drivers/video/display/Kconfig |3 +
 drivers/video/display/Makefile|1 +
 drivers/video/display/source-exynos_dsi.c | 1313 +
 include/video/exynos_dsi.h|   41 +
 4 files changed, 1358 insertions(+)
 create mode 100644 drivers/video/display/source-exynos_dsi.c
 create mode 100644 include/video/exynos_dsi.h

diff --git a/drivers/video/display/Kconfig b/drivers/video/display/Kconfig
index 477192d..b14527a 100644
--- a/drivers/video/display/Kconfig
+++ b/drivers/video/display/Kconfig
@@ -6,5 +6,8 @@ menuconfig DISPLAY_CORE
 if DISPLAY_CORE
 
 
+config DISPLAY_SOURCE_EXYNOS_DSI
+   tristate "Samsung SoC MIPI DSI Master"
+
 
 endif # DISPLAY_CORE
diff --git a/drivers/video/display/Makefile b/drivers/video/display/Makefile
index bd93496..40a283a 100644
--- a/drivers/video/display/Makefile
+++ b/drivers/video/display/Makefile
@@ -1 +1,2 @@
 obj-$(CONFIG_DISPLAY_CORE) += display-core.o
+obj-$(CONFIG_DISPLAY_SOURCE_EXYNOS_DSI) += source-exynos_dsi.o
diff --git a/drivers/video/display/source-exynos_dsi.c 
b/drivers/video/display/source-exynos_dsi.c
new file mode 100644
index 000..30b15bf
--- /dev/null
+++ b/drivers/video/display/source-exynos_dsi.c
@@ -0,0 +1,1313 @@
+/*
+ * Samsung SoC MIPI DSI Master driver.
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd
+ *
+ * Contacts: Tomasz Figa 
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#define DSIM_STATUS_REG0x0 /* Status register */
+#define DSIM_SWRST_REG 0x4 /* Software reset register */
+#define DSIM_CLKCTRL_REG   0x8 /* Clock control register */
+#define DSIM_TIMEOUT_REG   0xc /* Time out register */
+#define DSIM_CONFIG_REG0x10/* Configuration register */
+#define DSIM_ESCMODE_REG   0x14/* Escape mode register */
+
+/* Main display image resolution register */
+#define DSIM_MDRESOL_REG   0x18
+#define DSIM_MVPORCH_REG   0x1c/* Main display Vporch register */
+#define DSIM_MHPORCH_REG   0x20/* Main display Hporch register */
+#define DSIM_MSYNC_REG 0x24/* Main display sync area register */
+
+/* Sub display image resolution register */
+#define DSIM_SDRESOL_REG   0x28
+#define DSIM_INTSRC_REG0x2c/* Interrupt source register */
+#define DSIM_INTMSK_REG0x30/* Interrupt mask register */
+#define DSIM_PKTHDR_REG0x34/* Packet Header FIFO register 
*/
+#define DSIM_PAYLOAD_REG   0x38/* Payload FIFO register */
+#define DSIM_RXFIFO_REG0x3c/* Read FIFO register */
+#define DSIM_FIFOTHLD_REG  0x40/* FIFO threshold level register */
+#define DSIM_FIFOCTRL_REG  0x44/* FIFO status and control register */
+
+/* FIFO memory AC characteristic register */
+#define DSIM_PLLCTRL_REG   0x4c/* PLL control register */
+#define DSIM_PLLTMR_REG0x50/* PLL timer register */
+#define DSIM_PHYACCHR_REG  0x54/* D-PHY AC characteristic register */
+#define DSIM_PHYACCHR1_REG 0x58/* D-PHY AC characteristic register1 */
+
+/* DSIM_STATUS */
+#define DSIM_STOP_STATE_DAT(x) (((x) & 0xf) << 0)
+#define DSIM_STOP_STATE_CLK(1 << 8)
+#define DSIM_TX_READY_HS_CLK   (1 << 10)
+#define DSIM_PLL_STABLE(1 << 31)
+
+/* DSIM_SWRST */
+#define DSIM_FUNCRST   (1 << 16)
+#define DSIM_SWRST (1 << 0)
+
+/* DSIM_TIMEOUT */
+#define DSIM_LPDR_TOUT(x)  ((x) << 0)
+#define DSIM_BTA_TOUT(x)   ((x) << 16)
+
+/* DSIM_CLKCTRL */
+#define DSIM_ESC_PRESCALER(x)  (((x) & 0x) << 0)
+#define DSIM_ESC_PRESCALER_MASK(0x << 0)
+#define DSIM_LANE_ESC_CLK_EN_CLK   (1 << 19)
+#define DSIM_LANE_ESC_CLK_EN_DATA(x)   (((x) & 0xf) << 20)
+#define DSIM_LANE_ESC_CLK_EN_DATA_MASK (0xf << 20)
+#define DSIM_BYTE_CLKEN(1 << 24)
+#define DSIM_BYTE_CLK_SRC(x)   (((x) & 0x3) << 25)
+#define DSIM_BYTE_CLK_SRC_MASK (0x3 << 25)
+#define DSIM_PLL_BYPASS(1 << 27)
+#define DSIM_ESC_CLKEN (1 << 28)
+#define DSIM_TX_REQUEST_HSCLK  (1 << 31)
+
+/* DSIM_CONFIG */
+#define DSIM_LANE_EN_CLK   (1 << 0)
+#define DSIM_LANE_EN(x) 

[RFC PATCH 2/4] video: add makefile & kconfig

2013-01-30 Thread Tomasz Figa
Signed-off-by: Tomasz Figa 
Signed-off-by: Kyungmin Park 
---
 drivers/video/Kconfig  |  1 +
 drivers/video/Makefile |  1 +
 drivers/video/display/Kconfig  | 10 ++
 drivers/video/display/Makefile |  1 +
 4 files changed, 13 insertions(+)
 create mode 100644 drivers/video/display/Kconfig
 create mode 100644 drivers/video/display/Makefile

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 68f17ee..800e98c 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2444,6 +2444,7 @@ source "drivers/video/omap/Kconfig"
 source "drivers/video/omap2/Kconfig"
 source "drivers/video/exynos/Kconfig"
 source "drivers/video/backlight/Kconfig"
+source "drivers/video/display/Kconfig"
 
 if VT
source "drivers/video/console/Kconfig"
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index f592f3b..4a091d4 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -14,6 +14,7 @@ fb-objs   := $(fb-y)
 obj-$(CONFIG_VT) += console/
 obj-$(CONFIG_LOGO)   += logo/
 obj-y+= backlight/
+obj-y+= display/
 
 obj-$(CONFIG_EXYNOS_VIDEO) += exynos/
 
diff --git a/drivers/video/display/Kconfig b/drivers/video/display/Kconfig
new file mode 100644
index 000..477192d
--- /dev/null
+++ b/drivers/video/display/Kconfig
@@ -0,0 +1,10 @@
+menuconfig DISPLAY_CORE
+   tristate "Display Core"
+   ---help---
+ Support common display framework for graphics devices.
+
+if DISPLAY_CORE
+
+
+
+endif # DISPLAY_CORE
diff --git a/drivers/video/display/Makefile b/drivers/video/display/Makefile
new file mode 100644
index 000..bd93496
--- /dev/null
+++ b/drivers/video/display/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_DISPLAY_CORE) += display-core.o
-- 
1.8.1

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


[RFC PATCH 1/4] video: add display-core

2013-01-30 Thread Tomasz Figa
Signed-off-by: Tomasz Figa 
Signed-off-by: Kyungmin Park 
---
 drivers/video/display/display-core.c | 295 +++
 include/video/display.h  | 230 +++
 2 files changed, 525 insertions(+)
 create mode 100644 drivers/video/display/display-core.c
 create mode 100644 include/video/display.h

diff --git a/drivers/video/display/display-core.c 
b/drivers/video/display/display-core.c
new file mode 100644
index 000..ed49384
--- /dev/null
+++ b/drivers/video/display/display-core.c
@@ -0,0 +1,295 @@
+/*
+ * Display Core
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * Contacts: Laurent Pinchart 
+ *
+ * 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 
+
+static struct video_source *video_source_bind(struct display_entity *entity);
+static void video_source_unbind(struct display_entity *entity);
+
+/* 
-
+ * Display Entity
+ */
+
+static LIST_HEAD(display_entity_list);
+static DEFINE_MUTEX(display_entity_mutex);
+
+struct display_entity *display_entity_get_first(void)
+{
+   /* FIXME: Don't we need some locking here? */
+
+   if (list_empty(&display_entity_list))
+   return NULL;
+
+   return list_first_entry(&display_entity_list, struct display_entity,
+   list);
+}
+EXPORT_SYMBOL(display_entity_get_first);
+
+int display_entity_set_state(struct display_entity *entity,
+enum display_entity_state state)
+{
+   int ret;
+
+   if (entity->state == state)
+   return 0;
+
+   if (!entity->ops || !entity->ops->set_state)
+   return 0;
+
+   ret = entity->ops->set_state(entity, state);
+   if (ret < 0)
+   return ret;
+
+   entity->state = state;
+   return 0;
+}
+EXPORT_SYMBOL_GPL(display_entity_set_state);
+
+int display_entity_get_modes(struct display_entity *entity,
+const struct videomode **modes)
+{
+   if (!entity->ops || !entity->ops->get_modes)
+   return 0;
+
+   return entity->ops->get_modes(entity, modes);
+}
+EXPORT_SYMBOL_GPL(display_entity_get_modes);
+
+int display_entity_get_size(struct display_entity *entity,
+   unsigned int *width, unsigned int *height)
+{
+   if (!entity->ops || !entity->ops->get_size)
+   return -EOPNOTSUPP;
+
+   return entity->ops->get_size(entity, width, height);
+}
+EXPORT_SYMBOL_GPL(display_entity_get_size);
+
+int display_entity_get_params(struct display_entity *entity,
+ struct display_entity_interface_params *params)
+{
+   if (!entity->ops || !entity->ops->get_params)
+   return -EOPNOTSUPP;
+
+   return entity->ops->get_params(entity, params);
+}
+EXPORT_SYMBOL_GPL(display_entity_get_params);
+
+static void display_entity_release(struct kref *ref)
+{
+   struct display_entity *entity =
+   container_of(ref, struct display_entity, ref);
+
+   if (entity->release)
+   entity->release(entity);
+}
+
+struct display_entity *display_entity_get(struct display_entity *entity)
+{
+   if (entity == NULL)
+   return NULL;
+
+   kref_get(&entity->ref);
+   return entity;
+}
+EXPORT_SYMBOL_GPL(display_entity_get);
+
+void display_entity_put(struct display_entity *entity)
+{
+   kref_put(&entity->ref, display_entity_release);
+}
+EXPORT_SYMBOL_GPL(display_entity_put);
+
+int __must_check __display_entity_register(struct display_entity *entity,
+  struct module *owner)
+{
+   struct video_source *src;
+
+   kref_init(&entity->ref);
+   entity->owner = owner;
+   entity->state = DISPLAY_ENTITY_STATE_OFF;
+   entity->source = NULL;
+
+   src = video_source_bind(entity);
+   if (!src)
+   return -EPROBE_DEFER;
+
+   mutex_lock(&display_entity_mutex);
+   list_add(&entity->list, &display_entity_list);
+   mutex_unlock(&display_entity_mutex);
+
+   return 0;
+}
+EXPORT_SYMBOL_GPL(__display_entity_register);
+
+void display_entity_unregister(struct display_entity *entity)
+{
+   video_source_unbind(entity);
+
+   mutex_lock(&display_entity_mutex);
+
+   list_del(&entity->list);
+   mutex_unlock(&display_entity_mutex);
+
+   display_entity_put(entity);
+}
+EXPORT_SYMBOL_GPL(display_entity_unregister);
+
+/* 
-
+ * Video Source
+ */
+
+static LIST_HEAD(video_source_list);
+static DEFINE_MUTEX(video_source_mutex);
+
+static void video_source_release(struct kref *ref)
+{
+   struct video_source *src

[RFC PATCH 0/4] Common Display Framework-TF

2013-01-30 Thread Tomasz Figa
Hi,

After pretty long time of trying to adapt Exynos-specific DSI display support
to Common Display Framework I'm ready to show some preliminary RFC patches.
This series shows some ideas for CDF that came to my mind during my work,
some changes based on comments received by Tomi's edition of CDF and also
preliminarys version of Exynos DSI (video source part only, still with some
FIXMEs) and Samsung S6E8AX0 DSI panel drivers.

It is heavily based on Tomi's work which can be found here:
http://thread.gmane.org/gmane.comp.video.dri.devel/78227

The code might be a bit hacky in places, as I wanted to get it to a kind
of complete and working state first. However I hope that some of the ideas
might useful for further works.

So, here comes the TF edition of Common Clock Framework.


Changes done to Tomi's edition of CDF:

 - Replaced set_operation_mode, set_pixel_format and set_size video source
   operations with get_params display entity operation, as it was originally
   in Laurent's version.

   We have discussed this matter on the mailing list
   and decided that it would be better to have the source ask the sink for
   its parameter structure and do whatever appropriate with it.

 - Defined a preliminary set of DSI bus parameters.

   Following parameters are defined:

   1. Pixel format used for video data transmission.
   2. Mode flags (several bit flags ORed together):
 a) DSI_MODE_VIDEO - entity uses video mode (as opposed to command mode),
following DSI_MODE_VIDEO_* flags are relevant only if this flag is set.
b) DSI_MODE_VIDEO_BURST - entity uses burst transfer for video data
c) DSI_MODE_VIDEO_SYNC_PULSE - entity uses sync pulses (as opposed
   to sync events)
d) DSI_MODE_VIDEO_AUTO_VERT - entity uses automatic video mode
   detection
e) DSI_MODE_VIDEO_HSE - entity needs horizontal sync end packets
f) DSI_MODE_VIDEO_HFP - entity needs horizontal front porch area
g) DSI_MODE_VIDEO_HBP - entity needs horizontal back porch area
h) DSI_MODE_VIDEO_HSA - entity needs horizontal sync active area
 i) DSI_MODE_VSYNC_FLUSH - vertical sync pulse flushes video data
 j) DSI_MODE_EOT_PACKET - entity needs EoT packets
   3. Bit (serial) clock frequency in HS mode.
   4. Escape mode clock frequency.
   5. Mask of used data lanes (each bit represents single lane).
   6. Command allow area in video mode - amount of lines after transmitting
  video data when generic commands are accepted.

   Feel free to suggest anything missing or wrong, as the list of
   parameters is based merely on what was used in original Exynos MIPI
   DSIM driver.

 - Redesigned source-entity matching.

   Now each source has name string and integer id and each entity has
   source name and source id. In addition, they can have of_node specified,
   which is used for Device Tree-based matching.

   The matching procedure is as follows:

   1. Matching takes place when display entity registers.
 a) If there is of_node specified for the entity then "video-source"
phandle of this node is being parsed and list of registered sources
is traversed in search of a source with of_node received from
parsing the phandle.
 b) Otherwise the matching key is a pair of source name and id.
   2. If no matching source is found, display_entity_register returns
  -EPROBE_DEFER error which causes the entity driver to defer its
  probe until the source registers.
   3. Otherwise an optional bind operation of video source is called,
  sink field of source and source field of entity are set and the
  matching ends successfully.

 - Some initial concept of source-entity cross-locking.

   Only video source is protected at the moment, as I still have to think
   a bit about locking the entity in a way where removing it by user request
   is still possible.

 - Dropped any panels and chips that I can't test.

   They are irrelevant for this series, so there is no point in including them.

 - Added Exynos DSI video source driver.

   This is a new driver for the DSI controller found in Exynos SoCs. It still
   needs some work, but in current state can be considered an example of DSI
   video source implementation for my version of CDF.

 - Added Samsung S6E8AX0 DSI panel driver.

   This is the old Exynos-specific driver, just migrated to CDF and with
   some hacks to provide control over entity state to userspace using
   lcd device. However it can be used to demonstrate video source ops in use.

Feel free to comment as much as you can.

Tomasz Figa (4):
  video: add display-core
  video: add makefile & kconfig
  video: display: Add exynos-dsi video source driver
  video: display: Add Samsung s6e8ax0 display panel driver

 drivers/video/Kconfig |1 +
 drivers/video/Makefile|1 +
 drivers/video/display/Kconfig |   16 

S3C2440 DMA broken

2013-01-30 Thread Alexey Galakhov
Hello,

I found that audio on S3C2440 was broken since commit 344b4c4 (ASoC:
Samsung: Update DMA interface). Each audio buffer is played multiple times.

An investigation of the issue has shown that it is caused by incorrect
buffer length passed to s3c2410_dma_enqueue() in the s3c_dma_prepare()
function (file arch/arm/plat-samsung/s3c-dma-ops.c). To be more precise:

int len = (param->cap == DMA_CYCLIC) ? param->period : param->len;

The buffer length is set in sound/soc/samsung/dma.c like that:

dma_info.period = prtd->dma_period;
dma_info.len = prtd->dma_period*limit;

So the "limit" multiplier is used twice. To prove it, I changed the line
in s3c-dma-ops.c to the following:

int len = /*(param->cap == DMA_CYCLIC)*/1 ? param->period : param->len;

and the audio was played correctly.

What is the intended behavior of s3c_dma_prepare()? Where shoild the
length to be fixed - in s3c_dma_prepare() or in dma.c ?

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


[PATCH] regulator: s2mps11: fix incorrect register for buck10

2013-01-30 Thread Alim Akhtar
For BUCK10 the control registers are wrongly set as buck9 control register
This patch corrects the control registers for buck10

Signed-off-by: Alim Akhtar 
---
 drivers/regulator/s2mps11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index bd062a2..cd9ea2e 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -174,9 +174,9 @@ static struct regulator_ops s2mps11_buck_ops = {
.min_uV = S2MPS11_BUCK_MIN2,\
.uV_step= S2MPS11_BUCK_STEP2,   \
.n_voltages = S2MPS11_BUCK_N_VOLTAGES,  \
-   .vsel_reg   = S2MPS11_REG_B9CTRL2,  \
+   .vsel_reg   = S2MPS11_REG_B10CTRL2, \
.vsel_mask  = S2MPS11_BUCK_VSEL_MASK,   \
-   .enable_reg = S2MPS11_REG_B9CTRL1,  \
+   .enable_reg = S2MPS11_REG_B10CTRL1, \
.enable_mask= S2MPS11_ENABLE_MASK   \
 }
 
-- 
1.8.0

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


Re: [PATCH RFC v4 01/14] [media] Add common video interfaces OF bindings documentation

2013-01-30 Thread Sylwester Nawrocki
Hi Laurent,

On 01/25/2013 02:52 AM, Laurent Pinchart wrote:
 +Data interfaces on all video devices are described by their child 'port'
 +nodes. Configuration of a port depends on other devices participating in
 +the data transfer and is described by 'endpoint' subnodes.
 +
 +dev {
 +  #address-cells = <1>;
 +  #size-cells = <0>;
 +  port@0 {
 +  endpoint@0 { ... };
 +  endpoint@1 { ... };
 +  };
 +  port@1 { ... };
 +};
 +
 +If a port can be configured to work with more than one other device on
 +the same bus, an 'endpoint' child node must be provided for each of
 +them. If more than one port is present in a device node or there is more
 +than one endpoint at a port, a common scheme, using '#address-cells',
 +'#size-cells' and 'reg' properties is used.
>>>
>>> Wouldn't this cause problems if the device has both video ports and a
>>> child bus ? Using #address-cells and #size-cells for the video ports would
>>> prevent the child bus from being handled in the usual way.
>>
>> Indeed, it looks like a serious issue in these bindings.
>>
>>> A possible solution would be to number ports with a dash instead of a @,
>>> as done in pinctrl for instance. We would then get
>>>
>>> port-0 {
>>> endpoint-0 { ... };
>>> endpoint-1 { ... };
>>> };
>>> port-1 { ... };

One problem here is that index of the port or the endpoint node can have 
random value and don't need to start with 0, which is the case for the pinctrl
properties. It makes iterating over those nodes more difficult, instead
of using standard functions like of_node_cmp() we would need to search for 
sub-strings in the node name.

>> Sounds like a good alternative, I can't think of any better solution at the
>> moment.
>>
 +Two 'endpoint' nodes are linked with each other through their
 +'remote-endpoint' phandles.  An endpoint subnode of a device contains
 +all properties needed for configuration of this device for data exchange
 +with the other device.  In most cases properties at the peer 'endpoint'
 +nodes will be identical, however they might need to be different when
 +there is any signal modifications on the bus between two devices, e.g.
 +there are logic signal inverters on the lines.
 +
 +Required properties
 +---
 +
 +If there is more than one 'port' or more than one 'endpoint' node
 following +properties are required in relevant parent node:
 +
 +- #address-cells : number of cells required to define port number,
 should be 1.
 +- #size-cells: should be zero.
>>>
>>> I wonder if we should specify whether a port is a data sink or data
>>> source. A source can be connected to multiple sinks at the same time, but
>>> a sink can only be connected to a single source. If we want to perform
>>> automatic sanity checks in the core knowing the direction might help.
>>
>> Multiple sources can be linked to a single sink, but only one link can be
>> active at any time.
>>
>> So I'm not sure if knowing if a DT port is a data source or data sink would
>> let us to validate device tree structure statically in general.
>>
>> Such source/sink property could be useful later at runtime, when data
>> pipeline is set up for streaming.
> 
> Yes, I was mostly thinking about runtime.
> 
>> How do you think this could be represented ? By just having boolean
>> properties like: 'source' and 'sink' in the port nodes ? Or perhaps in the
>> endpoint nodes, since some devices might be bidirectional ? I don't recall
>> any at the moment though.
> 
> Source and sink properties would do. We could also use a direction property 
> that could take sink, source and bidirectional values, but that might be more 
> complex.

Since we're going to allow multiple endpoints at a port to be active at any
time, for the reasons we discussed in IRC [1], I assume it's no longer
possible to perform sanity checks mentioned above in the core. Should we 
then keep the 'source', 'sink' properties in the port nodes ?

[1] http://linuxtv.org/irc/v4l/index.php?date=2013-01-29

> I don't think we will have bidirectional link (as that would most probably 
> involve a very different kind of bus, and thus new bindings).

--

Thanks,
Sylwester

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


[PATCH] Asoc: Samsung: I2S: Add support for runtime S2R

2013-01-30 Thread R. Chandrasekar
From: "R. Chandrasekar" 

This patch adds runtime suspend to resume support for I2S.
I2S clk is disabled at suspend and enabled at resume.

Signed-off-by: R. Chandrasekar 
Signed-off-by: Padmavathi Venna 
---
 sound/soc/samsung/i2s.c |   26 ++
 1 file changed, 26 insertions(+)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 2fc42f9..d7231e3 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1071,6 +1071,26 @@ static inline int samsung_i2s_get_driver_data(struct 
platform_device *pdev)
return platform_get_device_id(pdev)->driver_data;
 }
 
+#ifdef CONFIG_PM_RUNTIME
+static int i2s_runtime_suspend(struct device *dev)
+{
+   struct i2s_dai *i2s = dev_get_drvdata(dev);
+
+   clk_disable_unprepare(i2s->clk);
+
+   return 0;
+}
+
+static int i2s_runtime_resume(struct device *dev)
+{
+   struct i2s_dai *i2s = dev_get_drvdata(dev);
+
+   clk_prepare_enable(i2s->clk);
+
+   return 0;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
 static int samsung_i2s_probe(struct platform_device *pdev)
 {
struct i2s_dai *pri_dai, *sec_dai = NULL;
@@ -1288,6 +1308,11 @@ static const struct of_device_id exynos_i2s_match[] = {
 MODULE_DEVICE_TABLE(of, exynos_i2s_match);
 #endif
 
+static const struct dev_pm_ops samsung_i2s_pm = {
+   SET_RUNTIME_PM_OPS(i2s_runtime_suspend,
+   i2s_runtime_resume, NULL)
+};
+
 static struct platform_driver samsung_i2s_driver = {
.probe  = samsung_i2s_probe,
.remove = samsung_i2s_remove,
@@ -1296,6 +1321,7 @@ static struct platform_driver samsung_i2s_driver = {
.name = "samsung-i2s",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(exynos_i2s_match),
+   .pm = &samsung_i2s_pm,
},
 };
 
-- 
1.7.9.5

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


[PATCH v2 5/5] ARM: exynos: dts: Add FIMD DT binding Documentation

2013-01-30 Thread Vikas Sajjan
Adds FIMD DT binding documentation both SoC and Board, with an example

Signed-off-by: Vikas Sajjan 
---
 .../devicetree/bindings/drm/exynos/fimd.txt|   37 
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/drm/exynos/fimd.txt

diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt 
b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
new file mode 100644
index 000..bec9d07
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/exynos/fimd.txt
@@ -0,0 +1,37 @@
+Device-Tree bindings for fimd driver
+
+FIMD stands for Fully Interactive Mobile Display, is the Display Controller for
+the Exynos series of SoCs which transfers the image data from a video buffer
+located in the system memory to an external LCD interface.
+
+Required properties:
+- compatible := value should be "samsung,exynos5-fimd" or 
"samsung,exynos4-fimd"
+- reg := physical base address of the fimd and length of memory mapped region
+- interrupt-parent := reference to the interrupt combiner node with phandle
+- interrupts := interrupt number from the combiner to the cpu
+- pinctrl := property defining the pinctrl configurations with a phandle
+- pinctrl-names := name of the pinctrl
+
+Optional Properties:
+- samsung,power-domain := power domain property defined with a phandle
+- status := property defining the status of the node
+
+Example:
+
+SoC specific DT Entry:
+
+   fimd@11c0 {
+   compatible = "samsung,exynos4-fimd";
+   interrupt-parent = <&combiner>;
+   reg = <0x11c0 0x2>;
+   interrupts = <11 1>, <11 0>, <11 2>;
+   };
+
+Board specific DT Entry:
+
+   fimd@11c0 {
+   samsung,power-domain = <&pd_lcd0>;
+   pinctrl-0 = <&lcd_sync &lcd_clk &lcd_en &lcd0_data &pwm1_out>;
+   pinctrl-names = "default";
+   status = "okay";
+   };
-- 
1.7.9.5

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


[PATCH v2 4/5] ARM: dts: adds FIMD AUXDATA node entry for exynos4 DT

2013-01-30 Thread Vikas Sajjan
This patch adds the FIMD AUXDATA node

Signed-off-by: Vikas Sajjan 
---
 arch/arm/mach-exynos/mach-exynos4-dt.c |4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c 
b/arch/arm/mach-exynos/mach-exynos4-dt.c
index ab1dacc..6c9e05f 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -13,6 +13,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -80,6 +81,9 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] 
__initconst = {
OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_MDMA1, "dma-pl330.2", NULL),
OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU,
"exynos-tmu", NULL),
+   OF_DEV_AUXDATA("samsung,exynos4-fimd", EXYNOS4_PA_FIMD0,
+   "exynos4-fb.0", NULL),
+
{},
 };
 
-- 
1.7.9.5

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


[PATCH v2 3/5] ARM: dts: Add FIMD node and display timing node to exynos4412-origen.dts

2013-01-30 Thread Vikas Sajjan
Adds FIMD DT support to Origen quad board

Signed-off-by: Vikas Sajjan 
---
 arch/arm/boot/dts/exynos4412-origen.dts |   22 ++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-origen.dts 
b/arch/arm/boot/dts/exynos4412-origen.dts
index 4eba374..de877c5 100644
--- a/arch/arm/boot/dts/exynos4412-origen.dts
+++ b/arch/arm/boot/dts/exynos4412-origen.dts
@@ -44,6 +44,28 @@
status = "okay";
};
 
+   fimd@11c0 {
+   samsung,power-domain = <&pd_lcd0>;
+   pinctrl-0 = <&lcd_sync &lcd_clk &lcd_en &lcd0_data &pwm1_out>;
+   pinctrl-names = "default";
+   status = "okay";
+   };
+
+   display-timings {
+native-mode = <&timing0>;
+timing0: timing@0 {
+   clock-frequency = <5>;
+   hactive = <1024>;
+   vactive = <600>;
+   hfront-porch = <64>;
+   hback-porch = <16>;
+   hsync-len = <48>;
+   vback-porch = <64>;
+   vfront-porch = <16>;
+   vsync-len = <3>;
+};
+};
+
serial@1380 {
status = "okay";
};
-- 
1.7.9.5

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


[PATCH v2 1/5] ARM: dts: Add FIMD node to exynos4

2013-01-30 Thread Vikas Sajjan
This adds common FIMD device node for all Exynos4 SoCs.

Signed-off-by: Vikas Sajjan 
---
 arch/arm/boot/dts/exynos4.dtsi |7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index e1347fc..96c3b4a 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -289,4 +289,11 @@
interrupts = <0 34 0>;
};
};
+
+   fimd@11c0 {
+   compatible = "samsung,exynos4-fimd";
+   interrupt-parent = <&combiner>;
+   reg = <0x11c0 0x2>;
+   interrupts = <11 1>, <11 0>, <11 2>;
+   };
 };
-- 
1.7.9.5

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


[PATCH v2 2/5] ARM: dts: Adds lcd pinctrl node entries for SAMSUNG EXYNOS4412 SoC

2013-01-30 Thread Vikas Sajjan
From: Sachin Kamat 

This patch adds the lcd panel related picntrl nodes for Exynos4412 SoC

Signed-off-by: Sachin Kamat 
Signed-off-by: Vikas Sajjan 
---
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   26 ++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi 
b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
index 8e6115a..33a549c 100644
--- a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
@@ -354,6 +354,32 @@
samsung,pin-drv = <0>;
};
 
+   lcd_sync: lcd-sync {
+   samsung,pins = "gpf0-0", "gpf0-1";
+   samsung,pin-function = <2>;
+   samsung,pin-pud = <0>;
+   samsung,pin-drv = <0>;
+   };
+
+   lcd0_data: lcd0-data {
+   samsung,pins = "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7",
+   "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3",
+   "gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7",
+   "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3",
+   "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7",
+   "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3";
+   samsung,pin-function = <2>;
+   samsung,pin-pud = <0>;
+   samsung,pin-drv = <0>;
+   };
+
+   lcd_en: lcd-en {
+   samsung,pins = "gpf0-3";
+   samsung,pin-function = <2>;
+   samsung,pin-pud = <0>;
+   samsung,pin-drv = <0>;
+   };
+
lcd_clk: lcd-clk {
samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3";
samsung,pin-function = <2>;
-- 
1.7.9.5

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


[PATCH v2 0/5] Add DRM FIMD DT support for Exynos4 DT Machines

2013-01-30 Thread Vikas Sajjan
This patch series adds support for DRM FIMD DT for Exynos4 DT Machines,
specifically for Exynos4412 SoC.

changes since v1:
- added new patch to add FIMD DT binding Documentation
- removed patch enabling SAMSUNG_DEV_BACKLIGHT and SAMSUNG_DEV_PMW 
for mach-exynos4 DT
- added 'status' property to fimd DT node

Is based on branch "for-next"
http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git

Sachin Kamat (1):
  ARM: dts: Adds lcd pinctrl node entries for SAMSUNG EXYNOS4412 SoC

Vikas Sajjan (4):
  ARM: dts: Add FIMD node to exynos4
  ARM: dts: Add FIMD node and display timing node to
exynos4412-origen.dts
  ARM: dts: adds FIMD AUXDATA node entry for exynos4 DT
  ARM: exynos: dts: Add FIMD DT binding Documentation

 .../devicetree/bindings/drm/exynos/fimd.txt|   37 
 arch/arm/boot/dts/exynos4.dtsi |7 
 arch/arm/boot/dts/exynos4412-origen.dts|   22 
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi  |   26 ++
 arch/arm/mach-exynos/mach-exynos4-dt.c |4 +++
 5 files changed, 96 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/drm/exynos/fimd.txt

-- 
1.7.9.5

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


Re: [PATCH v2 0/6] ARM: dts: Add MFC support for Exynos4

2013-01-30 Thread Sachin Kamat
>
> Thanks Sachin. For the whole series:
>
> Reviewed-by: Sylwester Nawrocki 
>
> I have also tested patch 2/6 on an Exynos4412 based board,
> just added the mfc clock entries in the codec node.

Thanks Sylwester for your review and testing.


-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Failure due to missing (Exynos related) pinctrl patch

2013-01-30 Thread Sachin Kamat
Hi Linus,

On 30 January 2013 15:18, Linus Walleij  wrote:
> On Wed, Jan 30, 2013 at 5:08 AM, Kukjin Kim  wrote:
>> Sachin Kamat wrote:
>>>
>>> >> This patch is required along with the
>>> >> patch "gpio: samsung: fix pinctrl condition for exynos and exynos5440"
>>> >> (mainline commit Id: e4a5da51) which has already made it into
>>> >> mainline. Without the missing patch we get the following boot up
>>> >> warnings and subsequent failures with dt boot on 4412 based board:
>>> >
>>> > Hm I didn't realize there was a dependency between these
>>> > patches, oh well, better get the pull for the pinctrl tree finished
>>> > off then...

>
> Torvalds has already pulled it in -> problem solved. :-)
>

I tested this on Linus T.'s latest tip (2e51b231) and the problem
still persists :(

You sent the following patch in your pull request to Linus T.:
Kukjin Kim (1):
  pinctrl: samsung: removing duplicated condition for PINCTRL_SAMSUNG

However, the missing dependent patch is:

"pinctrl: exynos: change PINCTRL_EXYNOS option"

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Fix compilation error on S3C2440

2013-01-30 Thread Alexey Galakhov
On 01/30/2013 08:18 AM, Mark Brown wrote:

> Though I've got a horrible feeling this will conflict with Padma's
> work...

Looks like Padma changed the code for S3C2412 and blindly copy-pasted
the same change for all S3C24xx. However S3C24xx is for I2S-v1 and
S3C2412 is for I2S-v2. The extra stuff in s3c_i2sv2_register_dai() is
unrelated to v1.

After this patch the code works again just like v3.7 one. However the
v3.7 code was already broken (in fact, since v3.2) in the DMA
notification part so it doesn't play sound correctly thus I can't tell
that everything works just fine now :). I found the patch that
introduced the bug (344b4c4) and now I'm debugging it.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Failure due to missing (Exynos related) pinctrl patch

2013-01-30 Thread Linus Walleij
On Wed, Jan 30, 2013 at 5:08 AM, Kukjin Kim  wrote:
> Sachin Kamat wrote:
>>
>> >> This patch is required along with the
>> >> patch "gpio: samsung: fix pinctrl condition for exynos and exynos5440"
>> >> (mainline commit Id: e4a5da51) which has already made it into
>> >> mainline. Without the missing patch we get the following boot up
>> >> warnings and subsequent failures with dt boot on 4412 based board:
>> >
>> > Hm I didn't realize there was a dependency between these
>> > patches, oh well, better get the pull for the pinctrl tree finished
>> > off then...
>>
>> Ideally those 2 patches should have been squashed together.
>>
> Err, Sachin, what are you talking about? As you said, one patch has been
> merged into the mainline, so how does it can be squashed? In this case, just
> applying the other patch into pinctrl-fixes is enough.

Torvalds has already pulled it in -> problem solved. :-)

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


[PATCH] Fix compilation error on S3C2440

2013-01-30 Thread Alexey Galakhov
The commit a08485d8 ("ASoC: Samsung: Do not register samsung audio dma
device as pdev") introduced compilation error.

Combination of CONFIG_CPU_S3C2440 and CONFIG_SND_S3C24XX_I2S
caused undefined symbols 's3c_i2sv2_register_dai' and 's3c2412_i2s_dai'
in sound/soc/samsung/s3c24xx-i2s.c.

This patch fixes the problem and makes S3C2440 I2S usable again. It does
not affect S3C2412 (aka I2S-v2).

Signed-off-by: Alexey Galakhov 
---
 sound/soc/samsung/s3c24xx-i2s.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index ee10e87..13f6dd1 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -469,7 +469,7 @@ static int s3c24xx_iis_dev_probe(struct platform_device 
*pdev)
 {
int ret = 0;
 
-   ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
+   ret = snd_soc_register_dai(&pdev->dev, &s3c24xx_i2s_dai);
if (ret) {
pr_err("failed to register the dai\n");
return ret;
-- 
1.7.10.4

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


Re: [PATCH v2 0/6] ARM: dts: Add MFC support for Exynos4

2013-01-30 Thread Sylwester Nawrocki
On 01/30/2013 08:11 AM, Sachin Kamat wrote:
> Changes since v1:
> Addressed comments from Sylwester
>   - Updated documentation
>   - Added 'status' to the nodes
>   - Updated Kconfig entry
> 
> This series is based on for-next branch of Kukjin Kim's tree.
> git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> Sachin Kamat (6):
>   ARM: dts: Update MFC DT binding documentation
>   ARM: dts: Add MFC codec support for Exynos4 DT machines
>   ARM: dts: Add MFC codec support to SMDKV310 DT
>   ARM: dts: Add MFC codec support to Origen DT
>   ARM: dts: Add MFC codec entry to exynos4412-origen DT file
>   ARM: dts: Add MFC codec entry to exynos4412-smdk4412 DT file

Thanks Sachin. For the whole series:

Reviewed-by: Sylwester Nawrocki 

I have also tested patch 2/6 on an Exynos4412 based board,
just added the mfc clock entries in the codec node.

--

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


Re: [PATCH v4 2/2] usb: phy: samsung: Add PHY support for USB 3.0 controller

2013-01-30 Thread Felipe Balbi
On Tue, Jan 29, 2013 at 10:01:52PM -0800, Kukjin Kim wrote:
> Vivek Gautam wrote:
> > 
> > Adding PHY driver support for USB 3.0 controller for Samsung's
> > SoCs.
> > 
> > Signed-off-by: Vivek Gautam 
> > ---
> > 
> > Changes from v3:
> >  - Making SAMSUNG_USB3PHY dependent on SAMSUNG_USBPHY.
> >  - Adding USB_DWC3 to dependencies of SAMSUNG_USB2PHY since
> >dwc3 controller also looks for USB2 type PHY.
> > 
> >  drivers/usb/phy/Kconfig  |   11 +-
> >  drivers/usb/phy/Makefile |1 +
> >  drivers/usb/phy/samsung-usb3.c   |  349
> > ++
> >  drivers/usb/phy/samsung-usbphy.h |   81 +
> >  4 files changed, 441 insertions(+), 1 deletions(-)
> >  create mode 100644 drivers/usb/phy/samsung-usb3.c
> > 
> > diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
> > index cc0d230..9325a95 100644
> > --- a/drivers/usb/phy/Kconfig
> > +++ b/drivers/usb/phy/Kconfig
> > @@ -52,14 +52,23 @@ config SAMSUNG_USBPHY
> > help
> >   Enable this to support Samsung USB phy controllers for Samsung
> >   SoCs.
> > + Further enable USB 2.0 type PHY or USB 3.0 type PHY as required
> > + for USB controllers in use.
> > 
> >  if SAMSUNG_USBPHY
> > 
> >  config SAMSUNG_USB2PHY
> > bool "Samsung USB 2.0 PHY controller Driver"
> > -   depends on USB_S3C_HSOTG || USB_EHCI_S5P ||
> > USB_OHCI_EXYNOS
> > +   depends on USB_S3C_HSOTG || USB_EHCI_S5P ||
> > USB_OHCI_EXYNOS || USB_DWC3
> > help
> >   Enable this to support Samsung USB 2.0 (High Speed) phy controller
> >   for Samsung SoCs.
> > 
> > +config SAMSUNG_USB3PHY
> > +   bool "Samsung USB 3.0 PHY controller Driver"
> > +   depends on USB_DWC3
> > +   help
> > + Enable this to support Samsung USB 3.0 (Super Speed) phy
> > controller
> > + for samsung SoCs.
> > +
> >  endif
> 
> It mean, when USB_DWC3 is selected, we can select only one USB2PHY or
> USB3PHY?

right, not sure that's a wise idea. It makes enabling USB support
trickier than it needs to be. How about just dropping all dependencies
if it compiles cleanly on all arches ?

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v2 1/2] ARM: Exynos5250: Enabling samsung-usbphy driver

2013-01-30 Thread Vivek Gautam
Hi Kukjin,


On Wed, Jan 30, 2013 at 10:36 AM, Kukjin Kim  wrote:
> Vivek Gautam wrote:
>>
>> Adding usbphy node for Exynos5250 along with the
>> necessary device data to be parsed.
>>
>> Signed-off-by: Vivek Gautam 
>> ---
>>  arch/arm/boot/dts/exynos5250.dtsi |   15 +++
>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi
>> b/arch/arm/boot/dts/exynos5250.dtsi
>> index 30485de..610e338 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -275,6 +275,21 @@
>>   #size-cells = <0>;
>>   };
>>
>> + usbphy@1213 {
>
> Please put above node by order of address.
>

Sure will do that. Actually thought the listing was as per IPs.

>> + compatible = "samsung,exynos5250-usbphy";
>> + reg = <0x1213 0x100>;
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + ranges;
>> +
>> + usbphy-sys {
>> +   /* USB device and host PHY_CONTROL registers
> */
>
> Please add the binding documentation instead of comment here.
>

Bindings documentation already added at
"Documentation/devicetree/bindings/usb/samsung-usbphy.txt"
merged in 'usb-next'.

>> + reg = <0x10040704 0x8>,
>> +   /* USB2.0 PHY configuration register */
>> +   <0x10050230 0x4>;
>> + };
>> + };
>> +
>>   amba {
>>   #address-cells = <1>;
>>   #size-cells = <1>;
>> --
>> 1.7.6.5
>




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