Re: [PATCH] ARM: dts: Update vdd_arm regulator

2013-06-20 Thread Tushar Behera
On 06/10/2013 09:14 AM, Tushar Behera wrote:
 On 06/08/2013 05:22 PM, Tomasz Figa wrote:
 Hi Tushar,

 On Thursday 06 of June 2013 16:32:52 Tushar Behera wrote:
 Cpufreq driver for EXYNOS4210 is not a platform driver, hence it is not
 possible to provide the regulator supply name through DT bindings.
 Since the cpufreq driver requires the regulator to be named as
 'vdd_arm', the related regulator name should be kept same.

 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 ---
  arch/arm/boot/dts/exynos4210-origen.dts |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/arch/arm/boot/dts/exynos4210-origen.dts
 b/arch/arm/boot/dts/exynos4210-origen.dts index bcf8079..bd5f589 100644
 --- a/arch/arm/boot/dts/exynos4210-origen.dts
 +++ b/arch/arm/boot/dts/exynos4210-origen.dts
 @@ -192,7 +192,7 @@
 };

 buck1_reg: BUCK1 {
 -   regulator-name = VDD_ARM_1.2V;
 +   regulator-name = vdd_arm;

 Yes, this is the hack I mentioned in my review of
 [PATCH 0/2] Clock update for EXYNOS4210-CPUFREQ driver

 
 We can hold this patch till we get to a conclusion for the above
 mentioned patch set.
 
Kukjin,

We have agreed to go ahead with this approach till the cpufreq driver
has not been modified.

Can you please take this patch now?

-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 2/2] clk: exynos4: Add alias for cpufreq related clocks

2013-06-18 Thread Tushar Behera
On 06/17/2013 10:20 AM, Tushar Behera wrote:
 On 06/11/2013 12:23 AM, Tomasz Figa wrote:
 On Monday 10 of June 2013 09:13:11 Tushar Behera wrote:
 On 06/08/2013 05:20 PM, Tomasz Figa wrote:
 On Thursday 06 of June 2013 16:52:28 Tushar Behera wrote:
 
 [ ... ]
 
   MUX_A(mout_core, mout_core, mout_core_p4210,

 - SRC_CPU, 16, 1, mout_core),
 + SRC_CPU, 16, 1, moutcore),

 IMHO those typo corrections are not part of this patch.

 But the older drivers (before migration to CCF) were using the clock
 moutcore (not mout_core).

 I mean, this should be placed in a separate patch, as this change is not 
 adding alias for cpufreq related clocks, but rather fixing a typo.

 
 Is it ok if I split this patch into 2, one adding clock alias
 'mout_apll' and another one fixing the alias names 'mout_mpll',
 'moutcore' and 'armclk'?
 

I have to fix up another clock for exynos4x12 too. I feel all these
modifications are too small to justify different patches. I would modify
the commit message appropriately.


 [ ... ]
 
 Basically I don't like the idea of those global aliases, which IMHO
 should be completely dropped. Someone might not like it, but I'd go
 with the conversion of our cpufreq drivers to platform drivers
 instead, which could receive things like clocks and regulators using
 DT-based lookups.
 I agree. Migration of exynos-cpufreq driver as a platform driver is the
 best solution. But unless someone picks up that work, cpufreq support
 for EXYNOS4 based systems is broken because of the incorrect clock
 aliases.

 We have patches for this in our internal tree. I will clean them up a bit 
 and submit soon.

 
 If you are going to submit the cpufreq driver patches for v3.11, then we
 can ignore this patchset. Otherwise, I would prefer to get these patches
 merged for v3.11 to get cpufreq working. Once the driver changes are
 incorporated, we can very well modify these later.
 
 Thanks.
 


-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 2/2] clk: exynos4: Add alias for cpufreq related clocks

2013-06-16 Thread Tushar Behera
On 06/11/2013 12:23 AM, Tomasz Figa wrote:
 On Monday 10 of June 2013 09:13:11 Tushar Behera wrote:
 On 06/08/2013 05:20 PM, Tomasz Figa wrote:
 On Thursday 06 of June 2013 16:52:28 Tushar Behera wrote:

[ ... ]

MUX_A(mout_core, mout_core, mout_core_p4210,

 -  SRC_CPU, 16, 1, mout_core),
 +  SRC_CPU, 16, 1, moutcore),

 IMHO those typo corrections are not part of this patch.

 But the older drivers (before migration to CCF) were using the clock
 moutcore (not mout_core).
 
 I mean, this should be placed in a separate patch, as this change is not 
 adding alias for cpufreq related clocks, but rather fixing a typo.
 

Is it ok if I split this patch into 2, one adding clock alias
'mout_apll' and another one fixing the alias names 'mout_mpll',
'moutcore' and 'armclk'?

[ ... ]

 Basically I don't like the idea of those global aliases, which IMHO
 should be completely dropped. Someone might not like it, but I'd go
 with the conversion of our cpufreq drivers to platform drivers
 instead, which could receive things like clocks and regulators using
 DT-based lookups.
 I agree. Migration of exynos-cpufreq driver as a platform driver is the
 best solution. But unless someone picks up that work, cpufreq support
 for EXYNOS4 based systems is broken because of the incorrect clock
 aliases.
 
 We have patches for this in our internal tree. I will clean them up a bit 
 and submit soon.
 

If you are going to submit the cpufreq driver patches for v3.11, then we
can ignore this patchset. Otherwise, I would prefer to get these patches
merged for v3.11 to get cpufreq working. Once the driver changes are
incorporated, we can very well modify these later.

Thanks.
-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 2/2] clk: exynos4: Add alias for cpufreq related clocks

