Commit Graph

598325 Commits

Author SHA1 Message Date
Jacob Chen
c4b0fae7cb MALI: utgard: .gitignore: ignore the build generation config
Change-Id: I02a938a390f5f29afa11042b49125031ba303074
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-23 18:16:38 +08:00
Zikim,Wei
1857559519 arm64: dts: rk3399-android-next: Enable rga device
Change-Id: Ib07fcaa199ba0742973ae874edcc5f1b835e99c9
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
2016-11-23 17:50:06 +08:00
Luo wei
a68d7e7cc5 arm64: dts: rockchip: rk3399: config vop0 as main screen for box disvr
Change-Id: I0a25424265273a6a8d010da7205f74dcab7c1e8d
Signed-off-by: Luo wei <lw@rock-chips.com>
2016-11-23 17:48:08 +08:00
Huang, Tao
71e8c71d58 arm64: rockchip_defconfig: enable PCIE
Change-Id: I29413cfa07ff1ec378bf3b3e892b0019cfd90bcb
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-11-23 17:34:36 +08:00
Brian Norris
2c87338d23 UPSTREAM: PCI: rockchip: correct the use of FTS mask
We're trying to mask out bits[23:8] while retaining [32:24, 7:0], but
we're doing the inverse. That doesn't have too much effect, since we're
setting all the [23:8] bits to 1, and the other bits are only relevant
for modes we're currently not using. But we should get this right.

Change-Id: I98ec66f1fdc5f99cc2432d7a1cddb63f4b9f3c30
Fixes: ca19890840 ("PCI: rockchip: Fix wrong transmitted FTS count")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit fd7c054e782d57509b2355ab71b786d83ab44194)
2016-11-23 17:34:00 +08:00
Shawn Lin
6c71bcdab9 UPSTREAM: PCI: rockchip: Add quirk to disable RC's ASPM L0s
Rockchip's RC outputs 100MHz reference clock but there are
two methods for PHY to generate it.

(1)One of them is to use system PLL to generate 100MHz clock and
the PHY will relock it and filter signal noise then outputs the
reference clock.

(2)Another way is to share Soc's 24MHZ crystal oscillator with
PHY and force PHY's DLL to generate 100MHz internally.

When using case(2), the exit from L0s doesn't work fine occasionally
due to the broken design of RC receiver's logical circuit. So even if
we use extended-synch, it still fails for PHY to relock the bits from
FTS sometimes. This will hang the system.

Maybe we could argue that why not use case(1) to avoid it? The reason
is that as we could see the reference clock is derived from system PLL
and the path from it to PHY isn't so clean which means there are some
noise introduced by power-domain and other buses can't be filterd out
by PHY and we could see noise from the frequency spectrum by oscilloscope.
This makes the TX compatibility test a little difficult to pass the spec.
So case(1) and case(2) are both used indeed now. If using case(2), we
should disable RC's L0s support, and that is why we need this property to
indicate this quirk.

Also after checking quirk.c, I noticed there is already a quirk for
disabling L0s unconditionally, quirk_disable_aspm_l0s. But obviously we
shouldn't do that as mentioned above that case(1) could still works fine
with L0s.

Change-Id: Ia9506d55f34a24001c19d398a8ecb088558c0f7e
Reported-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: Brian Norris <briannorris@chromium.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit c2af19ee1b5e0f0ef942d27b18f7e22e2ab43cba)
2016-11-23 17:33:57 +08:00
Shawn Lin
5171051438 UPSTREAM: PCI: rockchip: cleanup bit definition for PCIE_RC_CONFIG_LCS
PCIE_RC_CONFIG_LCS contains control and status bits specific
to the PCIe link. The layout for this register looks the same
as the existed PCI_EXP_LNKCTL and PCI_EXP_LNKSTA. So let's
reuse them.

Change-Id: I3e2b88d9c12f2bf924a3d6b8f2254904f9b594b2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 144ded1828f015f1a53d50bce730ed15f17ff38f)
2016-11-23 17:33:54 +08:00
Shawn Lin
3e7f5b5c51 UPSTREAM: arm64: dts: rockchip: add three new resets for rk3399 PCIe
pm_rst, aclk_rst and pclk_rst should be controlled by driver, so we
need to add these three resets for PCIe controller.

