Commit Graph

593863 Commits

Author SHA1 Message Date
Mark Yao
cb794081c6 drm/rockchip: vop: fix compile warning
fix warning:
    warning: 'ret' may be used uninitialized in this function

Change-Id: I743ed9788366322beeceddd556fae0c2a7cdd463
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-10 18:05:36 +08:00
Yakir Yang
09e82f8935 drm/rockchip: rga: fix 'ret' may be used uninitialized in probe time
Change-Id: I3eeb2abf2b5f098d3c2298673eeecd130ad99cb7
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-05-10 16:10:47 +08:00
xuhuicong
2dde9ade48 video: rockchip: hdmi: v2: solve 480i/576i 10bit output abnormal
Change-Id: I60ee3b8882bc16bab48a51530635f50958bacfd3
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-05-10 10:35:13 +08:00
xuhuicong
4295210b03 ARM64: dts: rk3399-android: add HDMI device node support
Change-Id: I29b46d097351c55df66782d55c004c356049fb37
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-05-10 10:34:12 +08:00
xuhuicong
c06b84a124 ARM64: dts: rk3399: add HDMI DDC/CEC pinctrl
Change-Id: Ic3417a5153ceabad3f9c69ffe5b6fa542e7a84c1
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-05-10 10:31:51 +08:00
xuhuicong
972bdf6aef video: rockchip: hdmi: misc clean up to hdmi driver
remove unused dts properties parsed code and print an error message
when enable hdmi clk error

Change-Id: I92f37f5c1dc2cd8dbf18744f4fd17a52bc25080f
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-05-10 10:28:06 +08:00
xuhuicong
e659022b93 video: rockchip: hdmi: support rk3399 hdmi
RK3399 hdmi register layout is similar with rk3288 and rk3368, so most
code can reuse. but hdmi resign is upgrade from 20 to 21 so it has a
little diffrence. and the hdmi phy clk is Independent from dclk too.

Change-Id: I83b30c92d9572fc9ceaf52777d224e5cec1823be
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-05-10 10:27:18 +08:00
Elaine Zhang
fb1738eb00 regulator: rockchip: lp8752: fix up the compile warning
fix up the warning:
drivers/regulator/lp8752.c: In function 'lp8752_buck_set_mode':
drivers/regulator/lp8752.c:93:2: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: Iee9f69791bbcea2e6b3a16713b76e93cfc0a2b67
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-05-10 09:20:40 +08:00
Huang Jiachai
e295c725bd video: rockchip: fix compile warning: may be used uninitialized
Change-Id: Ia162b79443e8361d93575963c6603999ffc3e405
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-05-09 17:10:14 +08:00
Zhiqin Wei
a3926cf98e drivers: video: rockchip: rga2: Fix compile warning
Change-Id: I3622b70a5b15014ccb5fb9fc09bced97db194dc8
Signed-off-by: Zhiqin Wei <wzq@rock-chips.com>
2016-05-09 16:43:56 +08:00
Simon
ad8d04570c iommu: rk-iommu: fix build warning when enable CONFIG_CC_OPTIMIZE_FOR_SIZE
Change-Id: Iff20759a625df9f6c6138eaa8d963d67a483c01d
Signed-off-by: Simon <xxm@rock-chips.com>
2016-05-09 16:32:37 +08:00
Sugar Zhang
5cd1658890 ASoC: es8316: fix warning: 'val' may be used uninitialized
Change-Id: If7bdba3cd7a23879a2cf41202d21fadaef614f23
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-05-09 14:15:50 +08:00
Alpha Lin
4e6f3ce852 rockchip/vcodec: seperate power-on timer for independent hw
Seperate power-on timer for rkvdec and vpu when they are not
in combo mode (definitly independence).

Before this patch, h/w power off schedule will be interrupted
by the other h/w, and power off will be triggered when h/w
still running a task.

Change-Id: I29124e90afccc727d2e7a04098727aa4a2c3e8bb
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2016-05-06 09:29:46 +08:00
Caesar Wang
9be1984799 ARM64: rockchip_cros_defconfig: enable the GOV_POWER_ALLOCATOR
Enable the GOV_POWER_ALLOCATOR for rk3399.

Change-Id: I8f7e457a09543d730e30c1ce74a9b5dffba57e10
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-05-05 19:24:02 +08:00
Caesar Wang
b7f56e4165 ARM64: config: enable the devfreq_thermal for rockchip
It will enable the devfreq thermal that's generic devfreq cooling
mechanism through frequency reduction for devices using devfreq.
This will throttle the device by limiting the maximum allowed DVFS
frequency corresponding to the cooling level.

