@@ -50,8 +50,10 @@ static SUNXI_CCU_M(mixer1_div_a83_clk, "mixer1-div", "pll-de", 0x0c, 4, 4,
50
50
CLK_SET_RATE_PARENT );
51
51
static SUNXI_CCU_M (wb_div_a83_clk , "wb-div" , "pll-de" , 0x0c , 8 , 4 ,
52
52
CLK_SET_RATE_PARENT );
53
+ static SUNXI_CCU_M (rot_div_a83_clk , "rot-div" , "pll-de" , 0x0c , 0x0c , 4 ,
54
+ CLK_SET_RATE_PARENT );
53
55
54
- static struct ccu_common * sun50i_h6_de3_clks [] = {
56
+ static struct ccu_common * sun8i_a83t_de2_clks [] = {
55
57
& mixer0_clk .common ,
56
58
& mixer1_clk .common ,
57
59
& wb_clk .common ,
@@ -60,16 +62,16 @@ static struct ccu_common *sun50i_h6_de3_clks[] = {
60
62
& bus_mixer1_clk .common ,
61
63
& bus_wb_clk .common ,
62
64
63
- & mixer0_div_clk .common ,
64
- & mixer1_div_clk .common ,
65
- & wb_div_clk .common ,
65
+ & mixer0_div_a83_clk .common ,
66
+ & mixer1_div_a83_clk .common ,
67
+ & wb_div_a83_clk .common ,
66
68
67
69
& bus_rot_clk .common ,
68
70
& rot_clk .common ,
69
- & rot_div_clk .common ,
71
+ & rot_div_a83_clk .common ,
70
72
};
71
73
72
- static struct ccu_common * sun8i_a83t_de2_clks [] = {
74
+ static struct ccu_common * sun8i_h3_de2_clks [] = {
73
75
& mixer0_clk .common ,
74
76
& mixer1_clk .common ,
75
77
& wb_clk .common ,
@@ -78,51 +80,58 @@ static struct ccu_common *sun8i_a83t_de2_clks[] = {
78
80
& bus_mixer1_clk .common ,
79
81
& bus_wb_clk .common ,
80
82
81
- & mixer0_div_a83_clk .common ,
82
- & mixer1_div_a83_clk .common ,
83
- & wb_div_a83_clk .common ,
83
+ & mixer0_div_clk .common ,
84
+ & mixer1_div_clk .common ,
85
+ & wb_div_clk .common ,
84
86
};
85
87
86
- static struct ccu_common * sun8i_h3_de2_clks [] = {
88
+ static struct ccu_common * sun8i_v3s_de2_clks [] = {
87
89
& mixer0_clk .common ,
88
- & mixer1_clk .common ,
89
90
& wb_clk .common ,
90
91
91
92
& bus_mixer0_clk .common ,
92
- & bus_mixer1_clk .common ,
93
93
& bus_wb_clk .common ,
94
94
95
95
& mixer0_div_clk .common ,
96
- & mixer1_div_clk .common ,
97
96
& wb_div_clk .common ,
98
97
};
99
98
100
- static struct ccu_common * sun8i_v3s_de2_clks [] = {
99
+ static struct ccu_common * sun50i_a64_de2_clks [] = {
101
100
& mixer0_clk .common ,
101
+ & mixer1_clk .common ,
102
102
& wb_clk .common ,
103
103
104
104
& bus_mixer0_clk .common ,
105
+ & bus_mixer1_clk .common ,
105
106
& bus_wb_clk .common ,
106
107
107
108
& mixer0_div_clk .common ,
109
+ & mixer1_div_clk .common ,
108
110
& wb_div_clk .common ,
111
+
112
+ & bus_rot_clk .common ,
113
+ & rot_clk .common ,
114
+ & rot_div_clk .common ,
109
115
};
110
116
111
117
static struct clk_hw_onecell_data sun8i_a83t_de2_hw_clks = {
112
118
.hws = {
113
119
[CLK_MIXER0 ] = & mixer0_clk .common .hw ,
114
120
[CLK_MIXER1 ] = & mixer1_clk .common .hw ,
115
121
[CLK_WB ] = & wb_clk .common .hw ,
122
+ [CLK_ROT ] = & rot_clk .common .hw ,
116
123
117
124
[CLK_BUS_MIXER0 ] = & bus_mixer0_clk .common .hw ,
118
125
[CLK_BUS_MIXER1 ] = & bus_mixer1_clk .common .hw ,
119
126
[CLK_BUS_WB ] = & bus_wb_clk .common .hw ,
127
+ [CLK_BUS_ROT ] = & bus_rot_clk .common .hw ,
120
128
121
129
[CLK_MIXER0_DIV ] = & mixer0_div_a83_clk .common .hw ,
122
130
[CLK_MIXER1_DIV ] = & mixer1_div_a83_clk .common .hw ,
123
131
[CLK_WB_DIV ] = & wb_div_a83_clk .common .hw ,
132
+ [CLK_ROT_DIV ] = & rot_div_a83_clk .common .hw ,
124
133
},
125
- .num = CLK_NUMBER_WITHOUT_ROT ,
134
+ .num = CLK_NUMBER_WITH_ROT ,
126
135
};
127
136
128
137
static struct clk_hw_onecell_data sun8i_h3_de2_hw_clks = {
@@ -156,7 +165,7 @@ static struct clk_hw_onecell_data sun8i_v3s_de2_hw_clks = {
156
165
.num = CLK_NUMBER_WITHOUT_ROT ,
157
166
};
158
167
159
- static struct clk_hw_onecell_data sun50i_h6_de3_hw_clks = {
168
+ static struct clk_hw_onecell_data sun50i_a64_de2_hw_clks = {
160
169
.hws = {
161
170
[CLK_MIXER0 ] = & mixer0_clk .common .hw ,
162
171
[CLK_MIXER1 ] = & mixer1_clk .common .hw ,
@@ -179,9 +188,19 @@ static struct clk_hw_onecell_data sun50i_h6_de3_hw_clks = {
179
188
static struct ccu_reset_map sun8i_a83t_de2_resets [] = {
180
189
[RST_MIXER0 ] = { 0x08 , BIT (0 ) },
181
190
/*
182
- * For A83T, H3 and R40, mixer1 reset line is shared with wb, so
183
- * only RST_WB is exported here.
184
- * For V3s there's just no mixer1, so it also shares this struct.
191
+ * Mixer1 reset line is shared with wb, so only RST_WB is
192
+ * exported here.
193
+ */
194
+ [RST_WB ] = { 0x08 , BIT (2 ) },
195
+ [RST_ROT ] = { 0x08 , BIT (3 ) },
196
+ };
197
+
198
+ static struct ccu_reset_map sun8i_h3_de2_resets [] = {
199
+ [RST_MIXER0 ] = { 0x08 , BIT (0 ) },
200
+ /*
201
+ * Mixer1 reset line is shared with wb, so only RST_WB is
202
+ * exported here.
203
+ * V3s doesn't have mixer1, so it also shares this struct.
185
204
*/
186
205
[RST_WB ] = { 0x08 , BIT (2 ) },
187
206
};
@@ -190,13 +209,13 @@ static struct ccu_reset_map sun50i_a64_de2_resets[] = {
190
209
[RST_MIXER0 ] = { 0x08 , BIT (0 ) },
191
210
[RST_MIXER1 ] = { 0x08 , BIT (1 ) },
192
211
[RST_WB ] = { 0x08 , BIT (2 ) },
212
+ [RST_ROT ] = { 0x08 , BIT (3 ) },
193
213
};
194
214
195
- static struct ccu_reset_map sun50i_h6_de3_resets [] = {
215
+ static struct ccu_reset_map sun50i_h5_de2_resets [] = {
196
216
[RST_MIXER0 ] = { 0x08 , BIT (0 ) },
197
217
[RST_MIXER1 ] = { 0x08 , BIT (1 ) },
198
218
[RST_WB ] = { 0x08 , BIT (2 ) },
199
- [RST_ROT ] = { 0x08 , BIT (3 ) },
200
219
};
201
220
202
221
static const struct sunxi_ccu_desc sun8i_a83t_de2_clk_desc = {
@@ -215,28 +234,18 @@ static const struct sunxi_ccu_desc sun8i_h3_de2_clk_desc = {
215
234
216
235
.hw_clks = & sun8i_h3_de2_hw_clks ,
217
236
218
- .resets = sun8i_a83t_de2_resets ,
219
- .num_resets = ARRAY_SIZE (sun8i_a83t_de2_resets ),
237
+ .resets = sun8i_h3_de2_resets ,
238
+ .num_resets = ARRAY_SIZE (sun8i_h3_de2_resets ),
220
239
};
221
240
222
- static const struct sunxi_ccu_desc sun50i_a64_de2_clk_desc = {
223
- .ccu_clks = sun8i_h3_de2_clks ,
224
- .num_ccu_clks = ARRAY_SIZE (sun8i_h3_de2_clks ),
241
+ static const struct sunxi_ccu_desc sun8i_r40_de2_clk_desc = {
242
+ .ccu_clks = sun50i_a64_de2_clks ,
243
+ .num_ccu_clks = ARRAY_SIZE (sun50i_a64_de2_clks ),
225
244
226
- .hw_clks = & sun8i_h3_de2_hw_clks ,
245
+ .hw_clks = & sun50i_a64_de2_hw_clks ,
227
246
228
- .resets = sun50i_a64_de2_resets ,
229
- .num_resets = ARRAY_SIZE (sun50i_a64_de2_resets ),
230
- };
231
-
232
- static const struct sunxi_ccu_desc sun50i_h6_de3_clk_desc = {
233
- .ccu_clks = sun50i_h6_de3_clks ,
234
- .num_ccu_clks = ARRAY_SIZE (sun50i_h6_de3_clks ),
235
-
236
- .hw_clks = & sun50i_h6_de3_hw_clks ,
237
-
238
- .resets = sun50i_h6_de3_resets ,
239
- .num_resets = ARRAY_SIZE (sun50i_h6_de3_resets ),
247
+ .resets = sun8i_a83t_de2_resets ,
248
+ .num_resets = ARRAY_SIZE (sun8i_a83t_de2_resets ),
240
249
};
241
250
242
251
static const struct sunxi_ccu_desc sun8i_v3s_de2_clk_desc = {
@@ -249,6 +258,26 @@ static const struct sunxi_ccu_desc sun8i_v3s_de2_clk_desc = {
249
258
.num_resets = ARRAY_SIZE (sun8i_a83t_de2_resets ),
250
259
};
251
260
261
+ static const struct sunxi_ccu_desc sun50i_a64_de2_clk_desc = {
262
+ .ccu_clks = sun50i_a64_de2_clks ,
263
+ .num_ccu_clks = ARRAY_SIZE (sun50i_a64_de2_clks ),
264
+
265
+ .hw_clks = & sun50i_a64_de2_hw_clks ,
266
+
267
+ .resets = sun50i_a64_de2_resets ,
268
+ .num_resets = ARRAY_SIZE (sun50i_a64_de2_resets ),
269
+ };
270
+
271
+ static const struct sunxi_ccu_desc sun50i_h5_de2_clk_desc = {
272
+ .ccu_clks = sun8i_h3_de2_clks ,
273
+ .num_ccu_clks = ARRAY_SIZE (sun8i_h3_de2_clks ),
274
+
275
+ .hw_clks = & sun8i_h3_de2_hw_clks ,
276
+
277
+ .resets = sun50i_h5_de2_resets ,
278
+ .num_resets = ARRAY_SIZE (sun50i_h5_de2_resets ),
279
+ };
280
+
252
281
static int sunxi_de2_clk_probe (struct platform_device * pdev )
253
282
{
254
283
struct resource * res ;
@@ -337,6 +366,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
337
366
.compatible = "allwinner,sun8i-h3-de2-clk" ,
338
367
.data = & sun8i_h3_de2_clk_desc ,
339
368
},
369
+ {
370
+ .compatible = "allwinner,sun8i-r40-de2-clk" ,
371
+ .data = & sun8i_r40_de2_clk_desc ,
372
+ },
340
373
{
341
374
.compatible = "allwinner,sun8i-v3s-de2-clk" ,
342
375
.data = & sun8i_v3s_de2_clk_desc ,
@@ -347,11 +380,11 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
347
380
},
348
381
{
349
382
.compatible = "allwinner,sun50i-h5-de2-clk" ,
350
- .data = & sun50i_a64_de2_clk_desc ,
383
+ .data = & sun50i_h5_de2_clk_desc ,
351
384
},
352
385
{
353
386
.compatible = "allwinner,sun50i-h6-de3-clk" ,
354
- .data = & sun50i_h6_de3_clk_desc ,
387
+ .data = & sun50i_h5_de2_clk_desc ,
355
388
},
356
389
{ }
357
390
};
0 commit comments