[RESEND PATCH v2] ARM: dts: Add USBPHY nodes to Exynos4x12

2013-08-12 Thread Dongjin Kim
This patch adds device nodes for USBPHY to Exynos4x12.

Signed-off-by: Dongjin Kim tobet...@gmail.com
Cc: Tomasz Figa t.f...@samsung.com
Cc: Kyungmin Park kyungmin.p...@samsung.com
---
* Changes from v1
  o. 'status = disabled' is removed to probe as default

 arch/arm/boot/dts/exynos4x12.dtsi |   17 +
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4x12.dtsi 
b/arch/arm/boot/dts/exynos4x12.dtsi
index 01da194..3ee6102 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -73,4 +73,21 @@
clock-names = sclk_fimg2d, fimg2d;
status = disabled;
};
+
+   usbphy@125B0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = samsung,exynos4x12-usb2phy;
+   reg = 0x125B 0x100;
+   ranges;
+
+   clocks = clock 2, clock 305;
+   clock-names = xusbxti, otg;
+
+   usbphy-sys {
+   /* USB device and host PHY_CONTROL registers */
+   reg = 0x10020704 0xc,
+ 0x1001021c 0x4;
+   };
+   };
 };
-- 
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 RESEND] ARM: dts: Add USBPHY nodes to Exynos4x12

2013-08-06 Thread Dongjin Kim
Aha, yes...my misunderstanding.
This node is not only for OTG or HSIC, could miss USB HOST transceiver
if certain board file does not set okay.

Thanks,
Dongjin.

On Tue, Aug 6, 2013 at 3:09 PM, Sachin Kamat sachin.ka...@linaro.org wrote:
 Hi Dongjin,

 On 5 August 2013 23:48, Dongjin Kim tobet...@gmail.com wrote:
 This patch adds device nodes for USBPHY to Exynos4x12.

 CC: Sachin Kamat sachin.ka...@linaro.org
 Signed-off-by: Dongjin Kim tobet...@gmail.com
 ---
  arch/arm/boot/dts/exynos4x12.dtsi |   18 ++
  1 file changed, 18 insertions(+)

 diff --git a/arch/arm/boot/dts/exynos4x12.dtsi 
 b/arch/arm/boot/dts/exynos4x12.dtsi
 index 01da194..9c3335b 100644
 --- a/arch/arm/boot/dts/exynos4x12.dtsi
 +++ b/arch/arm/boot/dts/exynos4x12.dtsi
 @@ -73,4 +73,22 @@
 clock-names = sclk_fimg2d, fimg2d;
 status = disabled;
 };
 +
 +   usbphy@125B0 {
 +   #address-cells = 1;
 +   #size-cells = 1;
 +   compatible = samsung,exynos4x12-usb2phy;
 +   reg = 0x125B 0x100;
 +   ranges;
 +
 +   clocks = clock 2, clock 305;
 +   clock-names = xusbxti, otg;
 +   status = disabled;

 I don't think this node has any other board specific dependencies. In
 that case you don't need to disable this.

 +
 +   usbphy-sys {
 +   /* USB device and host PHY_CONTROL registers */
 +   reg = 0x10020704 0xc,
 + 0x1001021c 0x4;
 +   };
 +   };
  };
 --
 1.7.9.5




 --
 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] ARM: dts: Add USBPHY nodes to Exynos4x12

2013-08-05 Thread Dongjin Kim
This patch adds device nodes for USBPHY to Exynos4x12.

CC: Sachin Kamat sachin.ka...@linaro.org
Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4x12.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4x12.dtsi 
b/arch/arm/boot/dts/exynos4x12.dtsi
index 01da194..9c3335b 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -73,4 +73,22 @@
clock-names = sclk_fimg2d, fimg2d;
status = disabled;
};
+
+   usbphy@125B0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = samsung,exynos4x12-usb2phy;
+   reg = 0x125B 0x100;
+   ranges;
+
+   clocks = clock 2, clock 305;
+   clock-names = xusbxti, otg;
+   status = disabled;
+
+   usbphy-sys {
+   /* USB device and host PHY_CONTROL registers */
+   reg = 0x10020704 0xc,
+ 0x1001021c 0x4;
+   };
+   };
 };
-- 
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 RESEND] ARM: dts: Add USB host node for Exynos4

2013-08-05 Thread Dongjin Kim
This patch adds EHCI and OHCI host device nodes for Exynos4.

CC: Jingoo Han jg1@samsung.com
Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 3f94fe8..cbe5219 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -155,6 +155,24 @@
status = disabled;
};
 
+   ehci@1258 {
+   compatible = samsung,exynos4210-ehci;
+   reg = 0x1258 0x100;
+   interrupts = 0 70 0;
+   clocks = clock 304;
+   clock-names = usbhost;
+   status = disabled;
+   };
+
+   ohci@1259 {
+   compatible = samsung,exynos4210-ohci;
+   reg = 0x1259 0x100;
+   interrupts = 0 70 0;
+   clocks = clock 304;
+   clock-names = usbhost;
+   status = disabled;
+   };
+
mfc: codec@1340 {
compatible = samsung,mfc-v5;
reg = 0x1340 0x1;
-- 
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] ARM: dts: Add USBPHY nodes to Exynos4x12

2013-07-24 Thread Dongjin Kim
Thanks Sachin,

On Wed, Jul 24, 2013 at 2:12 PM, Sachin Kamat sachin.ka...@linaro.org wrote:
 Hi Dongjin,

 On 23 July 2013 23:01, Dongjin Kim tobet...@gmail.com wrote:
 This patch adds device nodes for USBPHY to Exynos4x12.

 Signed-off-by: Dongjin Kim tobet...@gmail.com
 ---
  arch/arm/boot/dts/exynos4x12.dtsi |   18 ++
  1 file changed, 18 insertions(+)

 diff --git a/arch/arm/boot/dts/exynos4x12.dtsi 
 b/arch/arm/boot/dts/exynos4x12.dtsi
 index 01da194..9c3335b 100644
 --- a/arch/arm/boot/dts/exynos4x12.dtsi
 +++ b/arch/arm/boot/dts/exynos4x12.dtsi
 @@ -73,4 +73,22 @@
 clock-names = sclk_fimg2d, fimg2d;
 status = disabled;
 };
 +
 +   usbphy@125B0 {

 Extra 0 above.

This is my bad, I will fix.

 +   #address-cells = 1;
 +   #size-cells = 1;
 +   compatible = samsung,exynos4x12-usb2phy;
 +   reg = 0x125B 0x100;
 +   ranges;
 +
 +   clocks = clock 2, clock 305;
 +   clock-names = xusbxti, otg;
 +   status = disabled;
 +
 +   usbphy-sys {
 +   /* USB device and host PHY_CONTROL registers */
 +   reg = 0x10020704 0xc,
 + 0x1001021c 0x4;
 +   };
 +   };
  };

 Please add this node after tmu node (satisfies alphabetical order as
 well as increasing address value)
