Skip to contentSkip to conversation

ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

PATCH Superseded Lokesh Vutla 3 participants 14 messages Oct 10, 2012 – Oct 11, 2012 Device tree bindings

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

Patch 1:
Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi
Patch 2:
Correcting size of memory defined for omap5
Patch 3:
EMIF and LPDDR2 device tree data for OMAP5 boards

Testing:
- Boot tested on omap5-sevm board
- Built emif as a module

Lokesh Vutla (3):
ARM: dts: Renaming elpida_ecb240abacn.dts as lpddr2_data.dtsi
ARM: dts: Correcting size of memory defined for omap5
ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

 arch/arm/boot/dts/elpida_ecb240abacn.dtsi |   67 ---------------
 arch/arm/boot/dts/lpddr2_data.dtsi        |  129 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap4-panda.dts         |    2 +-
 arch/arm/boot/dts/omap4-sdp.dts           |    2 +-
 arch/arm/boot/dts/omap5-evm.dts           |   13 ++-
 arch/arm/boot/dts/omap5.dtsi              |   18 ++++
 6 files changed, 161 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/boot/dts/elpida_ecb240abacn.dtsi
 create mode 100644 arch/arm/boot/dts/lpddr2_data.dtsi
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/3 ARM: dts: Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi

Renaming elpida_ecb240abacn.dtsi file generic, so that the same file can be reused for other parts from different vendors.

---
 arch/arm/boot/dts/{elpida_ecb240abacn.dtsi => lpddr2_data.dtsi} |    0
 arch/arm/boot/dts/omap4-panda.dts                               |    2 +-
 arch/arm/boot/dts/omap4-sdp.dts                                 |    2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/boot/dts/{elpida_ecb240abacn.dtsi => lpddr2_data.dtsi} (100%)
arch/arm/boot/dts/lpddr2_data.dtsi renamed from arch/arm/boot/dts/elpida_ecb240abacn.dtsi +0 -0
similarity index 100%
rename from arch/arm/boot/dts/elpida_ecb240abacn.dtsi
rename to arch/arm/boot/dts/lpddr2_data.dtsi
arch/arm/boot/dts/omap4-panda.dts +1 -1
index 20b966e..09d3a32 100644
@@ -8,7 +8,7 @@
 /dts-v1/;
 
 /include/ "omap4.dtsi"
