Lines Matching full:avs
56 /* AVS register set */
77 /* AVS value for the corresponding voltage (in mV) */
101 u32 avs[LOAD_LEVEL_NR]; member
182 * Find out the armada 37x supported AVS value whose voltage value is
187 u32 avs; in armada_37xx_avs_val_match() local
190 for (avs = 0; avs < ARRAY_SIZE(avs_map); avs++) in armada_37xx_avs_val_match()
191 if (avs_map[avs] >= target_vm) in armada_37xx_avs_val_match()
198 if (avs == ARRAY_SIZE(avs_map)) in armada_37xx_avs_val_match()
199 avs = ARRAY_SIZE(avs_map) - 1; in armada_37xx_avs_val_match()
201 return avs; in armada_37xx_avs_val_match()
205 * For Armada 37xx soc, L0(VSET0) VDD AVS value is set to SVC revision
211 * This function calculates L1 & L2 & L3 AVS values dynamically based
212 * on L0 voltage and fill all AVS values to the AVS value table.
214 * minimal avs value for load L1.
234 dvfs->avs[0] = l0_vdd_min; in armada37xx_cpufreq_avs_configure()
244 dvfs->avs[load_level] = avs_min; in armada37xx_cpufreq_avs_configure()
247 * Set the avs values for load L0 and L1 when base CPU frequency in armada37xx_cpufreq_avs_configure()
256 dvfs->avs[0] = dvfs->avs[1] = avs_min; in armada37xx_cpufreq_avs_configure()
269 dvfs->avs[1] = armada_37xx_avs_val_match(target_vm); in armada37xx_cpufreq_avs_configure()
277 dvfs->avs[2] = dvfs->avs[3] = armada_37xx_avs_val_match(target_vm); in armada37xx_cpufreq_avs_configure()
280 * Fix the avs value for load L1 when base CPU frequency is 1000/1200 MHz, in armada37xx_cpufreq_avs_configure()
282 * Also ensure that avs value for load L1 is not higher than for L0. in armada37xx_cpufreq_avs_configure()
292 if (avs_min_l1 > dvfs->avs[0]) in armada37xx_cpufreq_avs_configure()
293 avs_min_l1 = dvfs->avs[0]; in armada37xx_cpufreq_avs_configure()
295 if (dvfs->avs[1] < avs_min_l1) in armada37xx_cpufreq_avs_configure()
296 dvfs->avs[1] = avs_min_l1; in armada37xx_cpufreq_avs_configure()
309 /* Disable AVS before the configuration */ in armada37xx_cpufreq_avs_setup()
321 avs_val = dvfs->avs[load_level]; in armada37xx_cpufreq_avs_setup()
329 /* Enable AVS after the configuration */ in armada37xx_cpufreq_avs_setup()
421 syscon_regmap_lookup_by_compatible("marvell,armada-3700-avs"); in armada37xx_cpufreq_driver_init()
423 /* if AVS is not present don't use it but still try to setup dvfs */ in armada37xx_cpufreq_driver_init()
487 unsigned long u_volt = avs_map[dvfs->avs[load_lvl]] * 1000; in armada37xx_cpufreq_driver_init()