Commit Graph

598987 Commits

Author SHA1 Message Date
xubilv
fa80432293 arm64: dts: rk3399: dual display for hdmi and dp
hdmi connect vopb and dp connect vopl

Change-Id: Ib6a4771ab86ebe5dbfc21d1401e6768bcac7d36b
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-12-30 19:29:40 +08:00
Zhangbin Tong
693182d043 arm64: dts: rockchip: Add rk3399 box dts for drm
Change-Id: I7a518826c7d6701dc68f2eb5cca629f82fb92365
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-12-30 14:02:28 +08:00
Zhangbin Tong
0edc501e24 ARM64: dts: rk3399: support for box rev2
rk3399 box rev1 and rev2 use gpio control for enable/disable vdd_cpu_b
rev1 use GPIO1_C1(default pull-down), rev2 use GPIO_C2(default pull-up)

Change-Id: I9ddbcff688905386d2d52f680cbb5f93d6c8d526
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-12-30 14:02:18 +08:00
Jacob Chen
49b007b1f9 MALI: midgard: RK: manual define configs
otherwise it won't defined since we don't include it in kconfig

Change-Id: I6886068f89d53f3ecf47846ed7435131fdd7960f
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-29 14:44:10 +08:00
Jacob Chen
d7efe756f6 arm: dts: correct cpu opp point for rk3288
Change-Id: I7f0a6cfe68d91faee492ceac4fb2e02827205317
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-29 14:41:21 +08:00
Jacob Chen
2718c0cf1e MALI: midgard: RK: add separate src dir of Midgard driver for RK Linux device
The version of Midgard DDK used in RK Linux device is different from the one
used in Android platforms.
It might be convenient to have a separate src directory for it.

The new directory drivers/gpu/arm/midgard_for_linux is copied from
drivers/gpu/arm/midgard of commit 206f372ede.
It's on DDK r9p0-05rel0
There are also a few modifications in some 'Kbuild' files.

A new config MALI_MIDGARD_FOR_LINUX is introduced to specify which directory
of Midgard to use.
If defined, kbuild will compile src files under
drivers/gpu/arm/midgard_for_rk_linux_device,
otherwise, drivers/gpu/arm/midgard.

There is already a source directory of Midgard driver,
the 'Kconfig' file of the new directory is not be involved
in kconfig process.
Otherwise, there are problems caused by configs
with the same names in the two directories.
So, "midgard_for_rk_linux_device" could not be configured via menuconfig.

In the new directory, all the default configs are defined in default_config.mk.
'Kbuild' files include it.

Change-Id: I54f61cc50f7a168a742db7a11c6b6eebe21528f8
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-29 14:40:01 +08:00
Zhangbin Tong
57e81d9f6c ARM64: dts: rk3399-box: Use gpio control for enable/disable of syr82x buck
Change-Id: I9e03084c93ffff5d8ea79ed037656ce8d6615226
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-12-29 11:44:09 +08:00
Zhou weixin
f8d1e3ce92 ARM64: dts: rk3399-tve1205g: retain battery led state in suspend
Change-Id: Ie605d3d3e0275812f5a360bbcd533c8b954a9159
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-29 10:35:55 +08:00
Zhou weixin
73475ee202 HID: i2c-hid: do not reset hid if device support wakeup when resume
The host will trigger the hid interrupt to after reset hid, then send
wakeup key to light up screen,so any wakeupirq source will light up
screen due to reset hid in resume, and hid hwreset is not necessary.

Change-Id: I920239eeb4b57b0f594cc67cb8f4c1649c5125bd
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-29 10:35:19 +08:00
Chris Zhong
209d523141 arm64: rockchip_cros_defconfig: enable cdn dp machine driver
Change-Id: Ia4755126ca13c8c389a498a0c87e66d6357888b6
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-12-29 10:02:40 +08:00
Chris Zhong
d41e051daf arm64: dts: rockchip: enable cdn dp machine driver for rk3399-evb-cros
Change-Id: I97bebe09b83d5a3d9a964cf7dbaf63dbb11daffb
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-12-29 10:02:02 +08:00
Chris Zhong
a5a925f44f ASoC: rockchip: Add machine driver for cdn DP
Change-Id: Id5fe7eee2bf1e73103d71f61a2b98aeaf0ea48b1
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-12-29 09:59:32 +08:00
Xubilv
9824749a55 video: rockchip: mipi-dsi: Dynamic allocation command buf size
Change-Id: Ieb2ce472dc137ecf83f588e68b5e747dcbca3a20
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-12-28 09:51:34 +08:00
Simon
de1e427839 ion: reorder pages for scatterlist
Change-Id: I3a25eba9d65ac1345471321f61ae9d7a959a1be6
Signed-off-by: Simon <xxm@rock-chips.com>
2016-12-27 18:53:56 +08:00
wlq
cf34c4b7e9 input: touchscreen: fix tp gslx680 irq number bug
Change-Id: Ic0addb0064dea5ef86741119557fd4945d1aed13
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-12-27 18:40:28 +08:00
wjh
60c8cefeb7 video: hdmi: remove unuse dp timing for Rk3399 disvr
Change-Id: I783b4b7b3cdfad321b8c5bed2ce9b80fecbb3688
Signed-off-by: wjh <wjh@rock-chips.com>
2016-12-27 15:37:43 +08:00
Arnd Bergmann
cebfd3995e phy: rockchip-inno-usb2: select USB_COMMON
When USB is disabled, we get a link error for this driver
because of the added OTG support

