@@ -44,6 +44,12 @@ enum clk_ids {
44
44
CLK_PLL6 ,
45
45
CLK_PLL6_250 ,
46
46
CLK_P1_DIV2 ,
47
+ CLK_PLL2_800 ,
48
+ CLK_PLL2_SDHI_533 ,
49
+ CLK_PLL2_SDHI_400 ,
50
+ CLK_PLL2_SDHI_266 ,
51
+ CLK_SD0_DIV4 ,
52
+ CLK_SD1_DIV4 ,
47
53
48
54
/* Module Clocks */
49
55
MOD_CLK_BASE ,
@@ -62,6 +68,7 @@ static const struct clk_div_table dtable_1_32[] = {
62
68
/* Mux clock tables */
63
69
static const char * const sel_pll3_3 [] = { ".pll3_533" , ".pll3_400" };
64
70
static const char * const sel_pll6_2 [] = { ".pll6_250" , ".pll5_250" };
71
+ static const char * const sel_shdi [] = { ".clk_533" , ".clk_400" , ".clk_266" };
65
72
66
73
static const struct cpg_core_clk r9a07g044_core_clks [] __initconst = {
67
74
/* External Clock Inputs */
@@ -82,6 +89,11 @@ static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
82
89
DEF_FIXED (".pll6" , CLK_PLL6 , CLK_EXTAL , 125 , 6 ),
83
90
84
91
DEF_FIXED (".pll2_div2" , CLK_PLL2_DIV2 , CLK_PLL2 , 1 , 2 ),
92
+ DEF_FIXED (".clk_800" , CLK_PLL2_800 , CLK_PLL2 , 1 , 2 ),
93
+ DEF_FIXED (".clk_533" , CLK_PLL2_SDHI_533 , CLK_PLL2 , 1 , 3 ),
94
+ DEF_FIXED (".clk_400" , CLK_PLL2_SDHI_400 , CLK_PLL2_800 , 1 , 2 ),
95
+ DEF_FIXED (".clk_266" , CLK_PLL2_SDHI_266 , CLK_PLL2_SDHI_533 , 1 , 2 ),
96
+
85
97
DEF_FIXED (".pll2_div16" , CLK_PLL2_DIV16 , CLK_PLL2 , 1 , 16 ),
86
98
DEF_FIXED (".pll2_div20" , CLK_PLL2_DIV20 , CLK_PLL2 , 1 , 20 ),
87
99
@@ -114,6 +126,12 @@ static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
114
126
sel_pll6_2 , ARRAY_SIZE (sel_pll6_2 ), 0 , CLK_MUX_HIWORD_MASK ),
115
127
DEF_FIXED ("SPI0" , R9A07G044_CLK_SPI0 , CLK_DIV_PLL3_C , 1 , 2 ),
116
128
DEF_FIXED ("SPI1" , R9A07G044_CLK_SPI1 , CLK_DIV_PLL3_C , 1 , 4 ),
129
+ DEF_SD_MUX ("SD0" , R9A07G044_CLK_SD0 , SEL_SDHI0 ,
130
+ sel_shdi , ARRAY_SIZE (sel_shdi )),
131
+ DEF_SD_MUX ("SD1" , R9A07G044_CLK_SD1 , SEL_SDHI1 ,
132
+ sel_shdi , ARRAY_SIZE (sel_shdi )),
133
+ DEF_FIXED ("SD0_DIV4" , CLK_SD0_DIV4 , R9A07G044_CLK_SD0 , 1 , 4 ),
134
+ DEF_FIXED ("SD1_DIV4" , CLK_SD1_DIV4 , R9A07G044_CLK_SD1 , 1 , 4 ),
117
135
};
118
136
119
137
static struct rzg2l_mod_clk r9a07g044_mod_clks [] = {
@@ -131,6 +149,22 @@ static struct rzg2l_mod_clk r9a07g044_mod_clks[] = {
131
149
0x550 , 0 ),
132
150
DEF_MOD ("spi_clk" , R9A07G044_SPI_CLK , R9A07G044_CLK_SPI0 ,
133
151
0x550 , 1 ),
152
+ DEF_MOD ("sdhi0_imclk" , R9A07G044_SDHI0_IMCLK , CLK_SD0_DIV4 ,
153
+ 0x554 , 0 ),
154
+ DEF_MOD ("sdhi0_imclk2" , R9A07G044_SDHI0_IMCLK2 , CLK_SD0_DIV4 ,
155
+ 0x554 , 1 ),
156
+ DEF_MOD ("sdhi0_clk_hs" , R9A07G044_SDHI0_CLK_HS , R9A07G044_CLK_SD0 ,
157
+ 0x554 , 2 ),
158
+ DEF_MOD ("sdhi0_aclk" , R9A07G044_SDHI0_ACLK , R9A07G044_CLK_P1 ,
159
+ 0x554 , 3 ),
160
+ DEF_MOD ("sdhi1_imclk" , R9A07G044_SDHI1_IMCLK , CLK_SD1_DIV4 ,
161
+ 0x554 , 4 ),
162
+ DEF_MOD ("sdhi1_imclk2" , R9A07G044_SDHI1_IMCLK2 , CLK_SD1_DIV4 ,
163
+ 0x554 , 5 ),
164
+ DEF_MOD ("sdhi1_clk_hs" , R9A07G044_SDHI1_CLK_HS , R9A07G044_CLK_SD1 ,
165
+ 0x554 , 6 ),
166
+ DEF_MOD ("sdhi1_aclk" , R9A07G044_SDHI1_ACLK , R9A07G044_CLK_P1 ,
167
+ 0x554 , 7 ),
134
168
DEF_MOD ("ssi0_pclk" , R9A07G044_SSI0_PCLK2 , R9A07G044_CLK_P0 ,
135
169
0x570 , 0 ),
136
170
DEF_MOD ("ssi0_sfr" , R9A07G044_SSI0_PCLK_SFR , R9A07G044_CLK_P0 ,
@@ -200,6 +234,8 @@ static struct rzg2l_reset r9a07g044_resets[] = {
200
234
DEF_RST (R9A07G044_DMAC_ARESETN , 0x82c , 0 ),
201
235
DEF_RST (R9A07G044_DMAC_RST_ASYNC , 0x82c , 1 ),
202
236
DEF_RST (R9A07G044_SPI_RST , 0x850 , 0 ),
237
+ DEF_RST (R9A07G044_SDHI0_IXRST , 0x854 , 0 ),
238
+ DEF_RST (R9A07G044_SDHI1_IXRST , 0x854 , 1 ),
203
239
DEF_RST (R9A07G044_SSI0_RST_M2_REG , 0x870 , 0 ),
204
240
DEF_RST (R9A07G044_SSI1_RST_M2_REG , 0x870 , 1 ),
205
241
DEF_RST (R9A07G044_SSI2_RST_M2_REG , 0x870 , 2 ),
0 commit comments