-/include/ "elpida_ecb240abacn.dtsi"
+/include/ "lpddr2_data.dtsi"
 
 / {
 	model = "TI OMAP4 PandaBoard";
arch/arm/boot/dts/omap4-sdp.dts +1 -1
index 94a23b3..dd749fc 100644
@@ -8,7 +8,7 @@
 /dts-v1/;
 
 /include/ "omap4.dtsi"
-/include/ "elpida_ecb240abacn.dtsi"
+/include/ "lpddr2_data.dtsi"
 
 / {
 	model = "TI OMAP4 SDP board";
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/3 ARM: dts: Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi

Hi Lokesh,

Quoted 2 lines · Lokesh Vutla

Renaming elpida_ecb240abacn.dtsi file generic, so that the same file can be reused for other parts from different vendors.

Could you elaborate a little bit?
Are these settings purely reflecting lpddr2 spec timings?

Regards,
Benoit

Quoted 39 lines
---
 arch/arm/boot/dts/{elpida_ecb240abacn.dtsi => lpddr2_data.dtsi} |    0
 arch/arm/boot/dts/omap4-panda.dts                               |    2 +-
 arch/arm/boot/dts/omap4-sdp.dts                                 |    2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/boot/dts/{elpida_ecb240abacn.dtsi => lpddr2_data.dtsi} (100%)
arch/arm/boot/dts/lpddr2_data.dtsi renamed from arch/arm/boot/dts/elpida_ecb240abacn.dtsi +0 -0
similarity index 100%
rename from arch/arm/boot/dts/elpida_ecb240abacn.dtsi
rename to arch/arm/boot/dts/lpddr2_data.dtsi
arch/arm/boot/dts/omap4-panda.dts +1 -1
index 20b966e..09d3a32 100644
@@ -8,7 +8,7 @@
 /dts-v1/;
 
 /include/ "omap4.dtsi"
-/include/ "elpida_ecb240abacn.dtsi"
+/include/ "lpddr2_data.dtsi"
 
 / {
 	model = "TI OMAP4 PandaBoard";
arch/arm/boot/dts/omap4-sdp.dts +1 -1
index 94a23b3..dd749fc 100644
@@ -8,7 +8,7 @@
 /dts-v1/;
 
 /include/ "omap4.dtsi"
-/include/ "elpida_ecb240abacn.dtsi"
+/include/ "lpddr2_data.dtsi"
 
 / {
 	model = "TI OMAP4 SDP board";
#3 lore raw

PATCH 1/3 ARM: dts: Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi

+ devicetree-discuss

Hi Benoit,

Quoted 8 lines · Benoit Cousson

Hi Lokesh,

Quoted 2 lines · Lokesh Vutla

Renaming elpida_ecb240abacn.dtsi file generic, so that the same file can be reused for other parts from different vendors.

Could you elaborate a little bit?
Are these settings purely reflecting lpddr2 spec timings?

The basic idea is to group data for all the lpddr2 devices in a single file instead of creating separate file for each lpddr2 device.

Right now the file elpida_ecb240abacn.dtsi contains only data for lpddr2-s4 2G parts from Elpida.
I wanted to add data for lpddr2-s4 4G parts from Samsung. So I renamed the file elpida_ecb240abacn.dtsi as lpddr2_data.dtsi.

Please let me know if more clarification is needed.

Thanks,
Lokesh

Quoted 45 lines

Regards,
Benoit

Quoted 39 lines
---
  arch/arm/boot/dts/{elpida_ecb240abacn.dtsi => lpddr2_data.dtsi} |    0
  arch/arm/boot/dts/omap4-panda.dts                               |    2 +-
  arch/arm/boot/dts/omap4-sdp.dts                                 |    2 +-
  3 files changed, 2 insertions(+), 2 deletions(-)

rename arch/arm/boot/dts/{elpida_ecb240abacn.dtsi => lpddr2_data.dtsi} (100%)

arch/arm/boot/dts/lpddr2_data.dtsi renamed from arch/arm/boot/dts/elpida_ecb240abacn.dtsi +0 -0
similarity index 100%
rename from arch/arm/boot/dts/elpida_ecb240abacn.dtsi
rename to arch/arm/boot/dts/lpddr2_data.dtsi
arch/arm/boot/dts/omap4-panda.dts +1 -1
index 20b966e..09d3a32 100644
@@ -8,7 +8,7 @@
  /dts-v1/;
 
  /include/ "omap4.dtsi"
-/include/ "elpida_ecb240abacn.dtsi"
+/include/ "lpddr2_data.dtsi"
 
  / {
  	model = "TI OMAP4 PandaBoard";
arch/arm/boot/dts/omap4-sdp.dts +1 -1
index 94a23b3..dd749fc 100644
@@ -8,7 +8,7 @@
  /dts-v1/;
 
  /include/ "omap4.dtsi"
-/include/ "elpida_ecb240abacn.dtsi"
+/include/ "lpddr2_data.dtsi"
 
  / {
  	model = "TI OMAP4 SDP board";
#4 lore raw

PATCH 1/3 ARM: dts: Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi

Quoted 17 lines · Lokesh Vutla

+ devicetree-discuss

Hi Benoit,

Quoted 8 lines · Benoit Cousson

Hi Lokesh,

Quoted 2 lines · Lokesh Vutla

Renaming elpida_ecb240abacn.dtsi file generic, so that the same file can be reused for other parts from different vendors.

Could you elaborate a little bit?
Are these settings purely reflecting lpddr2 spec timings?

The basic idea is to group data for all the lpddr2 devices in a single file instead of creating separate file for each lpddr2 device.

Quoted 6 lines

Right now the file elpida_ecb240abacn.dtsi contains only data for lpddr2-s4 2G parts from Elpida.
I wanted to add data for lpddr2-s4 4G parts from Samsung. So I renamed the file elpida_ecb240abacn.dtsi as lpddr2_data.dtsi.

Please let me know if more clarification is needed.

Well, not anymore... as explained in the previous email, you should not do that.
Keep the Elpida file and create another one for the Samsung part. Then each board will be able to select the proper one and include only the relevant data.

Regards,
Benoit

#5 lore raw

PATCH 1/3 ARM: dts: Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi

Quoted 23 lines · Benoit Cousson
Quoted 22 lines · Lokesh Vutla

+ devicetree-discuss

Hi Benoit,

Quoted 8 lines · Benoit Cousson

Hi Lokesh,

Quoted 2 lines · Lokesh Vutla

Renaming elpida_ecb240abacn.dtsi file generic, so that the same file can be reused for other parts from different vendors.

Could you elaborate a little bit?
Are these settings purely reflecting lpddr2 spec timings?

The basic idea is to group data for all the lpddr2 devices in a single file instead of creating separate file for each lpddr2 device.

Right now the file elpida_ecb240abacn.dtsi contains only data for lpddr2-s4 2G parts from Elpida.
I wanted to add data for lpddr2-s4 4G parts from Samsung. So I renamed the file elpida_ecb240abacn.dtsi as lpddr2_data.dtsi.

Quoted 7 lines
Quoted 1 line

Please let me know if more clarification is needed.

Well, not anymore... as explained in the previous email, you should not do that.
Keep the Elpida file and create another one for the Samsung part. Then each board will be able to select the proper one and include only the relevant data.

OK, Ill agree with you.
I ll do the changes and post the V2.

Thanks,
Lokesh

Quoted 4 lines

Regards,
Benoit

#6 lore raw

PATCH 2/3 ARM: dts: Correcting size of memory defined for omap5

In reply to Lokesh Vutla

Memory present for omap5 is 2GB. But in dt file
it is specified as 1GB. Correcting the same
in this patch

---
 arch/arm/boot/dts/omap5-evm.dts |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap5-evm.dts +1 -1
index 9c41a3f..6f87e1a 100644
@@ -15,7 +15,7 @@
 
 	memory {
 		device_type = "memory";
-		reg = <0x80000000 0x40000000>; /* 1 GB */
+		reg = <0x80000000 0x80000000>; /* 2 GB */
 	};
 
 	vmmcsd_fixed: fixedregulator-mmcsd {
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 2/3 ARM: dts: Correcting size of memory defined for omap5

Quoted 1 line · Lokesh Vutla

Memory present for omap5 is 2GB. But in dt file

omap5 -> OMAP5
dt -> dts

And this patch is about omap5-evm so you should be more specific in your changelog and even in the subject:

ARM: dts: omap5-evm: Fix size of memory defined for EVM

Quoted 2 lines

it is specified as 1GB. Correcting the same
in this patch

No "patch" in the changelog, please add a dot at the end of a sentence and make a correct sentence.

Regards,
Benoit

Quoted 19 lines
---
 arch/arm/boot/dts/omap5-evm.dts |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap5-evm.dts +1 -1
index 9c41a3f..6f87e1a 100644
@@ -15,7 +15,7 @@
 
 	memory {
 		device_type = "memory";
-		reg = <0x80000000 0x40000000>; /* 1 GB */
+		reg = <0x80000000 0x80000000>; /* 2 GB */
 	};
 
 	vmmcsd_fixed: fixedregulator-mmcsd {
#8 lore raw

PATCH 3/3 ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

In reply to Lokesh Vutla

Device tree data for the EMIF sdram controllers in OMAP5 and LPDDR2 memory devices attached to OMAP5 boards.

---
 arch/arm/boot/dts/lpddr2_data.dtsi |   64 +++++++++++++++++++++++++++++++++++-
 arch/arm/boot/dts/omap5-evm.dts    |   11 +++++++
 arch/arm/boot/dts/omap5.dtsi       |   18 ++++++++++
 3 files changed, 92 insertions(+), 1 deletion(-)
arch/arm/boot/dts/lpddr2_data.dtsi +63 -1
index f97f70f..8e8c1bc 100644
@@ -3,7 +3,7 @@
  */
 
 / {
-	elpida_ECB240ABACN: lpddr2 {
+	elpida_ECB240ABACN: lpddr2 at 0 {
 		compatible	= "Elpida,ECB240ABACN","jedec,lpddr2-s4";
 		density		= <2048>;
 		io-width	= <32>;
@@ -64,4 +64,66 @@
 			tDQSCK-max-derated = <6000>;
 		};
 	};
+
+	samsung_K3PE0E000B: lpddr2 at 1 {
+		compatible	= "Samsung,K3PE0E000B","jedec,lpddr2-s4";
+		density		= <4096>;
+		io-width	= <32>;
+
+		tRPab-min-tck	= <3>;
+		tRCD-min-tck	= <3>;
+		tWR-min-tck	= <3>;
+		tRASmin-min-tck	= <3>;
+		tRRD-min-tck	= <2>;
+		tWTR-min-tck	= <2>;
+		tXP-min-tck	= <2>;
+		tRTP-min-tck	= <2>;
+		tCKE-min-tck	= <3>;
+		tCKESR-min-tck	= <3>;
+		tFAW-min-tck	= <8>;
+
+		timings_samsung_K3PE0E000B_533mhz: lpddr2-timings at 0 {
+			compatible	= "jedec,lpddr2-timings";
+			min-freq	= <10000000>;
+			max-freq	= <533333333>;
+			tRPab		= <21000>;
+			tRCD		= <18000>;
+			tWR		= <15000>;
+			tRAS-min	= <42000>;
+			tRRD		= <10000>;
+			tWTR		= <7500>;
+			tXP		= <7500>;
+			tRTP		= <7500>;
+			tCKESR		= <15000>;
+			tDQSCK-max	= <5500>;
+			tFAW		= <50000>;
+			tZQCS		= <90000>;
+			tZQCL		= <360000>;
+			tZQinit		= <1000000>;
+			tRAS-max-ns	= <70000>;
+			tDQSCK-max-derated = <5620>;
+		};
+
+		timings_samsung_K3PE0E000B_266mhz: lpddr2-timings at 1 {
+			compatible	= "jedec,lpddr2-timings";
+			min-freq	= <10000000>;
+			max-freq	= <266666666>;
+			tRPab		= <21000>;
+			tRCD		= <18000>;
+			tWR		= <15000>;
+			tRAS-min	= <42000>;
+			tRRD		= <10000>;
+			tWTR		= <7500>;
+			tXP		= <7500>;
+			tRTP		= <7500>;
+			tCKESR		= <15000>;
+			tDQSCK-max	= <5500>;
+			tFAW		= <50000>;
+			tZQCS		= <90000>;
+			tZQCL		= <360000>;
+			tZQinit		= <1000000>;
+			tRAS-max-ns	= <70000>;
+			tDQSCK-max-derated = <6000>;
+		};
+	};
 };
arch/arm/boot/dts/omap5-evm.dts +11 -0
index 6f87e1a..8a952f8 100644
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 /include/ "omap5.dtsi"
+/include/ "lpddr2_data.dtsi"
 
 / {
 	model = "TI OMAP5 EVM board";
@@ -82,3 +83,13 @@
 			0x020700d9>;	/* SEARCH */
 	linux,input-no-autorepeat;
 };
+
+&emif1 {
+	cs1-used;
+	device-handle = <&samsung_K3PE0E000B>;
+};
+
+&emif2 {
+	cs1-used;
+	device-handle = <&samsung_K3PE0E000B>;
+};
arch/arm/boot/dts/omap5.dtsi +18 -0
index 5db33f4..40b41c2 100644
@@ -319,5 +319,23 @@
 			ti,buffer-size = <128>;
 			ti,hwmods = "mcbsp3";
 		};
+
+		emif1: emif at 0x4c000000 {
+			compatible	= "ti,emif-4d5";
+			ti,hwmods	= "emif1";
+			phy-type	= <2>;
+			hw-caps-read-idle-ctrl;
+			hw-caps-ll-interface;
+			hw-caps-temp-alert;
+		};
+
+		emif2: emif at 0x4d000000 {
+			compatible	= "ti,emif-4d5";
+			ti,hwmods	= "emif2";
+			phy-type	= <2>;
+			hw-caps-read-idle-ctrl;
+			hw-caps-ll-interface;
+			hw-caps-temp-alert;
+		};
 	};
 };
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH 3/3 ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

Quoted 2 lines · Lokesh Vutla

Device tree data for the EMIF sdram controllers in OMAP5 and LPDDR2 memory devices attached to OMAP5 boards.

Nit: Could you make a sentence with a verb to explain what you are doing in this patch.

Quoted 21 lines
---
 arch/arm/boot/dts/lpddr2_data.dtsi |   64 +++++++++++++++++++++++++++++++++++-
 arch/arm/boot/dts/omap5-evm.dts    |   11 +++++++
 arch/arm/boot/dts/omap5.dtsi       |   18 ++++++++++
 3 files changed, 92 insertions(+), 1 deletion(-)
arch/arm/boot/dts/lpddr2_data.dtsi +1 -1
index f97f70f..8e8c1bc 100644
@@ -3,7 +3,7 @@
  */
 
 / {
-	elpida_ECB240ABACN: lpddr2 {
+	elpida_ECB240ABACN: lpddr2 at 0 {
 		compatible	= "Elpida,ECB240ABACN","jedec,lpddr2-s4";
 		density		= <2048>;
 		io-width	= <32>;

arch/arm/boot/dts/lpddr2_data.dtsi line 68

Quoted 5 lines
arch/arm/boot/dts/lpddr2_data.dtsi +2 -0
@@ -64,4 +64,66 @@
 			tDQSCK-max-derated = <6000>;
 		};
 	};
+
+	samsung_K3PE0E000B: lpddr2 at 1 {

I'm confused now, why are you reusing the same lpddr2_data.dtsi file? You should create a file per memory. That will make the reuse much easier.

If the goal of your first patch was to do that, it is then the wrong approach.

Quoted 93 lines
arch/arm/boot/dts/lpddr2_data.dtsi +60 -0
+		compatible	= "Samsung,K3PE0E000B","jedec,lpddr2-s4";
+		density		= <4096>;
+		io-width	= <32>;
+
+		tRPab-min-tck	= <3>;
+		tRCD-min-tck	= <3>;
+		tWR-min-tck	= <3>;
+		tRASmin-min-tck	= <3>;
+		tRRD-min-tck	= <2>;
+		tWTR-min-tck	= <2>;
+		tXP-min-tck	= <2>;
+		tRTP-min-tck	= <2>;
+		tCKE-min-tck	= <3>;
+		tCKESR-min-tck	= <3>;
+		tFAW-min-tck	= <8>;
+
+		timings_samsung_K3PE0E000B_533mhz: lpddr2-timings at 0 {
+			compatible	= "jedec,lpddr2-timings";
+			min-freq	= <10000000>;
+			max-freq	= <533333333>;
+			tRPab		= <21000>;
+			tRCD		= <18000>;
+			tWR		= <15000>;
+			tRAS-min	= <42000>;
+			tRRD		= <10000>;
+			tWTR		= <7500>;
+			tXP		= <7500>;
+			tRTP		= <7500>;
+			tCKESR		= <15000>;
+			tDQSCK-max	= <5500>;
+			tFAW		= <50000>;
+			tZQCS		= <90000>;
+			tZQCL		= <360000>;
+			tZQinit		= <1000000>;
+			tRAS-max-ns	= <70000>;
+			tDQSCK-max-derated = <5620>;
+		};
+
+		timings_samsung_K3PE0E000B_266mhz: lpddr2-timings at 1 {
+			compatible	= "jedec,lpddr2-timings";
+			min-freq	= <10000000>;
+			max-freq	= <266666666>;
+			tRPab		= <21000>;
+			tRCD		= <18000>;
+			tWR		= <15000>;
+			tRAS-min	= <42000>;
+			tRRD		= <10000>;
+			tWTR		= <7500>;
+			tXP		= <7500>;
+			tRTP		= <7500>;
+			tCKESR		= <15000>;
+			tDQSCK-max	= <5500>;
+			tFAW		= <50000>;
+			tZQCS		= <90000>;
+			tZQCL		= <360000>;
+			tZQinit		= <1000000>;
+			tRAS-max-ns	= <70000>;
+			tDQSCK-max-derated = <6000>;
+		};
+	};
 };
arch/arm/boot/dts/omap5-evm.dts +11 -0
index 6f87e1a..8a952f8 100644
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 /include/ "omap5.dtsi"
+/include/ "lpddr2_data.dtsi"
 
 / {
 	model = "TI OMAP5 EVM board";
@@ -82,3 +83,13 @@
 			0x020700d9>;	/* SEARCH */
 	linux,input-no-autorepeat;
 };
+
+&emif1 {
+	cs1-used;
+	device-handle = <&samsung_K3PE0E000B>;
+};
+
+&emif2 {
+	cs1-used;
+	device-handle = <&samsung_K3PE0E000B>;
+};
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5db33f4..40b41c2 100644
@@ -319,5 +319,23 @@
 			ti,buffer-size = <128>;

arch/arm/boot/dts/omap5.dtsi line 329

Quoted 10 lines
arch/arm/boot/dts/omap5.dtsi +8 -0
 			ti,hwmods = "mcbsp3";
 		};
+
+		emif1: emif at 0x4c000000 {
+			compatible	= "ti,emif-4d5";
+			ti,hwmods	= "emif1";
+			phy-type	= <2>;
+			hw-caps-read-idle-ctrl;
+			hw-caps-ll-interface;
+			hw-caps-temp-alert;

You should now add the reg, and interrupt attributes as well.

Regards,
Benoit

#10 lore raw

PATCH 3/3 ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

+ devicetree-discuss

Hi Benoit,

Quoted 6 lines · Benoit Cousson
Quoted 2 lines · Lokesh Vutla

Device tree data for the EMIF sdram controllers in OMAP5 and LPDDR2 memory devices attached to OMAP5 boards.

Nit: Could you make a sentence with a verb to explain what you are doing in this patch.

I am really sorry about this.
I ll make sure that all patch descriptions will be clear in V2 of this patch series.

In this patch I am adding device tree data for LPDDR2 memory devices attached to omap5-sevm and also adding device tree data for EMIF sdram controllers in OMAP5.

Quoted 31 lines
Quoted 22 lines
---
  arch/arm/boot/dts/lpddr2_data.dtsi |   64 +++++++++++++++++++++++++++++++++++-
  arch/arm/boot/dts/omap5-evm.dts    |   11 +++++++
  arch/arm/boot/dts/omap5.dtsi       |   18 ++++++++++
  3 files changed, 92 insertions(+), 1 deletion(-)
arch/arm/boot/dts/lpddr2_data.dtsi +1 -1
index f97f70f..8e8c1bc 100644
@@ -3,7 +3,7 @@
   */
 
  / {
-	elpida_ECB240ABACN: lpddr2 {
+	elpida_ECB240ABACN: lpddr2 at 0 {
  		compatible	= "Elpida,ECB240ABACN","jedec,lpddr2-s4";
  		density		= <2048>;
  		io-width	= <32>;

arch/arm/boot/dts/lpddr2_data.dtsi line 68

Quoted 5 lines
arch/arm/boot/dts/lpddr2_data.dtsi +2 -0
@@ -64,4 +64,66 @@
  			tDQSCK-max-derated = <6000>;
  		};
  	};
+
+	samsung_K3PE0E000B: lpddr2 at 1 {

I'm confused now, why are you reusing the same lpddr2_data.dtsi file? You should create a file per memory. That will make the reuse much easier.

Quoted 2 lines

If the goal of your first patch was to do that, it is then the wrong approach.

Yes, I wanted to group data for all lppdr2 devices in a single file than creating separate file for each device.
May be a dumb question, Why can't we group data for all the lpddr2 devices in a single file?

Quoted 98 lines
Quoted 98 lines
arch/arm/boot/dts/lpddr2_data.dtsi +60 -0
+		compatible	= "Samsung,K3PE0E000B","jedec,lpddr2-s4";
+		density		= <4096>;
+		io-width	= <32>;
+
+		tRPab-min-tck	= <3>;
+		tRCD-min-tck	= <3>;
+		tWR-min-tck	= <3>;
+		tRASmin-min-tck	= <3>;
+		tRRD-min-tck	= <2>;
+		tWTR-min-tck	= <2>;
+		tXP-min-tck	= <2>;
+		tRTP-min-tck	= <2>;
+		tCKE-min-tck	= <3>;
+		tCKESR-min-tck	= <3>;
+		tFAW-min-tck	= <8>;
+
+		timings_samsung_K3PE0E000B_533mhz: lpddr2-timings at 0 {
+			compatible	= "jedec,lpddr2-timings";
+			min-freq	= <10000000>;
+			max-freq	= <533333333>;
+			tRPab		= <21000>;
+			tRCD		= <18000>;
+			tWR		= <15000>;
+			tRAS-min	= <42000>;
+			tRRD		= <10000>;
+			tWTR		= <7500>;
+			tXP		= <7500>;
+			tRTP		= <7500>;
+			tCKESR		= <15000>;
+			tDQSCK-max	= <5500>;
+			tFAW		= <50000>;
+			tZQCS		= <90000>;
+			tZQCL		= <360000>;
+			tZQinit		= <1000000>;
+			tRAS-max-ns	= <70000>;
+			tDQSCK-max-derated = <5620>;
+		};
+
+		timings_samsung_K3PE0E000B_266mhz: lpddr2-timings at 1 {
+			compatible	= "jedec,lpddr2-timings";
+			min-freq	= <10000000>;
+			max-freq	= <266666666>;
+			tRPab		= <21000>;
+			tRCD		= <18000>;
+			tWR		= <15000>;
+			tRAS-min	= <42000>;
+			tRRD		= <10000>;
+			tWTR		= <7500>;
+			tXP		= <7500>;
+			tRTP		= <7500>;
+			tCKESR		= <15000>;
+			tDQSCK-max	= <5500>;
+			tFAW		= <50000>;
+			tZQCS		= <90000>;
+			tZQCL		= <360000>;
+			tZQinit		= <1000000>;
+			tRAS-max-ns	= <70000>;
+			tDQSCK-max-derated = <6000>;
+		};
+	};
  };
arch/arm/boot/dts/omap5-evm.dts +11 -0
index 6f87e1a..8a952f8 100644
@@ -8,6 +8,7 @@
  /dts-v1/;
 
  /include/ "omap5.dtsi"
+/include/ "lpddr2_data.dtsi"
 
  / {
  	model = "TI OMAP5 EVM board";
@@ -82,3 +83,13 @@
  			0x020700d9>;	/* SEARCH */
  	linux,input-no-autorepeat;
  };
+
+&emif1 {
+	cs1-used;
+	device-handle = <&samsung_K3PE0E000B>;
+};
+
+&emif2 {
+	cs1-used;
+	device-handle = <&samsung_K3PE0E000B>;
+};
arch/arm/boot/dts/omap5.dtsi +2 -0
index 5db33f4..40b41c2 100644
@@ -319,5 +319,23 @@
  			ti,buffer-size = <128>;
  			ti,hwmods = "mcbsp3";
  		};
+
+		emif1: emif at 0x4c000000 {
Quoted 8 lines

arch/arm/boot/dts/omap5.dtsi line 329

Quoted 6 lines
arch/arm/boot/dts/omap5.dtsi +6 -0
+			compatible	= "ti,emif-4d5";
+			ti,hwmods	= "emif1";
+			phy-type	= <2>;
+			hw-caps-read-idle-ctrl;
+			hw-caps-ll-interface;
+			hw-caps-temp-alert;

You should now add the reg, and interrupt attributes as well.

OK I ll add these fields.

Thanks,
Lokesh

Quoted 4 lines

Regards,
Benoit

#11 lore raw

PATCH 3/3 ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

Hi Lokesh,

Quoted 52 lines · Lokesh Vutla

+ devicetree-discuss

Hi Benoit,

Quoted 6 lines · Benoit Cousson
Quoted 2 lines · Lokesh Vutla

Device tree data for the EMIF sdram controllers in OMAP5 and LPDDR2 memory devices attached to OMAP5 boards.

Nit: Could you make a sentence with a verb to explain what you are doing in this patch.

I am really sorry about this.
I ll make sure that all patch descriptions will be clear in V2 of this patch series.

In this patch I am adding device tree data for LPDDR2 memory devices attached to omap5-sevm and also adding device tree data for EMIF sdram controllers in OMAP5.

Quoted 34 lines
Quoted 24 lines
---
  arch/arm/boot/dts/lpddr2_data.dtsi |   64
+++++++++++++++++++++++++++++++++++-
  arch/arm/boot/dts/omap5-evm.dts    |   11 +++++++
  arch/arm/boot/dts/omap5.dtsi       |   18 ++++++++++
  3 files changed, 92 insertions(+), 1 deletion(-)
arch/arm/boot/dts/lpddr2_data.dtsi +1 -1
index f97f70f..8e8c1bc 100644
@@ -3,7 +3,7 @@
   */
 
  / {
-    elpida_ECB240ABACN: lpddr2 {
+    elpida_ECB240ABACN: lpddr2 at 0 {
          compatible    = "Elpida,ECB240ABACN","jedec,lpddr2-s4";
          density        = <2048>;
          io-width    = <32>;

arch/arm/boot/dts/lpddr2_data.dtsi line 68

Quoted 5 lines
arch/arm/boot/dts/lpddr2_data.dtsi +2 -0
@@ -64,4 +64,66 @@
              tDQSCK-max-derated = <6000>;
          };
      };
+
+    samsung_K3PE0E000B: lpddr2 at 1 {

I'm confused now, why are you reusing the same lpddr2_data.dtsi file? You should create a file per memory. That will make the reuse much easier.

Quoted 6 lines
Quoted 2 lines

If the goal of your first patch was to do that, it is then the wrong approach.

Yes, I wanted to group data for all lppdr2 devices in a single file than creating separate file for each device.
May be a dumb question, Why can't we group data for all the lpddr2 devices in a single file?

Well, why should we do that? What will be the advantage?

That will increase the size of the DTS/DTB with data nobody will care if only one type of memory is used on a given platform.

Going in the same direction you can consider adding every OMAP description into a single DTS... Does that really make sense?

So clearly there is no point doing that, it will cluttered the OMAP4 DTB with useless Samsung memory data. And the same issue for OMAP5 board that will contain Elpida memory information. And it will get worst each time someone will want to add a new memory in this file.

You should just include the data you need for a given board.

Regards,
Benoit

#12 lore raw

PATCH 3/3 ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

Quoted 70 lines · Benoit Cousson

Hi Lokesh,

Quoted 52 lines · Lokesh Vutla

+ devicetree-discuss

Hi Benoit,

Quoted 6 lines · Benoit Cousson
Quoted 2 lines · Lokesh Vutla

Device tree data for the EMIF sdram controllers in OMAP5 and LPDDR2 memory devices attached to OMAP5 boards.

Nit: Could you make a sentence with a verb to explain what you are doing in this patch.

I am really sorry about this.
I ll make sure that all patch descriptions will be clear in V2 of this patch series.

In this patch I am adding device tree data for LPDDR2 memory devices attached to omap5-sevm and also adding device tree data for EMIF sdram controllers in OMAP5.

Quoted 34 lines
Quoted 24 lines
---
   arch/arm/boot/dts/lpddr2_data.dtsi |   64
+++++++++++++++++++++++++++++++++++-
   arch/arm/boot/dts/omap5-evm.dts    |   11 +++++++
   arch/arm/boot/dts/omap5.dtsi       |   18 ++++++++++
   3 files changed, 92 insertions(+), 1 deletion(-)
arch/arm/boot/dts/lpddr2_data.dtsi +1 -1
index f97f70f..8e8c1bc 100644
@@ -3,7 +3,7 @@
    */
 
   / {
-    elpida_ECB240ABACN: lpddr2 {
+    elpida_ECB240ABACN: lpddr2 at 0 {
           compatible    = "Elpida,ECB240ABACN","jedec,lpddr2-s4";
           density        = <2048>;
           io-width    = <32>;

arch/arm/boot/dts/lpddr2_data.dtsi line 68

Quoted 5 lines
arch/arm/boot/dts/lpddr2_data.dtsi +2 -0
@@ -64,4 +64,66 @@
               tDQSCK-max-derated = <6000>;
           };
       };
+
+    samsung_K3PE0E000B: lpddr2 at 1 {

I'm confused now, why are you reusing the same lpddr2_data.dtsi file? You should create a file per memory. That will make the reuse much easier.

Quoted 6 lines
Quoted 2 lines

If the goal of your first patch was to do that, it is then the wrong approach.

Yes, I wanted to group data for all lppdr2 devices in a single file than creating separate file for each device.
May be a dumb question, Why can't we group data for all the lpddr2 devices in a single file?

Well, why should we do that? What will be the advantage?

That will increase the size of the DTS/DTB with data nobody will care if only one type of memory is used on a given platform.

Going in the same direction you can consider adding every OMAP description into a single DTS... Does that really make sense?

Quoted 7 lines

So clearly there is no point doing that, it will cluttered the OMAP4 DTB with useless Samsung memory data. And the same issue for OMAP5 board that will contain Elpida memory information. And it will get worst each time someone will want to add a new memory in this file.

You should just include the data you need for a given board.

I agree with Benoit. Keeping the memory data files separate will be better and also if some non-omap boards is using the memory parts, the separate files can be re-used.

Regards
Santosh

#13 lore raw

cover ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

In reply to Lokesh Vutla

You should CC devicetree-discuss at lists.ozlabs.org for any Device tree patches. This is applicable for the whole series.

Quoted 7 lines · Lokesh Vutla

Patch 1:
Renaming elpida_ecb240abacn.dtsi as lpddr2_data.dtsi
Patch 2:
Correcting size of memory defined for omap5
Patch 3:
EMIF and LPDDR2 device tree data for OMAP5 boards

There is not point to list the patch subject in a cover letter. You should just introduce the series and ideally give details about the test like you have done below.

The cover letter should mostly be written like an email.

Benoit

Quoted 19 lines

Testing:
- Boot tested on omap5-sevm board
- Built emif as a module

Lokesh Vutla (3):
ARM: dts: Renaming elpida_ecb240abacn.dts as lpddr2_data.dtsi
ARM: dts: Correcting size of memory defined for omap5
ARM: dts: EMIF and LPDDR2 device tree data for OMAP5 boards

 arch/arm/boot/dts/elpida_ecb240abacn.dtsi |   67 ---------------
 arch/arm/boot/dts/lpddr2_data.dtsi        |  129 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap4-panda.dts         |    2 +-
 arch/arm/boot/dts/omap4-sdp.dts           |    2 +-
 arch/arm/boot/dts/omap5-evm.dts           |   13 ++-
 arch/arm/boot/dts/omap5.dtsi              |   18 ++++
 6 files changed, 161 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/boot/dts/elpida_ecb240abacn.dtsi
 create mode 100644 arch/arm/boot/dts/lpddr2_data.dtsi