Re: [PATCH 2/4] USB: dwc3: Adjust runtime pm the dwc3 driver to allow runtime suspend

2013-02-27 Thread Felipe Balbi
Hi,

sorry for the delay

On Mon, Jan 28, 2013 at 07:06:56PM +0530, Vivek Gautam wrote:
 Hi Felipe,
 
 
 On Mon, Jan 28, 2013 at 5:15 PM, Felipe Balbi ba...@ti.com wrote:
  On Mon, Jan 28, 2013 at 05:12:26PM +0530, Vivek Gautam wrote:
  The current code in the dwc3 probe effectively disables runtime pm
  from ever working because it calls a get() that was never put() until
  device removal.  Change the runtime pm code to match the standard
  formula and allow runtime pm to function.
 
  Note that this doesn't enable full runtime pm on the DWC3 device in
  that the port isn't put into a lower power mode when not used.
  However it does allow users of dwc3 (like dwc3-exynos) to do some
  amount of runtime power management.
 
  Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
  Signed-off-by: Doug Anderson diand...@chromium.org
  ---
   drivers/usb/dwc3/core.c |4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)
 
  diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
  index 3a4004a..59c2494 100644
  --- a/drivers/usb/dwc3/core.c
  +++ b/drivers/usb/dwc3/core.c
  @@ -453,6 +453,7 @@ static int dwc3_probe(struct platform_device *pdev)
if (of_get_property(node, tx-fifo-resize, NULL))
dwc-needs_fifo_resize = true;
 
  + pm_runtime_set_active(dev);
 
  this usage of pm_runtime_set_active() actually makes me a bit scared. At
  least OMAP starts with the device switched off, so this will probably
  break OMAP at least.
 
 I am fine with dropping pm_runtime_set_active(), actually thought
 to put device in active state so that as and when system finds it idle,
 force into suspend state.
 
 I fact should i drop  pm_runtime_set_active() calls from other places too
 (xhci-plat, dwc3-exynos, and samsung-usb3 phy) and call get_sync() alongwith
 enable() ?

that's correct, make sure it works fine for you ;-)

-- 
balbi


signature.asc
Description: Digital signature


Re: [RESEND PATCH v9 0/2] usb: phy: samsung: Introducing usb phy driver for samsung SoCs

2013-02-27 Thread Felipe Balbi
Hi,

On Fri, Jan 18, 2013 at 02:30:21PM +0530, Praveen Paneri wrote:
 Changes from v8:
 Resending this patch series after rebasing to the latest usb-next branch.
 Rewording inline comments for better readability.
 Removed IS_ENABLED(CONFIG_OF) as pdev-dev.of_node is enough to check for dt 
 support.
 Using of_match_ptr to add of_match_table to platform_driver structure.
 Removed unnecessary variables.

trying applying these but it doesn't apply unfortunately.

-- 
balbi


signature.asc
Description: Digital signature


Re: [RESEND PATCH v9 0/2] usb: phy: samsung: Introducing usb phy driver for samsung SoCs

2013-02-27 Thread Vivek Gautam
Hi Balbi,


On Wed, Feb 27, 2013 at 1:45 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 On Fri, Jan 18, 2013 at 02:30:21PM +0530, Praveen Paneri wrote:
 Changes from v8:
 Resending this patch series after rebasing to the latest usb-next branch.
 Rewording inline comments for better readability.
 Removed IS_ENABLED(CONFIG_OF) as pdev-dev.of_node is enough to check for dt 
 support.
 Using of_match_ptr to add of_match_table to platform_driver structure.
 Removed unnecessary variables.

 trying applying these but it doesn't apply unfortunately.


Already present in 3.8.0 ? ;-)


-- 
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


Re: [RESEND PATCH v9 0/2] usb: phy: samsung: Introducing usb phy driver for samsung SoCs

2013-02-27 Thread Felipe Balbi
On Wed, Feb 27, 2013 at 02:00:25PM +0530, Vivek Gautam wrote:
 Hi Balbi,
 
 
 On Wed, Feb 27, 2013 at 1:45 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
 
  On Fri, Jan 18, 2013 at 02:30:21PM +0530, Praveen Paneri wrote:
  Changes from v8:
  Resending this patch series after rebasing to the latest usb-next branch.
  Rewording inline comments for better readability.
  Removed IS_ENABLED(CONFIG_OF) as pdev-dev.of_node is enough to check for 
  dt support.
  Using of_match_ptr to add of_match_table to platform_driver structure.
  Removed unnecessary variables.
 
  trying applying these but it doesn't apply unfortunately.
 
 
 Already present in 3.8.0 ? ;-)

heh, my bad. For whatever reason it was still marked as unread.

-- 
balbi


signature.asc
Description: Digital signature


Re: [RESEND PATCH v9 0/2] usb: phy: samsung: Introducing usb phy driver for samsung SoCs

2013-02-27 Thread Tomasz Figa
On Wednesday 27 of February 2013 14:00:25 Vivek Gautam wrote:
 Hi Balbi,
 
 On Wed, Feb 27, 2013 at 1:45 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
  
  On Fri, Jan 18, 2013 at 02:30:21PM +0530, Praveen Paneri wrote:
  Changes from v8:
  Resending this patch series after rebasing to the latest usb-next
  branch. Rewording inline comments for better readability.
  Removed IS_ENABLED(CONFIG_OF) as pdev-dev.of_node is enough to check
  for dt support. Using of_match_ptr to add of_match_table to
  platform_driver structure. Removed unnecessary variables.
  
  trying applying these but it doesn't apply unfortunately.
 
 Already present in 3.8.0 ? ;-)

That's great. I will send my patch adding Exynos 4x12 support in next 
days.

Best regards,
Tomasz

--
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 v5 0/5] Add DRM FIMD DT support for Exynos4 DT Machines

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

changes since v4:
- moved the fimd binding documentation to 
Documentation/devicetree/bindings/video/
as suggested by Sylwester Nawrocki sylvester.nawro...@gmail.com

- added more fimd compatiblity strings in fimd documentation as
discussed at  https://patchwork.kernel.org/patch/2144861/ with
Sylwester Nawrocki sylvester.nawro...@gmail.com and
Tomasz Figa tomasz.f...@gmail.com

- modified compatible string for exynos4 fimd as exynos4210-fimd
exynos5 fimd as exynos5250-fimd to stick to the rule that compatible
value should be named after first specific SoC model in which this
particular IP version was included as discussed at
https://patchwork.kernel.org/patch/2144861/

- documented more about the interrupt combiner and their order as 
suggested by Sylwester Nawrocki sylvester.nawro...@gmail.com

changes since v3:
- rebased on

http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=shortlog;h=refs/heads/for-next-next

changes since v2:
- added alias to 'fimd@11c0' node
(reported by: Rahul Sharma r.sh.o...@gmail.com)
- removed 'lcd0_data' node as there was already a similar node 
lcd_data24
(reported by: Jingoo Han jg1@samsung.com
- replaced spaces with tabs in display-timing node

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-next
http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=shortlog;h=refs/heads/for-next-next

Sachin Kamat (1):
  ARM: dts: Add lcd pinctrl node entries for 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: add FIMD AUXDATA node entry for exynos4 DT
  ARM: exynos: dts: Add FIMD DT binding Documentation

 .../devicetree/bindings/video/exynos-fimd.txt  |   46 
 arch/arm/boot/dts/exynos4.dtsi |7 +++
 arch/arm/boot/dts/exynos4412-origen.dts|   22 ++
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi  |   14 ++
 arch/arm/mach-exynos/mach-exynos4-dt.c |2 +
 5 files changed, 91 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/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


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

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

Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org
---
 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 6581bb2..416a639 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -297,4 +297,11 @@
interrupts = 0 34 0;
};
};
+
+   fimd: fimd@11c0 {
+   compatible = samsung,exynos4210-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 v5 2/5] ARM: dts: Add lcd pinctrl node entries for EXYNOS4412 SoC

2013-02-27 Thread Vikas Sajjan
From: Sachin Kamat sachin.ka...@linaro.org

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

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org
---
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi 
b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
index 099cec7..a59d69c 100644
--- a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
@@ -354,6 +354,20 @@
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;
+   };
+
+   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 v5 3/5] ARM: dts: Add FIMD node and display timing node to exynos4412-origen.dts

2013-02-27 Thread Vikas Sajjan
Adds FIMD DT support to Origen quad board

Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org
---
 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 31e14c4..a6fd41f 100644
--- a/arch/arm/boot/dts/exynos4412-origen.dts
+++ b/arch/arm/boot/dts/exynos4412-origen.dts
@@ -70,6 +70,28 @@
status = okay;
};
 