Change-Id: Ia017ecf46599700382b9604e375193135f7d1d24
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-05-05 19:22:51 +08:00
chenzhen
4f613eb82e MALI: rockchip: add "platform specific code" of rk platform
Change-Id: Ia58cba15b43f875ac572a3b35807b5ec48e3df01
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-05-05 19:20:46 +08:00
Wu Liang feng
a5bf8df9a7 ARM64: dts: rk3399-android: set usbdrd_dwc3_0 in peripheral mode
Change-Id: I775283d3b3c8180e352281568d1b77ab5c5a544c
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-05-05 18:41:01 +08:00
Shawn Lin
a7a3b1a72d mmc: sdhci-of-arasan: fix using sleep function whthin spinlock
Let's use unlock/lock around phy APIs as them will call
mutex which is sleepable casuing failure of kernel debug
check.

Change-Id: Ic7670bfc9ed763cc9bdec53f85f553bc0be1416c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-05-05 14:47:31 +08:00
Mark Yao
c1b1c53c7e drm/rockchip: vop: fix pin_pol config
rgb/edp/hdmi/mipi pin_pol is removed after (e5683dd FROMLIST:
drm/rockchip: get rid of rockchip_drm_crtc_mode_config), that
is wrong.

This patch re-add those pin_pol config.

Change-Id: I46f3e32ad405f4b6e2f76110757248e8516693c4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-05 11:09:29 +08:00
Zain Wang
6423c41361 regulator: mp8865: update mp8865 enable_time
enable_time is controlled by capacitance connected to Pin SS,
it described more detailedly in mp8865 datasheet Page 15.
Capacitance is 12nF now.

Change-Id: Ib604a4e109db7ab125104e5cf3067864fefb6fe0
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2016-05-04 19:29:54 +08:00
xiaoyao
0de499f937 ARM64: dts: rk3399: support bluetooth for rk3399-evb
Change-Id: Id1eb05cc4cc39d026b6c26f1635760eed38c8968
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-05-04 18:51:32 +08:00
Mark Yao
47510f4818 drm/rockchip: vop: Initialize vskiplines to zero
There is a path that use vskiplines with non-initialize.
That would cause vop abnormal behavior.

Change-Id: I53c6c575d6acc16aeae761dbb4867f3bc8bfe5ce
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:29:14 +08:00
Mark Yao
9bde4e671f drm/rockchip: vop: fix iommu crash with async atomic
On Async atomic_commit callback, drm_atomic_clean_old_fb will
clean all old fb, but because async, the old fb may be also on
the vop hardware, dma will access the old fb buffer, clean old
fb will cause iommu page fault.

Reference the fb and unreference it when the fb actuall swap out
from vop hardware.

Change-Id: I585786884295060efdaef0a00c3cbd75244399d7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:27:54 +08:00
Mark Yao
ed547bb16f drm/rockchip: vop: support plane zpos property
Change-Id: Idd0265020a591ce5b34d117442104f625e331119
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:24:59 +08:00
Mark Yao
751837be5e drm/rockchip: vop: rk3399: add area plane
Change-Id: Ia6f77353363e25423ac29129372bc510565682f8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:24:13 +08:00
Mark Yao
574b3c4c2a drm/rockchip: vop: rk3288: add area plane
Change-Id: Iac8fde019020d8f1a671d52c1a4d91ad2d050d43
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:22:57 +08:00
Mark Yao
6c060b5946 drm/rockchip: vop: support multi area plane
The series vop of VOP_FULL framework support area plane, such as
RK3288 and RK3399, one group of area planes share same hardware,
reuse the hardware on different scanout time, this design is
useful to support mulit planes with low hardware consume.

Change-Id: Ie53211ce9ed22d03f7668637efbb7c95d9a8eb5b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:19:10 +08:00
Mark Yao
eaf6764dee drm: introduce share plane
The plane hardware is used when the display scanout run into plane active
scanout, that means we can reuse the plane hardware resources on plane
non-active scanout.

Because resource share, There are some limit on share plane: one group
of share planes need use same zpos, can't not overlap, etc.

We assume share plane is a universal plane with some limit flags.
people who use the share plane need know the limit, should call the ioctl
DRM_CLIENT_CAP_SHARE_PLANES, and judge the planes limit before use it.

Change-Id: Iecc3d8e7f1ce29d567cdbad689ba4dbad3d594e1
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-05-04 18:16:50 +08:00
Mark Yao
e5683dd6c1 FROMLIST: drm/rockchip: get rid of rockchip_drm_crtc_mode_config
We need to take care of the vop status when use
rockchip_drm_crtc_mode_config, if vop is disabled,
the function would failed, that is terrible.

