Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions board/allwinner/h700/fsoverlay/etc/init.d/S29rg34xx-sp-usb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

if [ "$1" != "start" ]; then
exit 0
fi

# USB host controllers 1/2/3 (ehci1-3/ohci1-3) are not physically wired on
# this board - usbc1/2/3 in the devicetree carry usb_host_init_state=1 and
# no drvvbus-supply regulator (only usbc0, the real OTG/charging port, has
# one - see rg34xx-sp.dts), so nothing can ever be attached to them.
BOARD=$(cat /boot/boot/knulli.board)
if [ "$BOARD" = "rg34xx-sp" ]; then
[ -e /sys/bus/platform/drivers/sunxi-ohci/5200000.ohci1-controller ] && echo 5200000.ohci1-controller > /sys/bus/platform/drivers/sunxi-ohci/unbind 2>/dev/null
[ -e /sys/bus/platform/drivers/sunxi-ehci/5200000.ehci1-controller ] && echo 5200000.ehci1-controller > /sys/bus/platform/drivers/sunxi-ehci/unbind 2>/dev/null
[ -e /sys/bus/platform/drivers/sunxi-ohci/5310000.ohci2-controller ] && echo 5310000.ohci2-controller > /sys/bus/platform/drivers/sunxi-ohci/unbind 2>/dev/null
[ -e /sys/bus/platform/drivers/sunxi-ehci/5310000.ehci2-controller ] && echo 5310000.ehci2-controller > /sys/bus/platform/drivers/sunxi-ehci/unbind 2>/dev/null
[ -e /sys/bus/platform/drivers/sunxi-ohci/5311000.ohci3-controller ] && echo 5311000.ohci3-controller > /sys/bus/platform/drivers/sunxi-ohci/unbind 2>/dev/null
[ -e /sys/bus/platform/drivers/sunxi-ehci/5311000.ehci3-controller ] && echo 5311000.ehci3-controller > /sys/bus/platform/drivers/sunxi-ehci/unbind 2>/dev/null
fi