[PATCH] ARM: dts: map SATA controller port to SATA PHY controller

2013-01-29 Thread Vasanth Ananthan
Adding port nodes to the sata controller node, thus mapping
the ports in sata controller to the corresponding PHY controllers they
are connected to.

Signed-off-by: Vasanth Ananthan vasant...@samsung.com
---
 arch/arm/boot/dts/exynos5250-smdk5250.dts |   11 ---
 arch/arm/boot/dts/exynos5250.dtsi |   15 ---
 arch/arm/mach-exynos/mach-exynos5-dt.c|4 ++--
 3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts 
b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index 942d576..49b89f6 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -51,17 +51,6 @@
};
};
 
-   i2c@121D {
-   samsung,i2c-sda-delay = 100;
-   samsung,i2c-max-bus-freq = 4;
-   samsung,i2c-slave-addr = 0x38;
-
-   sata-phy {
-   compatible = samsung,sata-phy;
-   reg = 0x38;
-   };
-   };
-
sata@122F {
samsung,sata-freq = 66;
};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index 3acf594..d33dc89 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -118,13 +118,14 @@
};
 
sata@122F {
-   compatible = samsung,exynos5-sata-ahci;
+   compatible = samsung,exynos5250-ahci;
reg = 0x122F 0x1ff;
interrupts = 0 115 0;
+   samsung,exynos-sata-phy = phy0;
};
 
-   sata-phy@1217 {
-   compatible = samsung,exynos5-sata-phy;
+   phy0: sata-phy@1217 {
+   compatible = samsung,exynos5250-sata-phy;
reg = 0x1217 0x1ff;
};
 
@@ -205,6 +206,14 @@
 reg = 0x121D 0x100;
 #address-cells = 1;
 #size-cells = 0;
+   samsung,i2c-sda-delay = 100;
+   samsung,i2c-max-bus-freq = 4;
+   samsung,i2c-slave-addr = 0x38;
+
+   sata-phy {
+   compatible = samsung,exynos5250-sataphy;
+   reg = 0x38;
+   };
};
 
spi_0: spi@12d2 {
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
b/arch/arm/mach-exynos/mach-exynos5-dt.c
index e99d3d8..09a88fb 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -80,9 +80,9 @@ static const struct of_dev_auxdata 
exynos5250_auxdata_lookup[] __initconst = {
exynos4210-spi.1, NULL),
OF_DEV_AUXDATA(samsung,exynos4210-spi, EXYNOS5_PA_SPI2,
exynos4210-spi.2, NULL),
-   OF_DEV_AUXDATA(samsung,exynos5-sata-ahci, 0x122F,
+   OF_DEV_AUXDATA(samsung,exynos5250-ahci, 0x122F,
exynos5-sata, NULL),
-   OF_DEV_AUXDATA(samsung,exynos5-sata-phy, 0x1217,
+   OF_DEV_AUXDATA(samsung,exynos5250-sata-phy, 0x1217,
exynos5-sata-phy, NULL),
OF_DEV_AUXDATA(samsung,exynos5-sata-phy-i2c, 0x121D,
exynos5-sata-phy-i2c, 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


Re: [PATCH V6 10/10] dmaengine: Fix compilation error in non-DT case

2013-01-29 Thread Padma Venkat
Hi,

On Mon, Jan 28, 2013 at 7:17 PM, Vinod Koul vinod.k...@intel.com wrote:
 On Fri, Jan 18, 2013 at 05:17:09PM +0530, Padmavathi Venna wrote:
 Signed-off-by: Padmavathi Venna padm...@samsung.com
 ---
  include/linux/dmaengine.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
 index 8cd0e25..c88f302 100644
 --- a/include/linux/dmaengine.h
 +++ b/include/linux/dmaengine.h
 @@ -992,7 +992,7 @@ static inline struct dma_chan 
 *__dma_request_channel(dma_cap_mask_t *mask,
  static inline struct dma_chan *dma_request_slave_channel(struct device *dev,
char *name)
  {
 - return NULL
 + return NULL;
 what tree was this generated against? this was fixed by 678bd8

I generated against Kukjin for-next branch. I just noticed that it's
fixed in your next branch. I will drop this patch.

Thanks
Padma

 --
 ~Vinod
--
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/4] ARM: dts: Add #dma-cells for generic dma binding support

2013-01-29 Thread Padma Venkat
Hi,

On Mon, Jan 28, 2013 at 8:17 PM, Arnd Bergmann a...@arndb.de wrote:
 On Friday 18 January 2013, Padmavathi Venna wrote:
 diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt 
 b/Documentation/devicetree/bindings/dma/arm-pl330.txt
 index 36e27d5..457a233 100644
 --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
 +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
 @@ -8,6 +8,8 @@ Required properties:
- reg: physical base address of the controller and length of memory mapped
  region.
- interrupts: interrupt number to the cpu.
 +  - #dma-cells: must be at least 1. used to represent the number of integer
 +cells in the dmas property of client device.

 The wording 'at least' seems wrong here: that is what we use in the
 generic DMA binding, but in the part that is specific to one
 driver, I would expect to see

 - #dma-cells: must be 1

 Since that is what this particular driver requires.

Okey. I will change this.


  Client drivers (device nodes requiring dma transfers from dev-to-mem or
 @@ -27,7 +30,7 @@ as shown below.
[property name]  = [phandle of the dma controller] [dma request id];

where 'dma request id' is the dma request number which is connected
 -  to the client controller. The 'property name' is recommended to be
 -  of the form name-dma-channel.
 +  to the client controller. The 'property name' is 'dmas' as recommended
 +  by the generic dma device tree binding helpers.

 s/recommended/required/

 Also, the dma-names property is required as well.

OK. I will add.

Thanks
Padma


 Arnd
--
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 V6 03/10] ARM: SAMSUNG: Make dma request compatible to generic dma bindings.

2013-01-29 Thread Padma Venkat
On Tue, Jan 29, 2013 at 11:50 AM, Mark Brown
broo...@opensource.wolfsonmicro.com wrote:
 On Fri, Jan 18, 2013 at 05:17:02PM +0530, Padmavathi Venna wrote:
 This patch make the dma dev request operation compatible for both
 DT and non-DT cases. It takes the all the arguments required for
 dma_request_slave_channel and dma_request_channel. If the driver
 is initiated via DT or non-DT the corresponding call will be made.

 OK, so this is where the SPI change came from - the API has been changed
 incompatibly and SPI needs updating.  For bisection this API update
 ought to be done in a single commit, otherwise there will be steps in
 the bisection where nothing will work.

 Anyway, I'll go ahead and apply this, the SPI and the ASoC ones but this
 is something to bear in mind for the future.

OK. Thanks for applying the patch.

Regards
Padma
--
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 V6 04/10] spi: s3c64xx: Modify SPI driver to use generic DMA DT support

2013-01-29 Thread Padma Venkat
On Tue, Jan 29, 2013 at 10:49 AM, Mark Brown
broo...@opensource.wolfsonmicro.com wrote:
 On Fri, Jan 18, 2013 at 05:17:03PM +0530, Padmavathi Venna wrote:
 This patch modifies the SPI driver to use generic dma dt bindings
 support. This passes all the required arguments to dma dev request
 functon which in turn calls the dma_request_slave_channel or dma__
 request_channel based on DT or non-DT respectively.

 This loooks OK and I'm actually applying SPI patches so I could apply it
 but I'm not sure I see the relevance of this patch to the rest of the
 series (which is about ASoC).  Is there some reason why it's included in
 this patch series or can it be applied to the SPI tree?  The SMDKs use
 I2C for their CODEC control rather than SPI.

 Also is there a binding document update or device tree file update to go
 with this?

 + if (!sdd-pdev-dev.of_node) {
 + res = platform_get_resource(pdev, IORESOURCE_DMA,  0);
 + if (!res) {
 + dev_err(pdev-dev, Unable to get SPI tx dma 
 + resource\n);

 I appreciate that this is cut'n'paste from the code you're refactoring
 but please don't split error messages over lines, it makes it hard to
 grep for them in the kernel source.

OK.

Thanks for reviewing.
Padma
--
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 V6 07/10] ASoC: SMDK: WM8994: Add device tree support for machine file

2013-01-29 Thread Padma Venkat
On Tue, Jan 29, 2013 at 12:42 PM, Mark Brown
broo...@opensource.wolfsonmicro.com wrote:
 On Fri, Jan 18, 2013 at 05:17:06PM +0530, Padmavathi Venna wrote:

 +Samsung SMDK audio complex

 This is just for SMDKs with WM8994.  I'll apply but please send a
 followup patch to clarify this - it'll be a different binding for others
 like the older boards using WM8580 and WM9713.

OK. I will send.


 + samsung,i2s-controller = i2s0;
 + samsung,audio-codec = wm8994;

 I was thinking this should really point at the DAI but since it's
 specific to the SMDKs I don't think it particularly matters - they all
 use AIF1 anyway.

Thanks
Padma
--
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 RESEND] ARM: EXYNOS: dts: Set up power domain for MFC and G-scaler

2013-01-29 Thread Prasanna Kumar
This patch adds device tree nodes for MFC and G-scaler power
domains of exynos5250.It binds these power-domain nodes to repsective
device tree nodes

It also adds support to enable PM generic domains for exynos5250.

Signed-off-by: Prasanna Kumar prasanna...@samsung.com
---
 arch/arm/boot/dts/exynos5250.dtsi |   15 +++
 arch/arm/mach-exynos/Kconfig  |1 +
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index 30485de..6d0e87c 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -85,6 +85,7 @@
compatible = samsung,mfc-v6;
reg = 0x1100 0x1;
interrupts = 0 96 0;
+   samsung,power-domain = pd_mfc;
};
 
rtc {
@@ -554,28 +555,42 @@
};
};
 
+   pd_gsc: gsc-power-domain@0x10044000 {
+   compatible = samsung,exynos4210-pd;
+   reg = 0x10044000 0x20;
+   };
+
+   pd_mfc: mfc-power-domain@0x10044040 {
+   compatible = samsung,exynos4210-pd;
+   reg = 0x10044040 0x20;
+   };
+
gsc_0:  gsc@0x13e0 {
compatible = samsung,exynos5-gsc;
reg = 0x13e0 0x1000;
interrupts = 0 85 0;
+   samsung,power-domain = pd_gsc;
};
 
gsc_1:  gsc@0x13e1 {
compatible = samsung,exynos5-gsc;
reg = 0x13e1 0x1000;
interrupts = 0 86 0;
+   samsung,power-domain = pd_gsc;
};
 
gsc_2:  gsc@0x13e2 {
compatible = samsung,exynos5-gsc;
reg = 0x13e2 0x1000;
interrupts = 0 87 0;
+   samsung,power-domain = pd_gsc;
};
 
gsc_3:  gsc@0x13e3 {
compatible = samsung,exynos5-gsc;
reg = 0x13e3 0x1000;
interrupts = 0 88 0;
+   samsung,power-domain = pd_gsc;
};
 
hdmi {
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index e103c29..96f4a9f 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -61,6 +61,7 @@ config SOC_EXYNOS5250
bool SAMSUNG EXYNOS5250
default y
depends on ARCH_EXYNOS5
+   select PM_GENERIC_DOMAINS if PM
select S5P_PM if PM
select S5P_SLEEP if PM
select S5P_DEV_MFC
-- 
1.7.5.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


[PATCH v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread srinidhi kasagar
Add 'smc' (Secure Monitor Call) identifier to differentiates
the platforms which implements this.

Signed-off-by: srinidhi kasagar srinidhi.kasa...@stericsson.com
---
 arch/arm/boot/dts/omap4.dtsi   |1 +
 arch/arm/include/asm/hardware/cache-l2x0.h |2 +-
 arch/arm/mach-cns3xxx/core.c   |4 ++--
 arch/arm/mach-exynos/common.c  |4 ++--
 arch/arm/mach-imx/mm-imx3.c|4 ++--
 arch/arm/mach-nomadik/cpu-8815.c   |4 ++--
 arch/arm/mach-omap2/omap4-common.c |2 +-
 arch/arm/mach-realview/realview_eb.c   |4 ++--
 arch/arm/mach-realview/realview_pb1176.c   |4 ++--
 arch/arm/mach-realview/realview_pb11mp.c   |4 ++--
 arch/arm/mach-realview/realview_pbx.c  |4 ++--
 arch/arm/mach-shmobile/board-ag5evm.c  |2 +-
 arch/arm/mach-shmobile/board-armadillo800eva.c |4 ++--
 arch/arm/mach-shmobile/board-bonito.c  |4 ++--
 arch/arm/mach-shmobile/board-kota2.c   |4 ++--
 arch/arm/mach-shmobile/board-kzm9g.c   |4 ++--
 arch/arm/mach-shmobile/setup-r8a7779.c |4 ++--
 arch/arm/mach-spear13xx/spear13xx.c|2 +-
 arch/arm/mach-ux500/cache-l2x0.c   |2 +-
 arch/arm/mach-vexpress/ct-ca9x4.c  |2 +-
 arch/arm/mm/cache-l2x0.c   |   18 ++
 21 files changed, 47 insertions(+), 36 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 739bb79..9eaac63 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -51,6 +51,7 @@
reg = 0x48242000 0x1000;
cache-unified;
cache-level = 2;
+   smc;
};
 
local-timer@0x48240600 {
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h 
b/arch/arm/include/asm/hardware/cache-l2x0.h
index 3b2c40b..49ac638 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -107,7 +107,7 @@
 #define L2X0_WAY_SIZE_SHIFT3
 
 #ifndef __ASSEMBLY__
-extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask);
+extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask, 
bool smc);
 #if defined(CONFIG_CACHE_L2X0)  defined(CONFIG_OF)
 extern int l2x0_of_init(u32 aux_val, u32 aux_mask);
 #else
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 031805b..446bd99 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -282,8 +282,8 @@ void __init cns3xxx_l2x0_init(void)
val = 0xf888;
writel(val, base + L2X0_DATA_LATENCY_CTRL);
 
-   /* 32 KiB, 8-way, parity disable */
-   l2x0_init(base, 0x0054, 0xfe000fff);
+   /* 32 KiB, 8-way, parity disable, no secure monitor call (smc) */
+   l2x0_init(base, 0x0054, 0xfe000fff, false);
 }
 
 #endif /* CONFIG_CACHE_L2X0 */
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 1a89824..6624acc 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -754,8 +754,8 @@ static int __init exynos4_l2x0_cache_init(void)
clean_dcache_area(l2x0_regs_phys, sizeof(unsigned long));
clean_dcache_area(l2x0_saved_regs, sizeof(struct l2x0_regs));
}
-
-   l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK);
+   /* no secure monitor call (smc) implemented */
+   l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK, false);
return 0;
 }
 early_initcall(exynos4_l2x0_cache_init);
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index cefa047..74eedb7 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -111,8 +111,8 @@ void __init imx3_init_l2x0(void)
printk(KERN_ERR remapping L2 cache area failed\n);
return;
}
-
-   l2x0_init(l2x0_base, 0x00030024, 0x);
+   /* no secure monitor call (smc) implemented */
+   l2x0_init(l2x0_base, 0x00030024, 0x, false);
 #endif
 }
 
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 1273931..7f27151 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -145,8 +145,8 @@ void __init cpu8815_init_irq(void)
  void __init cpu8815_platform_init(void)
 {
 #ifdef CONFIG_CACHE_L2X0
-   /* At full speed latency must be =2, so 0x249 in low bits */
-   l2x0_init(io_p2v(NOMADIK_L2CC_BASE), 0x00730249, 0xfe000fff);
+   /* At full speed latency must be =2, so 0x249 in low bits, no smc */
+   l2x0_init(io_p2v(NOMADIK_L2CC_BASE), 0x00730249, 0xfe000fff, false);
 #endif
 return;
 }
