Commit Graph

619556 Commits

Author SHA1 Message Date
Shengqin Zhang
53acc64a4b media: rk1608: add lock for spi2apb
Change-Id: Ie841f4a496250ee86da7e5a0ae2bcef1c623e43c
Signed-off-by: Shengqin Zhang <zsq@rock-chips.com>
2019-07-10 19:42:35 +08:00
Finley Xiao
af76bbf6df PM / devfreq: rockchip_dmc: Use raw_smp_processor_id()
Fix this warning when DEBUG_PREEMPT is selected:
BUG: using smp_processor_id() in preemptible [00000000] code: devfreq_wq/46
caller is debug_smp_processor_id+0x1c/0x24
CPU: 4 PID: 46 Comm: devfreq_wq Tainted: G           O    4.4.179-gaa55fe4a4414 #71
Hardware name: Rockchip RK3399 Excavator Board (Linux Opensource) (DT)
Workqueue: devfreq_wq devfreq_monitor
Call trace:
[<ffffff800808866c>] dump_backtrace+0x0/0x228
[<ffffff80080888b8>] show_stack+0x24/0x30
[<ffffff80083c91a0>] dump_stack+0x88/0xb0
[<ffffff80083e11f0>] check_preemption_disabled+0xd4/0xfc
[<ffffff80083e1234>] debug_smp_processor_id+0x1c/0x24
[<ffffff80087a8ce0>] rockchip_dmcfreq_target+0x114/0x340
[<ffffff80087a5ff0>] update_devfreq+0x120/0x1b4
[<ffffff80087a60b8>] devfreq_monitor+0x34/0x8c
[<ffffff80080b3164>] process_one_work+0x23c/0x3d8
[<ffffff80080b3340>] process_scheduled_works+0x40/0x44
[<ffffff80080b3c8c>] rescuer_thread+0x174/0x26c
[<ffffff80080b9020>] kthread+0xdc/0xec
[<ffffff8008082ef0>] ret_from_fork+0x10/0x20

Change-Id: Idc05e25403de04108f597e69643e91868728b873
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-07-10 08:37:26 +08:00
Tao Huang
da0c1beb63 Revert "PM / devfreq: rockchip_dmc: Fix using smp_processor_id() in preemptible warning"
This reverts commit 67721b1381.

The get_cup() will disable preemption and the clk_set_rate() may call
schedule() on some platforms, otherwise we may schedule while atomic.

BUG: scheduling while atomic: sh/552/0x00000002
Modules linked in:
CPU: 1 PID: 552 Comm: sh Not tainted 4.4.179 #1122
Hardware name: Rockchip RK1808 EVB V10 Board (DT)
Call trace:
[<ffffff80080873bc>] dump_backtrace+0x0/0x1cc
[<ffffff800808759c>] show_stack+0x14/0x1c
[<ffffff800823a474>] dump_stack+0x94/0xbc
[<ffffff80080b4664>] __schedule_bug+0x3c/0x54
[<ffffff8008657c10>] __schedule+0x88/0x460[root@rk1808:/]#
[<ffffff800865805c>] schedule+0x74/0x94
[<ffffff800865a6dc>] schedule_timeout+0x148/0x178
[<ffffff80084a2920>] rockchip_dmcfreq_wait_complete+0x11c/0x144
[<ffffff800849d508>] rockchip_ddrclk_sip_set_rate_v2+0x64/0x74
[<ffffff8008497420>] clk_change_rate+0xd4/0x208
[<ffffff80084975e4>] clk_core_set_rate_nolock+0x90/0xa4
[<ffffff8008497620>] clk_set_rate+0x28/0x48
[<ffffff80084a1624>] rockchip_dmcfreq_target+0x1f0/0x320
[<ffffff800849fc8c>] update_devfreq+0x118/0x1ac
[<ffffff80084a0974>] store_freq+0x5c/0x84
[<ffffff800832a800>] dev_attr_store+0x18/0x28
[<ffffff80081992d8>] sysfs_kf_write+0x38/0x50
[<ffffff80081984d8>] kernfs_fop_write+0x114/0x170
[<ffffff800813d1f8>] __vfs_write+0x1c/0xc4
[<ffffff800813d990>] vfs_write+0x9c/0x150
[<ffffff800813e21c>] SyS_write+0x44/0x88
[<ffffff8008082ef0>] el0_svc_naked+0x24/0x28

