firefly-linux-kernel-4.4.55.git
7 years agoUPSTREAM: drm: Add a callback from connector registering
Chris Wilson [Wed, 15 Jun 2016 12:17:47 +0000 (13:17 +0100)]
UPSTREAM: drm: Add a callback from connector registering

If a driver wants to more precisely control its initialisation and in
particular, defer registering its interfaces with userspace until after
everything is setup, it also needs to defer registering the connectors.
As some devices need more work during registration, add a callback so
that drivers can do additional work if required for a connector.

Correspondingly, we also require an unregister callback.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[danvet: go ocd and remvoe unecessary empty kerneldoc line.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465993109-19523-3-git-send-email-chris@chris-wilson.co.uk
(cherry-pick from commit aaf285e2e0ff490e924dbcdfd08e8274c3093354)

Change-Id: Ifb7513fb7eea2293d0f3705c0c00923c5f7fde0c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoarm64: dts: rk3399: dual display for hdmi and dp
xubilv [Fri, 30 Dec 2016 11:29:40 +0000 (19:29 +0800)]
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>
7 years agoarm64: dts: rockchip: Add rk3399 box dts for drm
Zhangbin Tong [Thu, 29 Dec 2016 07:12:47 +0000 (15:12 +0800)]
arm64: dts: rockchip: Add rk3399 box dts for drm

Change-Id: I7a518826c7d6701dc68f2eb5cca629f82fb92365
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
7 years agoARM64: dts: rk3399: support for box rev2
Zhangbin Tong [Thu, 29 Dec 2016 06:35:08 +0000 (14:35 +0800)]
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>
7 years agoMALI: midgard: RK: manual define configs
Jacob Chen [Thu, 29 Dec 2016 04:56:59 +0000 (12:56 +0800)]
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>
7 years agoarm: dts: correct cpu opp point for rk3288
Jacob Chen [Thu, 29 Dec 2016 03:31:38 +0000 (11:31 +0800)]
arm: dts: correct cpu opp point for rk3288

Change-Id: I7f0a6cfe68d91faee492ceac4fb2e02827205317
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoMALI: midgard: RK: add separate src dir of Midgard driver for RK Linux device
Jacob Chen [Thu, 29 Dec 2016 04:57:42 +0000 (12:57 +0800)]
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>
7 years agoARM64: dts: rk3399-box: Use gpio control for enable/disable of syr82x buck
Zhangbin Tong [Tue, 27 Dec 2016 02:40:35 +0000 (10:40 +0800)]
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>
7 years agoARM64: dts: rk3399-tve1205g: retain battery led state in suspend
Zhou weixin [Wed, 28 Dec 2016 12:53:01 +0000 (20:53 +0800)]
ARM64: dts: rk3399-tve1205g: retain battery led state in suspend

Change-Id: Ie605d3d3e0275812f5a360bbcd533c8b954a9159
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
7 years agoHID: i2c-hid: do not reset hid if device support wakeup when resume
Zhou weixin [Wed, 28 Dec 2016 06:28:54 +0000 (14:28 +0800)]
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>
7 years agoarm64: rockchip_cros_defconfig: enable cdn dp machine driver
Chris Zhong [Tue, 27 Dec 2016 13:04:14 +0000 (21:04 +0800)]
arm64: rockchip_cros_defconfig: enable cdn dp machine driver

Change-Id: Ia4755126ca13c8c389a498a0c87e66d6357888b6
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
7 years agoarm64: dts: rockchip: enable cdn dp machine driver for rk3399-evb-cros
Chris Zhong [Tue, 27 Dec 2016 13:05:16 +0000 (21:05 +0800)]
arm64: dts: rockchip: enable cdn dp machine driver for rk3399-evb-cros

Change-Id: I97bebe09b83d5a3d9a964cf7dbaf63dbb11daffb
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
7 years agoASoC: rockchip: Add machine driver for cdn DP
Chris Zhong [Fri, 25 Nov 2016 05:18:07 +0000 (13:18 +0800)]
ASoC: rockchip: Add machine driver for cdn DP

Change-Id: Id5fe7eee2bf1e73103d71f61a2b98aeaf0ea48b1
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
7 years agovideo: rockchip: mipi-dsi: Dynamic allocation command buf size
Xubilv [Tue, 27 Dec 2016 07:34:55 +0000 (15:34 +0800)]
video: rockchip: mipi-dsi: Dynamic allocation command buf size

Change-Id: Ieb2ce472dc137ecf83f588e68b5e747dcbca3a20
Signed-off-by: Xubilv <xbl@rock-chips.com>
7 years agoion: reorder pages for scatterlist
Simon [Fri, 23 Dec 2016 10:07:30 +0000 (18:07 +0800)]
ion: reorder pages for scatterlist

Change-Id: I3a25eba9d65ac1345471321f61ae9d7a959a1be6
Signed-off-by: Simon <xxm@rock-chips.com>
7 years agoinput: touchscreen: fix tp gslx680 irq number bug
wlq [Tue, 27 Dec 2016 07:36:21 +0000 (15:36 +0800)]
input: touchscreen: fix tp gslx680 irq number bug

Change-Id: Ic0addb0064dea5ef86741119557fd4945d1aed13
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
7 years agovideo: hdmi: remove unuse dp timing for Rk3399 disvr
wjh [Tue, 27 Dec 2016 07:37:43 +0000 (15:37 +0800)]
video: hdmi: remove unuse dp timing for Rk3399 disvr

Change-Id: I783b4b7b3cdfad321b8c5bed2ce9b80fecbb3688
Signed-off-by: wjh <wjh@rock-chips.com>
7 years agophy: rockchip-inno-usb2: select USB_COMMON
Arnd Bergmann [Wed, 16 Nov 2016 14:22:39 +0000 (15:22 +0100)]
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>
7 years agophy: rockchip-inno-usb2: add COMMON_CLK dependency
Frank Wang [Tue, 16 Aug 2016 06:13:42 +0000 (14:13 +0800)]
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>
7 years agophy: rockchip-inno-usb2: correct 480MHz output clock stable time
William Wu [Tue, 15 Nov 2016 03:54:07 +0000 (11:54 +0800)]
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>
7 years agophy: rockchip-inno-usb2: correct clk_ops callback
William Wu [Tue, 15 Nov 2016 03:54:06 +0000 (11:54 +0800)]
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>
7 years agoarm64: configs: add vpu related config for rk3399 linux
WeiYong Bi [Tue, 20 Dec 2016 06:54:36 +0000 (14:54 +0800)]
arm64: configs: add vpu related config for rk3399 linux

Change-Id: I599940d16b7e3f9777221f31d1bca4f9e4e206e4
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
7 years agonet: rkwifi: enable CONFIG_BCMDHD_AG=y by default
huweiguo [Mon, 26 Dec 2016 06:25:12 +0000 (14:25 +0800)]
net: rkwifi: enable CONFIG_BCMDHD_AG=y by default

Change-Id: Ibe8c13252a134672f4cdaa1c62d82092378b2eb5
Signed-off-by: huweiguo <hwg@rock-chips.com>
7 years agoARM: dts: rk3288: use operating-points-v2
Finley Xiao [Mon, 26 Dec 2016 06:10:28 +0000 (14:10 +0800)]
ARM: dts: rk3288: use operating-points-v2

Change-Id: I3cb938fbfaf0ae5957d4832f4ad5671ab9631409
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
7 years agovideo/rockchip: fix rga2 get version from reg
Zikim,Wei [Thu, 22 Dec 2016 07:15:34 +0000 (15:15 +0800)]
video/rockchip: fix rga2 get version from reg

Change-Id: Ia960791f8346a132389cb7f43f0f7ff801465abc
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
7 years agoarm64: dts: rk3399-tve1205g: deploy audio configurations
zhangjun [Tue, 20 Dec 2016 01:44:32 +0000 (09:44 +0800)]
arm64: dts: rk3399-tve1205g: deploy audio configurations

Change-Id: I41ebc8a11c74536ed51720c07fbfe1817342907d
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
7 years agoarm64: dts: rockchip: add usb camera pd pin control for rk3399-tve1205g
Bin Yang [Thu, 15 Dec 2016 10:47:50 +0000 (18:47 +0800)]
arm64: dts: rockchip: add usb camera pd pin control for rk3399-tve1205g

Change-Id: Iee039f3085832861dee5a99da2cbbbec2a08f509
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
7 years agoarm64: rockchip_defconfig: add usb camera pd pin control support
Bin Yang [Thu, 15 Dec 2016 10:39:41 +0000 (18:39 +0800)]
arm64: rockchip_defconfig: add usb camera pd pin control support

Change-Id: If7542a913eab0e36c586005d5bcfbb2b9cabb5d7
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
7 years agomisc: add usb camera pd pin control driver
Bin Yang [Thu, 15 Dec 2016 10:29:07 +0000 (18:29 +0800)]
misc: add usb camera pd pin control driver

Change-Id: Id6ad835c2fff43167a52f90c19e7e6dfe93a4655
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
7 years agoASoC: rockchip: i2s: add support for i2s bclk fs configuration
Sugar Zhang [Mon, 26 Dec 2016 06:11:45 +0000 (14:11 +0800)]
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>
7 years agovideo: rockchip: dp: fix dp connected issue which caused by hpd signal.
wenping.zhang [Mon, 26 Dec 2016 02:04:14 +0000 (10:04 +0800)]
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>
7 years agousb: dwc3: rockchip: support to set testmodes via debugfs
William Wu [Thu, 22 Dec 2016 06:58:39 +0000 (14:58 +0800)]
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>
7 years agoPM / AVS: rockchip-cpu-avs: use a new way to get cluster id
Finley Xiao [Sun, 25 Dec 2016 02:48:34 +0000 (10:48 +0800)]
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>
7 years agoUPSTREAM: cpufreq: Send START policy notification after sending CREATE
Viresh Kumar [Tue, 24 May 2016 04:56:50 +0000 (10:26 +0530)]
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 388612baba201bdcedfa66782f524dcc507d9f12)

