summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-04-16 08:35:55 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-02 16:49:12 +0000
commit6c499c93cd60ea231f11d8013c2de5a480c9b95d (patch)
tree150b0b855ab609025409f78419f18757fb611d15
parent13b555dc635e8bb756974b12865a58b8c5d95154 (diff)
downloadchrome-ec-6c499c93cd60ea231f11d8013c2de5a480c9b95d.tar.gz
ryu: remove Proto 4 support
Remove all Ryu Proto 4 specific support to make space for Proto 6 configuration : support for both D12 and B8 as PMIC_THERM_L GPIO, old SuperSpeed mux config. People with P4/P5 boards can use the ryu_p4p5 board support instead. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:38333 TEST=make buildall Change-Id: I0c5ab5e098d0e4828bee8f576461cd75bbb7b422 Reviewed-on: https://chromium-review.googlesource.com/266020 Reviewed-by: Alec Berg <alecaberg@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/ryu/board.c67
-rw-r--r--board/ryu/board.h4
-rw-r--r--board/ryu/gpio.inc7
3 files changed, 1 insertions, 77 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c
index 976c546de2..92c7558c55 100644
--- a/board/ryu/board.c
+++ b/board/ryu/board.c
@@ -372,48 +372,8 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
-/* TODO(crosbug.com/p/38333) remove me */
-#define GPIO_USBC_SS1_USB_MODE_L GPIO_USBC_MUX_CONF0
-#define GPIO_USBC_SS2_USB_MODE_L GPIO_USBC_MUX_CONF1
-#define GPIO_USBC_SS_EN_L GPIO_USBC_MUX_CONF2
-
-void p4_board_set_usb_mux(int port, enum typec_mux mux, int polarity)
-{
- /* reset everything */
- gpio_set_level(GPIO_USBC_SS_EN_L, 1);
- gpio_set_level(GPIO_USBC_DP_MODE_L, 1);
- gpio_set_level(GPIO_USBC_DP_POLARITY, 1);
- gpio_set_level(GPIO_USBC_SS1_USB_MODE_L, 1);
- gpio_set_level(GPIO_USBC_SS2_USB_MODE_L, 1);
-
- if (mux == TYPEC_MUX_NONE)
- /* everything is already disabled, we can return */
- return;
-
- if (mux == TYPEC_MUX_USB || mux == TYPEC_MUX_DOCK) {
- /* USB 3.0 uses 2 superspeed lanes */
- gpio_set_level(polarity ? GPIO_USBC_SS2_USB_MODE_L :
- GPIO_USBC_SS1_USB_MODE_L, 0);
- }
-
- if (mux == TYPEC_MUX_DP || mux == TYPEC_MUX_DOCK) {
- /* DP uses available superspeed lanes (x2 or x4) */
- gpio_set_level(GPIO_USBC_DP_POLARITY, polarity);
- gpio_set_level(GPIO_USBC_DP_MODE_L, 0);
- }
- /* switch on superspeed lanes */
- gpio_set_level(GPIO_USBC_SS_EN_L, 0);
-}
-
void board_set_usb_mux(int port, enum typec_mux mux, int polarity)
{
- if (board_get_version() < 5) {
- /* P4/EVT or older boards */
- /* TODO(crosbug.com/p/38333) remove this */
- p4_board_set_usb_mux(port, mux, polarity);
- return;
- }
-
/* reset everything */
gpio_set_level(GPIO_USBC_MUX_CONF0, 0);
gpio_set_level(GPIO_USBC_MUX_CONF1, 0);
@@ -434,37 +394,10 @@ void board_set_usb_mux(int port, enum typec_mux mux, int polarity)
gpio_set_level(GPIO_USBC_MUX_CONF1, 1);
}
-int p4_board_get_usb_mux(int port, const char **dp_str, const char **usb_str)
-{
- int has_ss = !gpio_get_level(GPIO_USBC_SS_EN_L);
- int has_usb = !gpio_get_level(GPIO_USBC_SS1_USB_MODE_L) ||
- !gpio_get_level(GPIO_USBC_SS2_USB_MODE_L);
- int has_dp = !gpio_get_level(GPIO_USBC_DP_MODE_L);
-
- if (has_dp)
- *dp_str = gpio_get_level(GPIO_USBC_DP_POLARITY) ? "DP2" : "DP1";
- else
- *dp_str = NULL;
-
- if (has_usb)
- *usb_str = gpio_get_level(GPIO_USBC_SS1_USB_MODE_L) ?
- "USB2" : "USB1";
- else
- *usb_str = NULL;
-
- return has_ss;
-}
-
int board_get_usb_mux(int port, const char **dp_str, const char **usb_str)
{
int has_usb, has_dp, polarity;
- if (board_get_version() < 5) {
- /* P4/EVT or older boards */
- /* TODO(crosbug.com/p/38333) remove this */
- return p4_board_get_usb_mux(port, dp_str, usb_str);
- }
-
has_usb = gpio_get_level(GPIO_USBC_MUX_CONF2);
has_dp = gpio_get_level(GPIO_USBC_MUX_CONF1);
polarity = gpio_get_level(GPIO_USBC_MUX_CONF0);
diff --git a/board/ryu/board.h b/board/ryu/board.h
index 6ded87e243..0b9cf98a88 100644
--- a/board/ryu/board.h
+++ b/board/ryu/board.h
@@ -135,10 +135,6 @@ int board_get_version(void);
#include "gpio_signal.h"
-/* PMIC_THERM_L selection at runtime depending on board version */
-#define GPIO_PMIC_THERM_L (board_get_version() >= 5 ? GPIO_P5_PMIC_THERM_L : \
- GPIO_P4_PMIC_THERM_L)
-
enum power_signal {
TEGRA_XPSHOLD = 0,
TEGRA_SUSPEND_ASSERTED,
diff --git a/board/ryu/gpio.inc b/board/ryu/gpio.inc
index 890c64390d..5d5a3011f3 100644
--- a/board/ryu/gpio.inc
+++ b/board/ryu/gpio.inc
@@ -53,9 +53,7 @@ GPIO(EN_PP5000, A, 14, GPIO_OUT_LOW) /* Proto 5+ */
*/
GPIO(EN_PP3300_RSVD, E, 13, GPIO_OUT_LOW)
/* sensor temp output and PMIC reset input */
-GPIO(P5_PMIC_THERM_L, B, 8, GPIO_ODR_HIGH)
-/* TODO(crosbug.com/p/38333) remove P4_PMIC_THERM_L */
-GPIO(P4_PMIC_THERM_L, D, 12, GPIO_ODR_HIGH)
+GPIO(PMIC_THERM_L, B, 8, GPIO_ODR_HIGH)
GPIO(VBUS_SENSE, A, 0, GPIO_ANALOG)
GPIO(CHGR_IADP, B, 0, GPIO_ANALOG)
@@ -78,9 +76,6 @@ GPIO(USBC_CC2_DEVICE_ODL, E, 14, GPIO_ODR_LOW)
GPIO(USBC_MUX_CONF0, D, 3, GPIO_OUT_LOW)
GPIO(USBC_MUX_CONF1, D, 9, GPIO_OUT_LOW)
GPIO(USBC_MUX_CONF2, E, 0, GPIO_OUT_LOW)
-/* TODO(crosbug.com/p/38333) remove USBC_DP_xxx GPIOs */
-GPIO(USBC_DP_MODE_L, D, 1, GPIO_OUT_HIGH)
-GPIO(USBC_DP_POLARITY, D, 2, GPIO_OUT_HIGH)
/* Inputs */
GPIO(BOARD_ID0, E, 11, GPIO_INPUT)