/linux/drivers/mfd/ |
H A D | cros_ec_dev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 20 #define DRV_NAME "cros-ec-dev" 27 * struct cros_feature_to_name - CrOS feature id to name/short description. 39 * struct cros_feature_to_cells - CrOS feature id to mfd cells association. 74 { .name = "cros-ec-cec", }, 78 { .name = "cros-ec-gpio", }, 82 { .name = "cros-ec-rtc", }, 86 { .name = "cros-ec-sensorhub", }, 90 { .name = "cros-charge-control", }, 91 { .name = "cros-usbpd-charger", }, [all …]
|
/linux/Documentation/devicetree/bindings/extcon/ |
H A D | extcon-usbc-cros-ec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/extcon/extcon-usbc-cros-ec.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ChromeOS EC USB Type-C cable and accessories detection 10 - Benson Leung <bleung@chromium.org> 16 The node for this device must be under a cros-ec node like google,cros-ec-spi 17 or google,cros-ec-i2c. 21 const: google,extcon-usbc-cros-ec 23 google,usb-port-id: [all …]
|
/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 …]
|
/linux/drivers/platform/chrome/ |
H A D | cros_ec_sensorhub.c | 1 // SPDX-License-Identifier: GPL-2.0 20 #define DRV_NAME "cros-ec-sensorhub" 54 struct cros_ec_command *msg = sensorhub->msg; in cros_ec_sensorhub_register() 55 struct cros_ec_dev *ec = sensorhub->ec; in cros_ec_sensorhub_register() local 60 msg->version = 1; in cros_ec_sensorhub_register() 61 msg->insize = sizeof(struct ec_response_motion_sense); in cros_ec_sensorhub_register() 62 msg->outsize = sizeof(struct ec_params_motion_sense); in cros_ec_sensorhub_register() 64 for (i = 0; i < sensorhub->sensor_num; i++) { in cros_ec_sensorhub_register() 65 sensorhub->params->cmd = MOTIONSENSE_CMD_INFO; in cros_ec_sensorhub_register() 66 sensorhub->params->info.sensor_num = i; in cros_ec_sensorhub_register() [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | google,cros-ec-codec.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 4 $id: http://devicetree.org/schemas/sound/google,cros-ec-codec.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Audio codec controlled by ChromeOS EC 10 - Cheng-Yi Chiang <cychiang@chromium.org> 11 - Tzung-Bi Shih <tzungbi@kernel.org> 14 Google's ChromeOS EC codec is a digital mic codec provided by the 15 Embedded Controller (EC) and is controlled via a host-command 16 interface. An EC codec node should only be found inside the "codecs" [all …]
|
/linux/Documentation/devicetree/bindings/remoteproc/ |
H A D | mtk,scp.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Tinghan Shen <tinghan.shen@mediatek.com> 13 This binding provides support for ARM Cortex M4 Co-processor found on some 19 - mediatek,mt8183-scp 20 - mediatek,mt8186-scp 21 - mediatek,mt8188-scp 22 - mediatek,mt8188-scp-dual 23 - mediatek,mt8192-scp [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | debugfs-cros-ec | 1 What: /sys/kernel/debug/<cros-ec-device>/console_log 5 If the EC supports the CONSOLE_READ command type, this file 6 can be used to grab the EC logs. The kernel polls for the log 10 What: /sys/kernel/debug/<cros-ec-device>/panicinfo 14 This file dumps the EC panic information from the previous 16 type is supported by the EC. 18 What: /sys/kernel/debug/<cros-ec-device>/pdinfo 23 information for all the USB PD/type-C ports available. If 27 What: /sys/kernel/debug/<cros-ec-device>/uptime 31 A u32 providing the time since EC booted in ms. This is [all …]
|
/linux/Documentation/devicetree/bindings/chrome/ |
H A D | google,cros-ec-typec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/chrome/google,cros-ec-typec.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Google Chrome OS EC(Embedded Controller) Type C port driver. 10 - Benson Leung <bleung@chromium.org> 11 - Prashant Malani <pmalani@chromium.org> 14 Chrome OS devices have an Embedded Controller(EC) which has access to 17 cros-ec node like google,cros-ec-spi. 21 const: google,cros-ec-typec [all …]
|
/linux/Documentation/devicetree/bindings/display/bridge/ |
H A D | google,cros-ec-anx7688.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/display/bridge/google,cros-ec-anx7688.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ChromeOS EC ANX7688 HDMI to DP Converter through Type-C Port 10 - Nicolas Boichat <drinkcat@chromium.org> 13 ChromeOS EC ANX7688 is a display bridge that converts HDMI 2.0 to 14 DisplayPort 1.3 Ultra-HDi (4096x2160p60). It is an Analogix ANX7688 chip 16 (See google,cros-ec.yaml). It is accessed using I2C tunneling through 17 the EC and therefore its node should be a child of an EC I2C tunnel node [all …]
|
/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 …]
|
/linux/Documentation/devicetree/bindings/input/ |
H A D | google,cros-ec-keyb.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $id: http://devicetree.org/schemas/input/google,cros-ec-keyb.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: ChromeOS EC Keyboard 11 - Simon Glass <sjg@chromium.org> 12 - Benson Leung <bleung@chromium.org> 15 Google's ChromeOS EC Keyboard is a simple matrix keyboard 16 implemented on a separate EC (Embedded Controller) device. It provides 17 a message for reading key scans from the EC. These are then converted [all …]
|
/linux/Documentation/devicetree/bindings/regulator/ |
H A D | google,cros-ec-regulator.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/regulator/google,cros-ec-regulator.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ChromeOS EC controlled voltage regulators 10 - Pi-Hsun Shih <pihsun@chromium.org> 17 - $ref: regulator.yaml# 21 const: google,cros-ec-regulator 25 description: Identifier for the voltage regulator to ChromeOS EC. 28 - compatible [all …]
|
/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. 16 #include <dt-bindings/mfd/cros_ec.h> 19 * struct cros_ec_pwm_device - Driver data for EC PWM 21 * @ec: Pointer to EC device 25 struct cros_ec_device *ec; member 44 return -EINVAL; in cros_ec_dt_type_to_pwm_type() 51 struct cros_ec_device *ec = ec_pwm->ec; in cros_ec_pwm_set_duty() local 62 msg->version = 0; in cros_ec_pwm_set_duty() 63 msg->command = EC_CMD_PWM_SET_DUTY; in cros_ec_pwm_set_duty() [all …]
|
/linux/Documentation/devicetree/bindings/iio/proximity/ |
H A D | google,cros-ec-mkbp-proximity.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ChromeOS EC MKBP Proximity Sensor 10 - Stephen Boyd <swboyd@chromium.org> 11 - Benson Leung <bleung@chromium.org> 14 Google's ChromeOS EC sometimes has the ability to detect user proximity. 15 This is implemented on the EC as near/far logic and exposed to the OS 20 const: google,cros-ec-mkbp-proximity [all …]
|
/linux/arch/arm/boot/dts/ |
H A D | cros-ec-keyboard.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Keyboard dts fragment for devices that use cros-ec-keyboard 8 #include <dt-bindings/input/input.h> 9 #include <dt-bindings/input/cros-ec-keyboard.h> 12 keyboard_controller: keyboard-controller { 13 compatible = "google,cros-ec-keyb"; 14 keypad,num-rows = <8>; 15 keypad,num-columns = <13>; 16 google,needs-ghost-filter;
|
/linux/drivers/iio/common/cros_ec_sensors/ |
H A D | cros_ec_sensors.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * cros_ec_sensors - Driver for Chrome OS Embedded Controller sensors. 7 * This driver uses the cros-ec interface to communicate with the Chrome OS 8 * EC about sensors data. Data access is presented through iio sysfs. 45 int idx = chan->scan_index; in cros_ec_sensors_read() 47 mutex_lock(&st->core.cmd_lock); in cros_ec_sensors_read() 51 ret = st->core.read_ec_sensors_data(indio_dev, 1 << idx, &data); in cros_ec_sensors_read() 58 st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_OFFSET; in cros_ec_sensors_read() 59 st->core.param.sensor_offset.flags = 0; in cros_ec_sensors_read() 61 ret = cros_ec_motion_send_host_cmd(&st->core, 0); in cros_ec_sensors_read() [all …]
|
H A D | cros_ec_lid_angle.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * cros_ec_lid_angle - Driver for CrOS EC lid angle sensor. 8 * This driver uses the cros-ec interface to communicate with the Chrome OS 9 * EC about counter sensors. Counters are presented through 29 #define DRV_NAME "cros-ec-lid-angle" 57 st->param.cmd = MOTIONSENSE_CMD_LID_ANGLE; in cros_ec_sensors_read_lid_angle() 58 ret = cros_ec_motion_send_host_cmd(st, sizeof(st->resp->lid_angle)); in cros_ec_sensors_read_lid_angle() 60 dev_warn(&indio_dev->dev, "Unable to read lid angle\n"); in cros_ec_sensors_read_lid_angle() 64 *data = st->resp->lid_angle.value; in cros_ec_sensors_read_lid_angle() 76 mutex_lock(&st->core.cmd_lock); in cros_ec_lid_angle_read() [all …]
|
/linux/drivers/gpio/ |
H A D | gpio-cros-ec.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * This driver provides the ability to control GPIOs on the Chrome OS EC. 23 /* Prefix all names to avoid collisions with EC <-> AP nets */ 24 static const char cros_ec_gpio_prefix[] = "EC:"; 29 const char *name = gc->names[gpio] + strlen(cros_ec_gpio_prefix); in cros_ec_gpio_set() 44 dev_err(gc->parent, "error setting gpio%d (%s) on EC: %d\n", gpio, name, ret); in cros_ec_gpio_set() 49 const char *name = gc->names[gpio] + strlen(cros_ec_gpio_prefix); in cros_ec_gpio_get() 58 return -EINVAL; in cros_ec_gpio_get() 63 dev_err(gc->parent, "error getting gpio%d (%s) on EC: %d\n", gpio, name, ret); in cros_ec_gpio_get() 75 const char *name = gc->names[gpio] + strlen(cros_ec_gpio_prefix); in cros_ec_gpio_get_direction() [all …]
|
/linux/include/linux/iio/common/ |
H A D | cros_ec_sensors_core.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * ChromeOS EC sensor hub 24 /* EC returns sensor values using signed 16 bit registers */ 36 * struct cros_ec_sensors_core_state - state data for EC sensors IIO driver 37 * @ec: cros EC device structure 40 * @msg: cros EC command structure 54 * is always 8-byte aligned. 56 * @fifo_max_event_count: Size of the EC sensor FIFO 61 struct cros_ec_device *ec; member
|
/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> 9 #include "rk3399-op1.dtsi" 18 stdout-path = "serial2:115200n8"; 27 * - Rails that only connect to the EC (or devices that the EC talks to) 29 * - Rails _are_ included if the rails go to the AP even if the AP 38 * - The EC controls the enable and the EC always enables a rail as 40 * - The rails are actually connected to each other by a jumper and 45 ppvar_sys: regulator-ppvar-sys { [all …]
|
/linux/drivers/gpu/drm/bridge/ |
H A D | cros-ec-anx7688.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * CrOS EC ANX7688 HDMI->DP bridge driver 58 if (!anx->filter) in cros_ec_anx7688_bridge_mode_fixup() 62 ret = regmap_bulk_read(anx->regmap, ANX7688_DP_BANDWIDTH_REG, regs, 2); in cros_ec_anx7688_bridge_mode_fixup() 81 requiredbw = mode->clock * 8 * 3; in cros_ec_anx7688_bridge_mode_fixup() 100 struct device *dev = &client->dev; in cros_ec_anx7688_bridge_probe() 108 return -ENOMEM; in cros_ec_anx7688_bridge_probe() 110 anx7688->client = client; in cros_ec_anx7688_bridge_probe() 113 anx7688->regmap = devm_regmap_init_i2c(client, &cros_ec_anx7688_regmap_config); in cros_ec_anx7688_bridge_probe() 114 if (IS_ERR(anx7688->regmap)) { in cros_ec_anx7688_bridge_probe() [all …]
|
/linux/drivers/power/supply/ |
H A D | cros_charge-control.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ChromeOS EC driver for charge control 24 * Semantics of data *returned* from the EC API and Linux sysfs differ 26 * To match the expected sysfs API, data is never read back from the EC but 29 * Changes to the EC bypassing the driver will not be reflected in sysfs. 30 * Any change to "charge_behaviour" will synchronize the EC with the driver state. 79 lockdep_assert_held(&priv->lock); in cros_chctl_configure_ec() 83 switch (priv->current_behaviour) { in cros_chctl_configure_ec() 94 return -EINVAL; in cros_chctl_configure_ec() 97 if (priv->current_behaviour == POWER_SUPPLY_CHARGE_BEHAVIOUR_AUTO && in cros_chctl_configure_ec() [all …]
|
/linux/drivers/iio/pressure/ |
H A D | cros_ec_baro.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * cros_ec_baro - Driver for barometer sensor behind CrosEC. 44 int idx = chan->scan_index; in cros_ec_baro_read() 46 mutex_lock(&st->core.cmd_lock); in cros_ec_baro_read() 59 st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; in cros_ec_baro_read() 60 st->core.param.sensor_range.data = EC_MOTION_SENSE_NO_VALUE; in cros_ec_baro_read() 62 ret = cros_ec_motion_send_host_cmd(&st->core, 0); in cros_ec_baro_read() 66 *val = st->core.resp->sensor_range.ret; in cros_ec_baro_read() 68 /* scale * in_pressure_raw --> kPa */ in cros_ec_baro_read() 73 ret = cros_ec_sensors_core_read(&st->core, chan, val, val2, in cros_ec_baro_read() [all …]
|
/linux/drivers/iio/light/ |
H A D | cros_ec_light_prox.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * cros_ec_light_prox - Driver for light and prox sensors behing CrosEC. 25 * We only represent one entry for light or proximity. EC is merging different 47 int idx = chan->scan_index; in cros_ec_light_prox_read() 49 mutex_lock(&st->core.cmd_lock); in cros_ec_light_prox_read() 53 if (chan->type == IIO_PROXIMITY) { in cros_ec_light_prox_read() 61 ret = -EINVAL; in cros_ec_light_prox_read() 65 if (chan->type == IIO_LIGHT) { in cros_ec_light_prox_read() 72 * pre-processed and represents the ambient light in cros_ec_light_prox_read() 78 ret = -EINVAL; in cros_ec_light_prox_read() [all …]
|