Commit Graph

599493 Commits

Author SHA1 Message Date
Meng Dongyang
16cd32c9b3 arm64: dts: rockchip: add u2phy grf and usb2.0 controller node
Support usb2.0 for rk3328.
Add node usb2phy_grf for usb2.0 phy.
Add node usb_host0_ehci for ehci controller.
Add node usb_host0_ohci for ohci controller.

Change-Id: Ia0adfa4c8cd16735e899491e1dc91d37bd348364
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-02-14 17:59:35 +08:00
Meng Dongyang
591482d01f phy: rockchip-inno-usb2: add support of u2phy for rk3328
The u2phy driver of kernel 4.4 need add config and specific tuning
for rk3328. This patch add support of u2phy for rk3328.

Change-Id: Ie1bdfc0fde37d7d0b26d0f3aac136481bd6f4c44
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-02-14 17:58:41 +08:00
Meng Dongyang
bbcf1b34d3 Documentation: bindings: add DT documentation for u2phy and u2phy grf
Due to the u2phy registers are separated from general grf, we need to
add u2phy grf node and place u2phy node in it. And on some platform,
the 480m clock may need to assign clock parent in dts in stead of
clock driver. So this patch add u2phy grf node and property of
assigned-clocks and assigned-clock-parents to assign parent for 480m
clock.

Change-Id: I88e63745e38265814169136f079a00791f5813b3
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-02-14 17:58:32 +08:00
Zhou weixin
a553c1afed ARM64: dts: rk3399-tve1205g: fix gpio set error for hall sensor
Change-Id: I39a0be31cf56106efdd11f3ea00234004b7e420c
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-02-14 14:45:37 +08:00
Luo wei
6fe3c2fc51 arm64: dts: rockchip: add auto dp config for rk3399-box-rev2-disvr dts
Change-Id: I149ee371a9d11a807bf94c3cff8e3dc36d605853
Signed-off-by: Luo wei <lw@rock-chips.com>
2017-02-14 09:13:18 +08:00
Luo wei
ec6d8f10b9 video: rockchip: add auto dp support for vr product
Change-Id: Ic4e4a3c0214c23bd55d883df6d2106646ef33614
Signed-off-by: Luo wei <lw@rock-chips.com>
2017-02-13 22:02:19 +08:00
Jianhong Chen
7ba1220f6b power: rk818-charger: set sleep otg 5v by otg_in status and dts
Change-Id: I1b2c14dfa64fe382e05717c5e9bb6a5617badba0
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2017-02-13 16:21:17 +08:00
Bin Yang
ebbbc52acc drm: bridge/dw_hdmi: add switch state to support hdmi audio
Change-Id: Ib8122f9cc913d2cd15b92a3d6c57c7edf77d0483
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2017-02-13 15:02:09 +08:00
Bin Yang
7710f8e879 drm/rockchip: cdn-dp: add switch state to support dp audio
Change-Id: Ifb4f6c8c2ecc0df5a021c38c7b5fe57da5c98e6b
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2017-02-13 15:01:53 +08:00
Shunqing Chen
6ed51bfed7 power_supply: bq25700: update status when charger pull out
Change-Id: I416aba3e0318544497bdf444df213461fd10ec7e
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2017-02-13 11:32:58 +08:00
Elaine Zhang
9b19ce5d88 rockchip: clk: rk3399: remove the flag ROCKCHIP_PLL_SYNC_RATE for VPLL and CPLL
to slove the display shaking, when uboot logo display to kernel show.

Change-Id: I804aa09f24bc4fa7b6314a7a5487f0ee1a321724
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-02-10 15:33:18 +08:00
Elaine Zhang
5412e99692 arm64: dts: rockchip: clk: rk3399: support dual pll for vop on drm
attention:
if the vopb is for hdmi,the vopb parent clk must be vpll
and the vopl parent clk is cpll or others plls.
if the vopl is for hdmi,the vopl parent clk must be vpll
and the vopb parent clk is cpll or other plls.

Change-Id: I9056fbdbfcdb7a71f2e7ee5d57a0db8523be66ef
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-02-10 15:32:58 +08:00
yuyz
5720010683 arm64: dts: rockchip: set hdmi ddc channel for excavator linux
Change-Id: Ibef432d0b9a6a38d06e4841b7e97a5cbbea91da9
Signed-off-by: yuyz <yuyz@rock-chips.com>
2017-02-10 15:28:39 +08:00
Zhangbin Tong
b33f15bdb2 ARM64: dts: rk3399-box: Add a new infrared remote control button
Change-Id: Idd384a9c8635772f3c53a0a1f60739998db1704a
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-02-10 15:28:06 +08:00
Zhangbin Tong
63814bda57 ARM64: dts: rk3399: enable rockchip-suspend for box
Change-Id: Ibfaee3b898dc77673b806e6a46570320918b9a5e
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-02-10 15:27:58 +08:00
Douglas Anderson
06451e93ab FROMLIST: serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt
On a Rockchip rk3399-based board during suspend/resume testing, we
found that we could get the console UART into a state where it would
print this to the console a lot:
  serial8250: too much work for irq42

