Lines Matching +full:10 +full:- +full:11

1 // SPDX-License-Identifier: GPL-2.0+
5 * Guochun Huang <hero.huang@rock-chips.com>
19 #include <media/v4l2-ctrls.h>
20 #include <media/v4l2-fwnode.h>
21 #include <media/v4l2-subdev.h>
22 #include <media/v4l2-device.h>
23 #include "phy-rockchip-csi2-dphy-common.h"
24 #include "phy-rockchip-samsung-dcphy.h"
38 #define S_MASK GENMASK(10, 8)
39 #define S(x) UPDATE(x, 10, 8)
52 #define SSCG_EN BIT(11)
54 #define RESET_N_SEL BIT(10)
75 #define T_LPX(x) UPDATE(x, 11, 4)
89 #define SKEW_CAL_INIT_RUN_TIME(x) UPDATE(x, 11, 8)
575 {3200, 15, 56, 14, 14, 15, 26, 13, 11, 21, 17},
576 {3190, 15, 56, 14, 14, 15, 26, 13, 11, 21, 17},
577 {3180, 15, 56, 14, 14, 15, 26, 13, 11, 21, 17},
578 {3170, 15, 56, 14, 14, 15, 25, 13, 11, 21, 17},
579 {3160, 15, 55, 14, 14, 14, 26, 13, 11, 21, 17},
580 {3150, 15, 55, 14, 14, 14, 26, 13, 11, 21, 17},
581 {3140, 15, 55, 14, 14, 14, 26, 13, 11, 21, 17},
582 {3130, 15, 55, 14, 14, 14, 26, 13, 11, 21, 17},
583 {3120, 15, 54, 14, 13, 14, 26, 13, 11, 21, 17},
584 {3110, 15, 54, 14, 13, 14, 26, 13, 11, 21, 17},
585 {3100, 15, 54, 14, 13, 14, 26, 13, 11, 21, 17},
586 {3090, 15, 54, 14, 13, 14, 25, 12, 11, 21, 17},
587 {3080, 15, 53, 14, 13, 14, 25, 12, 11, 21, 17},
588 {3070, 14, 54, 14, 13, 14, 25, 12, 11, 21, 16},
589 {3060, 14, 54, 14, 13, 14, 25, 12, 11, 21, 16},
590 {3050, 14, 54, 14, 13, 14, 25, 12, 11, 20, 16},
591 {3040, 14, 53, 14, 13, 14, 25, 12, 11, 20, 16},
592 {3030, 14, 53, 14, 13, 14, 25, 12, 11, 20, 16},
593 {3020, 14, 53, 14, 13, 14, 24, 12, 11, 20, 16},
594 {3010, 14, 53, 14, 13, 14, 24, 12, 11, 20, 16},
595 {3000, 14, 53, 13, 13, 14, 24, 12, 11, 20, 16},
596 {2990, 14, 52, 13, 13, 14, 24, 12, 11, 20, 16},
597 {2980, 14, 52, 13, 13, 14, 24, 12, 11, 20, 16},
598 {2970, 14, 52, 13, 13, 14, 24, 12, 11, 20, 16},
599 {2960, 14, 52, 13, 13, 14, 24, 12, 11, 20, 16},
600 {2950, 14, 51, 13, 13, 13, 24, 12, 11, 20, 16},
601 {2940, 14, 51, 13, 13, 13, 24, 12, 11, 20, 16},
602 {2930, 14, 51, 13, 13, 13, 24, 12, 10, 20, 16},
603 {2920, 14, 51, 13, 13, 13, 24, 12, 10, 20, 16},
604 {2910, 14, 50, 13, 13, 13, 24, 12, 10, 20, 15},
605 {2900, 14, 50, 13, 13, 13, 24, 12, 10, 19, 15},
606 {2890, 14, 50, 13, 12, 13, 24, 12, 10, 19, 15},
607 {2880, 14, 50, 13, 12, 13, 23, 12, 10, 19, 15},
608 {2870, 13, 50, 13, 12, 13, 23, 12, 10, 19, 15},
609 {2860, 13, 50, 13, 12, 13, 23, 12, 10, 19, 15},
610 {2850, 13, 50, 13, 12, 13, 23, 11, 10, 19, 15},
611 {2840, 13, 50, 13, 12, 13, 23, 11, 10, 19, 15},
612 {2830, 13, 50, 13, 12, 13, 23, 11, 10, 19, 15},
613 {2820, 13, 49, 13, 12, 13, 23, 11, 10, 19, 15},
614 {2810, 13, 49, 13, 12, 13, 23, 11, 10, 19, 15},
615 {2800, 13, 49, 12, 12, 13, 22, 11, 10, 19, 15},
616 {2790, 13, 49, 12, 12, 13, 22, 11, 10, 19, 15},
617 {2780, 13, 48, 12, 12, 13, 22, 11, 10, 19, 15},
618 {2770, 13, 48, 12, 12, 13, 22, 11, 10, 19, 15},
619 {2760, 13, 48, 12, 12, 13, 22, 11, 10, 18, 15},
620 {2750, 13, 48, 12, 12, 13, 22, 11, 10, 18, 15},
621 {2740, 13, 47, 12, 12, 12, 23, 11, 10, 18, 14},
622 {2730, 13, 47, 12, 12, 12, 22, 11, 10, 18, 14},
623 {2720, 13, 47, 12, 12, 12, 22, 11, 10, 18, 14},
624 {2710, 13, 47, 12, 12, 12, 22, 11, 10, 18, 14},
625 {2700, 13, 47, 12, 12, 12, 22, 11, 10, 18, 14},
626 {2690, 13, 46, 12, 12, 12, 22, 11, 10, 18, 14},
627 {2680, 13, 46, 12, 12, 12, 22, 11, 10, 18, 14},
628 {2670, 12, 47, 12, 12, 12, 22, 11, 10, 18, 14},
629 {2660, 12, 47, 12, 12, 12, 21, 11, 9, 18, 14},
630 {2650, 12, 46, 12, 11, 12, 21, 11, 9, 18, 14},
631 {2640, 12, 46, 12, 11, 12, 21, 11, 9, 18, 14},
632 {2630, 12, 46, 12, 11, 12, 21, 11, 9, 18, 14},
633 {2620, 12, 46, 12, 11, 12, 21, 10, 9, 18, 14},
634 {2610, 12, 45, 12, 11, 12, 21, 10, 9, 17, 14},
635 {2600, 12, 45, 11, 11, 12, 21, 10, 9, 17, 14},
636 {2590, 12, 45, 11, 11, 12, 20, 10, 9, 17, 14},
637 {2580, 12, 45, 11, 11, 12, 20, 10, 9, 17, 14},
638 {2570, 12, 44, 11, 11, 12, 20, 10, 9, 17, 13},
639 {2560, 12, 44, 11, 11, 12, 20, 10, 9, 17, 13},
640 {2550, 12, 44, 11, 11, 12, 20, 10, 9, 17, 13},
641 {2540, 12, 44, 11, 11, 11, 21, 10, 9, 17, 13},
642 {2530, 12, 44, 11, 11, 11, 21, 10, 9, 17, 13},
643 {2520, 12, 43, 11, 11, 11, 21, 10, 9, 17, 13},
644 {2510, 12, 43, 11, 11, 11, 20, 10, 9, 17, 13},
645 {2500, 12, 43, 11, 11, 11, 20, 10, 9, 17, 13},
646 {2490, 12, 43, 11, 11, 11, 20, 10, 9, 17, 13},
647 {2480, 12, 42, 11, 11, 11, 20, 10, 9, 17, 13},
648 {2470, 11, 43, 11, 11, 11, 20, 10, 9, 16, 13},
649 {2460, 11, 43, 11, 11, 11, 20, 10, 9, 16, 13},
650 {2450, 11, 43, 11, 11, 11, 20, 10, 9, 16, 13},
651 {2440, 11, 42, 11, 11, 11, 19, 10, 9, 16, 13},
652 {2430, 11, 42, 11, 11, 11, 19, 10, 9, 16, 13},
653 {2420, 11, 42, 11, 10, 11, 19, 10, 9, 16, 13},
654 {2410, 11, 42, 11, 10, 11, 19, 10, 9, 16, 12},
655 {2400, 11, 41, 10, 10, 11, 19, 10, 8, 16, 12},
656 {2390, 11, 41, 10, 10, 11, 19, 10, 8, 16, 12},
657 {2380, 11, 41, 10, 10, 11, 19, 9, 8, 16, 12},
658 {2370, 11, 41, 10, 10, 11, 18, 9, 8, 16, 12},
659 {2360, 11, 41, 10, 10, 11, 18, 9, 8, 16, 12},
660 {2350, 11, 40, 10, 10, 11, 18, 9, 8, 16, 12},
661 {2340, 11, 40, 10, 10, 11, 18, 9, 8, 16, 12},
662 {2330, 11, 40, 10, 10, 10, 19, 9, 8, 16, 12},
663 {2320, 11, 40, 10, 10, 10, 19, 9, 8, 15, 12},
664 {2310, 11, 39, 10, 10, 10, 19, 9, 8, 15, 12},
665 {2300, 11, 39, 10, 10, 10, 18, 9, 8, 15, 12},
666 {2290, 11, 39, 10, 10, 10, 18, 9, 8, 15, 12},
667 {2280, 11, 39, 10, 10, 10, 18, 9, 8, 15, 12},
668 {2270, 10, 39, 10, 10, 10, 18, 9, 8, 15, 12},
669 {2260, 10, 39, 10, 10, 10, 18, 9, 8, 15, 12},
670 {2250, 10, 39, 10, 10, 10, 18, 9, 8, 15, 12},
671 {2240, 10, 39, 10, 10, 10, 18, 9, 8, 15, 11},
672 {2230, 10, 38, 10, 10, 10, 18, 9, 8, 15, 11},
673 {2220, 10, 38, 10, 10, 10, 17, 9, 8, 15, 11},
674 {2210, 10, 38, 10, 10, 10, 17, 9, 8, 15, 11},
675 {2200, 10, 38, 9, 10, 10, 17, 9, 8, 15, 11},
676 {2190, 10, 38, 9, 9, 10, 17, 9, 8, 15, 11},
677 {2180, 10, 37, 9, 9, 10, 17, 9, 8, 14, 11},
678 {2170, 10, 37, 9, 9, 10, 17, 9, 8, 14, 11},
679 {2160, 10, 37, 9, 9, 10, 17, 9, 8, 14, 11},
680 {2150, 10, 37, 9, 9, 10, 16, 8, 8, 14, 11},
681 {2140, 10, 36, 9, 9, 10, 16, 8, 8, 14, 11},
682 {2130, 10, 36, 9, 9, 10, 16, 8, 7, 14, 11},
683 {2120, 10, 36, 9, 9, 9, 17, 8, 7, 14, 11},
684 {2110, 10, 36, 9, 9, 9, 17, 8, 7, 14, 11},
685 {2100, 10, 35, 9, 9, 9, 17, 8, 7, 14, 11},
686 {2090, 10, 35, 9, 9, 9, 17, 8, 7, 14, 11},
687 {2080, 9, 36, 9, 9, 9, 16, 8, 7, 14, 11},
688 {2070, 9, 36, 9, 9, 9, 16, 8, 7, 14, 10},
689 {2060, 9, 35, 9, 9, 9, 16, 8, 7, 14, 10},
690 {2050, 9, 35, 9, 9, 9, 16, 8, 7, 14, 10},
691 {2040, 9, 35, 9, 9, 9, 16, 8, 7, 14, 10},
692 {2030, 9, 35, 9, 9, 9, 16, 8, 7, 13, 10},
693 {2020, 9, 35, 9, 9, 9, 16, 8, 7, 13, 10},
694 {2010, 9, 34, 9, 9, 9, 15, 8, 7, 13, 10},
695 {2000, 9, 34, 8, 9, 9, 15, 8, 7, 13, 10},
696 {1990, 9, 34, 8, 9, 9, 15, 8, 7, 13, 10},
697 {1980, 9, 34, 8, 9, 9, 15, 8, 7, 13, 10},
698 {1970, 9, 33, 8, 9, 9, 15, 8, 7, 13, 10},
699 {1960, 9, 33, 8, 9, 9, 15, 8, 7, 13, 10},
700 {1950, 9, 33, 8, 8, 9, 15, 8, 7, 13, 10},
701 {1940, 9, 33, 8, 8, 9, 15, 8, 7, 13, 10},
702 {1930, 9, 32, 8, 8, 9, 14, 8, 7, 13, 10},
703 {1920, 9, 32, 8, 8, 9, 14, 8, 7, 13, 10},
721 {1740, 8, 29, 7, 8, 8, 13, 7, 6, 11, 8},
722 {1730, 8, 29, 7, 8, 8, 13, 7, 6, 11, 8},
723 {1720, 8, 29, 7, 7, 8, 13, 7, 6, 11, 8},
724 {1710, 8, 28, 7, 7, 8, 12, 7, 6, 11, 8},
725 {1700, 8, 28, 7, 7, 7, 13, 7, 6, 11, 8},
726 {1690, 8, 28, 7, 7, 7, 13, 7, 6, 11, 8},
727 {1680, 7, 29, 7, 7, 7, 13, 6, 6, 11, 8},
728 {1670, 7, 28, 7, 7, 7, 13, 6, 6, 11, 8},
729 {1660, 7, 28, 7, 7, 7, 13, 6, 6, 11, 8},
730 {1650, 7, 28, 7, 7, 7, 13, 6, 6, 11, 8},
731 {1640, 7, 28, 7, 7, 7, 12, 6, 6, 11, 8},
732 {1630, 7, 27, 7, 7, 7, 12, 6, 6, 11, 8},
733 {1620, 7, 27, 7, 7, 7, 12, 6, 6, 11, 8},
734 {1610, 7, 27, 7, 7, 7, 12, 6, 6, 11, 8},
735 {1600, 7, 27, 6, 7, 7, 12, 6, 5, 10, 8},
736 {1590, 7, 26, 6, 7, 7, 12, 6, 5, 10, 8},
737 {1580, 7, 26, 6, 7, 7, 12, 6, 5, 10, 7},
738 {1570, 7, 26, 6, 7, 7, 11, 6, 5, 10, 7},
739 {1560, 7, 26, 6, 7, 7, 11, 6, 5, 10, 7},
740 {1550, 7, 26, 6, 7, 7, 11, 6, 5, 10, 7},
741 {1540, 7, 25, 6, 7, 7, 11, 6, 5, 10, 7},
742 {1530, 7, 25, 6, 7, 7, 11, 6, 5, 10, 7},
743 {1520, 7, 25, 6, 7, 7, 11, 6, 5, 10, 7},
744 {1510, 7, 25, 6, 7, 7, 11, 6, 5, 10, 7},
745 {1500, 7, 24, 6, 7, 7, 10, 6, 5, 10, 7},
746 {1490, 59, 25, 6, 77, 59, 10, 70, 44, 9, 73},
747 {1480, 59, 24, 6, 76, 58, 10, 70, 44, 9, 73},
748 {1470, 58, 24, 6, 76, 58, 10, 69, 44, 9, 72},
749 {1460, 58, 24, 6, 76, 58, 10, 69, 43, 9, 72},
750 {1450, 58, 24, 6, 75, 57, 10, 68, 43, 9, 71},
751 {1440, 57, 24, 6, 75, 57, 10, 68, 43, 9, 71},
752 {1430, 57, 23, 6, 75, 57, 10, 68, 43, 8, 70},
818 { 770, 30, 11, 2, 52, 31, 4, 45, 23, 4, 39},
819 { 760, 30, 11, 2, 52, 31, 3, 45, 22, 4, 38},
820 { 750, 29, 11, 2, 51, 30, 3, 45, 22, 4, 38},
821 { 740, 29, 11, 2, 51, 30, 3, 44, 22, 4, 37},
822 { 730, 28, 11, 2, 51, 31, 3, 44, 22, 4, 37},
823 { 720, 28, 10, 2, 50, 30, 3, 44, 22, 4, 36},
824 { 710, 28, 10, 2, 50, 30, 3, 43, 22, 4, 36},
825 { 700, 27, 10, 2, 50, 28, 3, 43, 20, 3, 35},
826 { 690, 27, 10, 2, 49, 28, 3, 43, 20, 3, 35},
827 { 680, 26, 10, 2, 49, 28, 3, 42, 20, 3, 34},
828 { 670, 26, 10, 2, 49, 27, 3, 42, 20, 3, 34},
855 { 400, 15, 5, 0, 39, 17, 0, 33, 11, 1, 21},
859 { 360, 14, 4, 0, 38, 15, 0, 31, 10, 1, 19},
860 { 350, 13, 4, 0, 38, 15, 0, 31, 10, 1, 18},
861 { 340, 13, 3, 0, 37, 15, 0, 31, 10, 1, 18},
865 { 300, 11, 3, 0, 36, 13, 0, 29, 8, 1, 16},
866 { 290, 11, 2, 0, 36, 13, 0, 29, 8, 1, 15},
867 { 280, 10, 2, 0, 35, 12, 0, 29, 8, 1, 15},
868 { 270, 10, 2, 0, 35, 12, 0, 28, 8, 0, 14},
872 { 230, 8, 1, 0, 34, 10, 0, 27, 6, 0, 13},
873 { 220, 8, 1, 0, 33, 10, 0, 27, 6, 0, 12},
874 { 210, 7, 1, 0, 33, 10, 0, 26, 6, 0, 12},
875 { 200, 7, 1, 0, 33, 9, 0, 26, 5, 0, 11},
876 { 190, 7, 1, 0, 32, 9, 0, 25, 5, 0, 11},
877 { 180, 6, 1, 0, 32, 8, 0, 25, 5, 0, 10},
878 { 170, 6, 0, 0, 32, 8, 0, 25, 5, 0, 10},
1102 { 1400, 15, 50, 25, 11, 21, 1 },
1103 { 1390, 15, 50, 25, 11, 21, 1 },
1104 { 1380, 15, 50, 25, 11, 21, 1 },
1105 { 1370, 15, 50, 25, 11, 21, 1 },
1106 { 1360, 14, 50, 25, 11, 21, 1 },
1107 { 1350, 14, 50, 25, 11, 21, 1 },
1108 { 1340, 14, 50, 25, 11, 21, 1 },
1109 { 1330, 14, 50, 25, 11, 20, 1 },
1110 { 1320, 14, 50, 25, 11, 20, 1 },
1111 { 1310, 14, 50, 25, 11, 20, 1 },
1112 { 1300, 14, 50, 25, 11, 20, 1 },
1113 { 1290, 14, 50, 25, 11, 20, 1 },
1114 { 1280, 13, 50, 25, 10, 20, 1 },
1115 { 1270, 13, 50, 25, 10, 19, 1 },
1116 { 1260, 13, 50, 25, 10, 19, 1 },
1117 { 1250, 13, 50, 25, 10, 19, 1 },
1118 { 1240, 13, 50, 25, 10, 19, 1 },
1119 { 1230, 13, 50, 25, 10, 19, 1 },
1120 { 1220, 13, 50, 25, 10, 19, 1 },
1121 { 1210, 13, 50, 25, 10, 19, 1 },
1122 { 1200, 13, 50, 25, 10, 18, 1 },
1123 { 1190, 12, 50, 25, 10, 18, 1 },
1124 { 1180, 12, 50, 25, 10, 18, 1 },
1125 { 1170, 12, 50, 25, 10, 18, 1 },
1132 { 1100, 11, 50, 25, 9, 17, 1 },
1133 { 1090, 11, 50, 25, 9, 17, 1 },
1134 { 1080, 11, 50, 25, 9, 16, 1 },
1135 { 1070, 11, 50, 25, 9, 16, 1 },
1136 { 1060, 11, 50, 25, 9, 16, 1 },
1137 { 1050, 11, 50, 25, 8, 16, 1 },
1138 { 1040, 11, 50, 25, 8, 16, 1 },
1139 { 1030, 11, 50, 25, 8, 16, 1 },
1140 { 1020, 10, 50, 25, 8, 16, 1 },
1141 { 1010, 10, 50, 25, 8, 15, 1 },
1142 { 1000, 10, 50, 25, 8, 15, 1 },
1143 { 990, 10, 50, 25, 8, 15, 2 },
1144 { 980, 10, 50, 25, 8, 15, 2 },
1145 { 970, 10, 50, 25, 8, 15, 2 },
1146 { 960, 10, 50, 25, 8, 15, 2 },
1147 { 950, 10, 50, 25, 8, 14, 2 },
1148 { 940, 10, 50, 25, 8, 14, 2 },
1166 { 760, 7, 50, 25, 6, 11, 2 },
1167 { 750, 7, 50, 25, 6, 11, 2 },
1168 { 740, 7, 50, 25, 6, 11, 2 },
1169 { 730, 7, 50, 25, 6, 11, 2 },
1170 { 720, 7, 50, 25, 6, 11, 2 },
1171 { 710, 7, 50, 25, 6, 11, 2 },
1172 { 700, 7, 50, 25, 5, 10, 2 },
1173 { 690, 7, 50, 25, 5, 10, 2 },
1174 { 680, 7, 50, 25, 5, 10, 2 },
1175 { 670, 6, 50, 25, 5, 10, 2 },
1176 { 660, 6, 50, 25, 5, 10, 2 },
1177 { 650, 6, 50, 25, 5, 10, 2 },
1178 { 640, 6, 50, 25, 5, 10, 2 },
1202 { 400, 14, 50, 25, 11, 5, 2 },
1203 { 390, 14, 50, 25, 11, 5, 2 },
1204 { 380, 13, 50, 25, 11, 5, 2 },
1205 { 370, 13, 50, 25, 11, 5, 2 },
1206 { 360, 13, 50, 25, 10, 4, 2 },
1207 { 350, 12, 50, 25, 10, 4, 2 },
1208 { 340, 12, 50, 25, 10, 4, 2 },
1209 { 330, 11, 50, 25, 9, 4, 2 },
1210 { 320, 11, 50, 25, 9, 4, 2 },
1211 { 310, 11, 50, 25, 9, 4, 2 },
1212 { 300, 10, 50, 25, 8, 3, 2 },
1213 { 290, 10, 50, 25, 8, 3, 2 },
1278 csi_dphy->dphy_param.lp_vol_ref != 3 && in samsung_mipi_dcphy_bias_block_enable()
1279 csi_dphy->dphy_param.lp_vol_ref < 0x7) { in samsung_mipi_dcphy_bias_block_enable()
1281 bias_con2 |= csi_dphy->dphy_param.lp_vol_ref; in samsung_mipi_dcphy_bias_block_enable()
1282 dev_info(samsung->dev, in samsung_mipi_dcphy_bias_block_enable()
1284 csi_dphy->dphy_param.lp_vol_ref); in samsung_mipi_dcphy_bias_block_enable()
1286 regmap_write(samsung->regmap, BIAS_CON0, 0x0010); in samsung_mipi_dcphy_bias_block_enable()
1287 regmap_write(samsung->regmap, BIAS_CON1, 0x0110); in samsung_mipi_dcphy_bias_block_enable()
1288 regmap_write(samsung->regmap, BIAS_CON2, bias_con2); in samsung_mipi_dcphy_bias_block_enable()
1294 if (samsung->c_option) in samsung_mipi_dcphy_bias_block_enable()
1295 regmap_update_bits(samsung->regmap, BIAS_CON4, in samsung_mipi_dcphy_bias_block_enable()
1305 regmap_write(samsung->regmap, DPHY_MC_GNR_CON1, T_PHY_READY(0x2000)); in samsung_mipi_dphy_lane_enable()
1306 regmap_update_bits(samsung->regmap, DPHY_MC_GNR_CON0, in samsung_mipi_dphy_lane_enable()
1309 switch (samsung->lanes) { in samsung_mipi_dphy_lane_enable()
1311 regmap_write(samsung->regmap, DPHY_MD3_GNR_CON1, in samsung_mipi_dphy_lane_enable()
1313 regmap_update_bits(samsung->regmap, DPHY_MD3_GNR_CON0, in samsung_mipi_dphy_lane_enable()
1317 regmap_write(samsung->regmap, COMBO_MD2_GNR_CON1, in samsung_mipi_dphy_lane_enable()
1319 regmap_update_bits(samsung->regmap, COMBO_MD2_GNR_CON0, in samsung_mipi_dphy_lane_enable()
1323 regmap_write(samsung->regmap, COMBO_MD1_GNR_CON1, in samsung_mipi_dphy_lane_enable()
1325 regmap_update_bits(samsung->regmap, COMBO_MD1_GNR_CON0, in samsung_mipi_dphy_lane_enable()
1330 regmap_write(samsung->regmap, COMBO_MD0_GNR_CON1, in samsung_mipi_dphy_lane_enable()
1332 regmap_update_bits(samsung->regmap, COMBO_MD0_GNR_CON0, in samsung_mipi_dphy_lane_enable()
1340 regmap_write(samsung->regmap, COMBO_MD0_GNR_CON1, T_PHY_READY(0x2000)); in samsung_mipi_cphy_lane_enable()
1341 regmap_write(samsung->regmap, COMBO_MD1_GNR_CON1, T_PHY_READY(0x2000)); in samsung_mipi_cphy_lane_enable()
1342 regmap_write(samsung->regmap, COMBO_MD2_GNR_CON1, T_PHY_READY(0x2000)); in samsung_mipi_cphy_lane_enable()
1344 regmap_update_bits(samsung->regmap, COMBO_MD0_GNR_CON0, in samsung_mipi_cphy_lane_enable()
1346 regmap_update_bits(samsung->regmap, COMBO_MD1_GNR_CON0, in samsung_mipi_cphy_lane_enable()
1348 regmap_update_bits(samsung->regmap, COMBO_MD2_GNR_CON0, in samsung_mipi_cphy_lane_enable()
1354 regmap_update_bits(samsung->regmap, DPHY_MC_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_dphy_lane_disable()
1355 regmap_update_bits(samsung->regmap, COMBO_MD0_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_dphy_lane_disable()
1356 regmap_update_bits(samsung->regmap, COMBO_MD1_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_dphy_lane_disable()
1357 regmap_update_bits(samsung->regmap, COMBO_MD2_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_dphy_lane_disable()
1358 regmap_update_bits(samsung->regmap, DPHY_MD3_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_dphy_lane_disable()
1363 regmap_update_bits(samsung->regmap, COMBO_MD0_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_cphy_lane_disable()
1364 regmap_update_bits(samsung->regmap, COMBO_MD1_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_cphy_lane_disable()
1365 regmap_update_bits(samsung->regmap, COMBO_MD2_GNR_CON0, PHY_ENABLE, 0); in samsung_mipi_cphy_lane_disable()
1370 regmap_update_bits(samsung->regmap, PLL_CON0, S_MASK | P_MASK, in samsung_mipi_dcphy_pll_configure()
1371 S(samsung->pll.scaler) | P(samsung->pll.prediv)); in samsung_mipi_dcphy_pll_configure()
1373 if (samsung->pll.dsm < 0) { in samsung_mipi_dcphy_pll_configure()
1377 dsm_tmp = abs(samsung->pll.dsm); in samsung_mipi_dcphy_pll_configure()
1378 dsm_tmp = dsm_tmp - 1; in samsung_mipi_dcphy_pll_configure()
1380 regmap_write(samsung->regmap, PLL_CON1, dsm_tmp); in samsung_mipi_dcphy_pll_configure()
1382 regmap_write(samsung->regmap, PLL_CON1, samsung->pll.dsm); in samsung_mipi_dcphy_pll_configure()
1385 regmap_update_bits(samsung->regmap, PLL_CON2, in samsung_mipi_dcphy_pll_configure()
1386 M_MASK, M(samsung->pll.fbdiv)); in samsung_mipi_dcphy_pll_configure()
1388 if (samsung->pll.ssc_en) { in samsung_mipi_dcphy_pll_configure()
1389 regmap_write(samsung->regmap, PLL_CON3, in samsung_mipi_dcphy_pll_configure()
1390 MRR(samsung->pll.mrr) | MFR(samsung->pll.mfr)); in samsung_mipi_dcphy_pll_configure()
1391 regmap_update_bits(samsung->regmap, PLL_CON4, SSCG_EN, SSCG_EN); in samsung_mipi_dcphy_pll_configure()
1394 regmap_write(samsung->regmap, PLL_CON5, RESET_N_SEL | PLL_ENABLE_SEL); in samsung_mipi_dcphy_pll_configure()
1395 regmap_write(samsung->regmap, PLL_CON7, PLL_LOCK_CNT(0xf000)); in samsung_mipi_dcphy_pll_configure()
1396 regmap_write(samsung->regmap, PLL_CON8, PLL_STB_CNT(0xf000)); in samsung_mipi_dcphy_pll_configure()
1404 regmap_update_bits(samsung->regmap, PLL_CON0, PLL_EN, PLL_EN); in samsung_mipi_dcphy_pll_enable()
1406 ret = regmap_read_poll_timeout(samsung->regmap, PLL_STAT0, in samsung_mipi_dcphy_pll_enable()
1409 dev_err(samsung->dev, "DC-PHY pll is not locked\n"); in samsung_mipi_dcphy_pll_enable()
1414 regmap_update_bits(samsung->regmap, PLL_CON0, PLL_EN, 0); in samsung_mipi_dcphy_pll_disable()
1422 unsigned int lane_mbps = div64_ul(samsung->pll.rate, USEC_PER_SEC); in samsung_mipi_dphy_get_timing()
1428 for (i = num_timings; i > 0; i--) in samsung_mipi_dphy_get_timing()
1429 if (lane_mbps <= timings[i - 1].max_lane_mbps) in samsung_mipi_dphy_get_timing()
1435 return &timings[i - 1]; in samsung_mipi_dphy_get_timing()
1443 unsigned int lane_msps = div64_ul(samsung->pll.rate, USEC_PER_SEC); in samsung_mipi_cphy_get_timing()
1449 for (i = num_timings; i > 0; i--) in samsung_mipi_cphy_get_timing()
1450 if (lane_msps <= timings[i - 1].max_lane_msps) in samsung_mipi_cphy_get_timing()
1456 return &timings[i - 1]; in samsung_mipi_cphy_get_timing()
1462 unsigned int lane_hs_rate = div64_ul(samsung->pll.rate, USEC_PER_SEC); in samsung_mipi_cphy_timing_init()
1468 * Divide-by-2 Clock from Serial Clock. Use this when data rate is under in samsung_mipi_cphy_timing_init()
1469 * 500Msps, otherwise divide-by-16 Clock from Serial Clock in samsung_mipi_cphy_timing_init()
1474 val |= T_LPX(timing->lpx); in samsung_mipi_cphy_timing_init()
1476 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON0, val); in samsung_mipi_cphy_timing_init()
1477 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON0, val); in samsung_mipi_cphy_timing_init()
1478 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON0, val); in samsung_mipi_cphy_timing_init()
1480 val = T_HS_ZERO(timing->prebegin_3) | T_HS_PREPARE(timing->prepare_3); in samsung_mipi_cphy_timing_init()
1481 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON1, val); in samsung_mipi_cphy_timing_init()
1482 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON1, val); in samsung_mipi_cphy_timing_init()
1483 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON1, val); in samsung_mipi_cphy_timing_init()
1485 val = T_HS_EXIT(timing->hs_exit) | T_HS_TRAIL(timing->post_3); in samsung_mipi_cphy_timing_init()
1486 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON2, val); in samsung_mipi_cphy_timing_init()
1487 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON2, val); in samsung_mipi_cphy_timing_init()
1488 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON2, val); in samsung_mipi_cphy_timing_init()
1490 /* TTA-GET/TTA-GO Timing Counter register use default value */ in samsung_mipi_cphy_timing_init()
1492 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON3, val); in samsung_mipi_cphy_timing_init()
1493 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON3, val); in samsung_mipi_cphy_timing_init()
1494 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON3, val); in samsung_mipi_cphy_timing_init()
1497 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON4, 0x1f4); in samsung_mipi_cphy_timing_init()
1498 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON4, 0x1f4); in samsung_mipi_cphy_timing_init()
1499 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON4, 0x1f4); in samsung_mipi_cphy_timing_init()
1509 u64 max_fout = samsung->c_option ? MAX_CPHY_BW : MAX_DPHY_BW; in samsung_mipi_dcphy_pll_round_rate()
1554 /* -32767 ≤ K[15:0] ≤ 32767 */ in samsung_mipi_dcphy_pll_round_rate()
1555 _dsm = ((_prediv * fvco) - (2 * _fbdiv * fin)); in samsung_mipi_dcphy_pll_round_rate()
1563 delta = abs(fvco * MSEC_PER_SEC - tmp); in samsung_mipi_dcphy_pll_round_rate()
1582 dev_dbg(samsung->dev, "p: %d, m: %d, dsm:%ld, scaler: %d\n", in samsung_mipi_dcphy_pll_round_rate()
1592 unsigned int lane_hs_rate = div64_ul(samsung->pll.rate, USEC_PER_SEC); in samsung_mipi_dphy_clk_lane_timing_init()
1596 regmap_write(samsung->regmap, DPHY_MC_GNR_CON0, 0xf000); in samsung_mipi_dphy_clk_lane_timing_init()
1597 regmap_write(samsung->regmap, DPHY_MC_ANA_CON0, 0x7133); in samsung_mipi_dphy_clk_lane_timing_init()
1600 regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, 0x0001); in samsung_mipi_dphy_clk_lane_timing_init()
1603 * Divide-by-2 Clock from Serial Clock. Use this when data rate is under in samsung_mipi_dphy_clk_lane_timing_init()
1604 * 1500Mbps, otherwise divide-by-16 Clock from Serial Clock in samsung_mipi_dphy_clk_lane_timing_init()
1609 val |= T_LPX(timing->lpx); in samsung_mipi_dphy_clk_lane_timing_init()
1611 regmap_write(samsung->regmap, DPHY_MC_TIME_CON0, val); in samsung_mipi_dphy_clk_lane_timing_init()
1613 val = T_CLK_ZERO(timing->clk_zero) | T_CLK_PREPARE(timing->clk_prepare); in samsung_mipi_dphy_clk_lane_timing_init()
1614 regmap_write(samsung->regmap, DPHY_MC_TIME_CON1, val); in samsung_mipi_dphy_clk_lane_timing_init()
1616 val = T_HS_EXIT(timing->hs_exit) | T_CLK_TRAIL(timing->clk_trail_eot); in samsung_mipi_dphy_clk_lane_timing_init()
1617 regmap_write(samsung->regmap, DPHY_MC_TIME_CON2, val); in samsung_mipi_dphy_clk_lane_timing_init()
1619 val = T_CLK_POST(timing->clk_post); in samsung_mipi_dphy_clk_lane_timing_init()
1620 regmap_write(samsung->regmap, DPHY_MC_TIME_CON3, val); in samsung_mipi_dphy_clk_lane_timing_init()
1623 regmap_write(samsung->regmap, DPHY_MC_TIME_CON4, 0x1f4); in samsung_mipi_dphy_clk_lane_timing_init()
1630 regmap_write(samsung->regmap, DPHY_MC_DESKEW_CON0, 0x9cb1); in samsung_mipi_dphy_clk_lane_timing_init()
1637 unsigned int lane_hs_rate = div64_ul(samsung->pll.rate, USEC_PER_SEC); in samsung_mipi_dphy_data_lane_timing_init()
1642 regmap_write(samsung->regmap, COMBO_MD0_ANA_CON0, 0x7133); in samsung_mipi_dphy_data_lane_timing_init()
1643 regmap_write(samsung->regmap, COMBO_MD1_ANA_CON0, 0x7133); in samsung_mipi_dphy_data_lane_timing_init()
1644 regmap_write(samsung->regmap, COMBO_MD2_ANA_CON0, 0x7133); in samsung_mipi_dphy_data_lane_timing_init()
1645 regmap_write(samsung->regmap, DPHY_MD3_ANA_CON0, 0x7133); in samsung_mipi_dphy_data_lane_timing_init()
1648 regmap_write(samsung->regmap, COMBO_MD0_ANA_CON1, 0x0001); in samsung_mipi_dphy_data_lane_timing_init()
1649 regmap_write(samsung->regmap, COMBO_MD1_ANA_CON1, 0x0001); in samsung_mipi_dphy_data_lane_timing_init()
1650 regmap_write(samsung->regmap, COMBO_MD2_ANA_CON1, 0x0001); in samsung_mipi_dphy_data_lane_timing_init()
1651 regmap_write(samsung->regmap, DPHY_MD3_ANA_CON1, 0x0001); in samsung_mipi_dphy_data_lane_timing_init()
1655 * Divide-by-2 Clock from Serial Clock. Use this when data rate is under in samsung_mipi_dphy_data_lane_timing_init()
1656 * 1500Mbps, otherwise divide-by-16 Clock from Serial Clock in samsung_mipi_dphy_data_lane_timing_init()
1661 val |= T_LPX(timing->lpx); in samsung_mipi_dphy_data_lane_timing_init()
1663 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON0, val); in samsung_mipi_dphy_data_lane_timing_init()
1664 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON0, val); in samsung_mipi_dphy_data_lane_timing_init()
1665 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON0, val); in samsung_mipi_dphy_data_lane_timing_init()
1666 regmap_write(samsung->regmap, DPHY_MD3_TIME_CON0, val); in samsung_mipi_dphy_data_lane_timing_init()
1668 val = T_HS_ZERO(timing->hs_zero) | T_HS_PREPARE(timing->hs_prepare); in samsung_mipi_dphy_data_lane_timing_init()
1669 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON1, val); in samsung_mipi_dphy_data_lane_timing_init()
1670 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON1, val); in samsung_mipi_dphy_data_lane_timing_init()
1671 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON1, val); in samsung_mipi_dphy_data_lane_timing_init()
1672 regmap_write(samsung->regmap, DPHY_MD3_TIME_CON1, val); in samsung_mipi_dphy_data_lane_timing_init()
1674 val = T_HS_EXIT(timing->hs_exit) | T_HS_TRAIL(timing->hs_trail_eot); in samsung_mipi_dphy_data_lane_timing_init()
1675 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON2, val); in samsung_mipi_dphy_data_lane_timing_init()
1676 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON2, val); in samsung_mipi_dphy_data_lane_timing_init()
1677 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON2, val); in samsung_mipi_dphy_data_lane_timing_init()
1678 regmap_write(samsung->regmap, DPHY_MD3_TIME_CON2, val); in samsung_mipi_dphy_data_lane_timing_init()
1680 /* TTA-GET/TTA-GO Timing Counter register use default value */ in samsung_mipi_dphy_data_lane_timing_init()
1682 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON3, val); in samsung_mipi_dphy_data_lane_timing_init()
1683 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON3, val); in samsung_mipi_dphy_data_lane_timing_init()
1684 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON3, val); in samsung_mipi_dphy_data_lane_timing_init()
1685 regmap_write(samsung->regmap, DPHY_MD3_TIME_CON3, val); in samsung_mipi_dphy_data_lane_timing_init()
1688 regmap_write(samsung->regmap, COMBO_MD0_TIME_CON4, 0x1f4); in samsung_mipi_dphy_data_lane_timing_init()
1689 regmap_write(samsung->regmap, COMBO_MD1_TIME_CON4, 0x1f4); in samsung_mipi_dphy_data_lane_timing_init()
1690 regmap_write(samsung->regmap, COMBO_MD2_TIME_CON4, 0x1f4); in samsung_mipi_dphy_data_lane_timing_init()
1691 regmap_write(samsung->regmap, DPHY_MD3_TIME_CON4, 0x1f4); in samsung_mipi_dphy_data_lane_timing_init()
1697 regmap_write(samsung->regmap, DPHY_MC_ANA_CON2, HS_VREG_AMP_ICON(2)); in samsung_mipi_dcphy_hs_vreg_amp_configure()
1702 reset_control_assert(samsung->m_phy_rst); in samsung_mipi_dphy_power_on()
1711 reset_control_deassert(samsung->m_phy_rst); in samsung_mipi_dphy_power_on()
1721 regmap_write(samsung->grf_regmap, MIPI_DCPHY_GRF_CON0, M_CPHY_MODE); in samsung_mipi_cphy_power_on()
1722 reset_control_assert(samsung->m_phy_rst); in samsung_mipi_cphy_power_on()
1731 reset_control_deassert(samsung->m_phy_rst); in samsung_mipi_cphy_power_on()
1743 pm_runtime_get_sync(samsung->dev); in samsung_mipi_dcphy_power_on()
1744 reset_control_assert(samsung->apb_rst); in samsung_mipi_dcphy_power_on()
1746 reset_control_deassert(samsung->apb_rst); in samsung_mipi_dcphy_power_on()
1747 if (atomic_read(&samsung->stream_cnt)) { in samsung_mipi_dcphy_power_on()
1748 sensor_sd = get_remote_sensor(&samsung->dphy_dev[0]->sd); in samsung_mipi_dcphy_power_on()
1749 samsung->stream_off(samsung->dphy_dev[0], &samsung->dphy_dev[0]->sd); in samsung_mipi_dcphy_power_on()
1753 samsung->stream_on(samsung->dphy_dev[0], &samsung->dphy_dev[0]->sd); in samsung_mipi_dcphy_power_on()
1787 pm_runtime_put(samsung->dev); in samsung_mipi_dcphy_power_off()
1802 unsigned long fin = div64_ul(clk_get_rate(samsung->ref_clk), MSEC_PER_SEC); in samsung_mipi_dcphy_pll_ssc_modulation_calc()
1803 u16 prediv = samsung->pll.prediv; in samsung_mipi_dcphy_pll_ssc_modulation_calc()
1804 u16 fbdiv = samsung->pll.fbdiv; in samsung_mipi_dcphy_pll_ssc_modulation_calc()
1836 dev_err(samsung->dev, "failed to calc ssc parameter mfr and mrr\n"); in samsung_mipi_dcphy_pll_ssc_modulation_calc()
1837 return -EINVAL; in samsung_mipi_dcphy_pll_ssc_modulation_calc()
1847 unsigned long prate = clk_get_rate(samsung->ref_clk); in samsung_mipi_dcphy_pll_calc_rate()
1859 dev_dbg(samsung->dev, "%s: fin=%lu, req_rate=%llu\n", in samsung_mipi_dcphy_pll_calc_rate()
1861 dev_dbg(samsung->dev, "%s: fout=%lu, prediv=%u, fbdiv=%u\n", in samsung_mipi_dcphy_pll_calc_rate()
1864 samsung->pll.prediv = prediv; in samsung_mipi_dcphy_pll_calc_rate()
1865 samsung->pll.fbdiv = fbdiv; in samsung_mipi_dcphy_pll_calc_rate()
1866 samsung->pll.dsm = dsm; in samsung_mipi_dcphy_pll_calc_rate()
1867 samsung->pll.scaler = scaler; in samsung_mipi_dcphy_pll_calc_rate()
1868 samsung->pll.rate = fout; in samsung_mipi_dcphy_pll_calc_rate()
1878 samsung->pll.ssc_en = true; in samsung_mipi_dcphy_pll_calc_rate()
1879 samsung->pll.mfr = mfr; in samsung_mipi_dcphy_pll_calc_rate()
1880 samsung->pll.mrr = mrr; in samsung_mipi_dcphy_pll_calc_rate()
1889 unsigned long long target_rate = opts->mipi_dphy.hs_clk_rate; in samsung_mipi_dcphy_configure()
1892 samsung->c_option = (mode == PHY_MODE_MIPI_DPHY) ? false : true; in samsung_mipi_dcphy_configure()
1894 samsung->lanes = opts->mipi_dphy.lanes > 4 ? 4 : opts->mipi_dphy.lanes; in samsung_mipi_dcphy_configure()
1897 opts->mipi_dphy.hs_clk_rate = samsung->pll.rate; in samsung_mipi_dcphy_configure()
1907 local = &sd->entity.pads[CSI2_DPHY_RX_PAD_SINK]; in get_remote_sensor()
1914 sensor_me = media_entity_remote_pad(local)->entity; in get_remote_sensor()
1923 for (i = 0; i < dphy->num_sensors; ++i) in sd_to_sensor()
1924 if (dphy->sensors[i].sd == sd) in sd_to_sensor()
1925 return &dphy->sensors[i]; in sd_to_sensor()
1933 struct samsung_mipi_dcphy *samsung = dphy->samsung_phy; in samsung_dcphy_rx_config_settle()
1939 if (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) { in samsung_dcphy_rx_config_settle()
1943 } else if (sensor->mbus.type == V4L2_MBUS_CSI2_CPHY) { in samsung_dcphy_rx_config_settle()
1948 dev_err(dphy->dev, "mbus type %d is not support", in samsung_dcphy_rx_config_settle()
1949 sensor->mbus.type); in samsung_dcphy_rx_config_settle()
1954 if (hsfreq_ranges[i].range_h >= dphy->data_rate_mbps) { in samsung_dcphy_rx_config_settle()
1961 i = num_hsfreq_ranges - 1; in samsung_dcphy_rx_config_settle()
1962 dev_warn(dphy->dev, "data rate: %lld mbps, max support %d mbps", in samsung_dcphy_rx_config_settle()
1963 dphy->data_rate_mbps, hsfreq_ranges[i].range_h + 1); in samsung_dcphy_rx_config_settle()
1967 if (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) in samsung_dcphy_rx_config_settle()
1968 regmap_write(samsung->regmap, RX_CLK_THS_SETTLE, 0x301); in samsung_dcphy_rx_config_settle()
1970 if (sensor->lanes > 0x00) { in samsung_dcphy_rx_config_settle()
1971 regmap_update_bits(samsung->regmap, RX_LANE0_THS_SETTLE, 0x1ff, hsfreq); in samsung_dcphy_rx_config_settle()
1972 regmap_update_bits(samsung->regmap, RX_LANE0_ERR_SOT_SYNC, 0xff, sot_sync); in samsung_dcphy_rx_config_settle()
1974 if (sensor->lanes > 0x01) { in samsung_dcphy_rx_config_settle()
1975 regmap_update_bits(samsung->regmap, RX_LANE1_THS_SETTLE, 0x1ff, hsfreq); in samsung_dcphy_rx_config_settle()
1976 regmap_update_bits(samsung->regmap, RX_LANE1_ERR_SOT_SYNC, 0xff, sot_sync); in samsung_dcphy_rx_config_settle()
1978 if (sensor->lanes > 0x02) { in samsung_dcphy_rx_config_settle()
1979 regmap_update_bits(samsung->regmap, RX_LANE2_THS_SETTLE, 0x1ff, hsfreq); in samsung_dcphy_rx_config_settle()
1980 regmap_update_bits(samsung->regmap, RX_LANE2_ERR_SOT_SYNC, 0xff, sot_sync); in samsung_dcphy_rx_config_settle()
1982 if (sensor->lanes > 0x03) { in samsung_dcphy_rx_config_settle()
1983 regmap_update_bits(samsung->regmap, RX_LANE3_THS_SETTLE, 0x1ff, hsfreq); in samsung_dcphy_rx_config_settle()
1984 regmap_update_bits(samsung->regmap, RX_LANE3_ERR_SOT_SYNC, 0xff, sot_sync); in samsung_dcphy_rx_config_settle()
1991 struct samsung_mipi_dcphy *samsung = dphy->samsung_phy; in samsung_dcphy_rx_config_common()
1995 if (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) { in samsung_dcphy_rx_config_common()
1996 if (dphy->data_rate_mbps < 1500) in samsung_dcphy_rx_config_common()
1998 else if (dphy->data_rate_mbps < 2000) in samsung_dcphy_rx_config_common()
2000 else if (dphy->data_rate_mbps < 3000) in samsung_dcphy_rx_config_common()
2002 else if (dphy->data_rate_mbps < 4000) in samsung_dcphy_rx_config_common()
2004 else if (dphy->data_rate_mbps < 6500) in samsung_dcphy_rx_config_common()
2006 if (dphy->dphy_param.clk_hs_term_sel > 0x7) { in samsung_dcphy_rx_config_common()
2007 dev_err(dphy->dev, "clk_hs_term_sel error param %d\n", in samsung_dcphy_rx_config_common()
2008 dphy->dphy_param.clk_hs_term_sel); in samsung_dcphy_rx_config_common()
2009 return -EINVAL; in samsung_dcphy_rx_config_common()
2011 for (i = 0; i < sensor->lanes; i++) { in samsung_dcphy_rx_config_common()
2012 if (dphy->dphy_param.data_hs_term_sel[i] > 0x7) { in samsung_dcphy_rx_config_common()
2013 dev_err(dphy->dev, "data_hs_term_sel[%d] error param %d\n", in samsung_dcphy_rx_config_common()
2015 dphy->dphy_param.data_hs_term_sel[i]); in samsung_dcphy_rx_config_common()
2016 return -EINVAL; in samsung_dcphy_rx_config_common()
2018 if (dphy->dphy_param.lp_hys_sw[i] > 0x3) { in samsung_dcphy_rx_config_common()
2019 dev_err(dphy->dev, "lp_hys_sw[%d] error param %d\n", in samsung_dcphy_rx_config_common()
2021 dphy->dphy_param.lp_hys_sw[i]); in samsung_dcphy_rx_config_common()
2022 return -EINVAL; in samsung_dcphy_rx_config_common()
2024 if (dphy->dphy_param.lp_escclk_pol_sel[i] > 0x1) { in samsung_dcphy_rx_config_common()
2025 dev_err(dphy->dev, "lp_escclk_pol_sel[%d] error param %d\n", in samsung_dcphy_rx_config_common()
2027 dphy->dphy_param.lp_escclk_pol_sel[i]); in samsung_dcphy_rx_config_common()
2028 return -EINVAL; in samsung_dcphy_rx_config_common()
2030 if (dphy->dphy_param.skew_data_cal_clk[i] > 0x1f) { in samsung_dcphy_rx_config_common()
2031 dev_err(dphy->dev, "skew_data_cal_clk[%d] error param %d\n", in samsung_dcphy_rx_config_common()
2033 dphy->dphy_param.skew_data_cal_clk[i]); in samsung_dcphy_rx_config_common()
2034 return -EINVAL; in samsung_dcphy_rx_config_common()
2037 regmap_write(samsung->regmap, RX_S0C_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2038 regmap_write(samsung->regmap, RX_S0C_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2039 regmap_write(samsung->regmap, RX_S0C_ANA_CON2, dphy->dphy_param.clk_hs_term_sel); in samsung_dcphy_rx_config_common()
2040 regmap_write(samsung->regmap, RX_S0C_ANA_CON3, 0x0600); in samsung_dcphy_rx_config_common()
2041 if (sensor->lanes > 0x00) { in samsung_dcphy_rx_config_common()
2042 regmap_write(samsung->regmap, RX_COMBO_S0D0_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2043 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2044 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON2, dlysel | in samsung_dcphy_rx_config_common()
2045 dphy->dphy_param.data_hs_term_sel[0]); in samsung_dcphy_rx_config_common()
2046 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON3, 0x0600 | in samsung_dcphy_rx_config_common()
2047 (dphy->dphy_param.lp_hys_sw[0] << 4) | in samsung_dcphy_rx_config_common()
2048 (dphy->dphy_param.lp_escclk_pol_sel[0] << 11)); in samsung_dcphy_rx_config_common()
2049 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON7, 0x40); in samsung_dcphy_rx_config_common()
2050 regmap_write(samsung->regmap, RX_COMBO_S0D0_DESKEW_CON2, in samsung_dcphy_rx_config_common()
2051 dphy->dphy_param.skew_data_cal_clk[0]); in samsung_dcphy_rx_config_common()
2053 if (sensor->lanes > 0x01) { in samsung_dcphy_rx_config_common()
2054 regmap_write(samsung->regmap, RX_COMBO_S0D1_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2055 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2056 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON2, dlysel | in samsung_dcphy_rx_config_common()
2057 dphy->dphy_param.data_hs_term_sel[1]); in samsung_dcphy_rx_config_common()
2058 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON3, 0x0600 | in samsung_dcphy_rx_config_common()
2059 (dphy->dphy_param.lp_hys_sw[1] << 4) | in samsung_dcphy_rx_config_common()
2060 (dphy->dphy_param.lp_escclk_pol_sel[1] << 11)); in samsung_dcphy_rx_config_common()
2061 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON7, 0x40); in samsung_dcphy_rx_config_common()
2062 regmap_write(samsung->regmap, RX_COMBO_S0D1_DESKEW_CON2, in samsung_dcphy_rx_config_common()
2063 dphy->dphy_param.skew_data_cal_clk[1]); in samsung_dcphy_rx_config_common()
2065 if (sensor->lanes > 0x02) { in samsung_dcphy_rx_config_common()
2066 regmap_write(samsung->regmap, RX_COMBO_S0D2_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2067 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2068 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON2, dlysel | in samsung_dcphy_rx_config_common()
2069 dphy->dphy_param.data_hs_term_sel[2]); in samsung_dcphy_rx_config_common()
2070 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON3, 0x0600 | in samsung_dcphy_rx_config_common()
2071 (dphy->dphy_param.lp_hys_sw[2] << 4) | in samsung_dcphy_rx_config_common()
2072 (dphy->dphy_param.lp_escclk_pol_sel[2] << 11)); in samsung_dcphy_rx_config_common()
2073 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON7, 0x40); in samsung_dcphy_rx_config_common()
2074 regmap_write(samsung->regmap, RX_COMBO_S0D2_DESKEW_CON2, in samsung_dcphy_rx_config_common()
2075 dphy->dphy_param.skew_data_cal_clk[2]); in samsung_dcphy_rx_config_common()
2077 if (sensor->lanes > 0x03) { in samsung_dcphy_rx_config_common()
2078 regmap_write(samsung->regmap, RX_S0D3_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2079 regmap_write(samsung->regmap, RX_S0D3_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2080 regmap_write(samsung->regmap, RX_S0D3_ANA_CON2, dlysel | in samsung_dcphy_rx_config_common()
2081 dphy->dphy_param.data_hs_term_sel[3]); in samsung_dcphy_rx_config_common()
2082 regmap_write(samsung->regmap, RX_S0D3_ANA_CON3, 0x0600 | in samsung_dcphy_rx_config_common()
2083 (dphy->dphy_param.lp_hys_sw[3] << 4) | in samsung_dcphy_rx_config_common()
2084 (dphy->dphy_param.lp_escclk_pol_sel[3] << 11)); in samsung_dcphy_rx_config_common()
2085 regmap_write(samsung->regmap, RX_S0D3_DESKEW_CON2, in samsung_dcphy_rx_config_common()
2086 dphy->dphy_param.skew_data_cal_clk[3]); in samsung_dcphy_rx_config_common()
2089 if (sensor->lanes > 0x00) { in samsung_dcphy_rx_config_common()
2090 regmap_write(samsung->regmap, RX_COMBO_S0D0_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2091 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2092 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON2, 0x5); in samsung_dcphy_rx_config_common()
2093 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON3, 0x600); in samsung_dcphy_rx_config_common()
2094 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON6, 0x608); in samsung_dcphy_rx_config_common()
2095 regmap_write(samsung->regmap, RX_COMBO_S0D0_ANA_CON7, 0x40); in samsung_dcphy_rx_config_common()
2096 regmap_write(samsung->regmap, RX_COMBO_S0D0_CRC_CON1, 0x1500); in samsung_dcphy_rx_config_common()
2097 regmap_write(samsung->regmap, RX_COMBO_S0D0_CRC_CON2, 0x30); in samsung_dcphy_rx_config_common()
2099 if (sensor->lanes > 0x01) { in samsung_dcphy_rx_config_common()
2100 regmap_write(samsung->regmap, RX_COMBO_S0D1_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2101 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2102 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON2, 0x5); in samsung_dcphy_rx_config_common()
2103 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON3, 0x600); in samsung_dcphy_rx_config_common()
2104 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON6, 0x608); in samsung_dcphy_rx_config_common()
2105 regmap_write(samsung->regmap, RX_COMBO_S0D1_ANA_CON7, 0x40); in samsung_dcphy_rx_config_common()
2106 regmap_write(samsung->regmap, RX_COMBO_S0D1_CRC_CON1, 0x1500); in samsung_dcphy_rx_config_common()
2107 regmap_write(samsung->regmap, RX_COMBO_S0D1_CRC_CON2, 0x30); in samsung_dcphy_rx_config_common()
2109 if (sensor->lanes > 0x02) { in samsung_dcphy_rx_config_common()
2110 regmap_write(samsung->regmap, RX_COMBO_S0D2_GNR_CON1, 0x1450); in samsung_dcphy_rx_config_common()
2111 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON1, 0x8000); in samsung_dcphy_rx_config_common()
2112 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON2, 0x5); in samsung_dcphy_rx_config_common()
2113 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON3, 0x600); in samsung_dcphy_rx_config_common()
2114 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON6, 0x608); in samsung_dcphy_rx_config_common()
2115 regmap_write(samsung->regmap, RX_COMBO_S0D2_ANA_CON7, 0x40); in samsung_dcphy_rx_config_common()
2116 regmap_write(samsung->regmap, RX_COMBO_S0D2_CRC_CON1, 0x1500); in samsung_dcphy_rx_config_common()
2117 regmap_write(samsung->regmap, RX_COMBO_S0D2_CRC_CON2, 0x30); in samsung_dcphy_rx_config_common()
2126 struct samsung_mipi_dcphy *samsung = dphy->samsung_phy; in samsung_dcphy_rx_lane_enable()
2130 if (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) in samsung_dcphy_rx_lane_enable()
2131 regmap_update_bits(samsung->regmap, RX_CLK_LANE_ENABLE, PHY_ENABLE, PHY_ENABLE); in samsung_dcphy_rx_lane_enable()
2133 if (sensor->lanes > 0x00) in samsung_dcphy_rx_lane_enable()
2134 regmap_update_bits(samsung->regmap, RX_DATA_LANE0_ENABLE, PHY_ENABLE, PHY_ENABLE); in samsung_dcphy_rx_lane_enable()
2135 if (sensor->lanes > 0x01) in samsung_dcphy_rx_lane_enable()
2136 regmap_update_bits(samsung->regmap, RX_DATA_LANE1_ENABLE, PHY_ENABLE, PHY_ENABLE); in samsung_dcphy_rx_lane_enable()
2137 if (sensor->lanes > 0x02) in samsung_dcphy_rx_lane_enable()
2138 regmap_update_bits(samsung->regmap, RX_DATA_LANE2_ENABLE, PHY_ENABLE, PHY_ENABLE); in samsung_dcphy_rx_lane_enable()
2139 if (sensor->lanes > 0x03) in samsung_dcphy_rx_lane_enable()
2140 regmap_update_bits(samsung->regmap, RX_DATA_LANE3_ENABLE, PHY_ENABLE, PHY_ENABLE); in samsung_dcphy_rx_lane_enable()
2143 if (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) { in samsung_dcphy_rx_lane_enable()
2144 ret = regmap_read_poll_timeout(samsung->regmap, RX_CLK_LANE_ENABLE, in samsung_dcphy_rx_lane_enable()
2147 dev_err(samsung->dev, "phy rx clk lane is not locked\n"); in samsung_dcphy_rx_lane_enable()
2148 return -EINVAL; in samsung_dcphy_rx_lane_enable()
2153 if (sensor->lanes > 0x00) { in samsung_dcphy_rx_lane_enable()
2154 ret = regmap_read_poll_timeout(samsung->regmap, RX_DATA_LANE0_ENABLE, in samsung_dcphy_rx_lane_enable()
2157 dev_err(samsung->dev, "phy rx data lane 0 is not locked\n"); in samsung_dcphy_rx_lane_enable()
2158 return -EINVAL; in samsung_dcphy_rx_lane_enable()
2161 if (sensor->lanes > 0x01) { in samsung_dcphy_rx_lane_enable()
2162 ret = regmap_read_poll_timeout(samsung->regmap, RX_DATA_LANE1_ENABLE, in samsung_dcphy_rx_lane_enable()
2165 dev_err(samsung->dev, "phy rx data lane 1 is not locked\n"); in samsung_dcphy_rx_lane_enable()
2166 return -EINVAL; in samsung_dcphy_rx_lane_enable()
2169 if (sensor->lanes > 0x02) { in samsung_dcphy_rx_lane_enable()
2170 ret = regmap_read_poll_timeout(samsung->regmap, RX_DATA_LANE2_ENABLE, in samsung_dcphy_rx_lane_enable()
2173 dev_err(samsung->dev, "phy rx data lane 2 is not locked\n"); in samsung_dcphy_rx_lane_enable()
2174 return -EINVAL; in samsung_dcphy_rx_lane_enable()
2178 if (sensor->lanes > 0x03) { in samsung_dcphy_rx_lane_enable()
2179 ret = regmap_read_poll_timeout(samsung->regmap, RX_DATA_LANE3_ENABLE, in samsung_dcphy_rx_lane_enable()
2182 dev_err(samsung->dev, "phy rx data lane 3 is not locked\n"); in samsung_dcphy_rx_lane_enable()
2183 return -EINVAL; in samsung_dcphy_rx_lane_enable()
2194 struct samsung_mipi_dcphy *samsung = dphy->samsung_phy; in samsung_dcphy_rx_stream_on()
2198 return -ENODEV; in samsung_dcphy_rx_stream_on()
2201 return -ENODEV; in samsung_dcphy_rx_stream_on()
2203 mutex_lock(&samsung->mutex); in samsung_dcphy_rx_stream_on()
2204 if (sensor->mbus.type == V4L2_MBUS_CSI2_CPHY) in samsung_dcphy_rx_stream_on()
2205 regmap_write(samsung->grf_regmap, MIPI_DCPHY_GRF_CON0, S_CPHY_MODE); in samsung_dcphy_rx_stream_on()
2207 if (samsung->s_phy_rst) in samsung_dcphy_rx_stream_on()
2208 reset_control_assert(samsung->s_phy_rst); in samsung_dcphy_rx_stream_on()
2220 if (samsung->s_phy_rst) in samsung_dcphy_rx_stream_on()
2221 reset_control_deassert(samsung->s_phy_rst); in samsung_dcphy_rx_stream_on()
2223 atomic_inc(&samsung->stream_cnt); in samsung_dcphy_rx_stream_on()
2224 mutex_unlock(&samsung->mutex); in samsung_dcphy_rx_stream_on()
2228 if (samsung->s_phy_rst) in samsung_dcphy_rx_stream_on()
2229 reset_control_deassert(samsung->s_phy_rst); in samsung_dcphy_rx_stream_on()
2230 mutex_unlock(&samsung->mutex); in samsung_dcphy_rx_stream_on()
2231 dev_err(dphy->dev, "stream on error\n"); in samsung_dcphy_rx_stream_on()
2232 return -EINVAL; in samsung_dcphy_rx_stream_on()
2239 struct samsung_mipi_dcphy *samsung = dphy->samsung_phy; in samsung_dcphy_rx_stream_off()
2244 return -ENODEV; in samsung_dcphy_rx_stream_off()
2247 return -ENODEV; in samsung_dcphy_rx_stream_off()
2249 if (atomic_dec_return(&samsung->stream_cnt)) in samsung_dcphy_rx_stream_off()
2252 mutex_lock(&samsung->mutex); in samsung_dcphy_rx_stream_off()
2253 if (samsung->s_phy_rst) in samsung_dcphy_rx_stream_off()
2254 reset_control_assert(samsung->s_phy_rst); in samsung_dcphy_rx_stream_off()
2256 if (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) in samsung_dcphy_rx_stream_off()
2257 regmap_update_bits(samsung->regmap, RX_CLK_LANE_ENABLE, PHY_ENABLE, 0); in samsung_dcphy_rx_stream_off()
2259 if (sensor->lanes > 0x00) in samsung_dcphy_rx_stream_off()
2260 regmap_update_bits(samsung->regmap, RX_DATA_LANE0_ENABLE, PHY_ENABLE, 0); in samsung_dcphy_rx_stream_off()
2261 if (sensor->lanes > 0x01) in samsung_dcphy_rx_stream_off()
2262 regmap_update_bits(samsung->regmap, RX_DATA_LANE1_ENABLE, PHY_ENABLE, 0); in samsung_dcphy_rx_stream_off()
2263 if (sensor->lanes > 0x02) in samsung_dcphy_rx_stream_off()
2264 regmap_update_bits(samsung->regmap, RX_DATA_LANE2_ENABLE, PHY_ENABLE, 0); in samsung_dcphy_rx_stream_off()
2265 if (sensor->lanes > 0x03) in samsung_dcphy_rx_stream_off()
2266 regmap_update_bits(samsung->regmap, RX_DATA_LANE3_ENABLE, PHY_ENABLE, 0); in samsung_dcphy_rx_stream_off()
2268 if (samsung->s_phy_rst) in samsung_dcphy_rx_stream_off()
2269 reset_control_deassert(samsung->s_phy_rst); in samsung_dcphy_rx_stream_off()
2272 mutex_unlock(&samsung->mutex); in samsung_dcphy_rx_stream_off()
2281 pm_runtime_get_sync(samsung->dev); in samsung_mipi_dcphy_init()
2290 pm_runtime_put(samsung->dev); in samsung_mipi_dcphy_exit()
2314 struct device *dev = &pdev->dev; in samsung_mipi_dcphy_probe()
2315 struct device_node *np = dev->of_node; in samsung_mipi_dcphy_probe()
2325 return -ENOMEM; in samsung_mipi_dcphy_probe()
2327 samsung->dev = dev; in samsung_mipi_dcphy_probe()
2335 samsung->regmap = devm_regmap_init_mmio(dev, regs, in samsung_mipi_dcphy_probe()
2337 if (IS_ERR(samsung->regmap)) { in samsung_mipi_dcphy_probe()
2338 ret = PTR_ERR(samsung->regmap); in samsung_mipi_dcphy_probe()
2343 samsung->grf_regmap = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); in samsung_mipi_dcphy_probe()
2344 if (IS_ERR(samsung->grf_regmap)) { in samsung_mipi_dcphy_probe()
2346 return PTR_ERR(samsung->grf_regmap); in samsung_mipi_dcphy_probe()
2349 samsung->ref_clk = devm_clk_get(dev, "ref"); in samsung_mipi_dcphy_probe()
2350 if (IS_ERR(samsung->ref_clk)) { in samsung_mipi_dcphy_probe()
2352 return PTR_ERR(samsung->ref_clk); in samsung_mipi_dcphy_probe()
2355 samsung->pclk = devm_clk_get(dev, "pclk"); in samsung_mipi_dcphy_probe()
2356 if (IS_ERR(samsung->pclk)) { in samsung_mipi_dcphy_probe()
2358 return PTR_ERR(samsung->pclk); in samsung_mipi_dcphy_probe()
2361 samsung->m_phy_rst = devm_reset_control_get(dev, "m_phy"); in samsung_mipi_dcphy_probe()
2362 if (IS_ERR(samsung->m_phy_rst)) { in samsung_mipi_dcphy_probe()
2364 return PTR_ERR(samsung->m_phy_rst); in samsung_mipi_dcphy_probe()
2367 samsung->s_phy_rst = devm_reset_control_get(dev, "s_phy"); in samsung_mipi_dcphy_probe()
2368 if (IS_ERR(samsung->s_phy_rst)) { in samsung_mipi_dcphy_probe()
2370 return PTR_ERR(samsung->s_phy_rst); in samsung_mipi_dcphy_probe()
2373 samsung->apb_rst = devm_reset_control_get(dev, "apb"); in samsung_mipi_dcphy_probe()
2374 if (IS_ERR(samsung->apb_rst)) { in samsung_mipi_dcphy_probe()
2376 return PTR_ERR(samsung->apb_rst); in samsung_mipi_dcphy_probe()
2379 samsung->grf_apb_rst = devm_reset_control_get(dev, "grf"); in samsung_mipi_dcphy_probe()
2380 if (IS_ERR(samsung->grf_apb_rst)) { in samsung_mipi_dcphy_probe()
2382 return PTR_ERR(samsung->grf_apb_rst); in samsung_mipi_dcphy_probe()
2387 dev_err(dev, "failed to create MIPI Dc-PHY\n"); in samsung_mipi_dcphy_probe()
2399 samsung->stream_on = samsung_dcphy_rx_stream_on; in samsung_mipi_dcphy_probe()
2400 samsung->stream_off = samsung_dcphy_rx_stream_off; in samsung_mipi_dcphy_probe()
2401 mutex_init(&samsung->mutex); in samsung_mipi_dcphy_probe()
2411 pm_runtime_disable(samsung->dev); in samsung_mipi_dcphy_remove()
2412 mutex_destroy(&samsung->mutex); in samsung_mipi_dcphy_remove()
2421 clk_disable_unprepare(samsung->pclk); in samsung_mipi_dcphy_runtime_suspend()
2422 clk_disable_unprepare(samsung->ref_clk); in samsung_mipi_dcphy_runtime_suspend()
2431 clk_prepare_enable(samsung->pclk); in samsung_mipi_dcphy_runtime_resume()
2432 clk_prepare_enable(samsung->ref_clk); in samsung_mipi_dcphy_runtime_resume()
2444 .compatible = "rockchip,rk3588-mipi-dcphy",
2452 .name = "samsung-mipi-dcphy",
2461 MODULE_AUTHOR("Guochun Huang<hero.huang@rock-chips.com>");