Commit Graph

619546 Commits

Author SHA1 Message Date
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
Rimon Xu
639cc5284a video: rockchip: vpu: buffer list max nums up to 50.
If the number of buffers in Import exceeds the original set of 30,
it will result in each import buffer kicking out the original stored
buffers, and all subsequent buffers need attachments.

Change-Id: I6e547e1f8943d54995077827ae0d1019e659d797
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2019-06-24 14:20:55 +08:00
Weixin Zhou
bdde6c77bb arm64: dts: rockchip: rk3399pro-evb-v13-multi-cam: for multi camera board
Change-Id: I82bd22191a61523bfeec11218fd36a856e9265dc
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-24 14:19:34 +08:00
Xing Zheng
b45124d888 dt-bindings: sound: rk3308_codec: add 'rockchip,hp-jack-reversed;' property
Change-Id: I90ded394e8351a8cddd5703268529871f21dfac7
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-24 14:17:14 +08:00
Xing Zheng
484463f342 ASoC: rk3308_codec: add support reversed headphone jack
Change-Id: I4752c935684e3b745185cc43b826cad06ff429c5
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-24 14:17:14 +08:00
Cliff Chen
12992228b6 f2fs: Fix recovery is too slow when power fail on much fsync
By default fsync option, if fsync is called frequently, and suddenly
lost power, the POR will consume too much memory at mounting, this
process may be very slow due to a large number of swapping.

Change-Id: I8235098cca062d7ab58af4ebed414aed9aba6c75
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
2019-06-24 14:11:46 +08:00
Tao Huang
a1a13306a4 input: touchscreen: gt9xx: avoid clang warning
drivers/input/touchscreen/gt9xx/gt9xx_update.c:2744:19: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
 while ((ready == 0)) //Wait for measurement complete
         ~~~~~~^~~~

Change-Id: I6954c7cd8867e1d85d435a23ee857cd4e3c58b4b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-06-24 11:06:47 +08:00
Tao Huang
586f045a76 drivers: rk_nand: include seq_file.h for rk_nand_blk.c
Change-Id: I2736a432c071fae0ff47f7015a87c39a39e07095
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-06-21 18:57:08 +08:00
Weixin Zhou
4b3a2fba5e arm64: dts: rockchip: rk3399pro-npu-evb-v10-multi-cam: dma address needs to match the host
Change-Id: If541d9d3343abb6090026aa1bae1c842e17b601b
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-20 17:22:26 +08:00
Yifeng Zhao
e4c8c984c8 Revert "drivers: mtd: nand: fix cs configuration error during nand initialization"
This reverts commit 362a761161.

Change-Id: I492d2e15b0d948921613a56e61b920d0885d6699
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-06-20 14:51:08 +08:00
Wyon Bi
3060dc302c drm/rockchip: dsi: do turnaround request manually is only required for rk3288 dsi1
Test on RK3399

Fixes: f324dff252 ("drm/rockchip: dsi: Send turnaround request after a read request for dsi1")
Change-Id: Id1fad1e8c7c742291bdbd77082dd872093ad549e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-06-20 14:50:17 +08:00