cpufreq: imx: Add cpufreq driver for imx7D/Solo SOC
Subsystems (2)
PATCH 1/1 cpufreq: imx: Add cpufreq driver for imx7D/Solo SOC
The i.MX7Dual/Solo is a new series of the i.MX SOC family. The existing cpufreq driver for 'i.MX6' or 'cpufreq-dt' can NOT match the requirement of this new SOC. This patch adds the cpufreq driver for i.MX7Dual/Solo.
--- drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/imx7d-cpufreq.c | 257 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+) create mode 100644 drivers/cpufreq/imx7d-cpufreq.c
drivers/cpufreq/Kconfig.arm +10 -0
@@ -67,6 +67,16 @@ config ARM_IMX6Q_CPUFREQ If in doubt, say N. +config ARM_IMX7D_CPUFREQ + tristate "Freescale i.MX7 cpufreq support" + depends on ARCH_MXC + select PM_OPP + help + This adds cpufreq driver support for Freescale i.MX7Dual/Solo + series SoCs. + + If in doubt, say N. + config ARM_INTEGRATOR tristate "CPUfreq driver for ARM Integrator CPUs" depends on ARCH_INTEGRATOR
drivers/cpufreq/Makefile +1 -0
@@ -55,6 +55,7 @@ obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ) += hisi-acpu-cpufreq.o obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o +obj-$(CONFIG_ARM_IMX7D_CPUFREQ) += imx7d-cpufreq.o obj-$(CONFIG_ARM_INTEGRATOR) += integrator-cpufreq.o obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) += kirkwood-cpufreq.o obj-$(CONFIG_ARM_MT8173_CPUFREQ) += mt8173-cpufreq.o
drivers/cpufreq/imx7d-cpufreq.c new file +257 -0
257 lines not on this page · raw message
Signature · 1 line
1.9.1
Am Montag, den 23.11.2015, 22:07 +0800 schrieb Bai Ping:
Quoted 5 lines
The i.MX7Dual/Solo is a new series of the i.MX SOC family. The existing cpufreq driver for 'i.MX6' or 'cpufreq-dt' can NOT match the requirement of this new SOC. This patch adds the cpufreq driver for i.MX7Dual/Solo.
So, what are those requirements, which could not be matched with cpufreq-dt? We should really try to not add another cpufreq driver.
I don't see anything special in here. A single regulator and some clocks needing to be controlled in the right way. That's already handled for i.MX5 with cpufreq-dt. Please look up how it is done there and try to do it the same way for MX7, or provide substantial information why it couldn't be done.
Regards,
Lucas
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |
Quoted 8 lines · Lucas Stach
Am Montag, den 23.11.2015, 22:07 +0800 schrieb Bai Ping:
Quoted 5 lines
The i.MX7Dual/Solo is a new series of the i.MX SOC family. The existing cpufreq driver for 'i.MX6' or 'cpufreq-dt' can NOT match the requirement of this new SOC. This patch adds the cpufreq driver for i.MX7Dual/Solo.
So, what are those requirements, which could not be matched with cpufreq-dt? We should really try to not add another cpufreq driver.
the requirement is the PLL1 used to source the CPU core clock can NOT change frequency on the fly, during the PLL1 frequency change, not clock output from this PLL1 in a short time. this will lead to glitch to the core clock. so before we change the PLL1's frequency, we must switch the CPU core clock to another clock source, after the PLL1 frequency has been changed, we switch back core clock to PLL1.
Quoted 5 lines
I don't see anything special in here. A single regulator and some clocks needing to be controlled in the right way. That's already handled for i.MX5 with cpufreq-dt. Please look up how it is done there and try to do it the same way for MX7, or provide substantial information why it couldn't be done.
I have checked the i.MX5 cpufreq, As on i.MX5, no need to take care of the PLL's frequency change flow, so the cpufreq-dt is the best one to support cpufreq. But on i.MX7, the PLL design is not the same as on i.MX5, additional steps needed in CPU frequency changing flow. the issue that can NOT be tackled by cpufreq-dt is additional step used by PLL frequency change.
BR Jacky Bai
Quoted 3 lines
Regards,
Lucas
Am Dienstag, den 24.11.2015, 15:35 +0800 schrieb Bai Ping:
Quoted 23 lines · Lucas Stach
Quoted 8 lines
Am Montag, den 23.11.2015, 22:07 +0800 schrieb Bai Ping:
Quoted 5 lines
The i.MX7Dual/Solo is a new series of the i.MX SOC family. The existing cpufreq driver for 'i.MX6' or 'cpufreq-dt' can NOT match the requirement of this new SOC. This patch adds the cpufreq driver for i.MX7Dual/Solo.
So, what are those requirements, which could not be matched with cpufreq-dt? We should really try to not add another cpufreq driver.
the requirement is the PLL1 used to source the CPU core clock can NOT change frequency on the fly,
during the PLL1 frequency change, not clock output from this PLL1 in a short time. this will lead to glitch
to the core clock. so before we change the PLL1's frequency, we must switch the CPU core clock to another
clock source, after the PLL1 frequency has been changed, we switch back core clock to PLL1.Quoted 5 lines
I don't see anything special in here. A single regulator and some clocks needing to be controlled in the right way. That's already handled for i.MX5 with cpufreq-dt. Please look up how it is done there and try to do it the same way for MX7, or provide substantial information why it couldn't be done.
Quoted 7 lines
I have checked the i.MX5 cpufreq, As on i.MX5, no need to take care of the PLL's frequency change flow,
so the cpufreq-dt is the best one to support cpufreq. But on i.MX7, the PLL design is not the same as on i.MX5,
additional steps needed in CPU frequency changing flow. the issue that can NOT be tackled by cpufreq-dt is
additional step used by PLL frequency change.
This is wrong, we have the step clock requirement on MX5 as well, that's why I asked you to look into this. The MX5 clock controller provides a virtual ARM clock, that implements the proper clock switch flow. This allows to reuse cpufreq-dt, thus reducing code duplication in the cpufreq drivers greatly.
Regards,
Lucas
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |
Quoted 30 lines · Lucas Stach
Am Dienstag, den 24.11.2015, 15:35 +0800 schrieb Bai Ping:
Quoted 22 lines · Lucas Stach
Quoted 8 lines
Am Montag, den 23.11.2015, 22:07 +0800 schrieb Bai Ping:
Quoted 5 lines
The i.MX7Dual/Solo is a new series of the i.MX SOC family. The existing cpufreq driver for 'i.MX6' or 'cpufreq-dt' can NOT match the requirement of this new SOC. This patch adds the cpufreq driver for i.MX7Dual/Solo.
So, what are those requirements, which could not be matched with cpufreq-dt? We should really try to not add another cpufreq driver.
the requirement is the PLL1 used to source the CPU core clock can NOT change frequency on the fly,
during the PLL1 frequency change, not clock output from this PLL1 in a short time. this will lead to glitch
to the core clock. so before we change the PLL1's frequency, we must switch the CPU core clock to another
clock source, after the PLL1 frequency has been changed, we switch back core clock to PLL1.Quoted 5 lines
I don't see anything special in here. A single regulator and some clocks needing to be controlled in the right way. That's already handled for i.MX5 with cpufreq-dt. Please look up how it is done there and try to do it the same way for MX7, or provide substantial information why it couldn't be done.
Quoted 7 lines
I have checked the i.MX5 cpufreq, As on i.MX5, no need to take care of the PLL's frequency change flow,
so the cpufreq-dt is the best one to support cpufreq. But on i.MX7, the PLL design is not the same as on i.MX5,
additional steps needed in CPU frequency changing flow. the issue that can NOT be tackled by cpufreq-dt is
additional step used by PLL frequency change.
Quoted 5 lines
This is wrong, we have the step clock requirement on MX5 as well, that's why I asked you to look into this. The MX5 clock controller provides a virtual ARM clock, that implements the proper clock switch flow. This allows to reuse cpufreq-dt, thus reducing code duplication in the cpufreq drivers greatly.
Thanks for your reminder. It is my fault, I missed the imx_clk_cpu function. I will try using cpufreq-dt on i.MX7 just like i.MX5.
BR
Jacky Bai
Quoted 4 lines
Regards,
Lucas