No tmu node in exynos4x12.dtsi in mainline v3.11-rc2 yet, even in
Kukjin's branch.



 --
 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] ARM: dts: Add USB host node for Exynos4

2013-07-24 Thread Dongjin Kim
+Jingoo Han

Sorry, its my bad. Typo problem.

I found another patch same with mine,
https://patchwork.kernel.org/patch/2628451, submitted by Jingoo Han
and tested on Exynos4210. Mine is tested on Exynos4412. Both SoC have
same USB host address space, so I think USB host device nodes can be
placed in exynos4.dtsi.

Regards,
Dongjin.

On Wed, Jul 24, 2013 at 12:38 PM, Sachin Kamat sachin.ka...@linaro.org wrote:
 On 23 July 2013 23:02, Dongjin Kim tobet...@gmail.com wrote:
 This patch adds EHCI and OHCI host device nodes for Exynos4.

 Signed-off-by: Dongjin Kim tobet...@gmail.com
 ---
  arch/arm/boot/dts/exynos4.dtsi |   20 
  1 file changed, 20 insertions(+)

 diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
 index 3f94fe8..1cdbf89 100644
 --- a/arch/arm/boot/dts/exynos4.dtsi
 +++ b/arch/arm/boot/dts/exynos4.dtsi
 @@ -155,6 +155,26 @@
 status = disabled;
 };

 +   ehci@1258 {
 +   compatible = samsung,exynos4210-ehci;
 +   reg = 0x1258 0x100;
 +   interrupts = 0 70 0;
 +   status = disabled;
 +
 +   clocks = clock 304;
 +   clock-names = usbhost;
 +   };
 +
 +   ohci@1259 {
 +   compatible = samsung,exynos4210-ohci;
 +   reg = 0x1258 0x100;

 Register value and node name do not match. Typo?


 +   interrupts = 0 70 0;
 +   status = disabled;
 +
 +   clocks = clock 304;
 +   clock-names = usbhost;
 +   };
 +
 mfc: codec@1340 {
 compatible = samsung,mfc-v5;
 reg = 0x1340 0x1;
 --
 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



 --
 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 v2] ARM: dts: Add USB host node for Exynos4

2013-07-24 Thread Dongjin Kim
This patch adds EHCI and OHCI host device nodes for Exynos4.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 3f94fe8..cbe5219 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -155,6 +155,24 @@
status = disabled;
};
 
+   ehci@1258 {
+   compatible = samsung,exynos4210-ehci;
+   reg = 0x1258 0x100;
+   interrupts = 0 70 0;
+   clocks = clock 304;
+   clock-names = usbhost;
+   status = disabled;
+   };
+
+   ohci@1259 {
+   compatible = samsung,exynos4210-ohci;
+   reg = 0x1259 0x100;
+   interrupts = 0 70 0;
+   clocks = clock 304;
+   clock-names = usbhost;
+   status = disabled;
+   };
+
mfc: codec@1340 {
compatible = samsung,mfc-v5;
reg = 0x1340 0x1;
-- 
1.7.9.5

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


Re: [PATCH 1/2] ARM: dts: Add USB Host nodes to Exynos4210

2013-07-24 Thread Dongjin Kim
Hi Jingoo,

I had submitted another patch almost similar contents, but my patch
contains both EHCI and OHCI USB host devices node in exynos4.dtsi
since I had tested on Exynos4412 and their register map are same with
Exynos4210.

[1] https://patchwork.kernel.org/patch/2832779

On Wed, May 29, 2013 at 6:47 PM, Jingoo Han jg1@samsung.com wrote:
 Add device nodes for USB Host EHCI and OHCI controllers to Exynos4210.

 Signed-off-by: Jingoo Han jg1@samsung.com
 ---
 Tested on Exynos4210.

  arch/arm/boot/dts/exynos4210.dtsi |   18 ++
  1 file changed, 18 insertions(+)

 diff --git a/arch/arm/boot/dts/exynos4210.dtsi 
 b/arch/arm/boot/dts/exynos4210.dtsi
 index 366795a..3c173c7 100644
 --- a/arch/arm/boot/dts/exynos4210.dtsi
 +++ b/arch/arm/boot/dts/exynos4210.dtsi
 @@ -117,6 +117,24 @@
 status = disabled;
 };

 +   usb@1258 {
 +   compatible = samsung,exynos4210-ehci;
 +   reg = 0x1258 0x100;
 +   interrupts = 0 70 0;
 +
 +   clocks = clock 304;
 +   clock-names = usbhost;
 +   };
 +
 +   usb@1259 {
 +   compatible = samsung,exynos4210-ohci;
 +   reg = 0x1259 0x100;
 +   interrupts = 0 70 0;
 +
 +   clocks = clock 304;
 +   clock-names = usbhost;
 +   };
 +
 g2d@1280 {
 compatible = samsung,s5pv210-g2d;
 reg = 0x1280 0x1000;
 --
 1.7.10.4



 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
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] ARM: dts: Add USBPHY nodes to Exynos4x12

2013-07-23 Thread Dongjin Kim
This patch adds device nodes for USBPHY to Exynos4x12.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4x12.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4x12.dtsi 
b/arch/arm/boot/dts/exynos4x12.dtsi
index 01da194..9c3335b 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -73,4 +73,22 @@
clock-names = sclk_fimg2d, fimg2d;
status = disabled;
};
+
+   usbphy@125B0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = samsung,exynos4x12-usb2phy;
+   reg = 0x125B 0x100;
+   ranges;
+
+   clocks = clock 2, clock 305;
+   clock-names = xusbxti, otg;
+   status = disabled;
+
+   usbphy-sys {
+   /* USB device and host PHY_CONTROL registers */
+   reg = 0x10020704 0xc,
+ 0x1001021c 0x4;
+   };
+   };
 };
-- 
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] ARM: dts: Add USB host node for Exynos4

2013-07-23 Thread Dongjin Kim
This patch adds EHCI and OHCI host device nodes for Exynos4.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4.dtsi |   20 
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 3f94fe8..1cdbf89 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -155,6 +155,26 @@
status = disabled;
};
 
+   ehci@1258 {
+   compatible = samsung,exynos4210-ehci;
+   reg = 0x1258 0x100;
+   interrupts = 0 70 0;
+   status = disabled;
+
+   clocks = clock 304;
+   clock-names = usbhost;
+   };
+
+   ohci@1259 {
+   compatible = samsung,exynos4210-ohci;
+   reg = 0x1258 0x100;
+   interrupts = 0 70 0;
+   status = disabled;
+
+   clocks = clock 304;
+   clock-names = usbhost;
+   };
+
mfc: codec@1340 {
compatible = samsung,mfc-v5;
reg = 0x1340 0x1;
-- 
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] ARM: dts: add mshc controller node for Exynos4x12 SoCs