Change-Id: I364d8d0cb57d9d349153d76189f1e20e40e32704
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 4d3222f707)
2016-11-23 17:33:51 +08:00
Shawn Lin
42d4647d63 UPSTREAM: PCI: rockchip: Add three new resets as required properties
pm_rst, aclk_rst, pclk_rst was controlled by rom code so the
software wasn't needed to control it again in theory. But it
didn't work properly, so we do need to do it again and add a
enough delay between the assert of pm_rst and the deassert of
pm_rst. The Soc intergrated with this controller, rk3399 is still
under MP test internally, so the backward compatibility won't be
a big deal.

Change-Id: I07e02c5dcd6985ce7d16dde18bf0390674a0adbf
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 31a3a7b5b2)
2016-11-23 17:33:47 +08:00
Shawn Lin
049f6180c3 UPSTREAM: PCI: rockchip: remove the pointer to L1 substate cap
Per the errata of TRM, the RC can't support L1 substate, so we
need to remove the L1 substate cap as well as operation for
PCIE_RC_CONFIG_L1_SUBSTATE_CTRL2.

Change-Id: If3e1e7ac46720c9487724f15b22905a02bebb7ca
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 9d7598543b5fa2dacd7ccdffe9e03b578a9a03d1)
2016-11-23 17:33:44 +08:00
Shawn Lin
9d5d5ab0dc UPSTREAM: PCI: rockchip: Specify the link capability
rk3399 supports PCIe 2.x link speeds marginally at best, and on some
boards, the link won't train at 5 GT/s at all. Rather than sacrifice
500ms waiting for training that will never happen, let's use the helper
function, of_pci_get_max_link_speed, to get the max link speed from DT
and specify link capability.

Change-Id: I899df707f0555eea8ae4a370b171a4786162bb90
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 9d4052126b0deeb67552580ffe7f6383e0123c62)
2016-11-23 17:33:41 +08:00
Shawn Lin
d776fdb776 UPSTREAM: of/pci: Add helper function to parse max-link-speed from dt
This new helper function could be used by host drivers to
get the limitaion of max link speed provided by dt. If the
property isn't assigned or is invalid, it will return -EINVAL
to the caller.

Change-Id: I430b05fa5fd25fe17cf1bd8b1226e460eb7dd14b
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 9a1dc38912)
2016-11-23 17:33:37 +08:00
Shawn Lin
2928d69ec4 UPSTREAM: Documentation/devicetree: Add new property to specify the max link speed
Some of the host drivers have the requirement of knowing whether the
EP would never train at some link speed at all. For instance, on some
boards, the link won't train at 5 GT/s but the host driver still sacrifice
some cycle to wait for the resule of training at 5 GT/s as the host could
actually support 5 GT/s. So we could parse this new property and make the
host drivers be aware of these cases.

Change-Id: I7f557282462a7146d8d15af560001c81ccc7e1a7
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 2fa39159b6)
2016-11-23 17:33:34 +08:00
Shawn Lin
c2b181bebf UPSTREAM: PCI: rockchip: fix wrong negotiated lanes calculation
The calculation of negotiated lanes is wrong since it should
be shifted by PCIE_CORE_PL_CONF_LANE_SHIFT, but it is shifted
by PCIE_CORE_PL_CONF_LANE_MASK. Let's fix it.

Change-Id: I164d07c86e944fdab7c1a3100c87fdd24ec0ee82
Fixes: commit e77f847df5 ("PCI: rockchip: Add Rockchip PCIe controller support")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 898a2301cf002e1d96c0d56e41131a0d57cacb65)
2016-11-23 17:33:31 +08:00
Shawn Lin
01ab7a656c UPSTREAM: PCI: rockchip: Add Kconfig COMPILE_TEST
Allow selection of the Rockchip driver for compile testing, even if we
aren't building for ARCH_ROCKCHIP.

