Commit Graph

594819 Commits

Author SHA1 Message Date
Elaine Zhang
8c8b9dc444 ARM64: dts: rk3399: pd: enable the pd node by default
1 Remove pd_center because the ddr not allowed to power off the pd_center.
2 If the driver not used the pd. the pd will be offed after genpd init complete.
(pd disable unused)

Change-Id: I66db4df1835a48e3c0f96019bb727994e2516af9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-05-30 17:20:10 +08:00
Frank Wang
74c924013d ARM64: rockchip_defconfig: enable Rockchip Inno usb2phy driver
Change-Id: Ib756e79dac8be3b509f261818ce8e1dc5bd41309
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-05-30 16:42:33 +08:00
Frank Wang
7c6d6766f7 ARM64: dts: rockchip: rk3366: support for the usb2phy driver
Change-Id: I0f4b09a41d249997f4c881238101a94a48fd737d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-05-30 16:42:13 +08:00
Frank Wang
d2c7e187e6 phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy
The newer SoCs (rk3366, rk3399) take a different usb-phy IP block (INNO)
than rk3288 and before, meanwhile, most of phy-related registers are also
different from the past, so a new phy driver is required necessarily.

Change-Id: I32320fd516af146ef9b7816d5b167e1b682a659b
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-05-30 16:21:56 +08:00
Frank Wang
09e86329da Documentation: bindings: add DT documentation for Rockchip USB2PHY
Change-Id: I67f4612e95279fabe30aa63f803cd83921b04bd7
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-05-30 16:21:56 +08:00
Huang, Tao
018a31660d Merge tag 'lsk-v4.4-16.05-android'
LSK 16.05 v4.4-android
2016-05-30 14:24:17 +08:00
Rocky Hao
7f416c52a1 ARM64: dts: rockchip: enable tsadc node for rk3366-tb
Set status of tsadc node to "okay" to make tsadc work.

Change-Id: I741adc9ce611f6f0f279fbb351dfaa5fc947db06
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-05-30 11:02:01 +08:00
Rocky Hao
fe16f4b53f arm64: dts: rockchip: add tsadc node and the IPA parameters for rk3366 thermal
according to our testing results, added the ipa parameters for both cpu
and gpu.

for now,the gpu thermal zone is used only to get the gpu's temperature.

Change-Id: I14274c0b2d7645d08f37d918ddb415ac49ed0d9e
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-05-30 11:01:10 +08:00
Xing Zheng
ee4021af68 UPSTREAM: clk: rockchip: add a dummy clock for the watchdog pclk on rk3399
Like rk3288, the pclk supplying the watchdog is controlled via the
SGRF register area. Additionally the SGRF isn't even writable in
every boot mode.

But still the clock control is available and in the future someone
might want to use it. Therefore define a simple clock for the time
being so that the watchdog driver can read its rate.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit git.kernel.org mmind/linux-rockchip.git
volatile-v4.8-clk/next e3d86c1a2295184374cf25cdb525e68a93b0ff90)

Change-Id: I616846d389d324be529966c63820e8707c7d428f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-05-27 20:37:16 +08:00
Xing Zheng
9608a83ed0 UPSTREAM: clk: rockchip: fix cpuclk registration error handling
It maybe due to a copy-paste error the error handing should be
cclk not clk when checking if the cpuclk registration succeeded.

Reported-by: Lin Huang <lin.huang@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/fixes commit df43cf8f1c116f26fcfd89ce9b1119929c732597)

Change-Id: I7d21808194c914e9117c498309e4b69861799318
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-05-27 20:07:02 +08:00
Rocky Hao
0eb5c0bea9 ARM64: config: rockchip_defconfig: make ipa work as default config
Change-Id: Ib82b0102b9b14aeb1f44e60f12451cac32b75acc
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-05-27 17:40:58 +08:00
Rocky Hao
118cf1cbb1 arm64: dts: rockchip: add the IPA needed parameters for rk3399 thermal
according to our testing results, added the ipa parameters for both cpu
big cores and cpu little cores, and updated the  parameters for gpu.

for now,the gpu thermal zone is used only to get the gpu's temperature.

Change-Id: Ifc7708de9d880e0f9cd5da0bb71a135b0c381b45
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-05-27 14:11:55 +08:00
David Wu
f441e9251a ARM64: dts: rockchip: add pstore node for rk3366-tb
Change-Id: I7120fe883faa60d95ad1c93e6bbb774116bdcbef
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-05-26 18:19:12 +08:00
xuhuicong
139e3a4b92 video: rockchip: hdmi: add power domain control
grf_soc_con20 will be reset when vio pd close, so we have to
set hdmi source everytime wake up

