phy: rockchip-inno-usb3: support u3 to work on u2 only mode
authorWilliam Wu <wulf@rock-chips.com>
Tue, 21 Feb 2017 12:57:52 +0000 (20:57 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 22 Feb 2017 06:20:06 +0000 (14:20 +0800)
commit0ee3686bdfaae9961031946836d7b5f05be9593f
tree40ac9c274175b0d1351d0052b88c9233ef3d0883
parentba2cbacfca70a830d94291d0eebf73f4b02ceb70
phy: rockchip-inno-usb3: support u3 to work on u2 only mode

Current code set usb2.0 only mode by type in command and may be
failed if change to usb3.0 for that we need reset the controller
when change mode. This patch add a node in debug file system for
config usb2.0 only or usb2.0/usb3.0 mode. So SLT testing or anyone
else can use this node to change config mode.

1. Config to usb2.0/usb3.0 mode:
   echo u3 > /sys/kernel/debug/<phy name>/u3phy_mode

2. Config to usb2.0 only mode:
   echo u2 > /sys/kernel/debug/<phy name>/u3phy_mode

Change-Id: I11338d8307e771b7d76b61a91477d353444c011c
Signed-off-by: William Wu <wulf@rock-chips.com>
drivers/phy/phy-rockchip-inno-usb3.c