diff --git a/arch/arm/mach-omap2/omap4-common.c 
b/arch/arm/mach-omap2/omap4-common.c
index 6897ae2..a440fc4 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c

Re: [PATCH 1/4] DMA: PL330: Add xlate function

2013-01-29 Thread Arnd Bergmann
On Tuesday 29 January 2013, Padma Venkat wrote:
 of_dma_simple_xlate is just passing the dma channel number to the
 filter function. But I also need
 to compare against device node as my requested channel can belong to
 any of the available dma controller
 on SoC. So I implemented a xlate which passes the whole dma_spec.

Hmm, this seems to be a universal requirement for anyone using the
simple xlate function. Jon, how did you expect drivers to handle
this? Assuming that there is only one DMA controller in the system
does not sound like a good idea.

Padma, please have a look at how I did this in the dw_dma patch
I posted yesterday.

Arnd
--
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: ehci: s5p: Power-off VBUS during suspend.

2013-01-29 Thread Vivek Gautam
This change de-asserts vbus_gpio on suspend and
re-asserts on resume in order to save power.
NOTE, this change means no USB charging in suspend
mode.

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
CC: Doug Anderson diand...@chromium.org
---

Based on 'usb-next'.

 drivers/usb/host/ehci-s5p.c |   29 ++---
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index 20ebf6a..297f6f2 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -37,6 +37,7 @@ struct s5p_ehci_hcd {
struct usb_phy *phy;
struct usb_otg *otg;
struct s5p_ehci_platdata *pdata;
+   int vbus_gpio;
 };
 
 static const struct hc_driver s5p_ehci_hc_driver = {
@@ -90,22 +91,28 @@ static void s5p_ehci_phy_disable(struct s5p_ehci_hcd 
*s5p_ehci)
s5p_ehci-pdata-phy_exit(pdev, USB_PHY_TYPE_HOST);
 }
 
-static void s5p_setup_vbus_gpio(struct platform_device *pdev)
+static int s5p_setup_vbus_gpio(struct platform_device *pdev)
 {
int err;
int gpio;
 
-   if (!pdev-dev.of_node)
-   return;
+   if (!pdev-dev.of_node) {
+   dev_err(pdev-dev, No device node present\n);
+   return -ENODEV;
+   }
 
gpio = of_get_named_gpio(pdev-dev.of_node,
samsung,vbus-gpio, 0);
if (!gpio_is_valid(gpio))
-   return;
+   return -EINVAL;
 
err = gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, ehci_vbus_gpio);
-   if (err)
+   if (err) {
dev_err(pdev-dev, can't request ehci vbus gpio %d, gpio);
+   return err;
+   }
+
+   return gpio;
 }
 
 static u64 ehci_s5p_dma_mask = DMA_BIT_MASK(32);
@@ -131,8 +138,6 @@ static int s5p_ehci_probe(struct platform_device *pdev)
if (!pdev-dev.coherent_dma_mask)
pdev-dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
-   s5p_setup_vbus_gpio(pdev);
-
s5p_ehci = devm_kzalloc(pdev-dev, sizeof(struct s5p_ehci_hcd),
GFP_KERNEL);
if (!s5p_ehci)
@@ -154,6 +159,10 @@ static int s5p_ehci_probe(struct platform_device *pdev)
 
s5p_ehci-dev = pdev-dev;
 
+   s5p_ehci-vbus_gpio = s5p_setup_vbus_gpio(pdev);
+   if (!gpio_is_valid(s5p_ehci-vbus_gpio))
+   dev_warn(pdev-dev, Failed to setup vbus gpio\n);
+
hcd = usb_create_hcd(s5p_ehci_hc_driver, pdev-dev,
dev_name(pdev-dev));
if (!hcd) {
@@ -270,6 +279,9 @@ static int s5p_ehci_suspend(struct device *dev)
 
s5p_ehci_phy_disable(s5p_ehci);
 
+   if (gpio_is_valid(s5p_ehci-vbus_gpio))
+   gpio_set_value(s5p_ehci-vbus_gpio, 0);
+
clk_disable_unprepare(s5p_ehci-clk);
 
return rc;
@@ -282,6 +294,9 @@ static int s5p_ehci_resume(struct device *dev)
 
clk_prepare_enable(s5p_ehci-clk);
 
+   if (gpio_is_valid(s5p_ehci-vbus_gpio))
+   gpio_set_value(s5p_ehci-vbus_gpio, 1);
+
if (s5p_ehci-otg)
s5p_ehci-otg-set_host(s5p_ehci-otg, s5p_ehci-hcd-self);
 
-- 
1.7.6.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/5] ARM: Manage the pl310 erratas in a dynamic way

2013-01-29 Thread Russell King - ARM Linux
On Tue, Jan 29, 2013 at 03:40:38PM +0530, srinidhi kasagar wrote:
 - Added l2x0_quirks to manage the errata in cpu_idle path. Tried to address
   Russell's comment on this, but could not completely. Because, neither I can
   keep the #ifdef CONFIG_PL310_ERRATA_769419 nor remove it entirely since
   the platform A suffers from this bug, whereas B do not but shares the same
   defconfig.

Yes you can and I covered this situation in my email.  In that case,
you _define_ CONFIG_PL310_ERRATA_769419 such that the barrier _always_
gets included both both platforms.

As I already said, there is _no_ point making the barrier conditional;
it's probably more expensive to make it conditional than just to execute
it every time.  But we still might as well optimize it away if we are
running _only_ on platforms which _do_ _not_ have that errata.
--
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 v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread Russell King - ARM Linux
On Tue, Jan 29, 2013 at 03:43:31PM +0530, srinidhi kasagar wrote:
 Add 'smc' (Secure Monitor Call) identifier to differentiates
 the platforms which implements this.

This patch makes no sense.

So, if setting 'smc' in the DT description is supposed to mean that
the platform has a secure monitor then...

 + is_smc = of_property_read_bool(np, smc);
 +
 + if (is_smc) {
 + /* set the debug interface */
 + outer_cache.set_debug = pl310_set_debug;
 + }

Now, let's look at what pl310_set_debug() does:

static void pl310_set_debug(unsigned long val)
{
writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
}

Can you explain where the secure monitor call is there please, because
I can't see one.  In fact, this is the function used when there _isn't_
a secure monitor.  So this patch just seems totally wrong to me.
--
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: ehci: s5p: Power-off VBUS during suspend.

2013-01-29 Thread Oliver Neukum
On Tuesday 29 January 2013 16:22:45 Vivek Gautam wrote:
 This change de-asserts vbus_gpio on suspend and
 re-asserts on resume in order to save power.
 NOTE, this change means no USB charging in suspend
 mode.

What happens if a device on the bus is a source of wakeups?

Regards
Oliver

--
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 v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread Srinidhi Kasagar
On Tue, Jan 29, 2013 at 12:33:25 +0100, Russell King - ARM Linux wrote:
 On Tue, Jan 29, 2013 at 03:43:31PM +0530, srinidhi kasagar wrote:
  Add 'smc' (Secure Monitor Call) identifier to differentiates
  the platforms which implements this.
 
 This patch makes no sense.
 
 So, if setting 'smc' in the DT description is supposed to mean that
 the platform has a secure monitor then...
 
  +   is_smc = of_property_read_bool(np, smc);
  +
  +   if (is_smc) {
  +   /* set the debug interface */
  +   outer_cache.set_debug = pl310_set_debug;
  +   }
 
 Now, let's look at what pl310_set_debug() does:
 
 static void pl310_set_debug(unsigned long val)
 {
 writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
 }
 
 Can you explain where the secure monitor call is there please, because
 I can't see one.  In fact, this is the function used when there _isn't_
 a secure monitor.  So this patch just seems totally wrong to me.

Today, one and only platform is omap. Please check below snapshot: 

--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -51,6 +51,7 @@
reg = 0x48242000 0x1000;
cache-unified;
cache-level = 2;
+   smc;
};

[...]

--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -214,7 +214,7 @@ static int __init omap_l2_cache_init(void)
if (of_have_populated_dt())
l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
else
-   l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
+   l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK, true);


regards/srinidhi
--
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 v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread Russell King - ARM Linux
On Tue, Jan 29, 2013 at 05:08:53PM +0530, Srinidhi Kasagar wrote:
 On Tue, Jan 29, 2013 at 12:33:25 +0100, Russell King - ARM Linux wrote:
  On Tue, Jan 29, 2013 at 03:43:31PM +0530, srinidhi kasagar wrote:
   Add 'smc' (Secure Monitor Call) identifier to differentiates
   the platforms which implements this.
  
  This patch makes no sense.
  
  So, if setting 'smc' in the DT description is supposed to mean that
  the platform has a secure monitor then...
  
   + is_smc = of_property_read_bool(np, smc);
   +
   + if (is_smc) {
   + /* set the debug interface */
   + outer_cache.set_debug = pl310_set_debug;
   + }
  
  Now, let's look at what pl310_set_debug() does:
  
  static void pl310_set_debug(unsigned long val)
  {
  writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
  }
  
  Can you explain where the secure monitor call is there please, because
  I can't see one.  In fact, this is the function used when there _isn't_
  a secure monitor.  So this patch just seems totally wrong to me.
 
 Today, one and only platform is omap. Please check below snapshot: 

