Lines Matching +full:step +full:- +full:down
1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <linux/nvmem-consumer.h>
31 STEP, enumerator
45 { .id = "step" },
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()
137 clk_set_parent(clks[STEP].clk, clks[SECONDARY_SEL].clk); in imx6q_set_target()
138 clk_set_parent(clks[PLL1_SW].clk, clks[STEP].clk); in imx6q_set_target()
144 clk_set_parent(clks[STEP].clk, clks[PLL2_PFD2_396M].clk); in imx6q_set_target()
145 clk_set_parent(clks[PLL1_SW].clk, clks[STEP].clk); in imx6q_set_target()
169 /* PLL1 is only needed until after ARM-PODF is set. */ in imx6q_set_target()
173 /* scaling down? scale voltage after frequency */ in imx6q_set_target()
178 "failed to scale vddarm down: %d\n", ret); in imx6q_set_target()
181 dev_warn(cpu_dev, "failed to scale vddsoc down: %d\n", ret); in imx6q_set_target()
185 dev_warn(cpu_dev, "failed to scale vddpu down: %d\n", ret); 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",
218 if (ret < 0 && ret != -ENODEV) in imx6x_disable_freq_in_opp()
233 if (of_property_present(dev->of_node, "nvmem-cells")) { in imx6q_opp_check_speed_grading()
240 ocotp = syscon_regmap_lookup_by_compatible("fsl,imx6q-ocotp"); in imx6q_opp_check_speed_grading()
242 return -ENOENT; in imx6q_opp_check_speed_grading()
248 * 2b'01: 852000000Hz; -- i.MX6Q Only, exclusive with 996MHz. in imx6q_opp_check_speed_grading()
282 if (of_property_present(dev->of_node, "nvmem-cells")) { in imx6ul_opp_check_speed_grading()
289 ocotp = syscon_regmap_lookup_by_compatible("fsl,imx6ul-ocotp"); in imx6ul_opp_check_speed_grading()
291 ocotp = syscon_regmap_lookup_by_compatible("fsl,imx6ull-ocotp"); in imx6ul_opp_check_speed_grading()
294 return -ENOENT; in imx6ul_opp_check_speed_grading()
338 return -ENODEV; in imx6q_cpufreq_probe()
341 np = of_node_get(cpu_dev->of_node); in imx6q_cpufreq_probe()
344 return -ENOENT; in imx6q_cpufreq_probe()
360 if (PTR_ERR(arm_reg) == -EPROBE_DEFER || in imx6q_cpufreq_probe()
361 PTR_ERR(soc_reg) == -EPROBE_DEFER || in imx6q_cpufreq_probe()
362 PTR_ERR(pu_reg) == -EPROBE_DEFER) { in imx6q_cpufreq_probe()
363 ret = -EPROBE_DEFER; in imx6q_cpufreq_probe()
369 ret = -ENOENT; in imx6q_cpufreq_probe()
407 ret = -ENOMEM; in imx6q_cpufreq_probe()
411 prop = of_find_property(np, "fsl,soc-operating-points", NULL); in imx6q_cpufreq_probe()
412 if (!prop || !prop->value) in imx6q_cpufreq_probe()
417 * voltage like <freq-kHz vol-uV>. in imx6q_cpufreq_probe()
419 nr = prop->length / sizeof(u32); in imx6q_cpufreq_probe()
424 val = prop->value; in imx6q_cpufreq_probe()
438 …dev_warn(cpu_dev, "can NOT find valid fsl,soc-operating-points property in dtb, use default value!… in imx6q_cpufreq_probe()
441 if (freq_table[num - 1].frequency * 1000 == FREQ_1P2_GHZ) in imx6q_cpufreq_probe()
442 imx6_soc_volt[num - 1] = PU_SOC_VOLTAGE_HIGH; in imx6q_cpufreq_probe()
445 if (of_property_read_u32(np, "clock-latency", &transition_latency)) in imx6q_cpufreq_probe()
452 ret = regulator_set_voltage_time(soc_reg, imx6_soc_volt[0], imx6_soc_volt[num - 1]); in imx6q_cpufreq_probe()
456 ret = regulator_set_voltage_time(pu_reg, imx6_soc_volt[0], imx6_soc_volt[num - 1]); in imx6q_cpufreq_probe()
466 max_freq = freq_table[--num].frequency; in imx6q_cpufreq_probe()
522 .name = "imx6q-cpufreq",
529 MODULE_ALIAS("platform:imx6q-cpufreq");