Skip to contentSkip to conversation

omap3: Add basic support for 720MHz part

PATCH New Sanjeev Premi 4 participants 7 messages Feb 9, 2011 – Feb 10, 2014

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

PATCH v5 1/1 omap3: Add basic support for 720MHz part

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ in 'omap3_features'. (Refer changes to id.c)
2) Removing check for omap3_has_720mhz() before enabling the OPP. (Refer changes to opp3xxx_data.c)
3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

CAUTION: This should be done for identified parts only.
Else, the device could be damaged permanently.

---

Since v4:
Updated the commit text addressing comments from Kevin Hilman (khilman at ti.com).

Since v3:
1) Minor changes to comments and braces.

Since v2:
1) pr_xxx() -> dev_xxx() functions - suggested by Manjunath (manjugk at ti.com)
2) Add check for presense of IVA - earlier planned to be in a separate patch; but we multiple discussions on optimizations.
3) Do look-up for hwmod corresponding for iva only if iva is present. Should save multiple strcmp()s in _lookup().

Since v1:
1) Using opp_enable() to enable the OPP after the OPP table has been initialized.
2) Starting at 3 levels of indent, the statements had be broken into multiple lines for most of the code. So, opted to create a new static that enables the OPPs corresponding to 720MHz.
3) I have only build tested this patch - will be able to confirm working tomorrow. With any further change, if needed. (However, functionally nothing has changed.)

 arch/arm/mach-omap2/control.h         |    6 +++
 arch/arm/mach-omap2/id.c              |    5 +++
 arch/arm/mach-omap2/opp3xxx_data.c    |   63 ++++++++++++++++++++++++++++++++-
 arch/arm/plat-omap/include/plat/cpu.h |    2 +
 4 files changed, 75 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/control.h +6 -0
index f0629ae..c338466 100644
@@ -365,6 +365,12 @@
 #define		FEAT_NEON		0
 #define		FEAT_NEON_NONE		1
 
+/* Product ID register */
+#define OMAP3_PRODID			0x020C
+
+/* Mask to extract SKU ID from Product ID */
+#define OMAP3_SKUID_MASK		0x0f
+#define		OMAP3_SKUID_720MHZ	0x08
 
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_ARCH_OMAP2PLUS
arch/arm/mach-omap2/id.c +5 -0
index 5f9086c..8c4500f 100644
@@ -191,6 +191,10 @@ static void __init omap3_check_features(void)
 	if (!cpu_is_omap3505() && !cpu_is_omap3517())
 		omap3_features |= OMAP3_HAS_IO_WAKEUP;
 