Change-Id: I84597265238c1d3057002aad63a0f9b64b99f704
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-05-26 08:38:34 +08:00
xubilv
33423e6b0d video: rockchip: mipi: add dual mipi support
Change-Id: I03ad19d66dc2ee7bd926b01023425fed489ab944
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-05-25 16:13:47 +08:00
Huang Jiachai
5da8903539 video: rockchip: fb: add parse screen physical size
Change-Id: I98ad62b55d268150ff256407b6bdf06a8ad14a37
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-05-25 15:18:53 +08:00
Elaine Zhang
226cb94a20 ARM64: dts: rk3399: clk: set armclkb 816M when clk init
set armclkb 816M to slove the crash,which reset core voltage below 0.85V.
So make sure the 0.8V voltage is enough for the init clk freq.

Change-Id: I4dba25fdfd610c0751f50ce09283c32a9b3f420f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-05-25 15:07:57 +08:00
Sugar Zhang
b725b6091a UPSTREAM: ASoC: rockchip: i2s: rename I2S_CKR_TRCM_TX/RXSHARE to I2S_CKR_TRCM_TX/RXONLY
this patch make it more reasonable and readable, because when we chose
I2S_CKR_TRCM_TXONLY, we only output clk_lrck_tx, and hardware need to
confirm this signal is wired to external codec lrck_tx/rx at the same time.

for convenience, we just handle lrck_txonly if we enable symmetric_rates
in driver and dai_link. otherwise, we use the separate lrck_tx/rx.

Change-Id: I383c34d2337715148566f7e2ada367f2ee279cb5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from git.kernel.org broonie/sound.git topic/rockchip
 commit 7ec4a1c34a190297540626dfa240dc033beca196)
2016-05-25 14:05:21 +08:00
Huang, Tao
f970ae6d05 cpufreq: dt: fix resume warning
This is workaround, but it fix this warning when rk3399 resume:

Detected PIPT I-cache on CPU4
CPU4: found redistributor 100 region 0:0x00000000fef80000
CPU4: Booted secondary processor [410fd082]
cpu cpu4: opp_list_debug_create_link: Failed to create link
cpu cpu4: _add_opp_dev: Failed to register opp debugfs (-12)
cpu cpu5: opp_list_debug_create_link: Failed to create link
cpu cpu5: _add_opp_dev: Failed to register opp debugfs (-12)
CPU4 is up
Detected PIPT I-cache on CPU5
CPU5: found redistributor 101 region 0:0x00000000fefa0000
CPU5: Booted secondary processor [410fd082]
------------[ cut here ]------------
WARNING: at drivers/base/power/opp/core.c:1452

CPU: 2 PID: 564 Comm: system_server Not tainted 4.4.10 #194
Hardware name: Rockchip RK3399 Evaluation Board v2 (Android) (DT)
task: ffffffc0e71fec00 ti: ffffffc0dbe10000 task.ti: ffffffc0dbe10000
PC is at dev_pm_opp_set_regulator+0x64/0x100
LR is at dev_pm_opp_set_regulator+0x38/0x100
pc : [<ffffff800846e968>] lr : [<ffffff800846e93c>] pstate: 80000045
sp : ffffffc0dbe138d0
x29: ffffffc0dbe138d0 x28: ffffff8008bb708e
x27: ffffff8008f58308 x26: ffffff8008d78000
x25: 0000000000000005 x24: ffffff8008bb89e9
x23: ffffff8008bb89e9 x22: ffffffc0eff814d8
x21: ffffffc0e47d2000 x20: ffffff8008dd6000
x19: ffffff8008dd6540 x18: 0000000030d00800
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: ffffffffff000000 x12: 0000000000000008
x11: 0000000000000038 x10: 0101010101010101
x9 : fffffffffffffffc x8 : 7f7f7f7f7f7f7f7f
x7 : ff786b6f6f74722c x6 : 0000000000000080
x5 : ffffffc0eff814d8 x4 : ffffffc0e47d2128
x3 : ffffff8008dd6530 x2 : ffffffc0e47e6200
x1 : ffffffc0e47d2138 x0 : ffffffc0e47e3f00

