Commit Graph

599573 Commits

Author SHA1 Message Date
William Wu
ba2cbacfca arm64: dts: rockchip: add grf handle for rk3328 u3phy
The USB 3.0 PHY need to config grf when change between
USB 2.0 only and USB 2.0/3.0 mode, so we add grf property
for u3phy node.

Change-Id: I4ff2670d0637e9d0cbae06f5e9efbde9a8513bb3
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:19:40 +08:00
William Wu
e1b26377c7 usb: dwc3: rockchip-inno: support to set testmodes via debugfs
This patch create host_testmode file in debugfs for
USB HOST. It's useful for us to use a scope to verify
signal integrity for USB2/USB3 HOST.

For example, set testmodes for rk3328 board USB:
1. set test packet for the USB2 port of USB3 interface:
   echo test_packet > /sys/kernel/debug/usb.23/host_testmode

2. set compliance mode for the USB3 port of USB3 interface:
   echo test_u3 > /sys/kernel/debug/usb.23/host_testmode

3. check the testmode status:
   cat /sys/kernel/debug/usb.23/host_testmode
   The log maybe like this:
   U2: test_packet     /* means that U2 in test mode */
   U3: compliance mode /* means that U3 in test mode */

Change-Id: I6ddead14a7b78a011bbffcec6bf865df0632fe1b
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:19:19 +08:00
William Wu
9053aa40d0 phy: rockchip-inno-usb3: add phy_cp_test function for u3phy
The Inno USB3 PHY disable the ability to toggle the CP test
pattern by default. But when do do USB3 compliance test, it
need to change the CP test pattern according to the requirement
of oscilloscope.

This patch add phy_cp_test function to enable the USB3 PHY
to detect the negative pulse which from the Aux Out of the
oscilloscope in SSRX+, and then the USB3 PHY can toggle the
CP test pattern while do USB3 compliance test.

Change-Id: Idbdf937a7a032dcedfd5f207b2d6d5961ed27b15
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:18:58 +08:00
William Wu
4224e942fd phy: add cp_test callback
There are several SoCs (e.g. rk3228h and rk3328) that integrated
with Inno USB3 PHY, they can't toggle CP test pattern when do
USB3 compliance test by default.

This patch add a cp_test callback for USB3 controller to enable
the special USB3 PHY to toggle the CP test pattern.

Change-Id: I2d603202723a4c044d4231af10cfe2c60ec0e988
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:18:11 +08:00
William Wu
d4179fa840 usb: host: xhci-plat: get the usb3 phy for shared_hcd
This patch tries to get the USB3 PHY using, and associates
the XHCI shared_hcd device with it.

With this patch, the USB HUB core driver can do USB PHY
operations base on USB PHY framework, e.g. call usb_phy_
notify_connect() or usb_phy_notify_disconnect() to notify
USB PHY driver to do soft connect or soft disconnect.

Change-Id: I3b51181b840a68ae477b764013446f49dbf7ca70
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:17:39 +08:00
William Wu
1758c75d33 arm64: dts: rockchip: add u3 autosuspend quirk for rk3328
This patch adds a quirk to disable rk3328 xHCI controller
USB3 port autosuspend function, and USB2 port autosuspend
function is still enabled.

Change-Id: Ie5e6883811b09a9a0d839ce59d8f9c4ad8ad3378
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:17:18 +08:00
William Wu
de4d2cb869 usb: dwc3: add dis_u3_autosuspend_quirk
Some xHCI controllers (e.g. Rockchip rk3328 SoC) integrated
in DWC3 IP, don't support USB 3.0 autosuspend well, so we
need to disable USB 3.0 HUB autosuspend function with a quirk.

Change-Id: I72d93837496f875dbcbb16818aa3690017cc1085
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:16:55 +08:00
William Wu
4eab21e6bf usb: host: xhci: set xhci autosuspend quirk based on platform data
Some USB controllers (such as rk3328 SoC DWC3 controller with INNO
USB 3.0 PHY) don't support autosuspend well, when receive remote
wakeup signal from autosuspend, the Port Link State training failed,
the correct PLC is Resume->Recovery->U0, but when the issue happens,
the wrong PLC is Resume->Recovery->Inactive, cause resuming SS port
fail. This issue always occurs when connect with external USB 3.0 HUB.

This patch add a quirk to disable autosuspend function, and add new
'usb3_disable_autosuspend' member in xHCI platform data to support
set the quirk based on platform data.