Change-Id: Ibc554863e067aaa1f785d5f26423a10d0962f68b
[bhelgaas: changelog]
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit cd075fd9742b1c4bc6e11121f688ef2ff74deb84)
2016-11-23 17:33:27 +08:00
Shawn Lin
21d3c20e02 UPSTREAM: PCI: rockchip: Mark RC as common clock architecture
The default value of common clock configuration is
zero indicating Rockchip's RC is using asynchronous
clock architecture but actually we are using common
clock. This will confuses some EP drivers if they
need some different settings referring to this value.
So let's fix it.

Change-Id: Idc3bf918db1a0b2366010819972d231cdbceca2d
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit f4acd83a6c303ef72a42e9ea2c8c12298d333a66)
2016-11-23 17:33:22 +08:00
Shawn Lin
8c99c3fed1 UPSTREAM: PCI: rockchip: Provide captured slot power limit and scale
If vpcie3v3 is available, we could provide these information
via RC's configure register to make EP able to know the power
limit.

Change-Id: I73f3ea163a24a9a03078436e0a4b6303482c123c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(am from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
commit 7cfdc39fadfdf5728e79a43242ff6b13e298c086)
2016-11-23 17:33:01 +08:00
Huang, Tao
9d201a0303 arm64: rockchip_defconfig: disable unused ethernet driver
Change-Id: I61a9e326368378674527ed2ee59ed4da8cdc680a
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-11-23 11:59:39 +08:00
Rhyland Klein
e342aa4666 UPSTREAM: power_supply: fix return value of get_property
power_supply_get_property() should ideally return -EAGAIN if it is
called while the power_supply is being registered. There was no way
previously to determine if use_cnt == 0 meant that the power_supply
wasn't fully registered yet, or if it had already been unregistered.

Add a new boolean to the power_supply struct to simply show if
registration is completed. Lastly, modify the check in
power_supply_show_property() to also ignore -EAGAIN when so it
doesn't complain about not returning the property.

Change-Id: I8a710802534c033d64589d8d213eeaa36d9cc7d7
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from commit e380538529)
2016-11-22 11:40:28 +08:00
Shawn Lin
a3da9a9bfe UPSTREAM: thermal: rockchip: improve the warning log
It is no necessary to print warning agian and again if we don't
add rockchip,grf for dt, otherwise I saw the following log when
doing suspend-2-resume. We only need to print it once when parsing
dt. It looks quite trivial but the log is apparently verbose.

[   26.615415] PM: early resume of devices complete after 1.539 msecs
[   26.622002] rk_tsadcv2_initialize: Missing rockchip,grf property
[   26.629359] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[   26.639794] PM: resume of devices complete after 18.109 msecs
[   26.646925] Restarting tasks ... done.

Change-Id: Ia3124f557e2b4f47c691671d27ea6a0f136f3f6f
Reviewed-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org evalenti/linux-soc-thermal.git next
 commit 947d62b53ff381d1ca4b3288b53a26c6d38957aa)
2016-11-22 11:40:27 +08:00
Shawn Lin
7c6edaf7e9 UPSTREAM: dt-bindings: rockchip-thermal: fix the misleading description
"rockchip,hw-tshut-temp", "rockchip,hw-tshut-mode" and
"rockchip,hw-tshut-polarity" are not a required properties
actually as the code could also work by loading the default
settings there. So it is apprently misleading, although we
prefer to get these from DT. And it seems we miss the 'rockchip,grf'
here which should also be an optional property.

Change-Id: I5ae62b7137f88da40475caec3b6d43a00219d85d
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org evalenti/linux-soc-thermal.git next
 commit 38e133ee6ea54bdfbe64c0e57bea4bc1e616c19a)
2016-11-22 11:40:27 +08:00
wlq
df397a416d arm64: dts: rk3399-vr: set headset_gpio GPIO_ACTIVE_LOW
Change-Id: I37f7eddd4aff08ba7fb4d2e3299485f58c8ac826
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-11-18 18:29:52 +08:00
Jacob Chen
0b5a794966 ARM: rockchip: clean mach-rockchip folder
We don't need those files from 3.10, so remove it to make it tidy

Change-Id: Iba08ac60d94e5dd014674a4b2c017020993abe60
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-18 14:42:23 +08:00
Jacob Chen
4a9fc9e1c1 arm64: configs: synchronize with other 3399 config for 3399 linux
add more driver config and architecture config

