class AmlA1PllDevice
Defined at line 50 of file ../../src/devices/lib/amlogic/include/soc/aml-a1/a1-hiu.h
Note:
For A1: od = 0, frac_reg_width = 19
frac_max = 1
<
<
(frac_reg_width - 2)
out = [ 24M * (m + frac / frac_max) / n ] / ( 1
<
<
od)
e.g.
If want set hifi_pll to 1467'648'000 hz,
then we can get m/n = 1467.648M/24M ≈ 61.
Let m = 61, n = 1 firstly.
1. get fractional part.
target_rate * N * frac_max
frac_cal = ROUND_UP(___________________________ - M * frac_max );
24Mhz
then we can get frac_cal = 19923.
2. get final frac.
frac = min(frac_cal, (frac_max - 1))
frac = 19923.
Public Methods
zx_status_t Initialize ()
Initialize `AmlA1PllDevice`.
Defined at line 57 of file ../../src/devices/lib/amlogic/include/soc/aml-a1/a1-hiu.h
const hhi_pll_rate_t * GetRateTable ()
Return correct clock rate table for selected clock.
Defined at line 64 of file ../../src/devices/lib/amlogic/include/soc/aml-a1/a1-hiu.h
size_t GetRateTableSize ()
Return the count of the rate table for the clock.
Defined at line 67 of file ../../src/devices/lib/amlogic/include/soc/aml-a1/a1-hiu.h
std::unique_ptr<AmlMesonPllDevice> Create (fdf::MmioView view, const meson_clk_pll_data_t * data, const cpp20::span<const hhi_pll_rate_t> rates_table)
Defined at line 115 of file ../../src/devices/lib/amlogic/a1-hiu.cc
zx_status_t Enable ()
Enable the selected clock.
Defined at line 63 of file ../../src/devices/lib/amlogic/a1-pll-rates.cc
void Disable ()
Disable the selected clock.
Defined at line 56 of file ../../src/devices/lib/amlogic/a1-pll-rates.cc
zx_status_t SetRate (const uint64_t hz)
Set the rate of the selected clock.
Defined at line 73 of file ../../src/devices/lib/amlogic/a1-pll-rates.cc
Protected Methods
void AmlA1PllDevice (fdf::MmioView view, const meson_clk_pll_data_t * data, const cpp20::span<const hhi_pll_rate_t> rates_table)
Defined at line 79 of file ../../src/devices/lib/amlogic/include/soc/aml-a1/a1-hiu.h