Change-Id: Ice01d70178206e22658660361dd3a525046cbcf5
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:16:41 +08:00
William Wu
52fc3f5c80 usb: core: hub: add quirk for hub with broken autosuspend function
Some USB host controller seems to have problems with
autosuspend. For example, Rockchip rk3328 SoC USB 3.0
wouldn't handle remote wakeup correctly with external
hub after entered autosuspend, caused to resume SS
port fail.

This patch introduces a new quirk flag for hub that
should remain disabled for autosuspend.

Change-Id: I6d14222b2c5025583fea811a6afd6abd22f41cb9
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-22 14:16:04 +08:00
huweiguo
ccff43617f net: wireless: rockchip_wlan: add rtl8188fu support
update rtl8188eu wifi driver to version v4.3.23.6_20964.20170110

Change-Id: I8665563259e49bcdb0498b93fac6138c42ffd051
Signed-off-by: huweiguo <hwg@rock-chips.com>
2017-02-22 12:53:49 +08:00
Frank Wang
166ce57b57 arm64: dts: rockchip: enable otg-port node of usb2-phy for rk3328-evb
This patch enable otg-port node of usb2-phy for dwc2 otg controller
on rk3328-evb board.

Change-Id: Ic6ce4beb2ba1814554e709a7d8af83a9ece9d7c9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-02-21 10:47:23 +08:00
Frank Wang
0deb7fe598 arm64: dts: rockchip: add otg-port node of usb2-phy for rk3328 dwc2
This patch adds otg-port node of usb2-phy for dwc2 otg controller
on rk3328 SoC.

Change-Id: I4cda3e02d9cab2328cb2a3fe423cd4198258e32b
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-02-21 10:47:22 +08:00
Frank Wang
57b60ee4ab phy: rockchip-inno-usb2: add otg-port support for rk3328
This patch adds otg-port configuration for rk3328 SoC.

Change-Id: Ic680c7f345396c129e7b2ea8a8dded8ba6ee0ae9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-02-21 10:47:22 +08:00
zhangjun
bc52a6c2dd ARM64: dts: rk3399-tve1205g: turn off codec power when suspend
Change-Id: I3c4c841ae576e2c1aa016b915f53384ab167a4eb
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2017-02-21 10:36:36 +08:00
zhangjun
64a855738f ASoC: Update driver for codec cx2072x
1. codec into bias off mode when secondary standby
2. restore hw registers during a suspend/resume cycle.
(Note: codec power must be closed after suspend)

Change-Id: I530d59c161afa64bb2781bc12228ff3b60debd6f
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2017-02-21 10:36:24 +08:00
Huang, Tao
b683eb1263 arm64: dts: rk3399: remove next
Very small clean up.

Change-Id: Ie023404b11cec26bcb9ec5e1e7b7512351acb888
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-02-20 16:48:47 +08:00
Huang, Tao
40dc9d0bec arm64: dts: rk3399: rename android-next to android
The md5sum is identical after rename, so this commit is safe.

Change-Id: I97cb5faecebaad9d2e9c39f67f19f662642cc5e8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-02-20 16:48:18 +08:00
Huang, Tao
e7dfb803ed arm64: dts: rk3399: rename android to android-6.0
Except dts of VR.
The md5sum is identical after rename, so this commit is safe.

Change-Id: I9ec324355ae67bbe2bb626090402ae797de13d92
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-02-20 16:47:54 +08:00
Meng Dongyang
11f68b1c71 Documentation: bindings: add otg-vbus-gpios property for Rockchip USB2PHY
Add otg-vbus-gpios optional property to assigned a gpio to
control vbus of otg port.

Change-Id: I257a53edc4d62543f8ac9c7591c29e7231227c20
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-02-20 16:45:51 +08:00
Meng Dongyang
4b2fed4e9c phy: rockchip-inno-usb2: support to control vbus by gpio
The current code of u2phy set vbus level by set cable state of power
controller, so we can't control vbus level if the platform use gpio
to control vbus. This patch add gpio in u2phy driver and set vbus
level if the mode of usb is detect by u2phy.

Change-Id: I84e966b6e24cb9b6a199fcaad0c509fc003089de
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-02-20 16:45:43 +08:00
zhangjun
7e8da6e70c arm64: dts: rockchip: Add bt sco audio support for rk3399-tve1205g
disable spdif support which is useless meanwhile