+   fimd@11c0 {
+   samsung,power-domain = pd_lcd0;
+   pinctrl-0 = lcd_sync lcd_clk lcd_en lcd_data24 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 v5 4/5] ARM: dts: add FIMD AUXDATA node entry for exynos4 DT

2013-02-27 Thread Vikas Sajjan
Adds the FIMD AUXDATA node

Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org
---
 arch/arm/mach-exynos/mach-exynos4-dt.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c 
b/arch/arm/mach-exynos/mach-exynos4-dt.c
index b68115a..b32a929 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -84,6 +84,8 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] 
__initconst = {
OF_DEV_AUXDATA(samsung,exynos4210-tmu, EXYNOS4_PA_TMU,
exynos-tmu, NULL),
OF_DEV_AUXDATA(samsung,mfc-v5, 0x1340, s5p-mfc, NULL),
+   OF_DEV_AUXDATA(samsung,exynos4210-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 v5 5/5] ARM: exynos: dts: Add FIMD DT binding Documentation

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

Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org
---
 .../devicetree/bindings/video/exynos-fimd.txt  |   46 
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/exynos-fimd.txt

diff --git a/Documentation/devicetree/bindings/video/exynos-fimd.txt 
b/Documentation/devicetree/bindings/video/exynos-fimd.txt
new file mode 100644
index 000..b3542b9
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/exynos-fimd.txt
@@ -0,0 +1,46 @@
+Device-Tree bindings for Exynos SoC display controller (FIMD)
+
+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 can be one these below
+   samsung,s3c2443-fimd; /* for S3C24XX SoCs */
+   samsung,s3c6400-fimd; /* for S3C64XX SoCs */
+   samsung,s5p6440-fimd; /* for S5P64X0 SoCs */
+   samsung,s5pc100-fimd; /* for S5PC100 SoC  */
+   samsung,s5pv210-fimd; /* for S5PV210 SoC */
+   samsung,exynos4210-fimd; /* for Exynos4 SoCs */
+   samsung,exynos5250-fimd; /* for Exynos5 SoCs */
+- 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
+   we have 3 interrupts and the Interrupt combiner order is
+   FIFO Level, VSYNC and LCD_SYSTEM. Make sure to mention order
+   as VSYNC, FIFO Level and LCD_SYSTEM as show in the example 
below.
+- 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
+
+Example:
+
+SoC specific DT Entry:
+
+   fimd@11c0 {
+   compatible = samsung,exynos4210-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


Re: [PATCH 1/3] ARM: dts: Add FIMD node to exynos5

2013-02-27 Thread Vikas Sajjan
Hi Leela,

On Tue, Feb 26, 2013 at 4:55 PM, Leela Krishna Amudala
l.kris...@samsung.com wrote:
 This adds common FIMD device node for all Exynos5 SoCs.

 Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
 ---
  arch/arm/boot/dts/exynos5250.dtsi | 7 +++
  1 file changed, 7 insertions(+)

 diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
 b/arch/arm/boot/dts/exynos5250.dtsi
 index 3acf594..0ee4706 100644
 --- a/arch/arm/boot/dts/exynos5250.dtsi
 +++ b/arch/arm/boot/dts/exynos5250.dtsi
 @@ -583,4 +583,11 @@
 reg = 0x1445 0x1;
 interrupts = 0 94 0;
 };
 +
 +   fimd {
 +   compatible = samsung,exynos5-fimd;
I think we can modify this as samsung,exynos5250-fimd, please refer
to the discussion at https://patchwork.kernel.org/patch/2144861/
 +   interrupt-parent = combiner;
 +   reg = 0x1440 0x4;
 +   interrupts = 18 5, 18 4, 18 6;
 +   };
  };
 --
 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
--
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 3/3] ARM: Exynos5: add FIMD AUXDATA entry for exynos5 DT

2013-02-27 Thread Vikas Sajjan
Hi Leela,

On Tue, Feb 26, 2013 at 4:55 PM, Leela Krishna Amudala
l.kris...@samsung.com wrote:
 Adds the FIMD AUXDATA entry for Exynos5

 Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
 ---
  arch/arm/mach-exynos/include/mach/map.h | 1 +
  arch/arm/mach-exynos/mach-exynos5-dt.c  | 2 ++
  2 files changed, 3 insertions(+)

 diff --git a/arch/arm/mach-exynos/include/mach/map.h 
 b/arch/arm/mach-exynos/include/mach/map.h
 index 1df6abb..5e3f789 100644
 --- a/arch/arm/mach-exynos/include/mach/map.h
 +++ b/arch/arm/mach-exynos/include/mach/map.h
 @@ -178,6 +178,7 @@
  #define EXYNOS4_PA_MIPI_CSIS1  0x1189

  #define EXYNOS4_PA_FIMD0   0x11C0
 +#define EXYNOS5_PA_FIMD1   0x1440

  #define EXYNOS4_PA_HSMMC(x)(0x1251 + ((x) * 0x1))
  #define EXYNOS4_PA_DWMCI   0x1255
 diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
 b/arch/arm/mach-exynos/mach-exynos5-dt.c
 index e99d3d8..14b3ec1 100644
 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c
 +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
 @@ -104,6 +104,8 @@ static const struct of_dev_auxdata 
 exynos5250_auxdata_lookup[] __initconst = {
 OF_DEV_AUXDATA(samsung,mfc-v6, 0x1100, s5p-mfc-v6, NULL),
 OF_DEV_AUXDATA(samsung,exynos5250-tmu, 0x1006,
 exynos-tmu, NULL),
 +   OF_DEV_AUXDATA(samsung,exynos5-fimd, EXYNOS5_PA_FIMD1,
 +   exynos5-fb.1, NULL),
 please refer to the discussion at https://patchwork.kernel.org/patch/2144861/
 {},
  };

 --
 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
--
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 2/4] USB: dwc3: Adjust runtime pm the dwc3 driver to allow runtime suspend

2013-02-27 Thread Vivek Gautam
Hi Felipe,


On Wed, Feb 27, 2013 at 1:36 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 sorry for the delay


That's alright ;-)

 On Mon, Jan 28, 2013 at 07:06:56PM +0530, Vivek Gautam wrote:
 Hi Felipe,


 On Mon, Jan 28, 2013 at 5:15 PM, Felipe Balbi ba...@ti.com wrote:
  On Mon, Jan 28, 2013 at 05:12:26PM +0530, Vivek Gautam wrote:
  The current code in the dwc3 probe effectively disables runtime pm
  from ever working because it calls a get() that was never put() until
  device removal.  Change the runtime pm code to match the standard
  formula and allow runtime pm to function.
 
  Note that this doesn't enable full runtime pm on the DWC3 device in
  that the port isn't put into a lower power mode when not used.
  However it does allow users of dwc3 (like dwc3-exynos) to do some
  amount of runtime power management.
 
  Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
  Signed-off-by: Doug Anderson diand...@chromium.org
  ---
   drivers/usb/dwc3/core.c |4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)
 
  diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
  index 3a4004a..59c2494 100644
  --- a/drivers/usb/dwc3/core.c
  +++ b/drivers/usb/dwc3/core.c
  @@ -453,6 +453,7 @@ static int dwc3_probe(struct platform_device *pdev)
if (of_get_property(node, tx-fifo-resize, NULL))
dwc-needs_fifo_resize = true;
 
  + pm_runtime_set_active(dev);
 
  this usage of pm_runtime_set_active() actually makes me a bit scared. At
  least OMAP starts with the device switched off, so this will probably
  break OMAP at least.

 I am fine with dropping pm_runtime_set_active(), actually thought
 to put device in active state so that as and when system finds it idle,
 force into suspend state.

 I fact should i drop  pm_runtime_set_active() calls from other places too
 (xhci-plat, dwc3-exynos, and samsung-usb3 phy) and call get_sync() alongwith
 enable() ?

 that's correct, make sure it works fine for you ;-)

Yeah sure.


-- 
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


[PATCH V2 0/3] Add FIMD DT support for Exynos5 DT Machines

2013-02-27 Thread Leela Krishna Amudala
This patch series adds support for FIMD DT for Exynos5 DT Machines
Adds display timing node for smdk5250 board.

changes since v1:
- modified compatible string for exynos5 fimd as exynos5250-fimd

This series is rebased on branch
http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=shortlog;h=refs/heads/for-next

Leela Krishna Amudala (3):
  ARM: dts: Add FIMD node to exynos5
  ARM: dts: Add display timing node to exynos5250-smdk5250.dts
  ARM: Exynos5: add FIMD AUXDATA entry for exynos5 DT

 arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 
 arch/arm/boot/dts/exynos5250.dtsi |  7 +++
 arch/arm/mach-exynos/include/mach/map.h   |  1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c|  2 ++
 4 files changed, 26 insertions(+)