2013-01-23 Thread Dongjin Kim
Tested-by: Dongjin Kim tobet...@gmail.com

This patch had been tested on v3.8-rc4 with ODROID-X hardware.

On Wed, Jan 23, 2013 at 2:21 PM, Dongjin Kim tobet...@gmail.com wrote:
 Hello Thomas,

 Thank you. I will submit the change soon.

 Thanks again.
 Dongjin.

 On Wed, Jan 23, 2013 at 8:25 AM, Thomas Abraham
 thomas.abra...@linaro.org wrote:
 Hi Dongjin,

 On 22 January 2013 10:15, Dongjin Kim tobet...@gmail.com wrote:
 Hi Thomas,

 Good to see your patch, actually I had sent similar one before but no
 one care my patch. And now I feel it seems to be wrong.

 But I have a couple of question if I use your patch to enable MSHC
 controller work properly on Exynos4412.

 What's the exact form of .compatible on board file?
 With your patch, MSHC is not probed at all in my board. The
 .compatible has to be 'samsung,exynos5250-dw-mshc' and it works.

 I also tried '.compatible = samsung,exynos5250-dw-mshc,
 samsung,exynos4412-dw-mshc', it probes the driver but in the
 function 'dw_mci_exynos_priv_init', priv-ctrl_type always becomes
 DW_MCI_TYPE_EXYNOS5250. Because there is a loop and returns each
 compatible strings in alphanumeric order whatever it is ordered in the
 board file.

 I also tried below patch to add a compatible for Exynos4412 to
 'dw_mci_exynos_match' with its specific data, and it works. What's the
 right direction? If I am missing something or wrong, please correct
 me. :)

 Yes, your below patch is the correct thing to do. The dt patches for
 dwmmc controller driver were only tested on Exynos5250 based board. So
 I had not added the compatible string for Exynos4412 in
 'of_match_table' of the driver. Please submit the below change as a
 patch (minor comment below).


 Many thanks,
 Dongjin.

 @@ -184,6 +186,25 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host,
 return 0;
  }

 +/* Exynos4412 controller specific capabilities */
 +static unsigned long exynos4412_dwmmc_caps[4] = {
 +   MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
 +   MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23,
 +   MMC_CAP_CMD23,
 +   MMC_CAP_CMD23,
 +   MMC_CAP_CMD23,
 +};

 Since this is same as the 'exynos5250_dwmmc_caps', it can be reused
 for 4412 as well, avoiding duplicate copy 'exynos4412_dwmmc_caps'.

 +
 +static const struct dw_mci_drv_data exynos4412_drv_data = {
 +   .caps   = exynos4412_dwmmc_caps,
 +   .init   = dw_mci_exynos_priv_init,
 +   .setup_clock= dw_mci_exynos_setup_clock,
 +   .prepare_command= dw_mci_exynos_prepare_command,
 +   .set_ios= dw_mci_exynos_set_ios,
 +   .parse_dt   = dw_mci_exynos_parse_dt,
 +   .setup_bus  = dw_mci_exynos_setup_bus,
 +};

 If the above change is done, 'exynos4412_drv_data ' also could be avoided.

 +
  /* Exynos5250 controller specific capabilities */
  static unsigned long exynos5250_dwmmc_caps[4] = {
 MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
 @@ -204,6 +225,8 @@ static const struct dw_mci_drv_data exynos5250_drv_data 
 = {
  };

  static const struct of_device_id dw_mci_exynos_match[] = {
 +   { .compatible = samsung,exynos4412-dw-mshc,
 +   .data = exynos4412_drv_data, },
 { .compatible = samsung,exynos5250-dw-mshc,
 .data = exynos5250_drv_data, },
 {},

 Thanks,
 Thomas.



 On Mon, Jan 21, 2013 at 7:39 PM, Thomas Abraham
 thomas.abra...@linaro.org wrote:
 Commit cea0f256 (ARM: dts: Add board dts file for ODROID-X) includes a 
 node
 to describe the board level properties for mshc controller. But the mshc
 controller node was not added in the Exynos4x12 dtsi file which resulted
 in the following warning when compiling the dtb files.

 Warning (reg_format): reg property in /mshc@1255/slot@0 has invalid 
 length (4 bytes) (#address-cells == 2, #size-cells == 1)
 Warning (avoid_default_addr_size): Relying on default #address-cells value 
 for /mshc@1255/slot@0
 Warning (avoid_default_addr_size): Relying on default #size-cells value 
 for /mshc@1255/slot@0

 Fix this by adding the mshc controller node for Exynos4x12 SoCs.

 Cc: Dongjin Kim tobet...@gmail.com
 Cc: Kukjin Kim kgene@samsung.com
 Signed-off-by: Thomas Abraham thomas.abra...@linaro.org
 ---
  arch/arm/boot/dts/exynos4412.dtsi |8 
  1 files changed, 8 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos4412.dtsi 
 b/arch/arm/boot/dts/exynos4412.dtsi
 index 78ed377..96f5b66 100644
 --- a/arch/arm/boot/dts/exynos4412.dtsi
 +++ b/arch/arm/boot/dts/exynos4412.dtsi
 @@ -32,4 +32,12 @@
 interrupts = 0 57 0, 0 0 0, 0 0 0, 0 0 0,
  1 12 0, 1 12 0, 1 12 0, 1 12 0;
 };
 +
 +   mshc@1255 {
 +   compatible = samsung,exynos4412-dw-mshc;
 +   reg = 0x1255 0x1000;
 +   interrupts = 0 77 0;
 +   #address-cells = 1;
 +   #size-cells = 0

Re: [PATCH] ARM: dts: add mshc controller node for Exynos4x12 SoCs

2013-01-22 Thread Dongjin Kim
Hi Thomas,

Good to see your patch, actually I had sent similar one before but no
one care my patch. And now I feel it seems to be wrong.

But I have a couple of question if I use your patch to enable MSHC
controller work properly on Exynos4412.

What's the exact form of .compatible on board file?
With your patch, MSHC is not probed at all in my board. The
.compatible has to be 'samsung,exynos5250-dw-mshc' and it works.

I also tried '.compatible = samsung,exynos5250-dw-mshc,
samsung,exynos4412-dw-mshc', it probes the driver but in the
function 'dw_mci_exynos_priv_init', priv-ctrl_type always becomes
DW_MCI_TYPE_EXYNOS5250. Because there is a loop and returns each
compatible strings in alphanumeric order whatever it is ordered in the
board file.

I also tried below patch to add a compatible for Exynos4412 to
'dw_mci_exynos_match' with its specific data, and it works. What's the
right direction? If I am missing something or wrong, please correct
me. :)

Many thanks,
Dongjin.

@@ -184,6 +186,25 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host,
return 0;
 }

+/* Exynos4412 controller specific capabilities */
+static unsigned long exynos4412_dwmmc_caps[4] = {
+   MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
+   MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23,
+   MMC_CAP_CMD23,
+   MMC_CAP_CMD23,
+   MMC_CAP_CMD23,
+};
+
+static const struct dw_mci_drv_data exynos4412_drv_data = {
+   .caps   = exynos4412_dwmmc_caps,
+   .init   = dw_mci_exynos_priv_init,
+   .setup_clock= dw_mci_exynos_setup_clock,
+   .prepare_command= dw_mci_exynos_prepare_command,
+   .set_ios= dw_mci_exynos_set_ios,
+   .parse_dt   = dw_mci_exynos_parse_dt,
+   .setup_bus  = dw_mci_exynos_setup_bus,
+};
+
 /* Exynos5250 controller specific capabilities */
 static unsigned long exynos5250_dwmmc_caps[4] = {
MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
@@ -204,6 +225,8 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
 };

 static const struct of_device_id dw_mci_exynos_match[] = {
+   { .compatible = samsung,exynos4412-dw-mshc,
+   .data = exynos4412_drv_data, },
{ .compatible = samsung,exynos5250-dw-mshc,
.data = exynos5250_drv_data, },
{},


On Mon, Jan 21, 2013 at 7:39 PM, Thomas Abraham
thomas.abra...@linaro.org wrote:
 Commit cea0f256 (ARM: dts: Add board dts file for ODROID-X) includes a node
 to describe the board level properties for mshc controller. But the mshc
 controller node was not added in the Exynos4x12 dtsi file which resulted
 in the following warning when compiling the dtb files.

 Warning (reg_format): reg property in /mshc@1255/slot@0 has invalid 
 length (4 bytes) (#address-cells == 2, #size-cells == 1)
 Warning (avoid_default_addr_size): Relying on default #address-cells value 
 for /mshc@1255/slot@0
 Warning (avoid_default_addr_size): Relying on default #size-cells value for 
 /mshc@1255/slot@0

 Fix this by adding the mshc controller node for Exynos4x12 SoCs.

 Cc: Dongjin Kim tobet...@gmail.com
 Cc: Kukjin Kim kgene@samsung.com
 Signed-off-by: Thomas Abraham thomas.abra...@linaro.org
 ---
  arch/arm/boot/dts/exynos4412.dtsi |8 
  1 files changed, 8 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos4412.dtsi 
 b/arch/arm/boot/dts/exynos4412.dtsi
 index 78ed377..96f5b66 100644
 --- a/arch/arm/boot/dts/exynos4412.dtsi
 +++ b/arch/arm/boot/dts/exynos4412.dtsi
 @@ -32,4 +32,12 @@
 interrupts = 0 57 0, 0 0 0, 0 0 0, 0 0 0,
  1 12 0, 1 12 0, 1 12 0, 1 12 0;
 };
 +
 +   mshc@1255 {
 +   compatible = samsung,exynos4412-dw-mshc;
 +   reg = 0x1255 0x1000;
 +   interrupts = 0 77 0;
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   };
  };
 --
 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] ARM: dts: add mshc controller node for Exynos4x12 SoCs