Change-Id: I55900807579a2fdaa8a31baaa3ed087c115f88c3
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-18 10:23:34 +08:00
Bin Yang
eeead531db arm64: dts: rockchip: Add rk3399 mid dts for drm
Change-Id: I7aa309ef7c4cd0ec34ab030f7798d7b778e897c6
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-11-18 09:21:18 +08:00
wenping.zhang
f69392b717 phy: phy-rockchip-typec: select phy select bit before TCPHY enter A2.
Set phy select bit in typec driver instead of setting it in dp driver,
which is used to fix dp phy power on failed error if only use typec1
as dp output.

Change-Id: I3949305724f5b3c12dc2f0ffefcbe4abf26d43dd
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-11-17 12:03:16 +08:00
wenping.zhang
8b339fd608 video: rockchip: dp: remove dp phy select operation in dp driver.
Previous code select dp phy by dp->port->id, but this id can't
indicate the phy id, and it will introduce a phy power on bug if
we only use typec1 as dp output, so we move these code to typec
phy driver.

Change-Id: If809efe9138b186b060e6c7467473f2d3192bc7e
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-11-17 12:03:04 +08:00
Jacob Chen
bfcf8ff1b4 arm64: dts: rockchip: add touscreen for excavator linux
Change-Id: I8fb62eea9667c6c1c646b70fd9d10671b07957a2
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-17 10:17:23 +08:00
Mark Yao
6970130723 fbdev/fb_notify: fix blank_mode pointer crash
When fb event is not blank event, use *((int *)event->data) for
blank_mode is very dangerous, see follow code on
drivers/video/fbdev/core/fbmem.c:
	struct fb_event event;
	event.info = fb_info;
	fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);

On FB_EVENT_FB_REGISTERED event, event->data is not initial,
so get value from *(int*)event->data would crash.

crash:
[    0.909647] Unable to handle kernel paging request at virtual address
12c000000000
[    0.915506] pgd = ffffff8009147000
[    0.915808] [12c000000000] *pgd=00000000f6ff9003, *pud=00000000f6ff9003, *pmd=0000000000000000
[    0.916577] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[    0.917067] Modules linked in:
[    0.917347] CPU: 4 PID: 51 Comm: kworker/u12:1 Not tainted 4.4.30
[    0.917919] Hardware name: Rockchip RK3399 Evaluation Board v1 (Android) (DT)
[    1.098438] [<ffffff8008729fb0>] rkvr_fb_event_notify+0x38/0x18c
[    1.098976] [<ffffff80080b8c7c>] notifier_call_chain+0x48/0x80
[    1.099499] [<ffffff80080b8fb8>] __blocking_notifier_call_chain+0x48/0x64
[    1.100104] [<ffffff80080b8fe8>] blocking_notifier_call_chain+0x14/0x1c
[    1.100699] [<ffffff80083e4abc>] fb_notifier_call_chain+0x44/0x50
[    1.101242] [<ffffff80083e6da8>] register_framebuffer+0x1bc/0x288
[    1.101790] [<ffffff8008431e00>] drm_fb_helper_initial_config+0x2c0/0x354
[    1.102395] [<ffffff80084630e4>] rockchip_drm_fbdev_init+0xc8/0x104
[    1.102957] [<ffffff8008459fec>] rockchip_drm_load+0x91c/0x9c4
[    1.103478] [<ffffff800843a4c0>] drm_dev_register+0x78/0xc0
[    1.103978] [<ffffff8008458c0c>] rockchip_drm_bind+0x64/0x90
[    1.104488] [<ffffff800849e93c>] try_to_bring_up_master.part.3+0xb0/0x118
[    1.105093] [<ffffff800849eb68>] component_master_add_with_match+0xcc/0x12c
[    1.105714] [<ffffff80084591e0>] rockchip_drm_platform_probe+0x198/0x1c8
[    1.106313] [<ffffff80084a55b0>] platform_drv_probe+0x58/0xa4
[    1.106827] [<ffffff80084a38a0>] driver_probe_device+0x114/0x280
[    1.107362] [<ffffff80084a3b5c>] __device_attach_driver+0x88/0x98
[    1.107905] [<ffffff80084a1d7c>] bus_for_each_drv+0x7c/0xac
[    1.108402] [<ffffff80084a36d8>] __device_attach+0xa8/0x128
[    1.108900] [<ffffff80084a3ca0>] device_initial_probe+0x10/0x18
[    1.109427] [<ffffff80084a2d1c>] bus_probe_device+0x2c/0x8c
[    1.109924] [<ffffff80084a3170>] deferred_probe_work_func+0x74/0xa0
[    1.110486] [<ffffff80080b2e34>] process_one_work+0x218/0x3e0
[    1.111001] [<ffffff80080b3530>] worker_thread+0x24c/0x374
[    1.111490] [<ffffff80080b7dbc>] kthread+0xe8/0xf0
[    1.111922] [<ffffff8008082690>] ret_from_fork+0x10/0x40

