Skip to contentSkip to conversation

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

PATCH New Lokesh Vutla 3 participants 9 messages Feb 7, 2014 – Feb 28, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 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.

Changes since V1:
- Added a new patch to determine AM43x device features.

Tested on:
AM4372 EPOS EVM. log for the same http://hastebin.com/pagigecume.xml

Afzal Mohammed (2):
ARM: OMAP2+: AM43x: enable in default config
ARM: OMAP2+: AM43x: determine features

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             |   16 ++++++++++++++--
 arch/arm/mach-omap2/io.c             |    1 +
 arch/arm/mach-omap2/soc.h            |    3 ++-
 arch/arm/mach-omap2/timer.c          |    3 ++-
 6 files changed, 21 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/4 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 v2 2/4 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 v2 3/4 ARM: OMAP2+: AM43x: determine features

In reply to Lokesh Vutla

From: Afzal Mohammed <[email protected]>

Determine AM43x device features by reusing AM335x helper as feature register layout is similar.
And also exporting AM43xx family name.

---
 arch/arm/mach-omap2/id.c |    2 ++
 arch/arm/mach-omap2/io.c |    1 +
 2 files changed, 3 insertions(+)
arch/arm/mach-omap2/id.c +2 -0
index 8a05eaf..157412e 100644
@@ -667,6 +667,8 @@ static const char * __init omap_get_family(void)
 		return kasprintf(GFP_KERNEL, "OMAP4");
 	else if (soc_is_omap54xx())
 		return kasprintf(GFP_KERNEL, "OMAP5");
+	else if (soc_is_am43xx())
+		return kasprintf(GFP_KERNEL, "AM43xx");
 	else
 		return kasprintf(GFP_KERNEL, "Unknown");
 }
arch/arm/mach-omap2/io.c +1 -0
index d408b15..d971411 100644
@@ -613,6 +613,7 @@ void __init am43xx_init_early(void)
 	omap_prm_base_init();
 	omap_cm_base_init();
 	omap3xxx_check_revision();
+	am33xx_check_features();
 	am43xx_powerdomains_init();
 	am43xx_clockdomains_init();
 	am43xx_hwmod_init();
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v2 4/4 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
maintainer
#5 lore raw

PATCH v2 4/4 ARM: OMAP2+: AM43x: Use gptimer as clocksource

Quoted 11 lines · 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.

Hmm doesn't this also mean that PM for any deeper idle states won't work properly?

Regards,

Tony

Quoted 37 lines
---
 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
#6 lore raw

PATCH v2 4/4 ARM: OMAP2+: AM43x: Use gptimer as clocksource

Quoted 9 lines · Tony Lindgren
Quoted 8 lines · 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

Quoted 6 lines
Quoted 3 lines

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.

Hmm doesn't this also mean that PM for any deeper idle states won't work properly?

Thats true. This would mean we cannot put the peripheral/core domain down in idle. Suspend however can still work if suspend/resume callbacks are added to the clockevent and clocksource code to shut the non-wakeup domain timer.

regards,
Rajendra

Quoted 42 lines

Regards,

Tony

Quoted 37 lines
---
 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
#7 lore raw

PATCH v2 4/4 ARM: OMAP2+: AM43x: Use gptimer as clocksource

Hi Tony,

Quoted 14 lines · Rajendra Nayak
Quoted 13 lines · Tony Lindgren
Quoted 11 lines · 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.

Quoted 6 lines
Quoted 2 lines

Hmm doesn't this also mean that PM for any deeper idle states won't work properly?

Thats true. This would mean we cannot put the peripheral/core domain down in idle. Suspend however can still work if suspend/resume callbacks are added to the clockevent and clocksource code to shut the non-wakeup domain timer.

This is a platform level limitation that only MPU domain can be put down in idle, just like AM335x.

Thanks and regards,
Lokesh

Quoted 47 lines

regards,
Rajendra

Quoted 42 lines

Regards,

Tony

Quoted 37 lines
---
 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
maintainer
#8 lore raw

PATCH v2 4/4 ARM: OMAP2+: AM43x: Use gptimer as clocksource

Quoted 16 lines · Lokesh Vutla

Hi Tony,

Quoted 14 lines · Rajendra Nayak
Quoted 13 lines · Tony Lindgren
Quoted 11 lines · 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.

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

Hmm doesn't this also mean that PM for any deeper idle states won't work properly?

Thats true. This would mean we cannot put the peripheral/core domain down in idle. Suspend however can still work if suspend/resume callbacks are added to the clockevent and clocksource code to shut the non-wakeup domain timer.

This is a platform level limitation that only MPU domain can be put down in idle, just like AM335x.

OK applying all four into omap-for-v3.15/soc thanks.

Tony