Skip to contentSkip to conversation

ARM: OMAP5: Add support for OMAP543x ES2.0 Socs

PATCH Superseded R Sricharan 3 participants 19 messages Feb 4, 2013 – Feb 6, 2013 Arm (32-bit)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover ARM: OMAP5: Add support for OMAP543x ES2.0 Socs

ES2.0 is the latest silicon revision for OMAP543X socs. The SOC supports enhanced opps for MPU (up to 1.5GHz). This series essentially adds the support for both 5430 and 5432 versions.

This is on top of the below U-Boot cleanup series.
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/152834

Lokesh Vutla (2):
ARM: OMAP5: Add DDR changes required for OMAP543X ES2.0 SOCs
ARM: OMAP5: srcomp: enable slew rate compensation cells after powerup

R Sricharan (3):
ARM: OMAP5: Add silicon id support for ES2.0 revision.
ARM: OMAP5: clock: Add the prcm register changes required for ES2.0
ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

 arch/arm/cpu/armv7/omap-common/clocks-common.c |    4 +
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |    6 +
 arch/arm/cpu/armv7/omap4/hw_data.c             |  142 ++++++------
 arch/arm/cpu/armv7/omap5/hw_data.c             |  261 ++++++++++++++-------
 arch/arm/cpu/armv7/omap5/hwinit.c              |  129 ++++++++++-
 arch/arm/cpu/armv7/omap5/prcm-regs.c           |  286 ++++++++++++++++++++++++
 arch/arm/cpu/armv7/omap5/sdram.c               |   75 ++++++-
 arch/arm/include/asm/arch-omap5/clocks.h       |    8 +
 arch/arm/include/asm/arch-omap5/omap.h         |   27 +++
 arch/arm/include/asm/arch-omap5/sys_proto.h    |    1 +
 arch/arm/include/asm/armv7.h                   |    1 +
 arch/arm/include/asm/emif.h                    |    1 +
 arch/arm/include/asm/omap_common.h             |   14 +-
 13 files changed, 794 insertions(+), 161 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/5 ARM: OMAP5: Add silicon id support for ES2.0 revision.

Adding the CPU detection suport for OMAP5430 and
OMAP5432 ES2.0 SOCs.

---
 arch/arm/cpu/armv7/omap5/hwinit.c      |   13 +++++++++++--
 arch/arm/include/asm/arch-omap5/omap.h |    2 ++
 arch/arm/include/asm/armv7.h           |    1 +
 arch/arm/include/asm/omap_common.h     |    2 ++
 4 files changed, 16 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +11 -2
index dfc0e44..0d8c95d 100644
@@ -216,8 +216,17 @@ void init_omap_revision(void)
 			break;
 		}
 		break;
-	default:
-		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+	case MIDR_CORTEX_A15_R2P2:
+		switch (readl(CONTROL_ID_CODE)) {
+		case OMAP5430_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5430_ES2_0;
+			break;
+		case OMAP5432_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5432_ES2_0;
+			break;
+		default:
+			*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+		}
 	}
 }
 
arch/arm/include/asm/arch-omap5/omap.h +2 -0
index 873ccd7..71935d8 100644
@@ -57,7 +57,9 @@
 
 /* To be verified */
 #define OMAP5430_CONTROL_ID_CODE_ES1_0		0x0B94202F
+#define OMAP5430_CONTROL_ID_CODE_ES2_0          0x1B94202F
 #define OMAP5432_CONTROL_ID_CODE_ES1_0		0x0B99802F
+#define OMAP5432_CONTROL_ID_CODE_ES2_0          0x1B99802F
 
 /* STD_FUSE_PROD_ID_1 */
 #define STD_FUSE_PROD_ID_1		(CTRL_BASE + 0x218)
arch/arm/include/asm/armv7.h +1 -0
index ad9a875..a73630b 100644
@@ -33,6 +33,7 @@
 
 /* Cortex-A15 revisions */
 #define MIDR_CORTEX_A15_R0P0	0x410FC0F0
+#define MIDR_CORTEX_A15_R2P2	0x412FC0F2
 
 /* CCSIDR */
 #define CCSIDR_LINE_SIZE_OFFSET		0
arch/arm/include/asm/omap_common.h +2 -0
index 2115687..4599167 100644
@@ -542,4 +542,6 @@ static inline u32 omap_revision(void)
 #define OMAP5430_SILICON_ID_INVALID	0
 #define OMAP5430_ES1_0	0x54300100
 #define OMAP5432_ES1_0	0x54320100
+#define OMAP5430_ES2_0  0x54300200
+#define OMAP5432_ES2_0  0x54320200
 #endif /* _OMAP_COMMON_H_ */
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 1/5 ARM: OMAP5: Add silicon id support for ES2.0 revision.

Quoted 4 lines · R Sricharan

Adding the CPU detection suport for OMAP5430 and
OMAP5432 ES2.0 SOCs.

[snip]

Quoted 5 lines

/* To be verified */
#define OMAP5430_CONTROL_ID_CODE_ES1_0 0x0B94202F

arch/arm/include/asm/arch-omap5/omap.h +2 -0
+#define OMAP5430_CONTROL_ID_CODE_ES2_0          0x1B94202F
 #define OMAP5432_CONTROL_ID_CODE_ES1_0		0x0B99802F
+#define OMAP5432_CONTROL_ID_CODE_ES2_0          0x1B99802F

[snip]

arch/arm/include/asm/omap_common.h static inline u32 omap_revision(void) · line 546

Quoted 2 lines
arch/arm/include/asm/omap_common.h +2 -0
+#define OMAP5430_ES2_0  0x54300200
+#define OMAP5432_ES2_0  0x54320200

These all have whitespace problems, but git am --whitespace=fix will fix them.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130204/3c2b754e/attachment.pgp>
#3 lore raw

PATCH v2 1/5 ARM: OMAP5: Add silicon id support for ES2.0 revision.

In reply to R Sricharan
Quoted 22 lines · R Sricharan

Adding the CPU detection suport for OMAP5430 and
OMAP5432 ES2.0 SOCs.

---
 arch/arm/cpu/armv7/omap5/hwinit.c      |   13 +++++++++++--
 arch/arm/include/asm/arch-omap5/omap.h |    2 ++
 arch/arm/include/asm/armv7.h           |    1 +
 arch/arm/include/asm/omap_common.h     |    2 ++
 4 files changed, 16 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +1 -2
index dfc0e44..0d8c95d 100644
@@ -216,8 +216,17 @@ void init_omap_revision(void)
 			break;
 		}
 		break;
-	default:
-		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+	case MIDR_CORTEX_A15_R2P2:

arch/arm/cpu/armv7/omap5/hwinit.c void init_omap_revision(void) · line 229

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hwinit.c +10 -0
+		switch (readl(CONTROL_ID_CODE)) {
+		case OMAP5430_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5430_ES2_0;
+			break;
+		case OMAP5432_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5432_ES2_0;
+			break;
+		default:
+			*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+		}

A first few samples of both ES1.0 and ES2.0 (in the few 10s of samples) came with wrong efuse ID fused in, why would we want to make it a standard to check ARM
revision *and then* cross verify against control fuse verification, *and
then* give up saying we dont support it?

Looks like an over check for me -> IMHO, we should drop the MIDR checks entirely.

Quoted 47 lines
arch/arm/cpu/armv7/omap5/hwinit.c +0 -0
 	}
 }
 
arch/arm/include/asm/arch-omap5/omap.h +2 -0
index 873ccd7..71935d8 100644
@@ -57,7 +57,9 @@
 
 /* To be verified */
 #define OMAP5430_CONTROL_ID_CODE_ES1_0		0x0B94202F
+#define OMAP5430_CONTROL_ID_CODE_ES2_0          0x1B94202F
 #define OMAP5432_CONTROL_ID_CODE_ES1_0		0x0B99802F
+#define OMAP5432_CONTROL_ID_CODE_ES2_0          0x1B99802F
 
 /* STD_FUSE_PROD_ID_1 */
 #define STD_FUSE_PROD_ID_1		(CTRL_BASE + 0x218)
arch/arm/include/asm/armv7.h +1 -0
index ad9a875..a73630b 100644
@@ -33,6 +33,7 @@
 
 /* Cortex-A15 revisions */
 #define MIDR_CORTEX_A15_R0P0	0x410FC0F0
+#define MIDR_CORTEX_A15_R2P2	0x412FC0F2
 
 /* CCSIDR */
 #define CCSIDR_LINE_SIZE_OFFSET		0
arch/arm/include/asm/omap_common.h +2 -0
index 2115687..4599167 100644
@@ -542,4 +542,6 @@ static inline u32 omap_revision(void)
 #define OMAP5430_SILICON_ID_INVALID	0
 #define OMAP5430_ES1_0	0x54300100
 #define OMAP5432_ES1_0	0x54320100
+#define OMAP5430_ES2_0  0x54300200
+#define OMAP5432_ES2_0  0x54320200
 #endif /* _OMAP_COMMON_H_ */
Signature · 6 lines
1.7.9.5

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Regards,
Nishanth Menon
#4 lore raw

PATCH v2 1/5 ARM: OMAP5: Add silicon id support for ES2.0 revision.

Quoted 39 lines · Nishanth Menon
Quoted 22 lines · R Sricharan

Adding the CPU detection suport for OMAP5430 and
OMAP5432 ES2.0 SOCs.

---
  arch/arm/cpu/armv7/omap5/hwinit.c      |   13 +++++++++++--
  arch/arm/include/asm/arch-omap5/omap.h |    2 ++
  arch/arm/include/asm/armv7.h           |    1 +
  arch/arm/include/asm/omap_common.h     |    2 ++
  4 files changed, 16 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +1 -2
index dfc0e44..0d8c95d 100644
@@ -216,8 +216,17 @@ void init_omap_revision(void)
  			break;
  		}
  		break;
-	default:
-		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+	case MIDR_CORTEX_A15_R2P2:

arch/arm/cpu/armv7/omap5/hwinit.c void init_omap_revision(void) · line 229

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hwinit.c +10 -0
+		switch (readl(CONTROL_ID_CODE)) {
+		case OMAP5430_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5430_ES2_0;
+			break;
+		case OMAP5432_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5432_ES2_0;
+			break;
+		default:
+			*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+		}

A first few samples of both ES1.0 and ES2.0 (in the few 10s of samples) came with wrong efuse ID fused in, why would we want to make it a standard to check ARMsilicon revision *and then* cross verify against control fuse verification, *and
then* give up saying we dont support it?

Quoted 2 lines

Looks like an over check for me -> IMHO, we should drop the MIDR checks entirely.

In the same context, for some boards in past even in the actual samples the CONTROL ID code was reading the older revision. So in those cases ARM revision will help to differentiate them.

But then it should have been in the opposite way, like reading the
CONTROL_CODE first and then reading the ARM revision if required in those cases where is it broken. I will change this logic here.

Regards,
Sricharan

#5 lore raw

PATCH v2 1/5 ARM: OMAP5: Add silicon id support for ES2.0 revision.

Quoted 40 lines · R Sricharan
Quoted 39 lines · Nishanth Menon
Quoted 22 lines · R Sricharan

Adding the CPU detection suport for OMAP5430 and
OMAP5432 ES2.0 SOCs.

---
 arch/arm/cpu/armv7/omap5/hwinit.c      |   13 +++++++++++--
 arch/arm/include/asm/arch-omap5/omap.h |    2 ++
 arch/arm/include/asm/armv7.h           |    1 +
 arch/arm/include/asm/omap_common.h     |    2 ++
 4 files changed, 16 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +1 -2