7 years agoarm64: dts: rockchip: rk3366: add cpu avs node
Finley Xiao [Sun, 25 Dec 2016 09:21:17 +0000 (17:21 +0800)]
arm64: dts: rockchip: rk3366: add cpu avs node

Change-Id: I7d984bf44e04d205c243eb2012cd06ba7c7fe548
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
7 years agoARM64: dts: rk3399-tve1205g: host state notify ec module through gpio
Shunqing Chen [Sat, 24 Dec 2016 08:25:50 +0000 (16:25 +0800)]
ARM64: dts: rk3399-tve1205g: host state notify ec module through gpio

Change-Id: I3716de0618394de010000a0497de1b3c83cd88ab
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
7 years agopower: host state notify ec module through gpio
Shunqing Chen [Sat, 24 Dec 2016 08:16:00 +0000 (16:16 +0800)]
power: host state notify ec module through gpio

Change-Id: I6b1401c6959a05fce1d6d7ca7a5fb581782fd30d
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
7 years agomfd: fusb302: fix fusb302 disconnect error.
wenping.zhang [Tue, 20 Dec 2016 10:22:46 +0000 (18:22 +0800)]
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>
7 years agonet: rkwifi: enable GET_CUSTOM_MAC_ENABLE
huweiguo [Mon, 26 Dec 2016 00:50:00 +0000 (08:50 +0800)]
net: rkwifi: enable GET_CUSTOM_MAC_ENABLE