2013-01-22 Thread Dongjin Kim
Hello Thomas,

Thank you. I will submit the change soon.

Thanks again.
Dongjin.

On Wed, Jan 23, 2013 at 8:25 AM, Thomas Abraham
thomas.abra...@linaro.org wrote:
 Hi Dongjin,

 On 22 January 2013 10:15, Dongjin Kim tobet...@gmail.com wrote:
 Hi Thomas,

 Good to see your patch, actually I had sent similar one before but no
 one care my patch. And now I feel it seems to be wrong.

 But I have a couple of question if I use your patch to enable MSHC
 controller work properly on Exynos4412.

 What's the exact form of .compatible on board file?
 With your patch, MSHC is not probed at all in my board. The
 .compatible has to be 'samsung,exynos5250-dw-mshc' and it works.

 I also tried '.compatible = samsung,exynos5250-dw-mshc,
 samsung,exynos4412-dw-mshc', it probes the driver but in the
 function 'dw_mci_exynos_priv_init', priv-ctrl_type always becomes
 DW_MCI_TYPE_EXYNOS5250. Because there is a loop and returns each
 compatible strings in alphanumeric order whatever it is ordered in the
 board file.

 I also tried below patch to add a compatible for Exynos4412 to
 'dw_mci_exynos_match' with its specific data, and it works. What's the
 right direction? If I am missing something or wrong, please correct
 me. :)

 Yes, your below patch is the correct thing to do. The dt patches for
 dwmmc controller driver were only tested on Exynos5250 based board. So
 I had not added the compatible string for Exynos4412 in
 'of_match_table' of the driver. Please submit the below change as a
 patch (minor comment below).


 Many thanks,
 Dongjin.

 @@ -184,6 +186,25 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host,
 return 0;
  }

 +/* Exynos4412 controller specific capabilities */
 +static unsigned long exynos4412_dwmmc_caps[4] = {
 +   MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
 +   MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23,
 +   MMC_CAP_CMD23,
 +   MMC_CAP_CMD23,
 +   MMC_CAP_CMD23,
 +};

 Since this is same as the 'exynos5250_dwmmc_caps', it can be reused
 for 4412 as well, avoiding duplicate copy 'exynos4412_dwmmc_caps'.

 +
 +static const struct dw_mci_drv_data exynos4412_drv_data = {
 +   .caps   = exynos4412_dwmmc_caps,
 +   .init   = dw_mci_exynos_priv_init,
 +   .setup_clock= dw_mci_exynos_setup_clock,
 +   .prepare_command= dw_mci_exynos_prepare_command,
 +   .set_ios= dw_mci_exynos_set_ios,
 +   .parse_dt   = dw_mci_exynos_parse_dt,
 +   .setup_bus  = dw_mci_exynos_setup_bus,
 +};

 If the above change is done, 'exynos4412_drv_data ' also could be avoided.

 +
  /* Exynos5250 controller specific capabilities */
  static unsigned long exynos5250_dwmmc_caps[4] = {
 MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
 @@ -204,6 +225,8 @@ static const struct dw_mci_drv_data exynos5250_drv_data 
 = {
  };

  static const struct of_device_id dw_mci_exynos_match[] = {
 +   { .compatible = samsung,exynos4412-dw-mshc,
 +   .data = exynos4412_drv_data, },
 { .compatible = samsung,exynos5250-dw-mshc,
 .data = exynos5250_drv_data, },
 {},

 Thanks,
 Thomas.



 On Mon, Jan 21, 2013 at 7:39 PM, Thomas Abraham
 thomas.abra...@linaro.org wrote:
 Commit cea0f256 (ARM: dts: Add board dts file for ODROID-X) includes a 
 node
 to describe the board level properties for mshc controller. But the mshc
 controller node was not added in the Exynos4x12 dtsi file which resulted
 in the following warning when compiling the dtb files.

 Warning (reg_format): reg property in /mshc@1255/slot@0 has invalid 
 length (4 bytes) (#address-cells == 2, #size-cells == 1)
 Warning (avoid_default_addr_size): Relying on default #address-cells value 
 for /mshc@1255/slot@0
 Warning (avoid_default_addr_size): Relying on default #size-cells value for 
 /mshc@1255/slot@0

 Fix this by adding the mshc controller node for Exynos4x12 SoCs.

 Cc: Dongjin Kim tobet...@gmail.com
 Cc: Kukjin Kim kgene@samsung.com
 Signed-off-by: Thomas Abraham thomas.abra...@linaro.org
 ---
  arch/arm/boot/dts/exynos4412.dtsi |8 
  1 files changed, 8 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos4412.dtsi 
 b/arch/arm/boot/dts/exynos4412.dtsi
 index 78ed377..96f5b66 100644
 --- a/arch/arm/boot/dts/exynos4412.dtsi
 +++ b/arch/arm/boot/dts/exynos4412.dtsi
 @@ -32,4 +32,12 @@
 interrupts = 0 57 0, 0 0 0, 0 0 0, 0 0 0,
  1 12 0, 1 12 0, 1 12 0, 1 12 0;
 };
 +
 +   mshc@1255 {
 +   compatible = samsung,exynos4412-dw-mshc;
 +   reg = 0x1255 0x1000;
 +   interrupts = 0 77 0;
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   };
  };
 --
 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

[PATCH RESEND] ARM: dts: Add EHCI device tree node for Exynos4

2012-12-30 Thread Dongjin Kim
This patch adds EHCI device node on device tree for Exynos4 and defines its
default platform data, s5p_usb_phy_init and s5p_usb_phy_exit, so that those
function can be called from the driver.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4.dtsi |7 +++
 arch/arm/mach-exynos/mach-exynos4-dt.c |9 +
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 92bca86..df1a9f0 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -140,6 +140,13 @@
status = disabled;
};
 
