board: amlogic: vim3: add support for dynamic PCIe enable
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 21 Sep 2020 07:34:15 +0000 (09:34 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Mon, 5 Oct 2020 15:59:45 +0000 (17:59 +0200)
commitadbff64af7b7cee3e0007b75df2644090edaafcb
tree8a8129db409b77535e8fa300484acb29300342c3
parentcb4a7feb54b5143905f720afb582e2aeef4937ef
board: amlogic: vim3: add support for dynamic PCIe enable

The VIM3 on-board  MCU can mux the PCIe/USB3.0 shared differential
lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between
an USB3.0 Type A connector and a M.2 Key M slot.
The PHY driving these differential lines is shared between
the USB3.0 controller and the PCIe Controller, thus only
a single controller can use it.

This adds this dynamic switching right before booting Linux
and the configuration steps in the boards documentation.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
[narmstrong: fixed warning by replacing min() by min_t()]
board/amlogic/vim3/khadas-mcu.h [new file with mode: 0644]
board/amlogic/vim3/vim3.c
configs/khadas-vim3_defconfig
configs/khadas-vim3l_defconfig
doc/board/amlogic/khadas-vim3.rst
doc/board/amlogic/khadas-vim3l.rst