Commit 66d58ad
committed
clk: sunxi-ng: h616: switch CPU to backup clock source when changing frequency
H616 CPU, as in the most of Allwinner chips, is clocked from PLL called PLL_CPUX. The PLL can temporary become unstable when adjusting divider and factors to adjust its output frequency.
So in order to safely change CPU frequency we need first switch the CPU to another clock source, for instance to PLL_PERIPH0. We then need to gate/ungate PLL_CPUX and wait for the corresponding status bit to verify it's locked.
This procedure is mandated by T5 User Manual, section 3.3.3.1 and it is implemented in vendor BSP in the same way.
Tested extensively on dozens of custom T507 boards (Wiren Board 8 PLC). In our test this fix significantly improved the stability, especially at low core voltages.
From my understanding, all Allwinner SoCs need to follow this kind of procedure, however it's only implemented in mainline for a handful of chips.1 parent e46c8f3 commit 66d58ad
1 file changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
732 | 747 | | |
733 | 748 | | |
734 | 749 | | |
| |||
1093 | 1108 | | |
1094 | 1109 | | |
1095 | 1110 | | |
| 1111 | + | |
1096 | 1112 | | |
1097 | 1113 | | |
1098 | 1114 | | |
| |||
1147 | 1163 | | |
1148 | 1164 | | |
1149 | 1165 | | |
1150 | | - | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1151 | 1177 | | |
1152 | 1178 | | |
1153 | 1179 | | |
| |||
0 commit comments