+   ehci@1258 {
+   compatible = samsung,exynos-ehci;
+   reg = 0x1258 0x100;
+   interrupts = 0 70 0;
+   status = disabled;
+   };
+
serial@1380 {
compatible = samsung,exynos4210-uart;
reg = 0x1380 0x100;
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c 
b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 92757ff..c8a23f0 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -13,6 +13,7 @@
 
 #include linux/of_platform.h
 #include linux/serial_core.h
+#include linux/platform_data/usb-ehci-s5p.h
 
 #include asm/mach/arch.h
 #include asm/hardware/gic.h
@@ -20,9 +21,15 @@
 
 #include plat/cpu.h
 #include plat/regs-serial.h
+#include plat/usb-phy.h
 
 #include common.h
 
+static struct s5p_ehci_platdata s5p_ehci_platdata = {
+   .phy_init = s5p_usb_phy_init,
+   .phy_exit = s5p_usb_phy_exit,
+};
+
 /*
  * The following lookup table is used to override device names when devices
  * are registered from device tree. This is temporarily added to enable
@@ -80,6 +87,8 @@ 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,exynos-ehci, EXYNOS4_PA_EHCI,
+   s5p-ehci, s5p_ehci_platdata),
{},
 };
 
-- 
1.7.10.4

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


Re: [PATCH 2/2] USB: ehci-s5p: Add to get interrupt from DT

2012-12-27 Thread Dongjin Kim
Hi Sergei,

Yes, you are right.
I made this patch to read its interrupt number from dtb directly. But
now platform_get_irq() returns correct irq since OF_DEV_AUXDATA(...)
is added as my first patch.

This patch is useless.

Thanks and best regards,
Dongjin.

On Thu, Dec 27, 2012 at 5:18 AM, Sergei Shtylyov sshtyl...@mvista.com wrote:

 Hello.

 On 12/26/2012 09:42 PM, Dongjin Kim wrote:

  This patch support to get interrupt resource from device tree as well as
  platform device if ehci node is defined in device tree and it's irq is
  described.

  Signed-off-by: Dongjin Kim tobet...@gmail.com
  ---
   drivers/usb/host/ehci-s5p.c |8 +++-
   1 file changed, 7 insertions(+), 1 deletion(-)

  diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
  index 319dcfa..0fc5e5e 100644
  --- a/drivers/usb/host/ehci-s5p.c
  +++ b/drivers/usb/host/ehci-s5p.c
  @@ -16,6 +16,7 @@
   #include linux/of.h
   #include linux/platform_device.h
   #include linux/of_gpio.h
  +#include linux/of_irq.h
   #include linux/platform_data/usb-ehci-s5p.h
   #include plat/usb-phy.h
 
  @@ -156,7 +157,12 @@ static int s5p_ehci_probe(struct platform_device
  *pdev)
goto fail_io;
}
 
  - irq = platform_get_irq(pdev, 0);
  + if (pdev-dev.of_node)
  + irq = irq_of_parse_and_map(pdev-dev.of_node, 0);

platform_get_irq() should still work for device tree based platform
 devices.
 I don't see the point on the patch?

  + else {
  + irq = platform_get_irq(pdev, 0);
  + }

Hm, why {} out of the blue? Both arms of *if* are single-stratement.

  +

No need for empty line here.

if (!irq) {
dev_err(pdev-dev, Failed to get IRQ\n);
err = -ENODEV;

 WBR, Sergei

--
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] EXYNOS4: Add device tree support for USB/EHCI

2012-12-26 Thread Dongjin Kim
This patch set adds device tree upport for USB/EHCI device.

Dongjin Kim (2):
  ARM: dts: Add EHCI device tree node for Exynos4
  USB: ehci-s5p: Add to get interrupt from DT

 arch/arm/boot/dts/exynos4.dtsi |7 +++
 arch/arm/mach-exynos/mach-exynos4-dt.c |9 +
 drivers/usb/host/ehci-s5p.c|8 +++-
 3 files changed, 23 insertions(+), 1 deletion(-)

-- 
1.7.10.4

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


[PATCH 1/2] ARM: dts: Add EHCI device tree node for Exynos4

2012-12-26 Thread Dongjin Kim
This patch adds EHCI device node on device tree for Exynos4 and defines its
default platform data, s5p_usb_phy_init and s5p_usb_phy_exit, so that those
function can be called from the driver.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4.dtsi |7 +++
 arch/arm/mach-exynos/mach-exynos4-dt.c |9 +
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 92bca86..df1a9f0 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -140,6 +140,13 @@
status = disabled;
};
 
+   ehci@1258 {
+   compatible = samsung,exynos-ehci;
+   reg = 0x1258 0x100;
+   interrupts = 0 70 0;
+   status = disabled;
+   };
+
serial@1380 {
compatible = samsung,exynos4210-uart;
reg = 0x1380 0x100;
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c 
b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 92757ff..c8a23f0 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -13,6 +13,7 @@
 
 #include linux/of_platform.h
 #include linux/serial_core.h
+#include linux/platform_data/usb-ehci-s5p.h
 
 #include asm/mach/arch.h
 #include asm/hardware/gic.h
@@ -20,9 +21,15 @@
 
 #include plat/cpu.h
 #include plat/regs-serial.h
+#include plat/usb-phy.h
 
 #include common.h
 
+static struct s5p_ehci_platdata s5p_ehci_platdata = {
+   .phy_init = s5p_usb_phy_init,
+   .phy_exit = s5p_usb_phy_exit,
+};
+
 /*
  * The following lookup table is used to override device names when devices
  * are registered from device tree. This is temporarily added to enable
@@ -80,6 +87,8 @@ 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,exynos-ehci, EXYNOS4_PA_EHCI,
+   s5p-ehci, s5p_ehci_platdata),
{},
 };
 
-- 
1.7.10.4

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


[PATCH 2/2] USB: ehci-s5p: Add to get interrupt from DT

2012-12-26 Thread Dongjin Kim
This patch support to get interrupt resource from device tree as well as
platform device if ehci node is defined in device tree and it's irq is
described.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 drivers/usb/host/ehci-s5p.c |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index 319dcfa..0fc5e5e 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -16,6 +16,7 @@
 #include linux/of.h
 #include linux/platform_device.h
 #include linux/of_gpio.h
+#include linux/of_irq.h
 #include linux/platform_data/usb-ehci-s5p.h
 #include plat/usb-phy.h
 
@@ -156,7 +157,12 @@ static int s5p_ehci_probe(struct platform_device *pdev)
goto fail_io;
}
 
-   irq = platform_get_irq(pdev, 0);
+   if (pdev-dev.of_node)
+   irq = irq_of_parse_and_map(pdev-dev.of_node, 0);
+   else {
+   irq = platform_get_irq(pdev, 0);
+   }
+
if (!irq) {
dev_err(pdev-dev, Failed to get IRQ\n);
err = -ENODEV;
-- 
1.7.10.4

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


[PATCH 0/4] ODROID-X: Adding dt-based ODROID-X support

2012-12-17 Thread Dongjin Kim
This patch set adds DT-based board file for Hardkernel's ODROID-X which is
based on Samsung's Exynos4412 SoC. In the current version had been tested
supporting SDCARD, eMMC and LED blinking.


Dongjin Kim (4):
  ODROID-X: dts: Add board dts file for ODROID-X
  ODROID-X: dts: Add fixed-regulator for peripherals.
  ODROID-X: dts: Add nodes for leds based on GPIO.
  ODROID-X: dts: Add mshc node for ODROID-X board

 arch/arm/boot/dts/Makefile   |1 +
 arch/arm/boot/dts/exynos4412-odroidx.dts |   97 ++
 2 files changed, 98 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-odroidx.dts

-- 
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 1/4] ODROID-X: dts: Add board dts file for ODROID-X

2012-12-17 Thread Dongjin Kim
Add initial dtb file for Hardkernel's ODROID-X board based on EXYNOS4412 SoC.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/Makefile   |1 +
 arch/arm/boot/dts/exynos4412-odroidx.dts |   52 ++
 2 files changed, 53 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4412-odroidx.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ca6fb8e..3355af9 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
exynos5250-smdk5250.dtb \
exynos5440-ssdk5440.dtb \
exynos4412-smdk4412.dtb \
+   exynos4412-odroidx.dtb \
exynos5250-smdk5250.dtb \
exynos5250-snow.dtb
 dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts 
b/arch/arm/boot/dts/exynos4412-odroidx.dts
new file mode 100644
index 000..786ddd7
--- /dev/null
+++ b/arch/arm/boot/dts/exynos4412-odroidx.dts
@@ -0,0 +1,52 @@
+/*
+ * Hardkernel's Exynos4412 based ODROID-X board device tree source
+ *
+ * Copyright (c) 2012-2013 Dongjin Kim tobet...@gmail.com
+ *
+ * Device tree source file for Hardkernel's ODROID-X board which is based on
+ * Samsung's Exynos4412 SoC.
+ *
+ * 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.
+*/
+
+/dts-v1/;
+/include/ exynos4412.dtsi
+
+/ {
+   model = Hardkernel ODROID-X board based on Exynos4412;
+   compatible = samsung,exynos4412;
+
+   memory {
+   reg = 0x4000 0x4000;
+   };
+
+   chosen {
+   bootargs =root=/dev/mmcblk0p3 rw console=ttySAC1,115200 
init=/sbin/init delay=2;
+   };
+
+   serial@1380 {
+   status = okay;
+   };
+
+   serial@1381 {
+   status = okay;
+   };
+
+   serial@1382 {
+   status = okay;
+   };
+
+   serial@1383 {
+   status = okay;
+   };
+
+   sdhci@1253 {
+   bus-width = 4;
+   samsung,cd-pinmux-gpio = gpk2 2 2 3 3;
+   pinctrl-0 = sd2_clk sd2_cmd sd2_bus4;
+   pinctrl-names = default;
+   status = okay;
+   };
+};
-- 
1.7.9.5

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


[PATCH 2/4] ODROID-X: dts: Add fixed-regulator for peripherals.

2012-12-17 Thread Dongjin Kim
This patch adds the node to support fixed voltage for peripherals like LED,
ethernet controller.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4412-odroidx.dts |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts 
b/arch/arm/boot/dts/exynos4412-odroidx.dts
index 786ddd7..2d45dcb 100644
--- a/arch/arm/boot/dts/exynos4412-odroidx.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidx.dts
@@ -49,4 +49,14 @@
pinctrl-names = default;
status = okay;
};
+
+   regulator_p3v3 {
+   compatible = regulator-fixed;
+   regulator-name = p3v3_en;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = gpa1 1 0;
+   enable-active-high;
+   regulator-boot-on;
+   };
 };
