@@ -37,6 +37,9 @@ enum rcar_r8a779a0_clk_types {
37
37
CLK_TYPE_R8A779A0_SD ,
38
38
CLK_TYPE_R8A779A0_MDSEL , /* Select parent/divider using mode pin */
39
39
CLK_TYPE_R8A779A0_OSC , /* OSC EXTAL predivider and fixed divider */
40
+ CLK_TYPE_R8A779A0_RPCSRC ,
41
+ CLK_TYPE_R8A779A0_RPC ,
42
+ CLK_TYPE_R8A779A0_RPCD2 ,
40
43
};
41
44
42
45
struct rcar_r8a779a0_cpg_pll_config {
@@ -125,6 +128,10 @@ static const struct cpg_core_clk r8a779a0_core_clks[] __initconst = {
125
128
DEF_FIXED (".s3" , CLK_S3 , CLK_PLL1_DIV2 , 4 , 1 ),
126
129
DEF_FIXED (".sdsrc" , CLK_SDSRC , CLK_PLL5_DIV4 , 1 , 1 ),
127
130
DEF_RATE (".oco" , CLK_OCO , 32768 ),
131
+ DEF_BASE (".rpcsrc" , CLK_RPCSRC , CLK_TYPE_R8A779A0_RPCSRC , CLK_PLL5 ),
132
+ DEF_BASE ("rpc" , R8A779A0_CLK_RPC , CLK_TYPE_R8A779A0_RPC , CLK_RPCSRC ),
133
+ DEF_BASE ("rpcd2" , R8A779A0_CLK_RPCD2 , CLK_TYPE_R8A779A0_RPCD2 ,
134
+ R8A779A0_CLK_RPC ),
128
135
129
136
/* Core Clock Outputs */
130
137
DEF_Z ("z0" , R8A779A0_CLK_Z0 , CLK_PLL20 , 2 , 0 ),
@@ -200,6 +207,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
200
207
DEF_MOD ("msi3" , 621 , R8A779A0_CLK_MSO ),
201
208
DEF_MOD ("msi4" , 622 , R8A779A0_CLK_MSO ),
202
209
DEF_MOD ("msi5" , 623 , R8A779A0_CLK_MSO ),
210
+ DEF_MOD ("rpc-if" , 629 , R8A779A0_CLK_RPCD2 ),
203
211
DEF_MOD ("scif0" , 702 , R8A779A0_CLK_S1D8 ),
204
212
DEF_MOD ("scif1" , 703 , R8A779A0_CLK_S1D8 ),
205
213
DEF_MOD ("scif3" , 704 , R8A779A0_CLK_S1D8 ),
@@ -414,6 +422,15 @@ static struct clk * __init cpg_z_clk_register(const char *name,
414
422
return clk ;
415
423
}
416
424
425
+ /*
426
+ * RPC Clocks
427
+ */
428
+ #define CPG_RPCCKCR 0x874
429
+
430
+ static const struct clk_div_table cpg_rpcsrc_div_table [] = {
431
+ { 0 , 4 }, { 1 , 6 }, { 2 , 5 }, { 3 , 6 }, { 0 , 0 },
432
+ };
433
+
417
434
static struct clk * __init rcar_r8a779a0_cpg_clk_register (struct device * dev ,
418
435
const struct cpg_core_clk * core , const struct cpg_mssr_info * info ,
419
436
struct clk * * clks , void __iomem * base ,
@@ -481,6 +498,21 @@ static struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
481
498
div = cpg_pll_config -> osc_prediv * core -> div ;
482
499
break ;
483
500
501
+ case CLK_TYPE_R8A779A0_RPCSRC :
502
+ return clk_register_divider_table (NULL , core -> name ,
503
+ __clk_get_name (parent ), 0 ,
504
+ base + CPG_RPCCKCR , 3 , 2 , 0 ,
505
+ cpg_rpcsrc_div_table ,
506
+ & cpg_lock );
507
+
508
+ case CLK_TYPE_R8A779A0_RPC :
509
+ return cpg_rpc_clk_register (core -> name , base + CPG_RPCCKCR ,
510
+ __clk_get_name (parent ), notifiers );
511
+
512
+ case CLK_TYPE_R8A779A0_RPCD2 :
513
+ return cpg_rpcd2_clk_register (core -> name , base + CPG_RPCCKCR ,
514
+ __clk_get_name (parent ));
515
+
484
516
default :
485
517
return ERR_PTR (- EINVAL );
486
518
}
0 commit comments