summaryrefslogtreecommitdiff
path: root/board/host/gpio.inc
blob: 21b95e4c3ea27896faa5579932f8b72a7552b6f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*- mode:c -*-
 *
 * Copyright 2014 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.
 */

/* Declare symbolic names for all the GPIOs that we care about.
 * Note: Those with interrupt handlers must be declared first. */

GPIO_INT(LID_OPEN,             PIN(0, 0), GPIO_INT_BOTH, lid_interrupt)
GPIO_INT(POWER_BUTTON_L,       PIN(0, 1), GPIO_INT_BOTH, power_button_interrupt)
GPIO_INT(AC_PRESENT,           PIN(0, 2), GPIO_INT_BOTH, extpower_interrupt)
GPIO_INT(VOLUME_DOWN_L,        PIN(0, 3), GPIO_INT_BOTH, button_interrupt)
GPIO_INT(VOLUME_UP_L,          PIN(0, 4), GPIO_INT_BOTH, button_interrupt)
GPIO_INT(CHARGE_DONE,          PIN(0, 5), GPIO_INT_BOTH, inductive_charging_interrupt)
/* GPIOs for EC-CR50 communication */
GPIO_INT(EC_PACKET_MODE_EN,    PIN(0, 16), GPIO_INT_RISING,
	 ec_comm_packet_mode_en)
GPIO_INT(EC_PACKET_MODE_DIS,   PIN(0, 17), GPIO_INT_FALLING,
	 ec_comm_packet_mode_dis)

GPIO(EC_INT_L,             PIN(0, 6), 0)
GPIO(WP,                   PIN(0, 7), 0)
GPIO(ENTERING_RW,          PIN(0, 8), 0)
GPIO(PCH_BKLTEN,           PIN(0, 9), 0)
GPIO(ENABLE_BACKLIGHT,     PIN(0, 10), 0)

/* Inductive charging */
GPIO(CHARGE_EN,            PIN(0, 11), 0)
GPIO(BASE_CHG_VDD_EN,      PIN(0, 12), 0)

GPIO(USB_C0_DISCHARGE,     PIN(0, 15), 0)