summaryrefslogtreecommitdiff
path: root/board/krabby/usbc_config.c
blob: d506f094ee505e4bd51b8367d7c484e9ac6e5066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* 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.
 */

/* Krabby board-specific USB-C configuration */

#include "driver/usb_mux/ps8743.h"
#include "hooks.h"

void board_usb_mux_init(void)
{
	if (board_get_sub_board() == SUB_BOARD_TYPEC) {
		ps8743_tune_usb_eq(&usb_muxes[1],
				   PS8743_USB_EQ_TX_12_8_DB,
				   PS8743_USB_EQ_RX_12_8_DB);
		ps8743_write(&usb_muxes[1],
				   PS8743_REG_HS_DET_THRESHOLD,
				   PS8743_USB_HS_THRESH_NEG_10);
	}
}
DECLARE_HOOK(HOOK_INIT, board_usb_mux_init, HOOK_PRIO_INIT_I2C + 1);