diff options
Diffstat (limited to 'test/genvif')
-rw-r--r-- | test/genvif/.gitignore | 2 | ||||
-rw-r--r-- | test/genvif/Makefile | 24 | ||||
-rwxr-xr-x | test/genvif/genvif.sh | 8 | ||||
-rw-r--r-- | test/genvif/src/atomic.h | 8 | ||||
-rw-r--r-- | test/genvif/src/board.h | 9 | ||||
-rw-r--r-- | test/genvif/src/config_chip.h | 8 | ||||
-rw-r--r-- | test/genvif/src/fuzz_config.h | 8 | ||||
-rw-r--r-- | test/genvif/src/helper.c | 33 | ||||
-rw-r--r-- | test/genvif/src/test_config.h | 8 | ||||
-rw-r--r-- | test/genvif/src/timer.h | 8 | ||||
-rw-r--r-- | test/genvif/vif/exp_test_over_vif.xml | 86 | ||||
-rw-r--r-- | test/genvif/vif/exp_test_vif.xml | 84 | ||||
-rw-r--r-- | test/genvif/vif/over_test_vif.xml | 19 |
13 files changed, 0 insertions, 305 deletions
diff --git a/test/genvif/.gitignore b/test/genvif/.gitignore deleted file mode 100644 index eabdcbd17f..0000000000 --- a/test/genvif/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -genvif -vif_output diff --git a/test/genvif/Makefile b/test/genvif/Makefile deleted file mode 100644 index 566b6bb042..0000000000 --- a/test/genvif/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2020 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. -# - -CC=gcc -CFLAGS=-O2 -Isrc -I../../include - -genvif: ../../util/genvif.c src/helper.c - @$(CC) -o $@ $^ $(CFLAGS) - -test: genvif - @mkdir vif_output 2>/dev/null - @./genvif -b test -o vif_output - @./genvif -b exp_test -o vif_output -n -v vif/exp_test_vif.xml - @diff vif_output/test_vif.xml vif_output/exp_test_vif.xml - @./genvif -b test_over -o vif_output -v vif/over_test_vif.xml - @./genvif -b exp_test_over -o vif_output -n -v vif/exp_test_over_vif.xml - @diff vif_output/test_over_vif.xml vif_output/exp_test_over_vif.xml - -.PHONY: clean -clean: - @rm -f genvif - @rm -rf vif_output diff --git a/test/genvif/genvif.sh b/test/genvif/genvif.sh deleted file mode 100755 index 4a275ed2c1..0000000000 --- a/test/genvif/genvif.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -e -# Copyright 2020 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. - -cd test/genvif -make clean -make test diff --git a/test/genvif/src/atomic.h b/test/genvif/src/atomic.h deleted file mode 100644 index f2fa112e81..0000000000 --- a/test/genvif/src/atomic.h +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 2020 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. - */ - -/* - * Blank shell to avoid including the real file - */ diff --git a/test/genvif/src/board.h b/test/genvif/src/board.h deleted file mode 100644 index 8f175443d0..0000000000 --- a/test/genvif/src/board.h +++ /dev/null @@ -1,9 +0,0 @@ -/* Copyright 2020 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. - */ - -#define PD_OPERATING_POWER_MW 15000 -#define PD_MAX_POWER_MW 65000 -#define PD_MAX_CURRENT_MA 3250 -#define PD_MAX_VOLTAGE_MV 20000 diff --git a/test/genvif/src/config_chip.h b/test/genvif/src/config_chip.h deleted file mode 100644 index f2fa112e81..0000000000 --- a/test/genvif/src/config_chip.h +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 2020 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. - */ - -/* - * Blank shell to avoid including the real file - */ diff --git a/test/genvif/src/fuzz_config.h b/test/genvif/src/fuzz_config.h deleted file mode 100644 index f2fa112e81..0000000000 --- a/test/genvif/src/fuzz_config.h +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 2020 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. - */ - -/* - * Blank shell to avoid including the real file - */ diff --git a/test/genvif/src/helper.c b/test/genvif/src/helper.c deleted file mode 100644 index d604e63cfa..0000000000 --- a/test/genvif/src/helper.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2020 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. - */ - -#include "common.h" -#include "usb_pd.h" - -#ifndef CONFIG_USB_PD_CUSTOM_PDO -#define PDO_FIXED_FLAGS (PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP |\ - PDO_FIXED_COMM_CAP) - -const uint32_t pd_src_pdo[] = { - PDO_FIXED(5000, 1500, PDO_FIXED_FLAGS), -}; -const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo); -const uint32_t pd_src_pdo_max[] = { - PDO_FIXED(5000, 3000, PDO_FIXED_FLAGS), -}; -const int pd_src_pdo_max_cnt = ARRAY_SIZE(pd_src_pdo_max); - -const uint32_t pd_snk_pdo[] = { - PDO_FIXED(5000, 500, PDO_FIXED_FLAGS), - PDO_BATT(4750, PD_MAX_VOLTAGE_MV, PD_OPERATING_POWER_MW), - PDO_VAR(4750, PD_MAX_VOLTAGE_MV, PD_MAX_CURRENT_MA), -}; -const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo); -#endif /* CONFIG_USB_PD_CUSTOM_PDO */ - -uint8_t board_get_usb_pd_port_count(void) -{ - return 1; -} diff --git a/test/genvif/src/test_config.h b/test/genvif/src/test_config.h deleted file mode 100644 index f2fa112e81..0000000000 --- a/test/genvif/src/test_config.h +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 2020 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. - */ - -/* - * Blank shell to avoid including the real file - */ diff --git a/test/genvif/src/timer.h b/test/genvif/src/timer.h deleted file mode 100644 index f2fa112e81..0000000000 --- a/test/genvif/src/timer.h +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 2020 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. - */ - -/* - * Blank shell to avoid including the real file - */ diff --git a/test/genvif/vif/exp_test_over_vif.xml b/test/genvif/vif/exp_test_over_vif.xml deleted file mode 100644 index 258430fd96..0000000000 --- a/test/genvif/vif/exp_test_over_vif.xml +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<VIF>
- <VIF_Specification>3.12</VIF_Specification>
- <Vendor_Name>Google</Vendor_Name>
- <Model_Part_Number>SuperTestWithOverride</Model_Part_Number>
- <Product_Revision>Final</Product_Revision>
- <TID>12345</TID>
- <VIF_Product_Type value="0">Port Product</VIF_Product_Type>
- <Certification_Type value="0">End Product</Certification_Type>
- <Product>
- <Product_VID value="6353">18D1</Product_VID>
- </Product>
- <Component>
- <Port_Label>0</Port_Label>
- <Connector_Type value="2">Type-C®</Connector_Type>
- <USB4_Supported value="false">NO</USB4_Supported>
- <USB_PD_Support value="true">YES</USB_PD_Support>
- <PD_Port_Type value="4">DRP</PD_Port_Type>
- <Type_C_State_Machine value="2">DRP</Type_C_State_Machine>
- <Captive_Cable value="false">NO</Captive_Cable>
- <Port_Battery_Powered value="false">NO</Port_Battery_Powered>
- <BC_1_2_Support value="0">None</BC_1_2_Support>
- <PD_Spec_Revision_Major value="3" />
- <PD_Spec_Revision_Minor value="0" />
- <PD_Spec_Version_Major value="2" />
- <PD_Spec_Version_Minor value="0" />
- <PD_Specification_Revision value="2">Revision 3</PD_Specification_Revision>
- <USB_Comms_Capable value="true">YES</USB_Comms_Capable>
- <DR_Swap_To_DFP_Supported value="true">YES</DR_Swap_To_DFP_Supported>
- <DR_Swap_To_UFP_Supported value="false">NO</DR_Swap_To_UFP_Supported>
- <Unconstrained_Power value="false">NO</Unconstrained_Power>
- <VCONN_Swap_To_On_Supported value="false">NO</VCONN_Swap_To_On_Supported>
- <VCONN_Swap_To_Off_Supported value="false">NO</VCONN_Swap_To_Off_Supported>
- <Responds_To_Discov_SOP_UFP value="false">NO</Responds_To_Discov_SOP_UFP>
- <Responds_To_Discov_SOP_DFP value="false">NO</Responds_To_Discov_SOP_DFP>
- <Attempts_Discov_SOP value="true">YES</Attempts_Discov_SOP>
- <Chunking_Implemented_SOP value="false">NO</Chunking_Implemented_SOP>
- <Unchunked_Extended_Messages_Supported value="false">NO</Unchunked_Extended_Messages_Supported>
- <Manufacturer_Info_Supported_Port value="false">NO</Manufacturer_Info_Supported_Port>
- <Security_Msgs_Supported_SOP value="false">NO</Security_Msgs_Supported_SOP>
- <Num_Fixed_Batteries value="1" />
- <Num_Swappable_Battery_Slots value="0" />
- <ID_Header_Connector_Type_SOP value="2">USB Type-C® Receptacle</ID_Header_Connector_Type_SOP>
- <SOP_Capable value="true">YES</SOP_Capable>
- <SOP_P_Capable value="false">NO</SOP_P_Capable>
- <SOP_PP_Capable value="false">NO</SOP_PP_Capable>
- <SOP_P_Debug_Capable value="false">NO</SOP_P_Debug_Capable>
- <SOP_PP_Debug_Capable value="false">NO</SOP_PP_Debug_Capable>
- <Type_C_Implements_Try_SRC value="false">NO</Type_C_Implements_Try_SRC>
- <Type_C_Implements_Try_SNK value="false">NO</Type_C_Implements_Try_SNK>
- <RP_Value value="1">1.5A</RP_Value>
- <Type_C_Is_VCONN_Powered_Accessory value="false">NO</Type_C_Is_VCONN_Powered_Accessory>
- <Type_C_Is_Debug_Target_SRC value="true">YES</Type_C_Is_Debug_Target_SRC>
- <Type_C_Is_Debug_Target_SNK value="true">YES</Type_C_Is_Debug_Target_SNK>
- <Type_C_Can_Act_As_Host value="true">YES</Type_C_Can_Act_As_Host>
- <Type_C_Is_Alt_Mode_Controller value="false">NO</Type_C_Is_Alt_Mode_Controller>
- <Type_C_Can_Act_As_Device value="false">NO</Type_C_Can_Act_As_Device>
- <Type_C_Power_Source value="1">UFP-powered</Type_C_Power_Source>
- <Type_C_Port_On_Hub value="false">NO</Type_C_Port_On_Hub>
- <Type_C_Supports_Audio_Accessory value="false">NO</Type_C_Supports_Audio_Accessory>
- <Type_C_Sources_VCONN value="false">NO</Type_C_Sources_VCONN>
- <PD_Power_As_Source value="15000">15000 mW</PD_Power_As_Source>
- <USB_Suspend_May_Be_Cleared value="false">NO</USB_Suspend_May_Be_Cleared>
- <FR_Swap_Type_C_Current_Capability_As_Initial_Sink value="0">FR_Swap not supported</FR_Swap_Type_C_Current_Capability_As_Initial_Sink>
- <Master_Port value="false">NO</Master_Port>
- <Num_Src_PDOs value="1" />
- <Host_Supports_USB_Data value="true">YES</Host_Supports_USB_Data>
- <Host_Speed value="1">USB 3.2 GEN 1x1</Host_Speed>
- <Is_DFP_On_Hub value="false">NO</Is_DFP_On_Hub>
- <Host_Contains_Captive_Retimer value="false">NO</Host_Contains_Captive_Retimer>
- <Host_Is_Embedded value="false">NO</Host_Is_Embedded>
- <PD_OC_Protection value="false">NO</PD_OC_Protection>
- <Product_Total_Source_Power_mW value="15000">15000 mW</Product_Total_Source_Power_mW>
- <Port_Source_Power_Type value="0">Assured</Port_Source_Power_Type>
- <SrcPdoList>
- <SrcPDO>
- <Src_PDO_Supply_Type value="0">Fixed</Src_PDO_Supply_Type>
- <Src_PDO_Peak_Current value="0">100% IOC</Src_PDO_Peak_Current>
- <Src_PDO_Voltage value="100">5000 mV</Src_PDO_Voltage>
- <Src_PDO_Max_Current value="300">3000 mA</Src_PDO_Max_Current>
- <Src_PD_OCP_OC_Debounce value="50">50 msec</Src_PD_OCP_OC_Debounce>
- <Src_PD_OCP_OC_Threshold value="360">3600 mA</Src_PD_OCP_OC_Threshold>
- </SrcPDO>
- </SrcPdoList>
- </Component>
-</VIF>
diff --git a/test/genvif/vif/exp_test_vif.xml b/test/genvif/vif/exp_test_vif.xml deleted file mode 100644 index b04bfbe9e1..0000000000 --- a/test/genvif/vif/exp_test_vif.xml +++ /dev/null @@ -1,84 +0,0 @@ -<VIF>
- <VIF_Specification>3.12</VIF_Specification>
- <Vendor_Name>Google</Vendor_Name>
- <Model_Part_Number>test</Model_Part_Number>
- <Product_Revision>FIX-ME</Product_Revision>
- <TID>65535</TID>
- <VIF_Product_Type value="0">Port Product</VIF_Product_Type>
- <Certification_Type value="0">End Product</Certification_Type>
- <Product>
- <Product_VID value="6353">18D1</Product_VID>
- </Product>
- <Component>
- <Port_Label>0</Port_Label>
- <Connector_Type value="2">Type-C®</Connector_Type>
- <USB4_Supported value="false">NO</USB4_Supported>
- <USB_PD_Support value="true">YES</USB_PD_Support>
- <PD_Port_Type value="4">DRP</PD_Port_Type>
- <Type_C_State_Machine value="2">DRP</Type_C_State_Machine>
- <Captive_Cable value="false">NO</Captive_Cable>
- <Port_Battery_Powered value="false">NO</Port_Battery_Powered>
- <BC_1_2_Support value="0">None</BC_1_2_Support>
- <PD_Spec_Revision_Major value="3" />
- <PD_Spec_Revision_Minor value="0" />
- <PD_Spec_Version_Major value="2" />
- <PD_Spec_Version_Minor value="0" />
- <PD_Specification_Revision value="2">Revision 3</PD_Specification_Revision>
- <USB_Comms_Capable value="true">YES</USB_Comms_Capable>
- <DR_Swap_To_DFP_Supported value="true">YES</DR_Swap_To_DFP_Supported>
- <DR_Swap_To_UFP_Supported value="false">NO</DR_Swap_To_UFP_Supported>
- <Unconstrained_Power value="false">NO</Unconstrained_Power>
- <VCONN_Swap_To_On_Supported value="false">NO</VCONN_Swap_To_On_Supported>
- <VCONN_Swap_To_Off_Supported value="false">NO</VCONN_Swap_To_Off_Supported>
- <Responds_To_Discov_SOP_UFP value="false">NO</Responds_To_Discov_SOP_UFP>
- <Responds_To_Discov_SOP_DFP value="false">NO</Responds_To_Discov_SOP_DFP>
- <Attempts_Discov_SOP value="true">YES</Attempts_Discov_SOP>
- <Chunking_Implemented_SOP value="false">NO</Chunking_Implemented_SOP>
- <Unchunked_Extended_Messages_Supported value="false">NO</Unchunked_Extended_Messages_Supported>
- <Manufacturer_Info_Supported_Port value="false">NO</Manufacturer_Info_Supported_Port>
- <Security_Msgs_Supported_SOP value="false">NO</Security_Msgs_Supported_SOP>
- <Num_Fixed_Batteries value="1" />
- <Num_Swappable_Battery_Slots value="0" />
- <ID_Header_Connector_Type_SOP value="2">USB Type-C® Receptacle</ID_Header_Connector_Type_SOP>
- <SOP_Capable value="true">YES</SOP_Capable>
- <SOP_P_Capable value="false">NO</SOP_P_Capable>
- <SOP_PP_Capable value="false">NO</SOP_PP_Capable>
- <SOP_P_Debug_Capable value="false">NO</SOP_P_Debug_Capable>
- <SOP_PP_Debug_Capable value="false">NO</SOP_PP_Debug_Capable>
- <Type_C_Implements_Try_SRC value="false">NO</Type_C_Implements_Try_SRC>
- <Type_C_Implements_Try_SNK value="false">NO</Type_C_Implements_Try_SNK>
- <RP_Value value="1">1.5A</RP_Value>
- <Type_C_Is_VCONN_Powered_Accessory value="false">NO</Type_C_Is_VCONN_Powered_Accessory>
- <Type_C_Is_Debug_Target_SRC value="true">YES</Type_C_Is_Debug_Target_SRC>
- <Type_C_Is_Debug_Target_SNK value="true">YES</Type_C_Is_Debug_Target_SNK>
- <Type_C_Can_Act_As_Host value="true">YES</Type_C_Can_Act_As_Host>
- <Type_C_Is_Alt_Mode_Controller value="false">NO</Type_C_Is_Alt_Mode_Controller>
- <Type_C_Can_Act_As_Device value="false">NO</Type_C_Can_Act_As_Device>
- <Type_C_Power_Source value="1">UFP-powered</Type_C_Power_Source>
- <Type_C_Port_On_Hub value="false">NO</Type_C_Port_On_Hub>
- <Type_C_Supports_Audio_Accessory value="false">NO</Type_C_Supports_Audio_Accessory>
- <Type_C_Sources_VCONN value="false">NO</Type_C_Sources_VCONN>
- <PD_Power_As_Source value="15000">15000 mW</PD_Power_As_Source>
- <USB_Suspend_May_Be_Cleared value="false">NO</USB_Suspend_May_Be_Cleared>
- <Sends_Pings value="false">NO</Sends_Pings>
- <FR_Swap_Type_C_Current_Capability_As_Initial_Sink value="0">FR_Swap not supported</FR_Swap_Type_C_Current_Capability_As_Initial_Sink>
- <Master_Port value="false">NO</Master_Port>
- <Num_Src_PDOs value="1" />
- <Host_Supports_USB_Data value="true">YES</Host_Supports_USB_Data>
- <Host_Speed value="1">USB 3.2 GEN 1x1</Host_Speed>
- <Is_DFP_On_Hub value="false">NO</Is_DFP_On_Hub>
- <Host_Contains_Captive_Retimer value="false">NO</Host_Contains_Captive_Retimer>
- <Host_Is_Embedded value="false">NO</Host_Is_Embedded>
- <PD_OC_Protection value="false">NO</PD_OC_Protection>
- <Product_Total_Source_Power_mW value="15000">15000 mW</Product_Total_Source_Power_mW>
- <Port_Source_Power_Type value="0">Assured</Port_Source_Power_Type>
- <SrcPdoList>
- <SrcPDO>
- <Src_PDO_Supply_Type value="0">Fixed</Src_PDO_Supply_Type>
- <Src_PDO_Peak_Current value="0">100% IOC</Src_PDO_Peak_Current>
- <Src_PDO_Voltage value="100">5000 mV</Src_PDO_Voltage>
- <Src_PDO_Max_Current value="300">3000 mA</Src_PDO_Max_Current>
- </SrcPDO>
- </SrcPdoList>
- </Component>
-</VIF>
diff --git a/test/genvif/vif/over_test_vif.xml b/test/genvif/vif/over_test_vif.xml deleted file mode 100644 index 64e1148c68..0000000000 --- a/test/genvif/vif/over_test_vif.xml +++ /dev/null @@ -1,19 +0,0 @@ -<VIF>
- <!-- Override the following fields -->
- <Model_Part_Number>SuperTestWithOverride</Model_Part_Number>
- <Product_Revision>Final</Product_Revision>
- <TID>12345</TID>
-
- <Component>
- <!-- Remove Sends_Pings -->
- <Sends_Pings />
-
- <SrcPdoList>
- <SrcPDO>
- <!-- Add in missing fields for SrcPdo0 -->
- <Src_PD_OCP_OC_Debounce value="50">50 msec</Src_PD_OCP_OC_Debounce>
- <Src_PD_OCP_OC_Threshold value="360">3600 mA</Src_PD_OCP_OC_Threshold>
- </SrcPDO>
- </SrcPdoList>
- </Component>
-</VIF>
|