2013-06-09 Thread Tushar Behera
On 06/08/2013 05:20 PM, Tomasz Figa wrote:
 On Thursday 06 of June 2013 16:52:28 Tushar Behera wrote:
 cpufreq driver for EXYNOS4 based SoCs are not platform drivers, hence
 we cannot currently pass the clock names through a device tree node.
 Instead, we need to make them available through a global alias.

 'armclk', 'moutcore', 'mout_mpll' and 'mout_apll' clock aliases are
 defined.

 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 ---
  drivers/clk/samsung/clk-exynos4.c |   10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

 diff --git a/drivers/clk/samsung/clk-exynos4.c
 b/drivers/clk/samsung/clk-exynos4.c index 3c1f888..1e4258a 100644
 --- a/drivers/clk/samsung/clk-exynos4.c
 +++ b/drivers/clk/samsung/clk-exynos4.c
 @@ -356,8 +356,8 @@ struct samsung_fixed_rate_clock
 exynos4210_fixed_rate_clks[] __initdata = {

  /* list of mux clocks supported in all exynos4 soc's */
  struct samsung_mux_clock exynos4_mux_clks[] __initdata = {
 -MUX_F(mout_apll, mout_apll, mout_apll_p, SRC_CPU, 0, 1,
 -CLK_SET_RATE_PARENT, 0),
 +MUX_FA(mout_apll, mout_apll, mout_apll_p, SRC_CPU, 0, 1,
 +CLK_SET_RATE_PARENT, 0, mout_apll),
  MUX(none, mout_hdmi, mout_hdmi_p, SRC_TV, 0, 1),
  MUX(none, mout_mfc1, sclk_evpll_p, SRC_MFC, 4, 1),
  MUX(none, mout_mfc, mout_mfc_p, SRC_MFC, 8, 1),
 @@ -385,9 +385,9 @@ struct samsung_mux_clock exynos4210_mux_clks[]
 __initdata = { MUX(none, mout_g2d, mout_g2d_p, E4210_SRC_IMAGE, 8,
 1),
  MUX(none, mout_fimd1, group1_p4210, E4210_SRC_LCD1, 0, 4),
  MUX(none, mout_mipi1, group1_p4210, E4210_SRC_LCD1, 12, 4),
 -MUX_A(sclk_mpll, sclk_mpll, mout_mpll_p, SRC_CPU, 8, 1, 
 sclk_mpll),
 +MUX_A(sclk_mpll, sclk_mpll, mout_mpll_p, SRC_CPU, 8, 1, 
 mout_mpll),
 
 This is not fully compliant with patch description. I'm not sure if there 
 weren't any users of the sclk_mpll alias.
 

As of now, there are no other users of sclk_mpll other than a debug
print within the same file.

  MUX_A(mout_core, mout_core, mout_core_p4210,
 -SRC_CPU, 16, 1, mout_core),
 +SRC_CPU, 16, 1, moutcore),
 
 IMHO those typo corrections are not part of this patch.
 

But the older drivers (before migration to CCF) were using the clock
moutcore (not mout_core).

  MUX_A(sclk_vpll, sclk_vpll, sclk_vpll_p4210,
  SRC_TOP0, 8, 1, sclk_vpll),
  MUX(mout_fimc0, mout_fimc0, group1_p4210, SRC_CAM, 0, 4),
 @@ -534,7 +534,7 @@ struct samsung_div_clock exynos4_div_clks[]
 __initdata = { DIV(none, div_spi_pre2, div_spi2, DIV_PERIL2, 8, 8),
  DIV(none, div_audio1, mout_audio1, DIV_PERIL4, 0, 4),
  DIV(none, div_audio2, mout_audio2, DIV_PERIL4, 16, 4),
 -DIV_A(arm_clk, arm_clk, div_core2, DIV_CPU0, 28, 3, 
 arm_clk),
 +DIV_A(arm_clk, arm_clk, div_core2, DIV_CPU0, 28, 3, armclk),
 
 Same here.
 

Same as above, armclk is used elsewhere, not arm_clk.

  DIV_A(sclk_apll, sclk_apll, mout_apll,
  DIV_CPU0, 24, 3, sclk_apll),
  DIV_F(none, div_mipi_pre0, div_mipi0, DIV_LCD0, 20, 4,
 
 Basically I don't like the idea of those global aliases, which IMHO should 
 be completely dropped. Someone might not like it, but I'd go with the 
 conversion of our cpufreq drivers to platform drivers instead, which could 
 receive things like clocks and regulators using DT-based lookups.
 

I agree. Migration of exynos-cpufreq driver as a platform driver is the
best solution. But unless someone picks up that work, cpufreq support
for EXYNOS4 based systems is broken because of the incorrect clock aliases.

 This is especially important in case of regulators, which currently have 
 to be hacked by using vdd_arm as regulator name in device tree.
 

Agree.

 CCing people that might be interested in this topic.
 
 Best regards,
 Tomasz
 

Thanks.

-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH] ARM: dts: Update vdd_arm regulator

2013-06-09 Thread Tushar Behera
On 06/08/2013 05:22 PM, Tomasz Figa wrote:
 Hi Tushar,
 
 On Thursday 06 of June 2013 16:32:52 Tushar Behera wrote:
 Cpufreq driver for EXYNOS4210 is not a platform driver, hence it is not
 possible to provide the regulator supply name through DT bindings.
 Since the cpufreq driver requires the regulator to be named as
 'vdd_arm', the related regulator name should be kept same.

 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 ---
  arch/arm/boot/dts/exynos4210-origen.dts |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/arch/arm/boot/dts/exynos4210-origen.dts
 b/arch/arm/boot/dts/exynos4210-origen.dts index bcf8079..bd5f589 100644
 --- a/arch/arm/boot/dts/exynos4210-origen.dts
 +++ b/arch/arm/boot/dts/exynos4210-origen.dts
 @@ -192,7 +192,7 @@
  };

  buck1_reg: BUCK1 {
 -regulator-name = VDD_ARM_1.2V;
 +regulator-name = vdd_arm;
 
 Yes, this is the hack I mentioned in my review of
 [PATCH 0/2] Clock update for EXYNOS4210-CPUFREQ driver
 

We can hold this patch till we get to a conclusion for the above
mentioned patch set.


 Best regards,
 Tomasz
 
  regulator-min-microvolt = 
 95;
  regulator-max-microvolt = 
 135;
  regulator-always-on;


-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 0/7] Update Arndale board support

2013-04-02 Thread Tushar Behera
Arndale board support has been updated using pin-control and
common clock framework.

The patchset is based on Kukjin's for-next.
commit d58f6a153f40 (Merge branch 'next/clk-exynos-2' into for-next)

It depends on following patchset.

[PATCH 0/2] ARM: dts: Add default pin states for client nodes on Exynos4/5 
platforms
http://comments.gmane.org/gmane.linux.kernel.samsung-soc/16559

Following 2 patches have been newly added in this patchset because
of changes during 3.9 merge window.
1/7: ARM: dts: Add pin-control related changes for Arndale board
2/7: ARM: dts: Add disable-wp for card slot on exynos5250-arndale

Amit Daniel Kachhap (1):
  ARM: dts: Add PMIC node entry for Arndale board

Sachin Kamat (4):
  ARM: dts: Add disable-wp for card slot on exynos5250-arndale
  ARM: dts: Add vmmc regulator support for Arndale board
  ARM: dts: Add MFC codec support for Arndale board
  ARM: dts: Add HDMI HPD and regulator node for Arndale board

Tushar Behera (2):
  ARM: dts: Add pin-control related changes for Arndale board
  ARM: dts: Add gpio-button entries for Arndale board

 arch/arm/boot/dts/exynos5250-arndale.dts |  343 +-
 1 file changed, 333 insertions(+), 10 deletions(-)

-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 1/7] ARM: dts: Add pin-control related changes for Arndale board

2013-04-02 Thread Tushar Behera
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
This is a new patch in the patch-set.

 arch/arm/boot/dts/exynos5250-arndale.dts |   13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 5de019c..7e7a61e 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -69,15 +69,12 @@
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
+   pinctrl-names = default;
+   pinctrl-0 = sd0_clk sd0_cmd sd0_bus4 sd0_bus8;
 
slot@0 {
reg = 0;
bus-width = 8;
-   gpios = gpc0 0 2 0 3, gpc0 1 2 0 3,
-   gpc0 3 2 3 3, gpc0 4 2 3 3,
-   gpc0 5 2 3 3, gpc0 6 2 3 3,
-   gpc1 0 2 3 3, gpc1 1 2 3 3,
-   gpc1 2 2 3 3, gpc1 3 2 3 3;
};
};
 