-- 
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


[PATCH V2 1/3] ARM: dts: Add FIMD node to exynos5

2013-02-27 Thread Leela Krishna Amudala
This adds common FIMD device node for all Exynos5 SoCs.

Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
---
 arch/arm/boot/dts/exynos5250.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index 3acf594..fc3d236 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -583,4 +583,11 @@
reg = 0x1445 0x1;
interrupts = 0 94 0;
};
+
+   fimd {
+   compatible = samsung,exynos5250-fimd;
+   interrupt-parent = combiner;
+   reg = 0x1440 0x4;
+   interrupts = 18 5, 18 4, 18 6;
+   };
 };
-- 
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


[PATCH V2 2/3] ARM: dts: Add display timing node to exynos5250-smdk5250.dts

2013-02-27 Thread Leela Krishna Amudala
Add display timing node to exynos5250-smdk5250.dts

Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
---
 arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts 
b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index e05b18f..2d8c577 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -204,4 +204,20 @@
samsung,mfc-r = 0x4300 0x80;
samsung,mfc-l = 0x5100 0x80;
};
+
+   display-timings {
+   native-mode = timing0;
+   timing0: timing@0 {
+   /* 1280x800 */
+   clock-frequency = 5;
+   hactive = 1280;
+   vactive = 800;
+   hfront-porch = 4;
+   hback-porch = 4;
+   hsync-len = 4;
+   vback-porch = 4;
+   vfront-porch = 4;
+   vsync-len = 4;
+   };
+   };
 };
-- 
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


[PATCH V2 3/3] ARM: Exynos5: add FIMD AUXDATA entry for exynos5 DT

2013-02-27 Thread Leela Krishna Amudala
Adds the FIMD AUXDATA entry for Exynos5

Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
---
 arch/arm/mach-exynos/include/mach/map.h | 1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c  | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/arm/mach-exynos/include/mach/map.h 
b/arch/arm/mach-exynos/include/mach/map.h
index 1df6abb..5e3f789 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -178,6 +178,7 @@
 #define EXYNOS4_PA_MIPI_CSIS1  0x1189
 
 #define EXYNOS4_PA_FIMD0   0x11C0
+#define EXYNOS5_PA_FIMD1   0x1440
 
 #define EXYNOS4_PA_HSMMC(x)(0x1251 + ((x) * 0x1))
 #define EXYNOS4_PA_DWMCI   0x1255
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
b/arch/arm/mach-exynos/mach-exynos5-dt.c
index e99d3d8..4c69c23 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -104,6 +104,8 @@ static const struct of_dev_auxdata 
exynos5250_auxdata_lookup[] __initconst = {
OF_DEV_AUXDATA(samsung,mfc-v6, 0x1100, s5p-mfc-v6, NULL),
OF_DEV_AUXDATA(samsung,exynos5250-tmu, 0x1006,
exynos-tmu, NULL),
+   OF_DEV_AUXDATA(samsung,exynos5250-fimd, EXYNOS5_PA_FIMD1,
+   exynos5-fb.1, NULL),
{},
 };
 
-- 
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 1/3] ARM: dts: Add FIMD node to exynos5

2013-02-27 Thread Leela Krishna Amudala
Hello Vikas,

On Wed, Feb 27, 2013 at 2:15 PM, Vikas Sajjan sajjan.li...@gmail.com wrote:

 Hi Leela,

 On Tue, Feb 26, 2013 at 4:55 PM, Leela Krishna Amudala
 l.kris...@samsung.com wrote:
  This adds common FIMD device node for all Exynos5 SoCs.
 
  Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
  ---
   arch/arm/boot/dts/exynos5250.dtsi | 7 +++
   1 file changed, 7 insertions(+)
 
  diff --git a/arch/arm/boot/dts/exynos5250.dtsi
  b/arch/arm/boot/dts/exynos5250.dtsi
  index 3acf594..0ee4706 100644
  --- a/arch/arm/boot/dts/exynos5250.dtsi
  +++ b/arch/arm/boot/dts/exynos5250.dtsi
  @@ -583,4 +583,11 @@
  reg = 0x1445 0x1;
  interrupts = 0 94 0;
  };
  +
  +   fimd {
  +   compatible = samsung,exynos5-fimd;
 I think we can modify this as samsung,exynos5250-fimd, please refer
 to the discussion at https://patchwork.kernel.org/patch/2144861/

Then in that case this compatible string has to be modify in driver also.

Best wishes,
Leela Krishna Amudala.

  +   interrupt-parent = combiner;
  +   reg = 0x1440 0x4;
  +   interrupts = 18 5, 18 4, 18 6;
  +   };
   };
  --
  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
 --
 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
--
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 1/3] ARM: dts: Add FIMD node to exynos5

2013-02-27 Thread Vikas Sajjan
Hi Leela,

On Wed, Feb 27, 2013 at 2:56 PM, Leela Krishna Amudala
l.kris...@samsung.com wrote:
 Hello Vikas,

 On Wed, Feb 27, 2013 at 2:15 PM, Vikas Sajjan sajjan.li...@gmail.com wrote:

 Hi Leela,

 On Tue, Feb 26, 2013 at 4:55 PM, Leela Krishna Amudala
 l.kris...@samsung.com wrote:
  This adds common FIMD device node for all Exynos5 SoCs.
 
  Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
  ---
   arch/arm/boot/dts/exynos5250.dtsi | 7 +++
   1 file changed, 7 insertions(+)
 
  diff --git a/arch/arm/boot/dts/exynos5250.dtsi
  b/arch/arm/boot/dts/exynos5250.dtsi
  index 3acf594..0ee4706 100644
  --- a/arch/arm/boot/dts/exynos5250.dtsi
  +++ b/arch/arm/boot/dts/exynos5250.dtsi
  @@ -583,4 +583,11 @@
  reg = 0x1445 0x1;
  interrupts = 0 94 0;
  };
  +
  +   fimd {
  +   compatible = samsung,exynos5-fimd;
 I think we can modify this as samsung,exynos5250-fimd, please refer
 to the discussion at https://patchwork.kernel.org/patch/2144861/

 Then in that case this compatible string has to be modify in driver also.

yea, right. Will be posting the changes soon.


 Best wishes,
 Leela Krishna Amudala.

  +   interrupt-parent = combiner;
  +   reg = 0x1440 0x4;
  +   interrupts = 18 5, 18 4, 18 6;
  +   };
   };
  --
  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
 --
 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
--
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] usb: phy: samsung: let it be built as a module

2013-02-27 Thread Felipe Balbi
There's no reason not to allow samsung PHY
drivers be built as modules. This patch changes
Kconfig to allow that.

Signed-off-by: Felipe Balbi ba...@ti.com
---

Hi,

I will take your patches but I'm planning to add this on top
as there is no reason not to allow these drivers being built
as modules.

cheers

 drivers/usb/phy/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 723d7b1..4f696d0 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -67,7 +67,7 @@ config USB_RCAR_PHY
  module will be called rcar-phy.
 
 config SAMSUNG_USB2PHY
-   bool Samsung USB 2.0 PHY controller Driver
+   tristate Samsung USB 2.0 PHY controller Driver
select SAMSUNG_USBPHY
select USB_OTG_UTILS
help
@@ -75,7 +75,7 @@ config SAMSUNG_USB2PHY
  driver for Samsung SoCs.
 
 config SAMSUNG_USB3PHY
-   bool Samsung USB 3.0 PHY controller Driver
+   tristate Samsung USB 3.0 PHY controller Driver
select SAMSUNG_USBPHY
select USB_OTG_UTILS
help
@@ -83,7 +83,7 @@ config SAMSUNG_USB3PHY
  for samsung SoCs.
 
 config SAMSUNG_USBPHY
-   bool Samsung USB PHY Driver
+   tristate Samsung USB PHY Driver
help
  Enable this to support Samsung USB phy helper driver for Samsung SoCs.
  This driver provides common interface to interact, for Samsung USB 
2.0 PHY
-- 
1.8.1.rc1.5.g7e0651a

--
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: SMDKV210 support issue in kernel 3.8 (dma-pl330 and HDMI failed)