index dfc0e44..0d8c95d 100644
@@ -216,8 +216,17 @@ void init_omap_revision(void)
 			break;
 		}
 		break;
-	default:
-		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+	case MIDR_CORTEX_A15_R2P2:

arch/arm/cpu/armv7/omap5/hwinit.c void init_omap_revision(void) · line 229

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hwinit.c +10 -0
+		switch (readl(CONTROL_ID_CODE)) {
+		case OMAP5430_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5430_ES2_0;
+			break;
+		case OMAP5432_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5432_ES2_0;
+			break;
+		default:
+			*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+		}

A first few samples of both ES1.0 and ES2.0 (in the few 10s of samples) came with wrong efuse ID fused in, why would we want to make it a standard to check ARMsilicon revision *and then* cross verify against control fuse verification, *and
then* give up saying we dont support it?

Quoted 5 lines
Quoted 2 lines

Looks like an over check for me -> IMHO, we should drop the MIDR checks entirely.

In the same context, for some boards in past even in the actual samples the CONTROL ID code was reading the older revision. So in those cases ARM revision will help to differentiate them.

which boards? Almost as a rule the first few samples on almost all revisions on production floor had messed up control ID, however, beyond that, all runs are properly updated.

Quoted 4 lines

But then it should have been in the opposite way, like reading the
CONTROL_CODE first and then reading the ARM revision if required in those cases where is it broken. I will change this logic here.

Having cortex check is just redundant - IMHO, switching it over might be better, but dropping it is more inline with expectation of the silicon spec.

Signature · 2 lines
Regards,
Nishanth Menon
#6 lore raw

PATCH v2 1/5 ARM: OMAP5: Add silicon id support for ES2.0 revision.

Hi,

Quoted 41 lines · Nishanth Menon
Quoted 40 lines · R Sricharan
Quoted 39 lines · Nishanth Menon
Quoted 22 lines · R Sricharan

Adding the CPU detection suport for OMAP5430 and
OMAP5432 ES2.0 SOCs.

---
  arch/arm/cpu/armv7/omap5/hwinit.c      |   13 +++++++++++--
  arch/arm/include/asm/arch-omap5/omap.h |    2 ++
  arch/arm/include/asm/armv7.h           |    1 +
  arch/arm/include/asm/omap_common.h     |    2 ++
  4 files changed, 16 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap5/hwinit.c +1 -2
index dfc0e44..0d8c95d 100644
@@ -216,8 +216,17 @@ void init_omap_revision(void)
  			break;
  		}
  		break;
-	default:
-		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+	case MIDR_CORTEX_A15_R2P2:

arch/arm/cpu/armv7/omap5/hwinit.c void init_omap_revision(void) · line 229

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hwinit.c +10 -0
+		switch (readl(CONTROL_ID_CODE)) {
+		case OMAP5430_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5430_ES2_0;
+			break;
+		case OMAP5432_CONTROL_ID_CODE_ES2_0:
+			*omap_si_rev = OMAP5432_ES2_0;
+			break;
+		default:
+			*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
+		}

A first few samples of both ES1.0 and ES2.0 (in the few 10s of samples) came with wrong efuse ID fused in, why would we want to make it a standard to check ARMsilicon revision *and then* cross verify against control fuse verification, *and
then* give up saying we dont support it?

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Looks like an over check for me -> IMHO, we should drop the MIDR checks entirely.

In the same context, for some boards in past even in the actual samples the CONTROL ID code was reading the older revision. So in those cases ARM revision will help to differentiate them.

which boards? Almost as a rule the first few samples on almost all revisions on production floor had messed up control ID, however, beyond that, all runs are properly updated.

Quoted 1 line

I have seen this issue on some OMAP4 revisions as well. It was only
after that we introduced this logic of double checking using ARM revision ID.

Quoted 7 lines
Quoted 3 lines

But then it should have been in the opposite way, like reading the
CONTROL_CODE first and then reading the ARM revision if required in those cases where is it broken. I will change this logic here.

Having cortex check is just redundant - IMHO, switching it over might be better, but dropping it is more inline with expectation of the silicon spec.

According to me the best way to do it is, use CONTROL_ID first and then use ARM revision for those which has wrong IDs. This will always be a fool proof even for those non-working boards.

Regards,
Sricharan

#7 lore raw

PATCH v2 2/5 ARM: OMAP5: clock: Add the prcm register changes required for ES2.0

In reply to R Sricharan

PRCM register addresses are changed from ES1.0 to ES2.0 due to PER power domain getting moved to CORE power domain.

So adding the nessecary register changes for the same.

---
 arch/arm/cpu/armv7/omap5/hw_data.c   |    5 +
 arch/arm/cpu/armv7/omap5/prcm-regs.c |  283 ++++++++++++++++++++++++++++++++++
 arch/arm/include/asm/omap_common.h   |    4 +
 3 files changed, 292 insertions(+)
arch/arm/cpu/armv7/omap5/hw_data.c +5 -0
index 6b039f5..e319dc5 100644
@@ -451,6 +451,11 @@ void hw_data_init(void)
 	*omap_vcores = &omap5432_volts;
 	break;
 
+	case OMAP5430_ES2_0:
+	case OMAP5432_ES2_0:
+	*prcm = &omap5_es2_prcm;
+	break;
+
 	default:
 		printf("\n INVALID OMAP REVISION ");
 	}
arch/arm/cpu/armv7/omap5/prcm-regs.c +283 -0

286 lines not on this page · raw message