SP: 0xffffffc0dbe13850:
3850  08dd6000 ffffff80 e47d2000 ffffffc0 eff814d8 ffffffc0 08bb89e9 ffffff80
3870  08bb89e9 ffffff80 00000005 00000000 08d78000 ffffff80 08f58308 ffffff80
3890  08bb708e ffffff80 dbe138d0 ffffffc0 0846e93c ffffff80 dbe138d0 ffffffc0
38b0  0846e968 ffffff80 80000045 00000000 08dd6540 ffffff80 eff814d8 ffffffc0
38d0  dbe13910 ffffffc0 086572f4 ffffff80 00000000 00000000 eff814d8 ffffffc0
38f0  da7bc400 ffffffc0 d9c3f100 ffffffc0 00000000 00000000 08d78000 ffffff80
3910  dbe13960 ffffffc0 08650678 ffffff80 da7bc400 ffffffc0 08f58438 ffffff80
3930  08f58000 ffffff80 00000001 00000000 08d4f000 ffffff80 00000005 00000000

X0: 0xffffffc0e47e3e80:
3e80  75676572 6f74616c 2d352e72 50505553 a300594c 8a2e0000 f3ff0000 fff30000
3ea0  ffff0000 4fff0000 d5770000 65320000 b4ff0000 d24c0000 ffff0000 bf170000
3ec0  bfff0000 7e770000 df2c0000 00890000 5fee0000 85af0000 ffff0000 fdde0000
3ee0  feff0000 bfbf0000 bfa70000 36920000 4e3f0000 9cee0000 ffff0000 ff2f0000
3f00  eff6e4d8 ffffffc0 e4770028 ffffffc0 e4770028 ffffffc0 00000001 00000000
3f20  000dbba0 000dbba0 e47e3f80 ffffffc0 00000000 00000000 00000000 00000000
3f40  00000000 00000000 00000000 00000000 e4770000 ffffffc0 e6fcb900 ffffffc0
3f60  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

X1: 0xffffffc0e47d20b8:
20b8  00000000 00000000 00000000 00000000 080ae3ac ffffff80 e47d2090 ffffffc0
20d8  00200005 ffffffff ffffffff 00000000 00000000 00000000 00000000 00000000
20f8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2118  00000000 00000000 00000000 00000000 d9c41900 ffffffc0 e47e6200 ffffffc0
2138  e47d2138 ffffffc0 e47d2138 ffffffc0 eff98388 ffffffc0 00009c40 00000000
2158  00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000
2178  00000000 00000000 e47e3d00 ffffffc0 e47e3f00 ffffffc0 e6fcb540 ffffffc0
2198  35757063 00000000 00000000 00000000 00000000 00000000 00000000 00000000

X2: 0xffffffc0e47e6180:
6180  e47e6280 ffffffc0 00000200 dead0000 00000001 00000000 30a32c00 00000000
61a0  000dbba0 00000000 000dbba0 00000000 000dbba0 00000000 00000000 00000000
61c0  00000000 00000000 e47d2000 ffffffc0 00000000 00000000 00000050 00000000
61e0  eff98ac0 ffffffc0 e6fd6cc0 ffffffc0 00000000 00000000 00000000 00000000
6200  e47d2128 ffffffc0 d9c41900 ffffffc0 eff814d8 ffffffc0 00000000 00000000
6220  00000000 00000000 e6fcb540 ffffffc0 00000000 00000000 00000000 00000000
6240  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
6260  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

X4: 0xffffffc0e47d20a8:
20a8  080e5090 ffffff80 00000000 00000000 00000000 00000000 00000000 00000000
20c8  080ae3ac ffffff80 e47d2090 ffffffc0 00200005 ffffffff ffffffff 00000000
20e8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2108  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2128  d9c41900 ffffffc0 e47e6200 ffffffc0 e47d2138 ffffffc0 e47d2138 ffffffc0
2148  eff98388 ffffffc0 00009c40 00000000 00000000 00000001 00000000 00000000
2168  00000000 00000000 00000000 00000000 00000000 00000000 e47e3d00 ffffffc0
2188  e47e3f00 ffffffc0 e6fcb540 ffffffc0 35757063 00000000 00000000 00000000

X5: 0xffffffc0eff81458:
1458  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1478  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1498  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
14b8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
14d8  00000000 00000000 e6862f00 ffffffc0 e6865e00 ffffffc0 e6900020 ffffffc0
14f8  eff6e4f0 ffffffc0 e7209c10 ffffffc0 e71b6a00 ffffffc0 08dd5130 ffffff80
1518  e686a2d0 ffffffc0 00000003 00000007 00000000 00000000 00000000 00000000
1538  00000001 00000000 eff81540 ffffffc0 eff81540 ffffffc0 00000000 00000000