2013-02-27 Thread Inderpal Singh
On 27 February 2013 02:52, Sylwester Nawrocki
sylvester.nawro...@gmail.com wrote:
 On 02/22/2013 01:00 PM, Lonsn wrote:

 Hi,
 I have tested the kernel 3.8 with a SMDKV210 like board. But I failed
 with dma-pl330 and HDMI driver.
 For dma-pl330, kernel print:
 dma-pl330 dma-pl330.0: PERIPH_ID 0x0, PCELL_ID 0x0 !
 dma-pl330: probe of dma-pl330.0 failed with error -22
 dma-pl330 dma-pl330.1: PERIPH_ID 0x0, PCELL_ID 0x0 !
 dma-pl330: probe of dma-pl330.1 failed with error -22


 Maybe there is some issue with the PL330 DMA controller clocks and the
 read values are all 0 because the clocks are disabled ?

 It seems arch/arm/mach-s5pv210/clock.c might be missing apb_pclk clock
 supply names, which I suspect may be required after commits:

 commit 7c71b8eb268ee38235f7e924d943ea9d90e59469
 Author: Inderpal Singh inderpal.si...@linaro.org
 Date:   Fri Sep 7 12:14:48 2012 +0530

 DMA: PL330: Remove redundant runtime_suspend/resume functions

 The driver's  runtime_suspend/resume functions just disable/enable
 the clock which is already being managed at AMBA bus level
 runtime_suspend/resume functions.

 Hence, remove the driver's runtime_suspend/resume functions.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 Tested-by: Chander Kashyap chander.kash...@linaro.org
 Signed-off-by: Vinod Koul vinod.k...@linux.intel.com

 commit faf6fbc6f2ca3b34bf464a8bb079a998e571957c
 Author: Inderpal Singh inderpal.si...@linaro.org
 Date:   Fri Sep 7 12:14:47 2012 +0530

 DMA: PL330: Remove controller clock enable/disable

 The controller clock is being enabled/disabled in AMBA bus
 infrastructre in probe/remove functions. Hence, its not required
 at driver level probe/remove.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 Tested-by: Chander Kashyap chander.kash...@linaro.org
 Signed-off-by: Vinod Koul vinod.k...@linux.intel.com

 I have added people who made related changes at Cc, hopefully they
 can provide some help in debugging this.


The mentioned patches just removed the redundant clock enable/disable
from the driver as clock is already being managed at amba bus level in
the same code path. As per my understanding the issue should come even
without these patches.

@Lonsn: Can you please test without these patches?

Thanks,
Inder

 Please try the following change:

 8
 diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
 index fcdf52d..87c7d3f 100644
 --- a/arch/arm/mach-s5pv210/clock.c
 +++ b/arch/arm/mach-s5pv210/clock.c
 @@ -214,11 +214,6 @@ static struct clk clk_pcmcdclk2 = {
 .name   = pcmcdclk,
  };

 -static struct clk dummy_apb_pclk = {
 -   .name   = apb_pclk,
 -   .id = -1,
 -};
 -
  static struct clk *clkset_vpllsrc_list[] = {
 [0] = clk_fin_vpll,
 [1] = clk_sclk_hdmi27m,
 @@ -1333,6 +1328,8 @@ static struct clk_lookup s5pv210_clk_lookup[] = {
 CLKDEV_INIT(NULL, spi_busclk0, clk_p),
 CLKDEV_INIT(s5pv210-spi.0, spi_busclk1, clk_sclk_spi0.clk),
 CLKDEV_INIT(s5pv210-spi.1, spi_busclk1, clk_sclk_spi1.clk),
 +   CLKDEV_INIT(dma-pl330.0, apb_pclk, init_clocks_off[0]),
 +   CLKDEV_INIT(dma-pl330.1, apb_pclk, init_clocks_off[1]),
  };

  void __init s5pv210_register_clocks(void)
 @@ -1361,6 +1358,5 @@ void __init s5pv210_register_clocks(void)
 for (ptr = 0; ptr  ARRAY_SIZE(clk_cdev); ptr++)
 s3c_disable_clocks(clk_cdev[ptr], 1);

 -   s3c24xx_register_clock(dummy_apb_pclk);
 s3c_pwmclk_init();
  }
 8

 If it works then we could make some cleaner patch.


 For HDMI driver,
 I have added the following HDMI related code to
 arch/arm/mach-s5pv210/mach-smdkv210.c:
 /* I2C module and id for HDMIPHY */
 static struct i2c_board_info hdmiphy_info = {
 I2C_BOARD_INFO(hdmiphy-s5pv210, 0x38),
 };

 i2c_register_board_info(2, smdkv210_i2c_devs2,
 ARRAY_SIZE(smdkv210_i2c_devs2));

 s5p_i2c_hdmiphy_set_platdata(NULL);
 s5p_hdmi_set_platdata(hdmiphy_info, NULL, 0);

 s3c_ide_set_platdata(smdkv210_ide_pdata);

 then kernel print:
 s5p-hdmi s5pv210-hdmi: hdmiphy adapter request failed
 s5p-hdmi s5pv210-hdmi: probe failed
 Samsung TV Mixer driver, (c) 2010-2011 Samsung Electronics Co., Ltd.

 s5p-mixer s5p-mixer: probe start
 s5p-mixer s5p-mixer: resources acquired
 s5p-mixer s5p-mixer: module s5p-hdmi provides no subdev!
 s5p-mixer s5p-mixer: module s5p-sdo provides no subdev!
 s5p-mixer s5p-mixer: failed to register any output
 s5p-mixer s5p-mixer: probe failed

 Can anybody help me on how to config the HDMI output function in linux
 kernel 3.8? I mainly want to do video hardware decode using s5pv210 MFC
 and then display with HDMI.


 For video playback (video post-processing) you might also need at least one
 FIMC device. Please refer to arch/arm/mach-goni.c for an example on how to
 add related devices to your board. You don't need the camera stuff, just
 add:

  

Re: SMDKV210 support issue in kernel 3.8 (dma-pl330 and HDMI failed)

2013-02-27 Thread Sylwester Nawrocki
On 02/27/2013 11:51 AM, Inderpal Singh wrote:
 On 27 February 2013 02:52, Sylwester Nawrocki
 sylvester.nawro...@gmail.com wrote:
 On 02/22/2013 01:00 PM, Lonsn wrote:

 Hi,
 I have tested the kernel 3.8 with a SMDKV210 like board. But I failed
 with dma-pl330 and HDMI driver.
 For dma-pl330, kernel print:
 dma-pl330 dma-pl330.0: PERIPH_ID 0x0, PCELL_ID 0x0 !
 dma-pl330: probe of dma-pl330.0 failed with error -22
 dma-pl330 dma-pl330.1: PERIPH_ID 0x0, PCELL_ID 0x0 !
 dma-pl330: probe of dma-pl330.1 failed with error -22


 Maybe there is some issue with the PL330 DMA controller clocks and the
 read values are all 0 because the clocks are disabled ?

 It seems arch/arm/mach-s5pv210/clock.c might be missing apb_pclk clock
 supply names, which I suspect may be required after commits:

 commit 7c71b8eb268ee38235f7e924d943ea9d90e59469
 Author: Inderpal Singh inderpal.si...@linaro.org
 Date:   Fri Sep 7 12:14:48 2012 +0530

 DMA: PL330: Remove redundant runtime_suspend/resume functions

 The driver's  runtime_suspend/resume functions just disable/enable
 the clock which is already being managed at AMBA bus level
 runtime_suspend/resume functions.

 Hence, remove the driver's runtime_suspend/resume functions.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 Tested-by: Chander Kashyap chander.kash...@linaro.org
 Signed-off-by: Vinod Koul vinod.k...@linux.intel.com

 commit faf6fbc6f2ca3b34bf464a8bb079a998e571957c
 Author: Inderpal Singh inderpal.si...@linaro.org
 Date:   Fri Sep 7 12:14:47 2012 +0530

 DMA: PL330: Remove controller clock enable/disable

 The controller clock is being enabled/disabled in AMBA bus
 infrastructre in probe/remove functions. Hence, its not required
 at driver level probe/remove.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 Tested-by: Chander Kashyap chander.kash...@linaro.org
 Signed-off-by: Vinod Koul vinod.k...@linux.intel.com

 I have added people who made related changes at Cc, hopefully they
 can provide some help in debugging this.

 
 The mentioned patches just removed the redundant clock enable/disable
 from the driver as clock is already being managed at amba bus level in
 the same code path. As per my understanding the issue should come even
 without these patches.

But were the clocks managed directly by the pl330 driver same as those
managed at amba bus level ? The first patch as above removed chunk

@@ -2887,24 +2884,17 @@ pl330_probe(struct amba_device *adev, const struct
amba_id *id)
goto probe_err1;
}

-   pdmac-clk = clk_get(adev-dev, dma);
-   if (IS_ERR(pdmac-clk)) {
-   dev_err(adev-dev, Cannot get operation clock.\n);
-   ret = -EINVAL;
-   goto probe_err2;
-   }
-

which suggest the driver was enabling directly dma clocks, defined at
S5PV210 platform level as:

{
.name   = dma,
.devname= dma-pl330.0,
.parent = clk_hclk_psys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit= (1  3),
}, {
.name   = dma,
.devname= dma-pl330.1,
.parent = clk_hclk_psys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit= (1  4),
}, {

And amba bus was getting only dummy clocks behind apb_pclk clock
conn_id.

 @Lonsn: Can you please test without these patches?

I suspect reverting only patch
DMA: PL330: Remove redundant runtime_suspend/resume functions
with PM_RUNTIME enabled might fix the issue.

--

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] usb: phy: samsung: let it be built as a module

2013-02-27 Thread Vivek Gautam
Hi Felipe,


On Wed, Feb 27, 2013 at 4:18 PM, Felipe Balbi ba...@ti.com wrote:
 There's no reason not to allow samsung PHY
 drivers be built as modules. This patch changes
 Kconfig to allow that.

 Signed-off-by: Felipe Balbi ba...@ti.com
 ---

 Hi,

 I will take your patches but I'm planning to add this on top
 as there is no reason not to allow these drivers being built
 as modules.


aargh !! my bad :-(
actually missed exporting the symbols in drivers/usb/phy/samsung-usbphy.c
Getting compile errors.
Shall i just update the patch [PATCH v5 0/2] Adding USB 3.0 DRD-phy
support for exynos5250
or send a separate patch on top so that you can squash this change
along with. ;-)

 cheers

  drivers/usb/phy/Kconfig | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

 diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
 index 723d7b1..4f696d0 100644
 --- a/drivers/usb/phy/Kconfig
 +++ b/drivers/usb/phy/Kconfig
 @@ -67,7 +67,7 @@ config USB_RCAR_PHY
   module will be called rcar-phy.

  config SAMSUNG_USB2PHY
 -   bool Samsung USB 2.0 PHY controller Driver
 +   tristate Samsung USB 2.0 PHY controller Driver
 select SAMSUNG_USBPHY
 select USB_OTG_UTILS
 help
 @@ -75,7 +75,7 @@ config SAMSUNG_USB2PHY
   driver for Samsung SoCs.

  config SAMSUNG_USB3PHY
 -   bool Samsung USB 3.0 PHY controller Driver
 +   tristate Samsung USB 3.0 PHY controller Driver
 select SAMSUNG_USBPHY
 select USB_OTG_UTILS
 help
 @@ -83,7 +83,7 @@ config SAMSUNG_USB3PHY
   for samsung SoCs.

  config SAMSUNG_USBPHY
 -   bool Samsung USB PHY Driver
 +   tristate Samsung USB PHY Driver
 help
   Enable this to support Samsung USB phy helper driver for Samsung 
 SoCs.
   This driver provides common interface to interact, for Samsung USB 
 2.0 PHY
 --
 1.8.1.rc1.5.g7e0651a



-- 
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


Re: [PATCH] usb: phy: samsung: let it be built as a module

2013-02-27 Thread Felipe Balbi
Hi,

On Wed, Feb 27, 2013 at 05:31:53PM +0530, Vivek Gautam wrote:
 Hi Felipe,
 
 
 On Wed, Feb 27, 2013 at 4:18 PM, Felipe Balbi ba...@ti.com wrote:
  There's no reason not to allow samsung PHY
  drivers be built as modules. This patch changes
  Kconfig to allow that.
 
  Signed-off-by: Felipe Balbi ba...@ti.com
  ---
 
  Hi,
 
  I will take your patches but I'm planning to add this on top
  as there is no reason not to allow these drivers being built
  as modules.
 
 
 aargh !! my bad :-(
 actually missed exporting the symbols in drivers/usb/phy/samsung-usbphy.c
 Getting compile errors.
 Shall i just update the patch [PATCH v5 0/2] Adding USB 3.0 DRD-phy
 support for exynos5250
 or send a separate patch on top so that you can squash this change
 along with. ;-)

there's still time to update the original. I'll drop all 3 patches for
now (both of yours and mine).

cheers

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] usb: phy: samsung: let it be built as a module

2013-02-27 Thread Vivek Gautam
On Wed, Feb 27, 2013 at 5:43 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 On Wed, Feb 27, 2013 at 05:31:53PM +0530, Vivek Gautam wrote:
 Hi Felipe,


 On Wed, Feb 27, 2013 at 4:18 PM, Felipe Balbi ba...@ti.com wrote:
  There's no reason not to allow samsung PHY
  drivers be built as modules. This patch changes
  Kconfig to allow that.
 
  Signed-off-by: Felipe Balbi ba...@ti.com
  ---
 
  Hi,
 
  I will take your patches but I'm planning to add this on top
  as there is no reason not to allow these drivers being built
  as modules.
 

 aargh !! my bad :-(
 actually missed exporting the symbols in drivers/usb/phy/samsung-usbphy.c
 Getting compile errors.
 Shall i just update the patch [PATCH v5 0/2] Adding USB 3.0 DRD-phy
 support for exynos5250
 or send a separate patch on top so that you can squash this change
 along with. ;-)

 there's still time to update the original. I'll drop all 3 patches for
 now (both of yours and mine).


Alright, i shall update the original patches and resend them after
adding this change for
EXPORT_SYMBOL_GPL() and also squashing your change for modules.


-- 
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


Re: [PATCH] usb: phy: samsung: let it be built as a module

2013-02-27 Thread Felipe Balbi
On Wed, Feb 27, 2013 at 05:47:29PM +0530, Vivek Gautam wrote:
 On Wed, Feb 27, 2013 at 5:43 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
 
  On Wed, Feb 27, 2013 at 05:31:53PM +0530, Vivek Gautam wrote:
  Hi Felipe,
 
 
  On Wed, Feb 27, 2013 at 4:18 PM, Felipe Balbi ba...@ti.com wrote:
   There's no reason not to allow samsung PHY
   drivers be built as modules. This patch changes
   Kconfig to allow that.
  
   Signed-off-by: Felipe Balbi ba...@ti.com
   ---
  
   Hi,
  
   I will take your patches but I'm planning to add this on top
   as there is no reason not to allow these drivers being built
   as modules.
  
 
  aargh !! my bad :-(
  actually missed exporting the symbols in drivers/usb/phy/samsung-usbphy.c
  Getting compile errors.
  Shall i just update the patch [PATCH v5 0/2] Adding USB 3.0 DRD-phy
  support for exynos5250
  or send a separate patch on top so that you can squash this change
  along with. ;-)
 
  there's still time to update the original. I'll drop all 3 patches for
  now (both of yours and mine).
 
 
 Alright, i shall update the original patches and resend them after
 adding this change for
 EXPORT_SYMBOL_GPL() and also squashing your change for modules.

k, thanks

-- 
balbi


signature.asc
Description: Digital signature


[PATCH v6 1/2] usb: phy: samsung: Common out the generic stuff

2013-02-27 Thread Vivek Gautam
Moving register and structure definitions to header file,
and keeping the generic functions to be used across
multiple PHYs in common phy helper driver under SAMSUNG_USBPHY,
and moving USB 2.0 PHY driver under SAMSUNG_USB2PHY.

Also allowing samsung PHY drivers be built as modules.

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
Signed-off-by: Felipe Balbi ba...@ti.com
Acked-by: Kukjin Kim kgene@samsung.com
---
 drivers/usb/phy/Kconfig   |   17 +-
 drivers/usb/phy/Makefile  |1 +
 drivers/usb/phy/samsung-usb2phy.c |  511 ++
 drivers/usb/phy/samsung-usbphy.c  |  722 +
 drivers/usb/phy/samsung-usbphy.h  |  247 +
 5 files changed, 785 insertions(+), 713 deletions(-)
 create mode 100644 drivers/usb/phy/samsung-usb2phy.c
 create mode 100644 drivers/usb/phy/samsung-usbphy.h

diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 65217a5..4d72962 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -66,10 +66,17 @@ config USB_RCAR_PHY
  To compile this driver as a module, choose M here: the
  module will be called rcar-phy.
 
-config SAMSUNG_USBPHY
-   bool Samsung USB PHY controller Driver
-   depends on USB_S3C_HSOTG || USB_EHCI_S5P || USB_OHCI_EXYNOS
+config SAMSUNG_USB2PHY
+   tristate Samsung USB 2.0 PHY controller Driver
+   select SAMSUNG_USBPHY
select USB_OTG_UTILS
help
- Enable this to support Samsung USB phy controller for samsung
- SoCs.
+ Enable this to support Samsung USB 2.0 (High Speed) PHY controller
+ driver for Samsung SoCs.
+
+config SAMSUNG_USBPHY
+   tristate Samsung USB PHY Driver
+   help
+ Enable this to support Samsung USB phy helper driver for Samsung SoCs.
+ This driver provides common interface to interact, for Samsung USB 
2.0 PHY
+ driver and later for Samsung USB 3.0 PHY driver.
diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
index b13faa1..1efa174 100644
--- a/drivers/usb/phy/Makefile
+++ b/drivers/usb/phy/Makefile
@@ -12,3 +12,4 @@ obj-$(CONFIG_MV_U3D_PHY)  += mv_u3d_phy.o
 obj-$(CONFIG_USB_EHCI_TEGRA)   += tegra_usb_phy.o
 obj-$(CONFIG_USB_RCAR_PHY) += rcar-phy.o
 obj-$(CONFIG_SAMSUNG_USBPHY)   += samsung-usbphy.o