Change-Id: I8ea15be317e4bbe1d9cf0834e42536fc4dc4b9d7
Signed-off-by: huweiguo <hwg@rock-chips.com>
7 years agoarm64: dts: rockchip: rk3399: Rename OPP nodes as opp@<opp-hz>
Finley Xiao [Sun, 25 Dec 2016 08:09:44 +0000 (16:09 +0800)]
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>
7 years agoarm64: dts: rk3399: modify opp table according to latest chips
Finley Xiao [Tue, 20 Dec 2016 09:10:35 +0000 (17:10 +0800)]
arm64: dts: rk3399: modify opp table according to latest chips

Change-Id: I2a1b5fac74617cf57a5655411f0326800a6a990d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
7 years agoarm64: dts: rockchip: support use drm on rk3399 excavator linux
WeiYong Bi [Wed, 21 Dec 2016 07:20:03 +0000 (15:20 +0800)]
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>
7 years agoarm64: dts: rk3399_linux: support use drm on rk3399 linux
WeiYong Bi [Wed, 21 Dec 2016 07:15:48 +0000 (15:15 +0800)]
arm64: dts: rk3399_linux: support use drm on rk3399 linux

Change-Id: I9b248af7d86d34a669219fbe62a195ee2b49e516
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
7 years agonet: rfkill-wlan: prior to use wifi addr store in vendor storage
huweiguo [Thu, 22 Dec 2016 08:24:26 +0000 (16:24 +0800)]
net: rfkill-wlan: prior to use wifi addr store in vendor storage

Change-Id: I32ef43e1f47ee658675b26d54fa834ae9362382f
Signed-off-by: huweiguo <hwg@rock-chips.com>
7 years agoARM64: dts: rockchip: add power domain node for RK3328 Soc
Elaine Zhang [Fri, 23 Dec 2016 03:04:56 +0000 (11:04 +0800)]
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>
7 years agoarm64: dts: rk3399-android: add core reset for dp.
wenping.zhang [Thu, 22 Dec 2016 01:45:36 +0000 (09:45 +0800)]
arm64: dts: rk3399-android: add core reset for dp.

Change-Id: I7c86cfbf28cb278bcadebbb08ba31a8b81bdd290
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
7 years agovideo: rockchip: dp: fix dp fw load error.
wenping.zhang [Thu, 22 Dec 2016 01:44:55 +0000 (09:44 +0800)]
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>
7 years agoarm64: dts: rockchip: support use vpu on rk3399 excavator linux
WeiYong Bi [Wed, 21 Dec 2016 07:07:01 +0000 (15:07 +0800)]
arm64: dts: rockchip: support use vpu on rk3399 excavator linux

Change-Id: I5ea28cd4539140a149f1725a1622fd1dcae3e020
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
7 years agodrm/rockchip: gem: add mutex lock for drm mm
Mark Yao [Thu, 22 Dec 2016 04:44:14 +0000 (12:44 +0800)]
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>
7 years agoARM64: dts: rk3399-tve1205g: add wakeup support for hid keyboard
Zhou weixin [Mon, 19 Dec 2016 03:10:23 +0000 (11:10 +0800)]
ARM64: dts: rk3399-tve1205g: add wakeup support for hid keyboard

