@@ -293,13 +293,6 @@ static struct clk_regmap meson8b_fclk_div2 = {
293
293
& meson8b_fclk_div2_div .hw
294
294
},
295
295
.num_parents = 1 ,
296
- /*
297
- * FIXME: Ethernet with a RGMII PHYs is not working if
298
- * fclk_div2 is disabled. it is currently unclear why this
299
- * is. keep it enabled until the Ethernet driver knows how
300
- * to manage this clock.
301
- */
302
- .flags = CLK_IS_CRITICAL ,
303
296
},
304
297
};
305
298
@@ -1211,6 +1204,22 @@ static struct clk_regmap meson8b_vclk_in_en = {
1211
1204
},
1212
1205
};
1213
1206
1207
+ static struct clk_regmap meson8b_vclk_en = {
1208
+ .data = & (struct clk_regmap_gate_data ){
1209
+ .offset = HHI_VID_CLK_CNTL ,
1210
+ .bit_idx = 19 ,
1211
+ },
1212
+ .hw .init = & (struct clk_init_data ){
1213
+ .name = "vclk_en" ,
1214
+ .ops = & clk_regmap_gate_ro_ops ,
1215
+ .parent_hws = (const struct clk_hw * []) {
1216
+ & meson8b_vclk_in_en .hw
1217
+ },
1218
+ .num_parents = 1 ,
1219
+ .flags = CLK_SET_RATE_PARENT ,
1220
+ },
1221
+ };
1222
+
1214
1223
static struct clk_regmap meson8b_vclk_div1_gate = {
1215
1224
.data = & (struct clk_regmap_gate_data ){
1216
1225
.offset = HHI_VID_CLK_CNTL ,
@@ -1220,7 +1229,7 @@ static struct clk_regmap meson8b_vclk_div1_gate = {
1220
1229
.name = "vclk_div1_en" ,
1221
1230
.ops = & clk_regmap_gate_ro_ops ,
1222
1231
.parent_hws = (const struct clk_hw * []) {
1223
- & meson8b_vclk_in_en .hw
1232
+ & meson8b_vclk_en .hw
1224
1233
},
1225
1234
.num_parents = 1 ,
1226
1235
.flags = CLK_SET_RATE_PARENT ,
@@ -1234,7 +1243,7 @@ static struct clk_fixed_factor meson8b_vclk_div2_div = {
1234
1243
.name = "vclk_div2" ,
1235
1244
.ops = & clk_fixed_factor_ops ,
1236
1245
.parent_hws = (const struct clk_hw * []) {
1237
- & meson8b_vclk_in_en .hw
1246
+ & meson8b_vclk_en .hw
1238
1247
},
1239
1248
.num_parents = 1 ,
1240
1249
.flags = CLK_SET_RATE_PARENT ,
@@ -1264,7 +1273,7 @@ static struct clk_fixed_factor meson8b_vclk_div4_div = {
1264
1273
.name = "vclk_div4" ,
1265
1274
.ops = & clk_fixed_factor_ops ,
1266
1275
.parent_hws = (const struct clk_hw * []) {
1267
- & meson8b_vclk_in_en .hw
1276
+ & meson8b_vclk_en .hw
1268
1277
},
1269
1278
.num_parents = 1 ,
1270
1279
.flags = CLK_SET_RATE_PARENT ,
@@ -1294,7 +1303,7 @@ static struct clk_fixed_factor meson8b_vclk_div6_div = {
1294
1303
.name = "vclk_div6" ,
1295
1304
.ops = & clk_fixed_factor_ops ,
1296
1305
.parent_hws = (const struct clk_hw * []) {
1297
- & meson8b_vclk_in_en .hw
1306
+ & meson8b_vclk_en .hw
1298
1307
},
1299
1308
.num_parents = 1 ,
1300
1309
.flags = CLK_SET_RATE_PARENT ,
@@ -1324,7 +1333,7 @@ static struct clk_fixed_factor meson8b_vclk_div12_div = {
1324
1333
.name = "vclk_div12" ,
1325
1334
.ops = & clk_fixed_factor_ops ,
1326
1335
.parent_hws = (const struct clk_hw * []) {
1327
- & meson8b_vclk_in_en .hw
1336
+ & meson8b_vclk_en .hw
1328
1337
},
1329
1338
.num_parents = 1 ,
1330
1339
.flags = CLK_SET_RATE_PARENT ,
@@ -1378,6 +1387,22 @@ static struct clk_regmap meson8b_vclk2_clk_in_en = {
1378
1387
},
1379
1388
};
1380
1389
1390
+ static struct clk_regmap meson8b_vclk2_clk_en = {
1391
+ .data = & (struct clk_regmap_gate_data ){
1392
+ .offset = HHI_VIID_CLK_DIV ,
1393
+ .bit_idx = 19 ,
1394
+ },
1395
+ .hw .init = & (struct clk_init_data ){
1396
+ .name = "vclk2_en" ,
1397
+ .ops = & clk_regmap_gate_ro_ops ,
1398
+ .parent_hws = (const struct clk_hw * []) {
1399
+ & meson8b_vclk2_clk_in_en .hw
1400
+ },
1401
+ .num_parents = 1 ,
1402
+ .flags = CLK_SET_RATE_PARENT ,
1403
+ },
1404
+ };
1405
+
1381
1406
static struct clk_regmap meson8b_vclk2_div1_gate = {
1382
1407
.data = & (struct clk_regmap_gate_data ){
1383
1408
.offset = HHI_VIID_CLK_DIV ,
@@ -1387,7 +1412,7 @@ static struct clk_regmap meson8b_vclk2_div1_gate = {
1387
1412
.name = "vclk2_div1_en" ,
1388
1413
.ops = & clk_regmap_gate_ro_ops ,
1389
1414
.parent_hws = (const struct clk_hw * []) {
1390
- & meson8b_vclk2_clk_in_en .hw
1415
+ & meson8b_vclk2_clk_en .hw
1391
1416
},
1392
1417
.num_parents = 1 ,
1393
1418
.flags = CLK_SET_RATE_PARENT ,
@@ -1401,7 +1426,7 @@ static struct clk_fixed_factor meson8b_vclk2_div2_div = {
1401
1426
.name = "vclk2_div2" ,
1402
1427
.ops = & clk_fixed_factor_ops ,
1403
1428
.parent_hws = (const struct clk_hw * []) {
1404
- & meson8b_vclk2_clk_in_en .hw
1429
+ & meson8b_vclk2_clk_en .hw
1405
1430
},
1406
1431
.num_parents = 1 ,
1407
1432
.flags = CLK_SET_RATE_PARENT ,
@@ -1431,7 +1456,7 @@ static struct clk_fixed_factor meson8b_vclk2_div4_div = {
1431
1456
.name = "vclk2_div4" ,
1432
1457
.ops = & clk_fixed_factor_ops ,
1433
1458
.parent_hws = (const struct clk_hw * []) {
1434
- & meson8b_vclk2_clk_in_en .hw
1459
+ & meson8b_vclk2_clk_en .hw
1435
1460
},
1436
1461
.num_parents = 1 ,
1437
1462
.flags = CLK_SET_RATE_PARENT ,
@@ -1461,7 +1486,7 @@ static struct clk_fixed_factor meson8b_vclk2_div6_div = {
1461
1486
.name = "vclk2_div6" ,
1462
1487
.ops = & clk_fixed_factor_ops ,
1463
1488
.parent_hws = (const struct clk_hw * []) {
1464
- & meson8b_vclk2_clk_in_en .hw
1489
+ & meson8b_vclk2_clk_en .hw
1465
1490
},
1466
1491
.num_parents = 1 ,
1467
1492
.flags = CLK_SET_RATE_PARENT ,
@@ -1491,7 +1516,7 @@ static struct clk_fixed_factor meson8b_vclk2_div12_div = {
1491
1516
.name = "vclk2_div12" ,
1492
1517
.ops = & clk_fixed_factor_ops ,
1493
1518
.parent_hws = (const struct clk_hw * []) {
1494
- & meson8b_vclk2_clk_in_en .hw
1519
+ & meson8b_vclk2_clk_en .hw
1495
1520
},
1496
1521
.num_parents = 1 ,
1497
1522
.flags = CLK_SET_RATE_PARENT ,
@@ -2827,6 +2852,7 @@ static struct clk_hw_onecell_data meson8_hw_onecell_data = {
2827
2852
[CLKID_VID_PLL_FINAL_DIV ] = & meson8b_vid_pll_final_div .hw ,
2828
2853
[CLKID_VCLK_IN_SEL ] = & meson8b_vclk_in_sel .hw ,
2829
2854
[CLKID_VCLK_IN_EN ] = & meson8b_vclk_in_en .hw ,
2855
+ [CLKID_VCLK_EN ] = & meson8b_vclk_en .hw ,
2830
2856
[CLKID_VCLK_DIV1 ] = & meson8b_vclk_div1_gate .hw ,
2831
2857
[CLKID_VCLK_DIV2_DIV ] = & meson8b_vclk_div2_div .hw ,
2832
2858
[CLKID_VCLK_DIV2 ] = & meson8b_vclk_div2_div_gate .hw ,
@@ -2838,6 +2864,7 @@ static struct clk_hw_onecell_data meson8_hw_onecell_data = {
2838
2864
[CLKID_VCLK_DIV12 ] = & meson8b_vclk_div12_div_gate .hw ,
2839
2865
[CLKID_VCLK2_IN_SEL ] = & meson8b_vclk2_in_sel .hw ,
2840
2866
[CLKID_VCLK2_IN_EN ] = & meson8b_vclk2_clk_in_en .hw ,
2867
+ [CLKID_VCLK2_EN ] = & meson8b_vclk2_clk_en .hw ,
2841
2868
[CLKID_VCLK2_DIV1 ] = & meson8b_vclk2_div1_gate .hw ,
2842
2869
[CLKID_VCLK2_DIV2_DIV ] = & meson8b_vclk2_div2_div .hw ,
2843
2870
[CLKID_VCLK2_DIV2 ] = & meson8b_vclk2_div2_div_gate .hw ,
@@ -3032,6 +3059,7 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = {
3032
3059
[CLKID_VID_PLL_FINAL_DIV ] = & meson8b_vid_pll_final_div .hw ,
3033
3060
[CLKID_VCLK_IN_SEL ] = & meson8b_vclk_in_sel .hw ,
3034
3061
[CLKID_VCLK_IN_EN ] = & meson8b_vclk_in_en .hw ,
3062
+ [CLKID_VCLK_EN ] = & meson8b_vclk_en .hw ,
3035
3063
[CLKID_VCLK_DIV1 ] = & meson8b_vclk_div1_gate .hw ,
3036
3064
[CLKID_VCLK_DIV2_DIV ] = & meson8b_vclk_div2_div .hw ,
3037
3065
[CLKID_VCLK_DIV2 ] = & meson8b_vclk_div2_div_gate .hw ,
@@ -3043,6 +3071,7 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = {
3043
3071
[CLKID_VCLK_DIV12 ] = & meson8b_vclk_div12_div_gate .hw ,
3044
3072
[CLKID_VCLK2_IN_SEL ] = & meson8b_vclk2_in_sel .hw ,
3045
3073
[CLKID_VCLK2_IN_EN ] = & meson8b_vclk2_clk_in_en .hw ,
3074
+ [CLKID_VCLK2_EN ] = & meson8b_vclk2_clk_en .hw ,
3046
3075
[CLKID_VCLK2_DIV1 ] = & meson8b_vclk2_div1_gate .hw ,
3047
3076
[CLKID_VCLK2_DIV2_DIV ] = & meson8b_vclk2_div2_div .hw ,
3048
3077
[CLKID_VCLK2_DIV2 ] = & meson8b_vclk2_div2_div_gate .hw ,
@@ -3248,6 +3277,7 @@ static struct clk_hw_onecell_data meson8m2_hw_onecell_data = {
3248
3277
[CLKID_VID_PLL_FINAL_DIV ] = & meson8b_vid_pll_final_div .hw ,
3249
3278
[CLKID_VCLK_IN_SEL ] = & meson8b_vclk_in_sel .hw ,
3250
3279
[CLKID_VCLK_IN_EN ] = & meson8b_vclk_in_en .hw ,
3280
+ [CLKID_VCLK_EN ] = & meson8b_vclk_en .hw ,
3251
3281
[CLKID_VCLK_DIV1 ] = & meson8b_vclk_div1_gate .hw ,
3252
3282
[CLKID_VCLK_DIV2_DIV ] = & meson8b_vclk_div2_div .hw ,
3253
3283
[CLKID_VCLK_DIV2 ] = & meson8b_vclk_div2_div_gate .hw ,
@@ -3259,6 +3289,7 @@ static struct clk_hw_onecell_data meson8m2_hw_onecell_data = {
3259
3289
[CLKID_VCLK_DIV12 ] = & meson8b_vclk_div12_div_gate .hw ,
3260
3290
[CLKID_VCLK2_IN_SEL ] = & meson8b_vclk2_in_sel .hw ,
3261
3291
[CLKID_VCLK2_IN_EN ] = & meson8b_vclk2_clk_in_en .hw ,
3292
+ [CLKID_VCLK2_EN ] = & meson8b_vclk2_clk_en .hw ,
3262
3293
[CLKID_VCLK2_DIV1 ] = & meson8b_vclk2_div1_gate .hw ,
3263
3294
[CLKID_VCLK2_DIV2_DIV ] = & meson8b_vclk2_div2_div .hw ,
3264
3295
[CLKID_VCLK2_DIV2 ] = & meson8b_vclk2_div2_div_gate .hw ,
@@ -3450,13 +3481,15 @@ static struct clk_regmap *const meson8b_clk_regmaps[] = {
3450
3481
& meson8b_vid_pll_final_div ,
3451
3482
& meson8b_vclk_in_sel ,
3452
3483
& meson8b_vclk_in_en ,
3484
+ & meson8b_vclk_en ,
3453
3485
& meson8b_vclk_div1_gate ,
3454
3486
& meson8b_vclk_div2_div_gate ,
3455
3487
& meson8b_vclk_div4_div_gate ,
3456
3488
& meson8b_vclk_div6_div_gate ,
3457
3489
& meson8b_vclk_div12_div_gate ,
3458
3490
& meson8b_vclk2_in_sel ,
3459
3491
& meson8b_vclk2_clk_in_en ,
3492
+ & meson8b_vclk2_clk_en ,
3460
3493
& meson8b_vclk2_div1_gate ,
3461
3494
& meson8b_vclk2_div2_div_gate ,
3462
3495
& meson8b_vclk2_div4_div_gate ,
0 commit comments