Home
last modified time | relevance | path

Searched refs:refclk (Results 1 – 25 of 264) sorted by relevance

1234567891011

/linux-6.12.1/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
Dpllgt215.c42 lM = (info->refclk + info->vco1.max_inputfreq) / info->vco1.max_inputfreq; in gt215_pll_calc()
44 hM = (info->refclk + info->vco1.min_inputfreq) / info->vco1.min_inputfreq; in gt215_pll_calc()
50 N = tmp / info->refclk; in gt215_pll_calc()
51 fN = tmp % info->refclk; in gt215_pll_calc()
54 if (fN >= info->refclk / 2) in gt215_pll_calc()
57 if (fN < info->refclk / 2) in gt215_pll_calc()
59 fN = tmp - (N * info->refclk); in gt215_pll_calc()
67 err = abs(freq - (info->refclk * N / M / *P)); in gt215_pll_calc()
75 *pfN = ((fN << 13) + info->refclk / 2) / info->refclk; in gt215_pll_calc()
86 return info->refclk * *pN / *pM / *P; in gt215_pll_calc()
/linux-6.12.1/drivers/gpu/drm/i915/display/
Dintel_cdclk.c1270 u16 refclk; member
1276 { .refclk = 19200, .cdclk = 144000, .ratio = 60 },
1277 { .refclk = 19200, .cdclk = 288000, .ratio = 60 },
1278 { .refclk = 19200, .cdclk = 384000, .ratio = 60 },
1279 { .refclk = 19200, .cdclk = 576000, .ratio = 60 },
1280 { .refclk = 19200, .cdclk = 624000, .ratio = 65 },
1285 { .refclk = 19200, .cdclk = 79200, .ratio = 33 },
1286 { .refclk = 19200, .cdclk = 158400, .ratio = 33 },
1287 { .refclk = 19200, .cdclk = 316800, .ratio = 33 },
1292 { .refclk = 19200, .cdclk = 172800, .ratio = 18 },
[all …]
Dintel_dpll.c316 static int pnv_calc_dpll_params(int refclk, struct dpll *clock) in pnv_calc_dpll_params() argument
322 DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); in pnv_calc_dpll_params()
334 int i9xx_calc_dpll_params(int refclk, struct dpll *clock) in i9xx_calc_dpll_params() argument
340 DIV_ROUND_CLOSEST(refclk * clock->m, clock->n + 2); in i9xx_calc_dpll_params()
347 static int vlv_calc_dpll_params(int refclk, struct dpll *clock) in vlv_calc_dpll_params() argument
353 DIV_ROUND_CLOSEST(refclk * clock->m, clock->n); in vlv_calc_dpll_params()
360 int chv_calc_dpll_params(int refclk, struct dpll *clock) in chv_calc_dpll_params() argument
366 DIV_ROUND_CLOSEST_ULL(mul_u32_u32(refclk, clock->m), clock->n << 22); in chv_calc_dpll_params()
430 int refclk = i9xx_pll_refclk(crtc_state); in i9xx_crtc_clock_get() local
471 port_clock = pnv_calc_dpll_params(refclk, &clock); in i9xx_crtc_clock_get()
[all …]
/linux-6.12.1/drivers/phy/ti/
Dphy-dm816x-usb.c46 struct clk *refclk; member
76 if (clk_get_rate(phy->refclk) != 24000000) in dm816x_usb_phy_init()
123 clk_disable(phy->refclk); in dm816x_usb_phy_runtime_suspend()
134 error = clk_enable(phy->refclk); in dm816x_usb_phy_runtime_resume()
151 clk_disable(phy->refclk); in dm816x_usb_phy_runtime_resume()
218 phy->refclk = devm_clk_get(phy->dev, "refclk"); in dm816x_usb_phy_probe()
219 if (IS_ERR(phy->refclk)) in dm816x_usb_phy_probe()
220 return PTR_ERR(phy->refclk); in dm816x_usb_phy_probe()
221 error = clk_prepare(phy->refclk); in dm816x_usb_phy_probe()
247 clk_unprepare(phy->refclk); in dm816x_usb_phy_probe()
[all …]
Dphy-ti-pipe3.c172 struct clk *refclk; member
608 phy->refclk = devm_clk_get(dev, "refclk"); in ti_pipe3_get_clk()
609 if (IS_ERR(phy->refclk)) { in ti_pipe3_get_clk()
615 return PTR_ERR(phy->refclk); in ti_pipe3_get_clk()
820 if (!IS_ERR(phy->refclk)) { in ti_pipe3_probe()
821 clk_prepare_enable(phy->refclk); in ti_pipe3_probe()
843 clk_disable_unprepare(phy->refclk); in ti_pipe3_remove()
853 if (!IS_ERR(phy->refclk)) { in ti_pipe3_enable_clocks()
854 ret = clk_prepare_enable(phy->refclk); in ti_pipe3_enable_clocks()
884 if (!IS_ERR(phy->refclk)) in ti_pipe3_enable_clocks()
[all …]
/linux-6.12.1/drivers/phy/xilinx/
Dphy-zynqmp.c215 unsigned int refclk; member
407 ssc = gtr_phy->dev->refclk_sscs[gtr_phy->refclk]; in xpsgtr_configure_pll()
414 if (gtr_phy->refclk == gtr_phy->lane) in xpsgtr_configure_pll()
419 L0_REF_CLK_SEL_MASK, 1 << gtr_phy->refclk); in xpsgtr_configure_pll()
639 if (clk_prepare_enable(gtr_dev->clk[gtr_phy->refclk])) in xpsgtr_phy_init()
691 clk_disable_unprepare(gtr_dev->clk[gtr_phy->refclk]); in xpsgtr_phy_exit()
795 unsigned int refclk; in xpsgtr_xlate() local
825 refclk = args->args[3]; in xpsgtr_xlate()
826 if (refclk >= ARRAY_SIZE(gtr_dev->refclk_sscs) || in xpsgtr_xlate()
827 !gtr_dev->refclk_sscs[refclk]) { in xpsgtr_xlate()
[all …]
/linux-6.12.1/drivers/net/ethernet/arc/
Demac_rockchip.c32 struct clk *refclk; member
147 priv->refclk = devm_clk_get(dev, "macref"); in emac_rockchip_probe()
148 if (IS_ERR(priv->refclk)) { in emac_rockchip_probe()
150 PTR_ERR(priv->refclk)); in emac_rockchip_probe()
151 err = PTR_ERR(priv->refclk); in emac_rockchip_probe()
155 err = clk_prepare_enable(priv->refclk); in emac_rockchip_probe()
195 err = clk_set_rate(priv->refclk, 50000000); in emac_rockchip_probe()
241 clk_disable_unprepare(priv->refclk); in emac_rockchip_probe()
254 clk_disable_unprepare(priv->refclk); in emac_rockchip_remove()
/linux-6.12.1/drivers/gpu/drm/gma500/
Dgma_display.h44 int target, int refclk,
49 void (*clock)(int refclk, struct gma_clock_t *clock);
50 const struct gma_limit_t *(*limit)(struct drm_crtc *crtc, int refclk);
83 extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk);
88 struct drm_crtc *crtc, int target, int refclk,
Dcdv_intel_display.c25 int refclk, struct gma_clock_t *best_clock);
365 int refclk) in cdv_intel_limit() argument
373 if (refclk == 96000) in cdv_intel_limit()
379 if (refclk == 27000) in cdv_intel_limit()
384 if (refclk == 27000) in cdv_intel_limit()
393 static void cdv_intel_clock(int refclk, struct gma_clock_t *clock) in cdv_intel_clock() argument
397 clock->vco = (refclk * clock->m) / clock->n; in cdv_intel_clock()
403 int refclk, in cdv_intel_find_dp_pll() argument
411 switch (refclk) { in cdv_intel_find_dp_pll()
448 gma_crtc->clock_funcs->clock(refclk, &clock); in cdv_intel_find_dp_pll()
[all …]
Doaktrail_crtc.c41 int refclk, struct gma_clock_t *best_clock);
45 int refclk, struct gma_clock_t *best_clock);
84 int refclk) in mrst_limit() argument
114 static void mrst_lvds_clock(int refclk, struct gma_clock_t *clock) in mrst_lvds_clock() argument
116 clock->dot = (refclk * clock->m) / (14 * clock->p1); in mrst_lvds_clock()
128 int refclk, struct gma_clock_t *best_clock) in mrst_sdvo_find_best_pll() argument
153 actual_freq = (refclk * clock.m) / in mrst_sdvo_find_best_pll()
186 int refclk, struct gma_clock_t *best_clock) in mrst_lvds_find_best_pll() argument
199 mrst_lvds_clock(refclk, &clock); in mrst_lvds_find_best_pll()
370 int refclk = 0; in oaktrail_crtc_mode_set() local
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/usb/
Docteon-usb.txt24 - cavium,refclk-type: type of the USB reference clock. Allowed values are
27 - refclk-frequency: deprecated, use "clock-frequency".
29 - refclk-type: deprecated, use "cavium,refclk-type".
54 cavium,refclk-type = "crystal";
Ddwc3-cavium.txt18 refclk-frequency = <0x05f5e100>;
19 refclk-type-ss = "dlmc_ref_clk0";
20 refclk-type-hs = "dlmc_ref_clk0";
/linux-6.12.1/Documentation/devicetree/bindings/mips/cavium/
Ductl.txt16 - refclk-frequency: A single cell containing the reference clock
19 - refclk-type: A string describing the reference clock connection
30 refclk-frequency = <24000000>;
32 refclk-type = "crystal";
/linux-6.12.1/sound/soc/meson/
Daxg-spdifin.c55 struct clk *refclk; member
165 ret = clk_set_rate(priv->refclk, priv->conf->ref_rate); in axg_spdifin_sample_mode_config()
175 rate = clk_get_rate(priv->refclk); in axg_spdifin_sample_mode_config()
229 ret = clk_prepare_enable(priv->refclk); in axg_spdifin_dai_probe()
251 clk_disable_unprepare(priv->refclk); in axg_spdifin_dai_remove()
470 priv->refclk = devm_clk_get(dev, "refclk"); in axg_spdifin_probe()
471 if (IS_ERR(priv->refclk)) in axg_spdifin_probe()
472 return dev_err_probe(dev, PTR_ERR(priv->refclk), "failed to get mclk\n"); in axg_spdifin_probe()
/linux-6.12.1/arch/arm/boot/dts/synaptics/
Dberlin2cd.dtsi51 refclk: oscillator { label
389 clocks = <&refclk>;
390 clock-names = "refclk";
446 clocks = <&refclk>;
453 clocks = <&refclk>;
461 clocks = <&refclk>;
486 clocks = <&refclk>;
497 clocks = <&refclk>;
507 clocks = <&refclk>;
532 clocks = <&refclk>;
[all …]
Dberlin2.dtsi66 refclk: oscillator { label
384 clocks = <&refclk>;
385 clock-names = "refclk";
421 clocks = <&refclk>;
428 clocks = <&refclk>;
435 clocks = <&refclk>;
478 clocks = <&refclk>;
490 clocks = <&refclk>;
502 clocks = <&refclk>;
/linux-6.12.1/drivers/spi/
Dspi-zynq-qspi.c136 struct clk *refclk; member
348 (clk_get_rate(xqspi->refclk) / (2 << baud_rate_val)) > in zynq_qspi_config_op()
386 clk_enable(qspi->refclk); in zynq_qspi_setup_op()
662 xqspi->refclk = devm_clk_get(&pdev->dev, "ref_clk"); in zynq_qspi_probe()
663 if (IS_ERR(xqspi->refclk)) { in zynq_qspi_probe()
665 ret = PTR_ERR(xqspi->refclk); in zynq_qspi_probe()
675 ret = clk_prepare_enable(xqspi->refclk); in zynq_qspi_probe()
710 ctlr->max_speed_hz = clk_get_rate(xqspi->refclk) / 2; in zynq_qspi_probe()
725 clk_disable_unprepare(xqspi->refclk); in zynq_qspi_probe()
750 clk_disable_unprepare(xqspi->refclk); in zynq_qspi_remove()
/linux-6.12.1/drivers/phy/
Dphy-pistachio-usb.c38 unsigned int refclk; member
68 p_phy->refclk << USB_PHY_STRAP_CONTROL_REFCLK_SHIFT); in pistachio_usb_phy_power_on()
71 if (p_phy->refclk == REFCLK_XO_CRYSTAL && rate != 12000000) { in pistachio_usb_phy_power_on()
161 &p_phy->refclk); in pistachio_usb_phy_probe()
/linux-6.12.1/Documentation/devicetree/bindings/clock/
Dmarvell,berlin.txt18 "refclk" for the SoCs oscillator input on all SoCs,
29 clocks = <&refclk>;
30 clock-names = "refclk";
/linux-6.12.1/drivers/net/ethernet/ti/
Dcpts.c559 err = clk_enable(cpts->refclk); in cpts_register()
580 clk_disable(cpts->refclk); in cpts_register()
600 clk_disable(cpts->refclk); in cpts_unregister()
609 freq = clk_get_rate(cpts->refclk); in cpts_calc_mult_shift()
767 cpts->refclk = devm_get_clk_from_child(dev, node, "cpts"); in cpts_create()
768 if (IS_ERR(cpts->refclk)) in cpts_create()
770 cpts->refclk = devm_clk_get(dev, "cpts"); in cpts_create()
772 if (IS_ERR(cpts->refclk)) { in cpts_create()
774 PTR_ERR(cpts->refclk)); in cpts_create()
775 return ERR_CAST(cpts->refclk); in cpts_create()
[all …]
/linux-6.12.1/arch/arm/boot/dts/ti/keystone/
Dkeystone-k2hk-evm.dts59 clock-output-names = "refclk-sys";
66 clock-output-names = "refclk-pass";
73 clock-output-names = "refclk-arm";
80 clock-output-names = "refclk-ddr3a";
87 clock-output-names = "refclk-ddr3b";
/linux-6.12.1/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Dpll.c327 info->refclk = nvbios_rd32(bios, data + 31); in nvbios_pll_parse()
350 info->refclk = nvbios_rd32(bios, data + 28); in nvbios_pll_parse()
353 info->refclk = nvbios_rd16(bios, data + 9) * 1000; in nvbios_pll_parse()
368 info->refclk = nvbios_rd16(bios, data + 1) * 1000; in nvbios_pll_parse()
386 if (!info->refclk) { in nvbios_pll_parse()
387 info->refclk = device->crystal; in nvbios_pll_parse()
393 info->refclk = 200000; in nvbios_pll_parse()
395 info->refclk = 25000; in nvbios_pll_parse()
/linux-6.12.1/drivers/gpu/drm/bridge/
Dchipone-icn6211.c155 struct clk *refclk; member
279 if (icn->refclk) in chipone_configure_pll()
329 min_delta, icn->refclk ? "EXT" : "DSI", fin, in chipone_configure_pll()
338 icn->refclk ? PLL_CTRL_6_EXTERNAL : PLL_CTRL_6_MIPI_CLK); in chipone_configure_pll()
474 ret = clk_prepare_enable(icn->refclk); in chipone_atomic_pre_enable()
489 clk_disable_unprepare(icn->refclk); in chipone_atomic_post_disable()
634 icn->refclk = devm_clk_get_optional(dev, "refclk"); in chipone_parse_dt()
635 if (IS_ERR(icn->refclk)) { in chipone_parse_dt()
636 ret = PTR_ERR(icn->refclk); in chipone_parse_dt()
639 } else if (icn->refclk) { in chipone_parse_dt()
[all …]
/linux-6.12.1/drivers/media/i2c/
Dtc358746.c150 struct clk *refclk; member
811 unsigned long refclk, in tc358746_find_pll_settings() argument
842 fin = DIV_ROUND_CLOSEST(refclk, p); in tc358746_find_pll_settings()
1307 tc358746_init_output_port(struct tc358746 *tc358746, unsigned long refclk) in tc358746_init_output_port() argument
1343 tc358746->pll_rate = tc358746_find_pll_settings(tc358746, refclk, in tc358746_init_output_port()
1504 unsigned long refclk; in tc358746_probe() local
1517 tc358746->refclk = devm_clk_get(dev, "refclk"); in tc358746_probe()
1518 if (IS_ERR(tc358746->refclk)) in tc358746_probe()
1519 return dev_err_probe(dev, PTR_ERR(tc358746->refclk), in tc358746_probe()
1522 err = clk_prepare_enable(tc358746->refclk); in tc358746_probe()
[all …]
/linux-6.12.1/drivers/pci/controller/cadence/
Dpci-j721e.c56 struct clk *refclk; member
572 pcie->refclk = clk; in j721e_pcie_probe()
589 clk_disable_unprepare(pcie->refclk); in j721e_pcie_probe()
626 clk_disable_unprepare(pcie->refclk); in j721e_pcie_remove()
638 clk_disable_unprepare(pcie->refclk); in j721e_pcie_suspend_noirq()
669 ret = clk_prepare_enable(pcie->refclk); in j721e_pcie_resume_noirq()
688 clk_disable_unprepare(pcie->refclk); in j721e_pcie_resume_noirq()
701 clk_disable_unprepare(pcie->refclk); in j721e_pcie_resume_noirq()

1234567891011