Change-Id: I18f3ee81139ca2908d91a7ef59d3635d1a7e69cb
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-07-10 08:36:50 +08:00
Weixin Zhou
fdcb124e09 PCI: rockchip: fix rk3399 suspend issue
When RK3399 work as a host connect to RK1808 work as a ep:

1. RK3399 pcie DO NOT enter L2 state when suspend, because RK1808 won't
   send the ACK.
2. Hand the link operation to userspace when RK3399 resume
3. Before RK1808 suspend or reboot, RK3399 do following first to break
   the link:

   echo 0x2 > sys/devices/platform/f8000000.pcie/pcie_reset_ep

4. After RK1808 resumed or booted, RK3399 do following to restart
   the link:

   echo 0x1 > sys/devices/platform/f8000000.pcie/pcie_reset_ep

Change-Id: Idc94ab4d2f123744c80ad34a57e1036fec9c53f2
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-07-09 19:04:29 +08:00
Hertz Wang
9eae80e2fe gadget: u_serial: Add tiocmset/tiocmget functionality
Change-Id: Iab5d800aaaddb973408cb8f148f76c2c153a373e
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Hertz Wang <wangh@rock-chips.com>
2019-07-09 17:44:02 +08:00
Yifeng Zhao
2aea5b0720 soc: rockchip: add some vendor storage id
Change-Id: I333a23c17839ecb3f798e9e2fec0ef3d88537705
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-07-09 14:29:42 +08:00
Algea Cao
1992cb6966 drm/bridge: synopsys: dw-hdmi: Fix yuv422 display err
When switching from another color to yuv422, neither
encoder input color nor encoder output color is rgb.
CSC coeff will be incorrectly selected as
csc_coeff_full_to_limited, which causes the display
turn to green. To solve this problem, choose
csc_coeff_full_to_limited only if the input and output
colors are both RGB.

Change-Id: I080e18eb8fcca975cd0e6c46d2ed9e7513a26609
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-07-09 10:23:55 +08:00
Nickey Yang
40a0602d52 arm64: dts: rockchip: rk1808-evb: enable logo display
Change-Id: Ibb2d6c8aa2a87f91fb4bf2e1fbb0547e647ec098
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-07-08 18:31:53 +08:00
William Wu
256fb7670a usb: dwc3: gadget: support to resize TxFIFOs dynamically
We need to dynamically resize the TxFIFOs for some cases
where the default values don't match.

Test on RK1808-stick board, configurate the usb with four
functions "rndis, ntb, mass_storage, acm", the default
values of TxFIFOs is:

GTXFIFOSIZ(0) = 0x00000042
GTXFIFOSIZ(1) = 0x00420184
GTXFIFOSIZ(2) = 0x01c60184
GTXFIFOSIZ(3) = 0x034a0184
GTXFIFOSIZ(4) = 0x04ce0184
GTXFIFOSIZ(5) = 0x06520184
GTXFIFOSIZ(6) = 0x07d6002a

The ep6-in is used for acm ep-in which maxpacket is 1024B,
but the default fifo size of ep6-in is only 336B, less than
the length of the ep maxpacket, it cause acm works abnormally.

This patch creates a simple function to allocate enough TxFIFO
space for each of the enabled endpoints.

Change-Id: I389ffdba4f3721ed6ef192f0c85f41fdeff645ce
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-07-08 10:28:16 +08:00
William Wu
a67a9d3744 dt-bindings: usb: dwc3: add a property to resize tx fifo
This patch adds a new property "snps,tx-fifo-resize" to
enable resize the TxFIFOs dynamically.

Change-Id: I0714b8a5b3a7f461ae0527c99729db8cf202e066
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-07-08 10:28:16 +08:00
Lin Huang
63c034cb4b ARM64: configs: rk1808_linux_defconfig: increase max uart number to 8
RK1808 have 8 uart ports, so increase max uart number to 8.

Change-Id: I01dcf83d5f98e57523f6f61049f5fbb7a8a62639
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-07-05 17:44:15 +08:00
Caesar Wang
225ab9d405 arm64: dts: rockchip: add rk3399-sapphire-excavator-v10-linux.dts
The early (RK_EXCAVATOR_MAIN_V10_20160627) v10 board had some hardware
issues, for example, pwm regulator even a small miscalculation by hardware
and the emmc can't work on hs400 mode. But there still have someone used
the old v10 boards on their hands.

