summaryrefslogtreecommitdiff
path: root/zephyr/projects/nissa/it8xxx2_program.conf
blob: 3272c04209d04e14152c640687ca7faeddc1dbef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

CONFIG_CROS_FLASH_IT8XXX2=y
CONFIG_CROS_SYSTEM_IT8XXX2=y
CONFIG_ESPI_IT8XXX2=y
CONFIG_FPU=y
# rv32iafc/ilp32f is not supported by the toolchain, so use soft-float
CONFIG_FLOAT_HARD=n

# EC performance is bad; limiting sensor data rate helps keep it from degrading
# so much that it causes problems. b/240485526, b/230818312
CONFIG_PLATFORM_EC_MAX_SENSOR_FREQ_MILLIHZ=100000

# Allow more time for the charger to stabilise
CONFIG_PLATFORM_EC_POWER_BUTTON_INIT_TIMEOUT=5

# ITE has more space, so don't restrict shell
CONFIG_SHELL_MINIMAL=n

# RAM savings, since this chip is tight on available RAM.
# It's useful to store a lot of logs for the host to request, but the default 4k
# is pretty large.
CONFIG_PLATFORM_EC_HOSTCMD_CONSOLE_BUF_SIZE=2048
# Our threads have short names, save 20 bytes per thread
CONFIG_THREAD_MAX_NAME_LEN=12
# Task stacks, tuned by experiment. Most expanded to prevent overflow, and a few
# shrunk to save RAM.
CONFIG_AP_PWRSEQ_STACK_SIZE=1408
CONFIG_TASK_HOSTCMD_STACK_SIZE=1280
CONFIG_TASK_MOTIONSENSE_STACK_SIZE=1280
CONFIG_TASK_PD_INT_STACK_SIZE=1280

# TCPC+PPC: ITE on-chip for C0, PS8745 for optional C1
CONFIG_PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP=y
CONFIG_PLATFORM_EC_USB_PD_TCPM_DRIVER_IT8XXX2=y
CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8745=y
CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_CHARGER=y
# SM5803 controls power path on both ports
CONFIG_PLATFORM_EC_USB_PD_5V_CHARGER_CTRL=y
# SM5803 can discharge VBUS, but not via one of the available options;
# pd_power_supply_reset() does discharge.
CONFIG_PLATFORM_EC_USB_PD_DISCHARGE=n
# The EC is put into programming mode while firmware is running
# (after releasing reset) and PD after being reset will hard-reset
# the port if a contract was already set up. If the system has no
# battery, this will prevent programming because it will brown out
# the system and reset. Inserting a delay gives the programmer more
# time to put the EC into programming mode.
CONFIG_PLATFORM_EC_USB_PD_STARTUP_DELAY_MS=2000

# Charger driver and configuration
CONFIG_PLATFORM_EC_OCPC=y
CONFIG_PLATFORM_EC_CHARGER_SM5803=y
CONFIG_PLATFORM_EC_OCPC_DEF_RBATT_MOHMS=21
CONFIG_PLATFORM_EC_PD_MAX_VOLTAGE_MV=15000

# VSENSE: PP3300_S5 & PP1050_PROC
CONFIG_VCMP_IT8XXX2=y
CONFIG_SENSOR=y
CONFIG_SENSOR_SHELL=n