Followed eventually by:
  NMI watchdog: BUG: soft lockup - CPU#0 stuck for 11s!

Upon debugging I found that we're in this state:
  iir = 0x000000cc
  lsr = 0x00000060

It appears that somehow we have a RX Timeout interrupt but there is no
actual data present to receive.  When we're in this state the UART
driver claims that it handled the interrupt but it actually doesn't
really do anything.  This means that we keep getting the interrupt
over and over again.

Normally we don't actually need to do anything special to handle a RX
Timeout interrupt.  We'll notice that there is some data ready and
we'll read it, which will end up clearing the RX Timeout.  In this
case we have a problem specifically because we got the RX TImeout
without any data.  Reading a bogus byte is confirmed to get us out of
this state.

It's unclear how exactly the UART got into this state, but it is known
that the UART lines are essentially undriven and unpowered during
suspend, so possibly during resume some garbage / half transmitted
bits are seen on the line and put the UART into this state.

The UART on the rk3399 is a DesignWare based 8250 UART.  From mailing
list posts, it appears that other people have run into similar
problems with DesignWare based IP.  Presumably this problem is unique
to that IP, so I have placed the workaround there to avoid possibly of
accidentally triggering bad behavior on other IP.  Also note the RX
Timeout behaves very differently in the DMA case, for for now the
workaround is only applied to the non-DMA case.

BUG=chrome-os-partner:59918
TEST=suspend_stress_test