Anyway, that should support the old v10 board with this patch.

Change-Id: If80d890ba713b8dc2893aba406a75af18c0fea03
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-07-05 11:21:41 +08:00
Wang Panzhenzhuan
a7481ed1f0 media: i2c: fix gc2385 pwdn sequence fault
Change-Id: I35e020a61a0c12069632fe357bfe163bd6259e11
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-07-05 10:28:53 +08:00
XiaoDong Huang
fcf55e4df4 arm64: dts: rockchip: rk1808-evb: enable vdd_log off sleep
Powerdown vccio_3v3, vdda_0v8, vcca_1v8, vdd_log in sleep mode.

Change-Id: Ifaf2b710da05415581e8361662577b7ab09a654e
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2019-07-04 14:11:35 +08:00
Finley Xiao
67721b1381 PM / devfreq: rockchip_dmc: Fix using smp_processor_id() in preemptible warning
Fix this warning when DEBUG_PREEMPT is selected:
BUG: using smp_processor_id() in preemptible [00000000] code: devfreq_wq/46
caller is debug_smp_processor_id+0x1c/0x24
CPU: 4 PID: 46 Comm: devfreq_wq Tainted: G           O    4.4.179-gaa55fe4a4414 #71
Hardware name: Rockchip RK3399 Excavator Board (Linux Opensource) (DT)
Workqueue: devfreq_wq devfreq_monitor
Call trace:
[<ffffff800808866c>] dump_backtrace+0x0/0x228
[<ffffff80080888b8>] show_stack+0x24/0x30
[<ffffff80083c91a0>] dump_stack+0x88/0xb0
[<ffffff80083e11f0>] check_preemption_disabled+0xd4/0xfc
[<ffffff80083e1234>] debug_smp_processor_id+0x1c/0x24
[<ffffff80087a8ce0>] rockchip_dmcfreq_target+0x114/0x340
[<ffffff80087a5ff0>] update_devfreq+0x120/0x1b4
[<ffffff80087a60b8>] devfreq_monitor+0x34/0x8c
[<ffffff80080b3164>] process_one_work+0x23c/0x3d8
[<ffffff80080b3340>] process_scheduled_works+0x40/0x44
[<ffffff80080b3c8c>] rescuer_thread+0x174/0x26c
[<ffffff80080b9020>] kthread+0xdc/0xec
[<ffffff8008082ef0>] ret_from_fork+0x10/0x20
BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u12:1/720
caller is debug_smp_processor_id+0x1c/0x24
CPU: 0 PID: 720 Comm: kworker/u12:1 Tainted: G           O    4.4.179-gaa55fe4a4414 #71
Hardware name: Rockchip RK3399 Excavator Board (Linux Opensource) (DT)
Workqueue: devfreq_wq devfreq_monitor
Call trace:
[<ffffff800808866c>] dump_backtrace+0x0/0x228
[<ffffff80080888b8>] show_stack+0x24/0x30
[<ffffff80083c91a0>] dump_stack+0x88/0xb0
[<ffffff80083e11f0>] check_preemption_disabled+0xd4/0xfc
[<ffffff80083e1234>] debug_smp_processor_id+0x1c/0x24
[<ffffff80087a8ce0>] rockchip_dmcfreq_target+0x114/0x340
[<ffffff80087a5ff0>] update_devfreq+0x120/0x1b4
[<ffffff80087a60b8>] devfreq_monitor+0x34/0x8c
[<ffffff80080b3164>] process_one_work+0x23c/0x3d8
[<ffffff80080b4064>] worker_thread+0x2e0/0x3a0
[<ffffff80080b9020>] kthread+0xdc/0xec
[<ffffff8008082ef0>] ret_from_fork+0x10/0x20

Change-Id: I11a2d4684cb3306124470692649c0041d7615f77
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-07-03 17:34:29 +08:00
Hu Kejun
4dad9b993f media: rockchip: isp1: change version to v0.1.5
Change-Id: I949db02da473e6f7b1824d2afda36b9f7b60a539
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-07-02 21:10:51 +08:00
Michel Pollet
357e6f8860 UPSTREAM: USB: rndis: Fix for handling garbled messages
A message can be forged to crash the stack; here we make sure we don't
completely break the system if this occurs

