Skip to contentSkip to conversation

ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1

PATCH Superseded Lokesh Vutla 2 participants 6 messages Feb 6, 2014 – Feb 7, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1

This patch series enables AM43XX SOC in omap2plus_deconfig along with updating clocksource and adding support for ES1.1.
With this series using omap2plus_defconfig alone boots on AM43XX.

Tested on: AM4372 EPOS EVM

Afzal Mohammed (1):
ARM: OMAP2+: AM43x: enable in default config

Lokesh Vutla (1):
ARM: OMAP2+: AM43x: Add ID for ES1.1

Rajendra Nayak (1):
ARM: OMAP2+: AM43x: Use gptimer as clocksource

 arch/arm/configs/omap2plus_defconfig |    1 +
 arch/arm/mach-omap2/board-generic.c  |    2 +-
 arch/arm/mach-omap2/id.c             |   14 ++++++++++++--
 arch/arm/mach-omap2/soc.h            |    3 ++-
 arch/arm/mach-omap2/timer.c          |    3 ++-
 5 files changed, 18 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/3 ARM: OMAP2+: AM43x: Enable in default config

From: Afzal Mohammed <[email protected]>

Enable AM43x SoC in omap2plus_defconfig

---
 arch/arm/configs/omap2plus_defconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/omap2plus_defconfig +1 -0
index 3a0b53d..364ba38 100644
@@ -28,6 +28,7 @@ CONFIG_ARCH_OMAP3=y
 CONFIG_ARCH_OMAP4=y
 CONFIG_SOC_OMAP5=y
 CONFIG_SOC_AM33XX=y
+CONFIG_SOC_AM43XX=y
 CONFIG_SOC_DRA7XX=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_ARM_ERRATA_411920=y
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/3 ARM: OMAP2+: AM43x: Add ID for ES1.1

In reply to Lokesh Vutla

Adding ID for AM437x ES1.1 silicon.

---
 arch/arm/mach-omap2/id.c  |   14 ++++++++++++--
 arch/arm/mach-omap2/soc.h |    3 ++-
 2 files changed, 14 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/id.c +12 -2
index 9428c5f..8a05eaf 100644
@@ -465,8 +465,18 @@ void __init omap3xxx_check_revision(void)
 		}
 		break;
 	case 0xb98c:
-		omap_revision = AM437X_REV_ES1_0;
-		cpu_rev = "1.0";
+		switch (rev) {
+		case 0:
+			omap_revision = AM437X_REV_ES1_0;
+			cpu_rev = "1.0";
+			break;
+		case 1:
+		/* FALLTHROUGH */
+		default:
+			omap_revision = AM437X_REV_ES1_1;
+			cpu_rev = "1.1";
+			break;
+		}
 		break;
 	case 0xb8f2:
 		switch (rev) {
arch/arm/mach-omap2/soc.h +2 -1
index 076bd90..30abcc8 100644
@@ -438,7 +438,8 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define AM335X_REV_ES2_1	(AM335X_CLASS | (0x2 << 8))
 
 #define AM437X_CLASS		0x43700000
-#define AM437X_REV_ES1_0	AM437X_CLASS
+#define AM437X_REV_ES1_0	(AM437X_CLASS | (0x10 << 8))
+#define AM437X_REV_ES1_1	(AM437X_CLASS | (0x11 << 8))
 
 #define OMAP443X_CLASS		0x44300044
 #define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8))
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/3 ARM: OMAP2+: AM43x: Add ID for ES1.1

Quoted 39 lines · Lokesh Vutla

Adding ID for AM437x ES1.1 silicon.

---
 arch/arm/mach-omap2/id.c  |   14 ++++++++++++--
 arch/arm/mach-omap2/soc.h |    3 ++-
 2 files changed, 14 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/id.c +12 -2
index 9428c5f..8a05eaf 100644
@@ -465,8 +465,18 @@ void __init omap3xxx_check_revision(void)
 		}
 		break;
 	case 0xb98c:
-		omap_revision = AM437X_REV_ES1_0;
-		cpu_rev = "1.0";
+		switch (rev) {
+		case 0:
+			omap_revision = AM437X_REV_ES1_0;
+			cpu_rev = "1.0";
+			break;
+		case 1:
+		/* FALLTHROUGH */
+		default:
+			omap_revision = AM437X_REV_ES1_1;
+			cpu_rev = "1.1";
+			break;
+		}
 		break;
 	case 0xb8f2:
 		switch (rev) {
arch/arm/mach-omap2/soc.h +0 -0
index 076bd90..30abcc8 100644

arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 445

Quoted 9 lines
arch/arm/mach-omap2/soc.h +2 -1
@@ -438,7 +438,8 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define AM335X_REV_ES2_1	(AM335X_CLASS | (0x2 << 8))
 
 #define AM437X_CLASS		0x43700000
-#define AM437X_REV_ES1_0	AM437X_CLASS
+#define AM437X_REV_ES1_0	(AM437X_CLASS | (0x10 << 8))
+#define AM437X_REV_ES1_1	(AM437X_CLASS | (0x11 << 8))
 
 #define OMAP443X_CLASS		0x44300044
 #define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8))

can you also check if socbus shows proper results? I had http://slexy.org/view/s20e3OsIVx with v3.14-rc1

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

PATCH 2/3 ARM: OMAP2+: AM43x: Add ID for ES1.1

Hi Nishanth,

Quoted 46 lines · Nishanth Menon
Quoted 45 lines · Lokesh Vutla

Adding ID for AM437x ES1.1 silicon.

---
 arch/arm/mach-omap2/id.c  |   14 ++++++++++++--
 arch/arm/mach-omap2/soc.h |    3 ++-
 2 files changed, 14 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/id.c +12 -2
index 9428c5f..8a05eaf 100644
@@ -465,8 +465,18 @@ void __init omap3xxx_check_revision(void)
 		}
 		break;
 	case 0xb98c:
-		omap_revision = AM437X_REV_ES1_0;
-		cpu_rev = "1.0";
+		switch (rev) {
+		case 0:
+			omap_revision = AM437X_REV_ES1_0;
+			cpu_rev = "1.0";
+			break;
+		case 1:
+		/* FALLTHROUGH */
+		default:
+			omap_revision = AM437X_REV_ES1_1;
+			cpu_rev = "1.1";
+			break;
+		}
 		break;
 	case 0xb8f2:
 		switch (rev) {
arch/arm/mach-omap2/soc.h +2 -1
index 076bd90..30abcc8 100644
@@ -438,7 +438,8 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define AM335X_REV_ES2_1	(AM335X_CLASS | (0x2 << 8))
 
 #define AM437X_CLASS		0x43700000
-#define AM437X_REV_ES1_0	AM437X_CLASS
+#define AM437X_REV_ES1_0	(AM437X_CLASS | (0x10 << 8))
+#define AM437X_REV_ES1_1	(AM437X_CLASS | (0x11 << 8))
 
Quoted 6 lines

arch/arm/mach-omap2/soc.h IS_OMAP_TYPE(3430, 0x3430) · line 445

Quoted 3 lines
arch/arm/mach-omap2/soc.h +0 -0
 #define OMAP443X_CLASS		0x44300044
 #define OMAP4430_REV_ES1_0	(OMAP443X_CLASS | (0x10 << 8))

can you also check if socbus shows proper results? I had http://slexy.org/view/s20e3OsIVx with v3.14-rc1

Oops....missed out formating and sending "AM43x : determine features patch". Thanks for pointing it out. ll update and send a v2 for this series.

Thanks and regards,
Lokesh

Quoted 1 line
#5 lore raw

PATCH 3/3 ARM: OMAP2+: AM43x: Use gptimer as clocksource

In reply to Lokesh Vutla

From: Rajendra Nayak <[email protected]>

The SyncTimer in AM43x is clocked using the following two sources:
1) An inaccuarte 32k clock (CLK_32KHZ) derived from PER DPLL, causing system time to go slowly (~10% deviation).
2) external 32KHz RTC clock, which may not always be available on board like in the case of ePOS EVM

Use gptimer as clocksource instead, as is done in the case of AM335x (which does not have a SyncTimer). With this, system time keeping works accurately.

---
 arch/arm/mach-omap2/board-generic.c |    2 +-
 arch/arm/mach-omap2/timer.c         |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-generic.c +1 -1
index 8e3daa1..5679464a 100644
@@ -229,7 +229,7 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
 	.init_late	= am43xx_init_late,
 	.init_irq	= omap_gic_of_init,
 	.init_machine	= omap_generic_init,
-	.init_time	= omap3_sync32k_timer_init,
+	.init_time	= omap3_gptimer_timer_init,
 	.dt_compat	= am43_boards_compat,
 MACHINE_END
 #endif
arch/arm/mach-omap2/timer.c +2 -1
index 74044aa..b62de9f 100644
@@ -604,7 +604,8 @@ OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure",
 			2, "timer_sys_ck", NULL);
 #endif /* CONFIG_ARCH_OMAP3 */
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) || \
+	defined(CONFIG_SOC_AM43XX)
 OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
 		       1, "timer_sys_ck", "ti,timer-alwon");
 #endif
Signature · 1 line
1.7.9.5