summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/dingdong/board.h1
-rw-r--r--board/dingdong/usb_pd_policy.c12
-rw-r--r--board/hoho/board.h1
-rw-r--r--board/hoho/usb_pd_policy.c12
4 files changed, 18 insertions, 8 deletions
diff --git a/board/dingdong/board.h b/board/dingdong/board.h
index 814df199bc..de68de93e8 100644
--- a/board/dingdong/board.h
+++ b/board/dingdong/board.h
@@ -35,6 +35,7 @@
/* 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
diff --git a/board/dingdong/usb_pd_policy.c b/board/dingdong/usb_pd_policy.c
index 5894427ca8..d531f7428b 100644
--- a/board/dingdong/usb_pd_policy.c
+++ b/board/dingdong/usb_pd_policy.c
@@ -14,6 +14,7 @@
#include "timer.h"
#include "util.h"
#include "usb.h"
+#include "usb_bb.h"
#include "usb_pd.h"
#include "version.h"
@@ -105,6 +106,8 @@ const uint32_t vdo_idh = VDO_IDH(0, /* data caps as USB host */
1, /* supports alt modes */
USB_VID_GOOGLE);
+const uint32_t vdo_product = VDO_PRODUCT(CONFIG_USB_PID, CONFIG_USB_BCD_DEV);
+
const uint32_t vdo_ama = VDO_AMA(CONFIG_USB_PD_IDENTITY_HW_VERS,
CONFIG_USB_PD_IDENTITY_SW_VERS,
0, 0, 0, 0, /* SS[TR][12] */
@@ -118,8 +121,9 @@ static int svdm_response_identity(int port, uint32_t *payload)
payload[VDO_I(IDH)] = vdo_idh;
/* TODO(tbroch): Do we plan to obtain TID (test ID) for hoho */
payload[VDO_I(CSTAT)] = VDO_CSTAT(0);
+ payload[VDO_I(PRODUCT)] = vdo_product;
payload[VDO_I(AMA)] = vdo_ama;
- return 4;
+ return VDO_I(AMA) + 1;
}
static int svdm_response_svids(int port, uint32_t *payload)
@@ -128,9 +132,9 @@ static int svdm_response_svids(int port, uint32_t *payload)
return 2;
}
-/* Will only ever be a single mode for this UFP_D device as it has no USB
- * support (2.0 or 3.0) making it only PIN_E configureable nor does it have any
- * source functionality.
+/*
+ * Will only ever be a single mode for this UFP_D device as it has no real USB
+ * support making it only PIN_E configureable
*/
#define MODE_CNT 1
#define OPOS 1
diff --git a/board/hoho/board.h b/board/hoho/board.h
index d98ba5b135..41c7dc40a7 100644
--- a/board/hoho/board.h
+++ b/board/hoho/board.h
@@ -46,6 +46,7 @@
/* USB configuration */
#define CONFIG_USB_PID 0x5010
+#define CONFIG_USB_BCD_DEV 0x0001 /* v 0.01 */
/*
* Allow dangerous commands all the time, since we don't have a write protect
diff --git a/board/hoho/usb_pd_policy.c b/board/hoho/usb_pd_policy.c
index 3da52023c3..6a01d0ec00 100644
--- a/board/hoho/usb_pd_policy.c
+++ b/board/hoho/usb_pd_policy.c
@@ -13,6 +13,7 @@
#include "task.h"
#include "timer.h"
#include "usb.h"
+#include "usb_bb.h"
#include "usb_pd.h"
#include "util.h"
#include "version.h"
@@ -105,6 +106,8 @@ const uint32_t vdo_idh = VDO_IDH(0, /* data caps as USB host */
1, /* supports alt modes */
USB_VID_GOOGLE);
+const uint32_t vdo_product = VDO_PRODUCT(CONFIG_USB_PID, CONFIG_USB_BCD_DEV);
+
const uint32_t vdo_ama = VDO_AMA(CONFIG_USB_PD_IDENTITY_HW_VERS,
CONFIG_USB_PD_IDENTITY_SW_VERS,
0, 0, 0, 0, /* SS[TR][12] */
@@ -118,8 +121,9 @@ static int svdm_response_identity(int port, uint32_t *payload)
payload[VDO_I(IDH)] = vdo_idh;
/* TODO(tbroch): Do we plan to obtain TID (test ID) for hoho */
payload[VDO_I(CSTAT)] = VDO_CSTAT(0);
+ payload[VDO_I(PRODUCT)] = vdo_product;
payload[VDO_I(AMA)] = vdo_ama;
- return 4;
+ return VDO_I(AMA) + 1;
}
static int svdm_response_svids(int port, uint32_t *payload)
@@ -128,9 +132,9 @@ static int svdm_response_svids(int port, uint32_t *payload)
return 2;
}
-/* Will only ever be a single mode for this UFP_D device as it has no USB
- * support (2.0 or 3.0) making it only PIN_E configureable nor does it have any
- * source functionality.
+/*
+ * Will only ever be a single mode for this UFP_D device as it has no real USB
+ * support making it only PIN_C configureable
*/
#define MODE_CNT 1
#define OPOS 1