mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
Per table 6-24 of USB PD spec an alternate mode adapter (AMA) should
include both product & AMA VDOs.
BRANCH=samus
BUG=chrome-os-partner:31192,chrome-os-partner:31193
TEST=manual,
Connect hoho/dingdong to fpie/samus and see product VDO proceed the
AMA VDO in DFP_U console output:
Product VDO -----------------------------v
|------|
SVDM/5 [1] ff008041 340018d1 00000000 50100001 1100000b
Note, hoho's PID == 0x5010
And dingdong (0x5011)
SVDM/5 [1] ff008041 340018d1 00000000 50110001 1100000b
Also see bcdDevice field in descriptor match above data.
$ lsusb -v -d 18d1: | egrep -i "idproduct|bcddev"
idProduct 0x5011
bcdDevice 0.01
Change-Id: I4d898816a45c68c7ff75a54fd348fc11be408ae0
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/226125
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
85 lines
1.8 KiB
C
85 lines
1.8 KiB
C
/* Copyright (c) 2014 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.
|
|
*/
|
|
|
|
/* Dingdong dongle configuration */
|
|
|
|
#ifndef __BOARD_H
|
|
#define __BOARD_H
|
|
|
|
/* 48 MHz SYSCLK clock frequency */
|
|
#define CPU_CLOCK 48000000
|
|
|
|
/* the UART console is on USART1 (PA9/PA10) */
|
|
#define CONFIG_UART_CONSOLE 1
|
|
|
|
/* Optional features */
|
|
#define CONFIG_STM_HWTIMER32
|
|
#define CONFIG_ADC
|
|
#define CONFIG_BOARD_PRE_INIT
|
|
#define CONFIG_HW_CRC
|
|
#define CONFIG_USB
|
|
#define CONFIG_USB_BOS
|
|
#define CONFIG_USB_INHIBIT
|
|
#define CONFIG_USB_POWER_DELIVERY
|
|
#define CONFIG_USB_PD_ALT_MODE
|
|
#define CONFIG_USB_PD_DUAL_ROLE
|
|
#define CONFIG_USB_PD_CUSTOM_VDM
|
|
#define CONFIG_USB_PD_INTERNAL_COMP
|
|
#define CONFIG_USB_PD_IDENTITY_HW_VERS 1
|
|
#define CONFIG_USB_PD_IDENTITY_SW_VERS 1
|
|
#undef CONFIG_WATCHDOG_HELP
|
|
#undef CONFIG_LID_SWITCH
|
|
#undef CONFIG_TASK_PROFILING
|
|
|
|
/* USB configuration */
|
|
#define CONFIG_USB_PID 0x5011
|
|
#define CONFIG_USB_BCD_DEV 0x0001 /* v 0.01 */
|
|
|
|
/*
|
|
* Allow dangerous commands all the time, since we don't have a write protect
|
|
* switch.
|
|
*/
|
|
#define CONFIG_SYSTEM_UNLOCKED
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
/* Timer selection */
|
|
#define TIM_CLOCK32 2
|
|
#define TIM_ADC 3
|
|
|
|
#include "gpio_signal.h"
|
|
|
|
/* ADC signal */
|
|
enum adc_channel {
|
|
ADC_CH_CC1_PD = 0,
|
|
/* Number of ADC channels */
|
|
ADC_CH_COUNT
|
|
};
|
|
|
|
/* USB string indexes */
|
|
enum usb_strings {
|
|
USB_STR_DESC = 0,
|
|
USB_STR_VENDOR,
|
|
USB_STR_PRODUCT,
|
|
USB_STR_VERSION,
|
|
USB_STR_BB_URL,
|
|
|
|
USB_STR_COUNT
|
|
};
|
|
|
|
#endif /* !__ASSEMBLER__ */
|
|
|
|
/* USB Device class */
|
|
#define USB_DEV_CLASS USB_CLASS_BILLBOARD
|
|
|
|
/* USB interface indexes (use define rather than enum to expand them) */
|
|
#define USB_IFACE_COUNT 0
|
|
|
|
/* USB endpoint indexes (use define rather than enum to expand them) */
|
|
#define USB_EP_CONTROL 0
|
|
#define USB_EP_COUNT 1
|
|
|
|
#endif /* __BOARD_H */
|