diff mbox

[6/8] ARM: dts: OMAP446x: move CPU OPP tables to device tree

Message ID 1363294695-658-7-git-send-email-nm@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nishanth Menon March 14, 2013, 8:58 p.m. UTC
OMAP4430 and 4460 have different OPP definitions. So, create an SoC
variant dtsi file for 4460 and move the OPP definitions to it.
Add DT OPP table for OMAP446x family of devices. This data is
decoded by OF with of_init_opp_table() helper function.

This is in preparation to use generic cpu0-cpufreq driver.

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: "BenoƮt Cousson" <b-cousson@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Cc: linux-omap@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/boot/dts/omap4-panda-es.dts |    2 +-
 arch/arm/boot/dts/omap446x.dtsi      |   27 +++++++++++++++++++++++++++
 arch/arm/mach-omap2/opp4xxx_data.c   |   15 ---------------
 3 files changed, 28 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap446x.dtsi

Comments

Hunter, Jon March 14, 2013, 9:49 p.m. UTC | #1
On 03/14/2013 03:58 PM, Nishanth Menon wrote:
> OMAP4430 and 4460 have different OPP definitions. So, create an SoC
> variant dtsi file for 4460 and move the OPP definitions to it.

FYI, I had to create a similar file for PMU [1]. However, I called it
omap4460.dtsi and not omap446x.dtsi as there is only one omap446x
device. That should go into to v3.10 and so may be worth basing this on
top. I do like your omap4-panda-common.dtsi that is a nice clean-up.

Cheers
Jon

[1]
http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/commit/?h=for_3.10/dts&id=5e64b6b1137a54f353528d6da60071c1ef0043ba
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nishanth Menon March 15, 2013, 2:08 p.m. UTC | #2
On 16:49-20130314, Jon Hunter wrote:
> 
> On 03/14/2013 03:58 PM, Nishanth Menon wrote:
> > OMAP4430 and 4460 have different OPP definitions. So, create an SoC
> > variant dtsi file for 4460 and move the OPP definitions to it.
> 
> FYI, I had to create a similar file for PMU [1]. However, I called it
> omap4460.dtsi and not omap446x.dtsi as there is only one omap446x
Hmm, guess I was paranoid about marketing folks spinning off another
omap446x variant out into the market. Since it is not yet done, nor
known if they will ever do it, am OK with 4460 convention.
> device. That should go into to v3.10 and so may be worth basing this on
> top. I do like your omap4-panda-common.dtsi that is a nice clean-up.
Thanks on the tip - Sounds good, since this series is based on DT, I
will base my changes on top of for_3.10 branch.
> 
> Cheers
> Jon
> 
> [1]
> http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/commit/?h=for_3.10/dts&id=5e64b6b1137a54f353528d6da60071c1ef0043ba
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts
index 6422d7c..c52455b 100644
--- a/arch/arm/boot/dts/omap4-panda-es.dts
+++ b/arch/arm/boot/dts/omap4-panda-es.dts
@@ -7,7 +7,7 @@ 
  */
 /dts-v1/;
 
-/include/ "omap4.dtsi"
+/include/ "omap446x.dtsi"
 /include/ "omap4-panda-common.dtsi"
 
 /* Audio routing is differnet between PandaBoard4430 and PandaBoardES */
diff --git a/arch/arm/boot/dts/omap446x.dtsi b/arch/arm/boot/dts/omap446x.dtsi
new file mode 100644
index 0000000..8f7a080
--- /dev/null
+++ b/arch/arm/boot/dts/omap446x.dtsi
@@ -0,0 +1,27 @@ 
+/*
+ * Device Tree Source for OMAP446x SoC
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "omap4.dtsi"
+
+/ {
+	cpus {
+		/* OMAP446x 'standard device' variants OPP50 to OPPTurbo */
+		cpu@0 {
+			operating-points = <
+				/* kHz    uV */
+				350000   975000
+				700000  1075000
+				920000  1200000
+			>;
+			clock-latency = <300000>; /* From omap-cpufreq driver */
+			voltage-tolerance = <2>; /* 2 % */
+		};
+	};
+};
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c
index 478e2ee..4c5c038 100644
--- a/arch/arm/mach-omap2/opp4xxx_data.c
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
@@ -116,21 +116,6 @@  struct omap_volt_data omap446x_vdd_core_volt_data[] = {
 };
 
 static struct omap_opp_def __initdata omap446x_opp_def_list[] = {
-	/* MPU OPP1 - OPP50 */
-	OPP_INITIALIZER("mpu", true, 350000000, OMAP4460_VDD_MPU_OPP50_UV),
-	/* MPU OPP2 - OPP100 */
-	OPP_INITIALIZER("mpu", true, 700000000, OMAP4460_VDD_MPU_OPP100_UV),
-	/* MPU OPP3 - OPP-Turbo */
-	OPP_INITIALIZER("mpu", true, 920000000, OMAP4460_VDD_MPU_OPPTURBO_UV),
-	/*
-	 * MPU OPP4 - OPP-Nitro + Disabled as the reference schematics
-	 * recommends TPS623631 - confirm and enable the opp in board file
-	 * XXX: May be we should enable these based on mpu capability and
-	 * Exception board files disable it...
-	 */
-	OPP_INITIALIZER("mpu", false, 1200000000, OMAP4460_VDD_MPU_OPPNITRO_UV),
-	/* MPU OPP4 - OPP-Nitro SpeedBin */
-	OPP_INITIALIZER("mpu", false, 1500000000, OMAP4460_VDD_MPU_OPPNITRO_UV),
 	/* L3 OPP1 - OPP50 */
 	OPP_INITIALIZER("l3_main_1", true, 100000000, OMAP4460_VDD_CORE_OPP50_UV),
 	/* L3 OPP2 - OPP100 */