X13: 0xfffffffffeffff80:
ff80  ******** ******** ******** ******** ******** ******** ******** ********
ffa0  ******** ******** ******** ******** ******** ******** ******** ********
ffc0  ******** ******** ******** ******** ******** ******** ******** ********
ffe0  ******** ******** ******** ******** ******** ******** ******** ********
0000  ******** ******** ******** ******** ******** ******** ******** ********
0020  ******** ******** ******** ******** ******** ******** ******** ********
0040  ******** ******** ******** ******** ******** ******** ******** ********
0060  ******** ******** ******** ******** ******** ******** ******** ********

X21: 0xffffffc0e47d1f80:
1f80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2000  e47d1800 ffffffc0 e479b000 ffffffc0 00000001 00000000 e47d2018 ffffffc0
2020  e47d2018 ffffffc0 00000000 00000000 00000000 00000000 00000005 00000000
2040  08d58a20 ffffff80 000f000f 00000000 00000000 00000000 e47d2050 ffffffc0
2060  00000000 00000000 e47d2060 ffffffc0 00000000 00000000 e47d2070 ffffffc0

X22: 0xffffffc0eff81458:
1458  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1478  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1498  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
14b8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
14d8  00000000 00000000 e6862f00 ffffffc0 e6865e00 ffffffc0 e6900020 ffffffc0
14f8  eff6e4f0 ffffffc0 e7209c10 ffffffc0 e71b6a00 ffffffc0 08dd5130 ffffff80
1518  e686a2d0 ffffffc0 00000003 00000007 00000000 00000000 00000000 00000000
1538  00000001 00000000 eff81540 ffffffc0 eff81540 ffffffc0 00000000 00000000

X29: 0xffffffc0dbe13850:
3850  08dd6000 ffffff80 e47d2000 ffffffc0 eff814d8 ffffffc0 08bb89e9 ffffff80
3870  08bb89e9 ffffff80 00000005 00000000 08d78000 ffffff80 08f58308 ffffff80
3890  08bb708e ffffff80 dbe138d0 ffffffc0 0846e93c ffffff80 dbe138d0 ffffffc0
38b0  0846e968 ffffff80 80000045 00000000 08dd6540 ffffff80 eff814d8 ffffffc0
38d0  dbe13910 ffffffc0 086572f4 ffffff80 00000000 00000000 eff814d8 ffffffc0
38f0  da7bc400 ffffffc0 d9c3f100 ffffffc0 00000000 00000000 08d78000 ffffff80
3910  dbe13960 ffffffc0 08650678 ffffff80 da7bc400 ffffffc0 08f58438 ffffff80
3930  08f58000 ffffff80 00000001 00000000 08d4f000 ffffff80 00000005 00000000

---[ end trace e939d14abbcc0fd3 ]---
Call trace:
Exception stack(0xffffffc0dbe13710 to 0xffffffc0dbe13830)
3700:                                   ffffff8008dd6540 ffffff8008dd6000
3720: ffffffc0dbe138d0 ffffff800846e968 ffffffc0dbe13770 ffffff80086b096c
3740: 0000000000000004 ffffffbffe800924 ffffffc0dbe13780 ffffff80086b0930
3760: ffffff8008f58d50 ffffffc0eff96758 ffffffc0dbe13780 ffffff80086b0940
3780: ffffffc0dbe13790 ffffff80086b13b4 ffffffc0dbe137d0 ffffff80086b1620
37a0: 0000000000000000 ffffffbffe800870 ffffffc0e47e3f00 ffffffc0e47d2138
37c0: ffffffc0e47e6200 ffffff8008dd6530 ffffffc0e47d2128 ffffffc0eff814d8
37e0: 0000000000000080 ff786b6f6f74722c 7f7f7f7f7f7f7f7f fffffffffffffffc
3800: 0101010101010101 0000000000000038 0000000000000008 ffffffffff000000
3820: 0000000000000000 0000000000000000
[<ffffff800846e968>] dev_pm_opp_set_regulator+0x64/0x100
[<ffffff80086572f4>] cpufreq_init+0xb8/0x290
[<ffffff8008650678>] cpufreq_online+0x268/0x680
[<ffffff8008650ae0>] cpufreq_cpu_callback+0x50/0x5c
[<ffffff80080b5168>] notifier_call_chain+0x48/0x80
[<ffffff80080b5498>] __raw_notifier_call_chain+0xc/0x14
[<ffffff800809a480>] __cpu_notify+0x30/0x50
[<ffffff800809a4b4>] cpu_notify+0x14/0x1c
[<ffffff800809ab9c>] _cpu_up+0x10c/0x1e0
[<ffffff800809b2c4>] enable_nonboot_cpus+0x114/0x230
[<ffffff80080d7e10>] suspend_enter+0x464/0x61c
[<ffffff80080d8088>] suspend_devices_and_enter+0xc0/0x2b8
[<ffffff80080d8814>] pm_suspend+0x594/0x600
[<ffffff80080d6c10>] state_store+0x50/0x88
[<ffffff8008305434>] kobj_attr_store+0x18/0x28
[<ffffff80081e98bc>] sysfs_kf_write+0x44/0x4c
[<ffffff80081e8c78>] kernfs_fop_write+0x10c/0x168
[<ffffff800818b3e4>] __vfs_write+0x28/0xd0
[<ffffff800818b640>] vfs_write+0xac/0x174
[<ffffff800818b7d4>] SyS_write+0x48/0x84
[<ffffff8008084530>] el0_svc_naked+0x24/0x28
cpu cpu5: Failed to set regulator for cpu5: -16
CPU5 is up