Change-Id: Id5ae7509c7d629c62ce5fe567c551a1e424e0bf3
Signed-off-by: Michel Pollet <michel.pollet@bp.renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1ca532e991)
2019-07-02 19:17:08 +08:00
Caesar Wang
c6a8380dfe input: touchscreen: gsl3673: fixes the correct way during s2r
The early used the fb for display, the new drm display can't callback
the suspend to resume function in gsl3673 driver.

Change-Id: I36c7d89edaf4052e614c5a354f7a0a12c9c4275a
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-07-02 18:24:54 +08:00
Sandy Huang
79bca8aa2a drm/rockchip: csi tx: add yuv422 8bit format support
Change-Id: Ied49010c2cee137e66783237af863e5b6946186d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-07-01 08:48:44 +08:00
Weixin Zhou
77ec271b9f arm64: dts: rockchip: rk3399pro-evb-v13-multi-cam-avb: for multi camera board
Change-Id: I8a5a6cbb2b3f6d34c571df73a85b97cbaced3909
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-28 19:53:18 +08:00
Liang Chen
d550e0e614 arm64: dts: rockchip: initial voltage of vdd_npu to 0.88V for rk3399pro boards
The max voltage of vdd_npu is 0.88V.

Change-Id: I182f0262ac0f3b208a37bc25930659d82c7ba584
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-06-28 17:43:01 +08:00
Liang Chen
55b8a53c7a arm64: dts: rockchip: initial voltage of vdd_npu to 0.88V for rk1808 boards
The max voltage of vdd_npu is 0.88V.

Change-Id: I5f1ec522734e48b6a9443b48692690410c020167
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-06-28 17:43:01 +08:00
Lin Huang
f6ffcfd863 ARM64: configs: rk1808_linux_defconfig: enable usb ethernet config
Change-Id: I23d1f7b687e366cf729dab45930af497ead5b5ee
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-06-28 14:27:53 +08:00
Caesar Wang
ca537f0430 arm64: config: add CONFIG_PINCTRL_RK805 for rockchip_linux_defconfig
The Linux SDK have a common issue with rk809/rk805/rk817..etc, the
regulator can't be disabled during suspending since the linux config
hadn't enable the CONFIG_PINCTRL_RK805 pinctrl for PMIC.

This config include the rk805/rk809/rk809..pinctrl to control for
pmic. So the related config need be enabled by default.

Change-Id: I284976df9d9d95d8a0104ba96a27464883c8b8e1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-06-28 11:20:21 +08:00
Finley Xiao
2312882d4f MALI: utgard: Add private data for governor
This adds support to get simple_ondemand governor data from devicetree.

Change-Id: Ic897ad6227152c4ce695d6cee8085b4d303339bf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-06-28 08:40:21 +08:00
Liang Chen
8412825f2e arm64: dts: rockchip: limit vdd_npu to 0.88V for rk3399pro evaluation boards
Change-Id: I93b5e13291e52270ca79a625e968d7b34cd5985c
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-06-27 21:23:53 +08:00
Liang Chen
3619f7b10d arm64: dts: rockchip: limit vdd_npu to 0.88V for rk3399pro-npu
The recommended max voltage of vdd_npu is 0.88V in the datasheet.

Change-Id: I9713810692c5d32b8c41b0b0e0d02405c01dd0b7
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-06-27 21:20:05 +08:00
Liang Chen
71d6828ea2 arm64: dts: rockchip: limit vdd_npu to 0.88V for rk1808 boards
Change-Id: I4475ab82bf5f7f05c1b7bcccadf6f37151bd6412
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-06-27 21:08:58 +08:00
Liang Chen
864bbd1197 arm64: dts: rockchip: limit vdd_npu to 0.88V for rk1808 SoCs
The recommended max voltage of vdd_npu is 0.88V in the datasheet.

Change-Id: Id29b97b82ea35f3db03140ebdd8bab85e3f375df
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-06-27 20:53:33 +08:00
Caesar Wang
cf626b1c4b arm64: dts: rockchip: fixes the irq of BT on rk3399pro linux
There is an obvious mistake defined on rk3399pro linux.

Change-Id: I89c5589175fa5c8b712d856647442e96330bc669
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-06-27 19:09:25 +08:00
Nickey Yang
a530326a0f drm/rockchip: vop: adjust the layers in RK3399's VOBL
AFAWK, there are four layers in RK3399's VOPB, and two layers for
RK3399's VOPL.

