usb-c: Generate USB-C connector VIF policies XML file

Generates XML file containing VIF policies by reading the device tree
using EDT.pickle generated during build
This script writes a subset of general and sink-pdo VIF policies in
output file
This script gets invoked during build if enabled through kconfig
The generated XML containing USB-C VIF policies could be used by
USB PD/Type-C analysers/testers to understand USB-C properties and
perform tests accordingly

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
This commit is contained in:
Madhurima Paruchuri 2022-10-26 13:34:09 +00:00 committed by Maureen Helm
commit fa738b0f74
8 changed files with 398 additions and 2 deletions

View file

@ -1717,6 +1717,11 @@ if(CONFIG_BOOTLOADER_MCUBOOT)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/mcuboot.cmake)
endif()
# Generate USB-C VIF policies in XML format
if (CONFIG_BUILD_OUTPUT_VIF)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/vif.cmake)
endif()
get_property(extra_post_build_commands
GLOBAL PROPERTY
extra_post_build_commands