summaryrefslogtreecommitdiff
path: root/board/yorp/board.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-06-06 09:44:11 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-06-07 23:33:36 -0700
commita730fd6219d53469a8ca0e74a6631912a24877a3 (patch)
tree2ea27f5164b94cbaca04a07f2578304a2dcb4dd5 /board/yorp/board.h
parent866c67086757eddf84680a2de4377fd3a5a893d7 (diff)
downloadchrome-ec-a730fd6219d53469a8ca0e74a6631912a24877a3.tar.gz
yorp: update gpio and functionality based on latest schematic
- Change GPIO signals at runtime based on board version - SYS_RESTET_L, ENTERING_RW, USB2_OTG_ID - Add 2nd signal for 2nd USB-A port BC1.2 outbound charging - (GPIO96) USB_A1_CHARGE_EN_L (V1) maps to EN_BRD_ID (V0) so we can just enable the USBA port 1 signal on V0 with only a small power drain. It is not worth the EC codebase churn to add support for changing the number of USB-A ports at runtime (since it is a compile time constant now) - Yorp V0 is the only board that set USB_PORT_COUNT to 1 so we can make common octopus code only have the 2 port case. - Add placeholders for LED_3_L, WFCAM_VSYNC - Updated signal name comments to match schematics - Formatting cleanup for consistency BRANCH=none BUG=b:109747036,b:74388692 TEST=verified `sysjump rw` does not brown out board when only powering with USB C1 without battery. Since GPIO_C1_EN_SNK_V0 moved, the board would lock power out if GPIOs state was not maintained properly through sysjump transition. Change-Id: Ie4c72699ab23ee6f7d2fa77a78709e5b4343e46f Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1087815 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/yorp/board.h')
-rw-r--r--board/yorp/board.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/board/yorp/board.h b/board/yorp/board.h
index db0904f8f5..d491214f49 100644
--- a/board/yorp/board.h
+++ b/board/yorp/board.h
@@ -22,10 +22,6 @@
#define CONFIG_LED_COMMON
-/* USB-A Configuration */
-#undef USB_PORT_COUNT
-#define USB_PORT_COUNT 1 /* TODO(b/74388692): Make 2 after hardware fix. */
-
/* Sensors */
#define CONFIG_ACCEL_KX022 /* Lid accel */
#define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */
@@ -59,6 +55,16 @@
#include "gpio_signal.h"
#include "registers.h"
+/* GPIO signals updated base on board version. */
+#define GPIO_SYS_RESET_L gpio_sys_reset_l_runtime
+extern enum gpio_signal gpio_sys_reset_l_runtime;
+
+#define GPIO_ENTERING_RW gpio_entering_rw_runtime
+extern enum gpio_signal gpio_entering_rw_runtime;
+
+#define GPIO_USB2_OTG_ID gpio_usb2_otg_id_runtime
+extern enum gpio_signal gpio_usb2_otg_id_runtime;
+
enum adc_channel {
ADC_TEMP_SENSOR_AMB, /* ADC0 */
ADC_TEMP_SENSOR_CHARGER, /* ADC1 */