And RK3399's VOBL has the win0 and win2 layers, the formats they support
as below.
win0:
    XR24 AR24 XB24 AB24 RG24 BG24 RG16 BG16 NV12 NV16 NV24 NA12 NA16 NA24
win2:
    XR24 AR24 XB24 AB24 RG24 BG24 RG16 BG16
So only win0 layer supports NV12 format (for video decode format),
adjust the overlay for video and primary layer for display.

It didn't care this case if some platforms had handled the display in
application (e.g android), then on the Linux platform, it's hard to handle
the all kinds of cases in Display application, perhaps the linux needn't
this patch fixes it in the future.

Depend-CL:76144
Fixes: d82f1d3e58
("arm64: dts: rockchip: reasonable alllcation of VOP on rk3399 linux")

Change-Id: Id93b315b6e3ae670bf5ea4dc0a64e140c6e37e80
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-06-27 11:30:09 +08:00
Nickey Yang
22e74fc83b drm/rockchip: vop: set plane's zpos according to type
The zpos currently configure is the order in vop_win_data array,
which is related to the actual hardware plane.
But in the Linux platform, such as video hardware and camera preview,
it can only be played on the nv12 plane.
So set the order of zpos to PRIMARY < OVERLAY (if have) < CURSOR (if have).

Change-Id: Ia9ab3cb9225fd2c385703109afbfbb42a1564110
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-06-27 11:29:33 +08:00
Tao Huang
e6099b435a arm64: rockchip_defconfig: enable KEYBOARD_GPIO
Change-Id: Ifef084fdf287faee25cc91adc4c90708c535b72c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-06-27 09:21:02 +08:00
Ziyuan Xu
73c3457754 arm64: rk3326_linux_defconfig: support MTP feature
Change-Id: Ia7f5fafa3aaa36e1a7261d75d13598c08cea1259
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-06-27 08:42:01 +08:00
Ziyuan Xu
672455b29c arm64: config: disable fb_console for px30/rk3326 linux
Change-Id: Ie78ca02941eeeb4b87c21eef819b97a0077ec881
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-06-27 08:41:37 +08:00
Xing Zheng
33f0e21e7c arm64: dts: rockchip: rk3308: add 'io-multiplex' property for i2s_8ch_1
Change-Id: If68fccdf180d54f017e1d6836f4d663ae2635085
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-27 08:31:53 +08:00
Xing Zheng
2ab4121a3e ASoC: rk3308_codec: add support ADC grps and DAC endisable for testing
Some times, we need to enable/disable ADC grps or DAC
directly to debug.

Change-Id: I53b9fa94733d84f7101e299d3fcb6f9160e36112
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-27 08:31:34 +08:00
Caesar Wang
2a2fdd3242 arm64: dts: rockchip: support the rockchip_suspend on rk3399pro-npu
In general, the kernel dts hadn't defined the rockchip_suspend parameters.
The ARM Trusted Firmware (ATF) had a configure been used by default.

As far, the rockchip_suspend can be configured in kernel when someone need
configure it by themselevs.

Change-Id: Id1b4b79609c3ce345aad946e07105d96f62c04f8
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-06-26 18:40:39 +08:00
Weixin Zhou
75a7067870 arm64: rk3399pro_npu_pcie_defconfig: for multi camera board
Change-Id: Id09443ea66a77732873e615e341dcc4a03275ba1
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-26 15:38:53 +08:00
Weixin Zhou
7946cf8991 arm64: rockchip_defconfig: enable CONFIG_ROCKCHIP_PCIE_DMA_OBJ
for multi camera board, connect npu by pcie,
depend on rockchip,dma_trx_enabled = <1> on dts

Change-Id: I244fdeddd0e64ab35bdb5a63655a3216292bbf34
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-26 15:29:14 +08:00
Simon Xue
30897bb884 PCI: rockchip: pcie dma transfer function only enabled when "rockchip,dma_trx_enabled" set
Change-Id: I8ae69ac649c15bd4920621d6db27173a7cb36b4a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-06-26 15:28:54 +08:00
Frank Wang
ba72b31499 phy: phy-rockchip-inno-usb2: add exception handling for wakelock
The "OTG wakelock" should be destroyed if otg port was initialized
failed, in case of its memory allocate for other module and the
"wakeup_sources" list would be broken.

