feat(rk3588): report actual measured PVTPLL clocksThe GRF block includes a counter that measures PVTPLL clock pulses afterthe CON1 register, exposed via STATUS1 and STATUS2. The counter uses anin
feat(rk3588): report actual measured PVTPLL clocksThe GRF block includes a counter that measures PVTPLL clock pulses afterthe CON1 register, exposed via STATUS1 and STATUS2. The counter uses aninput clock that can be configured in the CRU block; however, in thecurrent ATF implementation it is always XIN = 24 MHz.The counter accumulates PVTPLL pulses for a window of: measurement_time = CON1 / input_frequencySince CON1 is fixed to 24, the current implementation measures over: 24 / 24 MHz = 1 µsThe resulting count is stored in the lower 14 bits of STATUS2.This commit waits 2 µs (ensuring the 1 µs accumulation period completes)and computes the PVTPLL frequency from the measured value. While CON1could be increased for higher accuracy (as long as the 14-bit counterdoes not overflow), this change keeps the existing 1 µs window forsimplicity.With this feature, PVTPLL frequency can be measured with ~1 MHzaccuracy, instead of reporting only the configured frequency, which canhide information related to chip degradation and environmental effectsimpacting PVTPLL clocks.Ideally the flow of measuring PVTPLL clocks should be the same for therest of RK35xx devices with minor tweaks at most.Change-Id: Idc18246e8d794777f0dacc7820f15fcecc00af33Signed-off-by: Hüseyin BIYIK <boogiepop@gmx.com>
show more ...
feat(rk3588): support SCMI for clock/reset domainrockchip scmi clock controls clocks which only available in secure mode.Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>Change-Id: I5
feat(rk3588): support SCMI for clock/reset domainrockchip scmi clock controls clocks which only available in secure mode.Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>Change-Id: I5b983877a5b4e8acababbf7e0a3e2725e6479e08