Change-Id: I21d0f6dac30f64b90c68f98c11c0cc7012e2b1b6
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
7 years agoHID: i2c-hid: add support wakeup
Zhou weixin [Mon, 19 Dec 2016 03:04:36 +0000 (11:04 +0800)]
HID: i2c-hid: add support wakeup

Change-Id: I15890509ff5983e1a8adaa48b28391ec67de8bb5
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
7 years agoethernet: rockchip: get and save eth addr in vendor storage
huweiguo [Thu, 22 Dec 2016 01:11:56 +0000 (09:11 +0800)]
ethernet: rockchip: get and save eth addr in vendor storage

Change-Id: I83d8bc81ca8d33e6f2575d0d90a3dc5978500a64
Signed-off-by: huweiguo <hwg@rock-chips.com>
7 years agoinput: keyboard: rk_keys: add rk_keys.h
Huang, Tao [Thu, 22 Dec 2016 07:01:08 +0000 (15:01 +0800)]
input: keyboard: rk_keys: add rk_keys.h

Make sure drivers work if rk_keys do not selected.

Change-Id: I2882e6c69f0ddbff54089f824be33964ded3cb2e
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agork: rm drivers/clk/rk
Huang, Tao [Thu, 22 Dec 2016 06:23:30 +0000 (14:23 +0800)]
rk: rm drivers/clk/rk

Change-Id: I8c541c0edb446a285ca5097b597216635e755460
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agocamera: rockchip: camsys driver v0.0x21.9
dalong.zhang [Thu, 22 Dec 2016 03:26:08 +0000 (11:26 +0800)]
camera: rockchip: camsys driver v0.0x21.9

Change-Id: I371f3bfc1e6276407bb9481f4a7897d4955903ba
Signed-off-by: dalong.zhang <dalon.zhang@rock-chips.com>
7 years agosoc: rockchip: reboot-mode: rename BOOT_LOADER to BOOT_BL_DOWNLOAD
Huang, Tao [Thu, 22 Dec 2016 03:56:40 +0000 (11:56 +0800)]
soc: rockchip: reboot-mode: rename BOOT_LOADER to BOOT_BL_DOWNLOAD

Same as upstream.

Change-Id: Id9042d288bdbac2fede7da4aee13cc7a32609d6d
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agoarm64: dts: rockchip: move vpu/rkvdec to rk3399.dtsi
Huang, Tao [Wed, 21 Dec 2016 11:04:57 +0000 (19:04 +0800)]
arm64: dts: rockchip: move vpu/rkvdec to rk3399.dtsi

Right now only one driver support vpu and rkvdec,
so move the nodes from rk3399-android[-next].dtsi to rk3399.dtsi.

Change-Id: Id908843774ed8eede3aeddb24059ae92a35e5b98
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agoarm64: rockchip_defconfig: enable EC_BATTERY
Shunqing Chen [Mon, 19 Dec 2016 07:59:21 +0000 (15:59 +0800)]
arm64: rockchip_defconfig: enable EC_BATTERY

Change-Id: I7f467608e6d366b8839dc171ad98c928fe3ed788
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
7 years agosoc: rockchip: power-domain: Modify power domain driver for rk3328
Elaine Zhang [Tue, 20 Dec 2016 08:30:48 +0000 (16:30 +0800)]
soc: rockchip: power-domain: Modify power domain driver for rk3328

This driver is modified to support RK3328 SoC.
RK3328 SoC is only support idle.
add DOMAIN_M type, for support regs have write_enable bit.

Change-Id: I5780b7bab680ddd9d9480e19d7c49681dd571d27
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
7 years agodt-bindings: add binding for rk3328 power domains
Elaine Zhang [Tue, 20 Dec 2016 08:28:17 +0000 (16:28 +0800)]
dt-bindings: add binding for rk3328 power domains

Add binding documentation for the power domains
found on Rockchip RK3328 SoCs.
But RK3328 SoC just support idle, not support pd.

Change-Id: I331680b2e91a45fd09f4bdab7ff9fd3990cb35c4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
7 years agodt/bindings: power: add RK3328 SoCs header for idle-request
Elaine Zhang [Tue, 20 Dec 2016 08:26:23 +0000 (16:26 +0800)]
dt/bindings: power: add RK3328 SoCs header for idle-request

According to a description from TRM, add all the idle request.

Change-Id: Ia2fdb20d89f7e668a3c86074ebed8c73ab0a9429
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
7 years agopower: add ec battery driver
Shunqing Chen [Thu, 15 Dec 2016 12:45:07 +0000 (20:45 +0800)]
power: add ec battery driver

Change-Id: I7b1b0087a9ec361ec322a34b4caefc71a51bd2c9
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
7 years agodrivers: soc: rockchip: fix vendor storage write issue
Zhaoyifeng [Thu, 22 Dec 2016 01:08:21 +0000 (09:08 +0800)]
drivers: soc: rockchip: fix vendor storage write issue