-- 
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 3/4] ODROID-X: dts: Add nodes for leds based on GPIO.

2012-12-17 Thread Dongjin Kim
This patch adds GPIO connected LEDS on ODROID-X board, and describe its
properties.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4412-odroidx.dts |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts 
b/arch/arm/boot/dts/exynos4412-odroidx.dts
index 2d45dcb..3943011 100644
--- a/arch/arm/boot/dts/exynos4412-odroidx.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidx.dts
@@ -59,4 +59,18 @@
enable-active-high;
regulator-boot-on;
};
+
+   leds {
+   compatible = gpio-leds;
+   led1 {
+   label = led1:heart;
+   gpios = gpc1 0 0;
+   linux,default-trigger = heartbeat;
+   };
+   led2 {
+   label = led2:mmc0;
+   gpios = gpc1 2 0;
+   linux,default-trigger = mmc0;
+   };
+   };
 };
-- 
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 4/4] ODROID-X: dts: Add mshc node for ODROID-X board

2012-12-17 Thread Dongjin Kim
Adding the device node to support eMMC storage on SDCARD4 ports, controlled by
Mobile Storage Host Controller.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/boot/dts/exynos4412-odroidx.dts |   21 +
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts 
b/arch/arm/boot/dts/exynos4412-odroidx.dts
index 3943011..fbd0b51 100644
--- a/arch/arm/boot/dts/exynos4412-odroidx.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidx.dts
@@ -73,4 +73,25 @@
linux,default-trigger = mmc0;
};
};
+
+   mshc@1255 {
+   num-slots = 1;
+   supports-highspeed;
+   broken-cd;
+   fifo-depth = 0x80;
+   card-detect-delay = 200;
+   samsung,dw-mshc-ciu-div = 3;
+   samsung,dw-mshc-sdr-timing = 2 3 3;
+   samsung,dw-mshc-ddr-timing = 1 2 3;
+
+   slot@0 {
+   reg = 0;
+   bus-width = 8;
+   gpios = gpk0 0 3, gpk0 1 3,
+   gpk0 3 3, gpk0 4 3,
+   gpk0 5 3, gpk0 6 3,
+   gpk1 3 4, gpk1 4 4,
+   gpk1 5 4, gpk1 6 4;
+   };
+   };
 };
