mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-03 21:49:32 +00:00
This CL includes:
1. Add CHIP_FAMILY_NPCX5/7 and CHIP_VARIANT_NPCX7M6F to distinguish
which npcx's ec is used on the board.
2. Add config_chip-npcx5/7.h files and move features depend on chip
family into them.
3. Add NPCX_INT_FLASH_SUPPORT, NPCX_PSL_MODE_SUPPORT and
NPCX_EXT32K_OSC_SUPPORT to determine which features are supported on
npcx7 ec. We'll use them later in gpio/system/flash drivers.
4. Add ram size checking for all npcx ec series.
BRANCH=none
BUG=none
TEST=No build errors for all boards using npcx5 series (besides gru).
Build poppy board and upload FW to platform. No issues found.
Change-Id: Ia932996d01da71fea73ddd545255bdd59e581bcf
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/481560
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
75 lines
2.0 KiB
C
75 lines
2.0 KiB
C
/* Copyright (c) 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.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_CONFIG_CHIP_H
|
|
#define __CROS_EC_CONFIG_CHIP_H
|
|
|
|
/* CPU core BFD configuration */
|
|
#include "core/cortex-m/config_core.h"
|
|
|
|
/* Features depend on chip family */
|
|
#if defined(CHIP_FAMILY_NPCX5)
|
|
#include "config_chip-npcx5.h"
|
|
#elif defined(CHIP_FAMILY_NPCX7)
|
|
#include "config_chip-npcx7.h"
|
|
#else
|
|
#error "Unsupported chip family"
|
|
#endif
|
|
|
|
/* 32k hz internal oscillator frequency (FRCLK) */
|
|
#define INT_32K_CLOCK 32768
|
|
|
|
/* Number of IRQ vectors on the NVIC */
|
|
#define CONFIG_IRQ_COUNT 64
|
|
|
|
/* Use a bigger console output buffer */
|
|
#undef CONFIG_UART_TX_BUF_SIZE
|
|
#define CONFIG_UART_TX_BUF_SIZE 1024
|
|
|
|
/*
|
|
* Interval between HOOK_TICK notifications
|
|
* Notice instant wake-up from deep-idle cannot exceed 200 ms
|
|
*/
|
|
#define HOOK_TICK_INTERVAL_MS 200
|
|
#define HOOK_TICK_INTERVAL (HOOK_TICK_INTERVAL_MS * MSEC)
|
|
|
|
/* System stack size */
|
|
#define CONFIG_STACK_SIZE 1024
|
|
|
|
/* non-standard task stack sizes */
|
|
#define IDLE_TASK_STACK_SIZE 512
|
|
#define LARGER_TASK_STACK_SIZE 640
|
|
#define VENTI_TASK_STACK_SIZE 768
|
|
|
|
#define CHARGER_TASK_STACK_SIZE 640
|
|
#define HOOKS_TASK_STACK_SIZE 640
|
|
#define CONSOLE_TASK_STACK_SIZE 640
|
|
|
|
/* Default task stack size */
|
|
#define TASK_STACK_SIZE 512
|
|
|
|
/* Address of RAM log used by Booter */
|
|
#define ADDR_BOOT_RAMLOG 0x100C7FC0
|
|
|
|
/* SPI Flash Spec of W25Q20CV */
|
|
#define CONFIG_FLASH_BANK_SIZE 0x00001000 /* protect bank size 4K bytes */
|
|
#define CONFIG_FLASH_ERASE_SIZE 0x00001000 /* sector erase size 4K bytes */
|
|
#define CONFIG_FLASH_WRITE_SIZE 0x00000001 /* minimum write size */
|
|
|
|
#define CONFIG_FLASH_WRITE_IDEAL_SIZE 256 /* one page size for write */
|
|
|
|
#include "config_flash_layout.h"
|
|
|
|
/* Optional features present on this chip */
|
|
#define CONFIG_ADC
|
|
#define CONFIG_PECI
|
|
#define CONFIG_SWITCH
|
|
#define CONFIG_MPU
|
|
|
|
#define GPIO_PIN(port, index) GPIO_##port, (1 << index)
|
|
#define GPIO_PIN_MASK(port, mask) GPIO_##port, (mask)
|
|
|
|
#endif /* __CROS_EC_CONFIG_CHIP_H */
|