drivers/phy/phy-rockchip-inno-usb2.o: In function `rockchip_usb2phy_otg_sm_work':
phy-rockchip-inno-usb2.c:(.text.rockchip_usb2phy_otg_sm_work+0x1f4): undefined reference to `usb_otg_state_string'
drivers/phy/phy-rockchip-inno-usb2.o: In function `rockchip_usb2phy_probe':
phy-rockchip-inno-usb2.c:(.text.rockchip_usb2phy_probe+0x2c8): undefined reference to `of_usb_get_dr_mode_by_phy'

Other phy drivers select USB_COMMON for this, so let's do the same
here.

Change-Id: I088b5862157d35360a30f21c8ed56a2a85792d53
Fixes: 0c42fe48fd23 ("phy: rockchip-inno-usb2: support otg-port for rk3399")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-27 11:11:14 +08:00
Frank Wang
6e5aa40fa5 phy: rockchip-inno-usb2: add COMMON_CLK dependency
On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2
driver fails to build:

drivers/phy/phy-rockchip-inno-usb2.c:124:16: error: field 'clk480m_hw'
has incomplete type
   struct clk_hw clk480m_hw;

In file included from include/linux/clk.h:16:0
                 from drivers/phy/phy-rockchip-inno-usb2.c:17:
include/linux/kernel.h:831:48: error: initialization from incompatible
pointer type [-Werror=incompatible-pointer-types]
   const typeof( ((type *)0)->member ) *__mptr = (ptr); \

  ... ...

Change-Id: I951d89ee34625dea5dfc6eeca841f9a5c44bc951
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-27 11:08:29 +08:00
William Wu
35a7b255bc phy: rockchip-inno-usb2: correct 480MHz output clock stable time
We found that the system crashed due to 480MHz output clock of
USB2 PHY was unstable after clock had been enabled by gpu module.

Theoretically, 1 millisecond is a critical value for 480MHz
output clock stable time, so we try to change the delay time
to 1.2 millisecond to avoid this issue.

