mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Previously each board.h and board.c contained an enum and an array for gpio definitons that had to be manually kept in sync, with no compiler assistance other than that their lengths matched. This change adds a single gpio.inc file that declares all gpio's that a board uses and is used as an X-macro include file to generate both the gpio_signal enum and the gpio_list array. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Change-Id: If9c9feca968619a59ff9f20701359bcb9374e4da Reviewed-on: https://chromium-review.googlesource.com/205354 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
79 lines
2.0 KiB
C
79 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.
|
|
*/
|
|
|
|
/* Big board configuration */
|
|
|
|
#ifndef __BOARD_H
|
|
#define __BOARD_H
|
|
|
|
/* Optional features */
|
|
#define CONFIG_AP_HANG_DETECT
|
|
#define CONFIG_BATTERY_SMART
|
|
#define CONFIG_BATTERY_CUT_OFF
|
|
#define CONFIG_CHARGER
|
|
#define CONFIG_CHARGER_V2
|
|
#define CONFIG_CHARGER_BQ24735
|
|
#define CONFIG_CHIPSET_TEGRA
|
|
#define CONFIG_POWER_COMMON
|
|
#define CONFIG_EXTPOWER_GPIO
|
|
#define CONFIG_HOST_COMMAND_STATUS
|
|
#define CONFIG_I2C
|
|
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
|
|
#define CONFIG_SPI
|
|
#define CONFIG_PWM
|
|
#define CONFIG_POWER_BUTTON
|
|
#define CONFIG_VBOOT_HASH
|
|
#define CONFIG_LED_COMMON
|
|
#define CONFIG_CHARGER_DISCHARGE_ON_AC
|
|
#undef CONFIG_CONSOLE_CMDHELP
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
/* Keyboard output port list */
|
|
#define KB_OUT_PORT_LIST GPIO_A, GPIO_B, GPIO_C
|
|
|
|
/* Single I2C port, where the EC is the master. */
|
|
#define I2C_PORT_MASTER 0
|
|
#define I2C_PORT_BATTERY I2C_PORT_MASTER
|
|
#define I2C_PORT_CHARGER I2C_PORT_MASTER
|
|
|
|
/* Timer selection */
|
|
#define TIM_CLOCK_MSB 3
|
|
#define TIM_CLOCK_LSB 9
|
|
#define TIM_POWER_LED 2
|
|
#define TIM_WATCHDOG 4
|
|
|
|
#include "gpio_signal.h"
|
|
|
|
enum power_signal {
|
|
TEGRA_XPSHOLD = 0,
|
|
TEGRA_SUSPEND_ASSERTED,
|
|
|
|
/* Number of power signals */
|
|
POWER_SIGNAL_COUNT
|
|
};
|
|
|
|
enum pwm_channel {
|
|
PWM_CH_POWER_LED = 0,
|
|
/* Number of PWM channels */
|
|
PWM_CH_COUNT
|
|
};
|
|
|
|
/* Charger module */
|
|
#define CONFIG_CHARGER_SENSE_RESISTOR 10 /* Charge sense resistor, mOhm */
|
|
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 /* Input sensor resistor, mOhm */
|
|
/* Input current limit for 45W AC adapter:
|
|
* 45W/19V*85%=2013mA, choose the closest charger setting = 2048mA
|
|
*/
|
|
#define CONFIG_CHARGER_INPUT_CURRENT 2048 /* mA, based on Link HW design */
|
|
#define CONFIG_CHARGER_CURRENT_LIMIT 3000 /* PL102 inductor 3.0A(3.8A) */
|
|
|
|
/* Discharge battery when on AC power for factory test. */
|
|
int board_discharge_on_ac(int enable);
|
|
|
|
#endif /* !__ASSEMBLER__ */
|
|
|
|
#endif /* __BOARD_H */
|