@@ -93,14 +90,12 @@
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
+   pinctrl-names = default;
+   pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4;
 
slot@0 {
reg = 0;
bus-width = 4;
-   samsung,cd-pinmux-gpio = gpc3 2 2 3 3;
-   gpios = gpc3 0 2 0 3, gpc3 1 2 0 3,
-   gpc3 3 2 3 3, gpc3 4 2 3 3,
-   gpc3 5 2 3 3, gpc3 6 2 3 3;
};
};
 
-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 2/7] ARM: dts: Add disable-wp for card slot on exynos5250-arndale

2013-04-02 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

This is required to keep the existing functionality of having no
write protect pin on Arndale board.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
This is a new patch in the patchset.

 arch/arm/boot/dts/exynos5250-arndale.dts |1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 7e7a61e..d07a21f 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -96,6 +96,7 @@
slot@0 {
reg = 0;
bus-width = 4;
+   disable-wp;
};
};
 
-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 3/7] ARM: dts: Add gpio-button entries for Arndale board

2013-04-02 Thread Tushar Behera
Added GPIO buttons DT node to Arndale board file.

Signed-off-by: Tushar Behera tushar.beh...@linaro.org
Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
Changes for V3:
* Removed redundant #address-cells and #size-cells
* Pin-control related modifications.


 arch/arm/boot/dts/exynos5250-arndale.dts |   46 ++
 1 file changed, 46 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index d07a21f..03c9ad5 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -122,4 +122,50 @@
clock-frequency = 2400;
};
};
+
+   gpio_keys {
+   compatible = gpio-keys;
+
+   menu {
+   label = SW-TACT2;
+   gpios = gpx1 4 1;
+   linux,code = 139;
+   gpio-key,wakeup;
+   };
+
+   home {
+   label = SW-TACT3;
+   gpios = gpx1 5 1;
+   linux,code = 102;
+   gpio-key,wakeup;
+   };
+
+   up {
+   label = SW-TACT4;
+   gpios = gpx1 6 1;
+   linux,code = 103;
+   gpio-key,wakeup;
+   };
+
+   down {
+   label = SW-TACT5;
+   gpios = gpx1 7 1;
+   linux,code = 108;
+   gpio-key,wakeup;
+   };
+
+   back {
+   label = SW-TACT6;
+   gpios = gpx2 0 1;
+   linux,code = 158;
+   gpio-key,wakeup;
+   };
+
+   wakeup {
+   label = SW-TACT7;
+   gpios = gpx2 1 1;
+   linux,code = 143;
+   gpio-key,wakeup;
+   };
+   };
 };
-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 4/7] ARM: dts: Add PMIC node entry for Arndale board

2013-04-02 Thread Tushar Behera
From: Amit Daniel Kachhap amit.dan...@samsung.com

Added S5M8767 PMIC DT nodes for Arndale board. Only the used
LDO's/BUCK are defined here. Also the nodes describe the default/reset
state LDO's and no power mangement tuning is implemented. The usage
desription can be found in s5m8767 device tree binding documentation.

Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
Changes for V3:
* Pin-control related modifications.

 arch/arm/boot/dts/exynos5250-arndale.dts |  255 +-
 1 file changed, 254 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 03c9ad5..7c3f54b 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -25,7 +25,260 @@
};
 
