<commit_before>/* Copyright 2019 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.
 */

/* Configuration for Kukui */

#ifndef __CROS_EC_BOARD_H
#define __CROS_EC_BOARD_H

#define VARIANT_KUKUI_BATTERY_SMART
#define VARIANT_KUKUI_CHARGER_MT6370
#define VARIANT_KUKUI_POGO_KEYBOARD
#define VARIANT_KUKUI_TABLET_PWRBTN

#ifndef SECTION_IS_RW
#define VARIANT_KUKUI_NO_SENSORS
#endif /* SECTION_IS_RW */

#include "baseboard.h"

#define CONFIG_VOLUME_BUTTONS

#define CONFIG_USB_MUX_IT5205

#define CONFIG_LED_ONOFF_STATES
#define CONFIG_LED_POWER_LED

#define CONFIG_BATTERY_HW_PRESENT_CUSTOM

#define CONFIG_I2C_BITBANG
#define I2C_BITBANG_PORT_COUNT 1
#undef CONFIG_I2C_NACK_RETRY_COUNT
#define CONFIG_I2C_NACK_RETRY_COUNT 3
#define CONFIG_SMBUS_PEC

/* free flash space */
#ifdef SECTION_IS_RO
#undef CONFIG_USB_PD_DEBUG_LEVEL
#define CONFIG_USB_PD_DEBUG_LEVEL 0
#endif

/* Battery */
#define BATTERY_DESIRED_CHARGING_CURRENT    2000  /* mA */

#define CONFIG_CHARGER_MT6370_BACKLIGHT
#define CONFIG_CHARGER_MAINTAIN_VBAT

/* Motion Sensors */
#ifdef SECTION_IS_RW
#define CONFIG_ACCELGYRO_LSM6DSM
#define CONFIG_ACCEL_INTERRUPTS
#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \
	TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL)

/* Camera VSYNC */
#define CONFIG_SYNC
#define CONFIG_SYNC_COMMAND
#define CONFIG_SYNC_INT_EVENT \
	TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC)
#endif /* SECTION_IS_RW */

/* I2C ports */
#define I2C_PORT_CHARGER  0
#define I2C_PORT_TCPC0    0
#define I2C_PORT_USB_MUX  0
#define I2C_PORT_ACCEL    1
#define I2C_PORT_BATTERY  board_get_battery_i2c()
#define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY

/* Define the host events which are allowed to wakeup AP in S3. */<commit_msg>Kodama: Set GPIO short names in RO<commit_after>/* Copyright 2019 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.
 */

/* Configuration for Kukui */

#ifndef __CROS_EC_BOARD_H
#define __CROS_EC_BOARD_H

#define VARIANT_KUKUI_BATTERY_SMART
#define VARIANT_KUKUI_CHARGER_MT6370
#define VARIANT_KUKUI_POGO_KEYBOARD
#define VARIANT_KUKUI_TABLET_PWRBTN

#ifndef SECTION_IS_RW
#define VARIANT_KUKUI_NO_SENSORS
#endif /* SECTION_IS_RW */

#include "baseboard.h"

#define CONFIG_VOLUME_BUTTONS

#define CONFIG_USB_MUX_IT5205

#define CONFIG_LED_ONOFF_STATES
#define CONFIG_LED_POWER_LED

#define CONFIG_BATTERY_HW_PRESENT_CUSTOM

#define CONFIG_I2C_BITBANG
#define I2C_BITBANG_PORT_COUNT 1
#undef CONFIG_I2C_NACK_RETRY_COUNT
#define CONFIG_I2C_NACK_RETRY_COUNT 3
#define CONFIG_SMBUS_PEC

/* free flash space */
#ifdef SECTION_IS_RO
#undef CONFIG_USB_PD_DEBUG_LEVEL
#define CONFIG_USB_PD_DEBUG_LEVEL 0
#define CONFIG_COMMON_GPIO_SHORTNAMES
#endif

/* Battery */
#define BATTERY_DESIRED_CHARGING_CURRENT    2000  /* mA */

#define CONFIG_CHARGER_MT6370_BACKLIGHT
#define CONFIG_CHARGER_MAINTAIN_VBAT

/* Motion Sensors */
#ifdef SECTION_IS_RW
#define CONFIG_ACCELGYRO_LSM6DSM
#define CONFIG_ACCEL_INTERRUPTS
#define CONFIG_ACCEL_LSM6DSM_INT_EVENT \
	TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL)

/* Camera VSYNC */
#define CONFIG_SYNC
#define CONFIG_SYNC_COMMAND
#define CONFIG_SYNC_INT_EVENT \
	TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC)
#endif /* SECTION_IS_RW */

/* I2C ports */
#define I2C_PORT_CHARGER  0
#define I2C_PORT_TCPC0    0
#define I2C_PORT_USB_MUX  0
#define I2C_PORT_ACCEL    1
#define I2C_PORT_BATTERY  board_get_battery_i2c()
#define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY

/* Define the host events which are allowed to wakeup AP in S3. */
{'fraction_non_alphanumeric': 0.05861407833470282, 'fraction_numerical': 0.024102985483429196, 'mean_word_length': 6.561076604554866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1263381', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1484, 'n_words': 304}