OSDN Git Service

clk: tegra: dfll: support PWM regulator control
authorJoseph Lo <josephl@nvidia.com>
Fri, 4 Jan 2019 03:06:49 +0000 (11:06 +0800)
committerThierry Reding <treding@nvidia.com>
Wed, 6 Feb 2019 13:28:55 +0000 (14:28 +0100)
commit36541f0499fe02541de8edbcb05e6536104b11d2
tree6f9372aeafcb320bb152ea75eb53ef8f5a27f7f0
parentb3cf8d0695056a370276c416979277635c3e4299
clk: tegra: dfll: support PWM regulator control

The DFLL hardware supports two modes (I2C and PWM) for voltage control
when requesting a frequency. In this patch, we introduce PWM mode support.

To support that, we re-organize the LUT for unifying the table for both
cases of I2C and PWM mode. And generate that based on regulator info.
For the PWM-based regulator, we get this info from DT. And do the same as
the case of I2C LUT, which can help to map the PMIC voltage ID and voltages
that the regulator supported.

The other parts are the support code for initializing the DFLL hardware
to support PWM mode. Also, the register debugfs file is slightly
reworked to only show the i2c registers when I2C mode is in use.

Based on the work of Peter De Schrijver <pdeschrijver@nvidia.com>.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/clk/tegra/clk-dfll.c