Change-Id: I65bf5896ac8cf792c400755fc62e3e433209891d
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
7 years agoARM64: dts: rk3399-tve1205g: add leds gpio control
Zhou weixin [Thu, 22 Dec 2016 01:27:42 +0000 (09:27 +0800)]
ARM64: dts: rk3399-tve1205g: add leds gpio control

Change-Id: I89b0c1a2ee631b133f81494063b6cb4a57a1daca
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
7 years agosoc: rockchip: rename rockchip_boot-mode.h to rockchip,boot-mode.h
Huang, Tao [Wed, 21 Dec 2016 13:41:34 +0000 (21:41 +0800)]
soc: rockchip: rename rockchip_boot-mode.h to rockchip,boot-mode.h

Same as upstream.

Change-Id: Ic1887e5cf808ebf214168b51683dec25880f0dac
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agoASoC: es8316: fix null pointer error
zhangjun [Mon, 19 Dec 2016 12:49:46 +0000 (20:49 +0800)]
ASoC: es8316: fix null pointer error

due to function will be called from rk_headset_irq_hook_adc.c
when es8316 configured in defconfig file but not in device tree

Change-Id: Ie0294fff2c05b9f77c6740d81dc9445007c1b62b
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
7 years agoarm64: rockchip_defconfig: enable cx2072x
zhangjun [Sat, 10 Dec 2016 03:28:29 +0000 (11:28 +0800)]
arm64: rockchip_defconfig: enable cx2072x

Change-Id: If2aaec6ffd360033f911ac2e5e2d3bd575dfdcb1
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
7 years agoNVMe: don't try to read csts when failing to reset it
Shawn Lin [Mon, 19 Dec 2016 10:42:01 +0000 (18:42 +0800)]
NVMe: don't try to read csts when failing to reset it

We could find the external abort for trying to access
nvme's BAR space to check the csts, but it's possible
that the link state is forbidden to access the BAR when
failing to reset it. So we should reuse the former csts
to print the log instead of doing that again.

Change-Id: I34438a726381e588eb21149b1aab76a66ef0e665
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
7 years agousb: dwc3: redo the mode setting at core init
Frank Wang [Fri, 16 Dec 2016 07:14:13 +0000 (15:14 +0800)]
usb: dwc3: redo the mode setting at core init

When dwc3 core enters into suspend mode, the PD may turn off
for power saving, which will cause dwc3 controller lost the
mode operation when resuming time.

This adds redo the mode setting into dwc3_core_init() function
to avoid this issue.

BUG=Redmine: Defect#110481
TEST=rk3399-sapphire-excavator-box(CVTE), check if USB3.0 HUB
can be enumerated after PM resume.

Change-Id: I61c512e9c368afc665cd4d5900367079ed22a34e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
7 years agophy: rockchip-inno-usb2: rm phy_power_on/off in suspend/resume cases.
Frank Wang [Fri, 16 Dec 2016 01:09:23 +0000 (09:09 +0800)]
phy: rockchip-inno-usb2: rm phy_power_on/off in suspend/resume cases.

Usb-controller can invoke phy_power_on/off in its suspend/resume
process, so usb-phy need not do it again.

This adds remove phy_power_on/off in its suspend/resume cases.

Change-Id: Ice30e79ffba8116ca9bfae344c7ea232f6580130
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
7 years agousb: dwc3: rockchip: power off usb2 phy in suspend
William Wu [Thu, 15 Dec 2016 06:46:53 +0000 (14:46 +0800)]
usb: dwc3: rockchip: power off usb2 phy in suspend

DWC3 use extcon notifier to manage USB cable detection
and mode switch. For host mode, if USB device connected,
it requires to reset the whole DWC3 controller to make
sure that pipe power state in P2 before power on USB3 PHY,
after do DWC3 reset we will do phy power on in extcon evt
work, however, the DWC3 core will do phy power on again
in runtime resume process (dwc3_runtime_resume() ->
dwc3_core_init() -> phy_power_on()). This will cause PHY
power off failure during suspend because we just do once
phy power off in suspend(dwc3_suspend() -> dwc3_core_exit()
-> phy_power_off()).

This patch does phy power off in suspend to make sure that
USB2 PHY enter suspend in HOST mode. And because USB3 PHY
power on operation need to be done while the pipe is in P2
state, but after resume the pipe is in P0 state, so we just
put USB3 PHY in power on state.

Change-Id: I643ba0abeb015be9285fd29d59fa0e006131c39b
Signed-off-by: William Wu <wulf@rock-chips.com>
7 years agoarm64: dts: rockchip: keep vbus always on for usb2.0 host of rk3399
Frank Wang [Fri, 16 Dec 2016 00:38:11 +0000 (08:38 +0800)]
arm64: dts: rockchip: keep vbus always on for usb2.0 host of rk3399

One basic condition of usb remote wakeup is vbus on, so we add
regulator-always-on property for vcc5v0_host regulator in this adds.

