Commit Graph

619523 Commits

Author SHA1 Message Date
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
Xing Zheng
48a7471142 arm64: rockchip_linux_defconfig: enable rockchip multicodec machine driver
Change-Id: Ib0bfe4cd980ca983ef32ee8cb2267b27f7505161
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00
Xing Zheng
1f50b7dbea arm64: rockchip_linux_defconfig: enable rkheadset and switch
Some legacy hardware reference designs are based on the
driver configuration of rk_headset, we need to open it
by default.

Change-Id: I15758e15da3a6c76f8cc021749ce9fee1905f72a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-06-20 14:17:41 +08:00
Weixin Zhou
51632dfbbe arm64: dts: rockchip: rk3399pro-npu-evb-v10-multi-cam: enable pcie
Change-Id: I4bfd9ff8ca44956641e94ce977c0a338f3347b1e
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2019-06-20 11:39:50 +08:00
Allon Huang
82a27d2c88 media: i2c: gc2145: Fix code style issue
Change-Id: Iba67ab5db9589983e8f3bf544f8fb6d5ce6d2fb2
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-06-19 19:28:22 +08:00
Allon Huang
48eade26ad media: rockchip: cif: support mipi channel and work mode switching
rk3288 cif can work with mipi channel and switch work mode

Change-Id: Ie8a49cf787617ff5d98ef84cdac761c3ece761c9
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-06-19 19:28:02 +08:00
Allon Huang
8fb5906e02 phy: rockchip: mipi-rx: distinguish control object for txrx
txrx can be linked with isp or csi-host, so separate it

Change-Id: I41d81770c53008bdf9703f92834cc41d9724a563
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-06-19 19:28:02 +08:00
Allon Huang
e4ab186bd4 media: rockchip: cif: csi-host compatible with rk3288
Change-Id: I59abdf5088622ba6e556912f5fef39ad75893b11
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-06-19 19:28:02 +08:00
Allon Huang
49af652f8d ARM: dts: rk3288: combine mipi with cif to work
Link mipi with cif to work.
Meanwhile,replace isp node with rkisp1 node to use
rkisp driver and remove edp-panel enable pin due to
it conflicts with dvp pwdn pin on rk3288-evb-v11.

Change-Id: If8125d2173c7340d7d702294ab55ee2f0c433663
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-06-19 19:28:02 +08:00
Allon Huang
27f3f830a9 ARM: dts: rk3288: add csi_host and cif_pin
Change-Id: I43f289d3de897ef16098639a57b140c9554de3cd
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2019-06-19 19:28:02 +08:00
Tao Huang
f4cd5c18fe video/rockchip: rga2: coding style rm ^M
Change-Id: I6e571211f8fee9f66c3b97b620f13606fc3604ac
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-06-18 15:20:55 +08:00
José Roberto de Souza
3e12c17be4 UPSTREAM: drm: Do not call drm_dp_cec_set_edid() while registering DP connectors
drm_dp_cec_register_connector() is called when registering each DP
connector in DRM, while sounds a good idea register CEC adapters as
earlier as possible, it causes some driver initialization delay
trying to do DPCD transactions in disconnected connectors.

This change will cause no regressions as drm_dp_cec_set_edid() will
still be called in further detection of connected connectors with a
valid edid parameter.

This change reduced the module load of i915 by average 0.5sec in a
machine with just one DP port disconnected while reducing more than
3sec in a machine with 4 DP ports disconnected.

Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181011004439.4482-1-jose.souza@intel.com
(cherry picked from commit 7323001549)

Change-Id: I815948f733719705bbc576fc1ca723fb5a59fe6b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-06-17 18:45:03 +08:00
Hans Verkuil
349e07ffdf UPSTREAM: drm_dp_cec: add note about good MegaChips 2900 CEC support
A big problem with DP CEC-Tunneling-over-AUX is that it is tricky
to find adapters with a chipset that supports this AND where the
manufacturer actually connected the HDMI CEC line to the chipset.

Add a mention of the MegaChips 2900 chipset which seems to support
this feature well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-3-hverkuil@xs4all.nl
(cherry picked from commit 9bcf6d9868)

Change-Id: Idd9a225357a5b3bbb14287cc1f5b13630d0bd449
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-06-17 18:45:03 +08:00
Hans Verkuil
51b3852a7f UPSTREAM: drm_dp_cec: check that aux has a transfer function
If aux->transfer == NULL, then just return without doing
anything. In that case the function is likely called for
a non-(e)DP connector.

This never happened for the i915 driver, but the nouveau and amdgpu
drivers need this check.

The alternative would be to add this check in those drivers before
every drm_dp_cec call, but it makes sense to check it in the
drm_dp_cec functions to prevent a kernel oops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-2-hverkuil@xs4all.nl
(cherry picked from commit 5ce70c799a)

Change-Id: I8a56122cc777e17c2b303120372f7087a94c5083
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-06-17 18:45:03 +08:00
Hans Verkuil
d18dae4b02 UPSTREAM: drm_dp_cec.c: fix formatting typo: %pdH -> %phD
This caused a kernel oops since %pdH interpreted the pointer
as a struct file.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f3720ddf-ec0f-cd22-46b6-720a5e2098f2@xs4all.nl
(cherry picked from commit ea5569ecd6)

Change-Id: I9780212b39185e8b87b74d0216538378f16baf58
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-06-17 18:45:03 +08:00
Hans Verkuil
883524f8fb UPSTREAM: drm: add support for DisplayPort CEC-Tunneling-over-AUX
This adds support for the DisplayPort CEC-Tunneling-over-AUX
feature that is part of the DisplayPort 1.3 standard.

Unfortunately, not all DisplayPort/USB-C to HDMI adapters with a
chip that has this capability actually hook up the CEC pin, so
even though a CEC device is created, it may not actually work.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711132909.25409-2-hverkuil@xs4all.nl
(cherry picked from commit 2c6d1fffa1)

Conflicts:
	drivers/gpu/drm/Makefile
	drivers/gpu/drm/drm_dp_helper.c
	include/drm/drm_dp_helper.h

Change-Id: I63df93f87cc521c148b6a999de9459577680a4f6
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-06-17 18:45:03 +08:00