mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
In Sink mode, on the receipt of a GotoMin message,
reduce the current consumption to some minimum level.
BUG=chrome-os-partner:33688
TEST=Manual testing
Used a Kevin, with test routine, to test GotoMin feature
on another Kevin unit.
Test routine:
if (!strcasecmp(argv[2], "gm")) {
ccprintf("send goto min\n");
send_control(port, PD_CTRL_GOTO_MIN);
send_control(port, PD_CTRL_PS_RDY);
}
Kevin with GotoMin feature:
# ectool usbpdpower 0
Port 0: SNK DRP PD 4277mV / 3000mA, max 5000mV / 3000mA / 15000mW
Port 1: Disconnected
After Test routine is executed:
# ectool usbpdpower 0
Port 0: SNK DRP PD 4906mV / 500mA, max 5000mV / 500mA / 2500mW
Port 1: Disconnected
BRANCH=none
Change-Id: Iaac6e19706ceb10ccaff4d602d63fc086c808c8f
Reviewed-on: https://chromium-review.googlesource.com/425728
Commit-Ready: Sam Hurst <shurst@google.com>
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
76 lines
1.7 KiB
C
76 lines
1.7 KiB
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Emulator board configuration */
|
|
|
|
#ifndef __CROS_EC_BOARD_H
|
|
#define __CROS_EC_BOARD_H
|
|
|
|
/* Optional features */
|
|
#define CONFIG_EXTPOWER_GPIO
|
|
#undef CONFIG_FMAP
|
|
#define CONFIG_POWER_BUTTON
|
|
#undef CONFIG_WATCHDOG
|
|
#define CONFIG_SWITCH
|
|
#define CONFIG_INDUCTIVE_CHARGING
|
|
|
|
#undef CONFIG_CONSOLE_HISTORY
|
|
#define CONFIG_CONSOLE_HISTORY 4
|
|
|
|
#define CONFIG_WP_ACTIVE_HIGH
|
|
|
|
#include "gpio_signal.h"
|
|
|
|
enum temp_sensor_id {
|
|
TEMP_SENSOR_CPU = 0,
|
|
TEMP_SENSOR_BOARD,
|
|
TEMP_SENSOR_CASE,
|
|
TEMP_SENSOR_BATTERY,
|
|
|
|
TEMP_SENSOR_COUNT
|
|
};
|
|
|
|
enum adc_channel {
|
|
ADC_CH_CHARGER_CURRENT,
|
|
ADC_AC_ADAPTER_ID_VOLTAGE,
|
|
|
|
ADC_CH_COUNT
|
|
};
|
|
|
|
/* Fake test charge suppliers */
|
|
enum {
|
|
CHARGE_SUPPLIER_TEST1,
|
|
CHARGE_SUPPLIER_TEST2,
|
|
CHARGE_SUPPLIER_TEST3,
|
|
CHARGE_SUPPLIER_TEST4,
|
|
CHARGE_SUPPLIER_TEST5,
|
|
CHARGE_SUPPLIER_TEST6,
|
|
CHARGE_SUPPLIER_TEST7,
|
|
CHARGE_SUPPLIER_TEST8,
|
|
CHARGE_SUPPLIER_TEST_COUNT
|
|
};
|
|
|
|
/* Custom charge_manager priority table is defined in test code */
|
|
extern const int supplier_priority[];
|
|
|
|
/* Standard-current Rp */
|
|
#define PD_SRC_VNC PD_SRC_DEF_VNC_MV
|
|
#define PD_SRC_RD_THRESHOLD PD_SRC_DEF_RD_THRESH_MV
|
|
|
|
/* delay necessary for the voltage transition on the power supply */
|
|
#define PD_POWER_SUPPLY_TURN_ON_DELAY 20000 /* us */
|
|
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 20000 /* us */
|
|
|
|
/* Define typical operating power and max power */
|
|
#define PD_OPERATING_POWER_MW 15000
|
|
#define PD_MAX_POWER_MW 60000
|
|
#define PD_MAX_CURRENT_MA 3000
|
|
#define PD_MAX_VOLTAGE_MV 20000
|
|
|
|
#define PD_MIN_CURRENT_MA 500
|
|
#define PD_MIN_POWER_MW 7500
|
|
|
|
#endif /* __CROS_EC_BOARD_H */
|