Commit Graph

619538 Commits

Author SHA1 Message Date
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
Finley Xiao
892eacb3b5 cpufreq: dt: Fix memory leak when cpu on/off
Fixes: e51ed31ccd ("cpufreq: dt: Add support to get static power")
Change-Id: I613a14a061490fb69e913b8c2cf6677757c73ced
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-06-20 14:44:31 +08:00
Finley Xiao
408ea389fb soc: rockchip: ipa: Get leakage when ipa power model init
Change-Id: Ib0f7855c6faa54fa5ca28010d1c05da8ba478d7e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-06-20 14:43:54 +08:00
William Wu
5e7bba8159 usb: gadget: rndis: fix class definitions for windows
The RNDIS gadget function has USB class of 2 and subclass
of 2, which matches "USB\Class_02&SubClass_02" in the
usbser.inf file in the Windows system, so the device is
initially detected as a COM port instead of RNDIS. This
is why we need to install RNDIS manually.

Refer to Defined Class Codes [1] and rndis_host of Linux [2],
this patch sets the RNDIS gadget with base class of 0xE0h
(Wireless Controller) and subclass of 0x01h and protocol
of 0x03h.

[1] https://www.usb.org/defined-class-codes
[2] http://www.embedded-os.de/en/proto-rndis_host.shtml

Change-Id: Ida366749f378a0ce770d707b4ba56b87f9e188cf
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-06-20 14:42:26 +08:00
Xing Zheng
cb63e4cc13 arm64: dts: rk3399pro: using multicodec sound for rt5651 codec
We need to export Headphone Jack snd ctl to userspace
on linux platform via multicodec machine driver.

Change-Id: I5664a0b29dfda2ed8cc450a5f0fd388d32dfdd48
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00
Xing Zheng
bb94c30573 arm64: dts: rk3399: using multicodec sound for rt5651 codec
We need to export Headphone Jack snd ctl to userspace
on linux platform via multicodec machine driver.

Change-Id: I1d042b080ab45f303f7c1a4100a2dd8014d923bc
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00
Xing Zheng
150909a9b3 ASoC: rockchip: multicodecs: update headphone jack
We need to specify a pin description to create a
new soc jack kctl and report to userspace.

Change-Id: I46f665bd4009c0779a5c9cc3f6b9d43123b54883
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00
Xing Zheng
480771a97d ASoC: rockchip: multicodecs: add rk_headset_set_jack_detect
For the legacy issues, we still need to call rk_headset
on some linux platform.

Change-Id: I395de2b8c1300b1cd7cb429dce852ef12bfe2f4c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00
Xing Zheng
e8949686cb rk_headset: add support jack report
This patch supports Jack's event report switching Audio
paths on public platforms.

Change-Id: I83e395f81fb60a2b446a309fae820d26d7df4661
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00