I don't think you understood my point at all.

OMAP sets outer_cache.set_debug to point at its own function to issue a
SMC to set the debug register.

pl310_set_debug() is not that code; pl310_set_debug() is used on non-OMAP
platforms to write to this register directly.

Your patch disables the whole workaround if 'smc' is not specified in DT
or 'true' is passed into the l2x0 init function.

Therefore, this patch is just rubbish IMHO.  I don't think you've taken
the time to understand the code you're modifying, nor have you understood
the point that I made above.
--
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: ehci: s5p: Power-off VBUS during suspend.

2013-01-29 Thread Vivek Gautam
Hi Oliver,


On Tue, Jan 29, 2013 at 5:07 PM, Oliver Neukum oneu...@suse.de wrote:
 On Tuesday 29 January 2013 16:22:45 Vivek Gautam wrote:
 This change de-asserts vbus_gpio on suspend and
 re-asserts on resume in order to save power.
 NOTE, this change means no USB charging in suspend
 mode.

 What happens if a device on the bus is a source of wakeups?


The device will not be powered in suspend state,
so the corresponding wakeup will get missed ?


 Regards
 Oliver




-- 
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 v2 0/2] ARM: Exynos5250: Enabling samsung usb phy

2013-01-29 Thread Vivek Gautam
On Tue, Jan 22, 2013 at 9:01 PM, Vivek Gautam gautam.vi...@samsung.com wrote:
 Changes from v1:
  - Putting separate device nodes for usb 2.0 phy and usb 3.0 phy
based on separate driver for samsung usb 3.0 phy and
samsung usb 2.0 phy:
[PATCH v3 0/2] Adding USB 3.0 DRD-phy support for exynos5250
[PATCH v8 0/4] Adding usb2.0 host-phy support for exynos5250
  - Aligning as per the patch:
usb: phy: samsung: Add support to set pmu isolation
  - Replaced phy-handle approach for PHY CONTROL registers
to child nodes.
  - Removing AUX data entry from exynos5250 dt file.

 Vivek Gautam (2):
   ARM: Exynos5250: Enabling samsung-usbphy driver
   ARM: Exynos5250: Enabling samsung-usb3-phy driver


any comments on this patch-series please ?

  arch/arm/boot/dts/exynos5250.dtsi |   28 
  1 files changed, 28 insertions(+), 0 deletions(-)

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


Re: [PATCH v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread Russell King - ARM Linux
On Tue, Jan 29, 2013 at 05:19:27PM +0530, Srinidhi Kasagar wrote:
 On Tue, Jan 29, 2013 at 12:33:25 +0100, Russell King - ARM Linux wrote:
  On Tue, Jan 29, 2013 at 03:43:31PM +0530, srinidhi kasagar wrote:
   Add 'smc' (Secure Monitor Call) identifier to differentiates
   the platforms which implements this.
  
  This patch makes no sense.
  
  So, if setting 'smc' in the DT description is supposed to mean that
  the platform has a secure monitor then...
  
   + is_smc = of_property_read_bool(np, smc);
   +
   + if (is_smc) {
   + /* set the debug interface */
   + outer_cache.set_debug = pl310_set_debug;
   + }
  
  Now, let's look at what pl310_set_debug() does:
  
  static void pl310_set_debug(unsigned long val)
  {
  writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
 
 You can do this operation (write to DEBUG_CTRL) only if SMC is implemented.

Err... no.  You can do it if you're running in secure mode without a
secure monitor, because the security stuff doesn't get in the way.

What other platforms do is up to them, and up to *how* the secure monitor
is implemented, not *if*.

  }
  
  Can you explain where the secure monitor call is there please, because
  I can't see one.  In fact, this is the function used when there _isn't_
  a secure monitor.  So this patch just seems totally wrong to me.

So this is going to be difficult because you only ever answer half an
email?  So, I repeat the question above.
--
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/6] ARM: dts: Update MFC DT binding documentation

2013-01-29 Thread Sylwester Nawrocki
Hi Sachin,

On 01/29/2013 05:13 AM, Sachin Kamat wrote:
 Added an example for bindings for illustration and clarity.
 
 Cc: devicetree-disc...@lists.ozlabs.org
 Cc: Arun Kumar K arun...@samsung.com
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  .../devicetree/bindings/media/s5p-mfc.txt  |   13 +
  1 files changed, 13 insertions(+), 0 deletions(-)
 
 diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt 
 b/Documentation/devicetree/bindings/media/s5p-mfc.txt
 index 67ec3d4..261c9dc 100644
 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt
 +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
 @@ -21,3 +21,16 @@ Required properties:
  
- samsung,mfc-l : Base address of the second memory bank used by MFC
   for DMA contiguous memory allocation and its size.
 +
 +Example:

Maybe adding a comment that this is a SoC...

 +mfc: codec@1340 {
 + compatible = samsung,mfc-v5;
 + reg = 0x1340 0x1;
 + interrupts = 0 94 0;
 +};

and the board specific part would make it more clear ?

 +codec@1340 {
 + samsung,mfc-r = 0x4300 0x80;
 + samsung,mfc-l = 0x5100 0x80;
 +};

Also please note that in the first node above you need
status = disabled; line, so the MFC is disabled by default.
Then in dts files for boards that use the codec it can be
overridden to enable the device as needed.

--

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


Re: [PATCH 2/6] ARM: dts: Add MFC codec support for Exynos4 DT machines

2013-01-29 Thread Sylwester Nawrocki
On 01/29/2013 05:13 AM, Sachin Kamat wrote:
 This patch adds MFC codec support for Exynos4 DT machines.
 
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  arch/arm/boot/dts/exynos4.dtsi |7 +++
  arch/arm/mach-exynos/mach-exynos4-dt.c |   17 +
  2 files changed, 24 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
 index e1347fc..1122fb1 100644
 --- a/arch/arm/boot/dts/exynos4.dtsi
 +++ b/arch/arm/boot/dts/exynos4.dtsi
 @@ -289,4 +289,11 @@
   interrupts = 0 34 0;
   };
   };
 +
 + mfc: codec@1340 {
 + compatible = samsung,mfc-v5;
 + reg = 0x1340 0x1;
 + interrupts = 0 94 0;
 + samsung,power-domain = pd_mfc;

Please add:
status = disabled;

 + };
  };
 diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c 
 b/arch/arm/mach-exynos/mach-exynos4-dt.c
 index ab1dacc..8ae8da1 100644
 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c
 +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
 @@ -12,7 +12,9 @@
  */
  
  #include linux/of_platform.h
 +#include linux/of_fdt.h
  #include linux/serial_core.h
 +#include linux/memblock.h
  
  #include asm/mach/arch.h
  #include asm/hardware/gic.h
 @@ -20,6 +22,7 @@
  
  #include plat/cpu.h
  #include plat/regs-serial.h
 +#include plat/mfc.h
  
  #include common.h
  
 @@ -80,6 +83,7 @@ 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,mfc-v5, 0x1340, s5p-mfc, NULL),
   {},
  };
  
 @@ -102,6 +106,18 @@ static char const *exynos4_dt_compat[] __initdata = {
   NULL
  };
  
 +static void __init exynos4_reserve(void)
 +{
 +#ifdef CONFIG_S5P_DEV_MFC

Where is this symbol supposed to be enabled ?

Don't you need a change like this as a part of this patch ?

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 1d9312a..1ae72d9 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -413,6 +413,7 @@ config MACH_EXYNOS4_DT
select USE_OF
select EXYNOS4_SETUP_USB_PHY
select ARM_DMA_USE_IOMMU if EXYNOS_IOMMU
+   select S5P_DEV_MFC
help
  Machine support for Samsung Exynos4 machine with device tree enabled.
  Select this if a fdt blob is available for the Exynos4 SoC based 
board.

--

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 0/2] Adding SATA PHY framework and PHY controller driver

2013-01-29 Thread Vasanth Ananthan
Adding SATA PHY framework. The framework acts as an interface
between the SATA controller and the PHY controller.

The framework can be used by any platform with device tree support.
It primarily serves to de-couple the SATA controller driver and the
PHY controller driver.

Vasanth Ananthan (2):
  driver: ata: SATA PHY framework
  driver: ata: add new Exynos5250 SATA PHY controller driver

 arch/arm/mach-exynos/include/mach/regs-pmu.h  |3 +
 arch/arm/mach-exynos/include/mach/regs-sata.h |   29 +++
 drivers/ata/Kconfig   |   10 +
 drivers/ata/Makefile  |1 +
 drivers/ata/sata_exynos_phy.c |  265 +
 drivers/ata/sata_phy.c|  145 ++
 drivers/ata/sata_phy.h|   29 +++
 7 files changed, 482 insertions(+)
 create mode 100644 arch/arm/mach-exynos/include/mach/regs-sata.h
 create mode 100644 drivers/ata/sata_exynos_phy.c
 create mode 100644 drivers/ata/sata_phy.c
 create mode 100644 drivers/ata/sata_phy.h

-- 
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 2/2] driver: ata: add new Exynos5250 SATA PHY controller driver

2013-01-29 Thread Vasanth Ananthan
Adding platform driver and I2C client driver for SATA PHY controller
for Samsung Exynos5250.

The PHY controller in Exynos5250 has both the APB interface
and I2C client interface, hence it requires both a platform driver
and an I2C client driver. The PHY controller's primary charecteristics
are handled through the APB interface, facilitated by the platform driver
and the 40 bit interface should be enabled through the I2C interface,
facilitated by the I2C client driver.

Further, this PHY controller driver uses PHY framework introduced by this
patchset. The driver registers its initialization/shutdown call back to the
framework and corresponding port this PHY controller is assciated with
gets this PHY and initializes it.

Signed-off-by: Vasanth Ananthan vasant...@samsung.com
---
 arch/arm/mach-exynos/include/mach/regs-pmu.h  |3 +
 arch/arm/mach-exynos/include/mach/regs-sata.h |   29 +++
 drivers/ata/Makefile  |2 +-
 drivers/ata/sata_exynos_phy.c |  265 +
 4 files changed, 298 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-exynos/include/mach/regs-sata.h
 create mode 100644 drivers/ata/sata_exynos_phy.c

diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h 
b/arch/arm/mach-exynos/include/mach/regs-pmu.h
index 3f30aa1..fd813d9 100644
--- a/arch/arm/mach-exynos/include/mach/regs-pmu.h
+++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h
@@ -369,4 +369,7 @@
 
 #define EXYNOS5_OPTION_USE_RETENTION   (1  4)
 
+/* Only for EXYNOS5250 */
+#define EXYNOS5_SATA_PHY_CONTROL   
S5P_PMUREG(0x0724)
+
 #endif /* __ASM_ARCH_REGS_PMU_H */
diff --git a/arch/arm/mach-exynos/include/mach/regs-sata.h 
b/arch/arm/mach-exynos/include/mach/regs-sata.h
new file mode 100644
index 000..80dd564
--- /dev/null
+++ b/arch/arm/mach-exynos/include/mach/regs-sata.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * EXYNOS - SATA PHY controller definition
+ *
+ * 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.
+*/
+
+#define EXYNOS5_SATA_RESET 0x4
+#define RESET_CMN_RST_N(1  1)
+#define LINK_RESET 0xF
+
+#define EXYNOS5_SATA_MODE0 0x10
+
+#define EXYNOS5_SATA_CTRL0 0x14
+#define CTRL0_P0_PHY_CALIBRATED_SEL(1  9)
+#define CTRL0_P0_PHY_CALIBRATED(1  8)
+
+#define EXYNOS5_SATA_PHSATA_CTRLM  0xE0
+#define PHCTRLM_REF_RATE   (1  1)
+#define PHCTRLM_HIGH_SPEED (1  0)
+
+#define EXYNOS5_SATA_PHSATA_STATM  0xF0
+#define PHSTATM_PLL_LOCKED (1  0)
+
+#define SATA_PHY_CON_RESET  0xF003F
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 3d2d128..7add682 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_SATA_INIC162X)   += sata_inic162x.o
 obj-$(CONFIG_SATA_SIL24)   += sata_sil24.o
 obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
 obj-$(CONFIG_SATA_HIGHBANK)+= sata_highbank.o libahci.o