-- 
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] ARM: EXYNOS: Fix MSHC clocks instance names

2012-12-14 Thread Dongjin Kim
Replace clock instance name of MSHC controller for BIC and CIU of Exynos4412.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/mach-exynos/clock-exynos4.c |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-exynos/clock-exynos4.c 
b/arch/arm/mach-exynos/clock-exynos4.c
index efead60..ae83011 100644
--- a/arch/arm/mach-exynos/clock-exynos4.c
+++ b/arch/arm/mach-exynos/clock-exynos4.c
@@ -529,8 +529,8 @@ static struct clk exynos4_init_clocks_off[] = {
.enable = exynos4_clk_ip_fsys_ctrl,
.ctrlbit= (1  8),
}, {
-   .name   = dwmmc,
-   .parent = exynos4_clk_aclk_133.clk,
+   .name   = biu,
+   .parent = exynos4_clk_aclk_200.clk,
.enable = exynos4_clk_ip_fsys_ctrl,
.ctrlbit= (1  9),
}, {
@@ -1132,15 +1132,7 @@ static struct clksrc_clk exynos4_clksrcs[] = {
.sources = exynos4_clkset_mout_mfc,
.reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 8, .size = 1 },
.reg_div = { .reg = EXYNOS4_CLKDIV_MFC, .shift = 0, .size = 4 },
-   }, {
-   .clk= {
-   .name   = sclk_dwmmc,
-   .parent = exynos4_clk_dout_mmc4.clk,
-   .enable = exynos4_clksrc_mask_fsys_ctrl,
-   .ctrlbit= (1  16),
-   },
-   .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS3, .shift = 8, .size = 8 
},
-   }
+   },
 };
 
 static struct clksrc_clk exynos4_clk_sclk_uart0 = {
@@ -1235,6 +1227,16 @@ static struct clksrc_clk exynos4_clk_sclk_mmc3 = {
.reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 24, .size = 8 },
 };
 