i2c@12C6 {
-   status = disabled;
+   samsung,i2c-sda-delay = 100;
+   samsung,i2c-max-bus-freq = 2;
+   samsung,i2c-slave-addr = 0x66;
+
+   s5m8767_pmic@66 {
+   compatible = samsung,s5m8767-pmic;
+   reg = 0x66;
+
+   s5m8767,pmic-buck2-dvs-voltage = 130;
+   s5m8767,pmic-buck3-dvs-voltage = 110;
+   s5m8767,pmic-buck4-dvs-voltage = 120;
+   s5m8767,pmic-buck-dvs-gpios = gpd1 0 0,
+   gpd1 1 0,
+   gpd1 2 0;
+   s5m8767,pmic-buck-ds-gpios = gpx2 3 0,
+   gpx2 4 0,
+   gpx2 5 0;
+   regulators {
+   ldo1_reg: LDO1 {
+   regulator-name = VDD_ALIVE_1.0V;
+   regulator-min-microvolt = 110;
+   regulator-max-microvolt = 110;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = 1;
+   };
+
+   ldo2_reg: LDO2 {
+   regulator-name = VDD_28IO_DP_1.35V;
+   regulator-min-microvolt = 120;
+   regulator-max-microvolt = 120;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = 1;
+   };
+
+   ldo3_reg: LDO3 {
+   regulator-name = VDD_COMMON1_1.8V;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = 1;
+   };
+
+   ldo4_reg: LDO4 {
+   regulator-name = VDD_IOPERI_1.8V;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   op_mode = 1;
+   };
+
+   ldo5_reg: LDO5 {
+   regulator-name = VDD_EXT_1.8V;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = 1;
+   };
+
+   ldo6_reg: LDO6 {
+   regulator-name = VDD_MPLL_1.1V;
+   regulator-min-microvolt = 110;
+   regulator-max-microvolt = 110;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = 1;
+   };
+
+   ldo7_reg: LDO7 {
+   regulator-name = VDD_XPLL_1.1V;
+   regulator-min-microvolt = 110;
+   regulator-max-microvolt = 110;
+   regulator-always-on;
+   regulator

[PATCH V3 5/7] ARM: dts: Add vmmc regulator support for Arndale board

2013-04-02 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

Added vmmc regulator node to Arndale DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
Changes for V3:
* Pin-control related modifications.

 arch/arm/boot/dts/exynos5250-arndale.dts |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 7c3f54b..e7fa72c 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -322,6 +322,7 @@
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
+   vmmc-supply = mmc_reg;
pinctrl-names = default;
pinctrl-0 = sd0_clk sd0_cmd sd0_bus4 sd0_bus8;
 
@@ -343,6 +344,7 @@
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
+   vmmc-supply = mmc_reg;
pinctrl-names = default;
pinctrl-0 = sd2_clk sd2_cmd sd2_cd sd2_bus4;
 
@@ -421,4 +423,13 @@
gpio-key,wakeup;
};
};
+
+   mmc_reg: voltage-regulator {
+   compatible = regulator-fixed;
+   regulator-name = VDD_33ON_2.8V;
+   regulator-min-microvolt = 280;
+   regulator-max-microvolt = 280;
+   gpio = gpx1 1 1;
+   enable-active-high;
+   };
 };
-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 6/7] ARM: dts: Add MFC codec support for Arndale board

2013-04-02 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

Added MFC codec node to Arndale DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
---
No changes for V3

 arch/arm/boot/dts/exynos5250-arndale.dts |5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index e7fa72c..5910df7 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -24,6 +24,11 @@
bootargs = console=ttySAC2,115200;
};
 
+   codec@1100 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+   };
+
i2c@12C6 {
samsung,i2c-sda-delay = 100;
samsung,i2c-max-bus-freq = 2;
-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH V3 7/7] ARM: dts: Add HDMI HPD and regulator node for Arndale board

2013-04-02 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

Added HDMI hot plug and regulator nodes to Arndale DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
Changes for V3:
* Pin-control related modifications.

 arch/arm/boot/dts/exynos5250-arndale.dts |   12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 5910df7..c4057ea 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -429,6 +429,13 @@
};
};
 
+   hdmi {
+   hpd-gpio = gpx3 7 2;
+   vdd_osc-supply = ldo10_reg;
+   vdd_pll-supply = ldo8_reg;
+   vdd-supply = ldo8_reg;
+   };
+
mmc_reg: voltage-regulator {
compatible = regulator-fixed;
regulator-name = VDD_33ON_2.8V;
@@ -437,4 +444,9 @@
gpio = gpx1 1 1;
enable-active-high;
};
+
+   reg_hdmi_en: fixedregulator@0 {
+   compatible = regulator-fixed;
+   regulator-name = hdmi-en;
+   };
 };
-- 
1.7.9.5

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 0/2] ARM: dts: Add default pin states for client nodes on Exynos4/5 platforms

2013-03-25 Thread Tushar Behera
On 03/07/2013 01:45 PM, Linus Walleij wrote:
 On Wed, Mar 6, 2013 at 1:36 PM, Thomas Abraham
 thomas.abra...@linaro.org wrote:
 
 This patch series populates the default pin states in client nodes
 of Exynos4 and Exynos5 platforms. Exynos4/5 platforms are migrating
 to use pinctrl framework and having the default pin states listed
 in the client nodes allows the device core to setup the default
 pin configuration for all the controllers.
 
 The series:
 Acked-by: Linus Walleij linus.wall...@linaro.org
 
 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
 

Kukjin,

Would you be applying this patch-set to your tree? We need that to
rebase Arndale related patches for v3.10.


-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 1/5] ARM: dts: exynos5250-arndale: Add node entry for gpio-buttons

