diff options
author | Edward Hill <ecgh@chromium.org> | 2020-04-15 11:57:53 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-15 21:47:39 +0000 |
commit | 3969b0c1fb8a169ca2cceaf77958c7f1668f1a55 (patch) | |
tree | f3648f4b6e31f9adc7cca22edd33474cabf9b795 | |
parent | 3ef3d621aa82cf1092c4f4f995bf4b604932ae0a (diff) | |
download | chrome-ec-3969b0c1fb8a169ca2cceaf77958c7f1668f1a55.tar.gz |
Zork: move PI3DPX1207 config out of baseboard
PI3DPX1207 config needs to be board specific.
BUG=b:144227077
BRANCH=none
TEST=none
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ib2760f3786dabb5a14baab546d6320792e2d2e3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2150557
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | baseboard/zork/baseboard.h | 1 | ||||
-rw-r--r-- | baseboard/zork/variant_trembyle.c | 20 | ||||
-rw-r--r-- | board/morphius/board.c | 18 | ||||
-rw-r--r-- | board/morphius/board.h | 8 | ||||
-rw-r--r-- | board/trembyle/board.c | 18 | ||||
-rw-r--r-- | board/trembyle/board.h | 1 |
6 files changed, 41 insertions, 25 deletions
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h index e8bf12fdf4..be0040e518 100644 --- a/baseboard/zork/baseboard.h +++ b/baseboard/zork/baseboard.h @@ -163,7 +163,6 @@ #if defined(VARIANT_ZORK_TREMBYLE) #define CONFIG_USB_MUX_RUNTIME_CONFIG - #define CONFIG_USBC_RETIMER_PI3DPX1207 #define CONFIG_USBC_RETIMER_PS8802 #define CONFIG_USBC_RETIMER_PS8818 #define CONFIG_IO_EXPANDER_PORT_COUNT USBC_PORT_COUNT diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c index c58b9bbeee..0d131db677 100644 --- a/baseboard/zork/variant_trembyle.c +++ b/baseboard/zork/variant_trembyle.c @@ -6,7 +6,6 @@ #include "chipset.h" #include "common.h" #include "console.h" -#include "driver/retimer/pi3dpx1207.h" #include "driver/retimer/ps8802.h" #include "driver/retimer/ps8818.h" #include "driver/retimer/tusb544.h" @@ -284,25 +283,6 @@ static int board_ps8818_mux_set(const struct usb_mux *me, return rv; } -const struct pi3dpx1207_usb_control pi3dpx1207_controls[] = { - [USBC_PORT_C0] = { -#ifdef VARIANT_ZORK_TREMBYLE - .enable_gpio = IOEX_USB_C0_DATA_EN, - .dp_enable_gpio = GPIO_USB_C0_IN_HPD, -#endif - }, - [USBC_PORT_C1] = { - }, -}; -BUILD_ASSERT(ARRAY_SIZE(pi3dpx1207_controls) == USBC_PORT_COUNT); - -const struct usb_mux usbc0_pi3dpx1207_usb_retimer = { - .usb_port = USBC_PORT_C0, - .i2c_port = I2C_PORT_TCPC0, - .i2c_addr_flags = PI3DPX1207_I2C_ADDR_FLAGS, - .driver = &pi3dpx1207_usb_retimer, -}; - const struct usb_mux usbc1_ps8802 = { .usb_port = USBC_PORT_C1, .i2c_port = I2C_PORT_TCPC1, diff --git a/board/morphius/board.c b/board/morphius/board.c index a8eed89e5e..ef9fb58a63 100644 --- a/board/morphius/board.c +++ b/board/morphius/board.c @@ -10,6 +10,7 @@ #include "driver/accelgyro_bmi160.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/retimer/pi3dpx1207.h" #include "driver/usb_mux/amd_fp5.h" #include "extpower.h" #include "gpio.h" @@ -237,6 +238,23 @@ static void probe_setup_mux_backup(void) } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, probe_setup_mux_backup, HOOK_PRIO_DEFAULT); +const struct pi3dpx1207_usb_control pi3dpx1207_controls[] = { + [USBC_PORT_C0] = { + .enable_gpio = IOEX_USB_C0_DATA_EN, + .dp_enable_gpio = GPIO_USB_C0_IN_HPD, + }, + [USBC_PORT_C1] = { + }, +}; +BUILD_ASSERT(ARRAY_SIZE(pi3dpx1207_controls) == USBC_PORT_COUNT); + +const struct usb_mux usbc0_pi3dpx1207_usb_retimer = { + .usb_port = USBC_PORT_C0, + .i2c_port = I2C_PORT_TCPC0, + .i2c_addr_flags = PI3DPX1207_I2C_ADDR_FLAGS, + .driver = &pi3dpx1207_usb_retimer, +}; + struct usb_mux usb_muxes[] = { [USBC_PORT_C0] = { .usb_port = USBC_PORT_C0, diff --git a/board/morphius/board.h b/board/morphius/board.h index 74e3fbe65e..4972e33458 100644 --- a/board/morphius/board.h +++ b/board/morphius/board.h @@ -20,15 +20,15 @@ #define CONFIG_SYSTEM_UNLOCKED #define CONFIG_I2C_DEBUG +#define CONFIG_USBC_RETIMER_PI3DPX1207 #define CONFIG_MKBP_USE_GPIO +#define CONFIG_8042_AUX +#define CONFIG_PS2 +#define CONFIG_CMD_PS2 #undef CONFIG_LED_ONOFF_STATES -/* Battery */ #define CONFIG_BATTERY_LEVEL_NEAR_FULL 91 -#define CONFIG_8042_AUX -#define CONFIG_PS2 -#define CONFIG_CMD_PS2 /* Motion sensing drivers */ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ diff --git a/board/trembyle/board.c b/board/trembyle/board.c index 897cdc9c55..18c40a46ab 100644 --- a/board/trembyle/board.c +++ b/board/trembyle/board.c @@ -10,6 +10,7 @@ #include "driver/accelgyro_bmi160.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/retimer/pi3dpx1207.h" #include "driver/retimer/ps8811.h" #include "driver/usb_mux/amd_fp5.h" #include "extpower.h" @@ -270,6 +271,23 @@ static void probe_setup_mux_backup(void) } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, probe_setup_mux_backup, HOOK_PRIO_DEFAULT); +const struct pi3dpx1207_usb_control pi3dpx1207_controls[] = { + [USBC_PORT_C0] = { + .enable_gpio = IOEX_USB_C0_DATA_EN, + .dp_enable_gpio = GPIO_USB_C0_IN_HPD, + }, + [USBC_PORT_C1] = { + }, +}; +BUILD_ASSERT(ARRAY_SIZE(pi3dpx1207_controls) == USBC_PORT_COUNT); + +const struct usb_mux usbc0_pi3dpx1207_usb_retimer = { + .usb_port = USBC_PORT_C0, + .i2c_port = I2C_PORT_TCPC0, + .i2c_addr_flags = PI3DPX1207_I2C_ADDR_FLAGS, + .driver = &pi3dpx1207_usb_retimer, +}; + struct usb_mux usb_muxes[] = { [USBC_PORT_C0] = { .usb_port = USBC_PORT_C0, diff --git a/board/trembyle/board.h b/board/trembyle/board.h index d22ce46d9d..9514fe94c7 100644 --- a/board/trembyle/board.h +++ b/board/trembyle/board.h @@ -20,6 +20,7 @@ #define CONFIG_SYSTEM_UNLOCKED #define CONFIG_I2C_DEBUG +#define CONFIG_USBC_RETIMER_PI3DPX1207 #define CONFIG_MKBP_USE_GPIO /* Motion sensing drivers */ |