+obj-$(CONFIG_SAMSUNG_USB2PHY)  += samsung-usb2phy.o
diff --git a/drivers/usb/phy/samsung-usb2phy.c 
b/drivers/usb/phy/samsung-usb2phy.c
new file mode 100644
index 000..55ac3a8
--- /dev/null
+++ b/drivers/usb/phy/samsung-usb2phy.c
@@ -0,0 +1,511 @@
+/* linux/drivers/usb/phy/samsung-usb2phy.c
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Praveen Paneri p.pan...@samsung.com
+ *
+ * Samsung USB2.0 PHY transceiver; talks to S3C HS OTG controller, EHCI-S5P and
+ * OHCI-EXYNOS controllers.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+#include linux/delay.h
+#include linux/device.h
+#include linux/err.h
+#include linux/io.h
+#include linux/of.h
+#include linux/usb/otg.h
+#include linux/usb/samsung_usb_phy.h
+#include linux/platform_data/samsung-usbphy.h
+
+#include samsung-usbphy.h
+
+int samsung_usb2phy_set_host(struct usb_otg *otg, struct usb_bus *host)
+{
+   if (!otg)
+   return -ENODEV;
+
+   if (!otg-host)
+   otg-host = host;
+
+   return 0;
+}
+
+static bool exynos5_phyhost_is_on(void *regs)
+{
+   u32 reg;
+
+   reg = readl(regs + EXYNOS5_PHY_HOST_CTRL0);
+
+   return !(reg  HOST_CTRL0_SIDDQ);
+}
+
+static void samsung_exynos5_usb2phy_enable(struct samsung_usbphy *sphy)
+{
+   void __iomem *regs = sphy-regs;
+   u32 phyclk = sphy-ref_clk_freq;
+   u32 phyhost;
+   u32 phyotg;
+   u32 phyhsic;
+   u32 ehcictrl;
+   u32 ohcictrl;
+
+   /*
+* phy_usage helps in keeping usage count for phy
+* so that the first consumer enabling the phy is also
+* the last consumer to disable it.
+*/
+
+   atomic_inc(sphy-phy_usage);
+
+   if (exynos5_phyhost_is_on(regs)) {
+   dev_info(sphy-dev, Already power on PHY\n);
+   return;
+   }
+
+   /* Host configuration */
+   phyhost = readl(regs + EXYNOS5_PHY_HOST_CTRL0);
+
+   /* phy reference clock configuration */
+   phyhost = ~HOST_CTRL0_FSEL_MASK;
+   phyhost |= HOST_CTRL0_FSEL(phyclk);
+
+   /* host phy reset */
+ 

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

2013-02-27 Thread Vivek Gautam
Adding PHY driver support for USB 3.0 controller for Samsung's
SoCs.

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
Signed-off-by: Felipe Balbi ba...@ti.com
Acked-by: Kukjin Kim kgene@samsung.com
---
 drivers/usb/phy/Kconfig   |8 +
 drivers/usb/phy/Makefile  |1 +
 drivers/usb/phy/samsung-usb3phy.c |  349 +
 drivers/usb/phy/samsung-usbphy.h  |   81 +
 4 files changed, 439 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/phy/samsung-usb3phy.c

diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 4d72962..4f696d0 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -74,6 +74,14 @@ config SAMSUNG_USB2PHY
  Enable this to support Samsung USB 2.0 (High Speed) PHY controller
  driver for Samsung SoCs.
 
+config SAMSUNG_USB3PHY
+   tristate Samsung USB 3.0 PHY controller Driver
+   select SAMSUNG_USBPHY
+   select USB_OTG_UTILS
+   help
+ Enable this to support Samsung USB 3.0 (Super Speed) phy controller
+ for samsung SoCs.
+
 config SAMSUNG_USBPHY
tristate Samsung USB PHY Driver
help
diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
index 1efa174..77f0b2e 100644
--- a/drivers/usb/phy/Makefile
+++ b/drivers/usb/phy/Makefile
@@ -13,3 +13,4 @@ obj-$(CONFIG_USB_EHCI_TEGRA)  += tegra_usb_phy.o
 obj-$(CONFIG_USB_RCAR_PHY) += rcar-phy.o
 obj-$(CONFIG_SAMSUNG_USBPHY)   += samsung-usbphy.o
 obj-$(CONFIG_SAMSUNG_USB2PHY)  += samsung-usb2phy.o