And the commit ed907fb1d7c3 ("phy: rockchip-inno-usb2: correct
clk_ops callback") used prepare callbacks instead of enable
callbacks to support gate a clk if the operation may sleep. So
we can switch from delay to sleep functions.

Also fix a spelling error from "waitting" to "waiting".

Change-Id: Ie9883e5e9a3f0c2edec9d259b844ca536348c9cf
Signed-off-by: William Wu <wulf@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2016-12-27 10:56:18 +08:00
William Wu
3f49b1a0a4 phy: rockchip-inno-usb2: correct clk_ops callback
Since we needs to delay ~1ms to wait for 480MHz output clock
of USB2 PHY to become stable after turn on it, the delay time
is pretty long for something that's supposed to be "atomic"
like a clk_enable(). Consider that clk_enable() will disable
interrupt and that a 1ms interrupt latency is not sensible.

The 480MHz output clock should be handled in prepare callbacks
which support gate a clk if the operation may sleep.

Change-Id: I943e17f8a97d1229fefd8c1ada706e0c450c98eb
Signed-off-by: William Wu <wulf@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2016-12-27 10:51:30 +08:00
WeiYong Bi
8fa8918ac2 arm64: configs: add vpu related config for rk3399 linux
Change-Id: I599940d16b7e3f9777221f31d1bca4f9e4e206e4
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-27 08:29:57 +08:00
huweiguo
85fd85cc88 net: rkwifi: enable CONFIG_BCMDHD_AG=y by default
Change-Id: Ibe8c13252a134672f4cdaa1c62d82092378b2eb5
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-26 20:09:43 +08:00
Finley Xiao
a3c6493573 ARM: dts: rk3288: use operating-points-v2
Change-Id: I3cb938fbfaf0ae5957d4832f4ad5671ab9631409
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 20:08:09 +08:00
Zikim,Wei
92c9974ec6 video/rockchip: fix rga2 get version from reg
Change-Id: Ia960791f8346a132389cb7f43f0f7ff801465abc
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
2016-12-26 20:05:11 +08:00
zhangjun
f30d9c25a8 arm64: dts: rk3399-tve1205g: deploy audio configurations
Change-Id: I41ebc8a11c74536ed51720c07fbfe1817342907d
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-12-26 18:07:36 +08:00
Bin Yang
7b2ee306c7 arm64: dts: rockchip: add usb camera pd pin control for rk3399-tve1205g
Change-Id: Iee039f3085832861dee5a99da2cbbbec2a08f509
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-26 17:54:03 +08:00
Bin Yang
62564b2183 arm64: rockchip_defconfig: add usb camera pd pin control support
Change-Id: If7542a913eab0e36c586005d5bcfbb2b9cabb5d7
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-26 17:53:13 +08:00
Bin Yang
3344984bec misc: add usb camera pd pin control driver
Change-Id: Id6ad835c2fff43167a52f90c19e7e6dfe93a4655
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-26 17:52:11 +08:00
Sugar Zhang
3014473755 ASoC: rockchip: i2s: add support for i2s bclk fs configuration
this patch add support for i2s bclk fs configuration, we can
configure bclk_fs by devicetree as required.

Change-Id: I7e034e0466793b5b9eab6566a43e90213f219bb0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-12-26 17:50:51 +08:00
wenping.zhang
2bd4ff7162 video: rockchip: dp: fix dp connected issue which caused by hpd signal.
some device will triggered hpd after dp is connected, so we don't do
traning if dp lanes is not changed.

Change-Id: I3e329e7d2db33138f283ad6584b966ebd0619f65
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-26 17:49:58 +08:00
William Wu
e40c0e2bb5 usb: dwc3: rockchip: support to set testmodes via debugfs
This patch create host_testmode file in debugfs for
USB HOST. It's useful for us to use a scope to verify
signal integrity for USB2/USB3 HOST.

For example, set testmodes for RK3399 board USB:
1. set Test packet for Type-C0 USB2 HOST:
   echo test_packet > /sys/kernel/debug/usb@fe800000/host_testmode

2. set compliance mode for Type-C0 USB3 HOST normal orientation:
   echo test_u3 > /sys/kernel/debug/usb@fe800000/host_testmode

3. set compliance mode for Type-C0 USB3 HOST flip orientation:
   echo test_flip_u3 > /sys/kernel/debug/usb@fe800000/host_testmode

4. check the testmode status:
   cat /sys/kernel/debug/usb@fe800000/host_testmode

   The log maybe like this:
   U2: test_packet     /* means that U2 in test mode */
   U3: compliance mode /* means that U3 in test mode */

Change-Id: Ic7e464b0443c792848846246b782ffba30bf2120
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-26 17:49:03 +08:00
Finley Xiao
c15ca6e0d1 PM / AVS: rockchip-cpu-avs: use a new way to get cluster id
The returned value of topology_physical_package_id is socket id
on ARM32 system(for example, RK3288), it's not like the cluster id
on ARM64 system(for example, RK3366), so use a new way.

Change-Id: I5b2cdfdcdaa56c71df394caa2588f6e83931a293
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 17:48:20 +08:00
Viresh Kumar
2cfe35d495 UPSTREAM: cpufreq: Send START policy notification after sending CREATE
The sequence got a bit wrong as we are sending CPUFREQ_START
notifications even before we have sent CPUFREQ_CREATE_POLICY.

Fix it.

Change-Id: I7d1fba317314bb5e5601b1354494398def156424
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 388612baba)
2016-12-26 17:46:23 +08:00
Finley Xiao
7ac7e477b6 arm64: dts: rockchip: rk3366: add cpu avs node
Change-Id: I7d984bf44e04d205c243eb2012cd06ba7c7fe548
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 17:45:55 +08:00
Shunqing Chen
2718b444f3 ARM64: dts: rk3399-tve1205g: host state notify ec module through gpio
Change-Id: I3716de0618394de010000a0497de1b3c83cd88ab
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-26 17:45:22 +08:00
Shunqing Chen
c76f182c49 power: host state notify ec module through gpio
Change-Id: I6b1401c6959a05fce1d6d7ca7a5fb581782fd30d
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-26 17:45:08 +08:00
wenping.zhang
9c88c3dac1 mfd: fusb302: fix fusb302 disconnect error.
shift the time of vbus enable before attach debounce started,
and merge the code of get_cc from chrome ec driver, which used
to fix connection disconnected issue.

Change-Id: I2fd1f83d0265b3770d75a59d622d0f650d737c5b
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-26 14:56:33 +08:00
huweiguo
7925bc3557 net: rkwifi: enable GET_CUSTOM_MAC_ENABLE
Change-Id: I8ea15be317e4bbe1d9cf0834e42536fc4dc4b9d7
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-26 14:18:34 +08:00
Finley Xiao
d505707379 arm64: dts: rockchip: rk3399: Rename OPP nodes as opp@<opp-hz>
It would be better to name OPP nodes as opp@<opp-hz> as that will ensure
that multiple DT nodes don't contain the same frequency. Of course we
expect the writer to name the node with its opp-hz frequency and not any
other frequency.