Change-Id: I11f667830d913430d9e0b4da2b391815d335ecb8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-11-16 18:39:24 +08:00
Finley Xiao
566b5eccd9 arm64: dts: rockchip: add efuse device node for rk3366
Add a efuse node in the device tree for the ARM64 rk3366 SoC.

Change-Id: I163003e7e181645579a2af53003892ba46646706
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-11-16 18:34:12 +08:00
Finley Xiao
ba4815a63a nvmem: rockchip-efuse: add rk3366-efuse support
This adds the necessary data for handling efuse on the rk3366.

Change-Id: Ia9b03776172c9a66faa7320f7e1890549538a32a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-11-16 18:33:48 +08:00
Finley Xiao
126dca84f6 clk: rockchip: add clock ids for efuse on RK3366
Set the newly added id for efuse, so that they can be called
in other parts.

Change-Id: Id372ca207901aed689304f862412b2cf1e08fa80
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-11-16 18:33:39 +08:00
Huang, Tao
7e8031c929 input: sensors: fromdos and remove trailing whitespace
Change-Id: I6799f2538f95953d1565ac805497161ce6043855
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-11-16 11:32:49 +08:00
Jianqun Xu
7df2b3aa6a UPSTREAM: clk: rockchip: rk3399: fix copy-paste error
Fix RK3368_* to RK3399_* for rk3399 clk_test clock.

Change-Id: I3be8f582ab9a0ee484bf47e2090f020bbd4a7c72
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9430735/)
2016-11-16 09:36:52 +08:00
Jianqun Xu
70a3805ce8 clk: rockchip: remove more CLK_IGNORE_UNUSED for rk3399 clocktree
Optimize rk3399 clocktree by removing CLK_IGNORE_UNUSED of some clocks.

clocks will managered by usb:
- clk_usbphy0_480m_src
- clk_usbphy1_480m_src
- clk_usbphy_480m

clocks will be managered by pvtm:
- clk_pvtm_core_l
- clk_pvtm_core_b
- clk_pvtm_ddr

clocks will be managered by dfi:
- pclk_ddr_mon
- clk_dfimon0_timer
- clk_dfimon1_timer
- aclk_dcf
- pclk_dcf

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9410123/)

Change-Id: I9c32423cafde00fc47673638633ca0c884253f36
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-11-15 22:10:37 +08:00
Lin Huang
1ddc04a608 CHROMIUM: devfreq: rockchip: remove wait dcf irq evnet
We have already wait dcf done in ATF, so don't need wait dcf irq
in kernel, besides, clear dcf irq in kernel will import competiton
between kernel and ATF, only handle dcf irq in ATF is a better way.

BUG=chrome-os-partner:54651
TEST=Boot from kevin

Change-Id: Ibfc460bebb86eb72a218fbf39176d30320da2c57
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-11-15 22:08:01 +08:00
Jacob Chen
c4285231b0 arm64: configs: add some devfreq gov for rk3399 linux
gpu dvfs need SIMPLE_ONDEMAND

Change-Id: I7f3247a7571e40cbfe929996d1c4db4b11ea63a5
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-15 22:05:59 +08:00
Jacob Chen
540fae5d85 arm: configs: add some devfreq gov for rk3288 linux
add more devfreq gov to let driver choose it.

