linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: OMAP2: AM33XX: Add cpufreq support
@ 2012-08-31  9:37 AnilKumar Ch
  2012-08-31  9:37 ` [PATCH 1/2] ARM: OMAP2+: AM33XX: Add clock entries to omap_clk data AnilKumar Ch
  2012-08-31  9:37 ` [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table AnilKumar Ch
  0 siblings, 2 replies; 5+ messages in thread
From: AnilKumar Ch @ 2012-08-31  9:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add cpufreq support to AM33XX family of devices by adding OPP
information, clock entry with cpu0 name and voltage supplies
to cpu0.

These patches have been tested on AM335x-EVM, AM335x-Bone and
these patches are based on cpufreq-cpu0 driver
http://marc.info/?l=linux-arm-kernel&m=134457735413293&w=2

AnilKumar Ch (2):
  ARM: OMAP2+: AM33XX: Add clock entries to omap_clk data
  arm/dts: AM33XX: Add device tree OPP table

 arch/arm/boot/dts/am335x-bone.dts    |    6 ++++++
 arch/arm/boot/dts/am335x-evm.dts     |    6 ++++++
 arch/arm/boot/dts/am33xx.dtsi        |   15 +++++++++++++++
 arch/arm/mach-omap2/clock33xx_data.c |    1 +
 4 files changed, 28 insertions(+)

-- 
1.7.9.5

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

* [PATCH 1/2] ARM: OMAP2+: AM33XX: Add clock entries to omap_clk data
  2012-08-31  9:37 [PATCH 0/2] ARM: OMAP2: AM33XX: Add cpufreq support AnilKumar Ch
@ 2012-08-31  9:37 ` AnilKumar Ch
  2012-08-31  9:37 ` [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table AnilKumar Ch
  1 sibling, 0 replies; 5+ messages in thread
From: AnilKumar Ch @ 2012-08-31  9:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add AM335x cpu0 clock entry to the corresponding clock data
file. This is useful in getting the correct mpu clock pointer
to change the cpu frequency in cpufreq driver.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/mach-omap2/clock33xx_data.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index 23251fa..7afefe8 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -1013,6 +1013,7 @@ static struct omap_clk am33xx_clks[] = {
 	CLK(NULL,	"dpll_core_m5_ck",	&dpll_core_m5_ck,	CK_AM33XX),
 	CLK(NULL,	"dpll_core_m6_ck",	&dpll_core_m6_ck,	CK_AM33XX),
 	CLK(NULL,	"dpll_mpu_ck",		&dpll_mpu_ck,	CK_AM33XX),
+	CLK("cpu0",	NULL,			&dpll_mpu_ck,		CK_AM33XX),
 	CLK(NULL,	"dpll_mpu_m2_ck",	&dpll_mpu_m2_ck,	CK_AM33XX),
 	CLK(NULL,	"dpll_ddr_ck",		&dpll_ddr_ck,	CK_AM33XX),
 	CLK(NULL,	"dpll_ddr_m2_ck",	&dpll_ddr_m2_ck,	CK_AM33XX),
-- 
1.7.9.5

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

* [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table
  2012-08-31  9:37 [PATCH 0/2] ARM: OMAP2: AM33XX: Add cpufreq support AnilKumar Ch
  2012-08-31  9:37 ` [PATCH 1/2] ARM: OMAP2+: AM33XX: Add clock entries to omap_clk data AnilKumar Ch
@ 2012-08-31  9:37 ` AnilKumar Ch
  2012-09-12 17:21   ` Benoit Cousson
  1 sibling, 1 reply; 5+ messages in thread
From: AnilKumar Ch @ 2012-08-31  9:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT OPP table for AM33XX family of devices. This data is
decoded by OF with of_init_opp_table() helper function.

Also adds cpu0 supply name to the corresponding dts files.
cpu0-supply name is used by cpufreq-cpu0 driver to get the
regulator pointer for voltage modifications.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
---
 arch/arm/boot/dts/am335x-bone.dts |    6 ++++++
 arch/arm/boot/dts/am335x-evm.dts  |    6 ++++++
 arch/arm/boot/dts/am33xx.dtsi     |   15 +++++++++++++++
 3 files changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index ce486fc..2767b5f 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -13,6 +13,12 @@
 	model = "TI AM335x BeagleBone";
 	compatible = "ti,am335x-bone", "ti,am33xx";
 
+	cpus {
+		cpu at 0 {
+			cpu0-supply = <&dcdc2_reg>;
+		};
+	};
+
 	memory {
 		device_type = "memory";
 		reg = <0x80000000 0x10000000>; /* 256 MB */
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index baa3276..54d972c 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -13,6 +13,12 @@
 	model = "TI AM335x EVM";
 	compatible = "ti,am335x-evm", "ti,am33xx";
 
+	cpus {
+		cpu at 0 {
+			cpu0-supply = <&vdd1_reg>;
+		};
+	};
+
 	memory {
 		device_type = "memory";
 		reg = <0x80000000 0x10000000>; /* 256 MB */
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index ab744d6..2043b53 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -25,6 +25,21 @@
 	cpus {
 		cpu at 0 {
 			compatible = "arm,cortex-a8";
+
+			/*
+			 * To consider voltage drop between PMIC and SoC,
+			 * tolerance value is reduced to 2% from 4% and
+			 * voltage value is increased as a precaution.
+			 */
+			operating-points = <
+				/* kHz    uV */
+				720000  1285000
+				600000  1225000
+				500000  1125000
+				275000  1125000
+			>;
+			voltage-tolerance = <2>; /* 2 percentage */
+			clock-latency = <300000>; /* From omap-cpufreq driver */
 		};
 	};
 
-- 
1.7.9.5

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

* [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table
  2012-08-31  9:37 ` [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table AnilKumar Ch
@ 2012-09-12 17:21   ` Benoit Cousson
  2012-09-13  6:23     ` AnilKumar, Chimata
  0 siblings, 1 reply; 5+ messages in thread
From: Benoit Cousson @ 2012-09-12 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

+ Paul

Hi Anil,

On 08/31/2012 11:37 AM, AnilKumar Ch wrote:
> Add DT OPP table for AM33XX family of devices. This data is
> decoded by OF with of_init_opp_table() helper function.
> 
> Also adds cpu0 supply name to the corresponding dts files.
> cpu0-supply name is used by cpufreq-cpu0 driver to get the
> regulator pointer for voltage modifications.
> 
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>

I've just applied your patch in my for_3.7/dts_part2 branch.

I changed the subject to use "ARM: dts: " prefix seems it seems to be
the convention nowadays.

I can apply as the well the clock patch if Paul acks it, but it can go
through Paul as well since there is no strong dependency between them AFAIK.

Thanks,
Benoit


> ---
>  arch/arm/boot/dts/am335x-bone.dts |    6 ++++++
>  arch/arm/boot/dts/am335x-evm.dts  |    6 ++++++
>  arch/arm/boot/dts/am33xx.dtsi     |   15 +++++++++++++++
>  3 files changed, 27 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
> index ce486fc..2767b5f 100644
> --- a/arch/arm/boot/dts/am335x-bone.dts
> +++ b/arch/arm/boot/dts/am335x-bone.dts
> @@ -13,6 +13,12 @@
>  	model = "TI AM335x BeagleBone";
>  	compatible = "ti,am335x-bone", "ti,am33xx";
>  
> +	cpus {
> +		cpu at 0 {
> +			cpu0-supply = <&dcdc2_reg>;
> +		};
> +	};
> +
>  	memory {
>  		device_type = "memory";
>  		reg = <0x80000000 0x10000000>; /* 256 MB */
> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
> index baa3276..54d972c 100644
> --- a/arch/arm/boot/dts/am335x-evm.dts
> +++ b/arch/arm/boot/dts/am335x-evm.dts
> @@ -13,6 +13,12 @@
>  	model = "TI AM335x EVM";
>  	compatible = "ti,am335x-evm", "ti,am33xx";
>  
> +	cpus {
> +		cpu at 0 {
> +			cpu0-supply = <&vdd1_reg>;
> +		};
> +	};
> +
>  	memory {
>  		device_type = "memory";
>  		reg = <0x80000000 0x10000000>; /* 256 MB */
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index ab744d6..2043b53 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -25,6 +25,21 @@
>  	cpus {
>  		cpu at 0 {
>  			compatible = "arm,cortex-a8";
> +
> +			/*
> +			 * To consider voltage drop between PMIC and SoC,
> +			 * tolerance value is reduced to 2% from 4% and
> +			 * voltage value is increased as a precaution.
> +			 */
> +			operating-points = <
> +				/* kHz    uV */
> +				720000  1285000
> +				600000  1225000
> +				500000  1125000
> +				275000  1125000
> +			>;
> +			voltage-tolerance = <2>; /* 2 percentage */
> +			clock-latency = <300000>; /* From omap-cpufreq driver */
>  		};
>  	};
>  
> 

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

* [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table
  2012-09-12 17:21   ` Benoit Cousson
@ 2012-09-13  6:23     ` AnilKumar, Chimata
  0 siblings, 0 replies; 5+ messages in thread
From: AnilKumar, Chimata @ 2012-09-13  6:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 12, 2012 at 22:51:55, Cousson, Benoit wrote:
> + Paul
> 
> Hi Anil,
> 
> On 08/31/2012 11:37 AM, AnilKumar Ch wrote:
> > Add DT OPP table for AM33XX family of devices. This data is
> > decoded by OF with of_init_opp_table() helper function.
> > 
> > Also adds cpu0 supply name to the corresponding dts files.
> > cpu0-supply name is used by cpufreq-cpu0 driver to get the
> > regulator pointer for voltage modifications.
> > 
> > Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> 
> I've just applied your patch in my for_3.7/dts_part2 branch.

Thanks Benoit,

> 
> I changed the subject to use "ARM: dts: " prefix seems it seems to be
> the convention nowadays.

I will take care from next time onwards.

> 
> I can apply as the well the clock patch if Paul acks it, but it can go
> through Paul as well since there is no strong dependency between them AFAIK.

Paul,

Can you ACK "clock data entry" patch?

Thanks
AnilKumar

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

end of thread, other threads:[~2012-09-13  6:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31  9:37 [PATCH 0/2] ARM: OMAP2: AM33XX: Add cpufreq support AnilKumar Ch
2012-08-31  9:37 ` [PATCH 1/2] ARM: OMAP2+: AM33XX: Add clock entries to omap_clk data AnilKumar Ch
2012-08-31  9:37 ` [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table AnilKumar Ch
2012-09-12 17:21   ` Benoit Cousson
2012-09-13  6:23     ` AnilKumar, Chimata

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