And that will let the compile error out if multiple nodes are using the
same opp-hz frequency.

Change-Id: I8c77646329e39390fb135d4d75d34893a8168876
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 12:02:00 +08:00
Finley Xiao
0d418c6105 arm64: dts: rk3399: modify opp table according to latest chips
Change-Id: I2a1b5fac74617cf57a5655411f0326800a6a990d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 12:01:28 +08:00
WeiYong Bi
791aa7dedc arm64: dts: rockchip: support use drm on rk3399 excavator linux
1. fixup edp enable gpio.
2. add backlight enable gpio.
3. enable route_edp node.

Change-Id: I4b4792abe3c8eb7dba0c2f5c0d3ddffff74478d1
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 18:33:53 +08:00
WeiYong Bi
39e7667ca4 arm64: dts: rk3399_linux: support use drm on rk3399 linux
Change-Id: I9b248af7d86d34a669219fbe62a195ee2b49e516
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 18:33:45 +08:00
huweiguo
b58f60a9e8 net: rfkill-wlan: prior to use wifi addr store in vendor storage
Change-Id: I32ef43e1f47ee658675b26d54fa834ae9362382f
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-23 18:06:32 +08:00
Elaine Zhang
ccde3d690b ARM64: dts: rockchip: add power domain node for RK3328 Soc
add pd node for RK3328 Soc
create power domain tree

Change-Id: I0ef5729d397105a7992cb4b7440cdc2b251bd1af
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-23 18:03:26 +08:00
wenping.zhang
f2576a3f56 arm64: dts: rk3399-android: add core reset for dp.
Change-Id: I7c86cfbf28cb278bcadebbb08ba31a8b81bdd290
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-23 17:57:03 +08:00
wenping.zhang
3277fb894f video: rockchip: dp: fix dp fw load error.
Do dptx/apb/core reset on every dp clock enabling, otherwise dp
will fail to load the firmware sometimes.

Change-Id: Ied0caad99d865ec86162dead2b4769a53f8db12a
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-23 17:55:32 +08:00
WeiYong Bi
bd94271915 arm64: dts: rockchip: support use vpu on rk3399 excavator linux
Change-Id: I5ea28cd4539140a149f1725a1622fd1dcae3e020
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 17:50:14 +08:00
Mark Yao
2dc37ec50d drm/rockchip: gem: add mutex lock for drm mm
drm_mm_insert_node_generic and drm_mm_remove_node may access same
resource with list ops, it's not threads safe, so protect this context
with mutex lock.

Fix bug:
[49451.856244] ==================================================================
[49451.856350] BUG: KASAN: wild-memory-access on address dead000000000108
[49451.856379] Write of size 8 by task Binder:218_4/683
[49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
[49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[49451.856469] Call trace:
[49451.856519] [<ffffff900808a9d0>] dump_backtrace+0x0/0x230
[49451.856556] [<ffffff900808ac14>] show_stack+0x14/0x1c
[49451.856592] [<ffffff90084a4de0>] dump_stack+0xa0/0xc8
[49451.856633] [<ffffff900821b700>] kasan_report+0x110/0x4dc
[49451.856670] [<ffffff900821aa84>] __asan_store8+0x24/0x7c
[49451.856715] [<ffffff90086158c4>] drm_mm_insert_node_generic+0x2dc/0x464
[49451.856760] [<ffffff90086406a8>] rockchip_gem_iommu_map+0x60/0x158
[49451.856794] [<ffffff9008640bb4>] rockchip_gem_create_object+0x278/0x488
[49451.856827] [<ffffff9008641020>] rockchip_gem_create_with_handle+0x24/0x10c
[49451.856862] [<ffffff9008641364>] rockchip_gem_create_ioctl+0x3c/0x50
[49451.856896] [<ffffff900860aee4>] drm_ioctl+0x354/0x52c
[49451.856939] [<ffffff900823d948>] do_vfs_ioctl+0x670/0x78c
[49451.856976] [<ffffff900823dac4>] SyS_ioctl+0x60/0x88
[49451.857009] [<ffffff9008082ef0>] el0_svc_naked+0x24/0x28

Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-12-23 11:11:55 +08:00
Zhou weixin
ff541f79f1 ARM64: dts: rk3399-tve1205g: add wakeup support for hid keyboard
Change-Id: I21d0f6dac30f64b90c68f98c11c0cc7012e2b1b6
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 18:12:45 +08:00
Zhou weixin
578582392c HID: i2c-hid: add support wakeup
Change-Id: I15890509ff5983e1a8adaa48b28391ec67de8bb5
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 16:24:27 +08:00