Change-Id: I99974b2977527868c6216ac624dcb8bc9b64cf46
Signed-off-by: Douglas Anderson <dianders@chromium.org>
(am from https://patchwork.kernel.org/patch/9558923/)
Reviewed-on: https://chromium-review.googlesource.com/421577
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
2017-02-09 18:59:20 +08:00
WeiYong Bi
b4e8c2915c drm/panel: simple: fixup AUO B125HAN03.1 panel timing
Change-Id: I488eb97c4e250de78e606a894c52f757fd18c7bb
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-02-09 18:49:37 +08:00
Mark Yao
e7c940dd5f drm/panel: move hardcode timing top of mode list
Change-Id: I76cc9ae6cfdac77e8ed0953da35b17491f5fae6c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-09 17:33:29 +08:00
Mark Yao
c3b1d2ea04 drm/panel: override panel if dts config exist
Change-Id: I326e28bf334025542f1bc46f80d41eee74b57286
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-09 16:27:59 +08:00
Bin Yang
d9e6f0183f arm64: dts: rockchip: add dp audio support for rk3399-tve1205g
Change-Id: I63c3faa8d6218d77f29776035ac8098695f65629
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2017-02-09 10:09:41 +08:00
Bin Yang
9ee265b245 arm64: rockchip_defconfig: enable cdn dp machine driver
Change-Id: I9568d07c59210cf1132a018c81aadc3e1993ec7f
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2017-02-08 09:40:07 +08:00
Bin Yang
3dfb2425af arm64: dts: rockchip: add dual port dp support for rk3399-tve1205g
Change-Id: I6212cf1f829374ef2dac7ecda5ac5f0033ff5ba0
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2017-02-08 09:28:53 +08:00
Elaine Zhang
faf46055b0 clk: rockchip: describe clk_gmac2io_ext using the new muxgrf type on rk3328
Change-Id: I6b86bd2244fda5e1eac52be4b5399230bfc9875e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-02-07 17:40:19 +08:00
Elaine Zhang
a82aa2fad3 dt-bindings: clock: rk3328: add clk_mac2io_ext ID
Change-Id: I1f17c50020d5f37f5cfd6a4d0ecfc195bad2687d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-02-07 17:39:11 +08:00
shengfei Xu
4005deb0f5 ARM64: dts: rk3399: enable rockchip-suspend for evb3
Change-Id: I1d1511965c2eb7c04a7f91f093e95f2eceeb4790
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-02-07 11:42:37 +08:00
Shengfei xu
5aeb4ebab7 arm64: dts: rockchip: add rockchip-suspend node for rk3399
Change-Id: I6af1f487f40c0775102d3b9951617c5d03b884ef
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2017-02-07 11:42:36 +08:00
Shengfei xu
bbf7dd7b32 arm64: rockchip_defconfig: enable suspend mode config
Change-Id: Ifdf47ad8ff9303f5b94362f73f5115faaa3403d0
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2017-02-07 11:42:35 +08:00
Shengfei xu
c21e4b4053 arm64: rockchip_defconfig: enable SIP interface
Change-Id: I4f805ac550c291f4d0821cf7b2eb1eefe54ce067
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2017-02-07 11:42:34 +08:00
Shengfei xu
3cc3b0376b suspend: rockchip: set the suspend config to ATF
Change-Id: I400aa252c24b814e3da7fa6703a4e03a1c90d572
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2017-02-07 11:42:22 +08:00
Huang, Tao
dbdce13da7 dt-bindings: suspend: remove unused rockchip-pm.h
Which is legacy code, do not need any more.

Change-Id: I15f5cbf1389a6442fca6fbf348d2d94a59510338
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-02-07 11:11:47 +08:00
Ziyuan Xu
185bd6b54a ARM: dts: rockchip: fix some incorrect supply for miniarm
Redress the supply node for rk3288-miniarm board, which obey strictly
schematic.

Change-Id: I2c38c7ec080bc836e77857af3a6d3ef02345a120
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2017-02-06 14:23:47 +08:00
Mark Yao
c73632c354 drm/rockchip: fix race with kms hotplug and fbdev
Kms hotplug event may race into fbdev helper initial, that would
cause the bug:

[    0.735411] [00000200] *pgd=00000000f6ffe003, *pud=00000000f6ffe003, *pmd=0000000000000000
[    0.736156] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    0.736648] Modules linked in:
[    0.736930] CPU: 2 PID: 20 Comm: kworker/2:0 Not tainted 4.4.41 #20
[    0.737480] Hardware name: Rockchip RK3399 Board rev2 (BOX) (DT)
[    0.738020] Workqueue: events cdn_dp_pd_event_work
[    0.738447] task: ffffffc0f21f3100 ti: ffffffc0f2218000 task.ti: ffffffc0f2218000
[    0.739109] PC is at mutex_lock+0x14/0x44
[    0.739469] LR is at drm_fb_helper_hotplug_event+0x30/0x114
[    0.756253] [<ffffff8008a344f4>] mutex_lock+0x14/0x44
[    0.756260] [<ffffff8008445708>] drm_fb_helper_hotplug_event+0x30/0x114
[    0.756271] [<ffffff8008473c84>] rockchip_drm_output_poll_changed+0x18/0x20
[    0.756280] [<ffffff8008439fcc>] drm_kms_helper_hotplug_event+0x28/0x34
[    0.756286] [<ffffff800846c444>] cdn_dp_pd_event_work+0x394/0x3c4
[    0.756295] [<ffffff80080b2b38>] process_one_work+0x218/0x3e0
[    0.756302] [<ffffff80080b3538>] worker_thread+0x2e8/0x404
[    0.756308] [<ffffff80080b7e70>] kthread+0xe8/0xf0
[    0.756316] [<ffffff8008082690>] ret_from_fork+0x10/0x40

Change-Id: I8d594183cf8187131418a0096dde840cbf01ed6b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:26:08 +08:00
Mark Yao
31684c7258 drm/rockchip: dw_hdmi: get rid of clock slop
Clock slop is a solution for rk3288, not suitable for rk3399,
after use crtc mode_valid, we can remove the clock slop.

Change-Id: I68121505dfb7e65bf09c26d51c23edc909bdb517
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:25:56 +08:00
Mark Yao
5f675da2d5 drm/rockchip: cdn-dp: check display mode with crtc mode valid
Change-Id: I431ae8e56c18b827e1995ce0dec125c585d096f9
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:25:39 +08:00
Mark Yao
5134d8df07 drm/rockchip: dw_hdmi: check display mode with crtc mode valid
Change-Id: I23470e46b97169da0b59153dfc0835833f1aa549
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:25:26 +08:00
Mark Yao
7e3e0c5e2e drm/rockchip: vop: support mode_valid for crtc
Change-Id: I51f2377c5bd4bdecf44ad31f11e4e7131c2c10c1
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:25:13 +08:00
Mark Yao
0ddcc75666 arm64: dts: rk3399-android-next: add cdn display node
Change-Id: I3c940e330ceab488da3d4351de3a3f9500a6fb5e
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:25:00 +08:00
Mark Yao
de58937341 arm64: dts: rk3399-android-next: use status disabled instead delete node
Change-Id: Ia959ade5dda6f22682293494bafb45bdccba02be
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:24:47 +08:00
Mark Yao
33f2351574 drm: of: don't mask possible_crtcs if remote-point is disabled
Change-Id: I98d42ce5c9a5ed832e455a3d1fc88cf3ec717d69
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-02-05 14:24:36 +08:00
zhangjun
f16ab8ae19 ASoC: rockchip: i2s: add other configurable formats
simple-audio-card,bitclock-inversion = <1> : bclk falling edge taken
simple-audio-card,format = "dsp_a" : pcm no delay mode
simple-audio-card,format = "dsp_b" : pcm late 1 mode

