summaryrefslogtreecommitdiff
path: root/driver/tcpm/raa489000.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /driver/tcpm/raa489000.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-release-R102-14695.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'driver/tcpm/raa489000.h')
-rw-r--r--driver/tcpm/raa489000.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/driver/tcpm/raa489000.h b/driver/tcpm/raa489000.h
deleted file mode 100644
index 2a4c7c6b3d..0000000000
--- a/driver/tcpm/raa489000.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright 2020 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.
- *
- * TCPC driver for Renesas RAA489000 Buck-boost charger with TCPC
- */
-
-#include "compile_time_macros.h"
-#include "usb_pd_tcpm.h"
-
-#ifndef __CROS_EC_USB_PD_TCPM_RAA489000_H
-#define __CROS_EC_USB_PD_TCPM_RAA489000_H
-
-#define RAA489000_TCPC0_I2C_FLAGS 0x22
-#define RAA489000_TCPC1_I2C_FLAGS 0x23
-#define RAA489000_TCPC2_I2C_FLAGS 0x24
-#define RAA489000_TCPC3_I2C_FLAGS 0x25
-
-/* Vendor registers */
-#define RAA489000_TCPC_SETTING1 0x80
-#define RAA489000_VBUS_VOLTAGE_TARGET 0x90
-#define RAA489000_VBUS_CURRENT_TARGET 0x92
-#define RAA489000_VBUS_OCP_UV_THRESHOLD 0x94
-#define RAA489000_TYPEC_SETTING1 0xC0
-#define RAA489000_PD_PHYSICAL_SETTING1 0xE0
-#define RAA489000_PD_PHYSICAL_PARAMETER1 0xE8
-
-/* TCPC_SETTING_1 */
-#define RAA489000_TCPCV1_0_EN BIT(0)
-#define RAA489000_TCPC_PWR_CNTRL BIT(4)
-
-/* VBUS_CURRENT_TARGET */
-#define RAA489000_VBUS_CURRENT_TARGET_3A 0x66 /* 3.0A + iOvershoot */
-#define RAA489000_VBUS_CURRENT_TARGET_1_5A 0x38 /* 1.5A + iOvershoot */
-
-/* VBUS_VOLTAGE_TARGET */
-#define RAA489000_VBUS_VOLTAGE_TARGET_5160MV 0x102 /* 5.16V */
-#define RAA489000_VBUS_VOLTAGE_TARGET_5220MV 0x105 /* 5.22V */
-
-/* VBUS_OCP_UV_THRESHOLD */
-/* Detect voltage level of overcurrent protection during Sourcing VBUS */
-#define RAA489000_OCP_THRESHOLD_VALUE 0x00BE /* 4.75V */
-
-/* TYPEC_SETTING1 - only older silicon */
-/* Enables for reverse current protection */
-#define RAA489000_SETTING1_IP2_EN BIT(9)
-#define RAA489000_SETTING1_IP1_EN BIT(8)
-
-/* Switches from dead-battery Rd */
-#define RAA489000_SETTING1_RDOE BIT(7)
-
-/* CC comparator enables */
-#define RAA489000_SETTING1_CC2_CMP3_EN BIT(6)
-#define RAA489000_SETTING1_CC2_CMP2_EN BIT(5)
-#define RAA489000_SETTING1_CC2_CMP1_EN BIT(4)
-#define RAA489000_SETTING1_CC1_CMP3_EN BIT(3)
-#define RAA489000_SETTING1_CC1_CMP2_EN BIT(2)
-#define RAA489000_SETTING1_CC1_CMP1_EN BIT(1)
-
-/* CC debounce enable */
-#define RAA489000_SETTING1_CC_DB_EN BIT(0)
-
-/* PD_PHYSICAL_SETTING_1 */
-#define RAA489000_PD_PHY_SETTING1_RECEIVER_EN BIT(9)
-#define RAA489000_PD_PHY_SETTING1_SQUELCH_EN BIT(8)
-#define RAA489000_PD_PHY_SETTING1_TX_LDO11_EN BIT(0)
-
-/* PD_PHYSICAL_PARMETER_1 */
-#define PD_PHY_PARAM1_NOISE_FILTER_CNT_MASK (GENMASK(4, 0))
-
-/**
- *
- * Set output current limit on the TCPC. Note, this chip also offers an OTG
- * current level register in the charger i2c page but we must use the TCPC
- * current limit because the TCPC is controlling Vbus.
- *
- * @param port USB-C port number
- * @param rp Rp value for current limit (either 1.5A or 3A)
- *
- * @return Zero if the current limit set was successful, non-zero otherwise
- */
-int raa489000_set_output_current(int port, enum tcpc_rp_value rp);
-
-extern const struct tcpm_drv raa489000_tcpm_drv;
-
-#endif