From dadbc645d10330e5584aa3f569add4c9f7e13a1f Mon Sep 17 00:00:00 2001 From: Jameson Thies Date: Thu, 7 Jul 2022 20:45:40 +0000 Subject: usb_ppc: Add Config to Remove CPRINTS from ppc_prints This CL adds a config which can be used to remove the CPRINTS call from ppc_prints and ppc_err_prints which will reduce EC image size. BRANCH=None BUG=b:238348526 TEST=make try_build_boards Signed-off-by: Jameson Thies Change-Id: I5ba2d92c3cd09c4fb1172194ac0c6e33d19044aa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3751769 Reviewed-by: Abe Levkoy --- zephyr/Kconfig.usbc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'zephyr/Kconfig.usbc') diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index cfee1172f4..1f5e0f2388 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -133,6 +133,16 @@ config PLATFORM_EC_CONSOLE_CMD_PPC_DUMP reference to the datasheet for the part this can help you figure out what is going on. +config PLATFORM_EC_USBC_PPC_LOGGING + bool "Enable PPC Related logging" + depends on PLATFORM_EC_USBC_PPC + default y + help + PPC drivers use two print functions for logging error messages + (ppc_prints and ppc_err_prints). Setting this config adds the + CPRINTS call to both of these function which will enable PPC + related logging but increase EC image size. + config PLATFORM_EC_USB_PD_TCPM_DRIVER_IT83XX bool "Enable IT83XX driver" depends on PLATFORM_EC_USB_PD_TCPM_ITE_ON_CHIP -- cgit v1.2.1 From a16876cb2bbdb426ccfac7bb69f5b9a76c76ac63 Mon Sep 17 00:00:00 2001 From: lschyi Date: Mon, 20 Jun 2022 14:27:38 +0800 Subject: zephyr: Allow project to config usb c power via Kconfig Make PD_OPERATING_POWER_MW, PD_MAX_POWER_MW, PD_MAX_CURRENT_MA, PD_MAX_VOLTAGE_MV, PD_POWER_SUPPLY_TURN_ON_DELAY, and PD_POWER_SUPPLY_TURN_OFF_DELAY configurable via Kconfig so that projects can update settings. BUG=b:235258222, b:236712633 TEST=make -j buildall BRANCH=none Change-Id: If9a648a4cbcdbbc7c30735bd1b1c673a38df5612 Signed-off-by: lschyi Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3711516 Reviewed-by: Eric Yilun Lin Commit-Queue: Sung-Chi Li Tested-by: Sung-Chi Li Reviewed-by: Keith Short --- zephyr/Kconfig.usbc | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'zephyr/Kconfig.usbc') diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 1f5e0f2388..1cb4088475 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -173,4 +173,55 @@ config PLATFORM_EC_USB_PD_ONLY_FIXED_PDOS Ignore all non-fixed PDOs received from a src_caps message. Enable this for boards (like servo_v4) which only support FIXED PDO types. +# Define power related settings here for now to allow projects to overwrite +# them. Ideally they would be defined in the devicetree. +config PLATFORM_EC_PD_OPERATING_POWER_MW + int "PD operating power in milliwatt" + default 15000 + help + Base configuration for PD power operating power value, which is used + in PD negotiation. The final PD parameter used in negotiation is + affected by PLATFORM_EC_PD_MAX_POWER_MW, + PLATFORM_EC_PD_MAX_CURRENT_MA, and PLATFORM_EC_PD_MAX_VOLTAGE_MV. + Increase this value is the system requires more than 15 watts to boot + without a battery. + +config PLATFORM_EC_PD_MAX_POWER_MW + int "PD maximum power in milliwatt" + default 60000 + help + The maximum PD negotiated power for the system. The value should match + with configured PLATFORM_EC_PD_MAX_CURRENT_MA and + PLATFORM_EC_PD_MAX_VOLTAGE_MV. + +config PLATFORM_EC_PD_MAX_CURRENT_MA + int "PD maximum current in milliampere" + default 3000 + help + The maximum PD negotiated current for the system. The value should + match with configured PLATFORM_EC_PD_MAX_POWER_MW and + PLATFORM_EC_PD_MAX_VOLTAGE_MV. + +config PLATFORM_EC_PD_MAX_VOLTAGE_MV + int "PD maximum voltage in millivolt" + default 20000 + help + The maximum PD negotiated voltage for the system. The value should + match with configured PLATFORM_EC_PD_MAX_POWER_MW and + PLATFORM_EC_PD_MAX_CURRENT_MA. + +config PLATFORM_EC_PD_POWER_SUPPLY_TURN_ON_DELAY + int "Power supply turn on delay in us" + default 30000 + help + Each platform could have different power sequencing and transition + timing for turning on the power on the PD port. + +config PLATFORM_EC_PD_POWER_SUPPLY_TURN_OFF_DELAY + int "Power supply turn off delay in us" + default 30000 + help + Each platform could have different power sequencing and transition + timing for turning off the power on the PD port. + endif # PLATFORM_EC_USBC -- cgit v1.2.1 From 3c0d6d04919b8454c4aa8d9af877d251200b6061 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 1 Aug 2022 07:08:11 +0100 Subject: zephyr: shim: add default to PLATFORM_EC_USB_PID All Kconfig symbols are added to the binary with the GEN_ABSOLUTE_SYM_KCONFIG. This is a problem with hex symbols with a default empty value, as they end up defined to "0x", causing an obscure build failure such as: FAILED: zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj /tmp/cc5ZD1EK.s: Assembler messages: /tmp/cc5ZD1EK.s:1345: Error: missing expression Setting a default for the option so that that would not break the build. BUG=none BRANCH=none TEST=drop the config for a board, build it, no assembler errors Signed-off-by: Fabio Baltieri Change-Id: Ib886cafdccf7d7da21b0fe90b03aa40cc55c2715 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3801901 Reviewed-by: Madhu P Reviewed-by: Scott Collyer --- zephyr/Kconfig.usbc | 1 + 1 file changed, 1 insertion(+) (limited to 'zephyr/Kconfig.usbc') diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 1cb4088475..c23de7c79c 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -56,6 +56,7 @@ config PLATFORM_EC_USBC_OCP config PLATFORM_EC_USB_PID hex "USB Product ID" + default 0 help Each platform (e.g. baseboard set) should have a single VID/PID combination. If there is a big enough change within a platform, -- cgit v1.2.1 From 71b2ef709dcb14260f5fdaa3ab4ced005a29fb46 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Sep 2022 14:54:36 -0400 Subject: Update license boilerplate text in source code files Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis Reviewed-by: Jack Rosenthal --- zephyr/Kconfig.usbc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zephyr/Kconfig.usbc') diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index c23de7c79c..37c57bcdd2 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium OS Authors. All rights reserved. +# Copyright 2020 The ChromiumOS Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -- cgit v1.2.1