-obj-$(CONFIG_SATA_PHY) += sata_phy.o
+obj-$(CONFIG_SATA_PHY) += sata_phy.o sata_exynos_phy.o
 
 # SFF w/ custom DMA
 obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
diff --git a/drivers/ata/sata_exynos_phy.c b/drivers/ata/sata_exynos_phy.c
new file mode 100644
index 000..f48fd2f
--- /dev/null
+++ b/drivers/ata/sata_exynos_phy.c
@@ -0,0 +1,265 @@
+/*
+ * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * EXYNOS - SATA PHY controller driver
+ *
+ * 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 linux/module.h
+#include linux/device.h
+#include linux/platform_device.h
+#include linux/i2c.h
+#include linux/clk.h
+#include linux/delay.h
+#include linux/dma-mapping.h
+#include linux/ahci_platform.h
+#include linux/kernel.h
+#include linux/slab.h
+#include linux/list.h
+#include linux/io.h
+#include linux/of_address.h
+
+#include plat/cpu.h
+
+#include mach/irqs.h
+#include mach/map.h
+#include mach/regs-pmu.h
+#include mach/regs-sata.h
+
+#include sata_phy.h
+
+#defineSATA_TIME_LIMIT 1000
+
+static struct i2c_client *i2c_client;
+
+static struct i2c_driver sataphy_i2c_driver;
+
+struct exynos_sata_phy {
+   void __iomem *mmio;
+   struct resource *mem;
+   struct clk *clk;
+   struct sata_phy phy;
+};
+
+static bool sata_is_reg(void __iomem *base, u32 reg, u32 checkbit, u32 status)
+{
+   if ((readl(base + reg)  checkbit) == status)
+   return true;
+   else
+   return false;
+}
+
+static bool wait_for_reg_status(void 

Re: [PATCH] usb: ehci: s5p: Power-off VBUS during suspend.

2013-01-29 Thread Alan Stern
On Tue, 29 Jan 2013, Vivek Gautam wrote:

 This change de-asserts vbus_gpio on suspend and
 re-asserts on resume in order to save power.
 NOTE, this change means no USB charging in suspend
 mode.

Doing this would mean USB devices could not wake up the system.  This 
would be unacceptable.

However, turning off VBUS power is okay provided:

no root-hub ports are enabled, and

the root hub is not enabled for wakeup.

Under those circumstances there can't be any wakeup-enabled USB devices 
on the bus, and the root hub itself would not need to detect new 
connections and disconnections.

Alan Stern

--
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] driver: ata: add new Exynos5250 SATA controller driver

2013-01-29 Thread Vasanth Ananthan
Adding platform driver for AHCI based SATA controller for Exynos5250.
The SATA controller in Exynos5250 is an AHCI based controller. Though
the controller implements only one port, the driver is scalable for
maximum number of ports possible. The drivers uses libahci framework
to initialize the controller and the ports implemented.

The driver also initializes the PHY controllers associated with the
sata controller, for which the port-phy mapping have to provided
in the device tree node of the sata controller node. The driver extracts
the device_node of the PHY controller provided in the mapping, passes it
the SATA PHY framework. The framework, return the corresponding PHY,
if it has be registered with the framework, after which the driver
intializes the PHY controller(s).

Signed-off-by: Vasanth Ananthan vasant...@samsung.com
---
 .../devicetree/bindings/ata/exynos-sata.txt|   16 +-
 drivers/ata/Kconfig|   12 +
 drivers/ata/Makefile   |1 +
 drivers/ata/sata_exynos.c  |  308 
 4 files changed, 336 insertions(+), 1 deletion(-)
 create mode 100644 drivers/ata/sata_exynos.c

diff --git a/Documentation/devicetree/bindings/ata/exynos-sata.txt 
b/Documentation/devicetree/bindings/ata/exynos-sata.txt
index 0849f10..7247ad2 100644
--- a/Documentation/devicetree/bindings/ata/exynos-sata.txt
+++ b/Documentation/devicetree/bindings/ata/exynos-sata.txt
@@ -8,10 +8,24 @@ Required properties:
 - interrupts: interrupt mapping for SATA IRQ
 - reg   : registers mapping
 - samsung,sata-freq : frequency in MHz
+- samsung,exynos-sata-phy : phandle This property specifies the PHY
+controller handle associated with each port in order.
 
-Example:
+Example: SATA with 2 port
 sata@ffe08000 {
 compatible = samsung,exynos5-sata;
 reg = 0xffe08000 0x1000;
 interrupts = 115;
+   samsung,sata-freq = 52;
+   samsung,exynos-sata-phy = phy0 phy1;
+   };
 };
+
+   phy0: sata-phy@ffe09000 {
+   compatible = samsung,exynos5250-sata-phy;
+   reg = 0xffe09000 0x1ff;
+   }
+   phy1: sata-phy@ffe07000 {
+compatible = samsung,exynos5250-sata-phy;
+reg = 0xffe07000 0x1ff;
+}
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 99c1e1b..8e61cf5 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -106,6 +106,18 @@ config SATA_PHY
  registers itself with the framework through the APIs provided and the 
SATA
  controller finds and requests for an appropriate PHY controller.
 
+config SATA_EXYNOS
+bool Exynos SATA AHCI support
+select I2C
+select HAVE_S3C2410_I2C
+select I2C_S3C2410
+select SATA_PHY
+help
+  This option enables support for Exynos AHCI Serial ATA
+  controllers.
+
+  If unsure, say N.
+
 config SATA_FSL
tristate Freescale 3.0Gbps SATA support
depends on FSL_SOC
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 7add682..c3a97f0 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_SATA_SIL24)  += sata_sil24.o
 obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
 obj-$(CONFIG_SATA_HIGHBANK)+= sata_highbank.o libahci.o
 obj-$(CONFIG_SATA_PHY) += sata_phy.o sata_exynos_phy.o
+obj-$(CONFIG_SATA_EXYNOS)  += sata_exynos.o libahci.o
 
 # SFF w/ custom DMA
 obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
diff --git a/drivers/ata/sata_exynos.c b/drivers/ata/sata_exynos.c
new file mode 100644
index 000..44a6dd7
--- /dev/null
+++ b/drivers/ata/sata_exynos.c
@@ -0,0 +1,308 @@
+/*
+ * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * EXYNOS - SATA controller platform driver wrapper
+ *
+ * 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 linux/kernel.h
+#include linux/gfp.h
+#include linux/module.h
+#include linux/init.h
+#include linux/interrupt.h
+#include linux/device.h
+#include linux/platform_device.h
+#include linux/libata.h
+#include linux/ahci_platform.h
+#include linux/clk.h
+#include linux/slab.h
+#include linux/of.h
+#include linux/of_irq.h
+#include linux/of_address.h
+
+#include ahci.h
+#include sata_phy.h
+
+#define MHZ(1000 * 1000)
+#define DEFERED1
+#define NO_PORT0
+
+static const struct ata_port_info ahci_port_info = {
+   .flags = AHCI_FLAG_COMMON,
+   .pio_mask = ATA_PIO4,
+   .udma_mask = ATA_UDMA6,
+   .port_ops = ahci_ops,
+};
+
+static struct scsi_host_template ahci_platform_sht = {
+   AHCI_SHT(ahci_platform),
+};
+
+struct exynos_sata {
+   struct clk *sclk;
+  

Re: [PATCH v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread Tomasz Figa
Hi Srinidhi,

On Tuesday 29 of January 2013 15:43:31 srinidhi kasagar wrote:
 Add 'smc' (Secure Monitor Call) identifier to differentiates
 the platforms which implements this.
 
 Signed-off-by: srinidhi kasagar srinidhi.kasa...@stericsson.com
 ---
  arch/arm/boot/dts/omap4.dtsi   |1 +
  arch/arm/include/asm/hardware/cache-l2x0.h |2 +-
  arch/arm/mach-cns3xxx/core.c   |4 ++--
  arch/arm/mach-exynos/common.c  |4 ++--
  arch/arm/mach-imx/mm-imx3.c|4 ++--
  arch/arm/mach-nomadik/cpu-8815.c   |4 ++--
  arch/arm/mach-omap2/omap4-common.c |2 +-
  arch/arm/mach-realview/realview_eb.c   |4 ++--
  arch/arm/mach-realview/realview_pb1176.c   |4 ++--
  arch/arm/mach-realview/realview_pb11mp.c   |4 ++--
  arch/arm/mach-realview/realview_pbx.c  |4 ++--
  arch/arm/mach-shmobile/board-ag5evm.c  |2 +-
  arch/arm/mach-shmobile/board-armadillo800eva.c |4 ++--
  arch/arm/mach-shmobile/board-bonito.c  |4 ++--
  arch/arm/mach-shmobile/board-kota2.c   |4 ++--
  arch/arm/mach-shmobile/board-kzm9g.c   |4 ++--
  arch/arm/mach-shmobile/setup-r8a7779.c |4 ++--
  arch/arm/mach-spear13xx/spear13xx.c|2 +-
  arch/arm/mach-ux500/cache-l2x0.c   |2 +-
  arch/arm/mach-vexpress/ct-ca9x4.c  |2 +-
  arch/arm/mm/cache-l2x0.c   |   18
 ++ 21 files changed, 47 insertions(+), 36 deletions(-)

I'd recommend you to take a look at this series:
http://thread.gmane.org/gmane.linux.ports.arm.kernel/202224/

It's already queued up for 3.9 in Samsung tree and most likely provides an 
interface needed for what you want to achieve.

Best regards,
-- 
Tomasz Figa
Samsung Poland RD Center
SW Solution Development, Linux Platform

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


[GIT PULL] Samsung fixes-4 for v3.8

2013-01-29 Thread Kukjin Kim
Hi Arnd and Olof,

Here is a pull request for Samsung fixes-4 for v3.8.

This fixes compatible values for exynos pinctrl and crash on soft reset,
tick and alarm irq numbers on exynos5440 and uninitialized variable on
s3c24xx.

If any problems, please kindly let me know.

Thanks.

- Kukjin

The following changes since commit 949db153b6466c6f7cad5a427ecea94985927311:

  Linux 3.8-rc5 (2013-01-25 11:57:28 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
v3.8-samsung-fixes-4

for you to fetch changes up to 60db7e5f9c9a25a7a9b01007e6e3f5a93bc16a3a:

  ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440 (2013-01-28 14:27:50
-0800)


Cong Ding (1):
  ARM: S3C24XX: fix uninitialized variable warning

Giridhar Maruthy (1):
  ARM: dts: fix tick and alarm irq numbers for exynos5440

Kukjin Kim (1):
  ARM: dts: fix compatible value for exynos pinctrl

Thomas Abraham (2):
  ARM: dts: Fix compatible value of pinctrl module on EXYNOS5440
  ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440

 Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt |   12
++--
 arch/arm/boot/dts/exynos4210.dtsi |6 +++---
 arch/arm/boot/dts/exynos4x12.dtsi |8

 arch/arm/boot/dts/exynos5440.dtsi |4 ++--
 arch/arm/mach-exynos/common.c |   10
++
 arch/arm/mach-s3c24xx/common.c|2 +-
 drivers/gpio/gpio-samsung.c   |6 +++---
 drivers/pinctrl/pinctrl-samsung.c |4 ++--
 8 files changed, 27 insertions(+), 25 deletions(-)

--
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/2] driver: ata: add new Exynos5250 SATA PHY controller driver

2013-01-29 Thread Kukjin Kim
Vasanth Ananthan wrote:
 
 Adding platform driver and I2C client driver for SATA PHY controller
 for Samsung Exynos5250.
 
Well, I think, if required, you need to implement that via DT...

 The PHY controller in Exynos5250 has both the APB interface
 and I2C client interface, hence it requires both a platform driver
 and an I2C client driver. The PHY controller's primary charecteristics
 are handled through the APB interface, facilitated by the platform driver
 and the 40 bit interface should be enabled through the I2C interface,
 facilitated by the I2C client driver.
 
 Further, this PHY controller driver uses PHY framework introduced by this
 patchset. The driver registers its initialization/shutdown call back to
the
 framework and corresponding port this PHY controller is assciated with
 gets this PHY and initializes it.
 
 Signed-off-by: Vasanth Ananthan vasant...@samsung.com
 ---
  arch/arm/mach-exynos/include/mach/regs-pmu.h  |3 +
  arch/arm/mach-exynos/include/mach/regs-sata.h |   29 +++
  drivers/ata/Makefile  |2 +-
  drivers/ata/sata_exynos_phy.c |  265
 +
  4 files changed, 298 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/mach-exynos/include/mach/regs-sata.h

If this header file is used only for sata driver, this can be moved into
drivers/ata/.

  create mode 100644 drivers/ata/sata_exynos_phy.c
 
 diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h
 b/arch/arm/mach-exynos/include/mach/regs-pmu.h
 index 3f30aa1..fd813d9 100644
 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h
 +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h
 @@ -369,4 +369,7 @@
 
  #define EXYNOS5_OPTION_USE_RETENTION (1 
 4)
 
 +/* Only for EXYNOS5250 */
 +#define EXYNOS5_SATA_PHY_CONTROL
   S5P_PMUREG(0x0724)

