linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1
@ 2014-02-06  8:45 Lokesh Vutla
  2014-02-06  8:45 ` [PATCH 1/3] ARM: OMAP2+: AM43x: Enable in default config Lokesh Vutla
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lokesh Vutla @ 2014-02-06  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] ARM: OMAP2+: AM43x: Enable in default config
  2014-02-06  8:45 [PATCH 0/3] ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1 Lokesh Vutla
@ 2014-02-06  8:45 ` Lokesh Vutla
  2014-02-06  8:45 ` [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1 Lokesh Vutla
  2014-02-06  8:45 ` [PATCH 3/3] ARM: OMAP2+: AM43x: Use gptimer as clocksource Lokesh Vutla
  2 siblings, 0 replies; 6+ messages in thread
From: Lokesh Vutla @ 2014-02-06  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Afzal Mohammed <afzal@ti.com>

Enable AM43x SoC in omap2plus_defconfig

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/configs/omap2plus_defconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 3a0b53d..364ba38 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1
  2014-02-06  8:45 [PATCH 0/3] ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1 Lokesh Vutla
  2014-02-06  8:45 ` [PATCH 1/3] ARM: OMAP2+: AM43x: Enable in default config Lokesh Vutla
@ 2014-02-06  8:45 ` Lokesh Vutla
  2014-02-06 14:38   ` Nishanth Menon
  2014-02-06  8:45 ` [PATCH 3/3] ARM: OMAP2+: AM43x: Use gptimer as clocksource Lokesh Vutla
  2 siblings, 1 reply; 6+ messages in thread
From: Lokesh Vutla @ 2014-02-06  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

Adding ID for AM437x ES1.1 silicon.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/id.c  |   14 ++++++++++++--
 arch/arm/mach-omap2/soc.h |    3 ++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 9428c5f..8a05eaf 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -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) {
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 076bd90..30abcc8 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -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))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] ARM: OMAP2+: AM43x: Use gptimer as clocksource
  2014-02-06  8:45 [PATCH 0/3] ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1 Lokesh Vutla
  2014-02-06  8:45 ` [PATCH 1/3] ARM: OMAP2+: AM43x: Enable in default config Lokesh Vutla
  2014-02-06  8:45 ` [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1 Lokesh Vutla
@ 2014-02-06  8:45 ` Lokesh Vutla
  2 siblings, 0 replies; 6+ messages in thread
From: Lokesh Vutla @ 2014-02-06  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rajendra Nayak <rnayak@ti.com>

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.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |    2 +-
 arch/arm/mach-omap2/timer.c         |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 8e3daa1..5679464a 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -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
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 74044aa..b62de9f 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1
  2014-02-06  8:45 ` [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1 Lokesh Vutla
@ 2014-02-06 14:38   ` Nishanth Menon
  2014-02-07  4:08     ` Lokesh Vutla
  0 siblings, 1 reply; 6+ messages in thread
From: Nishanth Menon @ 2014-02-06 14:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/06/2014 02:45 AM, Lokesh Vutla wrote:
> Adding ID for AM437x ES1.1 silicon.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  arch/arm/mach-omap2/id.c  |   14 ++++++++++++--
>  arch/arm/mach-omap2/soc.h |    3 ++-
>  2 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 9428c5f..8a05eaf 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -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) {
> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
> index 076bd90..30abcc8 100644
> --- a/arch/arm/mach-omap2/soc.h
> +++ b/arch/arm/mach-omap2/soc.h
> @@ -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

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1
  2014-02-06 14:38   ` Nishanth Menon
@ 2014-02-07  4:08     ` Lokesh Vutla
  0 siblings, 0 replies; 6+ messages in thread
From: Lokesh Vutla @ 2014-02-07  4:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nishanth,
On Thursday 06 February 2014 08:08 PM, Nishanth Menon wrote:
> On 02/06/2014 02:45 AM, Lokesh Vutla wrote:
>> Adding ID for AM437x ES1.1 silicon.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>  arch/arm/mach-omap2/id.c  |   14 ++++++++++++--
>>  arch/arm/mach-omap2/soc.h |    3 ++-
>>  2 files changed, 14 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>> index 9428c5f..8a05eaf 100644
>> --- a/arch/arm/mach-omap2/id.c
>> +++ b/arch/arm/mach-omap2/id.c
>> @@ -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) {
>> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
>> index 076bd90..30abcc8 100644
>> --- a/arch/arm/mach-omap2/soc.h
>> +++ b/arch/arm/mach-omap2/soc.h
>> @@ -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
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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-07  4:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06  8:45 [PATCH 0/3] ARM: OMAP2+: AM43x: Enable in OMAP2PLUS and add ID for ES1.1 Lokesh Vutla
2014-02-06  8:45 ` [PATCH 1/3] ARM: OMAP2+: AM43x: Enable in default config Lokesh Vutla
2014-02-06  8:45 ` [PATCH 2/3] ARM: OMAP2+: AM43x: Add ID for ES1.1 Lokesh Vutla
2014-02-06 14:38   ` Nishanth Menon
2014-02-07  4:08     ` Lokesh Vutla
2014-02-06  8:45 ` [PATCH 3/3] ARM: OMAP2+: AM43x: Use gptimer as clocksource Lokesh Vutla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).