| /kernel/linux/linux-6.6/drivers/phy/amlogic/ |
| D | phy-meson-axg-mipi-dphy.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/clk.h> 32 * [12] mipi HSbyteclk enable. 33 * [11] mipi divider clk selection. 34 * 1: select the mipi DDRCLKHS from clock divider. 36 * [10] mipi clock divider control. 38 * [9] mipi divider output enable. 39 * [8] mipi divider counter enable. 42 * 1 = transfer the high bit first. 0 : transfer the low bit first. 52 /* [31] clk lane tx_hs_en control selection. [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/mvebu/ |
| D | ap-cpu-clk.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #define pr_fmt(fmt) "ap-cpu-clk: " fmt 13 #include <linux/clk-provider.h> 14 #include <linux/clk.h> 28 #define APN806_CLUSTER_NUM_MASK BIT(APN806_CLUSTER_NUM_OFFSET) 99 #define AP807_PLL_CR_1_CPU_CLK_DIV_RATIO_OFFSET 12 146 struct ap_cpu_clk *clk = to_ap_cpu_clk(hw); in ap_cpu_clk_recalc_rate() local 150 cpu_clkdiv_reg = clk->pll_regs->divider_reg + in ap_cpu_clk_recalc_rate() 151 (clk->cluster * clk->pll_regs->cluster_offset); in ap_cpu_clk_recalc_rate() 152 regmap_read(clk->pll_cr_base, cpu_clkdiv_reg, &cpu_clkdiv_ratio); in ap_cpu_clk_recalc_rate() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/mvebu/ |
| D | ap-cpu-clk.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #define pr_fmt(fmt) "ap-cpu-clk: " fmt 13 #include <linux/clk-provider.h> 14 #include <linux/clk.h> 29 #define APN806_CLUSTER_NUM_MASK BIT(APN806_CLUSTER_NUM_OFFSET) 100 #define AP807_PLL_CR_1_CPU_CLK_DIV_RATIO_OFFSET 12 147 struct ap_cpu_clk *clk = to_ap_cpu_clk(hw); in ap_cpu_clk_recalc_rate() local 151 cpu_clkdiv_reg = clk->pll_regs->divider_reg + in ap_cpu_clk_recalc_rate() 152 (clk->cluster * clk->pll_regs->cluster_offset); in ap_cpu_clk_recalc_rate() 153 regmap_read(clk->pll_cr_base, cpu_clkdiv_reg, &cpu_clkdiv_ratio); in ap_cpu_clk_recalc_rate() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/keystone/ |
| D | pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Murali Karicheri <m-karicheri2@ti.com> 9 #include <linux/clk-provider.h> 26 * struct clk_pll_data - pll data structure 28 * register of pll controller, else it is in the pll_ctrl0((bit 11-6) 36 * @pllod: PLL register map address for post divider bits 41 * @plld_mask: divider mask 42 * @clkod_mask: output divider mask 43 * @clkod_shift: output divider shift 44 * @plld_mask: divider mask [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/keystone/ |
| D | pll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Murali Karicheri <m-karicheri2@ti.com> 9 #include <linux/clk-provider.h> 26 * struct clk_pll_data - pll data structure 28 * register of pll controller, else it is in the pll_ctrl0((bit 11-6) 36 * @pllod: PLL register map address for post divider bits 41 * @plld_mask: divider mask 42 * @clkod_mask: output divider mask 43 * @clkod_shift: output divider shift 44 * @plld_mask: divider mask [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
| D | gk20a.c | 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. 32 /* PL: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 */ 33 /* p: */ 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 12, 16, 20, 24, 32, 48 for (pl = 0; pl < ARRAY_SIZE(_pl_to_div) - 1; pl++) { in div_to_pl() 53 return ARRAY_SIZE(_pl_to_div) - 1; in div_to_pl() 65 gk20a_pllg_read_mnp(struct gk20a_clk *clk, struct gk20a_pll *pll) in gk20a_pllg_read_mnp() argument 67 struct nvkm_device *device = clk->base.subdev.device; in gk20a_pllg_read_mnp() 71 pll->m = (val >> GPCPLL_COEFF_M_SHIFT) & MASK(GPCPLL_COEFF_M_WIDTH); in gk20a_pllg_read_mnp() 72 pll->n = (val >> GPCPLL_COEFF_N_SHIFT) & MASK(GPCPLL_COEFF_N_WIDTH); in gk20a_pllg_read_mnp() 73 pll->pl = (val >> GPCPLL_COEFF_P_SHIFT) & MASK(GPCPLL_COEFF_P_WIDTH); in gk20a_pllg_read_mnp() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
| D | gk20a.c | 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. 32 /* PL: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 */ 33 /* p: */ 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 12, 16, 20, 24, 32, 48 for (pl = 0; pl < ARRAY_SIZE(_pl_to_div) - 1; pl++) { in div_to_pl() 53 return ARRAY_SIZE(_pl_to_div) - 1; in div_to_pl() 65 gk20a_pllg_read_mnp(struct gk20a_clk *clk, struct gk20a_pll *pll) in gk20a_pllg_read_mnp() argument 67 struct nvkm_device *device = clk->base.subdev.device; in gk20a_pllg_read_mnp() 71 pll->m = (val >> GPCPLL_COEFF_M_SHIFT) & MASK(GPCPLL_COEFF_M_WIDTH); in gk20a_pllg_read_mnp() 72 pll->n = (val >> GPCPLL_COEFF_N_SHIFT) & MASK(GPCPLL_COEFF_N_WIDTH); in gk20a_pllg_read_mnp() 73 pll->pl = (val >> GPCPLL_COEFF_P_SHIFT) & MASK(GPCPLL_COEFF_P_WIDTH); in gk20a_pllg_read_mnp() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/ux500/ |
| D | u8500_of_clk.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2012 ST-Ericsson SA 11 #include <linux/clk-provider.h> 12 #include <linux/mfd/dbx500-prcmu.h> 14 #include "clk.h" 16 #include "reset-prcc.h" 18 static struct clk *prcc_pclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER]; 19 static struct clk *prcc_kclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER]; 22 #define PRCC_SHOW(clk, base, bit) \ argument 23 clk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit] [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/tegra/ |
| D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 #include <linux/clk-provider.h> 20 #define CLK_ENB_PLLP_OUT_CPU BIT(31) 73 * struct tegra_clk_sync_source - external clock source from codec 75 * @hw: handle between common and hardware-specific interfaces 91 struct clk *tegra_clk_register_sync_source(const char *name, 95 * struct tegra_clk_frac_div - fractional divider clock 97 * @hw: handle between common and hardware-specific interfaces 98 * @reg: register containing divider 99 * @flags: hardware-specific flags [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/tegra/ |
| D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 #include <linux/clk-provider.h> 20 #define CLK_ENB_PLLP_OUT_CPU BIT(31) 73 * struct tegra_clk_sync_source - external clock source from codec 75 * @hw: handle between common and hardware-specific interfaces 91 struct clk *tegra_clk_register_sync_source(const char *name, 95 * struct tegra_clk_frac_div - fractional divider clock 97 * @hw: handle between common and hardware-specific interfaces 98 * @reg: register containing divider 99 * @flags: hardware-specific flags [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/frequency/ |
| D | adf4350.txt | 4 - compatible: Should be one of 7 - reg: SPI chip select numbert for the device 8 - spi-max-frequency: Max SPI frequency to use (< 20000000) 9 - clocks: From common clock binding. Clock is phandle to clock for 13 - gpios: GPIO Lock detect - If set with a valid phandle and GPIO number, 15 - adi,channel-spacing: Channel spacing in Hz (influences MODULUS). 16 - adi,power-up-frequency: If set in Hz the PLL tunes to 18 - adi,reference-div-factor: If set the driver skips dynamic calculation 20 - adi,reference-doubler-enable: Enables reference doubler. 21 - adi,reference-div2-enable: Enables reference divider. [all …]
|
| /kernel/linux/linux-6.6/drivers/iio/adc/ |
| D | ingenic-adc.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2019 Artur Rojek <contact@artur-rojek.eu> 6 * based on drivers/mfd/jz4740-adc.c 9 #include <dt-bindings/iio/adc/ingenic,adc.h> 10 #include <linux/clk.h> 36 #define JZ_ADC_REG_ENABLE_PD BIT(7) 37 #define JZ_ADC_REG_CFG_AUX_MD (BIT(0) | BIT(1)) 38 #define JZ_ADC_REG_CFG_BAT_MD BIT(4) 41 #define JZ_ADC_REG_CFG_CMD_SEL BIT(22) 42 #define JZ_ADC_REG_CFG_VBAT_SEL BIT(30) [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/adc/ |
| D | ingenic-adc.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2019 Artur Rojek <contact@artur-rojek.eu> 6 * based on drivers/mfd/jz4740-adc.c 9 #include <dt-bindings/iio/adc/ingenic,adc.h> 10 #include <linux/clk.h> 34 #define JZ_ADC_REG_ENABLE_PD BIT(7) 35 #define JZ_ADC_REG_CFG_AUX_MD (BIT(0) | BIT(1)) 36 #define JZ_ADC_REG_CFG_BAT_MD BIT(4) 39 #define JZ_ADC_REG_CFG_CMD_SEL BIT(22) 40 #define JZ_ADC_REG_CFG_TOUCH_OPS_MASK (BIT(31) | GENMASK(23, 10)) [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/versatile/ |
| D | clk-icst.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * Copyright (C) 2012-2015 Linus Walleij 17 #include <linux/clk-provider.h> 23 #include "clk-icst.h" 34 #define INTEGRATOR_AP_PCI_25_33_MHZ BIT(8) 37 * struct clk_icst - ICST VCO clock wrapper 58 * vco_get() - get ICST VCO settings from a certain ICST 67 ret = regmap_read(icst->map, icst->vcoreg_off, &val); in vco_get() 73 * bits of the v PLL divider. Bit 8 is tied low and always zero, in vco_get() 74 * r is hardwired to 22 and output divider s is hardwired to 1 in vco_get() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/versatile/ |
| D | clk-icst.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * Copyright (C) 2012-2015 Linus Walleij 17 #include <linux/clk-provider.h> 23 #include "clk-icst.h" 34 #define INTEGRATOR_AP_PCI_25_33_MHZ BIT(8) 37 * struct clk_icst - ICST VCO clock wrapper 59 * vco_get() - get ICST VCO settings from a certain ICST 68 ret = regmap_read(icst->map, icst->vcoreg_off, &val); in vco_get() 74 * bits of the v PLL divider. Bit 8 is tied low and always zero, in vco_get() 75 * r is hardwired to 22 and output divider s is hardwired to 1 in vco_get() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/xilinx/ |
| D | clk-xlnx-clock-wizard.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2013 - 2021 Xilinx 13 #include <linux/clk.h> 14 #include <linux/clk-provider.h> 28 #define WZRD_CLKOUT0_FRAC_EN BIT(18) 29 #define WZRD_CLKFBOUT_FRAC_EN BIT(26) 56 /* Divider limits, from UG572 Table 3-4 for Ultrascale+ */ 72 #define div_mask(width) ((1 << (width)) - 1) 74 /* Extract divider instance from clock hardware instance */ 85 * struct clk_wzrd - Clock wizard private data structure [all …]
|
| D | xlnx_vcu.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2016 - 2017 Xilinx, Inc. 10 #include <linux/clk.h> 11 #include <linux/clk-provider.h> 16 #include <linux/mfd/syscon/xlnx-vcu.h> 22 #include <dt-bindings/clock/xlnx-vcu.h> 25 #define VCU_PLL_CTRL_RESET BIT(0) 26 #define VCU_PLL_CTRL_POR_IN BIT(1) 27 #define VCU_PLL_CTRL_PWR_POR BIT(2) 28 #define VCU_PLL_CTRL_BYPASS BIT(3) [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/sunxi/ |
| D | clk-sunxi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 14 #include <linux/reset-controller.h> 19 #include "clk-factors.h" 27 * sun4i_get_pll1_factors() - calculates n, k, m, p factors for PLL1 38 div = req->rate / 6000000; in sun4i_get_pll1_factors() 39 req->rate = 6000000 * div; in sun4i_get_pll1_factors() 42 req->m = 0; in sun4i_get_pll1_factors() 45 if (req->rate >= 768000000 || req->rate == 42000000 || in sun4i_get_pll1_factors() [all …]
|
| D | clk-sun9i-core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 2014 Chen-Yu Tsai 5 * Chen-Yu Tsai <wens@csie.org> 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 14 #include "clk-factors.h" 18 * sun9i_a80_get_pll4_factors() - calculates n, p, m factors for PLL4 33 n = DIV_ROUND_UP(req->rate, 6000000); in sun9i_a80_get_pll4_factors() 35 /* If n is too large switch to steps of 12 MHz */ in sun9i_a80_get_pll4_factors() 47 /* n must be between 12 and 255 */ in sun9i_a80_get_pll4_factors() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/sunxi/ |
| D | clk-sunxi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 14 #include <linux/reset-controller.h> 19 #include "clk-factors.h" 27 * sun4i_get_pll1_factors() - calculates n, k, m, p factors for PLL1 38 div = req->rate / 6000000; in sun4i_get_pll1_factors() 39 req->rate = 6000000 * div; in sun4i_get_pll1_factors() 42 req->m = 0; in sun4i_get_pll1_factors() 45 if (req->rate >= 768000000 || req->rate == 42000000 || in sun4i_get_pll1_factors() [all …]
|
| D | clk-sun9i-core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 2014 Chen-Yu Tsai 5 * Chen-Yu Tsai <wens@csie.org> 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 14 #include "clk-factors.h" 18 * sun9i_a80_get_pll4_factors() - calculates n, p, m factors for PLL4 33 n = DIV_ROUND_UP(req->rate, 6000000); in sun9i_a80_get_pll4_factors() 35 /* If n is too large switch to steps of 12 MHz */ in sun9i_a80_get_pll4_factors() 47 /* n must be between 12 and 255 */ in sun9i_a80_get_pll4_factors() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/bcm/ |
| D | clk-bcm2835.c | 1 // SPDX-License-Identifier: GPL-2.0+ 27 #include <linux/clk-provider.h> 29 #include <linux/clk.h> 38 #include <dt-bindings/clock/bcm2835.h> 44 # define CM_DIV_FRAC_BITS 12 45 # define CM_DIV_FRAC_MASK GENMASK(CM_DIV_FRAC_BITS - 1, 0) 93 # define CM_TCNT_SRC1_SHIFT 12 122 # define CM_ENABLE BIT(4) 123 # define CM_KILL BIT(5) 125 # define CM_GATE BIT(CM_GATE_BIT) [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/bcm/ |
| D | clk-bcm2835.c | 1 // SPDX-License-Identifier: GPL-2.0+ 27 #include <linux/clk-provider.h> 29 #include <linux/clk.h> 37 #include <dt-bindings/clock/bcm2835.h> 43 # define CM_DIV_FRAC_BITS 12 44 # define CM_DIV_FRAC_MASK GENMASK(CM_DIV_FRAC_BITS - 1, 0) 92 # define CM_TCNT_SRC1_SHIFT 12 121 # define CM_ENABLE BIT(4) 122 # define CM_KILL BIT(5) 124 # define CM_GATE BIT(CM_GATE_BIT) [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/nxp/ |
| D | clk-lpc32xx.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include <linux/clk.h> 7 #include <linux/clk-provider.h> 12 #include <dt-bindings/clock/lpc32xx-clock.h> 18 #define PLL_CTRL_ENABLE BIT(16) 19 #define PLL_CTRL_BYPASS BIT(15) 20 #define PLL_CTRL_DIRECT BIT(14) 21 #define PLL_CTRL_FEEDBACK BIT(13) 22 #define PLL_CTRL_POSTDIV (BIT(12)|BIT(11)) 23 #define PLL_CTRL_PREDIV (BIT(10)|BIT(9)) [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/nxp/ |
| D | clk-lpc32xx.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 #include <linux/clk.h> 7 #include <linux/clk-provider.h> 12 #include <dt-bindings/clock/lpc32xx-clock.h> 18 #define PLL_CTRL_ENABLE BIT(16) 19 #define PLL_CTRL_BYPASS BIT(15) 20 #define PLL_CTRL_DIRECT BIT(14) 21 #define PLL_CTRL_FEEDBACK BIT(13) 22 #define PLL_CTRL_POSTDIV (BIT(12)|BIT(11)) 23 #define PLL_CTRL_PREDIV (BIT(10)|BIT(9)) [all …]
|