This should be handled into the driver. Please don't make a dependency with
SoC for your driver.

[...]

 -obj-$(CONFIG_SATA_PHY)   += sata_phy.o
 +obj-$(CONFIG_SATA_PHY)   += sata_phy.o sata_exynos_phy.o

Do you _really_ want to build the sata_exynos_phy.c under CONFIG_SATA_PHY? I
don't think so.

[...]

Thanks.

- Kukjin

--
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: [GIT PULL] Samsung fixes-4 for v3.8

2013-01-29 Thread Olof Johansson
On Tue, Jan 29, 2013 at 10:03:54AM -0800, Kukjin Kim wrote:
 Hi Arnd and Olof,
 
 Here is a pull request for Samsung fixes-4 for v3.8.
 
 This fixes compatible values for exynos pinctrl and crash on soft reset,
 tick and alarm irq numbers on exynos5440 and uninitialized variable on
 s3c24xx.
 
 If any problems, please kindly let me know.
 
 Thanks.
 
 - Kukjin
 
 The following changes since commit 949db153b6466c6f7cad5a427ecea94985927311:
 
   Linux 3.8-rc5 (2013-01-25 11:57:28 -0800)
 
 are available in the git repository at:
 
   git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
 v3.8-samsung-fixes-4

Pulled, but...

 for you to fetch changes up to 60db7e5f9c9a25a7a9b01007e6e3f5a93bc16a3a:
 
   ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440 (2013-01-28 14:27:50
 -0800)
 
 
 Cong Ding (1):
   ARM: S3C24XX: fix uninitialized variable warning

Hm, that whole loop looks bogus. The compiler is still free to optimize
it away since 'tmp' isn't actually used anywhere. It's just not good
enough at it yet.  :)


-Olof
--
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 RESEND] ARM: EXYNOS: dts: Set up power domain for MFC and G-scaler

2013-01-29 Thread Kukjin Kim
Prasanna Kumar wrote:
 
 This patch adds device tree nodes for MFC and G-scaler power
 domains of exynos5250.It binds these power-domain nodes to repsective
 device tree nodes
 
 It also adds support to enable PM generic domains for exynos5250.
 
 Signed-off-by: Prasanna Kumar prasanna...@samsung.com
 ---
  arch/arm/boot/dts/exynos5250.dtsi |   15 +++
  arch/arm/mach-exynos/Kconfig  |1 +
  2 files changed, 16 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/boot/dts/exynos5250.dtsi
 b/arch/arm/boot/dts/exynos5250.dtsi
 index 30485de..6d0e87c 100644
 --- a/arch/arm/boot/dts/exynos5250.dtsi
 +++ b/arch/arm/boot/dts/exynos5250.dtsi
 @@ -85,6 +85,7 @@
   compatible = samsung,mfc-v6;
   reg = 0x1100 0x1;
   interrupts = 0 96 0;
 + samsung,power-domain = pd_mfc;
   };
 
   rtc {
 @@ -554,28 +555,42 @@
   };
   };
 
 + pd_gsc: gsc-power-domain@0x10044000 {
 + compatible = samsung,exynos4210-pd;
 + reg = 0x10044000 0x20;
 + };
 +
 + pd_mfc: mfc-power-domain@0x10044040 {
 + compatible = samsung,exynos4210-pd;
 + reg = 0x10044040 0x20;
 + };
 +

Please put the above nodes by order of address.

   gsc_0:  gsc@0x13e0 {
   compatible = samsung,exynos5-gsc;
   reg = 0x13e0 0x1000;
   interrupts = 0 85 0;
 + samsung,power-domain = pd_gsc;
   };
 
   gsc_1:  gsc@0x13e1 {
   compatible = samsung,exynos5-gsc;
   reg = 0x13e1 0x1000;
   interrupts = 0 86 0;
 + samsung,power-domain = pd_gsc;
   };
 
   gsc_2:  gsc@0x13e2 {
   compatible = samsung,exynos5-gsc;
   reg = 0x13e2 0x1000;
   interrupts = 0 87 0;
 + samsung,power-domain = pd_gsc;
   };
 
   gsc_3:  gsc@0x13e3 {
   compatible = samsung,exynos5-gsc;
   reg = 0x13e3 0x1000;
   interrupts = 0 88 0;
 + samsung,power-domain = pd_gsc;
   };
 
   hdmi {
 diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-
 exynos/Kconfig
 index e103c29..96f4a9f 100644
 --- a/arch/arm/mach-exynos/Kconfig
 +++ b/arch/arm/mach-exynos/Kconfig
 @@ -61,6 +61,7 @@ config SOC_EXYNOS5250
   bool SAMSUNG EXYNOS5250
   default y
   depends on ARCH_EXYNOS5
 + select PM_GENERIC_DOMAINS if PM
   select S5P_PM if PM
   select S5P_SLEEP if PM
   select S5P_DEV_MFC
 --
 1.7.5.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 0/2] Adding SATA PHY framework and PHY controller driver

2013-01-29 Thread Tomasz Figa
Hi,

On Tuesday 29 of January 2013 20:49:16 Vasanth Ananthan wrote:
 Adding SATA PHY framework. The framework acts as an interface
 between the SATA controller and the PHY controller.
 
 The framework can be used by any platform with device tree support.
 It primarily serves to de-couple the SATA controller driver and the
 PHY controller driver.
 
 Vasanth Ananthan (2):
   driver: ata: SATA PHY framework
   driver: ata: add new Exynos5250 SATA PHY controller driver
 
  arch/arm/mach-exynos/include/mach/regs-pmu.h  |3 +
  arch/arm/mach-exynos/include/mach/regs-sata.h |   29 +++
  drivers/ata/Kconfig   |   10 +
  drivers/ata/Makefile  |1 +
  drivers/ata/sata_exynos_phy.c |  265
 + drivers/ata/sata_phy.c   
 |  145 ++ drivers/ata/sata_phy.h|  
 29 +++
  7 files changed, 482 insertions(+)
  create mode 100644 arch/arm/mach-exynos/include/mach/regs-sata.h
  create mode 100644 drivers/ata/sata_exynos_phy.c
  create mode 100644 drivers/ata/sata_phy.c
  create mode 100644 drivers/ata/sata_phy.h

It seems like you haven't addressed any of the comments received last time 
you posted this series...

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


Re: [PATCH 2/4] ARM: dts: add support for mixer to exynos4

2013-01-29 Thread Sylwester Nawrocki

Hi,

On 01/28/2013 09:38 AM, Tomasz Figa wrote:

+
+   mixer: mixer {
+   compatible = samsung,exynos4-mixer;


I'm afraid this compatible property it too generic. Is the video mixer
IP really identical an all the Exynos4 series SoCs ?


It is same in Exynos4210, 4212 and 4412.


The convention is to use the name of SoC on which this IP version appeared
first. In this case it would be samsung,exynos4210-mixer.


And I believe this is a good convention to stick with. I'm going to have
a look at the documentation, as it seems unlikely these IPs are exactly 
same

across those SoC revisions. I'm not saying this isn't possible though. :)

--

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


Re: [PATCH 2/4] ARM: dts: add support for mixer to exynos4

2013-01-29 Thread Sylwester Nawrocki

Hi,

On 01/28/2013 07:44 AM, Rahul Sharma wrote:

+
+   mixer: mixer {
+   compatible = samsung,exynos4-mixer;



I'm afraid this compatible property it too generic. Is the video mixer IP
really identical an all the Exynos4 series SoCs ?



It is same in Exynos4210, 4212 and 4412.




+   reg =0x12c1 0x1,
+0x12c0 0x1;
+   interrupts =0 91 0;
+   samsung,power-domain =pd_tv;
+   };
   };



Is there documentation for these new bindings available somewhere ?



it is there at Documentation/devicetree/bindings/drm/exynos/mixer.txt.
Probably I need to add details for power domain node property.


Sorry, I can't see anything for Exynos4 there, it's only for exynos5 SoCs.
I think the need for the 'samsung,power-domain' property (I guess that
should be optional) needs to be documented for completeness.

Getting back to the bindings documentation,
Documentation/devicetree/bindings/drm/exynos/ seems not exactly right
place for me, but that's a minor issue. There is also a V4L2 driver
for the HDMI and TV output devices in drivers/media/platform/s5p-tv.
So Documentation/devicetree/bindings/video or
Documentation/devicetree/bindings/media might be a better home for that
bindings documentation. These IPs are not specific to DRM at all.

--

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


Re: [PATCH 1/4] ARM: dts: add support for hdmi to exynos4

2013-01-29 Thread Sylwester Nawrocki

Hi Rahul,

On 01/28/2013 07:19 AM, Rahul Sharma wrote:

--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -289,4 +289,11 @@
 interrupts =0 34 0;
 };
 };
+
+   hdmi {
+   compatible = samsung,exynos4-hdmi14;



What -hdmi14 signifies here ? And to which Exynos4 SoC revisions this
compatible property is supposed to apply ?



-hdmi14 signifies 1.4 compliant Hdmi IP like in Exynos4412, while
Exynos4210 has 1.3
compliant HDMI block. I have done a mistake here. I should have kept
it in 4412.dtsi. OR
I can move it to 4x12.dtsi but not sure whether all 4x12 socs have 1.4 hdmi.


Exynos4210 also have the HDMI IP. I'm not sure how much common those 
IP's are

among Exynos4 series SoCs. I suppose it makes sense to create a hdmi node in
exynos4.dtsi and override what's required either in exynos4x12.dtsi or
exynos4412.dtsi file.

What is worring me is that you're trying to just append the supported
HDMI standard version to the string, and there might be more differences
in the IPs across all Exynos4 SoC series. What if there are two different
SoCs that support e.g. HDMI v1.4 but there are some differences in the
HDMI IPs ? You would likely need to invent new properties and pass them
to the driver. Appending specific SoC name to the compatible string looks
like a better alternative to me.


+   reg =0x12D0 0x7;
+   interrupts =0 95 0;
+   hpd-gpio =gpx3 7 0xf 1 3;
+   };



New bindings need to be documented in Documentation/devicetree/bindings/.


It is present at Documentation/devicetree/bindings/drm/exynos/hdmi.txt.


Thanks. Sorry, I've missed that. But it seems to be only for exynos5 SoCs ?
Also the location is a bit unexpected to me, if we want to have Exynos4 and
Exynos5 specific IP documented in this file. As I mentioned in previous
e-mail this IP is not only handled by the DRM API.

--

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: Failure due to missing (Exynos related) pinctrl patch

2013-01-29 Thread Linus Walleij
On Tue, Jan 29, 2013 at 6:10 AM, Sachin Kamat sachin.ka...@linaro.org wrote:

 Patch titled pinctrl: exynos: change PINCTRL_EXYNOS option
 (linux-next commit Id: 7452b64d) which is present in linux-next is
 missing in the mainline kernel.

Do I haven't sent my pull request for the pinctrl fixes yet.

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

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 V3 1/2] ARM: EXYNOS: Add AUXDATA for DP controller

2013-01-29 Thread Jingoo Han
Use AUXDATA to set the device names for DP controller instance
discovered from device tree.

Signed-off-by: Ajay Kumar ajaykumar...@samsung.com
Signed-off-by: Jingoo Han jg1@samsung.com
---
Tested with SMDK5250 board

Changes since v2:
- rebase on linux-samsung for-next branch

Changes since v1:
- replace the definition with the value

 arch/arm/mach-exynos/mach-exynos5-dt.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
b/arch/arm/mach-exynos/mach-exynos5-dt.c
index e99d3d8..00ee732 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -104,6 +104,7 @@ 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-dp, 0x145B, exynos-dp, NULL),
{},
 };
 
