ARM: OMAP2: AM33XX: Add cpufreq support
Subsystems (5)
cover ARM: OMAP2: AM33XX: Add cpufreq support
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(+)
Signature · 1 line
1.7.9.5
PATCH 1/2 ARM: OMAP2+: AM33XX: Add clock entries to omap_clk data
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.
--- arch/arm/mach-omap2/clock33xx_data.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/clock33xx_data.c +1 -0
@@ -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),
Signature · 1 line
1.7.9.5
PATCH 2/2 arm/dts: AM33XX: Add device tree OPP table
In reply to AnilKumar ChAdd 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.
--- 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(+)
arch/arm/boot/dts/am335x-bone.dts +6 -0
@@ -13,6 +13,12 @@ model = "TI AM335x BeagleBone"; compatible = "ti,am335x-bone", "ti,am33xx"; + cpus { + cpu@0 { + cpu0-supply = <&dcdc2_reg>; + }; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */
arch/arm/boot/dts/am335x-evm.dts +6 -0
@@ -13,6 +13,12 @@ model = "TI AM335x EVM"; compatible = "ti,am335x-evm", "ti,am33xx"; + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */
arch/arm/boot/dts/am33xx.dtsi +15 -0
@@ -25,6 +25,21 @@ cpus { cpu@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 */ }; };
Signature · 1 line
1.7.9.5
Re: [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table
+ Paul
Hi Anil,
Quoted 8 lines · AnilKumar Ch
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 <[email protected]>
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
Quoted 67 lines
--- 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(+)arch/arm/boot/dts/am335x-bone.dts +6
-0@@ -13,6 +13,12 @@ model = "TI AM335x BeagleBone"; compatible = "ti,am335x-bone", "ti,am33xx"; + cpus { + cpu@0 { + cpu0-supply = <&dcdc2_reg>; + }; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */arch/arm/boot/dts/am335x-evm.dts +6
-0@@ -13,6 +13,12 @@ model = "TI AM335x EVM"; compatible = "ti,am335x-evm", "ti,am33xx"; + cpus { + cpu@0 { + cpu0-supply = <&vdd1_reg>; + }; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */arch/arm/boot/dts/am33xx.dtsi +15
-0@@ -25,6 +25,21 @@ cpus { cpu@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 */ }; };
RE: [PATCH 2/2] arm/dts: AM33XX: Add device tree OPP table
Quoted 8 lines · Benoit
+ Paul
Hi Anil,
Quoted 3 lines · AnilKumar Ch
Add DT OPP table for AM33XX family of devices. This data is decoded by OF with
of_init_opp_table()helper function.
Quoted 7 lines
Quoted 5 lines
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 <[email protected]>I've just applied your patch in my for_3.7/dts_part2 branch.
Thanks Benoit,
Quoted 3 lines
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.
Quoted 3 lines
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