Change-Id: Ib116bac82d5d3d13392be2fb62eaf978a08592a0
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2017-02-20 14:29:00 +08:00
zhangjun
857757d4c8 arm64: rockchip_defconfig: enable bt sco codec driver
Change-Id: I58d6f5ade04cbfcef436237ae3bc868b6045a9d5
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2017-02-20 14:28:39 +08:00
chenzhen
17085bc663 MALI: midgard: RK: adapt cores_pm in DDK r14 for solution_1_for_glitch
Change-Id: I383779bd39d6ae52f65ad25bf2e0eb0f1a25dd00
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-02-20 14:27:46 +08:00
chenzhen
3054c50dd8 MALI: rockchip: upgrade midgard DDK to r14p0-01rel0
Along with a slight modification in mali_kbase_core_linux.c,
for building in rk Linux 4.4:
-#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE
+#if KERNEL_VERSION(4, 4, 0) > LINUX_VERSION_CODE

Change-Id: I34565cb975866b46c5e3a4d8e2ac5e350dcceb80
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-02-20 14:27:24 +08:00
chenzhen
a90cb0ed3e Revert "Revert "MALI: midgard: RK: not to power off all the pm cores""
This reverts commit d94880b547.

Change-Id: Iac64d84ff5a7ee3e5666ed2829c17de413fc9bcd
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-02-20 14:27:12 +08:00
chenzhen
2d1c49463b Revert "MALI: midgard: RK: slowdown clk_gpu before poweroff cores"
This reverts commit 89501d8dd3.

Change-Id: I403b63847da10bc2c5536bd26f692bafc849588e
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-02-20 14:26:57 +08:00
chenzhen
e7db50b512 Revert "MALI: midgard: avoid GPU voltage domain keeping the initial voltage"
This reverts commit 57984d5318.

Change-Id: If538c9bbeb5d3fc7302f9683cb85f8acdd309a09
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-02-20 14:26:43 +08:00
chenzhen
eb6c2ed720 Revert "MALI: midgard: support sharing regulator with other devices"
This reverts commit 85b4e1dffa.

Change-Id: Ie8fb980cb8a8b063dd6c9626d5b6c858b36f0976
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-02-20 14:26:31 +08:00
david.wu
3e00738277 arm64: dts: rockchip: add gmac support for rk3328-evb
Change-Id: I05e4eb2d904809a310b12f0de8ae274b90dd583a
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 18:41:21 +08:00
david.wu
f3c53dd38e arm64: dts: rockchip: add io-domain support for rk3328-evb
Change-Id: I15fb97655419e723ce001b8900b413dac3e291e8
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 18:39:45 +08:00
Luo wei
70e6774c3a arm64: dts: rockchip: modify auto dp rayken hwrotation for rk3399-box-rev2-disvr dts
Change-Id: Ia5fc077acba519c07f58456fde0257e313181197
Signed-off-by: Luo wei <lw@rock-chips.com>
2017-02-17 18:38:43 +08:00
Elaine Zhang
009949962c clk: rockchip: rk3328: add SCLK_HDMI_SFC id
Change-Id: Ic876175272cba40093e555ee815e9261bb39d510
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-02-17 18:32:09 +08:00
david.wu
f549d89454 arm64: dts: rockchip: add pwm support for rk3328
Change-Id: I20d150fb258f9eb7f09623189551b982b641e7ad
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 17:28:48 +08:00
david.wu
891c3e1524 pwm: rockchip: need the Distinguish between rk3328 and rk3288 for clk used
Change-Id: Ib6274a200640ab8829a99761ffbf60d530fe5653
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 17:28:41 +08:00
huweiguo
216c7fac8f Bluetooth: update rtk_btusb driver to v 4.1.2
Change-Id: I3627b1938c734cfe4ce32c269798037dc1ff8a32
Signed-off-by: huweiguo <hwg@rock-chips.com>
2017-02-17 17:25:49 +08:00
chenjh
2c7a28a62b mfd: rk808: add sysfs debug node "/sys/rk8xx/rk8xx_dbg"
Change-Id: I197dc97b7337414a7d52426da0e0cb8c7480c917
Signed-off-by: chenjh <chenjh@rock-chips.com>
2017-02-17 17:18:56 +08:00
david.wu
491ae057f1 arm64: dts: rockchip: add gmac support for rk3328
Change-Id: If46e67a05e2a54462b1a83433018385c5f52942c
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 14:40:30 +08:00
david.wu
f6f988e29b arm64: dts: rockchip: change the compatible for rk3328 i2c
Change-Id: I02e7c4088a7a14e233ce2fd907d6a249c18f3a7d
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 14:38:31 +08:00
david.wu
783c39e283 i2c: rk3x: Don't need to add rk3328 i2c compitiable
Change-Id: I32f9698fcfdce4ecd40b9be7b2ab7ffd82651b9b
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-02-17 14:37:35 +08:00
William Wu
48fdea5712 arm64: dts: rockchip: enable usb3 controller for rk3328-evb
Change-Id: I49c152476f6c87195e6b68a9477d84d8bfcc1a70
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
0cbdc8c1da usb: dwc3: add a new glue layer for rockchip SoCs with INNO PHY
This patch add a rockchip specific glue layer to support
USB 3.0 HOST only mode for rockchip USB 3.0 core wrapper
consisting of USB 3.0 controller IP from Synopsys and USB
3.0 PHY IP from Innosilicon.

