| /linux/drivers/pwm/ |
| H A D | pwm-rz-mtu3.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Renesas RZ/G2L MTU3a PWM Timer driver 8 …* https://www.renesas.com/eu/en/document/mah/rzg2l-group-rzg2lc-group-users-manual-hardware-0?lang… 11 * - When PWM is disabled, the output is driven to Hi-Z. 12 * - While the hardware supports both polarities, the driver (for now) 14 * - HW uses one counter and two match components to configure duty_cycle 16 * - Multi-Function Timer Pulse Unit (a.k.a MTU) has 7 HW channels for PWM 18 * - MTU{1, 2} channels have a single IO, whereas all other HW channels have 20 * - Each IO is modelled as an independent PWM channel. 21 * - rz_mtu3_channel_io_map table is used to map the PWM channel to the [all …]
|
| H A D | pwm-xilinx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * - When changing both duty cycle and period, we may end up with one cycle 13 * - Cannot produce 100% duty cycle by configuring the TLRs. This might be 16 * - Only produces "normal" output. 17 * - Always produces low output if disabled. 20 #include <clocksource/timer-xilinx.h> 22 #include <linux/clk-provider.h> 27 #include <linux/pwm.h> 37 WARN_ON(cycles < 2 || cycles - 2 > priv->max); in xilinx_timer_tlr_cycles() 40 return cycles - 2; in xilinx_timer_tlr_cycles() [all …]
|
| H A D | pwm-lp3943.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * TI/National Semiconductor LP3943 PWM driver 15 #include <linux/pwm.h> 36 struct lp3943_platform_data *pdata = lp3943_pwm->pdata; in lp3943_pwm_request_map() 37 struct lp3943 *lp3943 = lp3943_pwm->lp3943; in lp3943_pwm_request_map() 38 struct lp3943_pwm_map *pwm_map = &lp3943_pwm->pwm_map[hwpwm]; in lp3943_pwm_request_map() 41 pwm_map->output = pdata->pwms[hwpwm]->output; in lp3943_pwm_request_map() 42 pwm_map->num_outputs = pdata->pwms[hwpwm]->num_outputs; in lp3943_pwm_request_map() 44 for (i = 0; i < pwm_map->num_outputs; i++) { in lp3943_pwm_request_map() 45 offset = pwm_map->output[i]; in lp3943_pwm_request_map() [all …]
|
| H A D | pwm-intel-lgm.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * - The hardware supports fixed period & configures only 2-wire mode. 7 * - Supports normal polarity. Does not support changing polarity. 8 * - When PWM is disabled, output of PWM will become 0(inactive). It doesn't 10 * - When duty cycle is changed, PWM output may be a mix of previous setting 13 * - It is a dedicated PWM fan controller. There are no other consumers for 14 * this PWM controller. 21 #include <linux/pwm.h> 36 #define LGM_PWM_MAX_RPM (BIT(16) - 1) 38 #define LGM_PWM_MAX_DUTY_CYCLE (BIT(8) - 1) [all …]
|
| /linux/arch/loongarch/boot/dts/ |
| H A D | loongson-2k2000.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/clock/loongson,ls2k-clk.h> 12 #address-cells = <2>; 13 #size-cells = <2>; 16 #address-cells = <1>; 17 #size-cells = <0>; 34 ref_100m: clock-ref-100m { 35 compatible = "fixed-clock"; [all …]
|
| H A D | loongson-2k1000.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/clock/loongson,ls2k-clk.h> 10 #include <dt-bindings/gpio/gpio.h> 13 #address-cells = <2>; 14 #size-cells = <2>; 17 #address-cells = <1>; 18 #size-cells = <0>; 35 ref_100m: clock-ref-100m { [all …]
|
| H A D | loongson-2k0500.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/clock/loongson,ls2k-clk.h> 12 #address-cells = <2>; 13 #size-cells = <2>; 16 #address-cells = <1>; 17 #size-cells = <0>; 27 ref_100m: clock-ref-100m { 28 compatible = "fixed-clock"; [all …]
|
| /linux/Documentation/devicetree/bindings/pwm/ |
| H A D | pwm.txt | 1 Specifying PWM information for devices 4 1) PWM user nodes 5 ----------------- 7 PWM users should specify a list of PWM devices that they want to use 8 with a property containing a 'pwm-list': 10 pwm-list ::= <single-pwm> [pwm-list] 11 single-pwm ::= <pwm-phandle> <pwm-specifier> 12 pwm-phandle : phandle to PWM controller node 13 pwm-specifier : array of #pwm-cells specifying the given PWM 16 PWM properties should be named "pwms". The exact meaning of each pwms [all …]
|
| /linux/arch/arm/boot/dts/qcom/ |
| H A D | qcom-msm8226-samsung-matisse-common.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 7 * The .dts should first include qcom-msm8226.dtsi or msm8926.dtsi depending on 11 #include <dt-bindings/input/input.h> 14 /delete-node/ &adsp_region; 15 /delete-node/ &mba_region; 16 /delete-node/ &mpss_region; 17 /delete-node/ &smem_region; 27 #address-cells = <1>; 28 #size-cells = <1>; 31 stdout-path = "display0"; [all …]
|
| H A D | qcom-apq8026-lg-lenok.dts | 1 // SPDX-License-Identifier: BSD-3-Clause 6 /dts-v1/; 8 #include "qcom-msm8226.dtsi" 10 #include <dt-bindings/clock/qcom,mmcc-msm8974.h> 12 /delete-node/ &adsp_region; 17 chassis-type = "watch"; 18 qcom,board-id = <132 0x0a>; 19 qcom,msm-id = <199 0x20000>; 27 stdout-path = "serial0:115200n8"; 30 reserved-memory { [all …]
|
| /linux/Documentation/devicetree/bindings/mfd/ |
| H A D | airoha,en7581-gpio-sysctl.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mfd/airoha,en7581-gpio-sysctl.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Christian Marangi <ansuelsmth@gmail.com> 11 - Lorenzo Bianconi <lorenzo@kernel.org> 14 Airoha EN7581 SoC GPIO system controller which provided a register map 15 for controlling the GPIO, pins and PWM of the SoC. 20 - const: airoha,en7581-gpio-sysctl 21 - const: syscon [all …]
|
| /linux/arch/arm/boot/dts/marvell/ |
| H A D | armada-xp-mv78230.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 13 #include "armada-xp.dtsi" 17 compatible = "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; 25 #address-cells = <1>; 26 #size-cells = <0>; 27 enable-method = "marvell,armada-xp-smp"; 31 compatible = "marvell,sheeva-v7"; 34 clock-latency = <1000000>; 39 compatible = "marvell,sheeva-v7"; [all …]
|
| H A D | armada-xp-mv78260.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 13 #include "armada-xp.dtsi" 17 compatible = "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp"; 26 #address-cells = <1>; 27 #size-cells = <0>; 28 enable-method = "marvell,armada-xp-smp"; 32 compatible = "marvell,sheeva-v7"; 35 clock-latency = <1000000>; 40 compatible = "marvell,sheeva-v7"; [all …]
|
| H A D | armada-xp-mv78460.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 13 #include "armada-xp.dtsi" 17 compatible = "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; 27 #address-cells = <1>; 28 #size-cells = <0>; 29 enable-method = "marvell,armada-xp-smp"; 33 compatible = "marvell,sheeva-v7"; 36 clock-latency = <1000000>; 41 compatible = "marvell,sheeva-v7"; [all …]
|
| /linux/drivers/pinctrl/ |
| H A D | pinctrl-th1520.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Pinctrl driver for the T-Head TH1520 SoC 26 #include <linux/pinctrl/pinconf-generic.h> 67 return thp->base + 4 * (pin / 2); in th1520_padcfg() 78 return thp->base + 0x400 + 4 * (pin / 8); in th1520_muxcfg() 115 [TH1520_MUX_PWM] = "pwm", 284 TH1520_PAD(2, QSPI0_SCLK, QSPI, PWM, I2S, GPIO, ____, ____, 0), 285 TH1520_PAD(3, QSPI0_CSN0, QSPI, PWM, I2S, GPIO, ____, ____, 0), 286 TH1520_PAD(4, QSPI0_CSN1, QSPI, PWM, I2S, GPIO, ____, ____, 0), 287 TH1520_PAD(5, QSPI0_D0_MOSI, QSPI, PWM, I2S, GPIO, ____, ____, 0), [all …]
|
| /linux/drivers/hwmon/ |
| H A D | gxp-fan-ctrl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (C) 2022 Hewlett-Packard Enterprise Development Company, L.P. */ 28 val = readb(drvdata->plreg + OFS_FAN_INST); in fan_installed() 38 val = readb(drvdata->plreg + OFS_FAN_FAIL); in fan_failed() 50 * reported for the PWM will be incorrect. Report fan as in fan_enabled() 53 val = readl(drvdata->fn2 + OFS_SEVSTAT); in fan_enabled() 65 return -EINVAL; in gxp_pwm_write() 66 writeb(val, drvdata->base + channel); in gxp_pwm_write() 69 return -EOPNOTSUPP; in gxp_pwm_write() 80 return -EOPNOTSUPP; in gxp_fan_ctrl_write() [all …]
|
| H A D | mlxreg-fan.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 27 * FAN datasheet defines the formula for RPM calculations as RPM = 15/t-high. 28 * The logic in a programmable device measures the time t-high by sampling the 29 * tachometer every t-sample (with the default value 11.32 uS) and increment 31 * RPM = 15 / (t-sample * (K + Regval)), where: 33 * - 0xff - represents tachometer fault; 34 * - 0xfe - represents tachometer minimum value , which is 4444 RPM; 35 * - 0x00 - represents tachometer maximum value , which is 300000 RPM; 39 * used: RPM = 15 / ((Regval + K) * 11.32) * 10^(-6)), which in the 42 * - for Regval 0x00, RPM will be 15000000 * 100 / (44 * 1132) = 30115; [all …]
|
| H A D | gpio-fan.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * gpio-fan.c - Hwmon driver for fans connected to GPIO lines. 60 sysfs_notify(&fan_data->hwmon_dev->kobj, NULL, "fan1_alarm"); in fan_alarm_notify() 61 kobject_uevent(&fan_data->hwmon_dev->kobj, KOBJ_CHANGE); in fan_alarm_notify() 68 schedule_work(&fan_data->alarm_work); in fan_alarm_irq_handler() 79 gpiod_get_value_cansleep(fan_data->alarm_gpio)); in fan1_alarm_show() 87 struct device *dev = fan_data->dev; in fan_alarm_init() 93 alarm_irq = gpiod_to_irq(fan_data->alarm_gpio); in fan_alarm_init() 97 INIT_WORK(&fan_data->alarm_work, fan_alarm_notify); in fan_alarm_init() 107 /* Must be called with fan_data->lock held, except during initialization. */ [all …]
|
| /linux/arch/arm64/boot/dts/mediatek/ |
| H A D | mt7986a-bananapi-bpi-r3.dts | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 5 * Frank Wunderlich <frank-w@public-files.de> 9 /dts-v1/; 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/leds/common.h> 13 #include <dt-bindings/pinctrl/mt65xx.h> 18 model = "Bananapi BPI-R3"; 19 chassis-type = "embedded"; 20 compatible = "bananapi,bpi-r3", "mediatek,mt7986a"; [all …]
|
| H A D | mt7988a-bananapi-bpi-r4-pro.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 5 * Author: Frank Wunderlich <frank-w@public-files.de> 8 /dts-v1/; 11 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/input/input.h> 13 #include <dt-bindings/leds/common.h> 14 #include <dt-bindings/regulator/richtek,rt5190a-regulator.h> 22 /* PCA9548 (0-0070) provides 4 i2c channels */ 30 stdout-path = &serial0; 33 fan: pwm-fan { [all …]
|
| /linux/arch/arm/boot/dts/intel/ixp/ |
| H A D | intel-ixp42x-linksys-nslu2.dts | 1 // SPDX-License-Identifier: ISC 6 /dts-v1/; 8 #include "intel-ixp42x.dtsi" 9 #include <dt-bindings/input/input.h> 14 #address-cells = <1>; 15 #size-cells = <1>; 25 stdout-path = "uart0:115200n8"; 33 compatible = "gpio-leds"; 34 led-status { 37 default-state = "on"; [all …]
|
| /linux/drivers/clocksource/ |
| H A D | ingenic-timer.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/mfd/ingenic-tcu.h> 23 #include <dt-bindings/clock/ingenic,tcu.h> 40 struct regmap *map; member 56 regmap_read(tcu->map, TCU_REG_TCNTc(tcu->cs_channel), &count); in ingenic_tcu_timer_read() 69 return container_of(timer, struct ingenic_tcu, timers[timer->cpu]); in to_ingenic_tcu() 83 regmap_write(tcu->map, TCU_REG_TECR, BIT(timer->channel)); in ingenic_tcu_cevt_set_state_shutdown() 95 return -EINVAL; in ingenic_tcu_cevt_set_next() 97 regmap_write(tcu->map, TCU_REG_TDFRc(timer->channel), next); in ingenic_tcu_cevt_set_next() 98 regmap_write(tcu->map, TCU_REG_TCNTc(timer->channel), 0); in ingenic_tcu_cevt_set_next() [all …]
|
| H A D | samsung_pwm_timer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * samsung - Common hr-timer support (s3c and s5p) 79 static struct samsung_pwm_clocksource pwm; variable 92 reg = readl(pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 94 reg |= (prescale - 1) << shift; in samsung_timer_set_prescale() 95 writel(reg, pwm.base + REG_TCFG0); in samsung_timer_set_prescale() 107 bits = (fls(divisor) - 1) - pwm.variant.div_base; in samsung_timer_set_divisor() 111 reg = readl(pwm.base + REG_TCFG1); in samsung_timer_set_divisor() 114 writel(reg, pwm.base + REG_TCFG1); in samsung_timer_set_divisor() 129 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_stop() [all …]
|
| /linux/arch/arm/boot/dts/broadcom/ |
| H A D | bcm-hr2.dtsi | 33 #include <dt-bindings/interrupt-controller/arm-gic.h> 34 #include <dt-bindings/interrupt-controller/irq.h> 39 interrupt-parent = <&gic>; 40 #address-cells = <1>; 41 #size-cells = <1>; 44 #address-cells = <1>; 45 #size-cells = <0>; 49 compatible = "arm,cortex-a9"; 50 next-level-cache = <&L2>; 56 compatible = "arm,cortex-a9-pmu"; [all …]
|
| /linux/Documentation/hwmon/ |
| H A D | mlxreg-fan.rst | 1 Kernel driver mlxreg-fan 6 - QMB700, equipped with 40x200GbE InfiniBand ports; 7 - MSN3700, equipped with 32x200GbE or 16x400GbE Ethernet ports; 8 - MSN3410, equipped with 6x400GbE plus 48x50GbE Ethernet ports; 9 - MSN3800, equipped with 64x1000GbE Ethernet ports; 14 board with Mellanox Quantum or Spectrume-2 devices. 36 This setup can be re-programmed with other registers. 39 ----------- 42 a PWM output and tachometer inputs. 43 This driver obtains PWM and tachometers registers location according to [all …]
|