It seems recent LSK and upstream is buggy about OPP and cpufreq,
we will waiting for new patch to fix this bug.

Change-Id: I73237b567451d9f3a0ac23f76e529b319f8480f3
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-25 14:03:54 +08:00
ZhuangXiaoLiang
4d1f0892dd ARM64: config: rockchip_defconfig remove Rogue of G6110 GPU.
Change-Id: Ib10daa86eb9e3aa2e33c2b5b4b9fdb3f66709b6a
Signed-off-by: ZhuangXiaoLiang <zhuangxl@rock-chips.com>
2016-05-24 17:41:35 +08:00
Jianqun Xu
e5160ebd0c ARM64: dts: rk3399-evb: enable saradc node
Set status of saradc node to "okay", to support saradc.

Change-Id: Ic36e390097efbf564b5cbdc321086b6965cd54b0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-05-24 16:14:46 +08:00
David Wu
93f18e05cf ARM64: dts: rockchip: remove clk_ignore_unused bootarg for rk3366-tb
Change-Id: I9d3bbdb20cae6b572294ba5a7cf09dbc23278ccf
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-05-24 10:14:16 +08:00
Xubilv
f13eedd859 ARM64: dts: rk3399-android: mipi dsi host1 add grf
Change-Id: Ifa69588690c33da4d58c393f33f344101a4ea11d
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-05-23 16:53:01 +08:00
Wu Liang feng
a575ff1ae5 usb: gadget: accessory: add compat_ioctl
Add compat_ioctl for accessory to work on 64-bit platforms.

Change-Id: I805395c35017111bf0c462847f11765c7088d266
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-05-23 15:53:50 +08:00
Rohith Seelaboyina
5cee27dd9d usb: gadget: mtp: add new ioctl for compat
Define a new ioctl for MTP_SEND_EVENT, as its
ioctl numbers depends on the size of struct
mtp_event, which varies in ARCH32 and ARCH64.

Change-Id: I060604057ac6c55991118b3f61b187468b4ee0fd
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/377800
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-05-23 15:53:13 +08:00
Wu Liang feng
5f726237dd usb: gadget: mtp: add compat_ioctl
Add compat_ioctl for mtp to work on 64-bit platforms.

Change-Id: Icef0f42a554d770a83152c4185aca9e39e041165
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-05-23 15:52:42 +08:00
Jianqun Xu
75564ab24c ARM64: dts: rk3399: add node support for reboot-mode
Rockchip RK3399 SoCs support reboot with modes, such as recovery mode,
loader mode and normal mode.

Change-Id: I96ed872f849c2b3b06d236248995db18be070960
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-05-23 10:28:33 +08:00
Huang, Tao
88cbdb6173 rk: remove cpuquiet
Change-Id: I1fde79829ebff9f74609c3c4aeb759c7db822b01
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-20 17:05:24 +08:00
Huang, Tao
b16fac932c rk: force enable asm goto on android gcc
It seems than android gcc can't pass gcc-goto.sh check, but asm goto work.
So let's active it.

Change-Id: I75310af8cf3746a5c110daa564e96eeb1d7f1070
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-20 15:33:19 +08:00
Alex Shi
023861726f Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2016-05-20 12:16:40 +08:00
Alex Shi
510d0a3f86 Merge tag 'v4.4.11' into linux-linaro-lsk-v4.4
This is the 4.4.11 stable release
2016-05-20 12:16:37 +08:00
Shawn Lin
332da300ea ARM64: dts: rk3399-evb: add more for pcie for evb board
Change-Id: If417c67b7a78898cd23c5a35411d4fe3724336c8
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-05-20 09:58:25 +08:00
Shawn Lin
3779e671ad ARM64: dts: rk3399: add pcie support
Change-Id: I3defaf222ddba88fb92c556913c774d466f78456
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-05-20 09:58:25 +08:00
Shawn Lin
53488bc4cc pci: Add PCIe driver for Rockchip Soc
RK3399 has a PCIe controller which can be used as Root Complex.
This driver supports a PCIe controller as Root Complex mode.