-- 
1.7.2.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 V3 2/2] ARM: dts: Add device tree node for DP controller for exynos5250

2013-01-29 Thread Jingoo Han
Add device tree node for DP controller in EXYNOS5250 and
enable the instance for the SMDK5250 board.

Signed-off-by: Ajay Kumar ajaykumar...@samsung.com
Signed-off-by: Jingoo Han jg1@samsung.com
---
Tested with SMDK5250 board

Changes since v2:
- rebase on linux-samsung for-next branch

Changes since v1:
- change the property name from 'display-port-controller' to 'dp-controller'

 arch/arm/boot/dts/exynos5250-smdk5250.dts |9 +
 arch/arm/boot/dts/exynos5250.dtsi |   14 ++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts 
b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index e05b18f..e2fe2af 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -204,4 +204,13 @@
samsung,mfc-r = 0x4300 0x80;
samsung,mfc-l = 0x5100 0x80;
};
+
+   dp-controller {
+   samsung,color-space = 0;
+   samsung,dynamic-range = 0;
+   samsung,ycbcr-coeff = 0;
+   samsung,color-depth = 1;
+   samsung,link-rate = 0x0a;
+   samsung,lane-count = 4;
+   };
 };
diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index 30485de..b482d8e 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -732,4 +732,18 @@
interrupt-parent = combiner;
interrupts = 24 1;
};
+
+   dp-controller {
+   compatible = samsung,exynos5-dp;
+   reg = 0x145b 0x1000;
+   interrupts = 10 3;
+   interrupt-parent = combiner;
+   #address-cells = 1;
+   #size-cells = 0;
+
+   dptx-phy {
+   reg = 0x10040720;
+   samsung,enable-mask = 1;
+   };
+   };
 };
-- 
1.7.2.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: Failure due to missing (Exynos related) pinctrl patch

2013-01-29 Thread Sachin Kamat
 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.

-- 
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-29 Thread Kukjin Kim
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.

Thanks.

- Kukjin

--
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-29 Thread Sachin Kamat
On 30 January 2013 09:38, Kukjin Kim kgene@samsung.com 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.

Yes you are right. It cannot be squashed now. I was referring to the
time of generation of these patches.


 Thanks.

 - Kukjin




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


[PATCH RESEND v2] ARM: EXYNOS: dts: Set up power domain for MFC and G-scaler

2013-01-29 Thread Prasanna Kumar
This patch adds device tree nodes for MFC and G-scaler power
domains of exynos5250.It binds these power-domain nodes to repsective
device tree nodes

It also adds support to enable PM generic domains for exynos5250.

Signed-off-by: Prasanna Kumar prasanna...@samsung.com
---
 arch/arm/boot/dts/exynos5250.dtsi |   16 
 arch/arm/mach-exynos/Kconfig  |1 +
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index 30485de..e282fde 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -46,6 +46,16 @@
i2c8 = i2c_8;
};
 
+   pd_gsc: gsc-power-domain@0x10044000 {
+   compatible = samsung,exynos4210-pd;
+   reg = 0x10044000 0x20;
+   };
+
+   pd_mfc: mfc-power-domain@0x10044040 {
+   compatible = samsung,exynos4210-pd;
+   reg = 0x10044040 0x20;
+   };
+
gic:interrupt-controller@10481000 {
compatible = arm,cortex-a9-gic;
#interrupt-cells = 3;
@@ -85,6 +95,7 @@
compatible = samsung,mfc-v6;
reg = 0x1100 0x1;
interrupts = 0 96 0;
+   samsung,power-domain = pd_mfc;
};
 
rtc {
@@ -554,28 +565,33 @@
};
};
 
+
gsc_0:  gsc@0x13e0 {
compatible = samsung,exynos5-gsc;
reg = 0x13e0 0x1000;
interrupts = 0 85 0;
+   samsung,power-domain = pd_gsc;
};
 
gsc_1:  gsc@0x13e1 {
compatible = samsung,exynos5-gsc;
reg = 0x13e1 0x1000;
interrupts = 0 86 0;
+   samsung,power-domain = pd_gsc;
};
 
gsc_2:  gsc@0x13e2 {
compatible = samsung,exynos5-gsc;
reg = 0x13e2 0x1000;
interrupts = 0 87 0;
+   samsung,power-domain = pd_gsc;
};
 
gsc_3:  gsc@0x13e3 {
compatible = samsung,exynos5-gsc;
reg = 0x13e3 0x1000;
interrupts = 0 88 0;
+   samsung,power-domain = pd_gsc;
};
 
hdmi {
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index e103c29..96f4a9f 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -61,6 +61,7 @@ config SOC_EXYNOS5250
bool SAMSUNG EXYNOS5250
default y
depends on ARCH_EXYNOS5
+   select PM_GENERIC_DOMAINS if PM
select S5P_PM if PM
select S5P_SLEEP if PM
select S5P_DEV_MFC
-- 
1.7.5.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 1/2] ARM: Exynos5250: Enabling samsung-usbphy driver

2013-01-29 Thread Kukjin Kim
Vivek Gautam wrote:
 
 Adding usbphy node for Exynos5250 along with the
 necessary device data to be parsed.
 
 Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
 ---
  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.

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

 + reg = 0x10040704 0x8,
 +   /* USB2.0 PHY configuration register */
 +   0x10050230 0x4;
 + };
 + };
 +
   amba {
   #address-cells = 1;
   #size-cells = 1;
 --
 1.7.6.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 v1 1/5] ARM: cache-l2x0: add 'smc' identifier

2013-01-29 Thread Srinidhi Kasagar
On Tue, Jan 29, 2013 at 13:22:56 +0100, Russell King - ARM Linux wrote:
 On Tue, Jan 29, 2013 at 05:19:27PM +0530, Srinidhi Kasagar wrote:
  On Tue, Jan 29, 2013 at 12:33:25 +0100, Russell King - ARM Linux wrote:
   On Tue, Jan 29, 2013 at 03:43:31PM +0530, srinidhi kasagar wrote:
Add 'smc' (Secure Monitor Call) identifier to differentiates
the platforms which implements this.
   
   This patch makes no sense.
   
   So, if setting 'smc' in the DT description is supposed to mean that
   the platform has a secure monitor then...
   
+   is_smc = of_property_read_bool(np, smc);
+
+   if (is_smc) {
+   /* set the debug interface */
+   outer_cache.set_debug = pl310_set_debug;
+   }
   
   Now, let's look at what pl310_set_debug() does:
   
   static void pl310_set_debug(unsigned long val)
   {
   writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
  
  You can do this operation (write to DEBUG_CTRL) only if SMC is implemented.
 
 Err... no.  You can do it if you're running in secure mode without a
 secure monitor, because the security stuff doesn't get in the way.

Yes, you are right as always. I was totally wrong, I overlooked the code.
I will drop this patch, it does not make sense.

 
 What other platforms do is up to them, and up to *how* the secure monitor
 is implemented, not *if*.
 
   }
   
   Can you explain where the secure monitor call is there please, because
   I can't see one.  In fact, this is the function used when there _isn't_
   a secure monitor.  So this patch just seems totally wrong to me.
 
 So this is going to be difficult because you only ever answer half an
 email?  So, I repeat the question above.
Yes, there is no secure monitor call. I mixed up two things and end up in a 
mess.

Thanks,srinidhi
--
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 2/2] ARM: Exynos5250: Enabling samsung-usb3-phy driver

2013-01-29 Thread Kukjin Kim
Vivek Gautam wrote:
 
 Adding usb3.0 phy node for Exynos5250 along with the
 necessary device data to be parsed.
 
 Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
 ---
  arch/arm/boot/dts/exynos5250.dtsi |   13 +
  1 files changed, 13 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/boot/dts/exynos5250.dtsi
 b/arch/arm/boot/dts/exynos5250.dtsi
 index 610e338..018a70d 100644
 --- a/arch/arm/boot/dts/exynos5250.dtsi
 +++ b/arch/arm/boot/dts/exynos5250.dtsi
 @@ -275,6 +275,19 @@
   #size-cells = 0;
   };
 
 + usbphy@1210 {
 + compatible = samsung,exynos5250-usb3-phy;
 + reg = 0x1210 0x100;
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges;
 +
 + usbphy-sys {
 +   /* USB device and host PHY_CONTROL registers
*/
 + reg = 0x10040704 0x8;
 + };
 + };
 +
   usbphy@1213 {
   compatible = samsung,exynos5250-usbphy;
   reg = 0x1213 0x100;
 --
 1.7.6.5

Same as previous comments.

Thanks.

- Kukjin



--
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] driver: ata: add new Exynos5250 SATA controller driver

2013-01-29 Thread Tushar Behera
On 01/29/2013 08:52 PM, Vasanth Ananthan wrote:
 Adding platform driver for AHCI based SATA controller for Exynos5250.
 The SATA controller in Exynos5250 is an AHCI based controller. Though
 the controller implements only one port, the driver is scalable for
 maximum number of ports possible. The drivers uses libahci framework
 to initialize the controller and the ports implemented.
 
 The driver also initializes the PHY controllers associated with the
 sata controller, for which the port-phy mapping have to provided
 in the device tree node of the sata controller node. The driver extracts
 the device_node of the PHY controller provided in the mapping, passes it
 the SATA PHY framework. The framework, return the corresponding PHY,
 if it has be registered with the framework, after which the driver
 intializes the PHY controller(s).
 
 Signed-off-by: Vasanth Ananthan vasant...@samsung.com
 ---

[ ... ]

 +
 +static int __init exynos_sata_probe(struct platform_device *pdev)
 +{

__init would result in a section mismatch warning.

[ ... ]

 +
 +static int __devexit exynos_sata_remove(struct platform_device *pdev)
 +{

Use of __devexit is deprecated now. Please remove that.


-- 
Tushar Behera
--
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/6] ARM: dts: Update MFC DT binding documentation

2013-01-29 Thread Sachin Kamat
Hi Sylwester,

 +Example:

 Maybe adding a comment that this is a SoC...

 +mfc: codec@1340 {
 + compatible = samsung,mfc-v5;
 + reg = 0x1340 0x1;
 + interrupts = 0 94 0;
 +};

 and the board specific part would make it more clear ?

Absolutely :)


 +codec@1340 {
 + samsung,mfc-r = 0x4300 0x80;
 + samsung,mfc-l = 0x5100 0x80;
 +};

 Also please note that in the first node above you need
 status = disabled; line, so the MFC is disabled by default.
 Then in dts files for boards that use the codec it can be
 overridden to enable the device as needed.

Right.


-- 
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 v4 1/2] usb: phy: samsung: Common out the generic stuff

2013-01-29 Thread Kukjin Kim
Vivek Gautam wrote:
 
 Moving register and structure definitions to header file,
 and keeping the generic functions to be used across
 multiple PHYs in common file samsung-usbphy.c.
 Also renaming the usb 2.0 phy driver to samsung-usb2.c

Just in my opinion, Samsung-usb2phy is more clear?...In addition, I looked
at using SAMSUNG_USB2PHY as a statement.

 
 Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
 ---
 
 Changes from v3:
  - Using separate config SAMSUNG_USB2PHY dependent on
SAMSUNG_USBPHY for samsung-usb2 type PHY controller.
 
  drivers/usb/phy/Kconfig  |   14 +-
  drivers/usb/phy/Makefile |1 +
  drivers/usb/phy/samsung-usb2.c   |  511 +++
  drivers/usb/phy/samsung-usbphy.c |  714
+-
  drivers/usb/phy/samsung-usbphy.h |  247 +
  5 files changed, 778 insertions(+), 709 deletions(-)
  create mode 100644 drivers/usb/phy/samsung-usb2.c
  create mode 100644 drivers/usb/phy/samsung-usbphy.h
 
 diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
 index fae4d08..cc0d230 100644
 --- a/drivers/usb/phy/Kconfig
 +++ b/drivers/usb/phy/Kconfig
 @@ -48,8 +48,18 @@ config USB_RCAR_PHY
 
  config SAMSUNG_USBPHY
   bool Samsung USB PHY controller Driver
 - depends on USB_S3C_HSOTG || USB_EHCI_S5P ||
 USB_OHCI_EXYNOS

So this can be selected without any dependency?

   select USB_OTG_UTILS
   help
 -   Enable this to support Samsung USB phy controller for samsung
 +   Enable this to support Samsung USB phy controllers for Samsung
 SoCs.

