mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
Falco: Measure adapter ID voltage
This measures the analog voltage from the AC adapater's ID pin. The values don't seem to match what we expected, so there's more work to come. Still, here it is. BUG=chrome-os-partner:19594 BRANCH=none TEST=manual From the EC console, run "adc". You should see a line like this: ADC channel "AdapterIDVoltage" = 553 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Idf84ceb6cd85d66d879f07bf4f26881ec078f638 Reviewed-on: https://gerrit.chromium.org/gerrit/58465
This commit is contained in:
@@ -112,7 +112,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
|
||||
{"PCH_RTCRST_L", LM4_GPIO_F, (1<<6), GPIO_HI_Z, NULL},
|
||||
{"PCH_SRTCRST_L", LM4_GPIO_F, (1<<7), GPIO_HI_Z, NULL},
|
||||
|
||||
{"PWR_LED_L", LM4_GPIO_N, (1<<6), GPIO_HI_Z, NULL},
|
||||
{"PWR_LED_L", LM4_GPIO_N, (1<<6), GPIO_OUT_HIGH, NULL},
|
||||
{"KB_LED_EN", LM4_GPIO_D, (1<<4), GPIO_OUT_LOW, NULL},
|
||||
{"BAT_LED0", LM4_GPIO_D, (1<<0), GPIO_OUT_LOW, NULL},
|
||||
{"BAT_LED1", LM4_GPIO_D, (1<<1), GPIO_OUT_LOW, NULL},
|
||||
@@ -134,7 +134,9 @@ const struct adc_t adc_channels[ADC_CH_COUNT] = {
|
||||
{"ChargerCurrent", LM4_ADC_SEQ1, 33 * 4000, ADC_READ_MAX * 16, 0,
|
||||
LM4_AIN(0), 0x06 /* IE0 | END0 */, LM4_GPIO_E, (1<<3)},
|
||||
|
||||
/* HEY: Falco will have AD_TYPE on PB5/AIN11 */
|
||||
/* AC Adapter ID voltage (mv) */
|
||||
{"AdapterIDVoltage", LM4_ADC_SEQ2, 3300, ADC_READ_MAX, 0,
|
||||
LM4_AIN(11), 0x06 /* IE0 | END0 */, LM4_GPIO_B, (1<<5)},
|
||||
};
|
||||
|
||||
/* I2C ports */
|
||||
|
||||
@@ -145,15 +145,16 @@ enum adc_channel {
|
||||
/* EC internal die temperature in degrees K. */
|
||||
ADC_CH_EC_TEMP = 0,
|
||||
|
||||
/* HEY: Falco MB has only one discrete thermal sensor, but it has two
|
||||
* values (one internal and one external). Both should be here.
|
||||
* HEY: There may be a BAT_TEMP sensor on the battery pack too.
|
||||
*/
|
||||
|
||||
/* HEY: Be prepared to read this (ICMNT). */
|
||||
/* Charger current in mA. */
|
||||
ADC_CH_CHARGER_CURRENT,
|
||||
|
||||
/* AC Adapter ID voltage in mV */
|
||||
ADC_AC_ADAPTER_ID_VOLTAGE,
|
||||
|
||||
/* HEY: Falco MB has only one discrete thermal sensor, but it has two
|
||||
* values (one internal and one external). Both should be here.
|
||||
*/
|
||||
|
||||
ADC_CH_COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user