/openbmc/linux/Documentation/devicetree/bindings/pwm/ |
H A D | google,cros-ec-pwm.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/pwm/google,cros-ec-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: PWM controlled by ChromeOS EC 10 - Thierry Reding <thierry.reding@gmail.com> 11 - '"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>' 14 Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller 15 (EC) and controlled via a host-command interface. 16 An EC PWM node should be only found as a sub-node of the EC node (see [all …]
|
/openbmc/linux/drivers/pwm/ |
H A D | pwm-cros-ec.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Expose a PWM controlled by the ChromeOS EC to the host processor. 13 #include <linux/pwm.h> 16 #include <dt-bindings/mfd/cros_ec.h> 19 * struct cros_ec_pwm_device - Driver data for EC PWM 22 * @ec: Pointer to EC device 23 * @chip: PWM controller chip 24 * @use_pwm_type: Use PWM types instead of generic channels 28 struct cros_ec_device *ec; member 34 * struct cros_ec_pwm - per-PWM driver data [all …]
|
H A D | pwm-ntxec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * e-book readers designed by the original design manufacturer Netronix, Inc. 5 * It contains RTC, battery monitoring, system power management, and PWM 8 * This driver implements PWM output. 13 * - The get_state callback is not implemented, because the current state of 14 * the PWM output can't be read back from the hardware. 15 * - The hardware can only generate normal polarity output. 16 * - The period and duty cycle can't be changed together in one atomic action. 22 #include <linux/pwm.h> 27 struct ntxec *ec; member [all …]
|
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 2 obj-$(CONFIG_PWM) += core.o 3 obj-$(CONFIG_PWM_SYSFS) += sysfs.o 4 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o 5 obj-$(CONFIG_PWM_APPLE) += pwm-apple.o 6 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o 7 obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o 8 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o 9 obj-$(CONFIG_PWM_BCM_IPROC) += pwm-bcm-iproc.o 10 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/mfd/ |
H A D | google,cros-ec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Benson Leung <bleung@chromium.org> 11 - Guenter Roeck <groeck@chromium.org> 14 Google's ChromeOS EC is a microcontroller which talks to the AP and 16 The EC can be connected through various interfaces (I2C, SPI, and others) 22 - description: 23 For implementations of the EC connected through I2C. [all …]
|
H A D | netronix,ntxec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jonathan Neuschäfer <j.neuschaefer@gmx.net> 13 This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and 22 - description: The I2C address of the EC 24 system-power-controller: 26 description: See Documentation/devicetree/bindings/power/power-controller.txt 31 The EC can signal interrupts via a GPIO line 33 "#pwm-cells": [all …]
|
/openbmc/dbus-sensors/src/fan/ |
H A D | FanMain.cpp | 8 // http://www.apache.org/licenses/LICENSE-2.0 80 {"aspeed,ast2400-pwm-tacho", FanTypes::aspeed}, 81 {"aspeed,ast2500-pwm-tacho", FanTypes::aspeed}, 82 {"aspeed,ast2600-pwm-tach", FanTypes::aspeed}, 83 {"nuvoton,npcm750-pwm-fan", FanTypes::nuvoton}, 84 {"nuvoton,npcm845-pwm-fan", FanTypes::nuvoton}, 85 {"hpe,gxp-fan-ctrl", FanTypes::hpe} 117 return compatibleIterator->second; in getFanType() 142 /* Search PWM since pwm-fan had separated in findPwmfanPath() 143 * PWM from tach directory and 1 channel only*/ in findPwmfanPath() [all …]
|
/openbmc/u-boot/arch/arm/dts/ |
H A D | rk3399-gru.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5 * Copyright 2016-2017 Google, Inc 8 #include <dt-bindings/input/input.h> 10 #include "rk3399-op1-opp.dtsi" 14 u-boot,dm-pre-reloc; 15 stdout-path = "serial2:115200n8"; 16 u-boot,spl-boot-order = &spi_flash; 20 u-boot,spl-payload-offset = <0x40000>; 29 * - Rails that only connect to the EC (or devices that the EC talks to) 31 * - Rails _are_ included if the rails go to the AP even if the AP [all …]
|
H A D | rk3399-gru-chromebook.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Google Gru-Chromebook shared properties 8 #include "rk3399-gru.dtsi" 11 pp900_ap: pp900-ap { 12 compatible = "regulator-fixed"; 13 regulator-name = "pp900_ap"; 15 /* EC turns on w/ pp900_ap_en; always on for AP */ 16 regulator-always-on; 17 regulator-boot-on; 18 regulator-min-microvolt = <900000>; [all …]
|
H A D | exynos5420-peach-pit.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * SAMSUNG/GOOGLE Peach-Pit board device tree source 9 /dts-v1/; 11 #include <dt-bindings/clock/maxim,max77802.h> 12 #include <dt-bindings/regulator/maxim,max77802.h> 17 compatible = "google,pit-rev#", "google,pit", 21 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>; 22 hwid = "PIT TEST A-A 7848"; 23 lazy-init = <1>; 34 compatible = "pwm-backlight"; [all …]
|
H A D | exynos5800-peach-pi.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * SAMSUNG/GOOGLE Peach-Pit board device tree source 9 /dts-v1/; 14 cpu-model = "Exynos5800"; 16 compatible = "google,pit-rev#", "google,pit", 20 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>; 21 hwid = "PIT TEST A-A 7848"; 22 lazy-init = <1>; 33 compatible = "pwm-backlight"; 34 pwms = <&pwm 0 1000000 0>; [all …]
|
/openbmc/linux/arch/arm64/boot/dts/rockchip/ |
H A D | rk3399-gru.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5 * Copyright 2016-2017 Google, Inc 8 #include <dt-bindings/input/input.h> 10 #include "rk3399-op1-opp.dtsi" 19 stdout-path = "serial2:115200n8"; 28 * - Rails that only connect to the EC (or devices that the EC talks to) 30 * - Rails _are_ included if the rails go to the AP even if the AP 39 * - The EC controls the enable and the EC always enables a rail as 41 * - The rails are actually connected to each other by a jumper and 46 ppvar_sys: ppvar-sys { [all …]
|
H A D | rk3399-gru-chromebook.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 3 * Google Gru-Chromebook shared properties 8 #include "rk3399-gru.dtsi" 11 pp900_ap: pp900-ap { 12 compatible = "regulator-fixed"; 13 regulator-name = "pp900_ap"; 15 /* EC turns on w/ pp900_ap_en; always on for AP */ 16 regulator-always-on; 17 regulator-boot-on; 18 regulator-min-microvolt = <900000>; [all …]
|
/openbmc/linux/arch/arm64/boot/dts/qcom/ |
H A D | sc7280-idp-ec-h1.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 3 * sc7280 EC/H1 over SPI (common between IDP2 and CRD) 11 pinctrl-0 = <&qup_spi10_data_clk>, <&qup_spi10_cs_gpio_init_high>, <&qup_spi10_cs_gpio>; 12 cs-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; 14 cros_ec: ec@0 { 15 compatible = "google,cros-ec-spi"; 17 interrupt-parent = <&tlmm>; 19 pinctrl-names = "default"; 20 pinctrl-0 = <&ap_ec_int_l>; 21 spi-max-frequency = <3000000>; [all …]
|
H A D | sc7280-herobrine.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 16 #include <dt-bindings/input/gpio-keys.h> 17 #include <dt-bindings/input/input.h> 18 #include <dt-bindings/leds/common.h> 20 #include "sc7280-qcard.dtsi" 21 #include "sc7280-chrome-common.dtsi" 25 stdout-path = "serial0:115200n8"; 38 ppvar_sys: ppvar-sys-regulator { 39 compatible = "regulator-fixed"; 40 regulator-name = "ppvar_sys"; [all …]
|
/openbmc/linux/drivers/platform/chrome/wilco_ec/ |
H A D | keyboard_leds.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Since the EC will never change the backlight level of its own accord, 14 #include <linux/platform_data/wilco-ec.h> 22 struct wilco_ec_device *ec; member 33 * struct wilco_keyboard_leds_msg - Message to/from EC for keyboard LED control. 35 * @status: Set by EC to 0 on success, 0xFF on failure. 40 * @percent: Brightness in 0-100. Only meaningful in PWM mode. 55 static int send_kbbl_msg(struct wilco_ec_device *ec, in send_kbbl_msg() argument 69 ret = wilco_ec_mailbox(ec, &msg); in send_kbbl_msg() 71 dev_err(ec->dev, in send_kbbl_msg() [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | ntxec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * e-book readers designed by the original design manufacturer Netronix, Inc. 5 * It contains RTC, battery monitoring, system power management, and PWM 9 * power-off/reset. 43 .addr = poweroff_restart_client->addr, in ntxec_poweroff() 52 res = i2c_transfer(poweroff_restart_client->adapter, msgs, ARRAY_SIZE(msgs)); in ntxec_poweroff() 54 dev_warn(&poweroff_restart_client->dev, in ntxec_poweroff() 73 * does send the full two-byte value, but doesn't check the result). in ntxec_restart() 77 .addr = poweroff_restart_client->addr, in ntxec_restart() 79 .len = sizeof(buf) - 1, in ntxec_restart() [all …]
|
/openbmc/linux/drivers/hwmon/ |
H A D | oxp-sensors.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 * Fan control is provided via pwm interface in the range [0-255]. 11 * Old AMD boards use [0-100] as range in the EC, the written value is 13 * AOK ZOE are not scaled but have the same EC layout. 55 /* Fan reading and PWM */ 57 #define OXP_SENSOR_PWM_ENABLE_REG 0x4A /* PWM enable is 1 register long */ 58 #define OXP_SENSOR_PWM_REG 0x4B /* PWM reading is 1 register long */ 61 * Older boards have different values and EC registers 117 DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), 124 DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), [all …]
|
/openbmc/phosphor-pid-control/pid/ |
H A D | fancontroller.cpp | 8 * http://www.apache.org/licenses/LICENSE-2.0 33 const std::vector<std::string>& inputs, const ec::pidinfo& initial) in createFanPid() 40 ec::pid_info_t* info = fan->getPIDInfo(); in createFanPid() 58 value = _owner->getCachedValues(name).unscaled; in inputProc() 65 * sort of have to guess -- all the other fans are reporting, why in inputProc() 92 * in the configuration, and it's a nice-to-have.. in inputProc() 103 double maxRPM = _owner->getMaxSetPointRequest(); in setptProc() 133 bool failsafeCurrState = _owner->getFailSafeMode(); in outputProc() 144 double failsafePercent = _owner->getFailSafePercent(); in outputProc() 147 // Unconditionally replace the computed PWM with the in outputProc() [all …]
|
H A D | stepwisecontroller.cpp | 8 // http://www.apache.org/licenses/LICENSE-2.0 19 #include "ec/stepwise.hpp" 42 ec::StepwiseInfo info = getStepwiseInfo(); in process() 49 output = ec::stepwise(info, input); in process() 52 else if ((input - lastInput) > info.positiveHysteresis) in process() 54 output = ec::stepwise(info, input); in process() 57 else if ((lastInput - input) > info.negativeHysteresis) in process() 59 output = ec::stepwise(info, input); in process() 72 const std::vector<std::string>& inputs, const ec::StepwiseInfo& initial) in createStepwiseController() 81 thermal->setStepwiseInfo(initial); in createStepwiseController() [all …]
|
/openbmc/phosphor-pid-control/ |
H A D | meson.build | 2 'phosphor-pid-control', 'cpp', 20 conf_data.set('STRICT_FAILSAFE_PWM', get_option('strict-failsafe-pwm')) 21 conf_data.set('OFFLINE_FAILSAFE_PWM', get_option('offline-failsafe-pwm')) 22 conf_data.set('UNC_FAILSAFE', get_option('unc-failsafe')) 28 if get_option('oe-sdk').allowed() 29 OECORE_TARGET_SYSROOT = run_command('sh', '-c', 'echo $OECORE_TARGET_SYSROOT').stdout().strip() 31 error('OECORE_TARGET_SYSROOT must be set with enable oe-sdk') 33 message('Enabling OE-SDK at OECORE_TARGET_SYSROOT: ' + OECORE_TARGET_SYSROOT) 35 …ld_so = run_command('sh', '-c', 'find ' + OECORE_TARGET_SYSROOT + '/lib/ld-*.so | sort -r -n | hea… 36 dynamic_linker = ['-Wl,-dynamic-linker,' + ld_so] [all …]
|
H A D | conf.hpp | 3 #include "pid/ec/pid.hpp" 4 #include "pid/ec/stepwise.hpp" 40 * with dynamic sensors from entity-manager. 58 ec::pidinfo pidInfo; // pid details 59 ec::StepwiseInfo stepwiseInfo; 79 /* The minimum set-point value we would ever want (typically in RPM) */ 82 /* If the sensors are in fail-safe mode, this is the percentage to use. */ 88 /* Enable accumulation of the output PWM of different controllers with same
|
/openbmc/phosphor-pid-control/test/ |
H A D | pid_fancontroller_unittest.cpp | 6 #include "pid/ec/logging.hpp" 7 #include "pid/ec/pid.hpp" 36 ec::pidinfo initial; in TEST() 51 ec::pidinfo initial; in TEST() 65 ec::pidinfo initial; in TEST() 74 EXPECT_EQ(0.0, p->inputProc()); in TEST() 79 // A sensor value returning sub-zero is ignored as an error. in TEST() 83 ec::pidinfo initial; in TEST() 89 EXPECT_CALL(z, getCachedValue(StrEq("fan0"))).WillOnce(Return(-1)); in TEST() 90 EXPECT_CALL(z, getCachedValue(StrEq("fan1"))).WillOnce(Return(-1)); in TEST() [all …]
|
/openbmc/linux/arch/arm/boot/dts/amlogic/ |
H A D | meson8b-ec100.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/input/input.h> 22 stdout-path = "serial0:115200n8"; 30 emmc_pwrseq: emmc-pwrseq { 31 compatible = "mmc-pwrseq-emmc"; 32 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 35 gpio-keys { 36 compatible = "gpio-keys-polled"; [all …]
|
/openbmc/linux/drivers/rtc/ |
H A D | rtc-ntxec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * e-book readers designed by the original design manufacturer Netronix, Inc. 5 * It contains RTC, battery monitoring, system power management, and PWM 22 struct ntxec *ec; member 43 res = regmap_read(rtc->ec->regmap, NTXEC_REG_READ_MINUTE_SECOND, &value); in ntxec_read_time() 47 tm->tm_min = value >> 8; in ntxec_read_time() 48 tm->tm_sec = value & 0xff; in ntxec_read_time() 50 res = regmap_read(rtc->ec->regmap, NTXEC_REG_READ_MDAY_HOUR, &value); in ntxec_read_time() 54 tm->tm_mday = value >> 8; in ntxec_read_time() 55 tm->tm_hour = value & 0xff; in ntxec_read_time() [all …]
|