| /linux/Documentation/devicetree/bindings/mux/ |
| H A D | reg-mux.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/mux/reg-mux.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Generic register bitfield-based multiplexer controller 10 - Peter Rosin <peda@axentia.se> 19 - reg-mux # parent device of mux controller is not syscon device 20 - mmio-mux # parent device of mux controller is syscon device 22 reg: true 24 '#mux-control-cells': [all …]
|
| H A D | mux-controller.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/mux/mux-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Peter Rosin <peda@axentia.se> 13 A multiplexer (or mux) controller will have one, or several, consumer devices 14 that uses the mux controller. Thus, a mux controller can possibly control 16 multiplexer needed by each consumer, but a single mux controller can of course 19 A mux controller provides a number of states to its consumers, and the state 20 space is a simple zero-based enumeration. I.e. 0-1 for a 2-way multiplexer, [all …]
|
| /linux/arch/arm/boot/dts/nuvoton/ |
| H A D | nuvoton-wpcm450.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 4 #include <dt-bindings/interrupt-controller/irq.h> 8 #address-cells = <1>; 9 #size-cells = <1>; 23 #address-cells = <1>; 24 #size-cells = <0>; 27 compatible = "arm,arm926ej-s"; 29 reg = <0>; 33 clk24m: clock-24mhz { 35 compatible = "fixed-clock"; [all …]
|
| /linux/drivers/clk/ |
| H A D | clk-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2011-2012 Mike Turquette, Linaro Ltd <mturquette@linaro.org> 10 #include <linux/clk-provider.h> 21 * prepare - clk_prepare only ensures that parents are prepared 22 * enable - clk_enable only ensures that parents are enabled 23 * rate - rate is only affected by parent switching. No clk_set_rate support 24 * parent - parent is adjustable through clk_set_parent 27 static inline u32 clk_mux_readl(struct clk_mux *mux) in clk_mux_readl() argument 29 if (mux->flags & CLK_MUX_BIG_ENDIAN) in clk_mux_readl() 30 return ioread32be(mux->reg); in clk_mux_readl() [all …]
|
| /linux/drivers/clk/sophgo/ |
| H A D | clk-cv18xx-ip.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/clk-provider.h> 11 #include "clk-cv18xx-ip.h" 25 return cv1800_clk_setbit(&gate->common, &gate->gate); in gate_enable() 32 cv1800_clk_clearbit(&gate->common, &gate->gate); in gate_disable() 39 return cv1800_clk_checkbit(&gate->common, &gate->gate); in gate_is_enabled() 51 req->rate = req->best_parent_rate; in gate_determine_rate() 92 return cv1800_clk_setbit(&div->common, &div->gate); in div_enable() 99 cv1800_clk_clearbit(&div->common, &div->gate); in div_disable() 106 return cv1800_clk_checkbit(&div->common, &div->gate); in div_is_enabled() [all …]
|
| /linux/Documentation/devicetree/bindings/net/ |
| H A D | mdio-mux-multiplexer.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/net/mdio-mux-multiplexer.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Andrew Lunn <andrew@lunn.ch> 13 This is a special case of MDIO mux when MDIO mux is defined as a consumer 14 of a mux producer device. The mux producer can be of any type like mmio mux 15 producer, gpio mux producer or generic register based mux producer. 19 - $ref: /schemas/net/mdio-mux.yaml# 23 const: mdio-mux-multiplexer [all …]
|
| H A D | mdio-mux-mmioreg.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/net/mdio-mux-mmioreg.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Properties for an MDIO bus multiplexer controlled by a memory-mapped device 10 - Andrew Lunn <andrew@lunn.ch> 13 This is a special case of a MDIO bus multiplexer. A memory-mapped device, 14 like an FPGA, is used to control which child bus is connected. The mdio-mux 15 node must be a child of the memory-mapped device. The driver currently only 16 supports devices with 8, 16 or 32-bit registers. [all …]
|
| /linux/arch/arm/boot/dts/microchip/ |
| H A D | at91-natte.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * at91-natte.dts - Device Tree include file for the Natte board 11 mux: mux-controller { label 12 compatible = "gpio-mux"; 13 #mux-control-cells = <0>; 15 mux-gpios = <&ioexp 0 GPIO_ACTIVE_HIGH>, 20 batntc-mux { 21 compatible = "io-channel-mux"; 22 io-channels = <&adc 5>; 23 io-channel-names = "parent"; [all …]
|
| /linux/arch/arm64/boot/dts/amlogic/ |
| H A D | meson-g12-common.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 #include <dt-bindings/phy/phy.h> 7 #include <dt-bindings/gpio/gpio.h> 8 #include <dt-bindings/clock/g12a-clkc.h> 9 #include <dt-bindings/clock/g12a-aoclkc.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/interrupt-controller/arm-gic.h> 12 #include <dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h> 13 #include <dt-bindings/reset/amlogic,meson-g12a-reset.h> 14 #include <dt-bindings/thermal/thermal.h> [all …]
|
| H A D | meson-s4.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 #include <dt-bindings/interrupt-controller/irq.h> 7 #include <dt-bindings/interrupt-controller/arm-gic.h> 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/gpio/meson-s4-gpio.h> 10 #include <dt-bindings/clock/amlogic,s4-pll-clkc.h> 11 #include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h> 12 #include <dt-bindings/power/meson-s4-power.h> 13 #include <dt-bindings/reset/amlogic,meson-s4-reset.h> 17 #address-cells = <2>; [all …]
|
| H A D | meson-gxl.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 #include "meson-gx.dtsi" 8 #include <dt-bindings/clock/gxbb-clkc.h> 9 #include <dt-bindings/clock/gxbb-aoclkc.h> 10 #include <dt-bindings/gpio/meson-gxl-gpio.h> 11 #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h> 14 compatible = "amlogic,meson-gxl"; 18 compatible = "amlogic,meson-gxl-usb-ctrl"; 19 reg = <0x0 0xd0078080 0x0 0x20>; 21 #address-cells = <2>; [all …]
|
| /linux/arch/arm/boot/dts/marvell/ |
| H A D | mmp3.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ OR MIT 6 #include <dt-bindings/clock/marvell,mmp2.h> 7 #include <dt-bindings/power/marvell,mmp2.h> 8 #include <dt-bindings/interrupt-controller/arm-gic.h> 11 #address-cells = <1>; 12 #size-cells = <1>; 15 #address-cells = <1>; 16 #size-cells = <0>; 17 enable-method = "marvell,mmp3-smp"; 22 next-level-cache = <&l2>; [all …]
|
| H A D | mmp2.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include <dt-bindings/clock/marvell,mmp2.h> 8 #include <dt-bindings/power/marvell,mmp2.h> 9 #include <dt-bindings/clock/marvell,mmp2-audio.h> 12 #address-cells = <1>; 13 #size-cells = <1>; 25 #address-cells = <1>; 26 #size-cells = <1>; 27 compatible = "simple-bus"; 28 interrupt-parent = <&intc>; [all …]
|
| /linux/drivers/clk/sprd/ |
| H A D | mux.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <linux/clk-provider.h> 12 #include "mux.h" 15 const struct sprd_mux_ssel *mux) in sprd_mux_helper_get_parent() argument 17 unsigned int reg; in sprd_mux_helper_get_parent() local 22 regmap_read(common->regmap, common->reg, ®); in sprd_mux_helper_get_parent() 23 parent = reg >> mux->shift; in sprd_mux_helper_get_parent() 24 parent &= (1 << mux->width) - 1; in sprd_mux_helper_get_parent() 26 if (!mux->table) in sprd_mux_helper_get_parent() 29 num_parents = clk_hw_get_num_parents(&common->hw); in sprd_mux_helper_get_parent() [all …]
|
| /linux/arch/arm/boot/dts/aspeed/ |
| H A D | aspeed-bmc-ampere-mtjade.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /dts-v1/; 3 #include "aspeed-g5.dtsi" 4 #include <dt-bindings/gpio/aspeed-gpio.h> 8 compatible = "ampere,mtjade-bmc", "aspeed,ast2500"; 12 * i2c bus 50-57 assigned to NVMe slot 0-7 24 * i2c bus 60-67 assigned to NVMe slot 8-15 36 * i2c bus 70-77 assigned to NVMe slot 16-23 48 * i2c bus 80-81 assigned to NVMe M2 slot 0-1 60 stdout-path = &uart5; [all …]
|
| H A D | aspeed-bmc-facebook-cmm.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 /dts-v1/; 5 #include "ast2500-facebook-netbmc-common.dtsi" 9 compatible = "facebook,cmm-bmc", "aspeed,ast2500"; 22 * PCA9548 (1-0077) provides 8 channels for connecting to 35 * PCA9548 (2-0071) provides 8 channels for connecting to 48 * PCA9548 (8-0077) provides 8 channels and the first 4 61 * 2 PCA9548 (18-0070 & 18-0073), 16 channels connecting 82 * 2 PCA9548 (19-0070 & 19-0073), 16 channels connecting 103 * 2 PCA9548 (20-0070 & 20-0073), 16 channels connecting [all …]
|
| /linux/drivers/clk/sunxi/ |
| H A D | clk-factors.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Adjustable factor-based clock implementation 8 #include <linux/clk-provider.h> 16 #include "clk-factors.h" 19 * DOC: basic adjustable factor-based clock 22 * prepare - clk_prepare only ensures that parents are prepared 23 * enable - clk_enable only ensures that parents are enabled 24 * rate - rate is adjustable. 25 * clk->rate = (parent->rate * N * (K + 1) >> P) / (M + 1) 26 * parent - fixed parent. No clk_set_parent support [all …]
|
| H A D | clk-a10-mod1.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk-provider.h> 24 struct clk_mux *mux; in sun4i_mod1_clk_setup() local 27 const char *clk_name = node->name; in sun4i_mod1_clk_setup() 28 void __iomem *reg; in sun4i_mod1_clk_setup() local 31 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); in sun4i_mod1_clk_setup() 32 if (IS_ERR(reg)) in sun4i_mod1_clk_setup() 35 mux = kzalloc(sizeof(*mux), GFP_KERNEL); in sun4i_mod1_clk_setup() 36 if (!mux) in sun4i_mod1_clk_setup() 43 of_property_read_string(node, "clock-output-names", &clk_name); in sun4i_mod1_clk_setup() [all …]
|
| /linux/drivers/clk/tegra/ |
| H A D | clk-super.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 #include <linux/clk-provider.h> 28 #define super_state_to_src_shift(m, s) ((m->width * s)) 29 #define super_state_to_src_mask(m) (((1 << m->width) - 1)) 36 struct tegra_clk_super_mux *mux = to_clk_super_mux(hw); in clk_super_get_parent() local 40 val = readl_relaxed(mux->reg); in clk_super_get_parent() 47 super_state_to_src_shift(mux, SUPER_STATE_IDLE) : in clk_super_get_parent() 48 super_state_to_src_shift(mux, SUPER_STATE_RUN); in clk_super_get_parent() 50 source = (val >> shift) & super_state_to_src_mask(mux); in clk_super_get_parent() 56 if ((mux->flags & TEGRA_DIVIDER_2) && !(val & SUPER_LP_DIV2_BYPASS) && in clk_super_get_parent() [all …]
|
| /linux/drivers/clk/x86/ |
| H A D | clk-cgu.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2020-2022 MaxLinear, Inc. 8 #include <linux/clk-provider.h> 12 #include "clk-cgu.h" 14 #define GATE_HW_REG_STAT(reg) ((reg) + 0x0) argument 15 #define GATE_HW_REG_EN(reg) ((reg) + 0x4) argument 16 #define GATE_HW_REG_DIS(reg) ((reg) + 0x8) argument 29 if (list->div_flags & CLOCK_FLAG_VAL_INIT) in lgm_clk_register_fixed() 30 lgm_set_clk_val(ctx->membase, list->div_off, list->div_shift, in lgm_clk_register_fixed() 31 list->div_width, list->div_val); in lgm_clk_register_fixed() [all …]
|
| /linux/drivers/clk/rockchip/ |
| H A D | clk-muxgrf.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 #include <linux/clk-provider.h> 13 u32 reg; member 23 struct rockchip_muxgrf_clock *mux = to_muxgrf_clock(hw); in rockchip_muxgrf_get_parent() local 24 unsigned int mask = GENMASK(mux->width - 1, 0); in rockchip_muxgrf_get_parent() 27 regmap_read(mux->regmap, mux->reg, &val); in rockchip_muxgrf_get_parent() 29 val >>= mux->shift; in rockchip_muxgrf_get_parent() 37 struct rockchip_muxgrf_clock *mux = to_muxgrf_clock(hw); in rockchip_muxgrf_set_parent() local 38 unsigned int mask = GENMASK(mux->width + mux->shift - 1, mux->shift); in rockchip_muxgrf_set_parent() 42 val <<= mux->shift; in rockchip_muxgrf_set_parent() [all …]
|
| /linux/drivers/clk/uniphier/ |
| H A D | clk-uniphier-mux.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 #include <linux/clk-provider.h> 11 #include "clk-uniphier.h" 16 unsigned int reg; member 25 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_set_parent() local 27 return regmap_write_bits(mux->regmap, mux->reg, mux->masks[index], in uniphier_clk_mux_set_parent() 28 mux->vals[index]); in uniphier_clk_mux_set_parent() 33 struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw); in uniphier_clk_mux_get_parent() local 39 ret = regmap_read(mux->regmap, mux->reg, &val); in uniphier_clk_mux_get_parent() 44 if ((mux->masks[i] & val) == mux->vals[i]) in uniphier_clk_mux_get_parent() [all …]
|
| /linux/drivers/mux/ |
| H A D | mmio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * MMIO register bitfield-controlled multiplexer driver 12 #include <linux/mux/driver.h> 18 static int mux_mmio_set(struct mux_control *mux, int state) in mux_mmio_set() argument 20 struct regmap_field **fields = mux_chip_priv(mux->chip); in mux_mmio_set() 22 return regmap_field_write(fields[mux_control_get_index(mux)], state); in mux_mmio_set() 30 { .compatible = "mmio-mux", }, 31 { .compatible = "reg-mux", }, 44 struct device *dev = &pdev->dev; in mux_mmio_probe() 45 struct device_node *np = dev->of_node; in mux_mmio_probe() [all …]
|
| /linux/sound/soc/codecs/ |
| H A D | tas5086.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * - implement DAPM and input muxing 9 * - implement modulation limit 10 * - implement non-default PWM start 13 * because the registers are of unequal size, and multi-byte registers 18 * it doesn't matter because the entire map can be accessed as 8-bit 21 * routines have to be open-coded. 70 #define TAS5086_CHANNEL_VOL(X) (0x08 + (X)) /* Channel 1-6 volume */ 88 * Default TAS5086 power-up configuration 122 static int tas5086_register_size(struct device *dev, unsigned int reg) in tas5086_register_size() argument [all …]
|
| /linux/drivers/clk/imx/ |
| H A D | clk-composite-7ulp.c | 1 // SPDX-License-Identifier: GPL-2.0+ 9 #include <linux/clk-provider.h> 14 #include "../clk-fractional-divider.h" 39 spin_lock_irqsave(gate->lock, flags); in pcc_gate_enable() 44 val = readl(gate->reg); in pcc_gate_enable() 46 writel(val, gate->reg); in pcc_gate_enable() 48 spin_unlock_irqrestore(gate->lock, flags); in pcc_gate_enable() 73 void __iomem *reg, bool has_swrst) in imx_ulp_clk_hw_composite() argument 78 struct clk_mux *mux = NULL; in imx_ulp_clk_hw_composite() local 82 val = readl(reg); in imx_ulp_clk_hw_composite() [all …]
|