Lines Matching full:avs

56 /* AVS register set */
77 /* AVS value for the corresponding voltage (in mV) */
101 u32 avs[LOAD_LEVEL_NR]; member
186 * Find out the armada 37x supported AVS value whose voltage value is
191 u32 avs; in armada_37xx_avs_val_match() local
194 for (avs = 0; avs < ARRAY_SIZE(avs_map); avs++) in armada_37xx_avs_val_match()
195 if (avs_map[avs] >= target_vm) in armada_37xx_avs_val_match()
202 if (avs == ARRAY_SIZE(avs_map)) in armada_37xx_avs_val_match()
203 avs = ARRAY_SIZE(avs_map) - 1; in armada_37xx_avs_val_match()
205 return avs; in armada_37xx_avs_val_match()
209 * For Armada 37xx soc, L0(VSET0) VDD AVS value is set to SVC revision
215 * This function calculates L1 & L2 & L3 AVS values dynamically based
216 * on L0 voltage and fill all AVS values to the AVS value table.
218 * minimal avs value for load L1.
238 dvfs->avs[0] = l0_vdd_min; in armada37xx_cpufreq_avs_configure()
248 dvfs->avs[load_level] = avs_min; in armada37xx_cpufreq_avs_configure()
251 * Set the avs values for load L0 and L1 when base CPU frequency in armada37xx_cpufreq_avs_configure()
260 dvfs->avs[0] = dvfs->avs[1] = avs_min; in armada37xx_cpufreq_avs_configure()
273 dvfs->avs[1] = armada_37xx_avs_val_match(target_vm); in armada37xx_cpufreq_avs_configure()
281 dvfs->avs[2] = dvfs->avs[3] = armada_37xx_avs_val_match(target_vm); in armada37xx_cpufreq_avs_configure()
284 * Fix the avs value for load L1 when base CPU frequency is 1000/1200 MHz, in armada37xx_cpufreq_avs_configure()
286 * Also ensure that avs value for load L1 is not higher than for L0. in armada37xx_cpufreq_avs_configure()
296 if (avs_min_l1 > dvfs->avs[0]) in armada37xx_cpufreq_avs_configure()
297 avs_min_l1 = dvfs->avs[0]; in armada37xx_cpufreq_avs_configure()
299 if (dvfs->avs[1] < avs_min_l1) in armada37xx_cpufreq_avs_configure()
300 dvfs->avs[1] = avs_min_l1; in armada37xx_cpufreq_avs_configure()
313 /* Disable AVS before the configuration */ in armada37xx_cpufreq_avs_setup()
325 avs_val = dvfs->avs[load_level]; in armada37xx_cpufreq_avs_setup()
333 /* Enable AVS after the configuration */ in armada37xx_cpufreq_avs_setup()
425 syscon_regmap_lookup_by_compatible("marvell,armada-3700-avs"); in armada37xx_cpufreq_driver_init()
427 /* if AVS is not present don't use it but still try to setup dvfs */ in armada37xx_cpufreq_driver_init()
491 unsigned long u_volt = avs_map[dvfs->avs[load_lvl]] * 1000; in armada37xx_cpufreq_driver_init()