diff options
Diffstat (limited to 'board/stm32f446e-eval')
-rw-r--r-- | board/stm32f446e-eval/board.c | 91 | ||||
-rw-r--r-- | board/stm32f446e-eval/board.h | 88 | ||||
-rw-r--r-- | board/stm32f446e-eval/build.mk | 12 | ||||
-rw-r--r-- | board/stm32f446e-eval/ec.tasklist | 11 | ||||
-rw-r--r-- | board/stm32f446e-eval/gpio.inc | 62 |
5 files changed, 0 insertions, 264 deletions
diff --git a/board/stm32f446e-eval/board.c b/board/stm32f446e-eval/board.c deleted file mode 100644 index fc796464e2..0000000000 --- a/board/stm32f446e-eval/board.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright 2016 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. - */ - -#include "common.h" -#include "dma.h" -#include "ec_version.h" -#include "gpio.h" -#include "gpio_list.h" -#include "hooks.h" -#include "i2c.h" -#include "registers.h" -#include "stm32-dma.h" -#include "usb_descriptor.h" -#include "usb_dwc_console.h" -#include "usb_hw.h" - -/****************************************************************************** - * 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("stm32f446-eval"), - [USB_STR_SERIALNO] = USB_STRING_DESC("1234-a"), - [USB_STR_VERSION] = USB_STRING_DESC(CROS_EC_VERSION32), - [USB_STR_CONSOLE_NAME] = USB_STRING_DESC("EC Shell"), -}; - -BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT); - -struct dwc_usb usb_ctl = { - .ep = { - &ep0_ctl, - &ep_console_ctl, - }, - .speed = USB_SPEED_FS, - .phy_type = USB_PHY_ULPI, - .dma_en = 1, - .irq = STM32_IRQ_OTG_HS, -}; - -/* I2C ports */ -const struct i2c_port_t i2c_ports[] = { - {"i2c1", I2C_PORT_0, 100, - GPIO_I2C1_SCL, GPIO_I2C1_SDA}, - {"fmpi2c4", FMPI2C_PORT_3, 100, - GPIO_FMPI2C_SCL, GPIO_FMPI2C_SDA}, -}; -const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); - -#define GPIO_SET_HS(bank, number) \ - (STM32_GPIO_OSPEEDR(GPIO_##bank) |= (0x3 << ((number) * 2))) - -void board_config_post_gpio_init(void) -{ - /* We use MCO2 clock passthrough to provide a clock to USB HS */ - gpio_config_module(MODULE_MCO, 1); - /* GPIO PC9 to high speed */ - GPIO_SET_HS(C, 9); - - /* Set USB GPIO to high speed */ - GPIO_SET_HS(A, 11); - GPIO_SET_HS(A, 12); - - GPIO_SET_HS(C, 3); - GPIO_SET_HS(C, 2); - GPIO_SET_HS(C, 0); - GPIO_SET_HS(A, 5); - - GPIO_SET_HS(B, 5); - GPIO_SET_HS(B, 13); - GPIO_SET_HS(B, 12); - GPIO_SET_HS(B, 2); - GPIO_SET_HS(B, 10); - GPIO_SET_HS(B, 1); - GPIO_SET_HS(B, 0); - GPIO_SET_HS(A, 3); - - /* Set I2C GPIO to HS */ - GPIO_SET_HS(B, 6); - GPIO_SET_HS(B, 7); - GPIO_SET_HS(F, 1); - GPIO_SET_HS(F, 0); - GPIO_SET_HS(A, 8); - GPIO_SET_HS(B, 4); - GPIO_SET_HS(C, 6); - GPIO_SET_HS(C, 7); -} - diff --git a/board/stm32f446e-eval/board.h b/board/stm32f446e-eval/board.h deleted file mode 100644 index aa498d6caa..0000000000 --- a/board/stm32f446e-eval/board.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright 2016 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. - */ - -/* STM32F446E-Eval board configuration */ - -#ifndef __CROS_EC_BOARD_H -#define __CROS_EC_BOARD_H - -/* Use external clock */ -#define CONFIG_STM32_CLOCK_HSE_HZ 8000000 - -#define CONFIG_BOARD_POST_GPIO_INIT - -#define CONFIG_FLASH_WRITE_SIZE STM32_FLASH_WRITE_SIZE_3300 - -/* Enable console recasting of GPIO type. */ -#define CONFIG_CMD_GPIO_EXTENDED - -/* The UART console is on USART1 (PA9/PA10) */ -#undef CONFIG_UART_CONSOLE -#define CONFIG_UART_CONSOLE 1 -#undef CONFIG_UART_TX_BUF_SIZE -#define CONFIG_UART_TX_BUF_SIZE 4096 -#define CONFIG_UART_TX_REQ_CH 4 -#define CONFIG_UART_RX_REQ_CH 4 - -#define CONFIG_I2C -#define CONFIG_I2C_CONTROLLER -#define I2C_PORT_0 0 -#define FMPI2C_PORT_3 3 - -/* USB Configuration */ -#define CONFIG_USB -#define CONFIG_USB_PID 0x500f -#define CONFIG_USB_CONSOLE - -#define CONFIG_USB_SELF_POWERED - -#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_COUNT 1 - -/* USB endpoint indexes (use define rather than enum to expand them) */ -#define USB_EP_CONTROL 0 -#define USB_EP_CONSOLE 1 -#define USB_EP_COUNT 2 - -/* This is not actually an EC so disable some features. */ -#undef CONFIG_WATCHDOG_HELP -#undef CONFIG_LID_SWITCH -#undef CONFIG_WATCHDOG - -/* Optional features */ -#define CONFIG_STM_HWTIMER32 -#define CONFIG_DMA_HELP -#define CONFIG_FLASH_CROS - -/* - * 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 5 - -#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_CONSOLE_NAME, - USB_STR_COUNT -}; - -#endif /* !__ASSEMBLER__ */ -#endif /* __CROS_EC_BOARD_H */ diff --git a/board/stm32f446e-eval/build.mk b/board/stm32f446e-eval/build.mk deleted file mode 100644 index 6b06f2bb8f..0000000000 --- a/board/stm32f446e-eval/build.mk +++ /dev/null @@ -1,12 +0,0 @@ -# -*- makefile -*- -# Copyright 2016 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 - -CHIP:=stm32 -CHIP_FAMILY:=stm32f4 -CHIP_VARIANT:=stm32f446 - -board-y=board.o diff --git a/board/stm32f446e-eval/ec.tasklist b/board/stm32f446e-eval/ec.tasklist deleted file mode 100644 index 2a1ffbf652..0000000000 --- a/board/stm32f446e-eval/ec.tasklist +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright 2016 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, TASK_STACK_SIZE) \ - TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) diff --git a/board/stm32f446e-eval/gpio.inc b/board/stm32f446e-eval/gpio.inc deleted file mode 100644 index afc8d1e486..0000000000 --- a/board/stm32f446e-eval/gpio.inc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- mode:c -*- - * - * Copyright 2016 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. */ - -/* Outputs */ -GPIO(PD11, PIN(D, 11), GPIO_OUT_HIGH) - -GPIO(I2C1_SCL, PIN(B, 8), GPIO_INPUT) -GPIO(I2C1_SDA, PIN(B, 9), GPIO_INPUT) -GPIO(FMPI2C_SCL, PIN(C, 6), GPIO_INPUT) -GPIO(FMPI2C_SDA, PIN(C, 7), GPIO_INPUT) - -/* USART3 TX/RX */ -GPIO(MCU_UART1_TX, PIN(A, 9), GPIO_INPUT) -GPIO(MCU_UART1_RX, PIN(A, 10), GPIO_INPUT) -GPIO(MCU_UART3_TX, PIN(C, 10), GPIO_INPUT) -GPIO(MCU_UART3_RX, PIN(C, 11), GPIO_INPUT) - -GPIO(USB_FS_DM, PIN(A, 11), GPIO_INPUT) -GPIO(USB_FS_DP, PIN(A, 12), GPIO_INPUT) - - -GPIO(USB_HS_ULPI_NXT, PIN(C, 3), GPIO_INPUT) -GPIO(USB_HS_ULPI_DIR, PIN(C, 2), GPIO_INPUT) -GPIO(USB_HS_ULPI_STP, PIN(C, 0), GPIO_INPUT) -GPIO(USB_HS_ULPI_CK, PIN(A, 5), GPIO_INPUT) - -GPIO(USB_HS_ULPI_D7, PIN(B, 5), GPIO_INPUT) -GPIO(USB_HS_ULPI_D6, PIN(B,13), GPIO_INPUT) -GPIO(USB_HS_ULPI_D5, PIN(B,12), GPIO_INPUT) -GPIO(USB_HS_ULPI_D4, PIN(B, 2), GPIO_INPUT) -GPIO(USB_HS_ULPI_D3, PIN(B,10), GPIO_INPUT) -GPIO(USB_HS_ULPI_D2, PIN(B, 1), GPIO_INPUT) -GPIO(USB_HS_ULPI_D1, PIN(B, 0), GPIO_INPUT) -GPIO(USB_HS_ULPI_D0, PIN(A, 3), GPIO_INPUT) - - - -/* Unimplemented signals since this is a dev board */ -UNIMPLEMENTED(ENTERING_RW) -UNIMPLEMENTED(WP_L) - -ALTERNATE(PIN_MASK(A, 0x0600), 7, MODULE_UART, 0) /* USART1: PA9/PA10 - Console */ -ALTERNATE(PIN_MASK(C, 0x0C00), 7, MODULE_USART, 0) /* USART3: PC10/PC11 - NOT Console */ -ALTERNATE(PIN_MASK(A, 0x0100), 0, MODULE_MCO, 0) /* MCO1: PA8 */ -ALTERNATE(PIN_MASK(C, 0x0200), 0, MODULE_MCO, 0) /* MCO2: PC9 */ - -ALTERNATE(PIN_MASK(B, 0x0300), 4, MODULE_I2C, GPIO_ODR_HIGH | GPIO_PULL_UP) /* I2C1: PB8-9 */ -ALTERNATE(PIN_MASK(D, 0x3000), 4, MODULE_I2C, GPIO_ODR_HIGH | GPIO_PULL_UP) /* FMPI2C MASTER:PD12/13 */ - -ALTERNATE(PIN_MASK(A, 0x1800), 10, MODULE_USB, 0) /* DWC USB OTG: PA11/12 */ - -/* OTG HS */ -ALTERNATE(PIN_MASK(A, 0x0028), 10, MODULE_USB, 0) /* DWC USB OTG HS */ -ALTERNATE(PIN_MASK(B, 0x3427), 10, MODULE_USB, 0) /* DWC USB OTG HS */ -ALTERNATE(PIN_MASK(C, 0x000d), 10, MODULE_USB, 0) /* DWC USB OTG HS */ |