summaryrefslogtreecommitdiff
path: root/board/tigertail
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /board/tigertail
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14695.107.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'board/tigertail')
-rw-r--r--board/tigertail/board.c514
-rw-r--r--board/tigertail/board.h140
-rw-r--r--board/tigertail/build.mk13
-rw-r--r--board/tigertail/ec.tasklist11
-rw-r--r--board/tigertail/gpio.inc65
5 files changed, 0 insertions, 743 deletions
diff --git a/board/tigertail/board.c b/board/tigertail/board.c
deleted file mode 100644
index f4d0382b9c..0000000000
--- a/board/tigertail/board.c
+++ /dev/null
@@ -1,514 +0,0 @@
-/* Copyright 2017 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.
- */
-
-/* Tigertail board configuration */
-
-#include "adc.h"
-#include "common.h"
-#include "console.h"
-#include "ec_version.h"
-#include "gpio.h"
-#include "hooks.h"
-#include "i2c.h"
-#include "ina2xx.h"
-#include "queue_policies.h"
-#include "registers.h"
-#include "task.h"
-#include "timer.h"
-#include "update_fw.h"
-#include "usart-stm32f0.h"
-#include "usart_tx_dma.h"
-#include "usart_rx_dma.h"
-#include "usb_i2c.h"
-#include "usb-stream.h"
-#include "util.h"
-
-#include "gpio_list.h"
-
-
-#define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args)
-
-
-/******************************************************************************
- * Forward UARTs as a USB serial interface.
- */
-
-#define USB_STREAM_RX_SIZE 16
-#define USB_STREAM_TX_SIZE 16
-
-/******************************************************************************
- * Forward USART1 as a simple USB serial interface.
- */
-static struct usart_config const usart1;
-struct usb_stream_config const usart1_usb;
-
-static struct queue const usart1_to_usb = QUEUE_DIRECT(64, uint8_t,
- usart1.producer, usart1_usb.consumer);
-static struct queue const usb_to_usart1 = QUEUE_DIRECT(64, uint8_t,
- usart1_usb.producer, usart1.consumer);
-
-static struct usart_config const usart1 =
- USART_CONFIG(usart1_hw,
- usart_rx_interrupt,
- usart_tx_interrupt,
- 115200,
- 0,
- usart1_to_usb,
- usb_to_usart1);
-
-USB_STREAM_CONFIG(usart1_usb,
- USB_IFACE_USART1_STREAM,
- USB_STR_USART1_STREAM_NAME,
- USB_EP_USART1_STREAM,
- USB_STREAM_RX_SIZE,
- USB_STREAM_TX_SIZE,
- usb_to_usart1,
- usart1_to_usb)
-
-
-/******************************************************************************
- * Define the strings used in our USB descriptors.
- */
-const void *const usb_strings[] = {
- [USB_STR_DESC] = usb_string_desc,
- [USB_STR_VENDOR] = USB_STRING_DESC("Google Inc."),
- [USB_STR_PRODUCT] = USB_STRING_DESC("Tigertail"),
- [USB_STR_SERIALNO] = 0,
- [USB_STR_VERSION] = USB_STRING_DESC(CROS_EC_VERSION32),
- [USB_STR_I2C_NAME] = USB_STRING_DESC("I2C"),
- [USB_STR_USART1_STREAM_NAME] = USB_STRING_DESC("DUT UART"),
- [USB_STR_CONSOLE_NAME] = USB_STRING_DESC("Tigertail Console"),
- [USB_STR_UPDATE_NAME] = USB_STRING_DESC("Firmware update"),
-};
-
-BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT);
-
-/******************************************************************************
- * ADC support for SBU flip detect.
- */
-/* ADC channels */
-const struct adc_t adc_channels[] = {
- [ADC_SBU1] = {"SBU1", 3300, 4096, 0, STM32_AIN(6)},
- [ADC_SBU2] = {"SBU2", 3300, 4096, 0, STM32_AIN(7)},
-};
-BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
-
-
-
-/******************************************************************************
- * Support I2C bridging over USB.
- */
-
-/* I2C ports */
-const struct i2c_port_t i2c_ports[] = {
- {"master", I2C_PORT_MASTER, 100,
- GPIO_MASTER_I2C_SCL, GPIO_MASTER_I2C_SDA},
-};
-const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
-
-int usb_i2c_board_is_enabled(void) { return 1; }
-
-/******************************************************************************
- * Console commands.
- */
-
-/* State to indicate current GPIO config. */
-static int uart_state = UART_OFF;
-/* State to indicate current autodetect mode. */
-static int uart_detect = UART_DETECT_AUTO;
-
-const char *const uart_state_names[] = {
- [UART_OFF] = "off",
- [UART_ON_PP1800] = "on @ 1.8v",
- [UART_FLIP_PP1800] = "flip @ 1.8v",
- [UART_ON_PP3300] = "on @ 3.3v",
- [UART_FLIP_PP3300] = "flip @ 3.3v",
- [UART_AUTO] = "auto",
-};
-
-/* Set GPIOs to configure UART mode. */
-static void set_uart_gpios(int state)
-{
- int uart = GPIO_INPUT;
- int dir = 0;
- int voltage = 1; /* 1: 1.8v, 0: 3.3v */
- int enabled = 0;
-
- gpio_set_level(GPIO_ST_UART_LVL_DIS, 1);
-
- switch (state) {
- case UART_ON_PP1800:
- uart = GPIO_ALTERNATE;
- dir = 1;
- voltage = 1;
- enabled = 1;
- break;
-
- case UART_FLIP_PP1800:
- uart = GPIO_ALTERNATE;
- dir = 0;
- voltage = 1;
- enabled = 1;
- break;
-
- case UART_ON_PP3300:
- uart = GPIO_ALTERNATE;
- dir = 1;
- voltage = 0;
- enabled = 1;
- break;
-
- case UART_FLIP_PP3300:
- uart = GPIO_ALTERNATE;
- dir = 0;
- voltage = 0;
- enabled = 1;
- break;
-
- default:
- /* Default to UART_OFF. */
- uart = GPIO_INPUT;
- dir = 0;
- enabled = 0;
- }
-
- /* Set level shifter direction and voltage. */
- gpio_set_level(GPIO_ST_UART_VREF, voltage);
- gpio_set_level(GPIO_ST_UART_TX_DIR, dir);
- gpio_set_level(GPIO_ST_UART_TX_DIR_N, !dir);
-
- /* Enable STM pinmux */
- gpio_set_flags(GPIO_USART1_TX, uart);
- gpio_set_flags(GPIO_USART1_RX, uart);
-
- /* Flip uart orientation if necessary. */
- STM32_USART_CR1(STM32_USART1_BASE) &= ~(STM32_USART_CR1_UE);
- if (dir)
- STM32_USART_CR2(STM32_USART1_BASE) &= ~(STM32_USART_CR2_SWAP);
- else
- STM32_USART_CR2(STM32_USART1_BASE) |= (STM32_USART_CR2_SWAP);
- STM32_USART_CR1(STM32_USART1_BASE) |= STM32_USART_CR1_UE;
-
- /* Enable level shifter. */
- usleep(1000);
- gpio_set_level(GPIO_ST_UART_LVL_DIS, !enabled);
-}
-
-/*
- * Detect if a UART is plugged into SBU. Tigertail UART must be off
- * for this to return useful info.
- */
-static int is_low(int mv)
-{
- return (mv < 190);
-}
-
-static int is_3300(int mv)
-{
- return ((mv > 3000) && (mv < 3400));
-}
-
-static int is_1800(int mv)
-{
- return ((mv > 1600) && (mv < 1900));
-}
-
-static int detect_uart_orientation(void)
-{
- int sbu1 = adc_read_channel(ADC_SBU1);
- int sbu2 = adc_read_channel(ADC_SBU2);
- int state = UART_OFF;
-
- /*
- * Here we check if one or the other SBU is 1.8v, as DUT
- * TX should idle high.
- */
- if (is_low(sbu1) && is_1800(sbu2))
- state = UART_ON_PP1800;
- else if (is_low(sbu2) && is_1800(sbu1))
- state = UART_FLIP_PP1800;
- else if (is_low(sbu1) && is_3300(sbu2))
- state = UART_ON_PP3300;
- else if (is_low(sbu2) && is_3300(sbu1))
- state = UART_FLIP_PP3300;
- else
- state = UART_OFF;
-
- return state;
-}
-
-/*
- * Detect if UART has been unplugged. Normal UARTs should
- * have both lines idling high at 1.8v.
- */
-static int detect_uart_idle(void)
-{
- int sbu1 = adc_read_channel(ADC_SBU1);
- int sbu2 = adc_read_channel(ADC_SBU2);
- int enabled = 0;
-
- if (is_1800(sbu1) && is_1800(sbu2))
- enabled = 1;
-
- if (is_3300(sbu1) && is_3300(sbu2))
- enabled = 1;
-
- return enabled;
-}
-
-/* Set the UART state and gpios, and autodetect if necessary. */
-void set_uart_state(int state)
-{
- if (state == UART_AUTO) {
- set_uart_gpios(UART_OFF);
- msleep(10);
-
- uart_detect = UART_DETECT_AUTO;
- state = detect_uart_orientation();
- } else {
- uart_detect = UART_DETECT_OFF;
- }
-
- uart_state = state;
- set_uart_gpios(state);
-}
-
-/*
- * Autodetect UART state:
- * We will check every 250ms, and change state if 1 second has passed
- * in the new state.
- */
-void uart_sbu_tick(void)
-{
- static int debounce; /* = 0 */
-
- if (uart_detect != UART_DETECT_AUTO)
- return;
-
- if (uart_state == UART_OFF) {
- int state = detect_uart_orientation();
-
- if (state != UART_OFF) {
- debounce++;
- if (debounce > 4) {
- debounce = 0;
- CPRINTS("UART autoenable %s",
- uart_state_names[state]);
- uart_state = state;
- set_uart_gpios(state);
- }
- return;
- }
- } else {
- int enabled = detect_uart_idle();
-
- if (!enabled) {
- debounce++;
- if (debounce > 4) {
- debounce = 0;
- CPRINTS("UART autodisable");
- uart_state = UART_OFF;
- set_uart_gpios(UART_OFF);
- }
- return;
- }
- }
- debounce = 0;
-}
-DECLARE_HOOK(HOOK_TICK, uart_sbu_tick, HOOK_PRIO_DEFAULT);
-
-static int command_uart(int argc, char **argv)
-{
- const char *uart_state_str = "off";
- const char *uart_detect_str = "manual";
-
- if (argc > 1) {
- if (!strcasecmp("off", argv[1]))
- set_uart_state(UART_OFF);
- else if (!strcasecmp("on18", argv[1]))
- set_uart_state(UART_ON_PP1800);
- else if (!strcasecmp("on33", argv[1]))
- set_uart_state(UART_ON_PP3300);
- else if (!strcasecmp("flip18", argv[1]))
- set_uart_state(UART_FLIP_PP1800);
- else if (!strcasecmp("flip33", argv[1]))
- set_uart_state(UART_FLIP_PP3300);
- else if (!strcasecmp("auto", argv[1]))
- set_uart_state(UART_AUTO);
- else
- return EC_ERROR_PARAM1;
- }
-
- uart_state_str = uart_state_names[uart_state];
- if (uart_detect == UART_DETECT_AUTO)
- uart_detect_str = "auto";
- ccprintf("UART mux is: %s, setting: %s\n",
- uart_state_str, uart_detect_str);
-
- return EC_SUCCESS;
-}
-DECLARE_CONSOLE_COMMAND(uart, command_uart,
- "[off|on18|on33|flip18|flip33|auto]",
- "Set the sbu uart state\n"
- "WARNING: 3.3v may damage 1.8v devices.\n");
-
-static void set_led_a(int r, int g, int b)
-{
- /* LEDs are active low */
- gpio_set_level(GPIO_LED_R_L, !r);
- gpio_set_level(GPIO_LED_G_L, !g);
- gpio_set_level(GPIO_LED_B_L, !b);
-}
-
-static void set_led_b(int r, int g, int b)
-{
- gpio_set_level(GPIO_LED2_R_L, !r);
- gpio_set_level(GPIO_LED2_G_L, !g);
- gpio_set_level(GPIO_LED2_B_L, !b);
-}
-
-/* State we intend the mux GPIOs to be set. */
-static int mux_state = MUX_OFF;
-static int last_mux_state = MUX_OFF;
-
-/* Set the state variable and GPIO configs to mux as requested. */
-void set_mux_state(int state)
-{
- int enabled = (state == MUX_A) || (state == MUX_B);
- /* dir: 0 -> A, dir: 1 -> B */
- int dir = (state == MUX_B);
-
- if (mux_state != state)
- last_mux_state = mux_state;
-
- /* Disconnect first. */
- gpio_set_level(GPIO_USB_C_OE_N, 1);
- gpio_set_level(GPIO_SEL_RELAY_A, 0);
- gpio_set_level(GPIO_SEL_RELAY_B, 0);
-
- /* Let USB disconnect. */
- msleep(100);
-
- /* Reconnect VBUS/CC in the requested direction. */
- gpio_set_level(GPIO_SEL_RELAY_A, !dir && enabled);
- gpio_set_level(GPIO_SEL_RELAY_B, dir && enabled);
-
- /* Reconnect data. */
- msleep(10);
-
- gpio_set_level(GPIO_USB_C_SEL_B, dir);
- gpio_set_level(GPIO_USB_C_OE_N, !enabled);
-
- if (!enabled)
- mux_state = MUX_OFF;
- else
- mux_state = state;
-
- if (state == MUX_A)
- set_led_a(0, 1, 0);
- else
- set_led_a(1, 0, 0);
-
- if (state == MUX_B)
- set_led_b(0, 1, 0);
- else
- set_led_b(1, 0, 0);
-}
-
-
-/* On button press, toggle between mux A, B, off. */
-static int button_ready = 1;
-void button_interrupt_deferred(void)
-{
- switch (mux_state) {
- case MUX_OFF:
- if (last_mux_state == MUX_A)
- set_mux_state(MUX_B);
- else
- set_mux_state(MUX_A);
- break;
-
- case MUX_A:
- case MUX_B:
- default:
- set_mux_state(MUX_OFF);
- break;
- }
-
- button_ready = 1;
-}
-DECLARE_DEFERRED(button_interrupt_deferred);
-
-/* On button press, toggle between mux A, B, off. */
-void button_interrupt(enum gpio_signal signal)
-{
- if (!button_ready)
- return;
-
- button_ready = 0;
- /*
- * button_ready is not set until set_mux_state completes,
- * which has ~100ms settle time for the mux, which also
- * provides for debouncing.
- */
- hook_call_deferred(&button_interrupt_deferred_data, 0);
-}
-
-static int command_mux(int argc, char **argv)
-{
- char *mux_state_str = "off";
-
- if (argc > 1) {
- if (!strcasecmp("off", argv[1]))
- set_mux_state(MUX_OFF);
- else if (!strcasecmp("a", argv[1]))
- set_mux_state(MUX_A);
- else if (!strcasecmp("b", argv[1]))
- set_mux_state(MUX_B);
- else
- return EC_ERROR_PARAM1;
- }
-
- if (mux_state == MUX_A)
- mux_state_str = "A";
- if (mux_state == MUX_B)
- mux_state_str = "B";
- ccprintf("TYPE-C mux is %s\n", mux_state_str);
-
- return EC_SUCCESS;
-}
-DECLARE_CONSOLE_COMMAND(mux, command_mux,
- "[off|A|B]",
- "Get/set the mux and enable state of the TYPE-C mux");
-
-/******************************************************************************
- * Initialize board.
- */
-static void board_init(void)
-{
- /* USB to serial queues */
- queue_init(&usart1_to_usb);
- queue_init(&usb_to_usart1);
-
- /* UART init */
- usart_init(&usart1);
-
- /*
- * Default to port A, to allow easier charging and
- * detection of unconfigured devices.
- */
- set_mux_state(MUX_A);
-
- /* Note that we can't enable AUTO until after init. */
- set_uart_gpios(UART_OFF);
-
- /* Calibrate INA0 (VBUS) with 1mA/LSB scale */
- ina2xx_init(0, 0x8000, INA2XX_CALIB_1MA(15 /*mOhm*/));
- ina2xx_init(1, 0x8000, INA2XX_CALIB_1MA(15 /*mOhm*/));
- ina2xx_init(4, 0x8000, INA2XX_CALIB_1MA(15 /*mOhm*/));
-
- gpio_enable_interrupt(GPIO_BUTTON_L);
-}
-DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
diff --git a/board/tigertail/board.h b/board/tigertail/board.h
deleted file mode 100644
index 3b15c4c774..0000000000
--- a/board/tigertail/board.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright 2017 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.
- */
-
-/* Tigertail configuration */
-
-#ifndef __CROS_EC_BOARD_H
-#define __CROS_EC_BOARD_H
-
-/* 48 MHz SYSCLK clock frequency */
-#define CPU_CLOCK 48000000
-
-/* Enable USART1 USB streams */
-#define CONFIG_STREAM_USART
-#define CONFIG_STREAM_USART1
-#define CONFIG_STREAM_USB
-#define CONFIG_CMD_USART_INFO
-
-/* The UART console is on USART1 (PA9/PA10) */
-#undef CONFIG_UART_CONSOLE
-#define CONFIG_UART_CONSOLE 2
-#undef CONFIG_UART_TX_DMA
-#undef CONFIG_UART_RX_DMA
-
-/* Optional features */
-#define CONFIG_STM_HWTIMER32
-#define CONFIG_HW_CRC
-
-/* USB Configuration */
-#define CONFIG_USB
-#define CONFIG_USB_PID 0x5027
-#define CONFIG_USB_CONSOLE
-#define CONFIG_USB_UPDATE
-
-#undef CONFIG_USB_MAXPOWER_MA
-#define CONFIG_USB_MAXPOWER_MA 100
-
-#define CONFIG_USB_SERIALNO
-#define DEFAULT_SERIALNO "Uninitialized"
-
-/* USB interface indexes (use define rather than enum to expand them) */
-#define USB_IFACE_CONSOLE 0
-#define USB_IFACE_UPDATE 1
-#define USB_IFACE_USART1_STREAM 2
-#define USB_IFACE_I2C 3
-#define USB_IFACE_COUNT 4
-
-/* USB endpoint indexes (use define rather than enum to expand them) */
-#define USB_EP_CONTROL 0
-#define USB_EP_CONSOLE 1
-#define USB_EP_UPDATE 2
-#define USB_EP_USART1_STREAM 3
-#define USB_EP_I2C 4
-#define USB_EP_COUNT 5
-
-/* Enable console recasting of GPIO type. */
-#define CONFIG_CMD_GPIO_EXTENDED
-
-/* This is not actually an EC so disable some features. */
-#undef CONFIG_WATCHDOG_HELP
-#undef CONFIG_LID_SWITCH
-
-/* Enable control of I2C over USB */
-#define CONFIG_USB_I2C
-#define CONFIG_I2C
-#define CONFIG_I2C_CONTROLLER
-#define I2C_PORT_MASTER 0
-#define CONFIG_INA231
-
-/* Enable ADC */
-#define CONFIG_ADC
-
-/*
- * Allow dangerous commands all the time, since we don't have a write protect
- * switch.
- */
-#define CONFIG_SYSTEM_UNLOCKED
-
-
-#ifndef __ASSEMBLER__
-
-/* Timer selection */
-#define TIM_CLOCK32 2
-#define TIM_ADC 3
-
-
-
-#include "gpio_signal.h"
-
-/* USB string indexes */
-enum usb_strings {
- USB_STR_DESC = 0,
- USB_STR_VENDOR,
- USB_STR_PRODUCT,
- USB_STR_SERIALNO,
- USB_STR_VERSION,
- USB_STR_I2C_NAME,
- USB_STR_USART1_STREAM_NAME,
- USB_STR_CONSOLE_NAME,
- USB_STR_UPDATE_NAME,
-
- USB_STR_COUNT
-};
-
-/* ADC signal */
-enum adc_channel {
- ADC_SBU1 = 0,
- ADC_SBU2,
- /* Number of ADC channels */
- ADC_CH_COUNT
-};
-
-void set_uart_state(int state);
-
-enum uart_states {
- UART_OFF = 0,
- UART_ON_PP1800,
- UART_FLIP_PP1800,
- UART_ON_PP3300,
- UART_FLIP_PP3300,
- UART_AUTO,
-};
-
-enum uart_detect_states {
- UART_DETECT_OFF = 0,
- UART_DETECT_AUTO,
-};
-
-void set_mux_state(int state);
-enum mux_states {
- MUX_OFF = 0,
- MUX_A,
- MUX_B,
-};
-
-void button_interrupt(enum gpio_signal signal);
-
-#endif /* !__ASSEMBLER__ */
-#endif /* __CROS_EC_BOARD_H */
diff --git a/board/tigertail/build.mk b/board/tigertail/build.mk
deleted file mode 100644
index 9e7fae1c07..0000000000
--- a/board/tigertail/build.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- makefile -*-
-# Copyright 2017 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.
-#
-# Board specific files build
-
-# the IC is STmicro STM32F072CBU6
-CHIP:=stm32
-CHIP_FAMILY:=stm32f0
-CHIP_VARIANT:=stm32f07x
-
-board-y=board.o
diff --git a/board/tigertail/ec.tasklist b/board/tigertail/ec.tasklist
deleted file mode 100644
index afdb5dedc7..0000000000
--- a/board/tigertail/ec.tasklist
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Copyright 2017 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.
- */
-
-/**
- * See CONFIG_TASK_LIST in config.h for details.
- */
-#define CONFIG_TASK_LIST \
- TASK_ALWAYS(HOOKS, hook_task, NULL, VENTI_TASK_STACK_SIZE) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE)
diff --git a/board/tigertail/gpio.inc b/board/tigertail/gpio.inc
deleted file mode 100644
index 107d3b2a2e..0000000000
--- a/board/tigertail/gpio.inc
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- mode:c -*-
- *
- * Copyright 2017 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.
- */
-
-/* Interrupt enables. */
-GPIO_INT(BUTTON_L, PIN(C, 13), \
- GPIO_INT_RISING | GPIO_PULL_UP, button_interrupt)
-
-/* Outputs */
-GPIO(SEL_CC2_A, PIN(A, 14), GPIO_OUT_LOW)
-GPIO(SEL_VBUS_A, PIN(A, 15), GPIO_OUT_LOW)
-GPIO(SEL_CC2_B, PIN(B, 0), GPIO_OUT_LOW)
-GPIO(SEL_VBUS_B, PIN(B, 1), GPIO_OUT_LOW)
-GPIO(SEL_RELAY_A, PIN(B, 2), GPIO_OUT_LOW)
-GPIO(SEL_RELAY_B, PIN(B, 3), GPIO_OUT_LOW)
-GPIO(USB_C_SEL_B, PIN(B, 4), GPIO_OUT_LOW)
-GPIO(USB_C_OE_N, PIN(B, 5), GPIO_OUT_HIGH)
-
-GPIO(ST_UART_LVL_DIS, PIN(B, 10), GPIO_OUT_HIGH)
-GPIO(ST_UART_TX_DIR, PIN(B, 12), GPIO_OUT_HIGH)
-GPIO(ST_UART_TX_DIR_N, PIN(B, 15), GPIO_OUT_LOW)
-/* SBU_VSET, 1=1.8V, 0=3.3V */
-GPIO(ST_UART_VREF, PIN(B, 7), GPIO_OUT_HIGH)
-
-GPIO(LED2_G_L, PIN(A, 5), GPIO_OUT_HIGH)
-GPIO(LED2_B_L, PIN(A, 8), GPIO_OUT_HIGH)
-GPIO(LED2_R_L, PIN(A, 13), GPIO_OUT_LOW)
-
-GPIO(LED_G_L, PIN(B, 11), GPIO_OUT_HIGH)
-GPIO(LED_R_L, PIN(B, 13), GPIO_OUT_LOW)
-GPIO(LED_B_L, PIN(B, 14), GPIO_OUT_HIGH)
-
-/* Inputs */
-GPIO(USB_C_SBU1_DET, PIN(A, 6), GPIO_INPUT)
-GPIO(USB_C_SBU2_DET, PIN(A, 7), GPIO_INPUT)
-
-/* USART interface */
-GPIO(USART2_CTS, PIN(A, 0), GPIO_INPUT)
-GPIO(USART2_RTS, PIN(A, 1), GPIO_INPUT)
-GPIO(USART2_TX, PIN(A, 2), GPIO_INPUT)
-GPIO(USART2_RX, PIN(A, 3), GPIO_INPUT)
-GPIO(USART2_CK, PIN(A, 4), GPIO_INPUT)
-
-GPIO(USART1_TX, PIN(A, 9), GPIO_INPUT)
-GPIO(USART1_RX, PIN(A, 10), GPIO_INPUT)
-
-/* I2C pins should be configured as inputs until I2C module is */
-/* initialized. This will avoid driving the lines unintentionally.*/
-GPIO(MASTER_I2C_SCL, PIN(B, 8), GPIO_INPUT)
-GPIO(MASTER_I2C_SDA, PIN(B, 9), GPIO_INPUT)
-
-/* Unimplemented signals since we are not an EC */
-UNIMPLEMENTED(ENTERING_RW)
-UNIMPLEMENTED(WP_L)
-
-/* USART2: PA2/PA3 - Console UART */
-ALTERNATE(PIN_MASK(A, 0x000C), 1, MODULE_UART, 0)
-/* USART1: PA09/PA10 - AP/SBU UART */
-ALTERNATE(PIN_MASK(A, 0x0600), 1, MODULE_USART, 0)
-
-/* I2C MASTER:PB8/9 GPIO_ODR_HIGH */
-ALTERNATE(PIN_MASK(B, 0x0300), 1, MODULE_I2C, 0)