2013-03-11 Thread Tushar Behera
On 03/11/2013 07:35 AM, Kukjin Kim wrote:
 Tomasz Figa wrote:

 Hi,

 I'm wondering why Exynos5250 has not been migrated to use pinctrl yet.

 Support for it in pinctrl-samsung driver has been already merged, but I
 don't see any pinctrl nodes in exynos5250.dtsi.

 This is important because the legacy gpio-samsung support is going to be
 dropped, as it already happened in case of Exynos 4.

 CC'ing Thomas Abraham as he might know something.

 Tushar and all,
 
 I agree with Tomasz's opinion to support pinctrl instead of gpio on exynos5250
 stuff.
 
 Please re-submit with using pinctrl is in samsung tree.
 

Ok. I will rebase the patchset on for-next branch and re-submit.


-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH V2] ARM: dts: exynos5250-arndale: Add PMIC node entry

2013-02-21 Thread Tushar Behera
On 02/11/2013 06:06 AM, Amit Daniel Kachhap wrote:
 Added S5M8767 PMIC DT nodes for Arndale board. Only the used
 LDO's/BUCK are defined here. Also the nodes describe the default/reset
 state LDO's and no power mangement tuning is implemented. The usage
 desription can be found in s5m8767 device tree binding documentation.
 
 Cc: Tushar Behera tushar.beh...@linaro.org

Tested-by: Tushar Behera tushar.beh...@linaro.org

 Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com

-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 1/5] ARM: dts: exynos5250-arndale: Add node entry for gpio-buttons

2013-02-07 Thread Tushar Behera
+CC: David Jander da...@protonic.nl
+CC: Dmitry Torokhov d...@mail.ru

On 02/07/2013 01:13 PM, Girish KS wrote:
 +
 +gpio_keys {
 +compatible = gpio-keys;
 +#address-cells = 1;
 +#size-cells = 0;

 Just want to understand why these properties are here?
 As these properties are for child dt node. But have not seen
 anyone is using here.


 That is how gpio_keys node entries are defined in other .dts files.

 I have gone through example for address-cells and size-cells in following 
 link:
 http://devicetree.org/mediawiki/index.php?title=Device_Tree_Usagestable=1#CPU_addressing

 which indicates that these fields are for child reg.
 I think, here in child node there is no reg. so there is no use
 of address-cells and size-cells propeties.


 Please check Documentation/devicetree/bindings/gpio/gpio_keys.txt

 And whether these properties are required or not, I will let device tree
 experts to comment on that.

 As such, currently all node entries for gpio_keys use these properties.
 you can just verify by a simple test.
 delete the 2 lines. address-cells and size cells.
 this will have no affect.
 now with these 2 lines deleted lines add a dummy reg property with
 address and cell. dtb compiler will warn.
 So I think what manish reffered is right.
 There is also a reference of smdk4210 for kepads.

Right. Compilation is ok even after removing the address-cell and
size-cell properties.

But since this is used across all the instances, I would like to know
the view of the authors on this.

David, Dimitry,

Can you please let us know your opinion on this? If these properties are
not required, then we can remove them from the documentation and from
node entries in several other dts files.


 --
 Tushar Behera

 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH 2/5] ARM: dts: exynos5250-arndale: Add PMIC node entry

2013-02-06 Thread Tushar Behera
From: Amit Daniel Kachhap amit.dan...@samsung.com

Added S5M8767 PMIC DT nodes to Arndale board.

Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com
Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 arch/arm/boot/dts/exynos5250-arndale.dts |  213 +-
 1 files changed, 212 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 9ce40df..b40a02f 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -25,7 +25,218 @@
};
 
