cpufreq-cpu0: allow OPP table supplied by platform
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to of_init_opp_table() if there's no OPP table.
Which solution is better?
Thanks in advance,
Jisheng
Quoted 7 lines · Jisheng Zhang
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
Quoted 8 lines
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.Which solution is better?
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
But lets see with others have to say here..
--
viresh
Fixing Rafael's id.
Quoted 24 lines · Viresh Kumar
Quoted 7 lines · Jisheng Zhang
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
Quoted 8 lines
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.Which solution is better?
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
But lets see with others have to say here..
--
viresh
Fixing lakml :)
sorry
Quoted 28 lines · On Thu, 13 Mar 2014 03:56:46 -0700 Viresh Kumar <[email protected]> wrote:
Fixing Rafael's id.
Quoted 25 lines · Viresh Kumar
Quoted 7 lines · Jisheng Zhang
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
Quoted 8 lines
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.Which solution is better?
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
But lets see with others have to say here..
--
viresh
Quoted 32 lines · Jisheng Zhang
Fixing lakml :)
sorry
Quoted 25 lines · On Thu, 13 Mar 2014 03:56:46 -0700 Viresh Kumar <[email protected]> wrote:
Fixing Rafael's id.
Quoted 22 lines · Viresh Kumar
Quoted 7 lines · Jisheng Zhang
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
Quoted 8 lines
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.Which solution is better?
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
But lets see with others have to say here..
This might become useful for Zynq as well. We essentially allow to boot with all kind of different frequencies and depending on how the PLL, and clock registers get setup by the bootloader, certain frequencies may or may not become possible. Having a way to dynamically build an OPP table would probably be a nicer way than having to tell everybody to adjust the DT according to how the bootloader sets up the clocks.
Sören
Quoted 16 lines · Jisheng Zhang
Quoted 16 lines · Viresh Kumar
Quoted 15 lines · Jisheng Zhang
Quoted 14 lines
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Which solution is better?
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
But lets see with others have to say here..
Yea, we had gone for the second option on imx6q-cpufreq driver with commit 20b7cbe (cpufreq: imx6q: add of_init_opp_table).
Shawn
Quoted 19 lines · Shawn Guo
Quoted 18 lines · Jisheng Zhang
Quoted 18 lines · Viresh Kumar
Quoted 17 lines · Jisheng Zhang
Quoted 15 lines
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.Which solution is better?
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
But lets see with others have to say here..
Yea, we had gone for the second option on imx6q-cpufreq driver with commit 20b7cbe (cpufreq: imx6q: add
of_init_opp_table).
There might be a better alternative here given the scope of potential reuse cross SoCs - a generic opp modifier logic which'd work for all of us. I will let Dave Gerlach post his series to give an idea.
Signature · 2 lines
Regards, Nishanth Menon
Quoted 24 lines · Nishanth Menon
Quoted 23 lines · Shawn Guo
Quoted 22 lines · Jisheng Zhang
Quoted 22 lines · Viresh Kumar
Quoted 21 lines · Jisheng Zhang
Quoted 7 lines
Hi all,
cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue to address. The opp is different between chips even on the same step SoC, BG2Q for example. we can calculate the OPP table from the value of one OTP register. We have two solutions:
Quoted 8 lines
1. bootloader reads OTP register and calculate the OPP table then change dtb danamically
2. supply one driver in mach-berlin to initialize the OPP table; and modify cpufreq-cpu0 to allow platform supply OPP table, fall back to
of_init_opp_table()if there's no OPP table.Which solution is better?
I think we can go ahead with second option here. We can just check if opp tables are already initialized or not. In case they are, don't probe from dt..
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
But lets see with others have to say here..
Yea, we had gone for the second option on imx6q-cpufreq driver with commit 20b7cbe (cpufreq: imx6q: add
of_init_opp_table).There might be a better alternative here given the scope of potential reuse cross SoCs - a generic opp modifier logic which'd work for all of us. I will let Dave Gerlach post his series to give an idea.
I have posted an RFC for a small opp-modifier framework along with a driver that uses it to enable or disable OPPs based on a register value. I copied everyone from this thread but in case I forgot anyone the series is here http://marc.info/?l=linux-pm&m=139482524506817&w=2.
Regards,
Dave