Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32397
Change subject: mediatek: Set CPU frequency to 1989MHz ......................................................................
mediatek: Set CPU frequency to 1989MHz
Set CPU frequency from 1100MHz to 1989MHz to improve booting time.
BUG=b:80501386 BRANCH=none Test=Boots correctly on Kukui
Change-Id: Id41c7ea8905c4db2537a5c32f96eb7c6b2c008ea Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- M src/soc/mediatek/mt8183/include/soc/pll.h 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/32397/1
diff --git a/src/soc/mediatek/mt8183/include/soc/pll.h b/src/soc/mediatek/mt8183/include/soc/pll.h index 5a5f58d..e6f5711 100644 --- a/src/soc/mediatek/mt8183/include/soc/pll.h +++ b/src/soc/mediatek/mt8183/include/soc/pll.h @@ -244,7 +244,7 @@
/* PLL rate */ enum { - ARMPLL_LL_HZ = 1100 * MHz, + ARMPLL_LL_HZ = 1989 * MHz, ARMPLL_L_HZ = 1200 * MHz, CCIPLL_HZ = 598 * 2 * MHz, MAINPLL_HZ = 1092 * MHz,
Tristan Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek: Set CPU frequency to 1989MHz ......................................................................
Patch Set 1:
==== CPU 1100MHz ==== 55 entries total:
0:1st timestamp 9 17:starting LZ4 decompress (ignore for x86) 5,446 (5,437) 18:finished LZ4 decompress (ignore for x86) 9,598 (4,152) 17:starting LZ4 decompress (ignore for x86) 36,708 (27,110) 18:finished LZ4 decompress (ignore for x86) 36,989 (281) 5:start of verified boot 37,217 (228) 503:starting to initialize TPM 37,944 (727) 504:finished TPM initialization 77,784 (39,840) 505:starting to verify keyblock/preamble (RSA) 78,586 (802) 506:finished verifying keyblock/preamble (RSA) 114,445 (35,859) 507:starting to verify body (load+SHA2+RSA) 114,858 (413) 508:finished loading body (ignore for x86) 279,096 (164,238) 509:finished calculating body hash (SHA2) 287,437 (8,341) 510:finished verifying body signature (RSA) 293,233 (5,796) 511:starting TPM PCR extend 293,234 (1) 512:finished TPM PCR extend 308,069 (14,835) 513:starting locking TPM 308,070 (1) 514:finished locking TPM 316,032 (7,962) 6:end of verified boot 316,034 (2) 13:starting to load romstage 316,098 (64) 17:starting LZ4 decompress (ignore for x86) 345,578 (29,480) 18:finished LZ4 decompress (ignore for x86) 345,892 (314) 14:finished loading romstage 346,150 (258) 1:start of romstage 346,151 (1) 15:starting LZMA decompress (ignore for x86) 356,878 (10,727) 16:finished LZMA decompress (ignore for x86) 356,908 (30) 4:end of romstage 718,245 (361,337) 8:starting to load ramstage 718,357 (112) 15:starting LZMA decompress (ignore for x86) 740,377 (22,020) 16:finished LZMA decompress (ignore for x86) 748,846 (8,469) 9:finished loading ramstage 748,894 (48) 550:starting to load Chrome OS VPD 748,904 (10) 10:start of ramstage 750,020 (1,116) 30:device enumeration 750,029 (9) 40:device configuration 750,061 (32) 50:device enable 750,122 (61) 60:device initialization 750,128 (6) 70:device setup done 754,726 (4,598) 75:cbmem post 754,732 (6) 80:write tables 754,738 (6) 85:finalize chips 755,349 (611) 90:load payload 763,982 (8,633) 15:starting LZMA decompress (ignore for x86) 816,112 (52,130) 16:finished LZMA decompress (ignore for x86) 835,682 (19,570) 99:selfboot jump 841,732 (6,050) 15:starting LZMA decompress (ignore for x86) 856,851 (15,119) 16:finished LZMA decompress (ignore for x86) 862,614 (5,763) 1000:depthcharge start 1,650,897 (788,283) 1002:RO vboot init 1,650,917 (20) 1020:vboot select&load kernel 1,655,786 (4,869) 1030:finished EC verification 1,728,870 (73,084) 1040:finished storage device initialization 2,249,038 (520,168) 1050:finished reading kernel from disk 2,343,292 (94,254) 1100:finished vboot kernel verification 2,588,244 (244,952) 1102:starting kernel decompression/relocation 2,597,520 (9,276) 1101:jumping to kernel 2,661,734 (64,214)
Total Time: 2,661,725
==== CPU 1417MHz ==== 55 entries total:
0:1st timestamp 9 17:starting LZ4 decompress (ignore for x86) 5,446 (5,437) 18:finished LZ4 decompress (ignore for x86) 9,596 (4,150) 17:starting LZ4 decompress (ignore for x86) 36,276 (26,680) 18:finished LZ4 decompress (ignore for x86) 36,500 (224) 5:start of verified boot 36,724 (224) 503:starting to initialize TPM 37,435 (711) 504:finished TPM initialization 77,239 (39,804) 505:starting to verify keyblock/preamble (RSA) 78,027 (788) 506:finished verifying keyblock/preamble (RSA) 107,213 (29,186) 507:starting to verify body (load+SHA2+RSA) 107,618 (405) 508:finished loading body (ignore for x86) 269,813 (162,195) 509:finished calculating body hash (SHA2) 276,314 (6,501) 510:finished verifying body signature (RSA) 280,877 (4,563) 511:starting TPM PCR extend 280,877 (0) 512:finished TPM PCR extend 295,777 (14,900) 513:starting locking TPM 295,778 (1) 514:finished locking TPM 303,712 (7,934) 6:end of verified boot 303,713 (1) 13:starting to load romstage 303,775 (62) 17:starting LZ4 decompress (ignore for x86) 332,840 (29,065) 18:finished LZ4 decompress (ignore for x86) 333,095 (255) 14:finished loading romstage 333,352 (257) 1:start of romstage 333,352 (0) 15:starting LZMA decompress (ignore for x86) 343,969 (10,617) 16:finished LZMA decompress (ignore for x86) 343,992 (23) 4:end of romstage 704,090 (360,098) 8:starting to load ramstage 704,200 (110) 15:starting LZMA decompress (ignore for x86) 725,957 (21,757) 16:finished LZMA decompress (ignore for x86) 732,531 (6,574) 9:finished loading ramstage 732,574 (43) 550:starting to load Chrome OS VPD 732,582 (8) 10:start of ramstage 733,674 (1,092) 30:device enumeration 733,681 (7) 40:device configuration 733,706 (25) 50:device enable 733,754 (48) 60:device initialization 733,759 (5) 70:device setup done 738,255 (4,496) 75:cbmem post 738,259 (4) 80:write tables 738,265 (6) 85:finalize chips 738,853 (588) 90:load payload 747,520 (8,667) 15:starting LZMA decompress (ignore for x86) 798,989 (51,469) 16:finished LZMA decompress (ignore for x86) 814,190 (15,201) 99:selfboot jump 819,096 (4,906) 15:starting LZMA decompress (ignore for x86) 834,016 (14,920) 16:finished LZMA decompress (ignore for x86) 838,492 (4,476) 1000:depthcharge start 1,626,169 (787,677) 1002:RO vboot init 1,626,187 (18) 1020:vboot select&load kernel 1,631,049 (4,862) 1030:finished EC verification 1,704,025 (72,976) 1040:finished storage device initialization 2,219,421 (515,396) 1050:finished reading kernel from disk 2,311,861 (92,440) 1100:finished vboot kernel verification 2,503,765 (191,904) 1102:starting kernel decompression/relocation 2,512,661 (8,896) 1101:jumping to kernel 2,564,437 (51,776)
Total Time: 2,564,428
==== CPU 1989MHz ==== 55 entries total:
0:1st timestamp 9 17:starting LZ4 decompress (ignore for x86) 5,446 (5,437) 18:finished LZ4 decompress (ignore for x86) 9,596 (4,150) 17:starting LZ4 decompress (ignore for x86) 35,927 (26,331) 18:finished LZ4 decompress (ignore for x86) 36,101 (174) 5:start of verified boot 36,319 (218) 503:starting to initialize TPM 37,016 (697) 504:finished TPM initialization 76,552 (39,536) 505:starting to verify keyblock/preamble (RSA) 77,330 (778) 506:finished verifying keyblock/preamble (RSA) 99,898 (22,568) 507:starting to verify body (load+SHA2+RSA) 100,295 (397) 508:finished loading body (ignore for x86) 260,287 (159,992) 509:finished calculating body hash (SHA2) 264,945 (4,658) 510:finished verifying body signature (RSA) 268,049 (3,104) 511:starting TPM PCR extend 268,050 (1) 512:finished TPM PCR extend 286,299 (18,249) 513:starting locking TPM 286,299 (0) 514:finished locking TPM 294,287 (7,988) 6:end of verified boot 294,288 (1) 13:starting to load romstage 294,348 (60) 17:starting LZ4 decompress (ignore for x86) 323,012 (28,664) 18:finished LZ4 decompress (ignore for x86) 323,215 (203) 14:finished loading romstage 323,470 (255) 1:start of romstage 323,471 (1) 15:starting LZMA decompress (ignore for x86) 334,429 (10,958) 16:finished LZMA decompress (ignore for x86) 334,444 (15) 4:end of romstage 691,843 (357,399) 8:starting to load ramstage 691,949 (106) 15:starting LZMA decompress (ignore for x86) 713,418 (21,469) 16:finished LZMA decompress (ignore for x86) 718,102 (4,684) 9:finished loading ramstage 718,139 (37) 550:starting to load Chrome OS VPD 718,145 (6) 10:start of ramstage 719,212 (1,067) 30:device enumeration 719,219 (7) 40:device configuration 719,238 (19) 50:device enable 719,272 (34) 60:device initialization 719,276 (4) 70:device setup done 723,677 (4,401) 75:cbmem post 723,681 (4) 80:write tables 723,686 (5) 85:finalize chips 724,253 (567) 90:load payload 733,037 (8,784) 15:starting LZMA decompress (ignore for x86) 783,814 (50,777) 16:finished LZMA decompress (ignore for x86) 794,644 (10,830) 99:selfboot jump 798,435 (3,791) 15:starting LZMA decompress (ignore for x86) 813,149 (14,714) 16:finished LZMA decompress (ignore for x86) 816,336 (3,187) 1000:depthcharge start 1,603,323 (786,987) 1002:RO vboot init 1,603,340 (17) 1020:vboot select&load kernel 1,608,202 (4,862) 1030:finished EC verification 1,680,069 (71,867) 1040:finished storage device initialization 2,186,014 (505,945) 1050:finished reading kernel from disk 2,276,670 (90,656) 1100:finished vboot kernel verification 2,415,507 (138,837) 1102:starting kernel decompression/relocation 2,424,001 (8,494) 1101:jumping to kernel 2,464,276 (40,275)
Total Time: 2,464,267
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek: Set CPU frequency to 1989MHz ......................................................................
Patch Set 1: Code-Review+1
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek: Set CPU frequency to 1989MHz ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32397/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32397/1//COMMIT_MSG@7 PS1, Line 7: mediatek: Set CPU frequency to 1989MHz mediatek/mt8183
Hello Julius Werner, You-Cheng Syu, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32397
to look at the new patch set (#2).
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
mediatek/mt8183: Set CPU frequency to 1989MHz
Set CPU frequency from 1100MHz to 1989MHz to improve booting time.
BUG=b:80501386 BRANCH=none Test=Boots correctly on Kukui
Change-Id: Id41c7ea8905c4db2537a5c32f96eb7c6b2c008ea Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- M src/soc/mediatek/mt8183/include/soc/pll.h 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/32397/2
Tristan Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/32397/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32397/1//COMMIT_MSG@7 PS1, Line 7: mediatek: Set CPU frequency to 1989MHz
mediatek/mt8183
Done
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
mediatek/mt8183: Set CPU frequency to 1989MHz
Set CPU frequency from 1100MHz to 1989MHz to improve booting time.
BUG=b:80501386 BRANCH=none Test=Boots correctly on Kukui
Change-Id: Id41c7ea8905c4db2537a5c32f96eb7c6b2c008ea Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/32397 Reviewed-by: Hung-Te Lin hungte@chromium.org Reviewed-by: You-Cheng Syu youcheng@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/mt8183/include/soc/pll.h 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved You-Cheng Syu: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8183/include/soc/pll.h b/src/soc/mediatek/mt8183/include/soc/pll.h index 5a5f58d..e6f5711 100644 --- a/src/soc/mediatek/mt8183/include/soc/pll.h +++ b/src/soc/mediatek/mt8183/include/soc/pll.h @@ -244,7 +244,7 @@
/* PLL rate */ enum { - ARMPLL_LL_HZ = 1100 * MHz, + ARMPLL_LL_HZ = 1989 * MHz, ARMPLL_L_HZ = 1200 * MHz, CCIPLL_HZ = 598 * 2 * MHz, MAINPLL_HZ = 1092 * MHz,
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
Patch Set 3:
Be careful that you maintain causality here! You have to *first* increase the CPU voltage, make sure there's enough time for it to stabilize, and *then* increase the CPU frequency. As far as I can tell your mt6358_init() runs in romstage but your mt_pll_init() already runs in the bootblock, so you'll run half of your firmware with an undervolted CPU!
You'll want to either pull (at least some of) the PMIC init into the bootblock, or create an extra function to increase the CPU frequency later in romstage. The latter is what we did on MT8173 (see mt_pll_raise_ca53_freq()) and is generally much safer (because then you can RW update it if necessary), so I'd recommend to do that unless you determine that the extra CPU speed in verstage really makes a significant speed impact.
(Also, we've had some regulator overshoot problems on other boards in the past when we increased the CPU voltage too quickly... you may want to scope the voltage when running this code to confirm it doesn't overshoot.)
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
Patch Set 3:
Thanks for Julius' good catch! I think we should move it to romstage since we do need to minimize bootblock.
@Tristan can you make the changes?
Tristan Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
Patch Set 3:
Patch Set 3:
Thanks for Julius' good catch! I think we should move it to romstage since we do need to minimize bootblock.
@Tristan can you make the changes?
Thanks. I'll do that.
Tristan Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32397 )
Change subject: mediatek/mt8183: Set CPU frequency to 1989MHz ......................................................................
Patch Set 3:
Patch Set 3:
Patch Set 3:
Thanks for Julius' good catch! I think we should move it to romstage since we do need to minimize bootblock.
@Tristan can you make the changes?
Thanks. I'll do that.
I've pushed new CLs: https://review.coreboot.org/c/coreboot/+/32466 https://review.coreboot.org/c/coreboot/+/32465 https://review.coreboot.org/c/coreboot/+/32464
The sequence is: CPU frequency 1417MHz@bootblock -> CPU Voltage 1.05V@romstage -> CPU frequency 1989MHz@romstage
And we can discuss the voltage and frequency issue in CL#32466