1st, USB emulation, since it's more interesting of a use case, IMO.
A while back you may've stumbled upon the article Unlocking secret ThinkPad functionality for emulating USB devices where a dude patches nvram to enable xdci. I've been reminded of that recently and decided to find a way to achieve that with coreboot. After some time looking here and there, here's the solution: just add device ref south_xdci on end after device domain 0 on in coreboot's src/mainboard/lenovo/sklkbl_thinkpad/variants/t480/overridetree.cb. Yap, that simple; have fun!
Now on edk2: as one dude on reddit suggested, libreboot can be used to get the proprietary binaries and patched ME semi-automatically (although I've experienced some instability here and ended up feeding it blobs from an earlier build). As for the .config, I ended up following MrChromebox' advice and leaving most of the default choices be. Here's a minimal defconfig that generates working builds (fully flashable, not just the bios region):
# board choice
CONFIG_VENDOR_LENOVO=y
CONFIG_BOARD_LENOVO_T480=y
CONFIG_PAYLOAD_EDK2=y
# proprietary blobs
CONFIG_HAVE_IFD_BIN=y
CONFIG_IFD_BIN_PATH="../../../config/ifd/t480/ifd_16"
CONFIG_HAVE_ME_BIN=y
CONFIG_ME_BIN_PATH="../../../vendorfiles/t480/me.bin"
CONFIG_HAVE_GBE_BIN=y
CONFIG_GBE_BIN_PATH="../../../config/ifd/t480/gbe"
CONFIG_ADD_FSP_BINARIES=y
CONFIG_FSP_USE_REPO=n
CONFIG_FSP_M_FILE="../../../vendorfiles/kabylake/Fsp_M.fd"
CONFIG_FSP_S_FILE="../../../vendorfiles/kabylake/Fsp_S.fd"
# nice-to-haves
CONFIG_EDK2_FULL_SCREEN_SETUP=y
CONFIG_MEC1653_ENABLE_UART=y
You can walk around the menuconfig after making olddefconfig and see what other options you may like. However DO NOT TOGGLE the "allow pcie resource allocation over 4g" or whatever it was called (it's in the bottom of the device section), as on my machine that resulted in coreboot and systemd-boot displaying nothing, though there finally was image after Linux started booting. So, not fatal, but may end up requiring reflashing externally, depending on your setup.
The most useful thing in edk2 for me with that was the working platform setup menu, where one can disable the annoying fnlock on boot/wake and increase the memory limits for igpu. Although, nvramtool should work for that now, too.