i2c@12C6 {
-   status = disabled;
+   status = okay;
+   samsung,i2c-sda-delay = 100;
+   samsung,i2c-max-bus-freq = 2;
+   samsung,i2c-slave-addr = 0x66;
+   gpios = gpb3 0 2 3 0,
+   gpb3 1 2 3 0;
+
+   s5m8767_pmic@66 {
+   compatible = samsung,s5m8767-pmic;
+   reg = 0x66;
+
+   s5m8767,pmic-buck2-dvs-voltage = 130;
+   s5m8767,pmic-buck3-dvs-voltage = 110;
+   s5m8767,pmic-buck4-dvs-voltage = 120;
+   s5m8767,pmic-buck-dvs-gpios = gpd1 0 1 0 0,
+   gpd1 1 1 0 0,
+   gpd1 2 1 0 0;
+   s5m8767,pmic-buck-ds-gpios = gpx2 3 1 0 0,
+   gpx2 4 1 0 0,
+   gpx2 5 1 0 0;
+   regulators {
+   ldo1_reg: LDO1 {
+   regulator-name = VDD_ALIVE_1.0V;
+   regulator-min-microvolt = 110;
+   regulator-max-microvolt = 110;
+   regulator-always-on;
+   regulator-boot-on;
+   op_mode = 1;
+   };
+
+   ldo2_reg: LDO2 {
+   regulator-name = VDD_28IO_DP_1.35V;
+   regulator-min-microvolt = 120;
+   regulator-max-microvolt = 120;
+   regulator-always-on;
+   op_mode = 1;
+   };
+
+   ldo3_reg: LDO3 {
+   regulator-name = VDD_COMMON1_1.8V;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   regulator-always-on;
+   op_mode = 1;
+   };
+
+   ldo4_reg: LDO4 {
+   regulator-name = VDD_IOPERI_1.8V;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   regulator-always-on;
+   op_mode = 1;
+   };
+
+   ldo5_reg: LDO5 {
+   regulator-name = VDD_EXT_1.8V;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   regulator-always-on;
+   op_mode = 1;
+   };
+
+   ldo6_reg: LDO6 {
+   regulator-name = VDD_MPLL_1.1V;
+   regulator-min-microvolt = 110;
+   regulator-max-microvolt = 110;
+   regulator-always-on;
+   op_mode = 1;
+   };
+
+   ldo7_reg: LDO7 {
+   regulator-name = VDD_XPLL_1.1V;
+   regulator-min-microvolt = 110;
+   regulator-max-microvolt = 110;
+   regulator-always-on;
+   op_mode = 1;
+   };
+
+   ldo8_reg: LDO8 {
+   regulator-name = VDD_COMMON2_1.0V;
+   regulator-min-microvolt = 100

[PATCH 3/5] ARM: dts: exynos5250-arndale: Add vmmc regulator support

2013-02-06 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

Added vmmc regulator node to Arndale DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 arch/arm/boot/dts/exynos5250-arndale.dts |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index b40a02f..d018fd2 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -280,6 +280,7 @@
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
+   vmmc-supply = mmc_reg;
 
slot@0 {
reg = 0;
@@ -304,6 +305,7 @@
samsung,dw-mshc-ciu-div = 3;
samsung,dw-mshc-sdr-timing = 2 3;
samsung,dw-mshc-ddr-timing = 1 2;
+   vmmc-supply = mmc_reg;
 
slot@0 {
reg = 0;
@@ -378,4 +380,13 @@
gpio-key,wakeup;
};
};
+
+   mmc_reg: voltage-regulator {
+   compatible = regulator-fixed;
+   regulator-name = VDD_33ON_2.8V;
+   regulator-min-microvolt = 280;
+   regulator-max-microvolt = 280;
+   gpio = gpx1 1 0 0 2;
+   enable-active-high;
+   };
 };
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH 4/5] ARM: dts: exynos5250-arndale: Add MFC codec support

2013-02-06 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

Added MFC codec node to Arndale DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 arch/arm/boot/dts/exynos5250-arndale.dts |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index d018fd2..6162a72 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -24,6 +24,11 @@
bootargs = console=ttySAC2,115200;
};
 
+   codec@1100 {
+   samsung,mfc-r = 0x4300 0x80;
+   samsung,mfc-l = 0x5100 0x80;
+   };
+
i2c@12C6 {
status = okay;
samsung,i2c-sda-delay = 100;
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH 5/5] ARM: dts: exynos5250-arndale: Add HDMI HPD and regulator node

2013-02-06 Thread Tushar Behera
From: Sachin Kamat sachin.ka...@linaro.org

Added HDMI hot plug and regulator nodes to Arndale DT file.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 arch/arm/boot/dts/exynos5250-arndale.dts |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
b/arch/arm/boot/dts/exynos5250-arndale.dts
index 6162a72..7b891a9 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -386,6 +386,13 @@
};
};
 
+   hdmi {
+   hpd-gpio = gpx3 7 0xf 1 3;
+   vdd_osc-supply = ldo10_reg;
+   vdd_pll-supply = ldo8_reg;
+   vdd-supply = ldo8_reg;
+   };
+
mmc_reg: voltage-regulator {
compatible = regulator-fixed;
regulator-name = VDD_33ON_2.8V;
@@ -394,4 +401,9 @@
gpio = gpx1 1 0 0 2;
enable-active-high;
};
+
+   reg_hdmi_en: fixedregulator@0 {
+   compatible = regulator-fixed;
+   regulator-name = hdmi-en;
+   };
 };
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 2/5] ARM: dts: exynos5250-arndale: Add PMIC node entry

2013-02-06 Thread Tushar Behera
On 02/07/2013 11:19 AM, Kumar, Anil wrote:
 On Thu, Feb 07, 2013 at 10:45:26, Tushar Behera wrote:
 From: Amit Daniel Kachhap amit.dan...@samsung.com

 Added S5M8767 PMIC DT nodes to Arndale board.

 Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 ---
  arch/arm/boot/dts/exynos5250-arndale.dts |  213 
 +-
  1 files changed, 212 insertions(+), 1 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
 b/arch/arm/boot/dts/exynos5250-arndale.dts
 index 9ce40df..b40a02f 100644
 --- a/arch/arm/boot/dts/exynos5250-arndale.dts
 +++ b/arch/arm/boot/dts/exynos5250-arndale.dts
 @@ -25,7 +25,218 @@
  };
  
  i2c@12C6 {
 -status = disabled;
 +status = okay;
 
 Is there any need to change status okay here as in dtsi file it is
 by default okay ?   
 

Right, there is no need for setting it as okay explicitly.

-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 1/5] ARM: dts: exynos5250-arndale: Add node entry for gpio-buttons

2013-02-06 Thread Tushar Behera
On 02/07/2013 11:47 AM, Kumar, Anil wrote:
 On Thu, Feb 07, 2013 at 10:45:25, Tushar Behera wrote:
 Added GPIO buttons DT node to Arndale board file.

 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 This series is based on for-next branch of Kukjin Kim's tree
 and added on top of the below patch:
 https://patchwork.kernel.org/patch/2042451/
 ---
  arch/arm/boot/dts/exynos5250-arndale.dts |   48 
 ++
  1 files changed, 48 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
 b/arch/arm/boot/dts/exynos5250-arndale.dts
 index 63572f9..9ce40df 100644
 --- a/arch/arm/boot/dts/exynos5250-arndale.dts
 +++ b/arch/arm/boot/dts/exynos5250-arndale.dts
 @@ -119,4 +119,52 @@
  spi_2: spi@12d4 {
  status = disabled;
  };
 +
 +gpio_keys {
 +compatible = gpio-keys;
 +#address-cells = 1;
 +#size-cells = 0;
 
 Just want to understand why these properties are here?  
 As these properties are for child dt node. But have not seen
 anyone is using here.
 

That is how gpio_keys node entries are defined in other .dts files.

-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH 1/5] ARM: dts: exynos5250-arndale: Add node entry for gpio-buttons