Save output_type and output_mode into rockchip_crtc_state,
it's nice to make them into atomic.

Conflicts:

	drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
	drivers/gpu/drm/rockchip/dw-mipi-dsi.c
	drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
	drivers/gpu/drm/rockchip/inno_hdmi.c
	drivers/gpu/drm/rockchip/rockchip_drm_drv.h
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Change-Id: I43c49a92b2b9df02ce8a055bd16948b400ab0f47
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
(am from https://patchwork.kernel.org/patch/8844321/)
2016-05-04 18:15:26 +08:00
Caesar Wang
629b58a49a UPSTREAM: arm64: Enable the timer on Rockchip architecture
On the RK3368 SoC, support the APB timers for rockchip platform.

Change-Id: I2bee09c4140994d3d2e23f1820663230d82547de
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit c840f28bbf)
2016-05-03 17:48:47 +08:00
Shawn Lin
e19fe663b1 UPSTREAM: clocksource/drivers/rockchip: Add err handle for rk_timer_init
Currently rockchip_timer doesn't do some basic cleanup work when
failing to init the timer. Let's add err handle routine to deal
with all the err cases.

Change-Id: I73bbd32592e6fe157a8d166743db3fc130d0004c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from commit 522ed95c26)
2016-05-03 17:48:47 +08:00
Daniel Lezcano
c21cd84a43 UPSTREAM: clocksource/drivers/rockchip: Add COMPILE_TEST option
Increase the compilation test coverage by adding the COMPILE_TEST option.

Due to the dsb() usage in the driver, this driver is only compilable on
ARM and ARM64.

Change-Id: I5f2c1a5353a7b20c80dcfc3cd3900510f56a0729
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 40ada2aac5)
2016-05-03 17:48:47 +08:00
Caesar Wang
6d18246823 UPSTREAM: clocksource/drivers/rockchip: Remove dsb() usage
The dsb() instruction is pointless in this code.

Remove it.

That also fixes the ARM64 compilation issue.

Change-Id: I0c8e33abe0d976714f4df288fe5ac52ffb8ded5b
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 23b8f81f38)
2016-05-03 17:48:47 +08:00
Caesar Wang
2e2e74d27f UPSTREAM: clocksource/drivers/rockchip: Make the driver more readable
Let's checkstyle to clean up the macros with such trivial details.

Change-Id: I6cf0c7cf5e48bcb4d52a483fdba7c4ce26677f06
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from commit a0d2216ec0)
2016-05-03 17:48:47 +08:00
Caesar Wang
e144ed1742 arm64: dts: rk3399: fix the incorrect crit temperture
Fix the incorrect critial temperture for gpu thermal.

Change-Id: I9ecfc107afcdbb421ae40cc796c40a39d6d68677
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-05-03 17:48:04 +08:00
Elaine Zhang
a8b948f89f ARM64: dts: rk3399: support for evb rev1 and evb rev2
For evb1
- rk3399-evb-rev1-android.dts
- rk3399-evb-rev1-cros.dts

For evb2
- rk3399-evb-rev2-android.dts
- rk3399-evb-rev2-cros.dts

Change-Id: I95a2d4229c0a7581ca5ae777340f4d26e86503ba
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-05-03 17:39:49 +08:00
Huang, Tao
025cebcd42 ARM64: rockchip_defconfig: enable THERMAL_DEFAULT_GOV_FAIR_SHARE
Change-Id: Ide2ca2361cb13454d0e3269a929a57463da53985
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-05-03 16:34:49 +08:00
Zhiqin Wei
02b93726be ARM64: dts: rk3399: android: Enable rga device
Change-Id: I7c348158c410b8bd32a574a607a975fe5e8b74a5
Signed-off-by: Zhiqin Wei <wzq@rock-chips.com>
2016-04-28 11:59:39 +08:00
Shawn Lin
931cefd0d5 ARM64: dts: rk3399-evb: add mmc-hs400-enhanced-strobe support
This patch enables mmc-hs400-enhanced-strobe for rk3399-evb, so
enhanced strobe function will be used if any eMMC 5.1 is probed.

Change-Id: If5f30e0d759f7a9850bec82c3d53d9bb26ba8c3d
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-28 11:50:27 +08:00
Shawn Lin
8714599140 mmc: add hs400 enhanced strobe support for mmc subsystem
HS400 enhanced strobe is a new feature introduced by eMMC
spec 5.1, let's implement it and enjoy it!