+obj-$(CONFIG_SAMSUNG_USB3PHY)  += samsung-usb3phy.o
diff --git a/drivers/usb/phy/samsung-usb3phy.c 
b/drivers/usb/phy/samsung-usb3phy.c
new file mode 100644
index 000..70e2c7b
--- /dev/null
+++ b/drivers/usb/phy/samsung-usb3phy.c
@@ -0,0 +1,349 @@
+/* linux/drivers/usb/phy/samsung-usb3phy.c
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Vivek Gautam gautam.vi...@samsung.com
+ *
+ * Samsung USB 3.0 PHY transceiver; talks to DWC3 controller.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/clk.h
+#include linux/delay.h
+#include linux/err.h
+#include linux/io.h
+#include linux/of.h
+#include linux/usb/samsung_usb_phy.h
+#include linux/platform_data/samsung-usbphy.h
+
+#include samsung-usbphy.h
+
+/*
+ * Sets the phy clk as EXTREFCLK (XXTI) which is internal clock from clock 
core.
+ */
+static u32 samsung_usb3phy_set_refclk(struct samsung_usbphy *sphy)
+{
+   u32 reg;
+   u32 refclk;
+
+   refclk = sphy-ref_clk_freq;
+
+   reg = PHYCLKRST_REFCLKSEL_EXT_REFCLK |
+   PHYCLKRST_FSEL(refclk);
+
+   switch (refclk) {
+   case FSEL_CLKSEL_50M:
+   reg |= (PHYCLKRST_MPLL_MULTIPLIER_50M_REF |
+   PHYCLKRST_SSC_REFCLKSEL(0x00));
+   break;
+   case FSEL_CLKSEL_20M:
+   reg |= (PHYCLKRST_MPLL_MULTIPLIER_20MHZ_REF |
+   PHYCLKRST_SSC_REFCLKSEL(0x00));
+   break;
+   case FSEL_CLKSEL_19200K:
+   reg |= (PHYCLKRST_MPLL_MULTIPLIER_19200KHZ_REF |
+   PHYCLKRST_SSC_REFCLKSEL(0x88));
+   break;
+   case FSEL_CLKSEL_24M:
+   default:
+   reg |= (PHYCLKRST_MPLL_MULTIPLIER_24MHZ_REF |
+   PHYCLKRST_SSC_REFCLKSEL(0x88));
+   break;
+   }
+
+   return reg;
+}
+
+static int samsung_exynos5_usb3phy_enable(struct samsung_usbphy *sphy)
+{
+   void __iomem *regs = sphy-regs;
+   u32 phyparam0;
+   u32 phyparam1;
+   u32 linksystem;
+   u32 phybatchg;
+   u32 phytest;
+   u32 phyclkrst;
+
+   /* Reset USB 3.0 PHY */
+   writel(0x0, regs + EXYNOS5_DRD_PHYREG0);
+
+   phyparam0 = readl(regs + EXYNOS5_DRD_PHYPARAM0);
+   /* Select PHY CLK source */
+   phyparam0 = ~PHYPARAM0_REF_USE_PAD;
+   /* Set Loss-of-Signal Detector sensitivity */
+   phyparam0 = ~PHYPARAM0_REF_LOSLEVEL_MASK;
+   phyparam0 |= PHYPARAM0_REF_LOSLEVEL;
+   writel(phyparam0, regs + EXYNOS5_DRD_PHYPARAM0);
+
+   writel(0x0, regs + EXYNOS5_DRD_PHYRESUME);
+
+   /*
+* Setting the Frame length Adj value[6:1] to default 0x20
+* See xHCI 1.0 spec, 5.2.4
+*/
+   linksystem = LINKSYSTEM_XHCI_VERSION_CONTROL |
+   LINKSYSTEM_FLADJ(0x20);
+   writel(linksystem, regs + EXYNOS5_DRD_LINKSYSTEM);
+
+   phyparam1 = readl(regs + 

Re: SMDKV210 support issue in kernel 3.8 (dma-pl330 and HDMI failed)

2013-02-27 Thread Lonsn

On 02/26/2013 09:07 PM, Sylwester Nawrocki wrote:

Hi Lonsn,

On 02/26/2013 01:59 PM, Lonsn wrote:

Now I checked HDMI failed at:
drivers/media/platform/s5p-tv/hdmi_drv.c: 912 line
adapter = i2c_get_adapter(pdata-hdmiphy_bus);
if (adapter == NULL) {
dev_err(dev, hdmiphy adapter request failed\n);
ret = -ENXIO;
goto fail_vdev;
}
Since pdata-hdmiphy_bus is 3, why i2c_get_adapter failed?


Do you have I2C3 bus controller device added to the list of devices
registered in the init_machine() callback, i.e. s3c_device_i2c3
entry in smdkv210_devices[] array ?

You can refer to arch/arm/mach-exynos/mach-universal_c210.c board file
for how a complete setup for the HDMI driver should look like. It's
for Exynos4210 SoCs but it should not be much different from what you
need for S5PV210.


To build the kernel with s3c_device_i2c3 S3C_DEV_I2C3 and
S5PV210_SETUP_I2C3
need to be selected in Kconfig, e.g.

diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 92ad72f..51ce100 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -151,12 +151,14 @@ config MACH_SMDKV210
 select S3C_DEV_HSMMC3
 select S3C_DEV_I2C1
 select S3C_DEV_I2C2
+   select S3C_DEV_I2C3
 select S3C_DEV_RTC
 select S3C_DEV_USB_HSOTG
 select S3C_DEV_WDT
 select S5PV210_SETUP_FB_24BPP
 select S5PV210_SETUP_I2C1
 select S5PV210_SETUP_I2C2
+   select S5PV210_SETUP_I2C3
 select S5PV210_SETUP_IDE
 select S5PV210_SETUP_KEYPAD
 select S5PV210_SETUP_SDHCI
Sylwester, thank you very much for your suggestions! Now HDMI phy has 
been detected after I add HDMI phy i2c bus in arch/arm/mach-s5pv210/Kconfig:

config MACH_SMDKV210
bool SMDKV210
select CPU_S5PV210
select S3C_DEV_FB
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3
select S3C_DEV_I2C1
select S3C_DEV_I2C2
+   select S5P_DEV_I2C_HDMIPHY
select S3C_DEV_RTC
select S3C_DEV_USB_HSOTG
and arch/arm/mach-s5pv210/mach-smdkv210.c:
static struct platform_device *smdkv210_devices[] __initdata = {
s3c_device_adc,
s3c_device_cfcon,
s3c_device_fb,
s3c_device_hsmmc0,
s3c_device_hsmmc1,
s3c_device_hsmmc2,
s3c_device_hsmmc3,
s3c_device_i2c0,
s3c_device_i2c1,
s3c_device_i2c2,
+   s5p_device_i2c_hdmiphy,
s3c_device_rtc,
s3c_device_ts,
s3c_device_usb_hsotg,
s3c_device_wdt,
s5p_device_fimc0,
s5p_device_fimc1,
s5p_device_fimc2,
s5p_device_fimc_md,
s5p_device_jpeg,
s5p_device_mfc,
s5p_device_mfc_l,
s5p_device_mfc_r,
s5pv210_device_ac97,
s5pv210_device_iis0,
s5pv210_device_spdif,
samsung_asoc_idma,
samsung_device_keypad,
smdkv210_dm9000,
//  smdkv210_lcd_lte480wv,
s5p_device_hdmi,
s5p_device_mixer,
};
Now kernel prints the following HDMI related:
m2m-testdev m2m-testdev.0: mem2mem-testdevDevice registered as /dev/video0
s5p-jpeg s5p-jpeg.0: encoder device registered as /dev/video1
s5p-jpeg s5p-jpeg.0: decoder device registered as /dev/video2
s5p-jpeg s5p-jpeg.0: Samsung S5P JPEG codec
s5p-mfc s5p-mfc: decoder registered as /dev/video3
s5p-mfc s5p-mfc: encoder registered as /dev/video4
s5p-hdmi s5pv210-hdmi: probe start
s5p-hdmi s5pv210-hdmi: HDMI resource init
s5p-hdmiphy 3-0038: probe successful
s5p-hdmi s5pv210-hdmi: probe successful
Samsung TV Mixer driver, (c) 2010-2011 Samsung Electronics Co., Ltd.

s5p-mixer s5p-mixer: probe start
s5p-mixer s5p-mixer: resources acquired
s5p-mixer s5p-mixer: added output 'S5P HDMI connector' from module 
's5p-hdmi'

s5p-mixer s5p-mixer: module s5p-sdo provides no subdev!
s5p-mixer s5p-mixer: registered layer graph0 as /dev/video5
s5p-mixer s5p-mixer: registered layer graph1 as /dev/video6
s5p-mixer s5p-mixer: registered layer video0 as /dev/video7
s5p-mixer s5p-mixer: probe successful

How can I test the HDMI output whether it's OK? Which /dev/video is real 
HDMI output? I have used 
http://git.infradead.org/users/kmpark/public-apps hdmi test program buf 
failed:

root@linaro-developer:/opt# ./tvdemo /dev/video7 720 480 0 0
ERROR(main.c:80) : VIDIOC_S_FMT failed: Invalid argument
Aborted
root@linaro-developer:/opt#
Maybe I still miss some configuration in mach-smdkv210.c.


--
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: SMDKV210 support issue in kernel 3.8 (dma-pl330 and HDMI failed)

2013-02-27 Thread Lonsn

于 2013/2/27 18:51, Inderpal Singh 写道:

On 27 February 2013 02:52, Sylwester Nawrocki
sylvester.nawro...@gmail.com wrote:

On 02/22/2013 01:00 PM, Lonsn wrote:


Hi,
I have tested the kernel 3.8 with a SMDKV210 like board. But I failed
with dma-pl330 and HDMI driver.
For dma-pl330, kernel print:
dma-pl330 dma-pl330.0: PERIPH_ID 0x0, PCELL_ID 0x0 !
dma-pl330: probe of dma-pl330.0 failed with error -22
dma-pl330 dma-pl330.1: PERIPH_ID 0x0, PCELL_ID 0x0 !
dma-pl330: probe of dma-pl330.1 failed with error -22



Maybe there is some issue with the PL330 DMA controller clocks and the
read values are all 0 because the clocks are disabled ?

It seems arch/arm/mach-s5pv210/clock.c might be missing apb_pclk clock
supply names, which I suspect may be required after commits:

commit 7c71b8eb268ee38235f7e924d943ea9d90e59469
Author: Inderpal Singh inderpal.si...@linaro.org
Date:   Fri Sep 7 12:14:48 2012 +0530

 DMA: PL330: Remove redundant runtime_suspend/resume functions

 The driver's  runtime_suspend/resume functions just disable/enable
 the clock which is already being managed at AMBA bus level
 runtime_suspend/resume functions.

 Hence, remove the driver's runtime_suspend/resume functions.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 Tested-by: Chander Kashyap chander.kash...@linaro.org
 Signed-off-by: Vinod Koul vinod.k...@linux.intel.com

commit faf6fbc6f2ca3b34bf464a8bb079a998e571957c
Author: Inderpal Singh inderpal.si...@linaro.org
Date:   Fri Sep 7 12:14:47 2012 +0530

 DMA: PL330: Remove controller clock enable/disable

 The controller clock is being enabled/disabled in AMBA bus
 infrastructre in probe/remove functions. Hence, its not required
 at driver level probe/remove.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 Tested-by: Chander Kashyap chander.kash...@linaro.org
 Signed-off-by: Vinod Koul vinod.k...@linux.intel.com

I have added people who made related changes at Cc, hopefully they
can provide some help in debugging this.



The mentioned patches just removed the redundant clock enable/disable
from the driver as clock is already being managed at amba bus level in
the same code path. As per my understanding the issue should come even
without these patches.

@Lonsn: Can you please test without these patches?


Inder, I have made the DMA clock change according to Sylwester's 
suggetstions and it works!

Now kernel prints:

io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
s3c-fb s5pv210-fb: window 0: fb
dma-pl330 dma-pl330.0: Loaded driver for PL330 DMAC-267056
dma-pl330 dma-pl330.0:  DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
dma-pl330 dma-pl330.1: Loaded driver for PL330 DMAC-267056
dma-pl330 dma-pl330.1:  DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
s5pv210-uart.0: ttySAC0 at MMIO 0xe290 (irq = 74) is a S3C6400/10
--


Thanks,
Inder


Please try the following change:

8
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index fcdf52d..87c7d3f 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -214,11 +214,6 @@ static struct clk clk_pcmcdclk2 = {
 .name   = pcmcdclk,
  };

-static struct clk dummy_apb_pclk = {
-   .name   = apb_pclk,
-   .id = -1,
-};
-
  static struct clk *clkset_vpllsrc_list[] = {
 [0] = clk_fin_vpll,
 [1] = clk_sclk_hdmi27m,
@@ -1333,6 +1328,8 @@ static struct clk_lookup s5pv210_clk_lookup[] = {
 CLKDEV_INIT(NULL, spi_busclk0, clk_p),
 CLKDEV_INIT(s5pv210-spi.0, spi_busclk1, clk_sclk_spi0.clk),
 CLKDEV_INIT(s5pv210-spi.1, spi_busclk1, clk_sclk_spi1.clk),
+   CLKDEV_INIT(dma-pl330.0, apb_pclk, init_clocks_off[0]),
+   CLKDEV_INIT(dma-pl330.1, apb_pclk, init_clocks_off[1]),
  };

  void __init s5pv210_register_clocks(void)
@@ -1361,6 +1358,5 @@ void __init s5pv210_register_clocks(void)
 for (ptr = 0; ptr  ARRAY_SIZE(clk_cdev); ptr++)
 s3c_disable_clocks(clk_cdev[ptr], 1);

-   s3c24xx_register_clock(dummy_apb_pclk);
 s3c_pwmclk_init();
  }
8

If it works then we could make some cleaner patch.



For HDMI driver,
I have added the following HDMI related code to
arch/arm/mach-s5pv210/mach-smdkv210.c:
/* I2C module and id for HDMIPHY */
static struct i2c_board_info hdmiphy_info = {
I2C_BOARD_INFO(hdmiphy-s5pv210, 0x38),
};

i2c_register_board_info(2, smdkv210_i2c_devs2,
ARRAY_SIZE(smdkv210_i2c_devs2));

s5p_i2c_hdmiphy_set_platdata(NULL);
s5p_hdmi_set_platdata(hdmiphy_info, NULL, 0);

s3c_ide_set_platdata(smdkv210_ide_pdata);

then kernel print:
s5p-hdmi s5pv210-hdmi: hdmiphy adapter request failed
s5p-hdmi s5pv210-hdmi: probe failed
Samsung TV Mixer driver, (c) 2010-2011 Samsung 

Re: SMDKV210 support issue in kernel 3.8 (dma-pl330 and HDMI failed)

2013-02-27 Thread Sylwester Nawrocki

On 02/27/2013 04:48 PM, Lonsn wrote:

于 2013/2/27 23:13, Lonsn 写道:

On 02/26/2013 09:07 PM, Sylwester Nawrocki wrote:

On 02/26/2013 01:59 PM, Lonsn wrote:

[...]

Now kernel prints the following HDMI related:
m2m-testdev m2m-testdev.0: mem2mem-testdevDevice registered as
/dev/video0
s5p-jpeg s5p-jpeg.0: encoder device registered as /dev/video1
s5p-jpeg s5p-jpeg.0: decoder device registered as /dev/video2
s5p-jpeg s5p-jpeg.0: Samsung S5P JPEG codec
s5p-mfc s5p-mfc: decoder registered as /dev/video3
s5p-mfc s5p-mfc: encoder registered as /dev/video4
s5p-hdmi s5pv210-hdmi: probe start
s5p-hdmi s5pv210-hdmi: HDMI resource init
s5p-hdmiphy 3-0038: probe successful
s5p-hdmi s5pv210-hdmi: probe successful
Samsung TV Mixer driver, (c) 2010-2011 Samsung Electronics Co., Ltd.

s5p-mixer s5p-mixer: probe start
s5p-mixer s5p-mixer: resources acquired
s5p-mixer s5p-mixer: added output 'S5P HDMI connector' from module
's5p-hdmi'
s5p-mixer s5p-mixer: module s5p-sdo provides no subdev!
s5p-mixer s5p-mixer: registered layer graph0 as /dev/video5
s5p-mixer s5p-mixer: registered layer graph1 as /dev/video6
s5p-mixer s5p-mixer: registered layer video0 as /dev/video7
s5p-mixer s5p-mixer: probe successful

How can I test the HDMI output whether it's OK? Which /dev/video is real
HDMI output? I have used
http://git.infradead.org/users/kmpark/public-apps hdmi test program buf
failed:
root@linaro-developer:/opt# ./tvdemo /dev/video7 720 480 0 0
ERROR(main.c:80) : VIDIOC_S_FMT failed: Invalid argument


It failed because you've opened device node of the Video Processor, which
supports only NV12/21(MT) formats. I believe the v4l2-hdmi-example
application, which renders some simple test images, needs to be run with one
the graphics layer video nodes as an argument.  Doesn't it work when you 
try

on /dev/video5 or /dev/video6 ?


root@linaro-developer:/opt#
Maybe I still miss some configuration in mach-smdkv210.c.


I don't think so, it all looks more or less OK now :)


The kernel print when run tvdemo:
root@linaro-developer:/opt# ./tvdemo /dev/video7 720 480 0 0
ERROR(main.c:80) : VIDIOC_S_FMT failed: Invalid argument
Aborted
root@linaro-developer:/opt# dmesg
s5p-mixer s5p-mixer: mxr_video_open:762
s5p-mixer s5p-mixer: resume - start
s5p-mixer s5p-mixer: resume - finished
s5p-hdmi s5pv210-hdmi: hdmi_g_mbus_fmt
s5p-mixer s5p-mixer: src.full_size = (720, 480)
s5p-mixer s5p-mixer: src.size = (720, 480)
s5p-mixer s5p-mixer: src.offset = (0, 0)
s5p-mixer s5p-mixer: dst.full_size = (720, 480)
s5p-mixer s5p-mixer: dst.size = (720, 480)
s5p-mixer s5p-mixer: dst.offset = (0, 0)
s5p-mixer s5p-mixer: ratio = (0, 0)
s5p-mixer s5p-mixer: src.full_size = (720, 480)
s5p-mixer s5p-mixer: src.size = (720, 480)
s5p-mixer s5p-mixer: src.offset = (0, 0)
s5p-mixer s5p-mixer: dst.full_size = (720, 480)
s5p-mixer s5p-mixer: dst.size = (720, 480)
s5p-mixer s5p-mixer: dst.offset = (0, 0)
s5p-mixer s5p-mixer: ratio = (65536, 65536)
s5p-mixer s5p-mixer: mxr_s_fmt:322
s5p-mixer s5p-mixer: not recognized fourcc: 34524742


Yes, it must definitely be incorrect video node. Only the graph0/1
devices support RGB.

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 v5 5/5] ARM: exynos: dts: Add FIMD DT binding Documentation

2013-02-27 Thread Sachin Kamat
Hi Vikas,

On 27 February 2013 14:13, Vikas Sajjan vikas.saj...@linaro.org wrote:
 Adds FIMD DT binding documentation both SoC and Board, with an example

 Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org
 ---
  .../devicetree/bindings/video/exynos-fimd.txt  |   46 
 
  1 file changed, 46 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/video/exynos-fimd.txt

 diff --git a/Documentation/devicetree/bindings/video/exynos-fimd.txt 
 b/Documentation/devicetree/bindings/video/exynos-fimd.txt
 new file mode 100644
 index 000..b3542b9
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/video/exynos-fimd.txt
 @@ -0,0 +1,46 @@
 +Device-Tree bindings for Exynos SoC display controller (FIMD)
 +
 +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

I think this should be Samsung series of SoCs intead of Exynos series.
As such the file name could be samsung-fimd.txt.

 +located in the system memory to an external LCD interface.
 +
 +Required properties:
 +- compatible := value can be one these below

value should be one of the following:


 +   samsung,s3c2443-fimd; /* for S3C24XX SoCs */
 +   samsung,s3c6400-fimd; /* for S3C64XX SoCs */
 +   samsung,s5p6440-fimd; /* for S5P64X0 SoCs */
 +   samsung,s5pc100-fimd; /* for S5PC100 SoC  */
 +   samsung,s5pv210-fimd; /* for S5PV210 SoC */
 +   samsung,exynos4210-fimd; /* for Exynos4 SoCs */
 +   samsung,exynos5250-fimd; /* for Exynos5 SoCs */

blank line here would make it more readable?

 +- 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
 +   we have 3 interrupts and the Interrupt combiner order is
 +   FIFO Level, VSYNC and LCD_SYSTEM. Make sure to mention order
 +   as VSYNC, FIFO Level and LCD_SYSTEM as show in the example 
 below.

Please rephrase the above as there seems to be difference in order in
the above 2 lines itself. :)


-- 
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