Change-Id: Ic478e7297e36def8e105a0736beb86c99ca6261d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2019-06-26 09:56:39 +08:00
Frank Wang
ee35bc3e71 phy: phy-rockchip-inno-usb2: fix otg-id irq error
For the 'otg-mux' irq in SoC should include 'otg-bvalid', 'linestate',
and 'otg-id'. This change fix the previous error condition.

Change-Id: I8fe46c8c9efd6ce04eead89c276227d4cc70902e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2019-06-26 09:56:39 +08:00
David Wu
d69af8ab65 pinctrl: rockchip: Add iomux recalculated for rk3328 GPIO2B0~GPIO2B6
The pins from GPIO2B0 to GPIO2B6 are located at GRF_GPIO2BL_IOMUX,
they are recalculated to get correct iomux.

Change-Id: I1e46697c4508c396b5e8140c32c4185925a040ea
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-06-26 09:07:07 +08:00
Xing Zheng
e0169571c2 arm64: rockchip_linux_defconfig: the CONFIG_SND_SOC_RK3308 is unnecessary
Change-Id: Ic91e129dd0a95dfdb1178cfd46395dc2917de1bb
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-25 19:24:57 +08:00
Xing Zheng
fae9e5d462 ASoC: multicodecs&rk3308_codec: handle the request during no codec instance and hp det
If there is no codec instance or headphone jack, we
should not request headphone jack from machine driver.

Change-Id: If05ac2f4bbfd3fc495a75c0701a44a325e5010cd
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-25 19:24:43 +08:00
William Wu
c30a267714 usb: dwc3: rockchip: fix host mode resume fail for rk3399
Some of the RK3399 sapphire excavator boards have a
suspend/resume issue with the following error log:

dpm_run_callback(): usb_dev_suspend+0x0/0x30 returns -16
PM: Device usb6 failed to suspend async: error -16
PM: Some devices failed to suspend, or early wake event detected

If this error happens, the USB port can't recognize
any USB device with the failed log:

usb usb5-port1: connect-debounce failed

It's because that the Type-A USB3 port which belongs
to fe900000.dwc3 is in abnormal state. We can check
the link state easily via the debug node:

cat /sys/kernel/debug/fe900000.dwc3/link_state

The normal link state is Rx.Detect if no USB device plug
in. But after resume, the link state will change to Polling.
According to the USB 3.1 Spec, the link state can change
from Rx.Detect to Polling state if the USB3 PHY detect
the far end receiver termination. From that we infer that
the USB3 PHY affects the USB3 controller link state since
the USB3 PHY is in power on state when enter suspend.

Actually, it's a common problem if the DWC3 work as Host
mode in the following cases, and it only happens if system
enter suspend/resume without any USB device conneted.

Case1. Type-A USB 3.0 interface with dr_mode = "host";
Case2. Type-A USB 3.0 interface with dr_mode = "otg",
       and set DWC3 to host mode via "dwc3_mode";
Case3. Type-C USB 3.0 interface with dr_mode = "host";
Case4. Type-C USB 3.0 interface with dr_mode = "otg",
       and plug in Type-C to Host cable;
Case5. Type-C USB 3.0 interface with dr_mode = "otg",
       and set DWC3 to host mode via "dwc3_mode";

This patch power off the USB3 PHY if no USB device connect
with the DWC3 Host port before enter suspend, and power on
the USB3 PHY again upon resum.

Fixes: 323ccc3640 ("usb: dwc3: rockchip: fix rk3399 dwc3 host power on fail")
Change-Id: Ifd7805e1f4accb281dd047445d97f4cc954eb5ac
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-06-25 18:30:40 +08:00
Xing Zheng
e8b9e4c471 dt-bindings: sound: rockchip: i2s-tdm: add 'rockchip,io-multiplex' property
Change-Id: I417d438ca727d030c743e96767a049e095755b3e
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-25 09:32:23 +08:00
Xing Zheng
2e9ef0327a ASoC: rockchip: i2s_tdm: add support handle 'io-multiplex' property
Some i2s bus GPIOs maybe designed multiplex, the default
is input, we need to configure IN/OUT dynamically.

Change-Id: I2e0f0f972d6f9fa3fc8e8fc9f5dfd5d4e6deaee1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-25 09:32:23 +08:00
Weixin Zhou
fff810ec29 PCI: rockchip: DW PCIe controller support reset-gpio undefined case
Change-Id: Ib1e641633b09af9ddea3dc4b0e93a93668a723b2
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-24 15:52:18 +08:00