2013-02-06 Thread Tushar Behera
On 02/07/2013 12:06 PM, Manish Badarkhe wrote:
 Hi Tushar
 
 On Thu, Feb 7, 2013 at 11:56 AM, Tushar Behera tushar.beh...@linaro.org 
 wrote:
 On 02/07/2013 11:47 AM, Kumar, Anil wrote:
 On Thu, Feb 07, 2013 at 10:45:25, Tushar Behera wrote:
 Added GPIO buttons DT node to Arndale board file.

 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
 This series is based on for-next branch of Kukjin Kim's tree
 and added on top of the below patch:
 https://patchwork.kernel.org/patch/2042451/
 ---
  arch/arm/boot/dts/exynos5250-arndale.dts |   48 
 ++
  1 files changed, 48 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts 
 b/arch/arm/boot/dts/exynos5250-arndale.dts
 index 63572f9..9ce40df 100644
 --- a/arch/arm/boot/dts/exynos5250-arndale.dts
 +++ b/arch/arm/boot/dts/exynos5250-arndale.dts
 @@ -119,4 +119,52 @@
  spi_2: spi@12d4 {
  status = disabled;
  };
 +
 +gpio_keys {
 +compatible = gpio-keys;
 +#address-cells = 1;
 +#size-cells = 0;

 Just want to understand why these properties are here?
 As these properties are for child dt node. But have not seen
 anyone is using here.


 That is how gpio_keys node entries are defined in other .dts files.
 
 I have gone through example for address-cells and size-cells in following 
 link:
 http://devicetree.org/mediawiki/index.php?title=Device_Tree_Usagestable=1#CPU_addressing
 
 which indicates that these fields are for child reg.
 I think, here in child node there is no reg. so there is no use
 of address-cells and size-cells propeties.
 

Please check Documentation/devicetree/bindings/gpio/gpio_keys.txt

And whether these properties are required or not, I will let device tree
experts to comment on that.

As such, currently all node entries for gpio_keys use these properties.

-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH] mmc: sdhci-s3c: Use NULL instead of 0 for pointers

2012-11-19 Thread Tushar Behera
The third argument for of_get_property() is a pointer, hence pass
NULL instead of 0.

