@@ -165,12 +165,20 @@ static const unsigned long exynos5x_clk_regs[] __initconst = {
165
165
GATE_BUS_CPU ,
166
166
GATE_SCLK_CPU ,
167
167
CLKOUT_CMU_CPU ,
168
+ APLL_CON0 ,
169
+ KPLL_CON0 ,
170
+ CPLL_CON0 ,
171
+ DPLL_CON0 ,
168
172
EPLL_CON0 ,
169
173
EPLL_CON1 ,
170
174
EPLL_CON2 ,
171
175
RPLL_CON0 ,
172
176
RPLL_CON1 ,
173
177
RPLL_CON2 ,
178
+ IPLL_CON0 ,
179
+ SPLL_CON0 ,
180
+ VPLL_CON0 ,
181
+ MPLL_CON0 ,
174
182
SRC_TOP0 ,
175
183
SRC_TOP1 ,
176
184
SRC_TOP2 ,
@@ -605,7 +613,8 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
605
613
MUX (0 , "mout_aclk66" , mout_group1_p , SRC_TOP1 , 8 , 2 ),
606
614
MUX (0 , "mout_aclk166" , mout_group1_p , SRC_TOP1 , 24 , 2 ),
607
615
608
- MUX (0 , "mout_aclk_g3d" , mout_group5_p , SRC_TOP2 , 16 , 1 ),
616
+ MUX_F (0 , "mout_aclk_g3d" , mout_group5_p , SRC_TOP2 , 16 , 1 ,
617
+ CLK_SET_RATE_PARENT , 0 ),
609
618
610
619
MUX (0 , "mout_user_aclk400_isp" , mout_user_aclk400_isp_p ,
611
620
SRC_TOP3 , 0 , 1 ),
@@ -647,8 +656,8 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
647
656
SRC_TOP5 , 8 , 1 ),
648
657
MUX (0 , "mout_user_aclk266_g2d" , mout_user_aclk266_g2d_p ,
649
658
SRC_TOP5 , 12 , 1 ),
650
- MUX (CLK_MOUT_G3D , "mout_user_aclk_g3d" , mout_user_aclk_g3d_p ,
651
- SRC_TOP5 , 16 , 1 ),
659
+ MUX_F (CLK_MOUT_G3D , "mout_user_aclk_g3d" , mout_user_aclk_g3d_p ,
660
+ SRC_TOP5 , 16 , 1 , CLK_SET_RATE_PARENT , 0 ),
652
661
MUX (0 , "mout_user_aclk300_jpeg" , mout_user_aclk300_jpeg_p ,
653
662
SRC_TOP5 , 20 , 1 ),
654
663
MUX (CLK_MOUT_USER_ACLK300_DISP1 , "mout_user_aclk300_disp1" ,
@@ -657,7 +666,8 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
657
666
mout_user_aclk300_gscl_p , SRC_TOP5 , 28 , 1 ),
658
667
659
668
MUX (0 , "mout_sclk_mpll" , mout_mpll_p , SRC_TOP6 , 0 , 1 ),
660
- MUX (CLK_MOUT_VPLL , "mout_sclk_vpll" , mout_vpll_p , SRC_TOP6 , 4 , 1 ),
669
+ MUX_F (CLK_MOUT_VPLL , "mout_sclk_vpll" , mout_vpll_p , SRC_TOP6 , 4 , 1 ,
670
+ CLK_SET_RATE_PARENT , 0 ),
661
671
MUX (CLK_MOUT_SCLK_SPLL , "mout_sclk_spll" , mout_spll_p , SRC_TOP6 , 8 , 1 ),
662
672
MUX (0 , "mout_sclk_ipll" , mout_ipll_p , SRC_TOP6 , 12 , 1 ),
663
673
MUX (0 , "mout_sclk_rpll" , mout_rpll_p , SRC_TOP6 , 16 , 1 ),
@@ -701,7 +711,8 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
701
711
SRC_TOP12 , 8 , 1 ),
702
712
MUX (0 , "mout_sw_aclk266_g2d" , mout_sw_aclk266_g2d_p ,
703
713
SRC_TOP12 , 12 , 1 ),
704
- MUX (0 , "mout_sw_aclk_g3d" , mout_sw_aclk_g3d_p , SRC_TOP12 , 16 , 1 ),
714
+ MUX_F (0 , "mout_sw_aclk_g3d" , mout_sw_aclk_g3d_p , SRC_TOP12 , 16 , 1 ,
715
+ CLK_SET_RATE_PARENT , 0 ),
705
716
MUX (0 , "mout_sw_aclk300_jpeg" , mout_sw_aclk300_jpeg_p ,
706
717
SRC_TOP12 , 20 , 1 ),
707
718
MUX (CLK_MOUT_SW_ACLK300 , "mout_sw_aclk300_disp1" ,
@@ -798,8 +809,8 @@ static const struct samsung_div_clock exynos5x_div_clks[] __initconst = {
798
809
DIV_TOP2 , 8 , 3 ),
799
810
DIV (CLK_DOUT_ACLK266_G2D , "dout_aclk266_g2d" , "mout_aclk266_g2d" ,
800
811
DIV_TOP2 , 12 , 3 ),
801
- DIV (CLK_DOUT_ACLK_G3D , "dout_aclk_g3d" , "mout_aclk_g3d" , DIV_TOP2 ,
802
- 16 , 3 ),
812
+ DIV_F (CLK_DOUT_ACLK_G3D , "dout_aclk_g3d" , "mout_aclk_g3d" , DIV_TOP2 ,
813
+ 16 , 3 , CLK_SET_RATE_PARENT , 0 ),
803
814
DIV (CLK_DOUT_ACLK300_JPEG , "dout_aclk300_jpeg" , "mout_aclk300_jpeg" ,
804
815
DIV_TOP2 , 20 , 3 ),
805
816
DIV (CLK_DOUT_ACLK300_DISP1 , "dout_aclk300_disp1" ,
@@ -1172,8 +1183,6 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {
1172
1183
GATE (CLK_SCLK_ISP_SENSOR2 , "sclk_isp_sensor2" , "dout_isp_sensor2" ,
1173
1184
GATE_TOP_SCLK_ISP , 12 , CLK_SET_RATE_PARENT , 0 ),
1174
1185
1175
- GATE (CLK_G3D , "g3d" , "mout_user_aclk_g3d" , GATE_IP_G3D , 9 , 0 , 0 ),
1176
-
1177
1186
/* CDREX */
1178
1187
GATE (CLK_CLKM_PHY0 , "clkm_phy0" , "dout_sclk_cdrex" ,
1179
1188
GATE_BUS_CDREX0 , 0 , 0 , 0 ),
@@ -1248,6 +1257,16 @@ static struct exynos5_subcmu_reg_dump exynos5x_gsc_suspend_regs[] = {
1248
1257
{ DIV2_RATIO0 , 0 , 0x30 }, /* DIV dout_gscl_blk_300 */
1249
1258
};
1250
1259
1260
+ static const struct samsung_gate_clock exynos5x_g3d_gate_clks [] __initconst = {
1261
+ GATE (CLK_G3D , "g3d" , "mout_user_aclk_g3d" , GATE_IP_G3D , 9 ,
1262
+ CLK_SET_RATE_PARENT , 0 ),
1263
+ };
1264
+
1265
+ static struct exynos5_subcmu_reg_dump exynos5x_g3d_suspend_regs [] = {
1266
+ { GATE_IP_G3D , 0x3ff , 0x3ff }, /* G3D gates */
1267
+ { SRC_TOP5 , 0 , BIT (16 ) }, /* MUX mout_user_aclk_g3d */
1268
+ };
1269
+
1251
1270
static const struct samsung_div_clock exynos5x_mfc_div_clks [] __initconst = {
1252
1271
DIV (0 , "dout_mfc_blk" , "mout_user_aclk333" , DIV4_RATIO , 0 , 2 ),
1253
1272
};
@@ -1320,6 +1339,14 @@ static const struct exynos5_subcmu_info exynos5x_gsc_subcmu = {
1320
1339
.pd_name = "GSC" ,
1321
1340
};
1322
1341
1342
+ static const struct exynos5_subcmu_info exynos5x_g3d_subcmu = {
1343
+ .gate_clks = exynos5x_g3d_gate_clks ,
1344
+ .nr_gate_clks = ARRAY_SIZE (exynos5x_g3d_gate_clks ),
1345
+ .suspend_regs = exynos5x_g3d_suspend_regs ,
1346
+ .nr_suspend_regs = ARRAY_SIZE (exynos5x_g3d_suspend_regs ),
1347
+ .pd_name = "G3D" ,
1348
+ };
1349
+
1323
1350
static const struct exynos5_subcmu_info exynos5x_mfc_subcmu = {
1324
1351
.div_clks = exynos5x_mfc_div_clks ,
1325
1352
.nr_div_clks = ARRAY_SIZE (exynos5x_mfc_div_clks ),
@@ -1351,13 +1378,15 @@ static const struct exynos5_subcmu_info exynos5800_mau_subcmu = {
1351
1378
static const struct exynos5_subcmu_info * exynos5x_subcmus [] = {
1352
1379
& exynos5x_disp_subcmu ,
1353
1380
& exynos5x_gsc_subcmu ,
1381
+ & exynos5x_g3d_subcmu ,
1354
1382
& exynos5x_mfc_subcmu ,
1355
1383
& exynos5x_mscl_subcmu ,
1356
1384
};
1357
1385
1358
1386
static const struct exynos5_subcmu_info * exynos5800_subcmus [] = {
1359
1387
& exynos5x_disp_subcmu ,
1360
1388
& exynos5x_gsc_subcmu ,
1389
+ & exynos5x_g3d_subcmu ,
1361
1390
& exynos5x_mfc_subcmu ,
1362
1391
& exynos5x_mscl_subcmu ,
1363
1392
& exynos5800_mau_subcmu ,
@@ -1414,6 +1443,17 @@ static const struct samsung_pll_rate_table exynos5420_epll_24mhz_tbl[] = {
1414
1443
PLL_36XX_RATE (24 * MHZ , 32768001U , 131 , 3 , 5 , 4719 ),
1415
1444
};
1416
1445
1446
+ static const struct samsung_pll_rate_table exynos5420_vpll_24mhz_tbl [] = {
1447
+ PLL_35XX_RATE (24 * MHZ , 600000000U , 200 , 2 , 2 ),
1448
+ PLL_35XX_RATE (24 * MHZ , 543000000U , 181 , 2 , 2 ),
1449
+ PLL_35XX_RATE (24 * MHZ , 480000000U , 160 , 2 , 2 ),
1450
+ PLL_35XX_RATE (24 * MHZ , 420000000U , 140 , 2 , 2 ),
1451
+ PLL_35XX_RATE (24 * MHZ , 350000000U , 175 , 3 , 2 ),
1452
+ PLL_35XX_RATE (24 * MHZ , 266000000U , 266 , 3 , 3 ),
1453
+ PLL_35XX_RATE (24 * MHZ , 177000000U , 118 , 2 , 3 ),
1454
+ PLL_35XX_RATE (24 * MHZ , 100000000U , 200 , 3 , 4 ),
1455
+ };
1456
+
1417
1457
static struct samsung_pll_clock exynos5x_plls [nr_plls ] __initdata = {
1418
1458
[apll ] = PLL (pll_2550 , CLK_FOUT_APLL , "fout_apll" , "fin_pll" , APLL_LOCK ,
1419
1459
APLL_CON0 , NULL ),
@@ -1538,6 +1578,7 @@ static void __init exynos5x_clk_init(struct device_node *np,
1538
1578
exynos5x_plls [apll ].rate_table = exynos5420_pll2550x_24mhz_tbl ;
1539
1579
exynos5x_plls [epll ].rate_table = exynos5420_epll_24mhz_tbl ;
1540
1580
exynos5x_plls [kpll ].rate_table = exynos5420_pll2550x_24mhz_tbl ;
1581
+ exynos5x_plls [vpll ].rate_table = exynos5420_vpll_24mhz_tbl ;
1541
1582
}
1542
1583
1543
1584
if (soc == EXYNOS5420 )
0 commit comments