arch/arm/include/asm/omap_common.h +4 -0
index 4599167..08395ca 100644
@@ -44,6 +44,8 @@ struct prcm_regs {
 	u32 cm_div_h12_dpll_core;
 	u32 cm_div_h13_dpll_core;
 	u32 cm_div_h14_dpll_core;
+	u32 cm_div_h21_dpll_core;
+	u32 cm_div_h24_dpll_core;
 	u32 cm_ssc_deltamstep_dpll_core;
 	u32 cm_ssc_modfreqdiv_dpll_core;
 	u32 cm_emu_override_dpll_core;
@@ -128,6 +130,7 @@ struct prcm_regs {
 	u32 cm_div_m3_dpll_per;
 	u32 cm_div_h11_dpll_per;
 	u32 cm_div_h12_dpll_per;
+	u32 cm_div_h13_dpll_per;
 	u32 cm_div_h14_dpll_per;
 	u32 cm_ssc_deltamstep_dpll_per;
 	u32 cm_ssc_modfreqdiv_dpll_per;
@@ -474,6 +477,7 @@ struct vcores_data {
 
 extern struct prcm_regs const **prcm;
 extern struct prcm_regs const omap5_es1_prcm;
+extern struct prcm_regs const omap5_es2_prcm;
 extern struct prcm_regs const omap4_prcm;
 extern struct dplls const **dplls_data;
 extern struct vcores_data const **omap_vcores;
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH v2 2/5 ARM: OMAP5: clock: Add the prcm register changes required for ES2.0

Quoted 6 lines · R Sricharan

PRCM register addresses are changed from ES1.0 to ES2.0 due to PER power domain getting moved to CORE power domain.

So adding the nessecary register changes for the same.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130204/b1bcd69d/attachment.pgp>
#9 lore raw

PATCH v2 3/5 ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

In reply to R Sricharan

Change OPP settings as per the latest 0.4 version of addendum for OMAP5430 ES2.0

---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |    4 +
 arch/arm/cpu/armv7/omap4/hw_data.c             |  142 +++++++-------
 arch/arm/cpu/armv7/omap5/hw_data.c             |  242 +++++++++++++++---------
 arch/arm/include/asm/arch-omap5/clocks.h       |    4 +
 arch/arm/include/asm/omap_common.h             |    6 +-
 5 files changed, 241 insertions(+), 157 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +4 -0
index 88e5336..164253c 100644
@@ -103,10 +103,14 @@ void setup_post_dividers(u32 const base, const struct dpll_params *params)
 		writel(params->m6_h13, &dpll_regs->cm_div_m6_h13_dpll);
 	if (params->m7_h14 >= 0)
 		writel(params->m7_h14, &dpll_regs->cm_div_m7_h14_dpll);
+	if (params->h21 >= 0)
+		writel(params->h21, &dpll_regs->cm_div_h21_dpll);
 	if (params->h22 >= 0)
 		writel(params->h22, &dpll_regs->cm_div_h22_dpll);
 	if (params->h23 >= 0)
 		writel(params->h23, &dpll_regs->cm_div_h23_dpll);
+	if (params->h24 >= 0)
+		writel(params->h24, &dpll_regs->cm_div_h24_dpll);
 }
 
 static inline void do_bypass_dpll(u32 const base)
arch/arm/cpu/armv7/omap4/hw_data.c +71 -71

184 lines not on this page · raw message

arch/arm/cpu/armv7/omap5/hw_data.c +157 -85

309 lines not on this page · raw message

arch/arm/include/asm/arch-omap5/clocks.h +4 -0
index 15362ae..685aad5 100644
@@ -208,6 +208,10 @@
 #define VDD_MM_5432	1150
 #define VDD_CORE_5432	1150
 
+#define VDD_MPU_ES2	1060
+#define VDD_MM_ES2	1025
+#define VDD_CORE_ES2	1040
+
 /* Standard offset is 0.5v expressed in uv */
 #define PALMAS_SMPS_BASE_VOLT_UV 500000
 
arch/arm/include/asm/omap_common.h +5 -1
index 08395ca..8a886ec 100644
@@ -426,8 +426,10 @@ struct dpll_params {
 	s8 m5_h12;
 	s8 m6_h13;
 	s8 m7_h14;
+	s8 h21;
 	s8 h22;
 	s8 h23;
+	s8 h24;
 };
 
 struct dpll_regs {
@@ -441,9 +443,11 @@ struct dpll_regs {
 	u32 cm_div_m5_h12_dpll;
 	u32 cm_div_m6_h13_dpll;
 	u32 cm_div_m7_h14_dpll;
-	u32 reserved[3];
+	u32 reserved[2];
+	u32 cm_div_h21_dpll;
 	u32 cm_div_h22_dpll;
 	u32 cm_div_h23_dpll;
+	u32 cm_div_h24_dpll;
 };
 
 struct dplls {
Signature · 1 line
1.7.9.5
#10 lore raw

PATCH v2 3/5 ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

Quoted 5 lines · R Sricharan

Change OPP settings as per the latest 0.4 version of addendum for OMAP5430 ES2.0

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130204/56a1569c/attachment.pgp>
#11 lore raw

PATCH v2 3/5 ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

In reply to R Sricharan
Quoted 2 lines · R Sricharan

Change OPP settings as per the latest 0.4 version of addendum for OMAP5430 ES2.0

-->please be clear that these are for OPP_NOM. FYI, latest documentation is 0.5 rev which was released in Jan, considering this patch was send in Feb, might be good to cross verify any updates.

in addition, I suspect TRM was referred for certain DPLLs as well?

Quoted 35 lines
---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |    4 +
 arch/arm/cpu/armv7/omap4/hw_data.c             |  142 +++++++-------
 arch/arm/cpu/armv7/omap5/hw_data.c             |  242 +++++++++++++++---------
 arch/arm/include/asm/arch-omap5/clocks.h       |    4 +
 arch/arm/include/asm/omap_common.h             |    6 +-
 5 files changed, 241 insertions(+), 157 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +4 -0
index 88e5336..164253c 100644
@@ -103,10 +103,14 @@ void setup_post_dividers(u32 const base, const struct dpll_params *params)
 		writel(params->m6_h13, &dpll_regs->cm_div_m6_h13_dpll);
 	if (params->m7_h14 >= 0)
 		writel(params->m7_h14, &dpll_regs->cm_div_m7_h14_dpll);
+	if (params->h21 >= 0)
+		writel(params->h21, &dpll_regs->cm_div_h21_dpll);
 	if (params->h22 >= 0)
 		writel(params->h22, &dpll_regs->cm_div_h22_dpll);
 	if (params->h23 >= 0)
 		writel(params->h23, &dpll_regs->cm_div_h23_dpll);
+	if (params->h24 >= 0)
+		writel(params->h24, &dpll_regs->cm_div_h24_dpll);
 }
 
 static inline void do_bypass_dpll(u32 const base)
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
index 892d016..b01bf5d 100644

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 52

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
@@ -51,113 +51,113 @@ struct omap_sys_ctrl_regs const **ctrl =
 
 /* dpll locked at 1400 MHz MPU clk at 700 MHz(OPP100) - DCC OFF */

this: equivalent to OPP_SB?

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
 static const struct dpll_params mpu_dpll_params_1400mhz[NUM_SYS_CLKS] = {
-	{175, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{700, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{401, 10, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{350, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{700, 26, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{638, 34, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 63

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{175, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{700, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{401, 10, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{350, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{700, 26, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{638, 34, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 /* dpll locked at 1584 MHz - MPU clk at 792 MHz(OPP Turbo 4430) */

Do we even support this? there is no OPP Turbo for OMAP5, we have OPP_HIGH which needs DCC and AVS etc..

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
 static const struct dpll_params mpu_dpll_params_1600mhz[NUM_SYS_CLKS] = {
-	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{800, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{619, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{800, 26, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{125, 5, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 74

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 /* dpll locked at 1200 MHz - MPU clk at 600 MHz */

Please correct this.

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 82

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
 static const struct dpll_params mpu_dpll_params_1200mhz[NUM_SYS_CLKS] = {
-	{50, 0, 1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{600, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{250, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{125, 3, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{300, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{200, 8, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{125, 7, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

Follow on question: if we are dropping ES1.0 support entirely - we should drop it's support in id detection as well! ES1.0 and ES2.0 DPLL configurations are different unfortunately.

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 85

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{50, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{600, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{250, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 3, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{300, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{200, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 static const struct dpll_params core_dpll_params_1600mhz[NUM_SYS_CLKS] = {

OPP_LOW is not supported on OMAP5 es2.0? Supported core DPLL locked frequency is 2127.36MHz?

Quoted 25 lines
arch/arm/cpu/armv7/omap4/hw_data.c +8 -14
-	{200, 2, 1, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{800, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{619, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{125, 2, 1, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{800, 26, 1, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{125, 5, 1, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{200, 2, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params core_dpll_params_es1_1524mhz[NUM_SYS_CLKS] = {
-	{127, 1, 1, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{762, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{635, 13, 1, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{635, 15, 1, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{381, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{254, 8, 1, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{496, 24, 1, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{127, 1, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 106

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +6 -0
+	{762, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{635, 13, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{635, 15, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{381, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{254, 8, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{496, 24, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params
 		core_dpll_params_es2_1600mhz_ddr200mhz[NUM_SYS_CLKS] = {

dumb question: what is running at 1600MHz?

Quoted 7 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
-	{200, 2, 2, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{800, 12, 2, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{619, 12, 2, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{125, 2, 2, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{400, 12, 2, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{800, 26, 2, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{125, 5, 2, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 116

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{200, 2, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params per_dpll_params_1536mhz[NUM_SYS_CLKS] = {

not sure about these frequencies if verified for ES2.0

Quoted 7 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
-	{64, 0, 8, 6, 12, 9, 4, 5, -1, -1},	/* 12 MHz   */
-	{768, 12, 8, 6, 12, 9, 4, 5, -1, -1},	/* 13 MHz   */
-	{320, 6, 8, 6, 12, 9, 4, 5, -1, -1},	/* 16.8 MHz */
-	{40, 0, 8, 6, 12, 9, 4, 5, -1, -1},	/* 19.2 MHz */
-	{384, 12, 8, 6, 12, 9, 4, 5, -1, -1},	/* 26 MHz   */
-	{256, 8, 8, 6, 12, 9, 4, 5, -1, -1},	/* 27 MHz   */
-	{20, 0, 8, 6, 12, 9, 4, 5, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 126

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{64, 0, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{768, 12, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{320, 6, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{40, 0, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{384, 12, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{256, 8, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{20, 0, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params iva_dpll_params_1862mhz[NUM_SYS_CLKS] = {

I might be mistaken, but i think the frequencies need an update?

Quoted 27 lines
arch/arm/cpu/armv7/omap4/hw_data.c +8 -14
-	{931, 11, -1, -1, 4, 7, -1, -1, -1, -1},	/* 12 MHz   */
-	{931, 12, -1, -1, 4, 7, -1, -1, -1, -1},	/* 13 MHz   */
-	{665, 11, -1, -1, 4, 7, -1, -1, -1, -1},	/* 16.8 MHz */
-	{727, 14, -1, -1, 4, 7, -1, -1, -1, -1},	/* 19.2 MHz */
-	{931, 25, -1, -1, 4, 7, -1, -1, -1, -1},	/* 26 MHz   */
-	{931, 26, -1, -1, 4, 7, -1, -1, -1, -1},	/* 27 MHz   */
-	{291, 11, -1, -1, 4, 7, -1, -1, -1, -1}		/* 38.4 MHz */
+	{931, 11, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{931, 12, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{665, 11, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{727, 14, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{931, 25, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{931, 26, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{291, 11, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 /* ABE M & N values with sys_clk as source */
 static const struct dpll_params
 		abe_dpll_params_sysclk_196608khz[NUM_SYS_CLKS] = {
-	{49, 5, 1, 1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{68, 8, 1, 1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{29, 7, 1, 1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{49, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 149

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +6 -0
+	{68, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{29, 7, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 /* ABE M & N values with 32K clock as source */
 static const struct dpll_params abe_dpll_params_32k_196608khz = {

We do not intend to support 32K ABE source except when doing DPLL cascading - so this is in effect an configuration which is un-used in any s/w line.

Quoted 27 lines
arch/arm/cpu/armv7/omap4/hw_data.c +8 -8
-	750, 0, 1, 1, -1, -1, -1, -1, -1, -1
+	750, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1
 };
 
 static const struct dpll_params usb_dpll_params_1920mhz[NUM_SYS_CLKS] = {
-	{80, 0, 2, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{960, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{50, 0, 2, -1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
-	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{320, 8, 2, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{25, 0, 2, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{80, 0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{960, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{50, 0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
+	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{320, 8, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{25, 0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 struct dplls omap4430_dplls_es1 = {
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
index e319dc5..13ea07e 100644

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 46

Quoted 3 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
@@ -44,134 +44,177 @@ struct omap_sys_ctrl_regs const **ctrl =
 	(struct omap_sys_ctrl_regs const **)OMAP5_SRAM_SCRATCH_SYS_CTRL;
 
 static const struct dpll_params mpu_dpll_params_1_5ghz[NUM_SYS_CLKS] = {

I am not sure we'd like to do this.

Quoted 7 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -7
-	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 56

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -0
+	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params mpu_dpll_params_2ghz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

Quoted 7 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -7
-	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 66

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -0
+	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params mpu_dpll_params_1100mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

Quoted 7 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -7
-	{275, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1375, 20, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{1375, 23, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{550, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{1375, 47, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 76

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -0
+	{275, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1375, 20, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{1375, 23, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{550, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{1375, 47, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params mpu_dpll_params_800mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

Quoted 7 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -7
-	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1000, 20, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{375, 8, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{375, 17, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 86

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -0
+	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1000, 20, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{375, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{375, 17, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params mpu_dpll_params_400mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

Quoted 178 lines
arch/arm/cpu/armv7/omap5/hw_data.c +92 -57
-	{200, 2, 2, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1000, 20, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{375, 8, 2, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{375, 17, 2, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{200, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1000, 20, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{375, 8, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{375, 17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params mpu_dpll_params_550mhz[NUM_SYS_CLKS] = {
-	{275, 2, 2, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1375, 20, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{1375, 23, 2, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{550, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{1375, 47, 2, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{275, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1375, 20, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{1375, 23, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{550, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{1375, 47, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params
 			core_dpll_params_2128mhz_ddr532[NUM_SYS_CLKS] = {
-	{266, 2, 2, 5, 8, 4, 62, 5, 5, 7},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{570, 8, 2, 5, 8, 4, 62, 5, 5, 7},		/* 16.8 MHz */
-	{665, 11, 2, 5, 8, 4, 62, 5, 5, 7},		/* 19.2 MHz */
-	{532, 12, 2, 5, 8, 4, 62, 5, 5, 7},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{665, 23, 2, 5, 8, 4, 62, 5, 5, 7}		/* 38.4 MHz */
+	{266, 2, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{570, 8, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 16.8 MHz */
+	{665, 11, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 19.2 MHz */
+	{532, 12, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{665, 23, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1}		/* 38.4 MHz */
+};
+
+static const struct dpll_params
+			core_dpll_params_2128mhz_ddr532_es2[NUM_SYS_CLKS] = {
+	{266, 2, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{443, 6, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 16.8 MHz */
+	{277, 4, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 19.2 MHz */
+	{368, 8, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{277, 9, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6}			/* 38.4 MHz */
 };
 
 static const struct dpll_params
 			core_dpll_params_2128mhz_ddr266[NUM_SYS_CLKS] = {
-	{266, 2, 4, 5, 8, 8, 62, 10, 10, 14},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{570, 8, 4, 5, 8, 8, 62, 10, 10, 14},		/* 16.8 MHz */
-	{665, 11, 4, 5, 8, 8, 62, 10, 10, 14},		/* 19.2 MHz */
-	{532, 12, 4, 8, 8, 8, 62, 10, 10, 14},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{665, 23, 4, 8, 8, 8, 62, 10, 10, 14}		/* 38.4 MHz */
+	{266, 2, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{570, 8, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 16.8 MHz */
+	{665, 11, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 19.2 MHz */
+	{532, 12, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{665, 23, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1}		/* 38.4 MHz */
+};
+
+static const struct dpll_params
+			core_dpll_params_2128mhz_ddr266_es2[NUM_SYS_CLKS] = {
+	{266, 2, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{443, 6, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 16.8 MHz */
+	{277, 4, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 19.2 MHz */
+	{368, 8, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{277, 9, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12}		/* 38.4 MHz */
 };
 
 static const struct dpll_params per_dpll_params_768mhz[NUM_SYS_CLKS] = {
-	{32, 0, 4, 3, 6, 4, -1, 2, -1, -1},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{160, 6, 4, 3, 6, 4, -1, 2, -1, -1},		/* 16.8 MHz */
-	{20, 0, 4, 3, 6, 4, -1, 2, -1, -1},		/* 19.2 MHz */
-	{192, 12, 4, 3, 6, 4, -1, 2, -1, -1},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{10, 0, 4, 3, 6, 4, -1, 2, -1, -1}		/* 38.4 MHz */
+	{32, 0, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{160, 6, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 16.8 MHz */
+	{20, 0, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 19.2 MHz */
+	{192, 12, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{10, 0, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1}		/* 38.4 MHz */
+};
+
+static const struct dpll_params per_dpll_params_768mhz_es2[NUM_SYS_CLKS] = {
+	{32, 0, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{160, 6, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 16.8 MHz */
+	{20, 0, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 19.2 MHz */
+	{192, 12, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{10, 0, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 static const struct dpll_params iva_dpll_params_2330mhz[NUM_SYS_CLKS] = {
-	{1165, 11, -1, -1, 5, 6, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{2011, 28, -1, -1, 5, 6, -1, -1, -1, -1},	/* 16.8 MHz */
-	{1881, 30, -1, -1, 5, 6, -1, -1, -1, -1},	/* 19.2 MHz */
-	{1165, 25, -1, -1, 5, 6, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{1972, 64, -1, -1, 5, 6, -1, -1, -1, -1}	/* 38.4 MHz */
+	{1165, 11, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{2011, 28, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{1881, 30, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{1165, 25, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{1972, 64, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+};
+
+static const struct dpll_params iva_dpll_params_2330mhz_es2[NUM_SYS_CLKS] = {
+	{1165, 11, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{208, 2, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},		/* 16.8 MHz */
+	{182, 2, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
+	{224, 4, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{91, 2, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 /* ABE M & N values with sys_clk as source */
 static const struct dpll_params
 		abe_dpll_params_sysclk_196608khz[NUM_SYS_CLKS] = {
-	{49, 5, 1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1},		/* 16.8 MHz */
-	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
-	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{49, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 16.8 MHz */
+	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
+	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 /* ABE M & N values with 32K clock as source */
 static const struct dpll_params abe_dpll_params_32k_196608khz = {
-	750, 0, 1, 1, -1, -1, -1, -1, -1, -1
+	750, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1
 };
 
 static const struct dpll_params usb_dpll_params_1920mhz[NUM_SYS_CLKS] = {
-	{400, 4, 2, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{400, 7, 2, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{400, 15, 2, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 217

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +8 -0
+	{400, 4, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{400, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{400, 15, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
+

spurious EOL

Quoted 7 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
 struct dplls omap5_dplls_es1 = {
 	.mpu = mpu_dpll_params_800mhz,
 	.core = core_dpll_params_2128mhz_ddr532,
@@ -185,6 +228,19 @@ struct dplls omap5_dplls_es1 = {
 	.usb = usb_dpll_params_1920mhz
 };
 

arch/arm/cpu/armv7/omap5/hw_data.c struct dplls omap5_dplls_es1 = { · line 240

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +10 -0
+struct dplls omap5_dplls_es2 = {
+	.mpu = mpu_dpll_params_1100mhz,
+	.core = core_dpll_params_2128mhz_ddr532_es2,
+	.per = per_dpll_params_768mhz_es2,
+	.iva = iva_dpll_params_2330mhz_es2,
+#ifdef CONFIG_SYS_OMAP_ABE_SYSCK
+	.abe = abe_dpll_params_sysclk_196608khz,
+#else
+	.abe = &abe_dpll_params_32k_196608khz,
+#endif

I strongly suggest dumping ABE sourcing from 32K clock - the code is just a nuisance waiting to exercise an unsupported silicon feature waiting to happen.

Quoted 41 lines
arch/arm/cpu/armv7/omap5/hw_data.c +19 -0
+	.usb = usb_dpll_params_1920mhz
+};
+
 struct pmic_data palmas = {
 	.base_offset = PALMAS_SMPS_BASE_VOLT_UV,
 	.step = 10000, /* 10 mV represented in uV */
@@ -223,6 +279,20 @@ struct vcores_data omap5432_volts = {
 	.mm.pmic = &palmas,
 };
 
+struct vcores_data omap5430_volts_es2 = {
+	.mpu.value = VDD_MPU_ES2,
+	.mpu.addr = SMPS_REG_ADDR_12_MPU,
+	.mpu.pmic = &palmas,
+
+	.core.value = VDD_CORE_ES2,
+	.core.addr = SMPS_REG_ADDR_8_CORE,
+	.core.pmic = &palmas,
+
+	.mm.value = VDD_MM_ES2,
+	.mm.addr = SMPS_REG_ADDR_45_IVA,
+	.mm.pmic = &palmas,
+};
+
 /*
  * Enable essential clock domains, modules and
  * do some additional special settings needed
@@ -454,6 +524,8 @@ void hw_data_init(void)
 	case OMAP5430_ES2_0:
 	case OMAP5432_ES2_0:
 	*prcm = &omap5_es2_prcm;
+	*dplls_data = &omap5_dplls_es2;
+	*omap_vcores = &omap5430_volts_es2;
 	break;
 
 	default:
arch/arm/include/asm/arch-omap5/clocks.h +0 -0
index 15362ae..685aad5 100644

arch/arm/include/asm/arch-omap5/clocks.h line 213

Quoted 6 lines
arch/arm/include/asm/arch-omap5/clocks.h +3 -0
@@ -208,6 +208,10 @@
 #define VDD_MM_5432	1150
 #define VDD_CORE_5432	1150
 
+#define VDD_MPU_ES2	1060
+#define VDD_MM_ES2	1025
+#define VDD_CORE_ES2	1040

^^^ these are meant only for OPP_NOM - considering that you have DPLLs for OPP_SB added in, do you even expect these devices to bootup at anything *but* OPP_NOM??

Quoted 22 lines
arch/arm/include/asm/arch-omap5/clocks.h +1 -0
+
 /* Standard offset is 0.5v expressed in uv */
 #define PALMAS_SMPS_BASE_VOLT_UV 500000
 
arch/arm/include/asm/omap_common.h +2 -0
index 08395ca..8a886ec 100644
@@ -426,8 +426,10 @@ struct dpll_params {
 	s8 m5_h12;
 	s8 m6_h13;
 	s8 m7_h14;
+	s8 h21;
 	s8 h22;
 	s8 h23;
+	s8 h24;
 };
 
 struct dpll_regs {
@@ -441,9 +443,11 @@ struct dpll_regs {
 	u32 cm_div_m5_h12_dpll;
 	u32 cm_div_m6_h13_dpll;

arch/arm/include/asm/omap_common.h struct dpll_regs { · line 453

Quoted 10 lines
arch/arm/include/asm/omap_common.h +3 -1
 	u32 cm_div_m7_h14_dpll;
-	u32 reserved[3];
+	u32 reserved[2];
+	u32 cm_div_h21_dpll;
 	u32 cm_div_h22_dpll;
 	u32 cm_div_h23_dpll;
+	u32 cm_div_h24_dpll;
 };
 
 struct dplls {

Sadly Naked-by: Nishanth Menon <[email protected]>

Signature · 2 lines
Regards,
Nishanth Menon
#12 lore raw

PATCH v2 3/5 ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

Hi Nishanth,

Quoted 7 lines · Nishanth Menon
Quoted 2 lines · R Sricharan

Change OPP settings as per the latest 0.4 version of addendum for OMAP5430 ES2.0

-->please be clear that these are for OPP_NOM. FYI, latest documentation is 0.5 rev which was released in Jan, considering this patch was send in Feb, might be good to cross verify any updates.

Thanks for the info, i was not aware of 0.5 version. I will recheck if something is different here.

Quoted 127 lines

in addition, I suspect TRM was referred for certain DPLLs as well?

Quoted 35 lines
---
  arch/arm/cpu/armv7/omap-common/clocks-common.c |    4 +
  arch/arm/cpu/armv7/omap4/hw_data.c             |  142 +++++++-------
  arch/arm/cpu/armv7/omap5/hw_data.c             |  242 +++++++++++++++---------
  arch/arm/include/asm/arch-omap5/clocks.h       |    4 +
  arch/arm/include/asm/omap_common.h             |    6 +-
  5 files changed, 241 insertions(+), 157 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +4 -0
index 88e5336..164253c 100644
@@ -103,10 +103,14 @@ void setup_post_dividers(u32 const base, const struct dpll_params *params)
  		writel(params->m6_h13, &dpll_regs->cm_div_m6_h13_dpll);
  	if (params->m7_h14 >= 0)
  		writel(params->m7_h14, &dpll_regs->cm_div_m7_h14_dpll);
+	if (params->h21 >= 0)
+		writel(params->h21, &dpll_regs->cm_div_h21_dpll);
  	if (params->h22 >= 0)
  		writel(params->h22, &dpll_regs->cm_div_h22_dpll);
  	if (params->h23 >= 0)
  		writel(params->h23, &dpll_regs->cm_div_h23_dpll);
+	if (params->h24 >= 0)
+		writel(params->h24, &dpll_regs->cm_div_h24_dpll);
  }
 
  static inline void do_bypass_dpll(u32 const base)
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
index 892d016..b01bf5d 100644

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 52

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
@@ -51,113 +51,113 @@ struct omap_sys_ctrl_regs const **ctrl =
 
  /* dpll locked at 1400 MHz MPU clk at 700 MHz(OPP100) - DCC OFF */

this: equivalent to OPP_SB?

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
  static const struct dpll_params mpu_dpll_params_1400mhz[NUM_SYS_CLKS] = {
-	{175, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{700, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{401, 10, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{350, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{700, 26, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{638, 34, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 63

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{175, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{700, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{401, 10, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{350, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{700, 26, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{638, 34, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
  /* dpll locked at 1584 MHz - MPU clk at 792 MHz(OPP Turbo 4430) */

Do we even support this? there is no OPP Turbo for OMAP5, we have OPP_HIGH which needs DCC and AVS etc..

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
  static const struct dpll_params mpu_dpll_params_1600mhz[NUM_SYS_CLKS] = {
-	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{800, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{619, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{800, 26, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{125, 5, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 74

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  /* dpll locked at 1200 MHz - MPU clk at 600 MHz */

Please correct this.

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 82

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
  static const struct dpll_params mpu_dpll_params_1200mhz[NUM_SYS_CLKS] = {
-	{50, 0, 1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{600, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{250, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{125, 3, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{300, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{200, 8, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{125, 7, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

Follow on question: if we are dropping ES1.0 support entirely - we should drop it's support in id detection as well! ES1.0 and ES2.0 DPLL configurations are different unfortunately.

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 85

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{50, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{600, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{250, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 3, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{300, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{200, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  static const struct dpll_params core_dpll_params_1600mhz[NUM_SYS_CLKS] = {

OPP_LOW is not supported on OMAP5 es2.0? Supported core DPLL locked frequency is 2127.36MHz?

Quoted 25 lines
arch/arm/cpu/armv7/omap4/hw_data.c +8 -14
-	{200, 2, 1, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{800, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{619, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{125, 2, 1, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{800, 26, 1, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{125, 5, 1, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{200, 2, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
  static const struct dpll_params core_dpll_params_es1_1524mhz[NUM_SYS_CLKS] = {
-	{127, 1, 1, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{762, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{635, 13, 1, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{635, 15, 1, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{381, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{254, 8, 1, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{496, 24, 1, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{127, 1, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
Quoted 8 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 104

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +6 -0
+	{762, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{635, 13, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{635, 15, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{381, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{254, 8, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{496, 24, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 

Answering all of your above questions here.
The above data is for OMAP4 and not OMAP5. This file was modified here just to include dummy dividers. Because we were now using a common dpll_params structure, there was no functional change in this file. I think the problem was commit log was missing this info.
I will update to clarify this.

Quoted 3 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 106

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
  static const struct dpll_params
  		core_dpll_params_es2_1600mhz_ddr200mhz[NUM_SYS_CLKS] = {

dumb question: what is running at 1600MHz?

DPLL_CORE is locked at 1600 MHz in OMAP4

Quoted 16 lines
Quoted 16 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -7
-	{200, 2, 2, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{800, 12, 2, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{619, 12, 2, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{125, 2, 2, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{400, 12, 2, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{800, 26, 2, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{125, 5, 2, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{200, 2, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 2, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 2 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 116

Quoted 1 line
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
  static const struct dpll_params per_dpll_params_1536mhz[NUM_SYS_CLKS] = {

not sure about these frequencies if verified for ES2.0

Again this is OMAP4 frequency

Quoted 53 lines
Quoted 7 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
-	{64, 0, 8, 6, 12, 9, 4, 5, -1, -1},	/* 12 MHz   */
-	{768, 12, 8, 6, 12, 9, 4, 5, -1, -1},	/* 13 MHz   */
-	{320, 6, 8, 6, 12, 9, 4, 5, -1, -1},	/* 16.8 MHz */
-	{40, 0, 8, 6, 12, 9, 4, 5, -1, -1},	/* 19.2 MHz */
-	{384, 12, 8, 6, 12, 9, 4, 5, -1, -1},	/* 26 MHz   */
-	{256, 8, 8, 6, 12, 9, 4, 5, -1, -1},	/* 27 MHz   */
-	{20, 0, 8, 6, 12, 9, 4, 5, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 126

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{64, 0, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{768, 12, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{320, 6, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{40, 0, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{384, 12, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{256, 8, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{20, 0, 8, 6, 12, 9, 4, 5, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
  static const struct dpll_params iva_dpll_params_1862mhz[NUM_SYS_CLKS] = {

I might be mistaken, but i think the frequencies need an update?

Quoted 35 lines
arch/arm/cpu/armv7/omap4/hw_data.c +14 -14
-	{931, 11, -1, -1, 4, 7, -1, -1, -1, -1},	/* 12 MHz   */
-	{931, 12, -1, -1, 4, 7, -1, -1, -1, -1},	/* 13 MHz   */
-	{665, 11, -1, -1, 4, 7, -1, -1, -1, -1},	/* 16.8 MHz */
-	{727, 14, -1, -1, 4, 7, -1, -1, -1, -1},	/* 19.2 MHz */
-	{931, 25, -1, -1, 4, 7, -1, -1, -1, -1},	/* 26 MHz   */
-	{931, 26, -1, -1, 4, 7, -1, -1, -1, -1},	/* 27 MHz   */
-	{291, 11, -1, -1, 4, 7, -1, -1, -1, -1}		/* 38.4 MHz */
+	{931, 11, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{931, 12, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{665, 11, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{727, 14, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{931, 25, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{931, 26, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{291, 11, -1, -1, 4, 7, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  /* ABE M & N values with sys_clk as source */
  static const struct dpll_params
  		abe_dpll_params_sysclk_196608khz[NUM_SYS_CLKS] = {
-	{49, 5, 1, 1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{68, 8, 1, 1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{29, 7, 1, 1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{49, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{68, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{29, 7, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 5 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 149

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
  /* ABE M & N values with 32K clock as source */
  static const struct dpll_params abe_dpll_params_32k_196608khz = {

We do not intend to support 32K ABE source except when doing DPLL cascading - so this is in effect an configuration which is un-used in any s/w line.

1) In fact we not locking ABE, IVA, USB DPLLs any more in bootloader unless some one enable a CLOCKS_ENABLE_ALL config.
But we still have there data, so that we can quickly experiment when needed.

2) I remember that locking with 32K source was considered better because, we can cut sys_clk when audio is still running. Also i think that the jitter was not a real problem for audio even when running with 32Khz clock. I have to check this point again.

The reason we had both the sources supported was just from an experiment motive. I have seen that during pre silicon, we have to switch the clock source from default to get locking. So having support for both helps in those cases.

Quoted 29 lines
Quoted 29 lines
arch/arm/cpu/armv7/omap4/hw_data.c +8 -8
-	750, 0, 1, 1, -1, -1, -1, -1, -1, -1
+	750, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1
  };
 
  static const struct dpll_params usb_dpll_params_1920mhz[NUM_SYS_CLKS] = {
-	{80, 0, 2, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{960, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{50, 0, 2, -1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
-	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{320, 8, 2, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{25, 0, 2, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{80, 0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{960, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{50, 0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
+	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{320, 8, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{25, 0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  struct dplls omap4430_dplls_es1 = {
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
index e319dc5..13ea07e 100644
@@ -44,134 +44,177 @@ struct omap_sys_ctrl_regs const **ctrl =
  	(struct omap_sys_ctrl_regs const **)OMAP5_SRAM_SCRATCH_SYS_CTRL;
 
Quoted 2 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 46

Quoted 1 line
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
  static const struct dpll_params mpu_dpll_params_1_5ghz[NUM_SYS_CLKS] = {

I am not sure we'd like to do this.

This file is common for ES1.0 as well. Also i have added frequency tables for OPP_HIGH and OPP_LOW as well. We some times find it nessecary to boot with a different than OPP_NOM to do experiments. So this is useful from that point. But what is missing is the VDDs which I usually add manually while testing. But now to complete
this, i will add that as well.

Quoted 16 lines
Quoted 16 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -7
-	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 2 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 56

Quoted 1 line
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
  static const struct dpll_params mpu_dpll_params_2ghz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

This file is common for ES1.0 as well.

Quoted 16 lines
Quoted 16 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -7
-	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 2 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 66

Quoted 1 line
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
  static const struct dpll_params mpu_dpll_params_1100mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

MPU runs at 1100 MHZ in OPP_NOM on 2.0

Quoted 16 lines
Quoted 16 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -7
-	{275, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1375, 20, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{1375, 23, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{550, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{1375, 47, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{275, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1375, 20, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{1375, 23, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{550, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{1375, 47, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 2 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 76

Quoted 1 line
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
  static const struct dpll_params mpu_dpll_params_800mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

MPU runs at 800 MHZ in OPP_NOM on 1.0

Quoted 16 lines
Quoted 16 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -7
-	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1000, 20, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{375, 8, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{375, 17, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1000, 20, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{375, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{375, 17, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 2 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 86

Quoted 1 line
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
  static const struct dpll_params mpu_dpll_params_400mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

MPU runs at 400 MHZ in OPP_LOW on 1.0

Quoted 187 lines
Quoted 187 lines
arch/arm/cpu/armv7/omap5/hw_data.c +99 -57
-	{200, 2, 2, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1000, 20, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{375, 8, 2, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{375, 17, 2, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{200, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1000, 20, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{375, 8, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{375, 17, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
  static const struct dpll_params mpu_dpll_params_550mhz[NUM_SYS_CLKS] = {
-	{275, 2, 2, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{1375, 20, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{1375, 23, 2, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{550, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{1375, 47, 2, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{275, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{1375, 20, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{1375, 23, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{550, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{1375, 47, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
  static const struct dpll_params
  			core_dpll_params_2128mhz_ddr532[NUM_SYS_CLKS] = {
-	{266, 2, 2, 5, 8, 4, 62, 5, 5, 7},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{570, 8, 2, 5, 8, 4, 62, 5, 5, 7},		/* 16.8 MHz */
-	{665, 11, 2, 5, 8, 4, 62, 5, 5, 7},		/* 19.2 MHz */
-	{532, 12, 2, 5, 8, 4, 62, 5, 5, 7},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{665, 23, 2, 5, 8, 4, 62, 5, 5, 7}		/* 38.4 MHz */
+	{266, 2, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{570, 8, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 16.8 MHz */
+	{665, 11, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 19.2 MHz */
+	{532, 12, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{665, 23, 2, 5, 8, 4, 62, 5, -1, 5, 7, -1}		/* 38.4 MHz */
+};
+
+static const struct dpll_params
+			core_dpll_params_2128mhz_ddr532_es2[NUM_SYS_CLKS] = {
+	{266, 2, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{443, 6, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 16.8 MHz */
+	{277, 4, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 19.2 MHz */
+	{368, 8, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{277, 9, 2, 5, 8, 4, 62, 5, 6, 5, 7, 6}			/* 38.4 MHz */
  };
 
  static const struct dpll_params
  			core_dpll_params_2128mhz_ddr266[NUM_SYS_CLKS] = {
-	{266, 2, 4, 5, 8, 8, 62, 10, 10, 14},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{570, 8, 4, 5, 8, 8, 62, 10, 10, 14},		/* 16.8 MHz */
-	{665, 11, 4, 5, 8, 8, 62, 10, 10, 14},		/* 19.2 MHz */
-	{532, 12, 4, 8, 8, 8, 62, 10, 10, 14},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{665, 23, 4, 8, 8, 8, 62, 10, 10, 14}		/* 38.4 MHz */
+	{266, 2, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{570, 8, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 16.8 MHz */
+	{665, 11, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 19.2 MHz */
+	{532, 12, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{665, 23, 4, 8, 8, 8, 62, 10, -1, 10, 14, -1}		/* 38.4 MHz */
+};
+
+static const struct dpll_params
+			core_dpll_params_2128mhz_ddr266_es2[NUM_SYS_CLKS] = {
+	{266, 2, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{443, 6, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 16.8 MHz */
+	{277, 4, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 19.2 MHz */
+	{368, 8, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{277, 9, 4, 8, 8, 8, 62, 5, 12, 10, 14, 12}		/* 38.4 MHz */
  };
 
  static const struct dpll_params per_dpll_params_768mhz[NUM_SYS_CLKS] = {
-	{32, 0, 4, 3, 6, 4, -1, 2, -1, -1},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{160, 6, 4, 3, 6, 4, -1, 2, -1, -1},		/* 16.8 MHz */
-	{20, 0, 4, 3, 6, 4, -1, 2, -1, -1},		/* 19.2 MHz */
-	{192, 12, 4, 3, 6, 4, -1, 2, -1, -1},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{10, 0, 4, 3, 6, 4, -1, 2, -1, -1}		/* 38.4 MHz */
+	{32, 0, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{160, 6, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 16.8 MHz */
+	{20, 0, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 19.2 MHz */
+	{192, 12, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{10, 0, 4, 3, 6, 4, -1, 2, -1, -1, -1, -1}		/* 38.4 MHz */
+};
+
+static const struct dpll_params per_dpll_params_768mhz_es2[NUM_SYS_CLKS] = {
+	{32, 0, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{160, 6, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 16.8 MHz */
+	{20, 0, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 19.2 MHz */
+	{192, 12, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{10, 0, 4, 3, 3, 4, -1, 2, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  static const struct dpll_params iva_dpll_params_2330mhz[NUM_SYS_CLKS] = {
-	{1165, 11, -1, -1, 5, 6, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{2011, 28, -1, -1, 5, 6, -1, -1, -1, -1},	/* 16.8 MHz */
-	{1881, 30, -1, -1, 5, 6, -1, -1, -1, -1},	/* 19.2 MHz */
-	{1165, 25, -1, -1, 5, 6, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{1972, 64, -1, -1, 5, 6, -1, -1, -1, -1}	/* 38.4 MHz */
+	{1165, 11, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{2011, 28, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{1881, 30, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{1165, 25, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{1972, 64, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+};
+
+static const struct dpll_params iva_dpll_params_2330mhz_es2[NUM_SYS_CLKS] = {
+	{1165, 11, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{208, 2, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},		/* 16.8 MHz */
+	{182, 2, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
+	{224, 4, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{91, 2, -1, -1, 5, 6, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  /* ABE M & N values with sys_clk as source */
  static const struct dpll_params
  		abe_dpll_params_sysclk_196608khz[NUM_SYS_CLKS] = {
-	{49, 5, 1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1},		/* 16.8 MHz */
-	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
-	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1},		/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
+	{49, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{35, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 16.8 MHz */
+	{46, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 19.2 MHz */
+	{34, 8, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{64, 24, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
  };
 
  /* ABE M & N values with 32K clock as source */
  static const struct dpll_params abe_dpll_params_32k_196608khz = {
-	750, 0, 1, 1, -1, -1, -1, -1, -1, -1
+	750, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1
  };
 
  static const struct dpll_params usb_dpll_params_1920mhz[NUM_SYS_CLKS] = {
-	{400, 4, 2, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{400, 7, 2, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{400, 15, 2, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{400, 4, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{400, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{400, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{480, 12, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{400, 15, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
 
Quoted 2 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 217

Quoted 1 line
arch/arm/cpu/armv7/omap5/hw_data.c +1 -0
+

spurious EOL

Ok, will correct this.

Quoted 65 lines
Quoted 7 lines
arch/arm/cpu/armv7/omap5/hw_data.c +0 -0
  struct dplls omap5_dplls_es1 = {
  	.mpu = mpu_dpll_params_800mhz,
  	.core = core_dpll_params_2128mhz_ddr532,
@@ -185,6 +228,19 @@ struct dplls omap5_dplls_es1 = {
  	.usb = usb_dpll_params_1920mhz
  };
 

arch/arm/cpu/armv7/omap5/hw_data.c struct dplls omap5_dplls_es1 = { · line 240

Quoted 10 lines
arch/arm/cpu/armv7/omap5/hw_data.c +10 -0
+struct dplls omap5_dplls_es2 = {
+	.mpu = mpu_dpll_params_1100mhz,
+	.core = core_dpll_params_2128mhz_ddr532_es2,
+	.per = per_dpll_params_768mhz_es2,
+	.iva = iva_dpll_params_2330mhz_es2,
+#ifdef CONFIG_SYS_OMAP_ABE_SYSCK
+	.abe = abe_dpll_params_sysclk_196608khz,
+#else
+	.abe = &abe_dpll_params_32k_196608khz,
+#endif

I strongly suggest dumping ABE sourcing from 32K clock - the code is just a nuisance waiting to exercise an unsupported silicon feature waiting to happen.

Quoted 44 lines
arch/arm/cpu/armv7/omap5/hw_data.c +19 -0
+	.usb = usb_dpll_params_1920mhz
+};
+
  struct pmic_data palmas = {
  	.base_offset = PALMAS_SMPS_BASE_VOLT_UV,
  	.step = 10000, /* 10 mV represented in uV */
@@ -223,6 +279,20 @@ struct vcores_data omap5432_volts = {
  	.mm.pmic = &palmas,
  };
 
+struct vcores_data omap5430_volts_es2 = {
+	.mpu.value = VDD_MPU_ES2,
+	.mpu.addr = SMPS_REG_ADDR_12_MPU,
+	.mpu.pmic = &palmas,
+
+	.core.value = VDD_CORE_ES2,
+	.core.addr = SMPS_REG_ADDR_8_CORE,
+	.core.pmic = &palmas,
+
+	.mm.value = VDD_MM_ES2,
+	.mm.addr = SMPS_REG_ADDR_45_IVA,
+	.mm.pmic = &palmas,
+};
+
  /*
   * Enable essential clock domains, modules and
   * do some additional special settings needed
@@ -454,6 +524,8 @@ void hw_data_init(void)
  	case OMAP5430_ES2_0:
  	case OMAP5432_ES2_0:
  	*prcm = &omap5_es2_prcm;
+	*dplls_data = &omap5_dplls_es2;
+	*omap_vcores = &omap5430_volts_es2;
  	break;
 
  	default:
arch/arm/include/asm/arch-omap5/clocks.h +0 -0
index 15362ae..685aad5 100644
@@ -208,6 +208,10 @@
  #define VDD_MM_5432	1150
  #define VDD_CORE_5432	1150
 
Quoted 6 lines

arch/arm/include/asm/arch-omap5/clocks.h line 213

Quoted 3 lines
arch/arm/include/asm/arch-omap5/clocks.h +3 -0
+#define VDD_MPU_ES2	1060
+#define VDD_MM_ES2	1025
+#define VDD_CORE_ES2	1040

^^^ these are meant only for OPP_NOM - considering that you have DPLLs for OPP_SB added in, do you even expect these devices to bootup at anything *but* OPP_NOM??

I agree. I add it manually while doing experiments. I will add these here.

Regards,
Sricharan

#13 lore raw

PATCH v2 3/5 ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

Quoted 147 lines · R Sricharan

Hi Nishanth,

Quoted 7 lines · Nishanth Menon
Quoted 2 lines · R Sricharan

Change OPP settings as per the latest 0.4 version of addendum for OMAP5430 ES2.0

-->please be clear that these are for OPP_NOM. FYI, latest documentation is 0.5 rev which was released in Jan, considering this patch was send in Feb, might be good to cross verify any updates.

Thanks for the info, i was not aware of 0.5 version. I will recheck if something is different here.

Quoted 133 lines

in addition, I suspect TRM was referred for certain DPLLs as well?

Quoted 35 lines
---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |    4 +
 arch/arm/cpu/armv7/omap4/hw_data.c             |  142 +++++++-------
 arch/arm/cpu/armv7/omap5/hw_data.c             |  242 +++++++++++++++---------
 arch/arm/include/asm/arch-omap5/clocks.h       |    4 +
 arch/arm/include/asm/omap_common.h             |    6 +-
 5 files changed, 241 insertions(+), 157 deletions(-)
arch/arm/cpu/armv7/omap-common/clocks-common.c +4 -0
index 88e5336..164253c 100644
@@ -103,10 +103,14 @@ void setup_post_dividers(u32 const base, const struct dpll_params *params)
 		writel(params->m6_h13, &dpll_regs->cm_div_m6_h13_dpll);
 	if (params->m7_h14 >= 0)
 		writel(params->m7_h14, &dpll_regs->cm_div_m7_h14_dpll);
+	if (params->h21 >= 0)
+		writel(params->h21, &dpll_regs->cm_div_h21_dpll);
 	if (params->h22 >= 0)
 		writel(params->h22, &dpll_regs->cm_div_h22_dpll);
 	if (params->h23 >= 0)
 		writel(params->h23, &dpll_regs->cm_div_h23_dpll);
+	if (params->h24 >= 0)
+		writel(params->h24, &dpll_regs->cm_div_h24_dpll);
 }
 
 static inline void do_bypass_dpll(u32 const base)
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
index 892d016..b01bf5d 100644

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 52

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
@@ -51,113 +51,113 @@ struct omap_sys_ctrl_regs const **ctrl =
 
 /* dpll locked at 1400 MHz MPU clk at 700 MHz(OPP100) - DCC OFF */

this: equivalent to OPP_SB?

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
 static const struct dpll_params mpu_dpll_params_1400mhz[NUM_SYS_CLKS] = {
-	{175, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{700, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{401, 10, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{350, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{700, 26, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{638, 34, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 63

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{175, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{700, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{401, 10, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{350, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{700, 26, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{638, 34, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 /* dpll locked at 1584 MHz - MPU clk at 792 MHz(OPP Turbo 4430) */

Do we even support this? there is no OPP Turbo for OMAP5, we have OPP_HIGH which needs DCC and AVS etc..

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
 static const struct dpll_params mpu_dpll_params_1600mhz[NUM_SYS_CLKS] = {
-	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{800, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{619, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{800, 26, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{125, 5, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 74

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{200, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 /* dpll locked at 1200 MHz - MPU clk at 600 MHz */

Please correct this.

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 82

Quoted 8 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -7
 static const struct dpll_params mpu_dpll_params_1200mhz[NUM_SYS_CLKS] = {
-	{50, 0, 1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
-	{600, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{250, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{125, 3, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{300, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{200, 8, 1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{125, 7, 1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */

Follow on question: if we are dropping ES1.0 support entirely - we should drop it's support in id detection as well! ES1.0 and ES2.0 DPLL configurations are different unfortunately.

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 85

Quoted 10 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -0
+	{50, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},		/* 12 MHz   */
+	{600, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{250, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 3, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{300, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{200, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}		/* 38.4 MHz */
 };
 
 static const struct dpll_params core_dpll_params_1600mhz[NUM_SYS_CLKS] = {

OPP_LOW is not supported on OMAP5 es2.0? Supported core DPLL locked frequency is 2127.36MHz?

Quoted 31 lines
arch/arm/cpu/armv7/omap4/hw_data.c +14 -14
-	{200, 2, 1, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{800, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{619, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{125, 2, 1, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{400, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{800, 26, 1, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{125, 5, 1, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{200, 2, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{800, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{619, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{125, 2, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{400, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{800, 26, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{125, 5, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
 static const struct dpll_params core_dpll_params_es1_1524mhz[NUM_SYS_CLKS] = {
-	{127, 1, 1, 5, 8, 4, 6, 5, -1, -1},	/* 12 MHz   */
-	{762, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 13 MHz   */
-	{635, 13, 1, 5, 8, 4, 6, 5, -1, -1},	/* 16.8 MHz */
-	{635, 15, 1, 5, 8, 4, 6, 5, -1, -1},	/* 19.2 MHz */
-	{381, 12, 1, 5, 8, 4, 6, 5, -1, -1},	/* 26 MHz   */
-	{254, 8, 1, 5, 8, 4, 6, 5, -1, -1},	/* 27 MHz   */
-	{496, 24, 1, 5, 8, 4, 6, 5, -1, -1}	/* 38.4 MHz */
+	{127, 1, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 12 MHz   */
+	{762, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 13 MHz   */
+	{635, 13, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 16.8 MHz */
+	{635, 15, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 19.2 MHz */
+	{381, 12, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 26 MHz   */
+	{254, 8, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1},	/* 27 MHz   */
+	{496, 24, 1, 5, 8, 4, 6, 5, -1, -1, -1, -1}	/* 38.4 MHz */
Quoted 8 lines
Quoted 2 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 104

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
 };
 

Answering all of your above questions here.
The above data is for OMAP4 and not OMAP5. This file was modified here just to include dummy dividers. Because we were now using a common dpll_params structure, there was no functional change in this file. I think the problem was commit log was missing this info.
I will update to clarify this.

I dont think updating commit log alone is the right solution -> renaming the variables make more sense - making ones meant for OMAP4 as _omap4430, 60 etc help readability of code.
[...]

Quoted 10 lines
Quoted 5 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 106

Quoted 2 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
 /* ABE M & N values with 32K clock as source */
 static const struct dpll_params abe_dpll_params_32k_196608khz = {

We do not intend to support 32K ABE source except when doing DPLL cascading - so this is in effect an configuration which is un-used in any s/w line.

1) In fact we not locking ABE, IVA, USB DPLLs any more in bootloader unless some one enable a CLOCKS_ENABLE_ALL config.
But we still have there data, so that we can quickly experiment when needed.

it is no longer supported on OMAP5. If you have doubts on the silicon usecase specification, I recommend you do read the TI internal documentation for the same.

Quoted 6 lines

2) I remember that locking with 32K source was considered better because, we can cut sys_clk when audio is still running. Also i think that the jitter was not a real problem for audio even when running with 32Khz clock. I have to check this point again.

please check again.

Quoted 3 lines

The reason we had both the sources supported was just from an experiment motive. I have seen that during pre silicon, we have

As a rule, experimentation code should NOT be in mainline. only recommended operation code should ever be put in mainline - real products are supposed to ramp with this code.

Quoted 2 lines

to switch the clock source from default to get locking. So having support for both helps in those cases.

not if the silicon is neither validated NOR expected to be supported at this.
[...]

Quoted 8 lines
Quoted 2 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 107

Quoted 1 line
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
 static const struct dpll_params mpu_dpll_params_1_5ghz[NUM_SYS_CLKS] = {

I am not sure we'd like to do this.

This file is common for ES1.0 as well. Also i have added frequency tables for OPP_HIGH and OPP_LOW as well. We some times find it nessecary to boot with a different than OPP_NOM to do experiments. So this is useful from that point. But what is missing is the VDDs which I usually add manually while testing. But now to complete
this, i will add that as well.

Why? Es1.0 will never be publically released, it never was meant to be public. ES2.0 is the only one meant to go out. Supporting ES1.0 and ES2.0 means a ton of redundant code being maintained in mainline with no product lines meant to actively using it - ever! Do we really want to do this??

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -7
-	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
Quoted 3 lines
Quoted 2 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 117

Quoted 1 line
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
 static const struct dpll_params mpu_dpll_params_2ghz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

This file is common for ES1.0 as well.

ES1.0 DOES NOT run at 2GHz!

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
arch/arm/cpu/armv7/omap4/hw_data.c +7 -7
-	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
 };
 
Quoted 3 lines
Quoted 2 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 127

Quoted 1 line
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
 static const struct dpll_params mpu_dpll_params_1100mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

MPU runs at 1100 MHZ in OPP_NOM on 2.0

1099MHz - I suggest latest spec to be clear on this - i suggest reviewing further based on update.
[...]

Quoted 9 lines
Quoted 9 lines

arch/arm/cpu/armv7/omap4/hw_data.c struct omap_sys_ctrl_regs const **ctrl = · line 133

Quoted 6 lines
arch/arm/cpu/armv7/omap4/hw_data.c +6 -0
+	.iva = iva_dpll_params_2330mhz_es2,
+#ifdef CONFIG_SYS_OMAP_ABE_SYSCK
+	.abe = abe_dpll_params_sysclk_196608khz,
+#else
+	.abe = &abe_dpll_params_32k_196608khz,
+#endif

I strongly suggest dumping ABE sourcing from 32K clock - the code is just a nuisance waiting to exercise an unsupported silicon feature waiting to happen.

[...]

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
arch/arm/cpu/armv7/omap4/hw_data.c +0 -0
 	default:
arch/arm/include/asm/arch-omap5/clocks.h +0 -0
index 15362ae..685aad5 100644
@@ -208,6 +208,10 @@
 #define VDD_MM_5432	1150
 #define VDD_CORE_5432	1150
 
Quoted 8 lines
Quoted 6 lines

arch/arm/include/asm/arch-omap5/clocks.h line 213

Quoted 3 lines
arch/arm/include/asm/arch-omap5/clocks.h +3 -0
+#define VDD_MPU_ES2	1060
+#define VDD_MM_ES2	1025
+#define VDD_CORE_ES2	1040

^^^ these are meant only for OPP_NOM - considering that you have DPLLs for OPP_SB added in, do you even expect these devices to bootup at anything *but* OPP_NOM??

I agree. I add it manually while doing experiments. I will add these here.

As a rule we want maintainable s/w in mainline, not experimental code. maintainable s/w implies s/w that adheres to SoC's specified operational ranges unfortunately :(.

Signature · 2 lines
Regards,
Nishanth Menon
#14 lore raw

PATCH v2 3/5 ARM: OMAP5: clocks: Add OPP settings required for OMAP543X ES2.0 soc

On Tuesday 05 February 2013 08:59 PM, Nishanth Menon wrote:
[..]

Quoted 10 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Answering all of your above questions here.
The above data is for OMAP4 and not OMAP5. This file was modified here just to include dummy dividers. Because we were now using a common dpll_params structure, there was no functional change in this file. I think the problem was commit log was missing this info.
I will update to clarify this.

I dont think updating commit log alone is the right solution -> renaming the variables make more sense - making ones meant for OMAP4 as _omap4430, 60 etc help readability of code.

omap4/hw_data.c has separate arrays to represent 4430, 4460 dplls data.

Quoted 15 lines

[...]

Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

/* ABE M & N values with 32K clock as source */
static const struct dpll_params abe_dpll_params_32k_196608khz = {

We do not intend to support 32K ABE source except when doing DPLL cascading - so this is in effect an configuration which is un-used in any s/w line.

1) In fact we not locking ABE, IVA, USB DPLLs any more in bootloader unless some one enable a CLOCKS_ENABLE_ALL config.
But we still have there data, so that we can quickly experiment when needed.

it is no longer supported on OMAP5. If you have doubts on the silicon usecase specification, I recommend you do read the TI internal documentation for the same.

Quoted 1 line
Quoted 7 lines
Quoted 5 lines

2) I remember that locking with 32K source was considered better because, we can cut sys_clk when audio is still running. Also i think that the jitter was not a real problem for audio even when running with 32Khz clock. I have to check this point again.

please check again.

Quoted 1 line

I even checked the latest version of ES2.0 TRM.
M, N specified are 750, 0. So these are ones used to lock at 32KHZ.

Quoted 6 lines
Quoted 2 lines

The reason we had both the sources supported was just from an experiment motive. I have seen that during pre silicon, we have

As a rule, experimentation code should NOT be in mainline. only recommended operation code should ever be put in mainline - real products are supposed to ramp with this code.

Yes, by default we have set it to OPP_NOM.
There where many situations where there was a need to boot with higher OPPs for performance measurements with mainline. So it was better to change just one variable than to add the full data for that OPP in those cases. This has helped many times in the past.

Quoted 13 lines
Quoted 2 lines

to switch the clock source from default to get locking. So having support for both helps in those cases.

not if the silicon is neither validated NOR expected to be supported at this.
[...]

Quoted 8 lines
Quoted 2 lines
Quoted 1 line
  static const struct dpll_params mpu_dpll_params_1_5ghz[NUM_SYS_CLKS] = {

I am not sure we'd like to do this.

This file is common for ES1.0 as well. Also i have added frequency tables for OPP_HIGH and OPP_LOW as well. We some times find it nessecary to boot with a different than OPP_NOM to do experiments. So this is useful from that point. But what is missing is the VDDs which I usually add manually while testing. But now to complete
this, i will add that as well.

Quoted 6 lines

Why? Es1.0 will never be publically released, it never was meant to be public. ES2.0 is the only one meant to go out. Supporting ES1.0 and ES2.0 means a ton of redundant code being maintained in mainline with no product lines meant to actively using it - ever! Do we really want to do this??

Ok, i will clean up ES1.0 data in a separate patch series after this.

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -7
-	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{125, 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{625, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 7, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{750, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 15, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
  static const struct dpll_params mpu_dpll_params_2ghz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

This file is common for ES1.0 as well.

ES1.0 DOES NOT run at 2GHz!

Quoted 1 line

Ok, i will clean up ES1.0 data separately.

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
arch/arm/cpu/armv7/omap5/hw_data.c +7 -7
-	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
-	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
-	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
-	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
-	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
-	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
+	{500, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 12 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 13 MHz   */
+	{2024, 16, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 16.8 MHz */
+	{625, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 19.2 MHz */
+	{1000, 12, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 26 MHz   */
+	{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},	/* 27 MHz   */
+	{625, 11, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}	/* 38.4 MHz */
  };
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
  static const struct dpll_params mpu_dpll_params_1100mhz[NUM_SYS_CLKS] = {

again, frequency is wrong for es2.0?

MPU runs at 1100 MHZ in OPP_NOM on 2.0

1099MHz - I suggest latest spec to be clear on this - i suggest reviewing further based on update.

MPU runs at 1099.9 MHZ

Quoted 26 lines

[...]

Quoted 9 lines
Quoted 9 lines

arch/arm/cpu/armv7/omap5/hw_data.c struct dplls omap5_dplls_es1 = { · line 240

Quoted 6 lines
arch/arm/cpu/armv7/omap5/hw_data.c +6 -0
+	.iva = iva_dpll_params_2330mhz_es2,
+#ifdef CONFIG_SYS_OMAP_ABE_SYSCK
+	.abe = abe_dpll_params_sysclk_196608khz,
+#else
+	.abe = &abe_dpll_params_32k_196608khz,
+#endif

I strongly suggest dumping ABE sourcing from 32K clock - the code is just a nuisance waiting to exercise an unsupported silicon feature waiting to happen.

[...]

Quoted 15 lines
Quoted 15 lines

arch/arm/include/asm/arch-omap5/clocks.h line 213

Quoted 12 lines

default:

arch/arm/include/asm/arch-omap5/clocks.h +3 -0
index 15362ae..685aad5 100644
@@ -208,6 +208,10 @@
  #define VDD_MM_5432	1150
  #define VDD_CORE_5432	1150
 
+#define VDD_MPU_ES2	1060
+#define VDD_MM_ES2	1025
+#define VDD_CORE_ES2	1040

^^^ these are meant only for OPP_NOM - considering that you have DPLLs for OPP_SB added in, do you even expect these devices to bootup at anything *but* OPP_NOM??

Quoted 6 lines
Quoted 2 lines

I agree. I add it manually while doing experiments. I will add these here.

As a rule we want maintainable s/w in mainline, not experimental code. maintainable s/w implies s/w that adheres to SoC's specified operational ranges unfortunately :(.

Regards,
Sricharan

#15 lore raw

PATCH v2 4/5 ARM: OMAP5: Add DDR changes required for OMAP543X ES2.0 SOCs

In reply to R Sricharan

From: Lokesh Vutla <[email protected]>

Add pre calculated timing settings of LPDDR2 and DDR3 memories present in OMAP5430 and OMAP5432 ES2.0 versions.

Also adding the DDR pad io settings required for
OMAP543X SOCs here.

---
 arch/arm/cpu/armv7/omap5/hw_data.c     |   14 ++++++
 arch/arm/cpu/armv7/omap5/sdram.c       |   75 +++++++++++++++++++++++++++++++-
 arch/arm/include/asm/arch-omap5/omap.h |    6 +++
 arch/arm/include/asm/emif.h            |    1 +
 4 files changed, 94 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap5/hw_data.c +14 -0
index 13ea07e..fd12b62 100644
@@ -503,6 +503,16 @@ const struct ctrl_ioregs ioregs_omap5432_es1 = {
 	.ctrl_emif_sdram_config_ext = SDRAM_CONFIG_EXT_RD_LVL_11_SAMPLES,
 };
 
+const struct ctrl_ioregs ioregs_omap5432_es2 = {
+	.ctrl_ddrch = DDR_IO_I_40OHM_SR_FAST_WD_DQ_NO_PULL_DQS_NO_PULL_ES2,
+	.ctrl_lpddr2ch = 0x0,
+	.ctrl_ddr3ch = DDR_IO_I_40OHM_SR_SLOWEST_WD_DQ_NO_PULL_DQS_NO_PULL_ES2,
+	.ctrl_ddrio_0 = DDR_IO_0_VREF_CELLS_DDR3_VALUE_ES2,
+	.ctrl_ddrio_1 = DDR_IO_1_VREF_CELLS_DDR3_VALUE_ES2,
+	.ctrl_ddrio_2 = DDR_IO_2_VREF_CELLS_DDR3_VALUE_ES2,
+	.ctrl_emif_sdram_config_ext = SDRAM_CONFIG_EXT_RD_LVL_11_SAMPLES,
+};
+
 void hw_data_init(void)
 {
 	u32 omap_rev = omap_revision();
@@ -541,11 +551,15 @@ void get_ioregs(const struct ctrl_ioregs **regs)
 
 	switch (omap_rev) {
 	case OMAP5430_ES1_0:
+	case OMAP5430_ES2_0:
 		*regs = &ioregs_omap5430;
 	break;
 	case OMAP5432_ES1_0:
 		*regs = &ioregs_omap5432_es1;
 	break;
+	case OMAP5432_ES2_0:
+		*regs = &ioregs_omap5432_es2;
+	break;
 
 	default:
 		printf("\n INVALID OMAP REVISION ");
arch/arm/cpu/armv7/omap5/sdram.c +73 -2

112 lines not on this page · raw message

arch/arm/include/asm/arch-omap5/omap.h +6 -0
index 71935d8..ba2775b 100644
@@ -168,6 +168,12 @@ struct s32ktimer {
 #define DDR_IO_1_VREF_CELLS_DDR3_VALUE				0xBC6318DC
 #define DDR_IO_2_VREF_CELLS_DDR3_VALUE				0x0
 
+#define DDR_IO_I_40OHM_SR_SLOWEST_WD_DQ_NO_PULL_DQS_NO_PULL_ES2 0x7C7C7C7C
+#define DDR_IO_I_40OHM_SR_FAST_WD_DQ_NO_PULL_DQS_NO_PULL_ES2 0x64656465
+#define DDR_IO_0_VREF_CELLS_DDR3_VALUE_ES2 0xBAE8C631
+#define DDR_IO_1_VREF_CELLS_DDR3_VALUE_ES2 0xB46318D8
+#define DDR_IO_2_VREF_CELLS_DDR3_VALUE_ES2 0x84210000
+
 #define EFUSE_1 0x45145100
 #define EFUSE_2 0x45145100
 #define EFUSE_3 0x45145100
arch/arm/include/asm/emif.h +1 -0
index fd530bb..9d72fe3 100644
@@ -519,6 +519,7 @@
 
 #define SDRAM_CONFIG_EXT_RD_LVL_11_SAMPLES	0x0000C1A7
 #define SDRAM_CONFIG_EXT_RD_LVL_4_SAMPLES	0x000001A7
+#define SDRAM_CONFIG_EXT_RD_LVL_11_SAMPLES_ES2 0x0000C1C7
 
 /* DMM */
 #define DMM_BASE			0x4E000040
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH v2 4/5 ARM: OMAP5: Add DDR changes required for OMAP543X ES2.0 SOCs

Quoted 10 lines · R Sricharan

From: Lokesh Vutla <[email protected]>

Add pre calculated timing settings of LPDDR2 and DDR3 memories present in OMAP5430 and OMAP5432 ES2.0 versions.

Also adding the DDR pad io settings required for
OMAP543X SOCs here.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130204/feb28ab7/attachment.pgp>
#17 lore raw

PATCH v2 5/5 ARM: OMAP5: srcomp: enable slew rate compensation cells after powerup

In reply to R Sricharan

From: Lokesh Vutla <[email protected]>

After power-up SRCOMP cells are by-passed by default in OMAP5. Software has to enable these SRCOMP sells.
For ES2: All 5 SRCOMP cells needs to be enabled.
For ES1: Only 4 SRCOMP cells in core power domain are enabled.
The 1 in wkup domain is not enabled because smart i/os of wkup domain work with default compensation code.

---
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |    6 ++
 arch/arm/cpu/armv7/omap5/hwinit.c              |  116 ++++++++++++++++++++++++
 arch/arm/cpu/armv7/omap5/prcm-regs.c           |    5 +-
 arch/arm/include/asm/arch-omap5/clocks.h       |    4 +
 arch/arm/include/asm/arch-omap5/omap.h         |   19 ++++
 arch/arm/include/asm/arch-omap5/sys_proto.h    |    1 +
 arch/arm/include/asm/omap_common.h             |    2 +
 7 files changed, 152 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/omap-common/hwinit-common.c +6 -0
index 2aec2ea..00e246b 100644
@@ -35,6 +35,7 @@
 #include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/omap_common.h>
+#include <linux/compiler.h>
 
 #define ARMV7_DCACHE_WRITEBACK  0xe
 #define	ARMV7_DOMAIN_CLIENT	1
@@ -106,6 +107,10 @@ void spl_display_print(void)
 }
 #endif
 
+void __weak srcomp_enable(void)
+{
+}
+
 /*
  * Routine: s_init
  * Description: Does early system init of watchdog, muxing,  andclocks
@@ -132,6 +137,7 @@ void s_init(void)
 	watchdog_init();
 	set_mux_conf_regs();
 #ifdef CONFIG_SPL_BUILD
+	srcomp_enable();
 	setup_clocks_for_console();
 
 	gd = &gdata;
arch/arm/cpu/armv7/omap5/hwinit.c +116 -0

128 lines not on this page · raw message

arch/arm/cpu/armv7/omap5/prcm-regs.c +4 -1
index 58c9d50..5e5abcc 100644
@@ -149,6 +149,7 @@ struct prcm_regs const omap5_es1_prcm = {
 
 	/* cm2.core */
 	.cm_coreaon_bandgap_clkctrl = 0x4a008648,
+	.cm_coreaon_io_srcomp_clkctrl = 0x4a008650,
 	.cm_l3_1_clkstctrl = 0x4a008700,
 	.cm_l3_1_dynamicdep = 0x4a008708,
 	.cm_l3_1_l3_1_clkctrl = 0x4a008720,
@@ -294,6 +295,7 @@ struct prcm_regs const omap5_es1_prcm = {
 	.cm_wkup_rtc_clkctrl = 0x4ae07880,
 	.cm_wkup_bandgap_clkctrl = 0x4ae07888,
 	.cm_wkupaon_scrm_clkctrl = 0x4ae07890,
+	.cm_wkupaon_io_srcomp_clkctrl = 0x4ae07898,
 	.prm_vc_val_bypass = 0x4ae07ba0,
 	.prm_vc_cfg_i2c_mode = 0x4ae07bb4,
 	.prm_vc_cfg_i2c_clk = 0x4ae07bb8,
@@ -502,7 +504,7 @@ struct prcm_regs const omap5_es2_prcm = {
 	.cm_ssc_deltamstep_dpll_unipro = 0x4a0081e8,
 	.cm_ssc_modfreqdiv_dpll_unipro = 0x4a0081ec,
 	.cm_coreaon_bandgap_clkctrl = 0x4a008648,
-
+	.cm_coreaon_io_srcomp_clkctrl = 0x4a008650,
 
 	/* cm2.core */
 	.cm_l3_1_clkstctrl = 0x4a008700,
@@ -650,6 +652,7 @@ struct prcm_regs const omap5_es2_prcm = {
 	.cm_wkup_rtc_clkctrl = 0x4ae07980,
 	.cm_wkup_bandgap_clkctrl = 0x4ae07988,
 	.cm_wkupaon_scrm_clkctrl = 0x4ae07990,
+	.cm_wkupaon_io_srcomp_clkctrl = 0x4ae07998,
 	.prm_vc_val_bypass = 0x4ae07ca0,
 	.prm_vc_cfg_i2c_mode = 0x4ae07cb4,
 	.prm_vc_cfg_i2c_clk = 0x4ae07cb8,
arch/arm/include/asm/arch-omap5/clocks.h +4 -0
index 685aad5..6f64186 100644
@@ -186,6 +186,10 @@
 #define OPTFCLKEN_SCRM_CORE_SHIFT		8
 #define OPTFCLKEN_SCRM_CORE_MASK		(1 << 8)
 
+/* CM_COREAON_IO_SRCOMP_CLKCTRL */
+#define OPTFCLKEN_SRCOMP_FCLK_SHIFT		8
+#define OPTFCLKEN_SRCOMP_FCLK_MASK		(1 << 8)
+
 /* Clock frequencies */
 #define OMAP_SYS_CLK_FREQ_38_4_MHZ	38400000
 #define OMAP_SYS_CLK_IND_38_4_MHZ	6
arch/arm/include/asm/arch-omap5/omap.h +19 -0
index ba2775b..d29be93 100644
@@ -229,7 +229,26 @@ struct s32ktimer {
 #define CH_FLAGS_CHFLASH	(0x1 << 2)
 #define CH_FLAGS_CHMMCSD	(0x1 << 3)
 
+/* CONTROL_SRCOMP_XXX_SIDE */
+#define OVERRIDE_XS_SHIFT		30
+#define OVERRIDE_XS_MASK		(1 << 30)
+#define SRCODE_READ_XS_SHIFT		12
+#define SRCODE_READ_XS_MASK		(0xff << 12)
+#define PWRDWN_XS_SHIFT			11
+#define PWRDWN_XS_MASK			(1 << 11)
+#define DIVIDE_FACTOR_XS_SHIFT		4
+#define DIVIDE_FACTOR_XS_MASK		(0x7f << 4)
+#define MULTIPLY_FACTOR_XS_SHIFT	1
+#define MULTIPLY_FACTOR_XS_MASK		(0x7 << 1)
+#define SRCODE_OVERRIDE_SEL_XS_SHIFT	0
+#define SRCODE_OVERRIDE_SEL_XS_MASK	(1 << 0)
+
 #ifndef __ASSEMBLY__
+struct srcomp_params {
+	s8 divide_factor;
+	s8 multiply_factor;
+};
+
 struct omap_boot_parameters {
 	char *boot_message;
 	unsigned int mem_boot_descriptor;
arch/arm/include/asm/arch-omap5/sys_proto.h +1 -0
index 201ed6f..b8d841d 100644
@@ -59,6 +59,7 @@ int omap_vc_bypass_send_value(u8 sa, u8 reg_addr, u8 reg_data);
 u32 warm_reset(void);
 void force_emif_self_refresh(void);
 void get_ioregs(const struct ctrl_ioregs **regs);
+void srcomp_enable(void);
 
 /*
  * This is used to verify if the configuration header
arch/arm/include/asm/omap_common.h +2 -0
index 8a886ec..0af0c33 100644
@@ -153,6 +153,7 @@ struct prcm_regs {
 
 	/* cm2.core */
 	u32 cm_coreaon_bandgap_clkctrl;
+	u32 cm_coreaon_io_srcomp_clkctrl;
 	u32 cm_l3_1_clkstctrl;
 	u32 cm_l3_1_dynamicdep;
 	u32 cm_l3_1_l3_1_clkctrl;
@@ -300,6 +301,7 @@ struct prcm_regs {
 	u32 cm_wkup_rtc_clkctrl;
 	u32 cm_wkup_bandgap_clkctrl;
 	u32 cm_wkupaon_scrm_clkctrl;
+	u32 cm_wkupaon_io_srcomp_clkctrl;
 	u32 prm_vc_val_bypass;
 	u32 prm_vc_cfg_i2c_mode;
 	u32 prm_vc_cfg_i2c_clk;
Signature · 1 line
1.7.9.5
#18 lore raw

PATCH v2 5/5 ARM: OMAP5: srcomp: enable slew rate compensation cells after powerup

Quoted 11 lines · R Sricharan

From: Lokesh Vutla <[email protected]>

After power-up SRCOMP cells are by-passed by default in OMAP5. Software has to enable these SRCOMP sells.
For ES2: All 5 SRCOMP cells needs to be enabled.
For ES1: Only 4 SRCOMP cells in core power domain are enabled.
The 1 in wkup domain is not enabled because smart i/os of wkup domain work with default compensation code.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130204/336429ad/attachment.pgp>