Hmm, according to above comments, this should be enabled under Samsung SoC?

 +
 +if SAMSUNG_USBPHY

Why is this needed here?

 +
 +config SAMSUNG_USB2PHY
 + bool Samsung USB 2.0 PHY controller Driver
 + depends on USB_S3C_HSOTG || USB_EHCI_S5P ||
 USB_OHCI_EXYNOS
 + help
 +   Enable this to support Samsung USB 2.0 (High Speed) phy controller
 +   for Samsung SoCs.
 +
 +endif
 diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
 index ec304f6..7ba9862 100644
 --- a/drivers/usb/phy/Makefile
 +++ b/drivers/usb/phy/Makefile
 @@ -10,3 +10,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-usb2.o
 diff --git a/drivers/usb/phy/samsung-usb2.c b/drivers/usb/phy/samsung-
 usb2.c
 new file mode 100644
 index 000..9a9d1d0
 --- /dev/null
 +++ b/drivers/usb/phy/samsung-usb2.c
 @@ -0,0 +1,511 @@
 +/* linux/drivers/usb/phy/samsung-usb2.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_usbphy_set_host(struct usb_otg *otg, struct usb_bus *host)

For naming, if you want to support usb 2.0 phy here, the name of fuction
should be changed to more clear name such as usb2phy or whatever.

As I'm understanding, the samsung-usbphy.c can be used for common stuff and
this is for only usb 2.0 phy.

[...]

 +#ifdef CONFIG_OF
 +static const struct of_device_id samsung_usbphy_dt_match[] = {
 + {
 + .compatible = samsung,s3c64xx-usbphy,
 + .data = usbphy_s3c64xx,
 + }, {
 + .compatible = samsung,exynos4210-usbphy,
 + .data = usbphy_exynos4,
 + }, {
 + .compatible = samsung,exynos5250-usbphy,
 + .data = usbphy_exynos5
 + },
 + {},
 +};
 +MODULE_DEVICE_TABLE(of, samsung_usbphy_dt_match);
 +#endif
 +
 +static struct platform_device_id samsung_usbphy_driver_ids[] = {
 + {
 + .name   = s3c64xx-usbphy,
 + .driver_data= (unsigned long)usbphy_s3c64xx,
 + }, {
 + .name   = exynos4210-usbphy,
 + .driver_data= (unsigned long)usbphy_exynos4,
 + }, {
 + .name   = exynos5250-usbphy,
 + 

Re: [PATCH 2/6] ARM: dts: Add MFC codec support for Exynos4 DT machines

2013-01-29 Thread Sachin Kamat
Hi Sylwester,


 + mfc: codec@1340 {
 + compatible = samsung,mfc-v5;
 + reg = 0x1340 0x1;
 + interrupts = 0 94 0;
 + samsung,power-domain = pd_mfc;

 Please add:
 status = disabled;

OK


 + };
  };
 +static void __init exynos4_reserve(void)
 +{
 +#ifdef CONFIG_S5P_DEV_MFC

 Where is this symbol supposed to be enabled ?

 Don't you need a change like this as a part of this patch ?

Yes. Good catch. Since this symbol was defined under other machines
which were getting enabled, I did not notice this.



-- 
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 v4 2/2] usb: phy: samsung: Add PHY support for USB 3.0 controller

2013-01-29 Thread Kukjin Kim
Vivek Gautam wrote:
 
 Adding PHY driver support for USB 3.0 controller for Samsung's
 SoCs.
 
 Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
 ---
 
 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?

[...]

 +#ifdef CONFIG_OF
 +static const struct of_device_id samsung_usbphy_dt_match[] = {
 + {
 + .compatible = samsung,exynos5250-usb3-phy,
 + .data = usb3_phy_exynos5
 + },
 + {},
 +};
 +MODULE_DEVICE_TABLE(of, samsung_usbphy_dt_match);
 +#endif
 +
 +static struct platform_device_id samsung_usbphy_driver_ids[] = {
 + {
 + .name   = exynos5250-usb3-phy,

According to the name of file, exynos5250-usb3phy? Just it is imho...

 + .driver_data= (unsigned long)usb3_phy_exynos5,
 + },
 + {},
 +};
 +
 +MODULE_DEVICE_TABLE(platform, samsung_usbphy_driver_ids);
 +
 +static struct platform_driver samsung_usb3_phy_driver = {
 + .probe  = samsung_usb3_phy_probe,
 + .remove = samsung_usb3_phy_remove,
 + .id_table   = samsung_usbphy_driver_ids,
 + .driver = {
 + .name   = samsung-usb3-phy,
 + .owner  = THIS_MODULE,
 + .of_match_table =
 of_match_ptr(samsung_usbphy_dt_match),
 + },
 +};
 +
 +module_platform_driver(samsung_usb3_phy_driver);
 +
 +MODULE_DESCRIPTION(Samsung USB 3.0 phy controller);
 +MODULE_AUTHOR(Vivek Gautam gautam.vi...@samsung.com);
 +MODULE_LICENSE(GPL);
 +MODULE_ALIAS(platform:samsung-usb3-phy);

I want you to use same naming rule.

Thanks.

- Kukjin

--
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] iio: adc: add exynos5 adc driver under iio framwork

2013-01-29 Thread Naveen Krishna Ch
On 26 January 2013 16:27, Jonathan Cameron ji...@kernel.org wrote:
 On 01/24/2013 04:58 AM, Naveen Krishna Chatradhi wrote:
 This patch adds driver for ADC IP found on EXYNOS5250 and EXYNOS5410
 from Samsung. Also adds the Documentation for device tree bindings.

 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
 Just a quick general comment on patch formatting. For later versions give
 a title of
 [PATCH V5]...
 to the email as then it's easy for those of us who have been sitting
 back and quitely not reading the thread to figure out which the latest
 patch is.

 Thanks

 Jonathan
Sure Jonathan (I was assuming using message id would be enough), i
will correct it.

 ---
 Changes since v1:

 1. Fixed comments from Lars
 2. Added support for ADC on EXYNOS5410

 Changes since v2:

 1. Changed the instance name for (struct iio_dev *) to indio_dev
 2. Changed devm_request_irq to request_irq

 Few doubts regarding the mappings and child device handling.
 Kindly, suggest me better methods.

 Changes since v3:

 1. Added clk_prepare_disable and regulator_disable calls in _remove()
 2. Moved init_completion before irq_request
 3. Added NULL pointer check for devm_request_and_ioremap() return value.
 4. Use number of channels as per the ADC version
 5. Change the define ADC_V1_CHANNEL to ADC_CHANNEL
 6. Update the Documentation to include EXYNOS5410 compatible

 Doug, i've used
   chan = iio_channel_get(dev_name(pdev-dev), adc3);
 in ntc thermistor driver during probe and
   iio_read_channel_raw(chan, val);
 for read.

 But, then the drivers become kind of coupled. Right.

 Lars, Is there an other way.

 Thanks for the comments

  .../bindings/arm/samsung/exynos5-adc.txt   |   38 ++
  drivers/iio/adc/Kconfig|7 +
  drivers/iio/adc/Makefile   |1 +
  drivers/iio/adc/exynos5_adc.c  |  475 
 
  4 files changed, 521 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/arm/samsung/exynos5-adc.txt
  create mode 100644 drivers/iio/adc/exynos5_adc.c

 diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos5-adc.txt 
 b/Documentation/devicetree/bindings/arm/samsung/exynos5-adc.txt
 new file mode 100644
 index 000..0f281d9
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/arm/samsung/exynos5-adc.txt
 @@ -0,0 +1,38 @@
 +Samsung Exynos5 Analog to Digital Converter bindings
 +
 +Required properties:
 +- compatible:Must be samsung,exynos5250-adc for 
 exynos5250 controllers.
 + Must be samsung,exynos5410-adc for exynos5410 
 controllers.
 +- reg:   Contains ADC register address range (base 
 address and
 + length).
 +- interrupts:Contains the interrupt information for the 
 timer. The
 + format is being dependent on which interrupt controller
 + the Samsung device uses.
 +
 +Note: child nodes can be added for auto probing from device tree.
 +
 +Example: adding device info in dtsi file
 +
 +adc@12D1 {
 + compatible = samsung,exynos5250-adc;
 + reg = 0x12D1 0x100;
 + interrupts = 0 106 0;
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges;
 +};
 +
 +
 +Example: Adding child nodes in dts file
 +
 +adc@12D1 {
 +
 + /* NTC thermistor is a hwmon device */
 + ncp15wb473@0 {
 + compatible = ntc,ncp15wb473;
 + reg = 0x0;
 + pullup-uV = 180;
 + pullup-ohm = 47000;
 + pulldown-ohm = 0;
 + };
 +};
 diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
 index fe822a1..33ceabf 100644
 --- a/drivers/iio/adc/Kconfig
 +++ b/drivers/iio/adc/Kconfig
 @@ -91,6 +91,13 @@ config AT91_ADC
   help
 Say yes here to build support for Atmel AT91 ADC.

 +config EXYNOS5_ADC
 + bool Exynos5 ADC driver support
 + help
 +   Core support for the ADC block found in the Samsung EXYNOS5 series
 +   of SoCs for drivers such as the touchscreen and hwmon to use to share
 +   this resource.
 +
  config LP8788_ADC
   bool LP8788 ADC driver
   depends on MFD_LP8788
 diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
 index 2d5f100..5b4a4f6 100644
 --- a/drivers/iio/adc/Makefile
 +++ b/drivers/iio/adc/Makefile
 @@ -10,6 +10,7 @@ obj-$(CONFIG_AD7791) += ad7791.o
  obj-$(CONFIG_AD7793) += ad7793.o
  obj-$(CONFIG_AD7887) += ad7887.o
  obj-$(CONFIG_AT91_ADC) += at91_adc.o
 +obj-$(CONFIG_EXYNOS5_ADC) += exynos5_adc.o
  obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
  obj-$(CONFIG_MAX1363) += max1363.o
  obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o
 diff --git a/drivers/iio/adc/exynos5_adc.c b/drivers/iio/adc/exynos5_adc.c
 new file mode 100644
 index 000..4963649
 --- /dev/null
 +++ b/drivers/iio/adc/exynos5_adc.c
 @@ -0,0 +1,475 @@
 +/*
 + *  exynos5_adc.c - Support for ADC in EXYNOS5 SoCs
 + *
 + *  8 ~ 10 channel, 

Re: [PATCH 3/6] ARM: dts: Add MFC codec support to SMDKV310 DT

2013-01-29 Thread Sachin Kamat
Hi Sylwester,

 + codec@1340 {
 + samsung,mfc-r = 0x4300 0x80;
 + samsung,mfc-l = 0x5100 0x80;

 With the change as I proposed in patch 2/6 you need to add:

 status = okay;

 in this node and for all other boards in the further patches
 in this series.

Right. Will update the series with your comments and re-send it.
Thank you for reviewing.

-- 
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 1/2] drm/exynos: add support for dt based search to exynos4 hdmi

2013-01-29 Thread Inki Dae
Hi Rahul,

Could you add descriptions to dt document file? For this, you can
refer to the below link,
https://patchwork.kernel.org/patch/1948061/

Thanks,
Inki Dae

2013/1/25 Rahul Sharma rahul.sha...@samsung.com:
 Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
 ---
  drivers/gpu/drm/exynos/exynos_ddc.c | 2 ++
  drivers/gpu/drm/exynos/exynos_hdmi.c| 6 ++
  drivers/gpu/drm/exynos/exynos_hdmiphy.c | 2 ++
  3 files changed, 10 insertions(+)

 diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c 
 b/drivers/gpu/drm/exynos/exynos_ddc.c
 index 4e9b5ba..7680809 100644
 --- a/drivers/gpu/drm/exynos/exynos_ddc.c
 +++ b/drivers/gpu/drm/exynos/exynos_ddc.c
 @@ -53,6 +53,8 @@ static struct of_device_id hdmiddc_match_types[] = {
 {
 .compatible = samsung,exynos5-hdmiddc,
 }, {
 +   .compatible = samsung,exynos4-hdmiddc,
 +   }, {
 /* end node */
 }
  };
 diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c 
 b/drivers/gpu/drm/exynos/exynos_hdmi.c
 index fbab3c4..202b65f 100644
 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
 +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
 @@ -2418,6 +2418,12 @@ static struct platform_device_id hdmi_driver_types[] = 
 {
  #ifdef CONFIG_OF
  static struct of_device_id hdmi_match_types[] = {
 {
 +   .compatible = samsung,exynos4-hdmi,
 +   .data   = (void *)HDMI_TYPE13,
 +   }, {
 +   .compatible = samsung,exynos4-hdmi14,
 +   .data   = (void *)HDMI_TYPE14,
 +   }, {
 .compatible = samsung,exynos5-hdmi,
 .data   = (void *)HDMI_TYPE14,
 }, {
 diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c 
 b/drivers/gpu/drm/exynos/exynos_hdmiphy.c
 index ea49d13..2e33f90 100644
 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c
 +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c
 @@ -51,6 +51,8 @@ static struct of_device_id hdmiphy_match_types[] = {
 {
 .compatible = samsung,exynos5-hdmiphy,
 }, {
 +   .compatible = samsung,exynos4-hdmiphy,
 +   }, {
 /* end node */
 }
  };
 --
 1.8.0

 ___
 dri-devel mailing list
 dri-de...@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
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 3/4] ARM: Exynos5250: Add clock information for dwc3-exynos

2013-01-29 Thread Kukjin Kim
Vivek Gautam wrote:
 
 Hi Tomasz,
 
 
 On Wed, Jan 16, 2013 at 8:35 PM, Vivek Gautam
 gautamvivek1...@gmail.com wrote:
  Hi Tomasz,
 
 
  On Wed, Jan 16, 2013 at 1:19 PM, Tomasz Figa tomasz.f...@gmail.com
 wrote:
  Hi Vivek,
 
  Don't you need also some clkdev lookup entry to make the clock
available
  in the driver?
 
 
  This clock source we added with a motive of completion, however it's
  not being used as of now.
  As far as i could see the lookup structure contains clocks for devices
  having multiple instances.
  Do you feel that i should be adding an entry in clk_lookup structure ?
  May be i am missing here something. Can you please elaborate on the
  use-case of clk_lookup
  entries.
 
 
 Any suggestions on this please ?
 
Just note, I think you can do it based on Samsung common clock is for all of
exynos stuff which will be done in a couple of days. Sorry for late it,
because there were some problems.

Thanks.

- Kukjin

--
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] ARM: dts: specify all the per-cpu interrupts of arch timer for exynos5440

2013-01-29 Thread Santosh Shilimkar

Benoit,

On Thursday 24 January 2013 06:46 PM, Marc Zyngier wrote:

Hi Benoit,

On 24/01/13 12:42, Benoit Cousson wrote:

Hi Santosh,

On 01/23/2013 11:55 AM, Santosh Shilimkar wrote:

Looping Marc, Benoit

On Wednesday 23 January 2013 04:06 PM, Mark Rutland wrote:

On Tue, Jan 22, 2013 at 10:05:18PM +, Kukjin Kim wrote:

Mark Rutland wrote:



+ devicetree-discuss, Grant Likely, Rob Herring and Tony Lindgren


On Tue, Jan 22, 2013 at 01:41:27AM +, Kukjin Kim wrote:

From: Thomas Abraham thomas...@samsung.com

Need to be changed requirements in the 'cpus' node for exynos5440
to specify all the per-cpu interrupts of arch timer.


The node(s) for the arch timer should not be in the cpus/cpu@N nodes.
Instead, there should be one node (in the root of the tree).


Well, I don't think so. As per my understanding, the local timers are
attached to every ARM cores (cpus) and it generates certain interrupt
to the
GIC. So the correct representation for this in device tree is to
include the
interrupts in the cpu nodes in dts file. Your comments  refer to a
limitation in the Linux kernel implementation of the arch_timer and it
should not result in representing the hardware details incorrectly in
the
dts file.


I disagree. The correct representation is whatever the devicetree
binding
documentation describes. It does not describe placing timer nodes in
the cpu
nodes.


This seems to be exact same topic what is getting discussed here [1]
Technically DT is suppose to represent how the hardware is rather than
how the bindings are done.

But as Marc pointed out, the approach taken currently is to not
duplicate the banked information. The thread [1] isn't concluded
yet but looks like we might want to avoid duplicating the information
considering, more of such duplication needs to follow. e.g gic i/f

Am still waiting on what Benoit has to say ?


I agree with you :-)

