/linux/drivers/phy/amlogic/ |
H A 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 …]
|
/linux/drivers/clk/mvebu/ |
H A 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 …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
H A 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 …]
|
/linux/drivers/clk/keystone/ |
H A 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 …]
|
/linux/drivers/clk/ux500/ |
H A 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 …]
|
/linux/drivers/clk/tegra/ |
H A 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 …]
|
/linux/drivers/iio/adc/ |
H A 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 …]
|
/linux/drivers/clk/versatile/ |
H A 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 …]
|
/linux/drivers/clk/bcm/ |
H A 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 …]
|
/linux/drivers/clk/xilinx/ |
H A 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 …]
|
/linux/drivers/clk/sunxi/ |
H A 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 …]
|
H A 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 …]
|
/linux/arch/powerpc/platforms/512x/ |
H A D | clock-commonclk.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/clk.h> 12 #include <linux/clk-provider.h> 21 #include <dt-bindings/clock/mpc512x-clock.h> 33 #define NR_PSCS 12 70 static struct clk *clks[MPC512x_CLK_LAST_PRIVATE]; 89 * interpretation, no CFM, different fourth PSC/CAN mux0 input -- yet 176 return 12; in soc_max_pscnum() 215 /* common clk API wrappers {{{ */ 217 /* convenience wrappers around the common clk API */ [all …]
|
/linux/drivers/gpu/drm/vc4/ |
H A D | vc4_dsi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * single-lane DSI controller, while DSI1 is a more modern 4-lane DSI 16 * This driver has been tested for DSI1 video-mode display only 21 #include <linux/clk-provider.h> 22 #include <linux/clk.h> 25 #include <linux/dma-mapping.h> 88 # define DSI_TXPKT1C_CMD_MODE_LP BIT(3) 89 # define DSI_TXPKT1C_CMD_TYPE_LONG BIT(2) 90 # define DSI_TXPKT1C_CMD_TE_EN BIT(1) 91 # define DSI_TXPKT1C_CMD_EN BIT(0) [all …]
|
/linux/drivers/clk/nxp/ |
H A 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 …]
|
/linux/Documentation/devicetree/bindings/iio/frequency/ |
H A D | adi,adf4350.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Michael Hennerich <michael.hennerich@analog.com> 15 - adi,adf4350 16 - adi,adf4351 21 spi-max-frequency: 28 clock-names: 31 '#clock-cells': 34 clock-output-names: [all …]
|
/linux/sound/soc/stm/ |
H A D | stm32_i2s.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved 10 #include <linux/clk.h> 11 #include <linux/clk-provider.h> 38 /* Bit definition for SPI2S_CR1 register */ 39 #define I2S_CR1_SPE BIT(0) 40 #define I2S_CR1_CSTART BIT(9) 41 #define I2S_CR1_CSUSP BIT(10) 42 #define I2S_CR1_HDDIR BIT(11) 43 #define I2S_CR1_SSI BIT(12) [all …]
|
/linux/drivers/clk/ |
H A D | clk-axi-clkgen.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright 2012-2013 Analog Devices Inc. 6 * Author: Lars-Peter Clausen <lars@metafoo.de> 10 #include <linux/clk.h> 11 #include <linux/clk-provider.h> 23 #define AXI_CLKGEN_V2_RESET_MMCM_ENABLE BIT(1) 24 #define AXI_CLKGEN_V2_RESET_ENABLE BIT(0) 26 #define AXI_CLKGEN_V2_DRP_CNTRL_SEL BIT(29) 27 #define AXI_CLKGEN_V2_DRP_CNTRL_READ BIT(28) 29 #define AXI_CLKGEN_V2_DRP_STATUS_BUSY BIT(16) [all …]
|
H A D | clk-ast2600.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 #define pr_fmt(fmt) "clk-ast2600: " fmt 14 #include <dt-bindings/clock/ast2600-clock.h> 16 #include "clk-aspeed.h" 20 * explicitly-configured clocks (ASPEED_CLK_HPLL and up). 34 #define UART_DIV13_EN BIT(12) 41 #define I3C_CLK_SELECTION BIT(31) 94 * handled by using -1 as the index for the reset, and the consumer must 103 /* clk rst name parent flags */ 104 [ASPEED_CLK_GATE_MCLK] = { 0, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */ [all …]
|
H A D | clk-aspeed.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 #define pr_fmt(fmt) "clk-aspeed: " fmt 13 #include <dt-bindings/clock/aspeed-clock.h> 15 #include "clk-aspeed.h" 26 #define AST2500_HPLL_BYPASS_EN BIT(20) 27 #define AST2400_HPLL_PROGRAMMED BIT(18) 28 #define AST2400_HPLL_BYPASS_EN BIT(17) 30 #define UART_DIV13_EN BIT(12) 33 #define CLKIN_25MHZ_EN BIT(23) 34 #define AST2400_CLK_SOURCE_SEL BIT(18) [all …]
|
/linux/drivers/clk/sophgo/ |
H A D | clk-sg2042-clkgen.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/clk.h> 12 #include <linux/clk-provider.h> 17 #include <dt-bindings/clock/sophgo,sg2042-clkgen.h> 19 #include "clk-sg2042.h" 23 #define R_PLL_STAT (0xC0 - R_PLL_BEGIN) 24 #define R_PLL_CLKEN_CONTROL (0xC4 - R_PLL_BEGIN) 25 #define R_MPLL_CONTROL (0xE8 - R_PLL_BEGIN) 26 #define R_FPLL_CONTROL (0xF4 - R_PLL_BEGIN) 27 #define R_DPLL0_CONTROL (0xF8 - R_PLL_BEGIN) [all …]
|
/linux/drivers/spi/ |
H A D | spi-meson-spicc.c | 7 * SPDX-License-Identifier: GPL-2.0+ 11 #include <linux/clk.h> 12 #include <linux/clk-provider.h> 30 * - all transfers are cutted in 16 words burst because the FIFO hangs on 31 * TX underflow, and there is no TX "Half-Empty" interrupt, so we go by 33 * - CS management is dumb, and goes UP between every burst, so is really a 46 #define SPICC_ENABLE BIT(0) 47 #define SPICC_MODE_MASTER BIT(1) 48 #define SPICC_XCH BIT(2) 49 #define SPICC_SMC BIT(3) [all …]
|
/linux/include/linux/ |
H A D | clk-provider.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2010-2011 Jeremy Kerr <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org> 13 * flags used across common struct clk. these flags should only affect the 14 * top-level framework. custom flags for dealing with hardware specifics 17 * Please update clk_flags[] in drivers/clk/clk.c when making changes here! 19 #define CLK_SET_RATE_GATE BIT(0) /* must be gated across rate change */ 20 #define CLK_SET_PARENT_GATE BIT(1) /* must be gated across re-parent */ 21 #define CLK_SET_RATE_PARENT BIT(2) /* propagate rate change up one level */ 22 #define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ [all …]
|
H A D | pxa2xx_ssp.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * This driver supports the following PXA CPU/SSP ports:- 24 struct clk; 45 #define SSACD (0x3C) /* SSP Audio Clock Divider */ 46 #define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ 50 #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */ 55 #define SSCR0_ECS BIT(6) /* External clock select */ 56 #define SSCR0_SSE BIT(7) /* Synchronous Serial Port Enable */ 60 #define SSCR0_EDSS BIT(20) /* Extended data size select */ 61 #define SSCR0_NCS BIT(21) /* Network clock select */ [all …]
|
/linux/drivers/watchdog/ |
H A D | renesas_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2015-17 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com> 6 * Copyright (C) 2015-17 Renesas Electronics Corporation 9 #include <linux/clk.h> 24 #define RWTCSRA_WOVF BIT(4) 25 #define RWTCSRA_WRFLG BIT(5) 26 #define RWTCSRA_TME BIT(7) 32 * In probe, clk_rate is checked to be not more than 16 bit * biggest clock 33 * divider (12 bits). d is only a factor to fully utilize the WDT counter and 37 DIV_ROUND_UP((d) * (p)->clk_rate, clk_divs[(p)->cks]) [all …]
|