summaryrefslogtreecommitdiff
path: root/board/dalboz
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-04-15 17:47:23 -0600
committerCommit Bot <commit-bot@chromium.org>2020-04-16 06:14:12 +0000
commit8ce48815d2b4522f171b5666ba3b974020380130 (patch)
tree974eb6db3899f4df23f45e0d5a7b3fe589f80bf1 /board/dalboz
parent57d7b7d45390d9bac51cadcc7d5349c830eaedb6 (diff)
downloadchrome-ec-8ce48815d2b4522f171b5666ba3b974020380130.tar.gz
Dalboz: Support PS8743 and PS8740 HW
BUG=b:153454399 BRANCH=none TEST=PS8740 still works Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Iaf09c4986b3a03ee2bf4c2408f6dd61ea64388af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2151648 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/dalboz')
-rw-r--r--board/dalboz/board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/dalboz/board.c b/board/dalboz/board.c
index 52dff12e83..412661fbba 100644
--- a/board/dalboz/board.c
+++ b/board/dalboz/board.c
@@ -5,9 +5,12 @@
#include "battery_smart.h"
#include "button.h"
+#include "cros_board_info.h"
#include "driver/accel_lis2dw12.h"
#include "driver/accelgyro_lsm6dsm.h"
#include "driver/ioexpander/pcal6408.h"
+#include "driver/usb_mux/ps8740.h"
+#include "driver/usb_mux/ps8743.h"
#include "extpower.h"
#include "fan.h"
#include "fan_chip.h"
@@ -157,6 +160,19 @@ void pcal6408_interrupt(enum gpio_signal signal)
static void setup_fw_config(void)
{
+ uint32_t board_version = 0;
+
+ if (cbi_get_board_version(&board_version) == EC_SUCCESS
+ && board_version >= 2) {
+ ccprints("PS8743 USB MUX");
+ usb_muxes[USBC_PORT_C1].i2c_addr_flags = PS8743_I2C_ADDR1_FLAG;
+ usb_muxes[USBC_PORT_C1].driver = &ps8743_usb_mux_driver;
+ } else {
+ ccprints("PS8740 USB MUX");
+ usb_muxes[USBC_PORT_C1].i2c_addr_flags = PS8740_I2C_ADDR0_FLAG;
+ usb_muxes[USBC_PORT_C1].driver = &ps8740_usb_mux_driver;
+ }
+
if (ec_config_get_usb_db() == DALBOZ_DB_D_OPT2_USBA_HDMI) {
ccprints("DB OPT2 HDMI");
ioex_config[IOEX_HDMI_PCAL6408].flags = 0;