summaryrefslogtreecommitdiff
path: root/drivers/clk/rockchip/clk.h
diff options
context:
space:
mode:
authorXing Zheng <zhengxing@rock-chips.com>2016-03-10 11:47:01 +0800
committerHuang, Tao <huangtao@rock-chips.com>2016-03-15 17:51:57 +0800
commit85e725256d22e4b8ca47223b25ffabc0d909909b (patch)
treeb137877abbb85ffe1cf59fe7c7d083304bb87b99 /drivers/clk/rockchip/clk.h
parent6e7ff899c21f70bb26e546d66d25b654fda79d67 (diff)
UPSTREAM: clk: rockchip: add new pll-type for rk3399 and similar socs
The rk3399's pll and clock are similar with rk3036's, it different with base on the rk3066(rk3188, rk3288, rk3368 use it), there are different adjust foctors and control registers, so these should be independent and separate from the series of rk3066s. Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> (cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-clk/next commit 95e0c473a0ac1bdac25f55678dc602eb50dae684) Change-Id: I77872b5fb33eb92402e9036b97b185ea56eb45c6 Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Diffstat (limited to 'drivers/clk/rockchip/clk.h')
-rw-r--r--drivers/clk/rockchip/clk.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 836e488989ad..548970c4bab2 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -88,6 +88,7 @@ enum rockchip_pll_type {
pll_rk3036,
pll_rk3066,
pll_rk3366,
+ pll_rk3399,
};
#define RK3036_PLL_RATE(_rate, _refdiv, _fbdiv, _postdiv1, \
@@ -120,6 +121,18 @@ enum rockchip_pll_type {
.nb = _nb, \
}
+#define RK3399_PLL_RATE(_rate, _refdiv, _fbdiv, _postdiv1, \
+ _postdiv2, _dsmpd, _frac) \
+{ \
+ .rate = _rate##U, \
+ .fbdiv = _fbdiv, \
+ .postdiv1 = _postdiv1, \
+ .refdiv = _refdiv, \
+ .postdiv2 = _postdiv2, \
+ .dsmpd = _dsmpd, \
+ .frac = _frac, \
+}
+
/**
* struct rockchip_clk_provider - information about clock provider
* @reg_base: virtual address for the register base.
@@ -142,7 +155,7 @@ struct rockchip_pll_rate_table {
unsigned int nf;
unsigned int no;
unsigned int nb;
- /* for RK3036 */
+ /* for RK3036/RK3399 */
unsigned int fbdiv;
unsigned int postdiv1;
unsigned int refdiv;