Fix USB2 and Type C ports on Orange Pi 5 (#4634)

This commit is contained in:
M. Efe Çetin
2023-01-01 00:37:31 +03:00
committed by GitHub
parent 18198b1d7d
commit 71ac9beb28
4 changed files with 22 additions and 1 deletions

View File

@@ -302,6 +302,13 @@ family_tweaks() {
fi
if [[ -f $SDCARD/lib/systemd/system/orangepi5-usb2-init.service ]]; then
# enable usb2 init service
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable orangepi5-usb2-init.service >/dev/null 2>&1"
fi
if [[ $BOARD == nanopim4* ]]; then
# enable fan support

View File

@@ -24,5 +24,10 @@ esac
prepare_boot_configuration
family_tweaks_bsp() {
:
if [[ $BOARD == orangepi5 ]]; then
# Add USB2 init service. Otherwise, USB2 won't work by default
cp $SRC/packages/bsp/orangepi5/orangepi5-usb2-init.service $destination/lib/systemd/system/
fi
}

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Init USB2 for Orange Pi 5
[Service]
ExecStart=/usr/bin/sh -c "echo host > /sys/kernel/debug/usb/fc000000.usb/mode"
Type=oneshot
[Install]
WantedBy=default.target