In the previous codes, ehci/ohci-platform did not power off
vcc5v0_host regulator due to some oddish codes, and we have fixed it
at commit b5a0a9e8794d.

Change-Id: I95c225c9c3aeec6e346d62e61fdcde5e5e02d143
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
7 years agoarm64: rockchip_cros_defconfig: enable Type-C PHY and DP config
Kever Yang [Wed, 23 Mar 2016 09:42:48 +0000 (17:42 +0800)]
arm64: rockchip_cros_defconfig: enable Type-C PHY and DP config

Change-Id: Iac8930ad5c229e385889fa8b042973730a5aea2b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
7 years agoASoC: Add driver for codec cx2072x
zhangjun [Thu, 8 Dec 2016 07:54:37 +0000 (15:54 +0800)]
ASoC: Add driver for codec cx2072x

Change-Id: I9a0eb611a4e0d861b7d47d4944b93203f823738b
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
7 years agoarm64: dts: rockchip: modify logo-mode as center for rk3399 mid
Hao Xiaowei [Tue, 20 Dec 2016 01:27:53 +0000 (09:27 +0800)]
arm64: dts: rockchip: modify logo-mode as center for rk3399 mid

Change-Id: I529a1063efd6475d49f6eb738e4612cfb711ced1
Signed-off-by: Hao Xiaowei <hxw@rock-chips.com>
7 years agovideo: rockchip: vcodec: add log message in iommu drm
Jung Zhao [Tue, 20 Dec 2016 00:50:28 +0000 (08:50 +0800)]
video: rockchip: vcodec: add log message in iommu drm

Change-Id: If66e7654d87c790977378630824d582f2f4c4ffa
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agovideo: rockchip: vcodec: add buffer recycle mechanism in vpu
Jung Zhao [Mon, 19 Dec 2016 07:11:39 +0000 (15:11 +0800)]
video: rockchip: vcodec: add buffer recycle mechanism in vpu

when info change, vpu driver doesn't know when to release
buffers. with this mechanism, vpu driver will auto release
when buffer nums bigger than BUFFER_LIST_MAX_NUMS.

Change-Id: Id4fb91257d260bfd2e18388731941c4f0cc191b0
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agovideo: rockchip: vcodec: fix fd import error
Jung Zhao [Mon, 19 Dec 2016 06:35:35 +0000 (14:35 +0800)]
video: rockchip: vcodec: fix fd import error

Since fd will be reused even if dma buffer doesn't release,
this will cause output buffer error when use usb camera
with mjpeg or h264 format.

Change-Id: I2baeb2c5d9127df0a0eb362b8c577c05ceca470d
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agoarm64: dts: rockchip: enable cdn-dp for rk3399-evb-cros
Chris Zhong [Fri, 25 Nov 2016 05:16:39 +0000 (13:16 +0800)]
arm64: dts: rockchip: enable cdn-dp for rk3399-evb-cros

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I7f86533a5890edd1fc113bf9553764ab3dee7640

7 years agoUPSTREAM: ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle
Sugar Zhang [Wed, 7 Sep 2016 06:27:33 +0000 (14:27 +0800)]
UPSTREAM: ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle

when step into runtime_suspend, i2s pd will be disabled and loss state.
so need to restore register when runtime_resume.

Change-Id: Ie37aba46f6ee21be2af404da24ba667e3ca86d6c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from git.kernel.org broonie/sound.git topic/rockchip
 commit f0447f6cbb202e1be8244d15aee390a96d65e490)

7 years agoarm64: dts: rockchip: add cdn-dp node for rk3399
Chris Zhong [Thu, 24 Nov 2016 06:28:08 +0000 (14:28 +0800)]
arm64: dts: rockchip: add cdn-dp node for rk3399

Add a node for the cdn DP controller which is embedded in the rk3399
SoC.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Change-Id: I253bb9b9d6c1b8a407f7c49503ec666bb8b64d4d

7 years agodrm/rockchip: cdn-dp: add hdmi-codec jack event
Chris Zhong [Thu, 24 Nov 2016 06:22:51 +0000 (14:22 +0800)]
drm/rockchip: cdn-dp: add hdmi-codec jack event

Use HDMI connection / disconnection notifications to update an ALSA
jack object.

Change-Id: Ia18537be1ddb899b7ac490560bf91d7de83eae02
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
7 years agoFROMLIST: ASoC: hdmi-codec: Use HDMI notifications to add jack support
Philipp Zabel [Wed, 20 Apr 2016 09:00:00 +0000 (11:00 +0200)]
FROMLIST: ASoC: hdmi-codec: Use HDMI notifications to add jack support

Use HDMI connection / disconnection notifications to update an ALSA
jack object. Also make a copy of the ELD block after every change.

Conflicts:
sound/soc/codecs/Kconfig
sound/soc/codecs/hdmi-codec.c

