mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-07-26 19:17:00 +00:00
rpi-config: add helper to enable dwc2 peripheral support
Document and add support to easily enable USB gadget mode. Also fix a spelling error. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
committed by
Andrei Gherzan
parent
07d06b04dd
commit
d3709fa688
@@ -172,6 +172,12 @@ do_deploy() {
|
||||
echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# DWC2 USB peripheral support
|
||||
if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then
|
||||
echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Append extra config if the user has provided any
|
||||
echo "${RPI_EXTRA_CONFIG}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user