Lines Matching refs:mhz

28 	{.mhz = 928, .refdiv = 1, .fbdiv = 116, .postdiv1 = 3, .postdiv2 = 1},
29 {.mhz = 800, .refdiv = 1, .fbdiv = 100, .postdiv1 = 3, .postdiv2 = 1},
30 {.mhz = 732, .refdiv = 1, .fbdiv = 61, .postdiv1 = 2, .postdiv2 = 1},
31 {.mhz = 666, .refdiv = 1, .fbdiv = 111, .postdiv1 = 4, .postdiv2 = 1},
32 {.mhz = 600, .refdiv = 1, .fbdiv = 50, .postdiv1 = 2, .postdiv2 = 1},
33 {.mhz = 528, .refdiv = 1, .fbdiv = 66, .postdiv1 = 3, .postdiv2 = 1},
34 {.mhz = 400, .refdiv = 1, .fbdiv = 50, .postdiv1 = 3, .postdiv2 = 1},
35 {.mhz = 300, .refdiv = 1, .fbdiv = 50, .postdiv1 = 4, .postdiv2 = 1},
36 {.mhz = 200, .refdiv = 1, .fbdiv = 50, .postdiv1 = 3, .postdiv2 = 2},
328 delay_adder = ie_enable / (1000000 / pdram_timing->mhz); in get_pi_rdlat_adj()
329 if ((ie_enable % (1000000 / pdram_timing->mhz)) != 0) in get_pi_rdlat_adj()
335 tsel_adder = tsel_enable / (1000000 / pdram_timing->mhz); in get_pi_rdlat_adj()
336 if ((tsel_enable % (1000000 / pdram_timing->mhz)) != 0) in get_pi_rdlat_adj()
402 delay_adder = ie_enable / (1000000 / pdram_timing->mhz); in get_pi_tdfi_phy_rdlat()
403 if ((ie_enable % (1000000 / pdram_timing->mhz)) != 0) in get_pi_tdfi_phy_rdlat()
416 ie_delay_adder = ie_enable / (1000000 / pdram_timing->mhz); in get_pi_tdfi_phy_rdlat()
417 if ((ie_enable % (1000000 / pdram_timing->mhz)) != 0) in get_pi_tdfi_phy_rdlat()
432 delay_adder = round_trip_ps / (1000000 / pdram_timing->mhz); in get_pi_tdfi_phy_rdlat()
433 if ((round_trip_ps % (1000000 / pdram_timing->mhz)) != 0) in get_pi_tdfi_phy_rdlat()
437 lpddr_adder = mem_delay_ps / (1000000 / pdram_timing->mhz); in get_pi_tdfi_phy_rdlat()
438 if ((mem_delay_ps % (1000000 / pdram_timing->mhz)) != 0) in get_pi_tdfi_phy_rdlat()
461 tmp = todtoff_min_ps / (1000000 / pdram_timing->mhz); in get_pi_todtoff_min()
462 if ((todtoff_min_ps % (1000000 / pdram_timing->mhz)) != 0) in get_pi_todtoff_min()
479 tmp = todtoff_max_ps / (1000000 / pdram_timing->mhz); in get_pi_todtoff_max()
480 if ((todtoff_max_ps % (1000000 / pdram_timing->mhz)) != 0) in get_pi_todtoff_max()
703 tmp1 = 20000 / (1000000 / pdram_timing->mhz) + 1; in gen_rk3399_ctl_params_f0()
704 if ((20000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_ctl_params_f0()
953 tmp1 = 20000 / (1000000 / pdram_timing->mhz) + 1; in gen_rk3399_ctl_params_f1()
954 if ((20000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_ctl_params_f1()
1119 tmp1 = 20000 / (1000000 / pdram_timing->mhz) + 1; in gen_rk3399_pi_params_f0()
1120 if ((20000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_pi_params_f0()
1130 tmp1 = 2 * 1000 / (1000000 / pdram_timing->mhz); in gen_rk3399_pi_params_f0()
1131 if ((2 * 1000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_pi_params_f0()
1137 tmp = 10000 / (1000000 / pdram_timing->mhz); in gen_rk3399_pi_params_f0()
1138 if ((10000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_pi_params_f0()
1140 if (pdram_timing->mhz <= 100) in gen_rk3399_pi_params_f0()
1296 tmp1 = 20000 / (1000000 / pdram_timing->mhz) + 1; in gen_rk3399_pi_params_f1()
1297 if ((20000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_pi_params_f1()
1308 tmp1 = 2 * 1000 / (1000000 / pdram_timing->mhz); in gen_rk3399_pi_params_f1()
1309 if ((2 * 1000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_pi_params_f1()
1316 tmp = 10000 / (1000000 / pdram_timing->mhz); in gen_rk3399_pi_params_f1()
1317 if ((10000 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_pi_params_f1()
1319 if (pdram_timing->mhz <= 100) in gen_rk3399_pi_params_f1()
1412 static void gen_rk3399_phy_dll_bypass(uint32_t mhz, uint32_t ch, in gen_rk3399_phy_dll_bypass() argument
1426 total_delay += (55 * 10000)/mhz; in gen_rk3399_phy_dll_bypass()
1427 rddqs_latency = total_delay * mhz / 1000000; in gen_rk3399_phy_dll_bypass()
1428 total_delay -= rddqs_latency * 1000000 / mhz; in gen_rk3399_phy_dll_bypass()
1429 rddqs_gate_delay = total_delay * 0x200 * mhz / 1000000; in gen_rk3399_phy_dll_bypass()
1430 if (mhz <= PHY_DLL_BYPASS_FREQ) { in gen_rk3399_phy_dll_bypass()
1528 tmp = 2500 / (1000000 / pdram_timing->mhz) + 3; in gen_rk3399_phy_params()
1529 if ((2500 % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_phy_params()
1554 if (pdram_timing->mhz <= 400) in gen_rk3399_phy_params()
1556 else if (pdram_timing->mhz <= 800) in gen_rk3399_phy_params()
1558 else if (pdram_timing->mhz <= 1000) in gen_rk3399_phy_params()
1564 div = pdram_timing->mhz / (2 * 20); in gen_rk3399_phy_params()
1586 (1000000 / pdram_timing->mhz); in gen_rk3399_phy_params()
1606 tmp = rddqs_delay_ps / (1000000 / pdram_timing->mhz) + 2; in gen_rk3399_phy_params()
1613 rddata_en_ie_dly = ie_enable / (1000000 / pdram_timing->mhz); in gen_rk3399_phy_params()
1614 if ((ie_enable % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_phy_params()
1617 tsel_adder = tsel_enable / (1000000 / pdram_timing->mhz); in gen_rk3399_phy_params()
1618 if ((tsel_enable % (1000000 / pdram_timing->mhz)) != 0) in gen_rk3399_phy_params()
1669 if (pdram_timing->mhz <= ENPER_CS_TRAINING_FREQ) { in gen_rk3399_phy_params()
1688 gen_rk3399_phy_dll_bypass(pdram_timing->mhz, i, fn, in gen_rk3399_phy_params()
1693 static int to_get_clk_index(unsigned int mhz) in to_get_clk_index() argument
1701 if (mhz >= dpll_rates_table[i].mhz) in to_get_clk_index()
1859 boot_freq = dpll_rates_table[to_get_clk_index(boot_freq)].mhz; in dram_dfs_init()
1973 mmio_write_32(M0_PARAM_ADDR + PARAM_DRAM_FREQ, pll_div.mhz); in m0_configure_ddr()
1980 static uint32_t prepare_ddr_timing(uint32_t mhz) in prepare_ddr_timing() argument
1985 rk3399_dram_status.timing_config.freq = mhz; in prepare_ddr_timing()
1987 if (mhz < 300) in prepare_ddr_timing()
2009 rk3399_dram_status.index_freq[index] = mhz; in prepare_ddr_timing()
2017 uint32_t mhz = hz / (1000 * 1000); in ddr_set_rate() local
2019 if (mhz == in ddr_set_rate()
2021 return mhz; in ddr_set_rate()
2023 index = to_get_clk_index(mhz); in ddr_set_rate()
2024 mhz = dpll_rates_table[index].mhz; in ddr_set_rate()
2026 ddr_index = prepare_ddr_timing(mhz); in ddr_set_rate()
2028 mhz); in ddr_set_rate()
2049 return mhz; in ddr_set_rate()
2055 uint32_t mhz = hz / (1000 * 1000); in ddr_round_rate() local
2057 index = to_get_clk_index(mhz); in ddr_round_rate()
2059 return dpll_rates_table[index].mhz * 1000 * 1000; in ddr_round_rate()
2064 uint32_t mhz = in ddr_prepare_for_sys_suspend() local
2071 rk3399_suspend_status.freq = mhz; in ddr_prepare_for_sys_suspend()
2078 if (mhz != rk3399_dram_status.boot_freq) in ddr_prepare_for_sys_suspend()