(am from https://patchwork.kernel.org/patch/8887251/)
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I5f4a931c3b91c2b230ce5a61b60f191628d93105

7 years agoFROMLIST: video: rmk's HDMI notification prototype
Philipp Zabel [Wed, 20 Apr 2016 08:59:59 +0000 (10:59 +0200)]
FROMLIST: video: rmk's HDMI notification prototype

This is Russell's HDMI notification prototype [1], currently waiting
for the HDMI CEC situation to resolve.

The use case for the notifications on MediaTek MT8173 is to let the
(dis)connection notifications control an ALSA jack object.

No Signed-off-by since this is not my code, and still up for discussion.

[1] https://patchwork.kernel.org/patch/8351501/

(am from https://patchwork.kernel.org/patch/8887261/)

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I87daa156de6cfa7ff8db9df9d8ecc8c42d76798f

7 years agoFROMLIST: drm/rockchip: cdn-dp: Do not run worker while suspended
Guenter Roeck [Tue, 22 Nov 2016 20:50:07 +0000 (15:50 -0500)]
FROMLIST: drm/rockchip: cdn-dp: Do not run worker while suspended

If the driver is in suspended mode, the dp block may be disabled, and
chip registers may not be accessible. Yet, the worker may be triggered
in this situation by an extcon event. If that happens, the following crash
will be seen.

cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] *ERROR* Enable dp failed -19
cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] Connected, not enabled. Enabling cdn
Bad mode in Error handler detected, code 0xbf000002 -- SError
CPU: 1 PID: 10357 Comm: kworker/1:2 Not tainted 4.4.21-05903-ge0514ea #1
Hardware name: Google Kevin (DT)
Workqueue: events cdn_dp_pd_event_work
task: ffffffc0cda67080 ti: ffffffc0b9b80000 task.ti: ffffffc0b9b80000
PC is at cdn_dp_clock_reset+0x30/0xa8
LR is at cdn_dp_enable+0x1e0/0x69c
...
Call trace:
[<ffffffc0005a7e24>] cdn_dp_pd_event_work+0x58/0x3f4
[<ffffffc0002397f0>] process_one_work+0x240/0x424
[<ffffffc00023a28c>] worker_thread+0x2fc/0x424
[<ffffffc00023f5fc>] kthread+0x10c/0x114
[<ffffffc000203dd0>] ret_from_fork+0x10/0x40

