cpufreq: sun50i: Add H616 support
authorMartin Botka <martin.botka@somainline.org>
Thu, 18 Apr 2024 15:44:06 +0000 (16:44 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 19 Apr 2024 07:04:27 +0000 (12:34 +0530)
commite2e2dcd2e944fe6167cb731864f8a1343f1bbee7
treebff5bb6410a2898171dc9b8dec12b544ce0f2b42
parentfa5aec9561cfc4f4370983ca5818c90227c9d90e
cpufreq: sun50i: Add H616 support

The Allwinner H616/H618 SoCs have different OPP tables per SoC version
and die revision. The SoC version is stored in NVMEM, as before, though
encoded differently. The die revision is in a different register, in the
SRAM controller. Firmware already exports that value in a standardised
way, through the SMCCC SoCID mechanism. We need both values, as some chips
have the same SoC version, but they don't support the same frequencies and
they get differentiated by the die revision.

Add the new compatible string and tie the new translation function to
it. This mechanism not only covers the original H616 SoC, but also its
very close sibling SoCs H618 and H700, so add them to the list as well.

Signed-off-by: Martin Botka <martin.botka@somainline.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/sun50i-cpufreq-nvmem.c