+static struct clksrc_clk exynos4_clk_sclk_dwmci = {
+   .clk= {
+   .name   = ciu,
+   .parent = exynos4_clk_dout_mmc4.clk,
+   .enable = exynos4_clksrc_mask_fsys_ctrl,
+   .ctrlbit= (1  16),
+   },
+   .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS3, .shift = 8, .size = 8 },
+};
+
 static struct clksrc_clk exynos4_clk_mdout_spi0 = {
.clk= {
.name   = mdout_spi,
@@ -1348,6 +1350,7 @@ static struct clksrc_clk *exynos4_clksrc_cdev[] = {
exynos4_clk_sclk_mmc1,
exynos4_clk_sclk_mmc2,
exynos4_clk_sclk_mmc3,
+   exynos4_clk_sclk_dwmci,
exynos4_clk_sclk_spi0,
exynos4_clk_sclk_spi1,
exynos4_clk_sclk_spi2,
-- 
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] ARM: EXYNOS: Fix MSHC clocks instance names

2012-12-14 Thread Dongjin Kim
Replace clock instance name of MSHC controller for BIC and CIU of Exynos4412.

Signed-off-by: Dongjin Kim tobet...@gmail.com
---
 arch/arm/mach-exynos/clock-exynos4.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/clock-exynos4.c 
b/arch/arm/mach-exynos/clock-exynos4.c
index efead60..bbcb3de 100644
--- a/arch/arm/mach-exynos/clock-exynos4.c
+++ b/arch/arm/mach-exynos/clock-exynos4.c
@@ -529,7 +529,7 @@ static struct clk exynos4_init_clocks_off[] = {
.enable = exynos4_clk_ip_fsys_ctrl,
.ctrlbit= (1  8),
}, {
-   .name   = dwmmc,
+   .name   = biu,
.parent = exynos4_clk_aclk_133.clk,
.enable = exynos4_clk_ip_fsys_ctrl,
.ctrlbit= (1  9),
@@ -1134,7 +1134,7 @@ static struct clksrc_clk exynos4_clksrcs[] = {
.reg_div = { .reg = EXYNOS4_CLKDIV_MFC, .shift = 0, .size = 4 },
}, {
.clk= {
-   .name   = sclk_dwmmc,
+   .name   = ciu,
.parent = exynos4_clk_dout_mmc4.clk,
.enable = exynos4_clksrc_mask_fsys_ctrl,
.ctrlbit= (1  16),
-- 
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] ARM: EXYNOS: Add HDMIPHY I2C adaptor

2012-08-07 Thread Dongjin Kim
Hi Sachin,

Thanks for your feedback, I couldnt find the patch series eariler. ;)

Regards,
Dongjin.

Sent from Moxier Mail
(http://www.moxier.com)


- 원본 메시지 -
보낸 사람:Sachin Kamat sachin.ka...@linaro.org
받는 사람:Dongjin Kim tobet...@gmail.com
참조:Dongjin Kim dongjin@agreeyamobility.net, Ben Dooks 
ben-li...@fluff.org, Kukjin Kim kgene@samsung.com, Russell King 
li...@arm.linux.org.uk, linux-arm-ker...@lists.infradead.org 
linux-arm-ker...@lists.infradead.org, linux-samsung-soc@vger.kernel.org 
linux-samsung-soc@vger.kernel.org, linux-ker...@vger.kernel.org 
linux-ker...@vger.kernel.org
보낸 시간:2012. 8. 7. 3:57 오후
제목:Re: [PATCH] ARM: EXYNOS: Add HDMIPHY I2C adaptor



Hi Dongjin,

A patch series to add HDMI platform data support is already under consideration.

http://comments.gmane.org/gmane.linux.kernel.samsung-soc/11352



On 6 August 2012 19:27, Dongjin Kim tobet...@gmail.com wrote:
 This patch assign the I2C channel for HDMIPHY for Exynos4x12
 in s5p_i2c_hdmiphy_set_platdata() and s5p_hdmi_set_platdata()

 Change-Id: I7e66c8f9327e2f7dce7440efb8583b506d65831a
 Signed-off-by: Dongjin Kim dongjin@agreeyamobility.net
 ---
  arch/arm/plat-samsung/devs.c |4 
  1 file changed, 4 insertions(+)

 diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
 index a199e55..54614d0 100644
 --- a/arch/arm/plat-samsung/devs.c
 +++ b/arch/arm/plat-samsung/devs.c
 @@ -752,6 +752,8 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct 
 s3c2410_platform_i2c *pd)

 if (soc_is_exynos4210())
 pd-bus_num = 8;
 +   else if (soc_is_exynos4212() || soc_is_exynos4412())
 +   pd-bus_num = 8;
 else if (soc_is_s5pv210())
 pd-bus_num = 3;
 else
 @@ -771,6 +773,8 @@ void __init s5p_hdmi_set_platdata(struct i2c_board_info 
 *hdmiphy_info,

 if (soc_is_exynos4210())
 pd-hdmiphy_bus = 8;
 +   else if (soc_is_exynos4212() || soc_is_exynos4412())
 +   pd-hdmiphy_bus = 8;
 else if (soc_is_s5pv210())
 pd-hdmiphy_bus = 3;
 else
 --
 1.7.9.5

 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/



--
With warm regards,
Sachin



회신: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

2012-08-07 Thread Dongjin Kim
Hi,

Thank you for your advice.

And I didn't know non-DT board file will not be merged any more.
Rule is rule, I can manage the file in my git only.

I am very new to send git patches to open community, even I use git on my 
previous project.
I will pay attention to my next patches if I have more. :)

Thanks again.

Regards,
Dongjin.

보낸 사람: Kukjin Kim [kgene@samsung.com]
보낸 날짜: 2012년 8월 8일 수요일 오전 11:23
받는 사람: 'Dongjin Kim'
참조: Dongjin Kim; 'Russell King'; 'Tony Lindgren'; 'Jon Medhurst'; 'Shawn Guo'; 
'Uwe Kleine-König'; linux-arm-ker...@lists.infradead.org; 
linux-samsung-soc@vger.kernel.org; linux-ker...@vger.kernel.org
제목: RE: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Dongjin Kim wrote:

Hi,

Basically, we don't add more board file for non-DT for EXYNOS SoCs...

 The HKDK4412 is the CPU module developed by Hardkernel which is based on
 Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine
 ID
 (4289) is registered.

This should be done at the link: 
http://www.arm.linux.org.uk/developer/machines/ by Russell King.

But I'm not sure whether it is worth to you without this patch for board file 
in mainline.

 Changes in v2:
   -. Change regulator's display names

 Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df

No need gerrit Change-Id here.

 Signed-off-by: Dongjin Kim dongjin@agreeyamobility.net

If there is no reason, please use same e-mail address in the field of author 
and sign-off.

Note, if you want to use e-mail 'agreeyamobility.net', just add 'From: Dongjin 
Kim dongjin@agreeyamobility.net', it's ok.

 ---
  arch/arm/mach-exynos/Kconfig |   23 +
  arch/arm/mach-exynos/Makefile|1 +
  arch/arm/mach-exynos/mach-hkdk4412.c |  964
 ++
  arch/arm/tools/mach-types|1 +
  4 files changed, 989 insertions(+)
  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c


Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


N�r��yb�X��ǧv�^�)޺{.n�+{�x,�ȧ���ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf

회신: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

2012-08-06 Thread Dongjin Kim
Hi,

Thank you for your advice.
Fortunately I got ODROID-X hardware earlier and am able to boot with mainline 
kernel.

I will try to do alternative way first with source code kernel 3.0.15, and hope 
you review the patch if ready.

Regards,
Dongjin.

보낸 사람: Olof Johansson [o...@lixom.net]
보낸 날짜: 2012년 8월 7일 화요일 오전 11:28
받는 사람: Dongjin Kim
참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon 
Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-ker...@lists.infradead.org; 
linux-samsung-soc@vger.kernel.org; linux-ker...@vger.kernel.org
제목: Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
dongjin@agreeyamobility.net wrote:
 Hello,

 I am trying to understand what I have to do for device tree.

 In order to create dts file for ODROID-X hardware, it seems I may need dts 
 file of EXYNOS4412 SoC.
 But maybe exynos4412.dtsi is not merged yet or not exist, like 
 exynos4210.dtsi or exynos5250.dtsi.
 Obviously it seems not easy to create such a file without SoC datasheet, and 
 I do not have it.

 So do I wait for the file to be merged by Samsung or better to create initial 
 dts file cloned from exynos4210.dtsi and modify to have verified nodes with 
 the source/header files?

Ideally they already have one waiting to be submitted, but that might
not be the case. Given that the origenboard design with 4412 is not
yet shipping, I'm guessing the Linaro Samsung engineers might not have
done much work on 4412 yet. Kukjin? Thomas?

 What's your suggestion?

The alternative is to use the data you have available -- i.e. sources
and patches, and craft the device tree from there. The design of 4412
is a derivative from 4210, so that's a good start. Next step would be
to describe the board on top of the SoC, peripherals, etc. Take a look
at how the origen board support was added, and so on.

I ordered an odroid-x several weeks ago but I haven't have a confirmed
shipping date yet. :( I'm not sure how long it'll be before I can help
out, unfortunately.


-Olof