Problem is two-fold: The worker should not run while suspended, and the
suspend function should not call cdn_dp_disable() while the worker is
running.

Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
(am from https://patchwork.kernel.org/patch/9442149)
Change-Id: Ic01c6f793281a47c36a90c1be34a5e479ebabb3e

7 years agoFROMLIST: drm/rockchip: cdn-dp: Load firmware if no monitor connected
Guenter Roeck [Tue, 22 Nov 2016 20:50:06 +0000 (15:50 -0500)]
FROMLIST: drm/rockchip: cdn-dp: Load firmware if no monitor connected

If no monitor is connected, suspend/resume cycles result in firmware
load errors because the driver attempts to load the firmware while
the system is in suspend state. This results in a kernel warning and
traceback.

Loading the firmware during boot fixes the problem. Note that we can not
just call schedule_work conditionally in cdn_dp_pd_event() if the insertion
status changed. The problem would still be seen if a monitor is connected
for the first time during suspend.

(am from https://patchwork.kernel.org/patch/9442145)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I86eb7c41624be1a8f5952ba7709e623a70941b8c

7 years agodrm/rockchip: cdn-dp: fix some error
Chris Zhong [Tue, 22 Nov 2016 20:50:05 +0000 (15:50 -0500)]
drm/rockchip: cdn-dp: fix some error

This commit is for fixing some error, according to the comments from
CL:5442
1. correct the use of rate
2. remove the phy switch from DP driver, it is controlled in PHY driver
3. add some const keyword
4. clear int_mask to 0
5. modify spelling errors

Change-Id: I239a9e7183593b85485abb6d288d6cb1558c65f7
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
7 years agoFROMLIST: drm/rockchip: cdn-dp: add cdn DP support for rk3399
Chris Zhong [Tue, 22 Nov 2016 20:50:05 +0000 (15:50 -0500)]
FROMLIST: drm/rockchip: cdn-dp: add cdn DP support for rk3399

Add support for cdn DP controller which is embedded in the rk3399
SoCs. The DP is compliant with DisplayPort Specification,
Version 1.3, This IP is compatible with the rockchip type-c PHY IP.
There is a uCPU in DP controller, it need a firmware to work,
please put the firmware file to /lib/firmware/rockchip/dptx.bin. The
uCPU in charge of aux communication and link training, the host use
mailbox to communicate with the ucpu.
The dclk pin_pol of vop must not be invert for DP.

Change-Id: I64aee564f782db9943a92ca07cb20e2111d7921f
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
[seanpaul fixed up some races between the worker and modeset]
[seanpaul squashed ~15 commits from chromium.org gerrit]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[groeck fixed compilation errors when building as module]
Signed-off-by: Guenter Roeck <groeck@chromium.org>
(am from https://patchwork.kernel.org/patch/9442143)

7 years agovideo: rockchip: dp: modify get edid method and modify get dpcd retry times.
wjh [Fri, 16 Dec 2016 07:57:13 +0000 (15:57 +0800)]
video: rockchip: dp: modify get edid method and modify get dpcd retry times.

Change-Id: I69c7b91b78707b40126f2366f28ff6256eabe4fb
Signed-off-by: wjh <wjh@rock-chips.com>
7 years agovideo: vcodec: fix warning when enable ion in arm32
Jacob Chen [Fri, 16 Dec 2016 08:54:34 +0000 (16:54 +0800)]
video: vcodec: fix warning when enable ion in arm32

Change-Id: Ia409365aa780badbaa64539ebc3d5679dda49a7a
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm: dts: rockchip: add allocator type inside vpu & hevc for rk3288-linux
Jacob Chen [Fri, 16 Dec 2016 09:48:09 +0000 (17:48 +0800)]
arm: dts: rockchip: add allocator type inside vpu & hevc for rk3288-linux

Change-Id: I6e9a72fb287f963be78c4dc6f375fa12991394f2
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoARM: configs: enable vcodec driver for rockchip linux
Jacob Chen [Fri, 9 Dec 2016 07:06:50 +0000 (15:06 +0800)]
ARM: configs: enable vcodec driver for rockchip linux

Change-Id: I5533054d9fdde1d7700f127ce4b6248d709f7588
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm: dts: rockchip: switch to vpu-service in rk3288 linux boards
Jacob Chen [Thu, 15 Dec 2016 03:15:07 +0000 (11:15 +0800)]
arm: dts: rockchip: switch to vpu-service in rk3288 linux boards

We decide to back to old vcodec driver until getting a better v4l2 solution

Change-Id: Iec3f5b3aba86866a0b0fc7aab5b6c2b28bc268d9
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm: dts: enable rga for rk3288 linux boards
Jacob Chen [Thu, 15 Dec 2016 07:48:07 +0000 (15:48 +0800)]
arm: dts: enable rga for rk3288 linux boards

we will use rga to speed xserver and wayland.

Change-Id: Ic975b1bbeb6afd8a3a15ba41afc1d8ff10c6d3b4
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm: dts: rk3288: add drm rga node
Jacob Chen [Thu, 15 Dec 2016 03:32:37 +0000 (11:32 +0800)]
arm: dts: rk3288: add drm rga node

Change-Id: I3c88a695922d3e2245d6b406860db97de9d47244
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm: dts: correct rk3288-evb gmac node
Jacob Chen [Thu, 15 Dec 2016 03:06:11 +0000 (11:06 +0800)]
arm: dts: correct rk3288-evb gmac node

remove repetition

Change-Id: I1140ce9cbf259eb827b7e2aa03a2e263e81735ea
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm64: dts: rockchip: add mmc dt-bindings for rk3328 and evb board
Shawn Lin [Thu, 15 Dec 2016 01:06:23 +0000 (09:06 +0800)]
arm64: dts: rockchip: add mmc dt-bindings for rk3328 and evb board

Add dt-bindings for sdio/sdmmc(+ext)/emmc controllers

Change-Id: I1c52b803110c499c58c2c27a1c7488a98b0ca870
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
7 years agoUPSTREAM: drm: Introduce DRM_DEV_* log messages
Sean Paul [Mon, 15 Aug 2016 23:18:04 +0000 (16:18 -0700)]
UPSTREAM: drm: Introduce DRM_DEV_* log messages

This patch consolidates all the various log functions/macros into
one uber function, drm_log. It also introduces some new DRM_DEV_*
variants that print the device name to delineate multiple devices
of the same type.

Change-Id: Ic213cce1d775cc7b820473ee5263458a001f9558
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1471303084-3757-1-git-send-email-seanpaul@chromium.org
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit c4e68a5832021cf8c2f9a2f3419452470ca60bd8)

7 years agoUPSTREAM: drm: Add ratelimited versions of the DRM_DEBUG* macros
Lyude [Sat, 6 Aug 2016 00:30:38 +0000 (20:30 -0400)]
UPSTREAM: drm: Add ratelimited versions of the DRM_DEBUG* macros

There's a couple of places where this would be useful for drivers (such
as reporting DP aux transaction timeouts).

Change-Id: I027648bacec5e23890f6743207d66858f91c05df
Signed-off-by: Lyude <cpaul@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-7-git-send-email-cpaul@redhat.com
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 27528c667a210845b35a1f49c810dba469bced52)

7 years agoARM64: dts: rk3399: add bq25700 support for tve1205g
Shunqing Chen [Thu, 15 Dec 2016 12:53:00 +0000 (20:53 +0800)]
ARM64: dts: rk3399: add bq25700 support for tve1205g

Change-Id: I74119a51d2557e86f3c579645db2b2b8dc71989c
Signed-off-by: Shunqing Chen <csq@rock-chips.com>