summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2021-10-14 15:06:29 +0800
committerCommit Bot <commit-bot@chromium.org>2021-10-14 10:24:12 +0000
commit522cf6888dbe5a4db59f0f9bde453c6e66c0d403 (patch)
tree4d06522c12422607186087f74943d4698cddbdc7 /baseboard
parentb37527429556f479c155b15a870b3e16862b91e4 (diff)
downloadchrome-ec-522cf6888dbe5a4db59f0f9bde453c6e66c0d403.tar.gz
corsola: remove references to asurada inside source code
- Remove IS_DEFINED(BOARD_XXX) and board_get_version() calls, assume the default board is Hayato rev 4+. - Remove dynamic g-sensor probing, default to icm426xx. BUG=b:202808130 TEST=1) make BOARD=krabby 2) zmake -D -l DEBUG configure -b zephyr/projects/corsola/krabby/ 3) `ag '(asurada|hayato)' -i` in the board folders shows no match BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I15e4dbb81970052e5b524c4aff9f51ff4c9d89c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3222519 Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/corsola/baseboard.c3
-rw-r--r--baseboard/corsola/baseboard.h2
-rw-r--r--baseboard/corsola/baseboard_common.h2
-rw-r--r--baseboard/corsola/board_chipset.c2
-rw-r--r--baseboard/corsola/hibernate.c16
-rw-r--r--baseboard/corsola/it5205_sbu.c68
-rw-r--r--baseboard/corsola/it5205_sbu.h13
-rw-r--r--baseboard/corsola/usb_pd_policy.c6
-rw-r--r--baseboard/corsola/usbc_config.c4
9 files changed, 10 insertions, 106 deletions
diff --git a/baseboard/corsola/baseboard.c b/baseboard/corsola/baseboard.c
index c89348a562..fb3294e554 100644
--- a/baseboard/corsola/baseboard.c
+++ b/baseboard/corsola/baseboard.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Asurada baseboard-specific configuration */
+/* Corsola baseboard-specific configuration */
#include "adc.h"
#include "button.h"
@@ -27,7 +27,6 @@
#include "gpio.h"
#include "hooks.h"
#include "i2c.h"
-#include "it5205_sbu.h"
#include "keyboard_scan.h"
#include "lid_switch.h"
#include "motion_sense.h"
diff --git a/baseboard/corsola/baseboard.h b/baseboard/corsola/baseboard.h
index f3c0808660..95d3b1d20c 100644
--- a/baseboard/corsola/baseboard.h
+++ b/baseboard/corsola/baseboard.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Asurada board configuration */
+/* Corsola board configuration */
#ifndef __CROS_EC_BASEBOARD_H
#define __CROS_EC_BASEBOARD_H
diff --git a/baseboard/corsola/baseboard_common.h b/baseboard/corsola/baseboard_common.h
index 0245ae42bf..c0328ba4e1 100644
--- a/baseboard/corsola/baseboard_common.h
+++ b/baseboard/corsola/baseboard_common.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Asurada baseboard-specific onfiguration common to ECOS and Zephyr */
+/* Corsola baseboard-specific onfiguration common to ECOS and Zephyr */
#ifndef __CROS_EC_BASEBOARD_COMMON_H
#define __CROS_EC_BASEBOARD_COMMON_H
diff --git a/baseboard/corsola/board_chipset.c b/baseboard/corsola/board_chipset.c
index 4d12fb0334..7e06a49792 100644
--- a/baseboard/corsola/board_chipset.c
+++ b/baseboard/corsola/board_chipset.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Asurada baseboard-chipset specific configuration */
+/* Corsola baseboard-chipset specific configuration */
#include "common.h"
#include "gpio.h"
diff --git a/baseboard/corsola/hibernate.c b/baseboard/corsola/hibernate.c
index b26bd44adc..4ff149069d 100644
--- a/baseboard/corsola/hibernate.c
+++ b/baseboard/corsola/hibernate.c
@@ -8,7 +8,7 @@
#include "gpio.h"
#include "system.h"
-/* Hayato board specific hibernate implementation */
+/* Corsola board specific hibernate implementation */
__override void board_hibernate_late(void)
{
/*
@@ -17,18 +17,8 @@ __override void board_hibernate_late(void)
*/
gpio_set_level(GPIO_EN_PP5000_A, 0);
- /*
- * GPIO_EN_SLP_Z not implemented in rev0/1,
- * fallback to usual hibernate process.
- */
- if (board_get_version() <= 1) {
- if (IS_ENABLED(BOARD_ASURADA) ||
- (IS_ENABLED(CONFIG_ZEPHYR) &&
- IS_ENABLED(CONFIG_BOARD_ASURADA)))
- return;
- }
-
- isl9238c_hibernate(CHARGER_SOLO);
+ if (IS_ENABLED(CONFIG_CHARGER_ISL9238C))
+ isl9238c_hibernate(CHARGER_SOLO);
gpio_set_level(GPIO_EN_SLP_Z, 1);
diff --git a/baseboard/corsola/it5205_sbu.c b/baseboard/corsola/it5205_sbu.c
deleted file mode 100644
index 61a996fcbe..0000000000
--- a/baseboard/corsola/it5205_sbu.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright 2021 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.
- *
- * IT5205 Type-C SBU OVP handler
- */
-
-#include "console.h"
-#include "hooks.h"
-#include "it5205.h"
-#include "stdbool.h"
-#include "timer.h"
-#include "usb_mux.h"
-
-#define CPRINTS(format, args...) cprints(CC_USB, format, ## args)
-#define CPRINTF(format, args...) cprintf(CC_USB, format, ## args)
-
-#define OVP_RETRY_DELAY_US_MIN (100 * MSEC)
-
-static unsigned int ovp_retry_delay_us = OVP_RETRY_DELAY_US_MIN;
-
-static void reset_retry_delay(void)
-{
- CPRINTS("IT5205 SBU OVP cleared");
- ovp_retry_delay_us = OVP_RETRY_DELAY_US_MIN;
-}
-DECLARE_DEFERRED(reset_retry_delay);
-
-static void reset_csbu(void)
-{
- /* double the retry time up to 1 minute */
- ovp_retry_delay_us = MIN(ovp_retry_delay_us * 2, MINUTE);
- /* and reset it if interrupt not triggered in a short period */
- hook_call_deferred(&reset_retry_delay_data, 500 * MSEC);
-
- /* re-enable sbu interrupt */
- it5205h_enable_csbu_switch(&usb_muxes[0], false);
- it5205h_enable_csbu_switch(&usb_muxes[0], true);
-}
-DECLARE_DEFERRED(reset_csbu);
-
-static void it5205h_hook_ac_change(void)
-{
- int reg;
-
- /* Check if the board has IT5205H, and read its ovp status */
- if (i2c_read8(I2C_PORT_USB_MUX0, IT5205H_SBU_I2C_ADDR_FLAGS,
- IT5205H_REG_ISR, &reg))
- return;
-
- /*
- * Re-poll ovp status immediately if AC detached, because ovp will
- * likely be recovered.
- *
- * Always perform the re-poll even when this hook is triggered by
- * unrelated events.
- */
- if (reg & IT5205H_ISR_CSBU_OVP)
- hook_call_deferred(&reset_csbu_data, 0);
-}
-DECLARE_HOOK(HOOK_AC_CHANGE, it5205h_hook_ac_change, HOOK_PRIO_DEFAULT);
-
-void it5205h_sbu_interrupt(enum gpio_signal signal)
-{
- CPRINTS("IT5205 SBU OVP triggered");
- hook_call_deferred(&reset_csbu_data, ovp_retry_delay_us);
- hook_call_deferred(&reset_retry_delay_data, -1);
-}
diff --git a/baseboard/corsola/it5205_sbu.h b/baseboard/corsola/it5205_sbu.h
deleted file mode 100644
index 43f226da3b..0000000000
--- a/baseboard/corsola/it5205_sbu.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Copyright 2021 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.
- *
- * IT5205 Type-C SBU OVP handler
- */
-
-#ifndef __CROS_EC_ASURADA_IT5205_SBU_H
-#define __CROS_EC_ASURADA_IT5205_SBU_H
-
-void it5205h_sbu_interrupt(enum gpio_signal signal);
-
-#endif /* __CROS_EC_ASURADA_IT5205_SBU_H */
diff --git a/baseboard/corsola/usb_pd_policy.c b/baseboard/corsola/usb_pd_policy.c
index 46373be5e8..4dca40e52c 100644
--- a/baseboard/corsola/usb_pd_policy.c
+++ b/baseboard/corsola/usb_pd_policy.c
@@ -14,7 +14,7 @@
#include "usbc_ppc.h"
#if CONFIG_USB_PD_3A_PORTS != 1
-#error Asurada reference must have at least one 3.0 A port
+#error Corsola reference must have at least one 3.0 A port
#endif
#define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args)
@@ -158,10 +158,6 @@ int pd_snk_is_vbus_provided(int port)
static int vbus_prev[CONFIG_USB_PD_PORT_MAX_COUNT];
int vbus;
- if ((IS_ENABLED(BOARD_HAYATO) && board_get_version() < 4) ||
- (IS_ENABLED(BOARD_SPHERION) && board_get_version() < 1))
- return ppc_is_vbus_present(port);
-
/*
* (b:181203590#comment20) TODO(yllin): use
* PD_VSINK_DISCONNECT_PD for non-5V case.
diff --git a/baseboard/corsola/usbc_config.c b/baseboard/corsola/usbc_config.c
index e552c97771..cdf7b2ae6a 100644
--- a/baseboard/corsola/usbc_config.c
+++ b/baseboard/corsola/usbc_config.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* Asurada baseboard-specific USB-C configuration */
+/* Corsola baseboard-specific USB-C configuration */
#include "adc.h"
#include "baseboard_common.h"
@@ -259,7 +259,7 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
void board_overcurrent_event(int port, int is_overcurrented)
{
- /* TODO: check correct operation for Asurada */
+ /* TODO: check correct operation for Corsola */
}
/* TCPC */