Change-Id: Ifff7340bd90b7e9e17c9f500938bee7769785cb9
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-05-20 09:58:24 +08:00
Shawn Lin
cc9f3098e1 Documentation: add binding description of Rockchip PCIe controller
This patch add some required and optional properties for Rockchip
PCIe controller. Also we add a example for how to use it.

Change-Id: I69cfbc6290c97a9a55b50c531da6c4babefd8571
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-05-20 09:58:24 +08:00
Xubilv
207c36b942 video: rockchip: mipi: free cmds buf in rockchip_lcd_mipi_remove
Change-Id: If805e7b6797841a92252a879526200da166141fd
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-05-19 19:47:54 +08:00
Huang, Tao
c84f1ed061 ARM64: dts: rk3399: add rktimer device node
Select rktimer0 as broadcast timer.

Change-Id: I9a4142391f2ba88efa1c1098772a41179a6ead5d
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-19 18:29:58 +08:00
Huang, Tao
b7355e9f62 clocksource: rockchip: add support for rk3399 SoC
The CONTROL register offset is different from old SoCs.
For Linux driver, there are not functional changes at all.
Let's call it v2.

Change-Id: I87ab0363fd6a13efe223717ffc6a0ba06ec25d72
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-19 18:29:58 +08:00
Huang, Tao
32756986f1 dt-bindings: document rk3399 rk-timer bindings
Add compatible string for rk3399 because which timer is a little
different from older SoCs. So rename the file name from
rockchip,rk3288-timer.txt to rockchip,rk-timer.txt.
Clarify rockchip,rk3288-timer supported SoCs.

Change-Id: Ic39196352ebb4740d21c9e5bdf967084192c66d8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-19 18:29:58 +08:00
Huang, Tao
fb50410985 clocksource: rockchip: add dynamic irq flag to the timer
The rockchip timer is broadcast timer. Add CLOCK_EVT_FEAT_DYNIRQ
flag and set cpumask to all cpu to save power by avoid unnecessary
wakeups and IPIs.

Change-Id: Ie257972a4a42f6807aed22df695d8b3a4d715045
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-19 18:29:58 +08:00
Huang, Tao
c380160aea clocksource: rockchip: remove unnecessary clear irq before request_irq
rk_timer_interrupt_clear and rk_timer_disable is unnecessary before
request_irq. Timer should keep disabled before booting Linux.

Change-Id: I6de401ad156d620ac676e80de89ffd0bdaab3a36
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-19 18:29:58 +08:00
Xubilv
63d0358498 dtsi: screen-timing: lcd-LP097Qx2: for rk3399 mid prototype
Change-Id: Ia01ee063d5d3f5d7e26e6d0a2683e616eebd19f2
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-05-19 15:17:33 +08:00
Xubilv
32adbd9ab2 dtsi: screen-timing: lcd-ls055r1sx04-mipi: for rk3399 vr prototype
Change-Id: Iee299bfe2786ece1b7cc1d53a81e4a4c29a4bf0e
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-05-19 15:14:36 +08:00
Greg Kroah-Hartman
544ec5b08d Linux 4.4.11 2016-05-18 17:08:36 -07:00
Linus Torvalds
6ff8315a4d nf_conntrack: avoid kernel pointer value leak in slab name
commit 31b0b385f6 upstream.

The slab name ends up being visible in the directory structure under
/sys, and even if you don't have access rights to the file you can see
the filenames.

Just use a 64-bit counter instead of the pointer to the 'net' structure
to generate a unique name.

This code will go away in 4.7 when the conntrack code moves to a single
kmemcache, but this is the backportable simple solution to avoiding
leaking kernel pointers to user space.

Fixes: 5b3501faa8 ("netfilter: nf_conntrack: per netns nf_conntrack_cachep")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 17:06:57 -07:00
Arindam Nath
62b68367b7 drm/radeon: fix DP link training issue with second 4K monitor
commit 1a738347df upstream.

There is an issue observed when we hotplug a second DP
4K monitor to the system. Sometimes, the link training
fails for the second monitor after HPD interrupt
generation.

The issue happens when some queued or deferred transactions
are already present on the AUX channel when we initiate
a new transcation to (say) get DPCD or during link training.