Change-Id: I3d99fd04ee63dec46eb74c625b1e43e698092fe5
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2017-02-05 14:24:15 +08:00
Arnd Bergmann
6c6074b282 UPSTREAM: PCI: rockchip: Mark PM functions as __maybe_unused
When CONFIG_PM_SLEEP is disabled, we get harmless build warnings:

host/pcie-rockchip.c:1267:12: error: 'rockchip_pcie_resume_noirq'
defined but not used [-Werror=unused-function]
host/pcie-rockchip.c:1240:12: error: 'rockchip_pcie_suspend_noirq'
defined but not used [-Werror=unused-function]

Marking both functions as __maybe_unused avoids the warning without
the need for #ifdef around them.

Change-Id: Ic5f9f9d576049b77fd091488c785d09c46cb9b78
Fixes: 013dd3d5e1 ("PCI: rockchip: Add system PM support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git
commit 0b351c986a)
2017-02-05 10:21:51 +08:00
Shawn Lin
a414768a12 UPSTREAM: PCI: rockchip: improve the training polling code
Use the readl_poll_timeout instead of open coding them.

Change-Id: I68e801d395d3258a8a18ead2e18c2c479625d1fa
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git
commit 7faebda21d)
2017-02-05 10:09:54 +08:00
Kirill A. Shutemov
f662f0e624 ANDROID: pagemap: do not leak physical addresses to non-privileged userspace
As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.

This disallows anybody without CAP_SYS_ADMIN to read the pagemap.

[1] http://googleprojectzero.blogspot.com/2015/03/exploiting-dram-rowhammer-bug-to-gain.html

[ Eventually we might want to do anything more finegrained, but for now
  this is the simple model.   - Linus ]

We add this patch again for pass CTS
FileSystemPermissionTest: Assert /proc/self/pagemap not readable

Change-Id: Id4bf9ea27af000734356b921cd723868802b4335
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Seaborn <mseaborn@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-01-22 18:12:52 +08:00
Lorenzo Colitti
292ff06061 selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
Without this, using SOCK_DESTROY in enforcing mode results in:

  SELinux: unrecognized netlink message type=21 for sclass=32

Change-Id: I7862bb0fc83573567243ffa9549a2c7405b5986c
2017-01-22 16:26:09 +08:00
Elaine Zhang
5045fa1a38 clk: rockchip: rk3399: fix up the pr_err for debug
Change-Id: I16eeacaf0307146ebf8db745621ef57e5ab16fec
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-01-22 14:57:29 +08:00
Bin Yang
ae2b8aefd7 arm64: rockchip_defconfig: enable dp driver for drm
Change-Id: I6f7061fb6cc8c3f36f8b5b6d569266061a443e46
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2017-01-22 14:12:16 +08:00
Mark Yao
80182138a0 drm/rockchip: dw_hdmi: move vpll set rate to encoder enable
Change-Id: I5cf7f32f15cf1ea3e85b69009615756be3809c5e
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-01-22 09:20:42 +08:00
Mark Yao
c44caf6deb arm64: dts: rk3399: fixup hdmi clocks node
Change-Id: If3c26da746b582e5b54fb953c04d75a3c640c19b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-01-22 09:20:33 +08:00
Huibin Hong
89764582fb fiq_debugger: Switch current cpu when the former cpu is offline
Change-Id: Ie1a5fe5c3496e5182f0f9aaab336a4d0ff683dfa
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-01-20 17:38:13 +08:00
david.wu
a9fa42d377 pwm: rockchip: add individual clocks supported for APB and function
New PWM module provides two individual clocks for APB bus clock
and function clock.

Change-Id: I0c262472c5d8b0c527c5a0a8d66b4512ac66f2ce
Signed-off-by: david.wu <david.wu@rock-chips.com>
2017-01-20 15:45:51 +08:00