voltage frequency pairs


The Tegra TX1 has predefined Frequency / Voltage pairs. I can get the frequency values at /sys/devices/system/cpu/cpu0/cpufreq/. Where can I find the corresponding voltage values?

Thankyou for your time.

The voltage scaling resides at tegra_cl_dvfs.c of kernel/drivers/platform/tegra. It scales VDD_CORE and VDD_CPU power rail voltage based on the frequency request. This voltage-scaling mechanism very much depends on the platform.

Hello again,

I tried to go through the long 4000 line code file you suggested. For the love of God, I could not find the voltage pairs or the function which is used to calculate it. The functions look the same for my untrained eye.

Is there any other way to find the voltage corresponding to a particular frequency? I was of the opinion that they are “fixed” for a particular frequency and should be in the form of a table/LUT. Please let me know.

In “dvfs” “vfs” means voltage and frequency scaling. The dvfs files have tables listed as structs or arrays. Values correspond to what you might see in “/sys” files. For example, if you look at “/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies” you’ll see a lot of space-delimited large numbers. One I’m looking has:

102000 204000 307200 403200 518400 614400 710400 825600 921600 1036800 1132800 1224000 1326000 1428000 1555500 1632000 1734000

Since the Tegra X1 is the tegra21x series, look at tegra21_dvfs.c, and search for those numbers. You’ll find that some numbers are tied to the others based on the row of an array or the grouping in a struct. You may have to adjust order of magnitude since scaling may be something like millivolts or microvolts.

Yes, tx1 is tegra210. The mechanism for the voltage scaling is based on intended CPU frequency and coefficient table, the hardware (closed-loop dvfs) will come up with an appropriate voltage and go thru i2c to program PMIC power rails. Not a simple one-on-one frequency/voltage mapping.