I'm not sure the binding was properly done to reflect the HW accurately.

A local timer for my point of view should be located in the cpu node
like a L1 cache. Or at least referenced in each cpu by a phandle.

What was the rational to put it in the root?


The rational was to follow what we already do for most (all?) banked
resources. We already have TWD, GIC and PMU that have a root node,
avoiding duplicated resources. I think consistency is an important thing
to have.

If we decide to move everything into CPU nodes and duplicate all the
banked resources, fine. But that has impacts that reach far beyond the
simple case of the timer.

In particular, good luck with the GIC distributor interface, where the
32 first interrupts are per CPU. This would also mandate a redesign of
the way we specify a PPI, as the CPU mask in the third field doesn't
mean a thing anymore.

If you insist on having a phandle to a timer node, fine by me.


Can you please comment on it so that we can conclude this thread ?
I would like to update my patches and hence the push.

Regards,
Santosh

--
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/6] ARM: dts: Add MFC support for Exynos4

2013-01-29 Thread Sachin Kamat

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

 .../devicetree/bindings/media/s5p-mfc.txt  |   21 
 arch/arm/boot/dts/exynos4.dtsi |8 +++
 arch/arm/boot/dts/exynos4210-origen.dts|6 +
 arch/arm/boot/dts/exynos4210-smdkv310.dts  |6 +
 arch/arm/boot/dts/exynos4412-origen.dts|6 +
 arch/arm/boot/dts/exynos4412-smdk4412.dts  |6 +
 arch/arm/mach-exynos/Kconfig   |1 +
 arch/arm/mach-exynos/mach-exynos4-dt.c |   17 
 8 files changed, 71 insertions(+), 0 deletions(-)

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


[PATCH 1/6] ARM: dts: Update MFC DT binding documentation

2013-01-29 Thread Sachin Kamat
Added an example for bindings for illustration and clarity.

Cc: devicetree-disc...@lists.ozlabs.org
Cc: Arun Kumar K arun...@samsung.com
Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 .../devicetree/bindings/media/s5p-mfc.txt  |   21 
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt 
b/Documentation/devicetree/bindings/media/s5p-mfc.txt
index 67ec3d4..bf0182d 100644
--- a/Documentation/devicetree/bindings/media/s5p-mfc.txt
+++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
@@ -21,3 +21,24 @@ Required properties:
 
   - samsung,mfc-l : Base address of the second memory bank used by MFC
for DMA contiguous memory allocation and its size.
+
+Optional properties:
+  - samsung,power-domain : power-domain property defined with a phandle
+  to respective power domain.
+
+Example:
+SoC specific DT entry:
+
+mfc: codec@1340 {
+   compatible = samsung,mfc-v5;
+   reg = 0x1340 0x1;
+   interrupts = 0 94 0;
+   samsung,power-domain = pd_mfc;
+};
+
+Board specific DT entry:
+
+codec@1340 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+};
-- 
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


[PATCH 2/6] ARM: dts: Add MFC codec support for Exynos4 DT machines

2013-01-29 Thread Sachin Kamat
This patch adds MFC codec support for Exynos4 DT machines.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 arch/arm/boot/dts/exynos4.dtsi |8 
 arch/arm/mach-exynos/Kconfig   |1 +
 arch/arm/mach-exynos/mach-exynos4-dt.c |   17 +
 3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index e1347fc..6581bb2 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -131,6 +131,14 @@
status = disabled;
};
 
+   mfc: codec@1340 {
+   compatible = samsung,mfc-v5;
+   reg = 0x1340 0x1;
+   interrupts = 0 94 0;
+   samsung,power-domain = pd_mfc;
+   status = disabled;
+   };
+
serial@1380 {
compatible = samsung,exynos4210-uart;
reg = 0x1380 0x100;
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index e103c29..f0d8f09 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -415,6 +415,7 @@ config MACH_EXYNOS4_DT
select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
select PINCTRL
select PINCTRL_EXYNOS4
+   select S5P_DEV_MFC
select USE_OF
help
  Machine support for Samsung Exynos4 machine with device tree enabled.
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c 
b/arch/arm/mach-exynos/mach-exynos4-dt.c
index ab1dacc..8ae8da1 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -12,7 +12,9 @@
 */
 
 #include linux/of_platform.h
+#include linux/of_fdt.h
 #include linux/serial_core.h
+#include linux/memblock.h
 
 #include asm/mach/arch.h
 #include asm/hardware/gic.h
@@ -20,6 +22,7 @@
 
 #include plat/cpu.h
 #include plat/regs-serial.h
+#include plat/mfc.h
 
 #include common.h
 
@@ -80,6 +83,7 @@ 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,mfc-v5, 0x1340, s5p-mfc, NULL),
{},
 };
 
@@ -102,6 +106,18 @@ static char const *exynos4_dt_compat[] __initdata = {
NULL
 };
 
+static void __init exynos4_reserve(void)
+{
+#ifdef CONFIG_S5P_DEV_MFC
+   struct s5p_mfc_dt_meminfo mfc_mem;
+
+   /* Reserve memory for MFC only if it's available */
+   mfc_mem.compatible = samsung,mfc-v5;
+   if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, mfc_mem))
+   s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
+   mfc_mem.lsize);
+#endif
+}
 DT_MACHINE_START(EXYNOS4210_DT, Samsung Exynos4 (Flattened Device Tree))
/* Maintainer: Thomas Abraham thomas.abra...@linaro.org */
.smp= smp_ops(exynos_smp_ops),
@@ -114,4 +130,5 @@ DT_MACHINE_START(EXYNOS4210_DT, Samsung Exynos4 (Flattened 
Device Tree))
.timer  = exynos4_timer,
.dt_compat  = exynos4_dt_compat,
.restart= exynos4_restart,
+   .reserve= exynos4_reserve,
 MACHINE_END
-- 
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


[PATCH 4/6] ARM: dts: Add MFC codec support to Origen DT

2013-01-29 Thread Sachin Kamat
This patch adds MFC codec support to Origen DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 arch/arm/boot/dts/exynos4210-origen.dts |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-origen.dts 
b/arch/arm/boot/dts/exynos4210-origen.dts
index f271001..052606b 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -57,6 +57,12 @@
status = okay;
};
 
+   codec@1340 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+   status = okay;
+   };
+
serial@1380 {
status = okay;
};
-- 
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


[PATCH 5/6] ARM: dts: Add MFC codec entry to exynos4412-origen DT file

2013-01-29 Thread Sachin Kamat
Added MFC codec entry to exynos4412-origen.dts.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 arch/arm/boot/dts/exynos4412-origen.dts |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4412-origen.dts 
b/arch/arm/boot/dts/exynos4412-origen.dts
index 4eba374..e066fc6 100644
--- a/arch/arm/boot/dts/exynos4412-origen.dts
+++ b/arch/arm/boot/dts/exynos4412-origen.dts
@@ -44,6 +44,12 @@
status = okay;
};
 
+   codec@1340 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+   status = okay;
+   };
+
serial@1380 {
status = okay;
};
-- 
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


[PATCH 6/6] ARM: dts: Add MFC codec entry to exynos4412-smdk4412 DT file

2013-01-29 Thread Sachin Kamat
Added MFC DT entry to exynos4412-smdk4412.dts file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 arch/arm/boot/dts/exynos4412-smdk4412.dts |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4412-smdk4412.dts 
b/arch/arm/boot/dts/exynos4412-smdk4412.dts
index e885971..6ae4276 100644
--- a/arch/arm/boot/dts/exynos4412-smdk4412.dts
+++ b/arch/arm/boot/dts/exynos4412-smdk4412.dts
@@ -34,6 +34,12 @@
status = okay;
};
 
+   codec@1340 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+   status = okay;
+   };
+
serial@1380 {
status = okay;
};
-- 
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


[PATCH 3/6] ARM: dts: Add MFC codec support to SMDKV310 DT

2013-01-29 Thread Sachin Kamat
Added MFC codec support to SMDKV310 DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
 arch/arm/boot/dts/exynos4210-smdkv310.dts |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts 
b/arch/arm/boot/dts/exynos4210-smdkv310.dts
index f634907..2b1e03a 100644
--- a/arch/arm/boot/dts/exynos4210-smdkv310.dts
+++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts
@@ -43,6 +43,12 @@
status = okay;
};
 
+   codec@1340 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+   status = okay;
+   };
+
serial@1380 {
status = okay;
};
-- 
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