We set AUX_IGNORE_HPD_DISCON bit in the AUX_CONTROL
register so that we can ignore any such deferred
transactions when a new AUX transaction is initiated.

Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 17:06:57 -07:00
Imre Deak
bafa4fbc2b drm/i915/bdw: Add missing delay during L3 SQC credit programming
commit d6a862fe8c upstream.

BSpec requires us to wait ~100 clocks before re-enabling clock gating,
so make sure we do this.

CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1462280061-1457-2-git-send-email-imre.deak@intel.com
(cherry picked from commit 48e5d68d28)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 17:06:57 -07:00
Daniel Vetter
bf12e894e6 drm/i915: Bail out of pipe config compute loop on LPT
commit 2700818ac9 upstream.

LPT is pch, so might run into the fdi bandwidth constraint (especially
since it has only 2 lanes). But right now we just force pipe_bpp back
to 24, resulting in a nice loop (which we bail out with a loud
WARN_ON). Fix this.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=93477
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462264381-7573-1-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit f58a1acc7e)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 17:06:56 -07:00
Lucas Stach
472f52f563 drm/radeon: fix PLL sharing on DCE6.1 (v2)
commit e3c00d8784 upstream.

On DCE6.1 PPLL2 is exclusively available to UNIPHYA, so it should not
be taken into consideration when looking for an already enabled PLL
to be shared with other outputs.

This fixes the broken VGA port (TRAVIS DP->VGA bridge) on my Richland
based laptop, where the internal display is connected to UNIPHYA through
a TRAVIS DP->LVDS bridge.

Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=78987

v2: agd: add check in radeon_get_shared_nondp_ppll as well, drop
    extra parameter.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 17:06:55 -07:00
Mauro Carvalho Chehab
9df2dc6cf4 Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing"
commit 93f0750dcd upstream.

This patch causes a Kernel panic when called on a DVB driver.

This was also reported by David R <david@unsolicited.net>:

May  7 14:47:35 server kernel: [  501.247123] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
May  7 14:47:35 server kernel: [  501.247239] IP: [<ffffffffa0222c71>] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2]
May  7 14:47:35 server kernel: [  501.247354] PGD cae6f067 PUD ca99c067 PMD 0
May  7 14:47:35 server kernel: [  501.247426] Oops: 0000 [#1] SMP
May  7 14:47:35 server kernel: [  501.247482] Modules linked in: xfs tun xt_connmark xt_TCPMSS xt_tcpmss xt_owner xt_REDIRECT nf_nat_redirect xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ts_kmp ts_bm xt_string ipt_REJECT nf_reject_ipv4 xt_recent xt_conntrack xt_multiport xt_pkttype xt_tcpudp xt_mark nf_log_ipv4 nf_log_common xt_LOG xt_limit iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables ip6table_filter ip6_tables x_tables pppoe pppox dm_crypt ts2020 regmap_i2c ds3000 cx88_dvb dvb_pll cx88_vp3054_i2c mt352 videobuf2_dvb cx8800 cx8802 cx88xx pl2303 tveeprom videobuf2_dma_sg ppdev videobuf2_memops videobuf2_v4l2 videobuf2_core dvb_usb_digitv snd_hda_codec_via snd_hda_codec_hdmi snd_hda_codec_generic radeon dvb_usb snd_hda_intel amd64_edac_mod serio_raw snd_hda_codec edac_core fbcon k10temp bitblit softcursor snd_hda_core font snd_pcm_oss i2c_piix4 snd_mixer_oss tileblit drm_kms_helper syscopyarea snd_pcm snd_seq_dummy sysfillrect snd_seq_oss sysimgblt fb_sys_fops ttm snd_seq_midi r8169 snd_rawmidi drm snd_seq_midi_event e1000e snd_seq snd_seq_device snd_timer snd ptp pps_core i2c_algo_bit soundcore parport_pc ohci_pci shpchp tpm_tis tpm nfsd auth_rpcgss oid_registry hwmon_vid exportfs nfs_acl mii nfs bonding lockd grace lp sunrpc parport
May  7 14:47:35 server kernel: [  501.249564] CPU: 1 PID: 6889 Comm: vb2-cx88[0] Not tainted 4.5.3 #3
May  7 14:47:35 server kernel: [  501.249644] Hardware name: System manufacturer System Product Name/M4A785TD-V EVO, BIOS 0211    07/08/2009
May  7 14:47:35 server kernel: [  501.249767] task: ffff8800aebf3600 ti: ffff8801e07a0000 task.ti: ffff8801e07a0000
May  7 14:47:35 server kernel: [  501.249861] RIP: 0010:[<ffffffffa0222c71>]  [<ffffffffa0222c71>] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2]
May  7 14:47:35 server kernel: [  501.250002] RSP: 0018:ffff8801e07a3de8  EFLAGS: 00010086
May  7 14:47:35 server kernel: [  501.250071] RAX: 0000000000000283 RBX: ffff880210dc5000 RCX: 0000000000000283
May  7 14:47:35 server kernel: [  501.250161] RDX: ffffffffa0222cf0 RSI: 0000000000000000 RDI: ffff880210dc5014
May  7 14:47:35 server kernel: [  501.250251] RBP: ffff8801e07a3df8 R08: ffff8801e07a0000 R09: 0000000000000000
May  7 14:47:35 server kernel: [  501.250348] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8800cda2a9d8
May  7 14:47:35 server kernel: [  501.250438] R13: ffff880210dc51b8 R14: 0000000000000000 R15: ffff8800cda2a828
May  7 14:47:35 server kernel: [  501.250528] FS:  00007f5b77fff700(0000) GS:ffff88021fc40000(0000) knlGS:00000000adaffb40
May  7 14:47:35 server kernel: [  501.250631] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
May  7 14:47:35 server kernel: [  501.250704] CR2: 0000000000000004 CR3: 00000000ca19d000 CR4: 00000000000006e0
May  7 14:47:35 server kernel: [  501.250794] Stack:
May  7 14:47:35 server kernel: [  501.250822]  ffff8801e07a3df8 ffffffffa0222cfd ffff8801e07a3e70 ffffffffa0236beb
May  7 14:47:35 server kernel: [  501.250937]  0000000000000283 ffff8801e07a3e94 0000000000000000 0000000000000000
May  7 14:47:35 server kernel: [  501.251051]  ffff8800aebf3600 ffffffff8108d8e0 ffff8801e07a3e38 ffff8801e07a3e38
May  7 14:47:35 server kernel: [  501.251165] Call Trace:
May  7 14:47:35 server kernel: [  501.251200]  [<ffffffffa0222cfd>] ? __verify_planes_array_core+0xd/0x10 [videobuf2_v4l2]
May  7 14:47:35 server kernel: [  501.251306]  [<ffffffffa0236beb>] vb2_core_dqbuf+0x2eb/0x4c0 [videobuf2_core]
May  7 14:47:35 server kernel: [  501.251398]  [<ffffffff8108d8e0>] ? prepare_to_wait_event+0x100/0x100
May  7 14:47:35 server kernel: [  501.251482]  [<ffffffffa023855b>] vb2_thread+0x1cb/0x220 [videobuf2_core]
May  7 14:47:35 server kernel: [  501.251569]  [<ffffffffa0238390>] ? vb2_core_qbuf+0x230/0x230 [videobuf2_core]
May  7 14:47:35 server kernel: [  501.251662]  [<ffffffffa0238390>] ? vb2_core_qbuf+0x230/0x230 [videobuf2_core]
May  7 14:47:35 server kernel: [  501.255982]  [<ffffffff8106f984>] kthread+0xc4/0xe0
May  7 14:47:35 server kernel: [  501.260292]  [<ffffffff8106f8c0>] ? kthread_park+0x50/0x50
May  7 14:47:35 server kernel: [  501.264615]  [<ffffffff81697a5f>] ret_from_fork+0x3f/0x70
May  7 14:47:35 server kernel: [  501.268962]  [<ffffffff8106f8c0>] ? kthread_park+0x50/0x50
May  7 14:47:35 server kernel: [  501.273216] Code: 0d 01 74 16 48 8b 46 28 48 8b 56 30 48 89 87 d0 01 00 00 48 89 97 d8 01 00 00 5d c3 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 55 <8b> 46 04 48 89 e5 8d 50 f7 31 c0 83 fa 01 76 02 5d c3 48 83 7e
May  7 14:47:35 server kernel: [  501.282146] RIP  [<ffffffffa0222c71>] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2]
May  7 14:47:35 server kernel: [  501.286391]  RSP <ffff8801e07a3de8>
May  7 14:47:35 server kernel: [  501.290619] CR2: 0000000000000004
May  7 14:47:35 server kernel: [  501.294786] ---[ end trace b2b354153ccad110 ]---

This reverts commit 2c1f6951a8.

Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Fixes: 2c1f6951a8 ("[media] videobuf2-v4l2: Verify planes array in buffer dequeueing")
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 17:06:55 -07:00