Lines Matching +full:5 +full:- +full:8
1 // SPDX-License-Identifier: GPL-2.0
4 * Author: Elaine Zhang <zhangqing@rock-chips.com>
7 #include <linux/clk-provider.h>
13 #include <dt-bindings/clock/rockchip,rk3576-cru.h>
87 RK3588_PLL_RATE(722534400, 8, 963, 2, 24850),
93 RK3588_PLL_RATE(96000000, 2, 256, 5, 0),
106 #define RK3576_ACLK_M_LITCORE_DIV_SHIFT 8
117 .val = HIWORD_UPDATE(_amcore - 1, RK3576_ACLK_M_BIGCORE_DIV_MASK, \
124 .val = HIWORD_UPDATE(_amcore - 1, RK3576_ACLK_M_LITCORE_DIV_MASK, \
131 .val = HIWORD_UPDATE(_pclkdbg - 1, RK3576_PCLK_DBG_LITCORE_DIV_MASK, \
140 HIWORD_UPDATE(_div - 1, RK3576_ACLK_CCI_DIV_MASK, \
377 RK3576_MODE_CON0, 8, 15, 0, rk3576_pll_rates),
388 * CRU Clock-Architecture
405 RK3576_CLKSEL_CON(0), 5, 1, MFLAGS, 0, 5, DFLAGS,
408 RK3576_CLKSEL_CON(0), 11, 1, MFLAGS, 6, 5, DFLAGS,
411 RK3576_CLKSEL_CON(1), 5, 1, MFLAGS, 0, 5, DFLAGS,
414 RK3576_CLKSEL_CON(1), 11, 1, MFLAGS, 6, 5, DFLAGS,
417 RK3576_CLKSEL_CON(2), 5, 1, MFLAGS, 0, 5, DFLAGS,
420 RK3576_CLKSEL_CON(2), 11, 1, MFLAGS, 6, 5, DFLAGS,
421 RK3576_CLKGATE_CON(0), 5, GFLAGS),
423 RK3576_CLKSEL_CON(3), 5, 2, MFLAGS, 0, 5, DFLAGS,
426 RK3576_CLKSEL_CON(3), 12, 1, MFLAGS, 7, 5, DFLAGS,
429 RK3576_CLKSEL_CON(4), 11, 1, MFLAGS, 6, 5, DFLAGS,
432 RK3576_CLKSEL_CON(5), 5, 1, MFLAGS, 0, 5, DFLAGS,
435 RK3576_CLKSEL_CON(6), 5, 3, MFLAGS, 0, 5, DFLAGS,
438 RK3576_CLKSEL_CON(8), 7, 2, MFLAGS,
441 RK3576_CLKSEL_CON(9), 5, 2, MFLAGS, 0, 5, DFLAGS,
444 RK3576_CLKSEL_CON(10), 5, 1, MFLAGS, 0, 5, DFLAGS,
447 RK3576_CLKSEL_CON(10), 11, 3, MFLAGS, 6, 5, DFLAGS,
456 RK3576_CLKSEL_CON(19), 12, 2, MFLAGS, 8, 4, DFLAGS,
482 RK3576_CLKGATE_CON(2), 5, GFLAGS),
494 RK3576_CLKSEL_CON(27), 13, 3, MFLAGS, 5, 8, DFLAGS,
497 RK3576_CLKSEL_CON(28), 0, 5, DFLAGS,
500 RK3576_CLKSEL_CON(28), 5, 5, DFLAGS,
503 RK3576_CLKSEL_CON(28), 10, 5, DFLAGS,
509 RK3576_CLKSEL_CON(30), 10, 5, DFLAGS,
512 RK3576_CLKSEL_CON(31), 0, 5, DFLAGS,
515 RK3576_CLKSEL_CON(31), 10, 2, MFLAGS, 5, 5, DFLAGS,
518 RK3576_CLKSEL_CON(32), 5, 2, MFLAGS, 0, 5, DFLAGS,
521 RK3576_CLKSEL_CON(33), 8, 3, MFLAGS, 0, 8, DFLAGS,
524 RK3576_CLKSEL_CON(34), 8, 3, MFLAGS, 0, 8, DFLAGS,
527 RK3576_CLKSEL_CON(35), 8, 3, MFLAGS, 0, 8, DFLAGS,
531 RK3576_CLKGATE_CON(5), 10, GFLAGS),
533 RK3576_CLKSEL_CON(36), 15, 1, MFLAGS, 8, 7, DFLAGS,
534 RK3576_CLKGATE_CON(5), 11, GFLAGS),
536 RK3576_CLKSEL_CON(37), 8, 2, MFLAGS, 0, 8, DFLAGS,
537 RK3576_CLKGATE_CON(5), 12, GFLAGS),
539 RK3576_CLKGATE_CON(5), 13, GFLAGS),
541 RK3576_CLKGATE_CON(5), 14, GFLAGS),
543 RK3576_CLKGATE_CON(5), 15, GFLAGS),
545 RK3576_CLKSEL_CON(38), 8, 2, MFLAGS, 0, 8, DFLAGS,
548 RK3576_CLKSEL_CON(39), 8, 2, MFLAGS, 0, 8, DFLAGS,
551 RK3576_CLKSEL_CON(40), 8, 2, MFLAGS, 0, 8, DFLAGS,
552 RK3576_CLKGATE_CON(6), 5, GFLAGS),
554 RK3576_CLKSEL_CON(41), 7, 3, MFLAGS, 2, 5, DFLAGS,
555 RK3576_CLKGATE_CON(6), 8, GFLAGS),
565 RK3576_CLKSEL_CON(55), 9, 1, MFLAGS, 4, 5, DFLAGS,
570 RK3576_CLKSEL_CON(56), 5, 2, MFLAGS, 0, 5, DFLAGS,
573 RK3576_CLKGATE_CON(11), 8, GFLAGS),
575 RK3576_CLKSEL_CON(56), 12, 2, MFLAGS, 7, 5, DFLAGS,
590 RK3576_CLKGATE_CON(12), 5, GFLAGS),
596 RK3576_CLKGATE_CON(12), 8, GFLAGS),
616 RK3576_CLKSEL_CON(57), 8, 2, MFLAGS,
633 RK3576_CLKSEL_CON(58), 12, 1, MFLAGS, 4, 8, DFLAGS,
636 RK3576_CLKGATE_CON(13), 8, GFLAGS),
638 RK3576_CLKSEL_CON(59), 0, 8, DFLAGS,
663 RK3576_CLKSEL_CON(60), 8, 3, MFLAGS, 0, 8, DFLAGS,
664 RK3576_CLKGATE_CON(14), 5, GFLAGS),
666 RK3576_CLKSEL_CON(61), 8, 3, MFLAGS, 0, 8, DFLAGS,
669 RK3576_CLKSEL_CON(62), 8, 3, MFLAGS, 0, 8, DFLAGS,
672 RK3576_CLKSEL_CON(63), 8, 3, MFLAGS, 0, 8, DFLAGS,
675 RK3576_CLKSEL_CON(64), 8, 3, MFLAGS, 0, 8, DFLAGS,
678 RK3576_CLKSEL_CON(65), 8, 3, MFLAGS, 0, 8, DFLAGS,
681 RK3576_CLKSEL_CON(66), 8, 3, MFLAGS, 0, 8, DFLAGS,
682 RK3576_CLKGATE_CON(15), 5, GFLAGS),
684 RK3576_CLKSEL_CON(67), 8, 3, MFLAGS, 0, 8, DFLAGS,
685 RK3576_CLKGATE_CON(15), 8, GFLAGS),
687 RK3576_CLKSEL_CON(68), 8, 3, MFLAGS, 0, 8, DFLAGS,
690 RK3576_CLKSEL_CON(69), 8, 3, MFLAGS, 0, 8, DFLAGS,
693 RK3576_CLKSEL_CON(70), 8, 3, MFLAGS, 0, 8, DFLAGS,
716 RK3576_CLKGATE_CON(16), 5, GFLAGS),
723 RK3576_CLKGATE_CON(16), 8, GFLAGS),
727 RK3576_CLKSEL_CON(71), 8, 2, MFLAGS,
739 RK3576_CLKGATE_CON(17), 5, GFLAGS),
745 RK3576_CLKGATE_CON(17), 8, GFLAGS),
767 RK3576_CLKGATE_CON(18), 5, GFLAGS),
773 RK3576_CLKGATE_CON(18), 8, GFLAGS),
775 RK3576_CLKSEL_CON(72), 5, 1, MFLAGS, 0, 5, DFLAGS,
783 RK3576_CLKSEL_CON(72), 12, 2, MFLAGS, 7, 5, DFLAGS,
786 RK3576_CLKSEL_CON(73), 5, 2, MFLAGS, 0, 5, DFLAGS,
812 RK3576_CLKSEL_CON(74), 5, 1, MFLAGS, 0, 5, DFLAGS,
820 RK3576_CLKGATE_CON(20), 5, GFLAGS),
826 RK3576_CLKSEL_CON(74), 8, 3, MFLAGS,
827 RK3576_CLKGATE_CON(20), 8, GFLAGS),
838 RK3576_CLKSEL_CON(78), 5, 2, MFLAGS, 0, 5, DFLAGS,
841 RK3576_CLKSEL_CON(78), 12, 2, MFLAGS, 7, 5, DFLAGS,
848 RK3576_CCI_CLKSEL_CON(4), 5, 2, MFLAGS, 0, 5, DFLAGS,
851 RK3576_CCI_CLKSEL_CON(4), 12, 2, MFLAGS, 7, 5, DFLAGS,
856 RK3576_CLKSEL_CON(168), 5, 3, MFLAGS,
857 RK3576_CLKSEL_CON(167), 9, 5, DFLAGS,
860 RK3576_CLKSEL_CON(168), 8, 2, MFLAGS,
869 RK3576_CLKGATE_CON(72), 5, GFLAGS),
879 RK3576_CLKSEL_CON(76), 5, 2, MFLAGS, 0, 5, DFLAGS,
884 RK3576_CLKSEL_CON(77), 5, 1, MFLAGS, 0, 5, DFLAGS,
894 RK3576_CLKGATE_CON(23), 5, GFLAGS),
900 RK3576_CLKGATE_CON(23), 8, GFLAGS),
902 RK3576_CLKSEL_CON(77), 12, 1, MFLAGS, 7, 5, DFLAGS,
907 RK3576_CLKSEL_CON(165), 5, 3, MFLAGS, 0, 5, DFLAGS,
913 RK3576_CLKGATE_CON(69), 8, GFLAGS),
920 RK3576_CLKSEL_CON(86), 7, 2, MFLAGS, 2, 5, DFLAGS,
921 RK3576_CLKGATE_CON(31), 5, GFLAGS),
928 RK3576_CLKGATE_CON(31), 8, GFLAGS),
946 RK3576_CLKGATE_CON(32), 5, GFLAGS),
950 RK3576_CLKSEL_CON(87), 10, 1, MFLAGS, 5, 5, DFLAGS,
960 RK3576_CLKSEL_CON(88), 7, 1, MFLAGS, 2, 5, DFLAGS,
968 RK3576_CLKSEL_CON(89), 14, 2, MFLAGS, 8, 6, DFLAGS,
969 RK3576_CLKGATE_CON(33), 8, GFLAGS),
982 RK3576_CLKSEL_CON(115), 5, 1, MFLAGS, 0, 5, DFLAGS,
985 RK3576_CLKSEL_CON(115), 11, 1, MFLAGS, 6, 5, DFLAGS,
991 RK3576_CLKGATE_CON(47), 5, GFLAGS),
1008 RK3576_CLKSEL_CON(110), 7, 2, MFLAGS, 2, 5, DFLAGS,
1011 RK3576_CLKSEL_CON(110), 14, 2, MFLAGS, 9, 5, DFLAGS,
1016 RK3576_CLKSEL_CON(111), 5, 2, MFLAGS, 0, 5, DFLAGS,
1017 RK3576_CLKGATE_CON(45), 8, GFLAGS),
1026 RK3576_CLKSEL_CON(124), 7, 1, MFLAGS, 2, 5, DFLAGS,
1029 RK3576_CLKSEL_CON(124), 13, 3, MFLAGS, 8, 5, DFLAGS,
1034 RK3576_CLKGATE_CON(51), 5, GFLAGS),
1038 RK3576_CLKSEL_CON(128), 5, 3, MFLAGS, 0, 5, DFLAGS,
1044 RK3576_CLKSEL_CON(128), 8, 2, MFLAGS,
1050 RK3576_CLKSEL_CON(129), 5, 1, MFLAGS, 0, 5, DFLAGS,
1055 RK3576_CLKGATE_CON(53), 8, GFLAGS),
1057 RK3576_CLKSEL_CON(129), 11, 3, MFLAGS, 6, 5, DFLAGS,
1076 RK3576_CLKGATE_CON(54), 5, GFLAGS),
1082 RK3576_CLKGATE_CON(54), 8, GFLAGS),
1089 RK3576_CLKSEL_CON(144), 5, 3, MFLAGS, 0, 5, DFLAGS,
1098 RK3576_CLKGATE_CON(61), 8, GFLAGS),
1102 RK3576_CLKSEL_CON(145), 8, 3, MFLAGS, 0, 8, DFLAGS,
1105 RK3576_CLKSEL_CON(146), 8, 3, MFLAGS, 0, 8, DFLAGS,
1108 RK3576_CLKSEL_CON(147), 8, 3, MFLAGS, 0, 8, DFLAGS,
1122 RK3576_CLKSEL_CON(149), 5, 2, MFLAGS, 0, 5, DFLAGS,
1139 RK3576_CLKGATE_CON(64), 5, GFLAGS),
1146 RK3576_CLKSEL_CON(151), 15, 1, MFLAGS, 10, 5, DFLAGS,
1147 RK3576_CLKGATE_CON(64), 8, GFLAGS),
1158 RK3576_CLKSEL_CON(154), 10, 3, MFLAGS, 2, 8, DFLAGS,
1164 RK3576_CLKGATE_CON(65), 5, GFLAGS),
1166 RK3576_CLKSEL_CON(155), 8, 3, MFLAGS, 0, 8, DFLAGS,
1170 RK3576_CLKGATE_CON(65), 8, GFLAGS),
1176 RK3576_CLKSEL_CON(156), 5, 3, MFLAGS, 0, 5, DFLAGS,
1181 RK3576_CLKSEL_CON(156), 13, 2, MFLAGS, 8, 5, DFLAGS,
1186 RK3576_CLKSEL_CON(158), 5, 2, MFLAGS, 0, 5, DFLAGS,
1195 RK3576_CLKSEL_CON(157), 8, 3, MFLAGS, 0, 8, DFLAGS,
1203 RK3576_CLKSEL_CON(159), 8, 3, MFLAGS, 0, 8, DFLAGS,
1204 RK3576_CLKGATE_CON(67), 8, GFLAGS),
1217 RK3576_CLKSEL_CON(160), 8, 3, MFLAGS, 0, 8, DFLAGS,
1220 RK3576_CLKSEL_CON(161), 0, 8, DFLAGS,
1229 RK3576_CLKGATE_CON(68), 5, GFLAGS),
1237 RK3576_CLKSEL_CON(162), 8, 3, MFLAGS, 0, 8, DFLAGS,
1243 RK3576_CLKSEL_CON(163), 8, 3, MFLAGS, 0, 8, DFLAGS,
1246 RK3576_CLKSEL_CON(164), 8, 3, MFLAGS, 0, 8, DFLAGS,
1251 RK3576_CLKSEL_CON(118), 5, 3, MFLAGS, 0, 5, DFLAGS,
1254 RK3576_CLKSEL_CON(118), 8, 2, MFLAGS,
1260 RK3576_CLKSEL_CON(119), 5, 2, MFLAGS, 0, 5, DFLAGS,
1270 RK3576_CLKSEL_CON(120), 5, 3, MFLAGS, 0, 5, DFLAGS,
1281 RK3576_CLKSEL_CON(120), 13, 1, MFLAGS, 8, 5, DFLAGS,
1284 RK3576_CLKGATE_CON(50), 5, GFLAGS),
1288 RK3576_CLKSEL_CON(121), 5, 3, MFLAGS, 0, 5, DFLAGS,
1308 RK3576_CLKSEL_CON(180), 5, 1, MFLAGS, 0, 5, DFLAGS,
1315 RK3576_CLKSEL_CON(180), 11, 3, MFLAGS, 6, 5, DFLAGS,
1316 RK3576_CLKGATE_CON(79), 5, GFLAGS),
1323 RK3576_CLKSEL_CON(92), 9, 1, MFLAGS, 4, 5, DFLAGS,
1340 RK3576_CLKGATE_CON(35), 5, GFLAGS),
1352 RK3576_CLKGATE_CON(36), 8, GFLAGS),
1363 RK3576_CLKSEL_CON(93), 15, 1, MFLAGS, 8, 7, DFLAGS,
1372 RK3576_CLKGATE_CON(37), 5, GFLAGS),
1383 RK3576_CLKGATE_CON(7), 5, GFLAGS),
1387 RK3576_CLKSEL_CON(42), 7, 2, MFLAGS, 2, 5, DFLAGS,
1390 RK3576_CLKSEL_CON(42), 14, 2, MFLAGS, 9, 5, DFLAGS,
1391 RK3576_CLKGATE_CON(7), 8, GFLAGS),
1393 RK3576_CLKSEL_CON(43), 5, 2, MFLAGS, 0, 5, DFLAGS,
1396 RK3576_CLKSEL_CON(43), 12, 2, MFLAGS, 7, 5, DFLAGS,
1399 RK3576_CLKSEL_CON(44), 8, 3, MFLAGS, 0, 8, DFLAGS,
1409 RK3576_CLKSEL_CON(45), 5, 2, MFLAGS, 0, 5, DFLAGS,
1412 RK3576_CLKGATE_CON(8), 0, GFLAGS),
1414 RK3576_CLKSEL_CON(45), 12, 2, MFLAGS, 7, 5, DFLAGS,
1415 RK3576_CLKGATE_CON(8), 1, GFLAGS),
1417 RK3576_CLKSEL_CON(46), 8, 3, MFLAGS, 0, 8, DFLAGS,
1418 RK3576_CLKGATE_CON(8), 4, GFLAGS),
1421 RK3576_CLKGATE_CON(8), 5, GFLAGS),
1423 RK3576_CLKGATE_CON(8), 6, GFLAGS),
1425 RK3576_CLKSEL_CON(47), 8, 3, MFLAGS, 0, 8, DFLAGS,
1426 RK3576_CLKGATE_CON(8), 7, GFLAGS),
1429 RK3576_CLKGATE_CON(8), 8, GFLAGS),
1431 RK3576_CLKGATE_CON(8), 10, GFLAGS),
1433 RK3576_CLKSEL_CON(48), 8, 3, MFLAGS, 0, 8, DFLAGS,
1434 RK3576_CLKGATE_CON(8), 11, GFLAGS),
1437 RK3576_CLKGATE_CON(8), 12, GFLAGS),
1439 RK3576_CLKGATE_CON(8), 14, GFLAGS),
1441 RK3576_CLKSEL_CON(49), 8, 3, MFLAGS, 0, 8, DFLAGS,
1442 RK3576_CLKGATE_CON(8), 15, GFLAGS),
1454 RK3576_CLKGATE_CON(9), 5, GFLAGS),
1458 RK3576_CLKGATE_CON(3), 5, GFLAGS),
1460 RK3576_CLKSEL_CON(51), 5, 3, MFLAGS, 0, 5, DFLAGS,
1461 RK3576_CLKGATE_CON(9), 8, GFLAGS),
1465 RK3576_CLKSEL_CON(52), 8, 3, MFLAGS, 0, 8, DFLAGS,
1470 RK3576_CLKSEL_CON(53), 8, 3, MFLAGS, 0, 8, DFLAGS,
1488 RK3576_CLKSEL_CON(103), 7, 1, MFLAGS, 2, 5, DFLAGS,
1491 RK3576_CLKSEL_CON(103), 8, 2, MFLAGS,
1496 RK3576_CLKGATE_CON(42), 8, GFLAGS),
1507 RK3576_CLKSEL_CON(104), 13, 2, MFLAGS, 8, 5, DFLAGS,
1510 RK3576_CLKSEL_CON(105), 5, 2, MFLAGS, 0, 5, DFLAGS,
1527 RK3576_CLKSEL_CON(106), 13, 1, MFLAGS, 8, 5, DFLAGS,
1528 RK3576_CLKGATE_CON(43), 5, GFLAGS),
1532 RK3576_CLKGATE_CON(43), 8, GFLAGS),
1534 RK3576_CLKSEL_CON(107), 5, 1, MFLAGS, 0, 5, DFLAGS,
1539 RK3576_CLKSEL_CON(107), 11, 2, MFLAGS, 6, 5, DFLAGS,
1542 RK3576_CLKSEL_CON(108), 5, 2, MFLAGS, 0, 5, DFLAGS,
1551 RK3576_PHP_CLKGATE_CON(0), 5, GFLAGS),
1555 RK3576_PHP_CLKSEL_CON(0), 2, 5, DFLAGS,
1558 RK3576_PHP_CLKSEL_CON(0), 7, 5, DFLAGS,
1562 RK3576_PHP_CLKGATE_CON(1), 5, GFLAGS),
1565 RK3576_PHP_CLKGATE_CON(1), 8, GFLAGS),
1567 RK3576_PHP_CLKSEL_CON(1), 0, 8, DFLAGS,
1574 RK3576_PMU_CLKSEL_CON(4), 4, 5, DFLAGS,
1596 RK3576_PMU_CLKGATE_CON(5), 0, GFLAGS),
1602 RK3576_PMU_CLKGATE_CON(0), 8, GFLAGS),
1606 RK3576_PMU_CLKSEL_CON(0), 0, 5, DFLAGS,
1617 RK3576_PMU_CLKGATE_CON(2), 5, GFLAGS),
1621 RK3576_PMU_CLKSEL_CON(4), 14, 1, MFLAGS, 9, 5, DFLAGS,
1624 RK3576_PMU_CLKGATE_CON(4), 5, GFLAGS),
1631 RK3576_PMU_CLKSEL_CON(5), 0, 2, MFLAGS,
1632 RK3576_PMU_CLKGATE_CON(4), 8, GFLAGS),
1640 RK3576_PMU_CLKSEL_CON(5), 2, 2, MFLAGS,
1645 RK3576_PMU_CLKGATE_CON(5), 1, GFLAGS),
1648 RK3576_PMU_CLKGATE_CON(5), 2, GFLAGS),
1650 RK3576_PMU_CLKSEL_CON(8), 0, 1, MFLAGS,
1651 RK3576_PMU_CLKGATE_CON(5), 5, GFLAGS),
1653 RK3576_PMU_CLKGATE_CON(5), 6, GFLAGS),
1655 RK3576_PMU_CLKGATE_CON(5), 13, GFLAGS),
1657 RK3576_PMU_CLKGATE_CON(5), 15, GFLAGS),
1663 RK3576_PMU_CLKGATE_CON(6), 8, GFLAGS),
1665 RK3576_PMU_CLKSEL_CON(11), 6, 1, MFLAGS, 1, 5, DFLAGS,
1673 RK3576_PMU_CLKGATE_CON(7), 8, GFLAGS),
1675 RK3576_PMU_CLKGATE_CON(5), 7, GFLAGS),
1700 RK3576_SECURE_NS_CLKGATE_CON(0), 8, GFLAGS),
1720 RK3576_CLKGATE_CON(59), 5, GFLAGS),
1733 grf = syscon_regmap_lookup_by_compatible("rockchip,rk3576-pmu0-grf"); in rk3576_clk_init()
1752 ctx->grf = grf; in rk3576_clk_init()
1777 CLK_OF_DECLARE(rk3576_cru, "rockchip,rk3576-cru", rk3576_clk_init);
1789 .compatible = "rockchip,rk3576-cru",
1798 struct device *dev = &pdev->dev; in clk_rk3576_probe()
1802 return -EINVAL; in clk_rk3576_probe()
1804 if (init_data->inits) in clk_rk3576_probe()
1805 init_data->inits(dev->of_node); in clk_rk3576_probe()
1813 .name = "clk-rk3576",