Lines Matching +full:freq +full:- +full:table +full:- +full:hz
1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <linux/nvmem-consumer.h>
83 dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n", in imx6q_set_target()
116 * - Enable pll2_pfd2_396m_clk and reparent pll1_sw_clk to it in imx6q_set_target()
117 * - Reprogram pll1_sys_clk and reparent pll1_sw_clk back to it in imx6q_set_target()
118 * - Disable pll2_pfd2_396m_clk in imx6q_set_target()
169 /* PLL1 is only needed until after ARM-PODF is set. */ in imx6q_set_target()
194 policy->clk = clks[ARM].clk; in imx6q_cpufreq_init()
196 policy->suspend_freq = max_freq; in imx6q_cpufreq_init()
209 .name = "imx6q-cpufreq",
213 static void imx6x_disable_freq_in_opp(struct device *dev, unsigned long freq) in imx6x_disable_freq_in_opp() argument
215 int ret = dev_pm_opp_disable(dev, freq); in imx6x_disable_freq_in_opp()
217 if (ret < 0 && ret != -ENODEV) in imx6x_disable_freq_in_opp()
218 dev_warn(dev, "failed to disable %ldMHz OPP\n", freq / 1000000); in imx6x_disable_freq_in_opp()
232 if (of_property_present(dev->of_node, "nvmem-cells")) { in imx6q_opp_check_speed_grading()
239 ocotp = syscon_regmap_lookup_by_compatible("fsl,imx6q-ocotp"); in imx6q_opp_check_speed_grading()
241 return -ENOENT; in imx6q_opp_check_speed_grading()
245 * 2b'11: 1200000000Hz; in imx6q_opp_check_speed_grading()
246 * 2b'10: 996000000Hz; in imx6q_opp_check_speed_grading()
247 * 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz. in imx6q_opp_check_speed_grading()
248 * 2b'00: 792000000Hz; in imx6q_opp_check_speed_grading()
281 if (of_property_present(dev->of_node, "nvmem-cells")) { in imx6ul_opp_check_speed_grading()
288 ocotp = syscon_regmap_lookup_by_compatible("fsl,imx6ul-ocotp"); in imx6ul_opp_check_speed_grading()
290 ocotp = syscon_regmap_lookup_by_compatible("fsl,imx6ull-ocotp"); in imx6ul_opp_check_speed_grading()
293 return -ENOENT; in imx6ul_opp_check_speed_grading()
301 * 2b'01: 528000000Hz; in imx6ul_opp_check_speed_grading()
302 * 2b'10: 696000000Hz on i.MX6UL, 792000000Hz on i.MX6ULL; in imx6ul_opp_check_speed_grading()
303 * 2b'11: 900000000Hz on i.MX6ULL only; in imx6ul_opp_check_speed_grading()
337 return -ENODEV; in imx6q_cpufreq_probe()
340 np = of_node_get(cpu_dev->of_node); in imx6q_cpufreq_probe()
343 return -ENOENT; in imx6q_cpufreq_probe()
359 if (PTR_ERR(arm_reg) == -EPROBE_DEFER || in imx6q_cpufreq_probe()
360 PTR_ERR(soc_reg) == -EPROBE_DEFER || in imx6q_cpufreq_probe()
361 PTR_ERR(pu_reg) == -EPROBE_DEFER) { in imx6q_cpufreq_probe()
362 ret = -EPROBE_DEFER; in imx6q_cpufreq_probe()
368 ret = -ENOENT; in imx6q_cpufreq_probe()
374 dev_err(cpu_dev, "failed to init OPP table: %d\n", ret); in imx6q_cpufreq_probe()
392 dev_err(cpu_dev, "no OPP table is found: %d\n", ret); in imx6q_cpufreq_probe()
398 dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret); in imx6q_cpufreq_probe()
406 ret = -ENOMEM; in imx6q_cpufreq_probe()
410 prop = of_find_property(np, "fsl,soc-operating-points", NULL); in imx6q_cpufreq_probe()
411 if (!prop || !prop->value) in imx6q_cpufreq_probe()
416 * voltage like <freq-kHz vol-uV>. in imx6q_cpufreq_probe()
418 nr = prop->length / sizeof(u32); in imx6q_cpufreq_probe()
423 val = prop->value; in imx6q_cpufreq_probe()
425 unsigned long freq = be32_to_cpup(val++); in imx6q_cpufreq_probe() local
427 if (freq_table[j].frequency == freq) { in imx6q_cpufreq_probe()
437 …dev_warn(cpu_dev, "can NOT find valid fsl,soc-operating-points property in dtb, use default value!… in imx6q_cpufreq_probe()
440 if (freq_table[num - 1].frequency * 1000 == FREQ_1P2_GHZ) in imx6q_cpufreq_probe()
441 imx6_soc_volt[num - 1] = PU_SOC_VOLTAGE_HIGH; in imx6q_cpufreq_probe()
444 if (of_property_read_u32(np, "clock-latency", &transition_latency)) in imx6q_cpufreq_probe()
451 ret = regulator_set_voltage_time(soc_reg, imx6_soc_volt[0], imx6_soc_volt[num - 1]); in imx6q_cpufreq_probe()
455 ret = regulator_set_voltage_time(pu_reg, imx6_soc_volt[0], imx6_soc_volt[num - 1]); in imx6q_cpufreq_probe()
465 max_freq = freq_table[--num].frequency; in imx6q_cpufreq_probe()
521 .name = "imx6q-cpufreq",
528 MODULE_ALIAS("platform:imx6q-cpufreq");