Change-Id: Id47b519e1f41311283bf3f38b94cae3b8480aff4
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-15 22:05:45 +08:00
Huang Jiachai
f658b81102 video: rockchip: fb: fix inconsistent returns 'mutex:&dev_drv->front_lock'
Change-Id: If937a6cbc6d89ff0b4dbd2f540a87da1af3c4123
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-11-15 22:05:00 +08:00
Huang Jiachai
766e5dbd77 video: rockchip: fb: add api to enable mirror for VR
Change-Id: Ic9a6409f0243896021eb94df3600cdc2fc3db637
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-11-15 22:03:46 +08:00
Huang Jiachai
86b1015161 video: rockchip: fb: update for x and y mirror
Change-Id: Ieca4a74af4b4ca2f5d90e7387601e2f87b0ac883
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-11-15 22:03:16 +08:00
Jacob Chen
39e554c988 arm: configs: enable devfreq thermal for rk3288 linux
to enable gpu

Change-Id: I818b27927847bb1c62f60eb4b0335d1818f30dff
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-15 16:29:05 +08:00
Jacob Chen
7df2e5676d arm64: confis: enable devfreq thermal for rk3399 linux
to enable gpu freq

Change-Id: I8db7106d34592eb9f90b31838f60aba20313bdb5
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-15 16:28:45 +08:00
Jacob Chen
d3459ace11 arm64: configs: enable thermal fair share for rk3399 linux
Change-Id: Ic69b404e075dfe2999b88eb5c808e01c10a97d0d
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-11-15 16:28:33 +08:00
Sasha Levin
2303a7faef UPSTREAM: signals: avoid random wakeups in sigsuspend()
A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
being set.

Avoid that by making sure we were signaled, like sys_pause() does.

Change-Id: Ie647d2797416c6e53628174a07b62246e23081e7
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 823dd3224a)
2016-11-15 12:00:57 +08:00
huweiguo
03b8ccabe5 net: rkwifi: auto recognize nvram file
Change-Id: Ia90c2657f9abf301882678e15ea18c2c17720be1
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-11-15 09:54:17 +08:00
chenzhen
89501d8dd3 MALI: midgard: RK: slowdown clk_gpu before poweroff cores
This is a workaround for the issue that
"400M, 500M and 600M of clk_gpu needs high vdd_gpu",
according to "6.2" of Mali Application Note
"Potential glitches on Power Domain interfaces".

Change-Id: I8b8eccd2079e21ac5e1db7b4552c8f998f676a9f
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-11-14 14:29:00 +08:00
chenzhen
d94880b547 Revert "MALI: midgard: RK: not to power off all the pm cores"
This reverts commit 47a9fbf6c4de1dddaf82ed9159307f8ba039f85c.

Change-Id: I4cfc36a5dab7e6cb4a766995d456301c54728498
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-11-14 11:21:59 +08:00
Finley Xiao
1867dd08ec arm64: dts: rockchip: rk3399: modify gpu opp table for evb board
margin 25mV-50mV, stress test:
1. antutu-3d, use governor simpleondemand
2. webgl, fish number 50, sweep frequency
3. glmark2, run texture and shadow, sweep frequency

Change-Id: Ia2682610e948df7df2ad190ac3a28b2dad464cb3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-11-14 11:11:22 +08:00
David Wu
b572f41a8f pinctrl: rockchip: Fix smatch warning
This patch fix the following warning:
drivers/pinctrl/pinctrl-rockchip.c:1415 rockchip_set_drive_perpin() warn: inconsistent returns 'spin_lock:&bank->slock'.
  Locked on:   line 1377
               line 1384
               line 1393
  Unlocked on: line 1306
               line 1333
               line 1342
               line 1352
               line 1406
               line 1415
drivers/pinctrl/pinctrl-rockchip.c:1415 rockchip_set_drive_perpin() warn: inconsistent returns 'irqsave:flags'.
  Locked on:   line 1377
               line 1384
               line 1393
  Unlocked on: line 1306
               line 1333
               line 1342
               line 1352
               line 1406
               line 1415

Change-Id: I3f97010fbc283084f06b83afcc46ab684d2a11c3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-11-14 08:29:48 +08:00