please note that currently I have no much bandwith to split this
big patch into patchset. So please use, test and applied! Thanks.

Change-Id: I874f18a617a1b69e3ff56f5c134feb817b6985b9
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-28 11:49:40 +08:00
Shawn Lin
ddfc5a9bcc Documentation: mmc: add mmc-hs400-enhanced-strobe
Let's add some description of mmc-hs400-enhanced-strobe
which can be used to support hs400 enhanced strobe function
introduced by eMMC spec 5.1

Change-Id: I03b8e803071dc7034bddf655892b12eabcaa852a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-28 11:48:58 +08:00
Huang, Tao
1b96a26c65 netfilter: xt_qtaguid: fix crash on non-full sks
If sock is request_sock then kernel will crash. So use
skb_to_full_sk() and sk_fullsock() helper to make sure
we get full sock.

Change-Id: Iefd548e0591055b1a8031f0835c4dca7b9d42b61
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-04-27 18:43:41 +08:00
Caesar Wang
282266255a ARM64: rockchip_cros_defconfig: cleanup and use HZ=1000 for cros
At least for the cros, we have previously kept ARM and ARM64 common
configs on HZ=1000, but at least on ARM64, each individual ARM64 kernel
config.

Also, cleanup for cros config.

Change-Id: I1f4470a01b409e212bd60b6fd885a8f2b53d8850
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-27 17:54:37 +08:00
Xing Zheng
2ba5c8a49c clk: rockchip: rk3399: fix the incorrect parent for c/gpll_aclk_perihp_src
Change-Id: I9cacddcaa637d46a96c7c70c8d0938688561b187
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-27 16:51:13 +08:00
Douglas Anderson
a2fdf2cd47 ARM64: rockchip_cros_defconfig: Don't force the command line
There's no reason to force the command line at this point.

Forcing the command like makes it pretty hard to switch between eMMC and
SD card boots because the old command line forced the root filesystem to
/dev/mmcblk0p3 vs. depthcharge automatically inserting the right UUID
based on where it found the kernel.

BUG=None
TEST=I see my command line now.

Change-Id: I5f76b60b9726aee2152c09fbd6460b2b973b0b20
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-27 11:26:24 +08:00
Elaine Zhang
8b1193c064 ARM64: rockchip_defconfig: enable lp8752 regulator
Change-Id: Id3281624c80bb56fb8fd939f14edfdd59bc0393a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-04-26 21:18:32 +08:00
Elaine Zhang
307d1c7d08 regulator: rockchip: lp8752: support lp8752 regulator
updata lp8752 driver.
add devicetree bindings for lp8752.

Change-Id: I21cdbde985d4663862b56c28429c41d9d3c38c36
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-04-26 21:18:32 +08:00
Douglas Anderson
b67caebc94 ARM64: dts: rk3399: add trackpad for gru/kevin boards
The trackpad bits in the DTS needed some love.  This adds some basic
infrastructure support in the main gru dts file and then adds the
specific trackpad used on kevin-r0 and kevin-r1.  For now just duplicate
between kevin-r0 and kevin-r1 and we'll decide if we want to share
later (perhaps we want an "atmel" snippet?).

Note that gpio-keymap here makes the driver appear as a trackpad rather
than a touchscreen (driver assumes that anything with buttons is a
trackpad).  Input entry corresponding to the button on the trackpad was
found by experimentation as suggested in the device tree bindings.

BUG=chrome-os-partner:52637
TEST=With series, trackpad works in browser; button works.

Change-Id: Ia62cff90449625778fd99054b914e22a55c13550
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256510
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 18:51:57 +08:00
Douglas Anderson
cdcdef3122 ARM64: rockchip_cros_defconfig: Turn on atmel touchscreen driver
The touchscreen driver is used for both atmel trackpads (AKA touchpads)
and touchscreens.  Turn it on so we can use it.

BUG=chrome-os-partner:52637
TEST=With series, trackpad works in browser; button works.

Change-Id: I316a8411c35ab7b48182cbe704c9f80114a5afcf
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256511
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 18:51:17 +08:00
Lin Huang
8bbd91e964 ARM64: dts: rockchip: kevin: enable HS400 mode on kevin board
enable HS400 mode on kevin, if found it is not stable, just
remove "mmc-hs400-1_8v" property, it will use HS200 mode instead.

Change-Id: I7c5d162de1f15bcc069134ffa228d833be2b8a02
Signed-off-by: Lin Huang <hl@rock-chips.com>
2016-04-26 17:50:53 +08:00