With this patch, we can support for XHCI integrated in
DWC3 IP on rockchip platforms. Because some INNO USB 3.0
PHY can't detect disconnection by PHY IP, and cause USB3
device unrecognized when replugged again. So we depend on
the HUB core driver to detect the disconnection, and send
notifier to DWC3 driver from USB PHY driver, then we can
do phy reset and remove/add hcd to reinit HCD.

Change-Id: I6972c6f9f8f7160dbd74ad531b843a65ccec5dc0
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
99cf21043d arm64: dts: rockchip: add usb3 controller node for rk3328
Change-Id: I350f46a839ec2266a129c8902aebe3a0480c074d
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
1b67e01442 usb: dwc3: rockchip-inno: add devicetree bindings documentation
This patch adds the devicetree documentation required for Rockchip
USB 3.0 core wrapper consisting of USB 3.0 controller IP from Synopsys
and USB 3.0 PHY IP from Innosilicon.

It supports DRD mode, and could operate in device mode (SS, HS, FS)
and host mode (SS, HS, FS, LS).

Change-Id: Ia240627c31cd3ff2f2d7f1a1faa9c7d88207d04f
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
020b3e1a10 phy: rockchip-inno-usb3: workaround for USB3 PHY disconnection det issue
The rk322xh USB3 PHY has a problem to detect disconnection,
it loses the ability to detect an absence of a far-end
receiver termination specified in USB3 spec Table 6-21,
and this causes the linkstate to change between SS.Inactive
and Polling state, but not return to correct state Rx.detect.

To workaround this bug, we depends on the hub_event to
detect the port linkstate change and do soft disconnect.
And then do USB3 PHY reset and reinit HCD to recovery
the whole USB3.

The workaround process is:
Plug out USB3 device -> hub_event detect PLC and find
USB 3.0 port in the Inactive -> call usb_remove_device()
to do soft disconnect -> call usb_phy_notify_connect()
-> send notifier to DWC3 controller driver to do USB3
PHY reset and reinit HCD.

Change-Id: Icb975581c6fbbb34a7da90ddca47e04a46e5da48
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
1c6c74e1dd phy: rockchip-inno-usb3: select USB_PHY
Some rockchip SoCs (e.g. rk322xh/rk3328) integrated with
INNO USB 3.0 PHY have a problem to detect disconnection
correctly. So we need to depend on the usb phy framework
to handle the disconnection.

Change-Id: Ie3bd015c89e1fb8d46f69fe8d274e29462bfb763
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
cb1a2c2b7b arm64: dts: rockchip: enable usb3 phy for rk3328-evb
Change-Id: I5ab06e9db355575e828ce004c1d3ce65e4717c95
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
aef07fe9b0 arm64: rockchip_linux_defconfig: enable INNO USB 3.0 PHY
Change-Id: I4eb6f75fa0149fb40a3acc5aa6425b1efdf14239
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
0a88814642 phy: rockchip-inno-usb3: add a new driver for Rockchip USB 3.0 PHY
This patch implements a USB 3.0 PHY driver for Rockchip
platform (e.g. rk3328) with Innosilicon IP block.

Change-Id: Ia6ed5df6b7b9eecebd5a5c8a4c4a6df7d26b7422
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
544c91647f arm64: dts: rockchip: add usb3 phy nodes for rk3328
This patch adds USB 3.0 PHY grf node and apb node
for rk3328 USB 3.0 module.

Change-Id: I9d4e6c6d6792ac5fd6c2a4d7cc902f1ff0cf4ef1
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00
William Wu
b6b5b403ca Documentation: bindings: add dt doc for Rockchip USB 3.0 PHY
This patch adds a binding that describes the Rockchip USB 3.0
PHY designed by Innosilicon.

Change-Id: Ia5b9f18743c7a7ed1b9d33420608a2f12a086aee
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-02-17 10:47:51 +08:00