+	status = (OMAP3_SKUID_MASK & read_tap_reg(OMAP3_PRODID));
+	if (status & OMAP3_SKUID_720MHZ)
+		omap3_features |= OMAP3_HAS_720MHZ;
+
 	/*
 	 * TODO: Get additional info (where applicable)
 	 *       e.g. Size of L2 cache.
@@ -445,6 +449,7 @@ static void __init omap3_cpuinfo(void)
 	OMAP3_SHOW_FEATURE(neon);
 	OMAP3_SHOW_FEATURE(isp);
 	OMAP3_SHOW_FEATURE(192mhz_clk);
+	OMAP3_SHOW_FEATURE(720mhz);
 
 	printk(")\n");
 }
arch/arm/mach-omap2/opp3xxx_data.c +62 -1

98 lines not on this page · raw message

arch/arm/plat-omap/include/plat/cpu.h +2 -0
index 73d91ee..e624ee1 100644
@@ -455,6 +455,7 @@ extern u32 omap3_features;
 #define OMAP3_HAS_ISP			BIT(4)
 #define OMAP3_HAS_192MHZ_CLK		BIT(5)
 #define OMAP3_HAS_IO_WAKEUP		BIT(6)
+#define OMAP3_HAS_720MHZ		BIT(7)
 
 #define OMAP3_HAS_FEATURE(feat,flag)			\
 static inline unsigned int omap3_has_ ##feat(void)	\
@@ -469,5 +470,6 @@ OMAP3_HAS_FEATURE(neon, NEON)
 OMAP3_HAS_FEATURE(isp, ISP)
 OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
 OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
+OMAP3_HAS_FEATURE(720mhz, 720MHZ)
 
 #endif
Signature · 1 line
1.7.2.2
#1 lore raw

PATCH v5 1/1 omap3: Add basic support for 720MHz part

Quoted 28 lines · Sanjeev Premi

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ in 'omap3_features'. (Refer changes to id.c)
2) Removing check for omap3_has_720mhz() before enabling the OPP. (Refer changes to opp3xxx_data.c)
3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

Quoted 5 lines

CAUTION: This should be done for identified parts only.
Else, the device could be damaged permanently.

#2 lore raw

PATCH v5 1/1 omap3: Add basic support for 720MHz part

Hi,

Quoted 36 lines · On Thursday 10 February 2011 08:45:00 Kevin Hilman wrote:
Quoted 35 lines · Sanjeev Premi

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the

corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This

OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ

in 'omap3_features'. (Refer changes to id.c)

2) Removing check for omap3_has_720mhz() before enabling

the OPP. (Refer changes to opp3xxx_data.c)

3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in

the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

Quoted 8 lines
Quoted 6 lines

CAUTION: This should be done for identified parts only.

Else, the device could be damaged permanently.

This patch seems to never have made it upstream. Is there a reason for that ?

Signature · 3 lines
Regards,

Laurent Pinchart
#3 lore raw

PATCH v5 1/1 omap3: Add basic support for 720MHz part

Hi all,

Quoted 41 lines · On Friday 22 June 2012 11:33:51 Laurent Pinchart wrote:
Quoted 40 lines · On Thursday 10 February 2011 08:45:00 Kevin Hilman wrote:
Quoted 39 lines · Sanjeev Premi

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the

corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This

OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ

in 'omap3_features'. (Refer changes to id.c)

2) Removing check for omap3_has_720mhz() before enabling

the OPP. (Refer changes to opp3xxx_data.c)

3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in

the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

CAUTION: This should be done for identified parts only.

Else, the device could be damaged permanently.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

This patch seems to never have made it upstream. Is there a reason for that ?

Ping ?

Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw

PATCH v5 1/1 omap3: Add basic support for 720MHz part

Laurent,

Quoted 47 lines · Laurent Pinchart

Hi all,

Quoted 44 lines · On Friday 22 June 2012 11:33:51 Laurent Pinchart wrote:
Quoted 43 lines · On Thursday 10 February 2011 08:45:00 Kevin Hilman wrote:
Quoted 41 lines · Sanjeev Premi

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the

corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This

OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ

in 'omap3_features'. (Refer changes to id.c)

2) Removing check for omap3_has_720mhz() before enabling

the OPP. (Refer changes to opp3xxx_data.c)

3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in

the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

CAUTION: This should be done for identified parts only.

Else, the device could be damaged permanently.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

This patch seems to never have made it upstream. Is there a reason for that ?

Ping ?

We'd have to figure out a proper opp modifier logic with device tree. considering that non-dt boot is slowly getting dismantled in mach-omap2, to add new capabilities in non-dt is not really a good idea at this point in time - Further, we do have equivalent requirements in other TI SoCs as well -

Regards,
Nishanth Menon

#5 lore raw

PATCH v5 1/1 omap3: Add basic support for 720MHz part

Hi Nishanth,

Quoted 46 lines · On Friday 07 February 2014 07:51:00 Nishanth Menon wrote:
Quoted 45 lines · Laurent Pinchart
Quoted 43 lines · On Friday 22 June 2012 11:33:51 Laurent Pinchart wrote:
Quoted 31 lines · On Thursday 10 February 2011 08:45:00 Kevin Hilman wrote:
Quoted 30 lines · Sanjeev Premi

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ in 'omap3_features'. (Refer changes to id.c)

2) Removing check for omap3_has_720mhz() before enabling the OPP. (Refer changes to opp3xxx_data.c)

3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

Quoted 7 lines
Quoted 5 lines

CAUTION: This should be done for identified parts only.
Else, the device could be damaged permanently.

This patch seems to never have made it upstream. Is there a reason for that
?

Quoted 6 lines
Quoted 1 line

Ping ?

We'd have to figure out a proper opp modifier logic with device tree. considering that non-dt boot is slowly getting dismantled in mach-omap2, to add new capabilities in non-dt is not really a good idea at this point in time - Further, we do have equivalent requirements in other TI SoCs as well

Good point, but I'm not sure to see where this patch is specific to legacy boot. The two functions it modifies, and omap3xxx_check_features() and omap3_opp_init(), are called for DT boot as well.

Signature · 3 lines
Regards,

Laurent Pinchart
#6 lore raw

PATCH v5 1/1 omap3: Add basic support for 720MHz part

Quoted 48 lines · Laurent Pinchart
Quoted 48 lines · Laurent Pinchart
Quoted 46 lines · On Friday 22 June 2012 11:33:51 Laurent Pinchart wrote:
Quoted 35 lines · On Thursday 10 February 2011 08:45:00 Kevin Hilman wrote:
Quoted 34 lines
Quoted 33 lines · Sanjeev Premi

This patch adds support for speed enhanced variant of OMAP35x processors. These parts allow ARM and IVA running at 720MHz and 520MHz respectively.

These parts can be detected at runtime by reading contents of PRODID.SKUID[3:0] at 0x4830A20C [1].

This patch specifically does following:
* Add new OPP to omap34xx_opp_def_list[] - disabled by default.
* Detect devices capable of running at new OPP.
* Enable new OPP only if device supports it.
* Check for presence of IVA before attempting to enable the corresponding OPP.

[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf

It appears from discussions (on this patch) that a variant of OMAP3430 supports this OPP but lacks runtime detection. This OPP can be enabled for these device by either:
1) Setting the bit corresponding to OMAP3_HAS_720MHZ in 'omap3_features'. (Refer changes to id.c)

2) Removing check for omap3_has_720mhz() before enabling the OPP. (Refer changes to opp3xxx_data.c)

3) Calling opp_enable() for 720MHz/VDD1 and 520MHz/VDD2 in the board file. (Refer changes to opp3xxx_data.c). This should, ideally, be done before omap3_opp_init() is called during device_initcall().

CAUTION: This should be done for identified parts only.
Else, the device could be damaged permanently.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

This patch seems to never have made it upstream. Is there a reason for that
?

Ping ?

Quoted 8 lines
Quoted 4 lines

We'd have to figure out a proper opp modifier logic with device tree. considering that non-dt boot is slowly getting dismantled in mach-omap2, to add new capabilities in non-dt is not really a good idea at this point in time - Further, we do have equivalent requirements in other TI SoCs as well

Good point, but I'm not sure to see where this patch is specific to legacy boot. The two functions it modifies, and omap3xxx_check_features() and omap3_opp_init(), are called for DT boot as well.

omap3_opp_init() ->omap_init_opp_table returns if of_have_populated_dt(). check_features enable a flag for omap3_opp_init to pick the right OPPs up -> this is precisely the intent of something like opp modifier logic.

Regards,
Nishanth Menon