Fixes following sparse warning.
drivers/mmc/host/sdhci-s3c.c:452:48: warning: Using plain integer as
NULL pointer
drivers/mmc/host/sdhci-s3c.c:457:52: warning: Using plain integer as
NULL pointer

Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 drivers/mmc/host/sdhci-s3c.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index a54dd5d..80b10f2 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -449,12 +449,12 @@ static int __devinit sdhci_s3c_parse_dt(struct device 
*dev,
return -ENOMEM;
 
/* get the card detection method */
-   if (of_get_property(node, broken-cd, 0)) {
+   if (of_get_property(node, broken-cd, NULL)) {
pdata-cd_type = S3C_SDHCI_CD_NONE;
goto setup_bus;
}
 
-   if (of_get_property(node, non-removable, 0)) {
+   if (of_get_property(node, non-removable, NULL)) {
pdata-cd_type = S3C_SDHCI_CD_PERMANENT;
goto setup_bus;
}
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH 1/2] powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers

2012-11-19 Thread Tushar Behera
The third argument for of_get_property() is a pointer, hence pass
NULL instead of 0.

Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 arch/powerpc/platforms/85xx/p1022_ds.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c 
b/arch/powerpc/platforms/85xx/p1022_ds.c
index 8fb1257..7328b8d 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -249,7 +249,7 @@ static void p1022ds_set_monitor_port(enum 
fsl_diu_monitor_port port)
goto exit;
}
 
-   iprop = of_get_property(law_node, fsl,num-laws, 0);
+   iprop = of_get_property(law_node, fsl,num-laws, NULL);
if (!iprop) {
pr_err(p1022ds: LAW node is missing fsl,num-laws property\n);
goto exit;
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH 2/2] powerpc/pseries: pci: Use NULL instead of 0 for pointers

2012-11-19 Thread Tushar Behera
The third argument for of_get_property() is a pointer, hence pass
NULL instead of 0.

Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
This code is in a '#if 0' section, but I went ahead with the patch as
this is the only location in kernel where of_get_property is passed 0
as the third argument. If this function is not going to be used again,
then we may consider removing the code altogether.

 arch/powerpc/platforms/pseries/pci.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/pci.c 
b/arch/powerpc/platforms/pseries/pci.c
index 56b864d..0b580f4 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -40,7 +40,8 @@ void pcibios_name_device(struct pci_dev *dev)
 */
dn = pci_device_to_OF_node(dev);
if (dn) {
-   const char *loc_code = of_get_property(dn, ibm,loc-code, 0);
+   const char *loc_code = of_get_property(dn, ibm,loc-code,
+   NULL);
if (loc_code) {
int loc_len = strlen(loc_code);
if (loc_len  sizeof(dev-dev.name)) {
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


[PATCH] usb: gadget: s3c-hsotg: Add device tree support

2012-09-14 Thread Tushar Behera
This patch adds device tree support for s3c-hsotg driver
used for Samsung platforms.

Cc: Felipe Balbi ba...@ti.com
Signed-off-by: Tushar Behera tushar.beh...@linaro.org
---
 .../devicetree/bindings/usb/s3c-hsotg.txt  |   16 
 drivers/usb/gadget/s3c-hsotg.c |   20 
 2 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/s3c-hsotg.txt

diff --git a/Documentation/devicetree/bindings/usb/s3c-hsotg.txt 
b/Documentation/devicetree/bindings/usb/s3c-hsotg.txt
new file mode 100644
index 000..30b26c0
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/s3c-hsotg.txt
@@ -0,0 +1,16 @@
+Samsung HSOTG controller s3c-hsotg
+
+Required properties:
+  - compatible : should be samsung,exynos-hsotg.
+  - reg : should contain at least address and length of the standard HSOTG
+register set for the device.
+  - interrupts : one HSOTG interrupt should be described here.
+
+Example (Samsung Origen):
+
+   usb@1248 {
+   compatible = samsung,exynos-hsotg;
+   reg = 0x1248 0x2;
+   interrupts = 0 71 0;
+   };
+
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index b13e0bb..d7f557f 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -28,6 +28,7 @@
 #include linux/io.h
 #include linux/slab.h
 #include linux/clk.h
+#include linux/of.h
 #include linux/regulator/consumer.h
 
 #include linux/usb/ch9.h
@@ -3485,6 +3486,8 @@ static void s3c_hsotg_release(struct device *dev)
kfree(hsotg);
 }
 
+static u64 s3c_hsotg_dma_mask = DMA_BIT_MASK(32);
+
 /**
  * s3c_hsotg_probe - probe function for hsotg driver
  * @pdev: The platform information for the driver
@@ -3507,6 +3510,14 @@ static int __devinit s3c_hsotg_probe(struct 
platform_device *pdev)
return -EINVAL;
}
 
+   /*
+* Right now device-tree probed devices don't get dma_mask set.
+*/
+   if (!pdev-dev.dma_mask)
+   pdev-dev.dma_mask = s3c_hsotg_dma_mask;
+   if (!pdev-dev.coherent_dma_mask)
+   pdev-dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
hsotg = devm_kzalloc(pdev-dev, sizeof(struct s3c_hsotg), GFP_KERNEL);
if (!hsotg) {
dev_err(dev, cannot get memory\n);
@@ -3701,10 +3712,19 @@ static int __devexit s3c_hsotg_remove(struct 
platform_device *pdev)
 #define s3c_hsotg_resume NULL
 #endif
 
+#ifdef CONFIG_OF
+static const struct of_device_id exynos_hsotg_match[] = {
+   { .compatible = samsung,exynos-hsotg },
+   {},
+};
+MODULE_DEVICE_TABLE(of, exynos_hsotg_match);
+#endif
+
 static struct platform_driver s3c_hsotg_driver = {
.driver = {
.name   = s3c-hsotg,
.owner  = THIS_MODULE,
+   .of_match_table = of_match_ptr(exynos_hsotg_match),
},
.probe  = s3c_hsotg_probe,
.remove = __devexit_p(s3c_hsotg_remove),
-- 
1.7.4.1

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [PATCH] mmc: sdhci-s3c: Add device tree support

2012-08-17 Thread Tushar Behera
)
 + goto err_pdata;
 + } else {
 + memcpy(pdata, pdev-dev.platform_data, sizeof(*pdata));
 + sc-ext_cd_gpio = -1; /* invalid gpio number */
   }
 - memcpy(pdata, pdev-dev.platform_data, sizeof(*pdata));
  
   drv_data = sdhci_s3c_get_driver_data(pdev);
 - sc = sdhci_priv(host);
  
   sc-host = host;
   sc-pdev = pdev;
   sc-pdata = pdata;
 - sc-ext_cd_gpio = -1; /* invalid gpio number */
  
   platform_set_drvdata(pdev, host);
  
 @@ -631,6 +743,12 @@ static int __devinit sdhci_s3c_probe(struct 
 platform_device *pdev)
   clk_put(sc-clk_io);
  
   err_io_clk:
 + for (ptr = 0; ptr  NUM_GPIOS(sc-pdata-max_width); ptr++)
 + gpio_free(sc-gpios[ptr]);
 + if (pdata-cd_type == S3C_SDHCI_CD_INTERNAL)
 + gpio_free(sc-ext_cd_gpio);
 +
 + err_pdata:
   sdhci_free_host(host);
  
   return ret;
 @@ -638,9 +756,9 @@ static int __devinit sdhci_s3c_probe(struct 
 platform_device *pdev)
  
  static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
  {
 - struct s3c_sdhci_platdata *pdata = pdev-dev.platform_data;
   struct sdhci_host *host =  platform_get_drvdata(pdev);
   struct sdhci_s3c *sc = sdhci_priv(host);
 + struct s3c_sdhci_platdata *pdata = sc-pdata;
   int ptr;
  
   if (pdata-cd_type == S3C_SDHCI_CD_EXTERNAL  pdata-ext_cd_cleanup)
 @@ -665,6 +783,11 @@ static int __devexit sdhci_s3c_remove(struct 
 platform_device *pdev)
   clk_disable(sc-clk_io);
   clk_put(sc-clk_io);
  
 + if (pdev-dev.of_node) {
 + for (ptr = 0; ptr  NUM_GPIOS(sc-pdata-max_width); ptr++)
 + gpio_free(sc-gpios[ptr]);
 + }
 +
   sdhci_free_host(host);
   platform_set_drvdata(pdev, NULL);
  
 @@ -737,6 +860,16 @@ static struct platform_device_id sdhci_s3c_driver_ids[] 
 = {
  };
  MODULE_DEVICE_TABLE(platform, sdhci_s3c_driver_ids);
  
 +#ifdef CONFIG_OF
 +static const struct of_device_id sdhci_s3c_dt_match[] = {
 + { .compatible = samsung,s3c6410-sdhci, },
 + { .compatible = samsung,exynos4210-sdhci,
 + .data = exynos4_sdhci_drv_data },
 + {},
 +};
 +MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match);
 +#endif
 +
  static struct platform_driver sdhci_s3c_driver = {
   .probe  = sdhci_s3c_probe,
   .remove = __devexit_p(sdhci_s3c_remove),
 @@ -744,6 +877,7 @@ static struct platform_driver sdhci_s3c_driver = {
   .driver = {
   .owner  = THIS_MODULE,
   .name   = s3c-sdhci,
 + .of_match_table = of_match_ptr(sdhci_s3c_dt_match),
   .pm = SDHCI_S3C_PMOPS,
   },
  };
 


-- 
Tushar Behera
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss