Commit Graph

603018 Commits

Author SHA1 Message Date
zain wang
0e601b1acb drm/rockchip: use suspend_late matching the resume_early
Sometimes, we would abort suspend work before it finished.
In this case, suspend work would try to resume the part suspended
by correspond resume functions.
But the suspend/resume functions are not matched in rockchip.
When the suspend work is aborted, it would ignored resuming this
part due to can't find correspond resume functions.
So, let's use suspend_late instead of suspend.

Change-Id: I7304f7963704de7e870fbd4e76ebe1e0066f18c1
Signed-off-by: zain wang <wzz@rock-chips.com>
2017-08-23 20:30:30 +08:00
Jung Zhao
283fd1016a video: rockchip: vpu: add reset lock
if someone call iommu translate during vpu_reset,
it may cause core dump. add reset lock to avoid
this situation.

Change-Id: Ia58eb106525a2f97d07b69c23cc4ef1b4d4cf151
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-08-23 10:16:07 +08:00
Jerry Xu
8e735ebf01 drm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC
Fixes: I1e5773b926c("use positive check for N{H, V}SYNC")

Change-Id: Id0b5ccc5a6b8d10f0c19b071b5fb928faf375704
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2017-08-23 09:45:15 +08:00
shengfei Xu
b10bee7fb0 ARM: dts: rockchip: fix i2c base address error for rk312x
Change-Id: I06890c7a050b71a6bf1aca7692d9b3f1dd219332
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-23 09:41:36 +08:00
shengfei Xu
6956eab221 ARM: dts: rockchip: add backlight node for rk3126-evb
Change-Id: I6af6f4a47bc100b25fac2f3487eea46d07366a50
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-23 09:40:38 +08:00
Mark Yao
695bb4ec18 drm/rockchip: vop: fix display abnormal on mode changed
Bcsh r2y/y2r need be updated when mode changed, otherwise
would cause display abnormal.

Change-Id: Ida63da3dfb856948ca9f87880d2adc6aba1e9141
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-23 09:35:09 +08:00
zzc
13bfd439d8 net: wireless: rockchip_wlan: enable WL_VIRTUAL_APSTA
enable WL_VIRTUAL_APSTA to support concurrent AP and station mode

Change-Id: I217ad4af7989f79aadaf03da08d07d5076ae5834
Signed-off-by: zzc <zzc@rock-chips.com>
2017-08-22 18:08:42 +08:00
Joseph Chen
991cab4fc2 power: rk818-battery: add IRQF_ONESHOT for irq request
Change-Id: I1c049337d07d35148cfde37d91682b3799042e8c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-08-22 14:10:03 +08:00
Joseph Chen
2ea6f7bb7a power: rk818-battery: dump hotdie status
Change-Id: I9de0410b2e3e436801ee27ae59c984df58cc4bc8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-08-22 14:09:46 +08:00
Joseph Chen
a85656d090 power: rk818-battery: fix full charge sm_linek error
on the situation that: charger is connected and fuel gauge gives
state 'CC or CV', but actually battery is discharging from 100%
to 99%. At this moment we may treat this as normal full charging
by mistake, so we must add current judgement to avoid that.

Change-Id: I7b6692c17dc053fd96bd42df05c3f7763728bba2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-08-22 14:09:37 +08:00
Frank Wang
1ed00de5a9 ARM: dts: rockchip: add reserved-memory for trust on rk3229-echo board
This patch reserved 14M memory zone for OPTEE side on rk3229-echo board.

Change-Id: I46de3f7163dc14361d41476daf44957184f43e89
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-08-22 12:08:50 +08:00
WeiYong Bi
5b291d8cd7 drm/panel: simple: call panel_simple_unprepare() when shutdown
Change-Id: Ic1b18b91bd8becd9cc0002c44777153a6b50fd8a
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-08-22 12:08:04 +08:00
Wyon Bi
3dff861292 Documentation: dt-bindings: simple-panel: update DSI panel example
Change-Id: I35e3ca0d696044587e676c952d3035ac0090dcdc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-08-22 12:07:24 +08:00
Wyon Bi
9c0ea1f779 arm64: dts: rockchip: rk3399-sapphire-excavator: correct eDP panel node
Change-Id: If252cfa786c8018ba07807387b69493de46c7173
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-08-22 12:07:14 +08:00
Wyon Bi
dd25e35e08 drm: bridge: analogix: Avoid timeout warnings in analogix_dp_config_video()
[   23.527279] rockchip-dp ff970000.edp: Timeout of video streamclk ok
[   23.527325] rockchip-dp ff970000.edp: unable to config video

Change-Id: Ie2239c2dd773e4cb41f86b46b98367a07a751ff1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-08-22 12:06:45 +08:00
Huibin Hong
6891be86bb spi: rockchip: configure CTRLR1 according to size and data frame
CTRLR1 is number of data frames.
When data frame is 8 bit, CTRLR1 is len-1.
When data frame is 16 bit, CTRLR1 is (len/2)-1.

Change-Id: I40b7ebd382f60bdfdab902394637c107d90531db
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-22 12:04:41 +08:00
Jung Zhao
6d994f02ab video: rockchip: vpu: remove extra input fd map/unmap
remap input fd is unnecessarily now.

Change-Id: I288fa2bad67be37603d9dedd4291d90d8cd2e602
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-08-21 14:34:21 +08:00
Finley Xiao
eabe4ce8c6 dt-bindings: Add resets for Rockchip pvtm
Change-Id: Ie58612db5f24b24b1abf9f18e728872e38a6e2fb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-21 12:42:38 +08:00
Finley Xiao
fb293558a5 arm64: dts: rockchip: rk3399: add pvtm resets
Change-Id: I1250a5193bd44b164d62d918401e60c7c4d31c59
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-18 11:55:34 +08:00
Finley Xiao
d3887a3c7c soc: rockchip: pvtm: reset before get value
Change-Id: I3fd177f267acebb53cebc2516a423f0e9ebbee5e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-18 11:55:27 +08:00
Xu Xuehui
0e0828558c net: wireless: rockchip_wlan: fix bcmdhd driver wowlan_triger error on android 6.0
stack backtrace:
[   11.444844] PC is at kfree+0xcc/0x250
[   11.445181] LR is at nl80211_set_wowlan+0x3e4/0x70c
[   11.445617] pc : [<ffffff80081a09e0>] lr : [<ffffff8008aa9414>] pstate: a0000145
[   11.446271] sp : ffffffc04308f7f0
[   11.446572] x29: ffffffc04308f7f0 x28: ffffffc06437f200
[   11.447061] x27: 0000000000000014 x26: 0000000000000000
[   11.447549] x25: ffffff80090b6000 x24: 0000000000000018
[   11.448036] x23: ffffffc072d00a40 x22: ffffff80090b6000
[   11.448522] x21: ffffff8008aa9414 x20: feeffffffffffffe
[   11.449008] x19: 0000000003ffffff x18: 0000000000000000
[   11.449494] x17: 0000007fb52815f4 x16: ffffff80088ee7ec
[   11.449981] x15: 0000000000000030 x14: 0000000000000014
[   11.450467] x13: 0000000000000005 x12: 0000000000000005
[   11.450953] x11: 0000000000000001 x10: 0000000000000001
[   11.451437] x9 : 0000000000000000 x8 : 0000000000000000
[   11.451922] x7 : 0000000000000000 x6 : ffffffc0437bb068
[   11.452408] x5 : 0000000000000040 x4 : 0000000000000000
[   11.452893] x3 : ffffffbebfffffc0 x2 : 0000000000000028
[   11.453380] x1 : 0000000000000000 x0 : 0000000000000000

Change-Id: Ibe1967413a35589a47a8ffe5e902f148afefa9ee
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2017-08-18 10:05:52 +08:00
Finley Xiao
ad8c4dfa3a MALI: rockchip: Add support to select voltage according to leakage
The greater leakage, the lower the OPP's voltage. In order to reduce
power consumption, it is necessary to adjust OPP's voltage according
to leakage.

Change-Id: I2bba04ac941cc6a0703b5208cb4e757ec2813bab
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-18 10:05:08 +08:00
Finley Xiao
848f3c8daf MALI: rockchip: Add support to select voltage according to pvtm value
At same voltage and frequency, the greater the PVTM value, the lower
the OPP's voltage. In order to reduce power consumption, it is necessary
to adjust OPP's voltage according to PVTM value.

Change-Id: Ifcac57fc965e3ea45523db2d9df19435479f6cee
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-18 10:03:56 +08:00
Finley Xiao
2f85547ee4 arm64: dts: rockchip: rk3399: add nvmem-cells property for gpu
Change-Id: If538d1f8085dc686a25563a9eb891b79565a1c8d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-18 10:03:26 +08:00
Finley Xiao
a6d461bc7e arm64: dts: rockchip: rk3399: add gpu pvtm voltage table
stress test:
1. Antutu, use governor simpleondemand
2. Need for Speed, use governor simpleondemand
3. Glmark2, use userspace, scanning frequency

Change-Id: Ibe27380e582b193d900b0d55da3567ce553c32df
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-18 10:03:13 +08:00
LinLongjian
c4f8d32e86 arm64: dts: rockchip: add bluetooth clk control on rk3399-sapphire-excavator
Change-Id: I60b7b67b676921a70a8a9f9705d8e58534885415
Signed-off-by: Longjian Lin <llj@rock-chips.com>
2017-08-17 20:50:21 -04:00
Zhangbin Tong
509d57bbcf arm64: dts: rockchip: rk3399-box: enable remote_support_psci
Change-Id: Icd60b10ebb65f1f181bc8ff916051c9e863809b9
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-08-17 18:25:34 +08:00
Zhangbin Tong
453afb9cb7 arm64: dts: rockchip: rk3368-r88: enable remote_support_psci
Change-Id: I1786e2e0c263df97d448df49cab605de412bd985
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-08-17 18:25:22 +08:00
Zhangbin Tong
2f87241254 arm64: dts: rockchip: rk3368-r88: update sleep mode config
Change-Id: I128041a3cff103655da3b2b3493c3326877259e3
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-08-17 18:25:09 +08:00
Zhangbin Tong
962eb69630 input: rc: support parser power key through the underlying firmware
Change-Id: If9ba76081eca80d2d210dd42307e727e673b8b8a
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-08-17 18:24:53 +08:00
Frank Wang
4e4550df7c ARM: dts: rockchip: tidy up rk3229 related dt
Pick out non-public dt nodes from dtsi and separately configure in dts.

Change-Id: I774f45e0b282fb1b783b5b175fa4ffc9ad904990
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-08-17 18:21:18 +08:00
Joseph Chen
208ce417cb mfd: rk808: add suspend and resume register setting for rk805
Because Buck3 don't have sleep state register, so we need a manual
switch: set BUCK3 suspend as Auto PWM mode and resume as FPWM mode.

This is for power saving in system suspend.

Change-Id: I67db458e650b6e85ed4267f0b0dcdb01dff4c635
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-08-17 12:04:07 +08:00
wlq
68f8d696e6 arm64: dts: rockchip: add dmc default config for rk3399
Change-Id: Iaeacb92a560743ff6dcf1f3977449004fa256992
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-08-17 10:44:28 +08:00
Xu Xuehui
3de8752a4e net: wireless: rockchip_wlan: add network wakeup function for rtl8723bs
wifi driver open config such as below:

CONFIG_WOWLAN = y
CONFIG_GPIO_WAKEUP = y

Change-Id: I9bdb07e0210c68993bb638aa2ca403142e180c5f
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2017-08-17 09:26:43 +08:00
Zhangbin Tong
210e0ef438 firmware: rockchip: add rc config interface
Change-Id: I3d769761f58c51fb366e99b62cf27a5974e511a1
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-08-16 18:32:11 +08:00
Frank Wang
b5bb4868b8 phy: rockchip-inno-usb2: put phy-port into suspend during probe
Let us put phy-port into suspend mode at initialization time for
saving power consumption, and usb controller will resume it during
probe time if needed.

Change-Id: Id3a66af8ff17612d54fbc80db087bf67eaee7726
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-08-16 18:30:11 +08:00
Marek Szyprowski
3b4dbd5b83 UPSTREAM: dma-buf: add support for compat ioctl
Add compat ioctl support to dma-buf. This lets one to use DMA_BUF_IOCTL_SYNC
ioctl from 32bit application on 64bit kernel. Data structures for both 32
and 64bit modes are same, so there is no need for additional translation
layer.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1487683261-2655-1-git-send-email-m.szyprowski@samsung.com
(cherry picked from commit 888022c047)

Change-Id: I6e80fb34c3915f9b77be432947c8ddd1ecfd221f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:43:45 +08:00
Mark Yao
5f98c9f6ff drm/rockchip: vop: set BCSH propetries default
Change-Id: Ib8ce044525cb611c8d6df2207c12fb51bb74460b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:39:55 +08:00
Mark Yao
e268caad71 drm/rockchip: vop: add BCSH support for full vops
The full name of BCSH is Brightness, Contrast, Saturation and Hue.
BCSH is supported on all full vop designed.

Change-Id: I17bcd5a07b93b3c68aa892606f886bcd3a7673a0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:38:48 +08:00
Boris Brezillon
2272eb5d62 UPSTREAM: drm: Add TV connector states to drm_connector_state
Some generic TV connector properties are exposed in drm_mode_config, but
they are currently handled independently in each DRM encoder driver.

Extend the drm_connector_state to store TV related states, and modify the
drm_atomic_connector_{set,get}_property() helpers to fill the connector
state accordingly.

Each driver is then responsible for checking and applying the new config
in its ->atomic_mode_{check,set}() operations.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 299a16b163)

Change-Id: I50d7c79013235d75972b8cdd46cf89bbd9cf596d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:38:28 +08:00
Boris Brezillon
777d56231f UPSTREAM: drm: Turn DRM_MODE_SUBCONNECTOR_xx definitions into an enum
List of values like the DRM_MODE_SUBCONNECTOR_xx ones are better
represented with enums.

Turn the DRM_MODE_SUBCONNECTOR_xx macros into an enum.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit dee7a4fee7)

Change-Id: I02d7856d2d933caeb39c0bb64ad4dee946493843
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:38:06 +08:00
Mark Yao
c2560f2894 drm/rockchip: create tv properties on master driver
Change-Id: Ia42a89447281e1f2688ce34d4c0a85975222b371
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:37:44 +08:00
Mark Yao
18a51606e2 drm/bridge: dw_hdmi: add module info for hdcp driver
Change-Id: I458974b7d8b925902d0f0d41364f80881a07c6c7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-15 18:37:16 +08:00
Finley Xiao
c4ec95f7de arm64: dts: rockchip: rk3368: add prefix 'rockchip,' for leakage property
Change-Id: I1cf285eb99c309a2b5b7f886872bb3ff3bc7648a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-15 18:36:39 +08:00
Finley Xiao
b71acedbdf arm64: dts: rockchip: rk3399: add cpu pvtm voltage table
stress test:
1. reboot
2. antutu, use governor performance
3. antutu, use governor interactive
4. Thomas-sRoomIII, use governor interactive
5. Thomas-sRoomIII, use governor userspace and sweep frequency

Change-Id: If12d2bd72ce3bba01021314265eba4f83a0072e1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-15 18:36:23 +08:00
Finley Xiao
22b9a07e7d cpufreq: rockchip: Add support to select voltage according to pvtm value
At same voltage and frequency, the greater the PVTM value, the lower
the OPP's voltage. In order to reduce power consumption, it is necessary
to adjust OPP's voltage according to PVTM value.

Change-Id: Ic1d2a74048f6c7d97d92868292f14776ea380d99
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-15 18:35:48 +08:00
zhangyunlong
42d1f377e2 camera: rockchip: camsys_drv v0.0x22.3
switch TX1/RX1 D-PHY of rk3288/3399 to RX status before it's
initialization to avoid conflicting with sensor output.

Change-Id: I672730fe5fb5a33b8437df1ae61078a9a79ac41b
Signed-off-by: zhangyunlong <dalon.zhang@rock-chips.com>
2017-08-15 09:41:24 +08:00
Zhangbin Tong
097d93c71f ARM: dts: rk3288-android: enable the nandc node by default
Enable the nand node by default in the android dtsi as
they're wired on every board for drmboot compatible.

Change-Id: I63aea9be6ca43fb91f7ec6616f5b9051ca5c23a8
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-08-14 17:11:08 +08:00
Yankun Zheng
38c57424d4 power: charger: add new sy6982c/sy6982e driver
Change-Id: I3204b34234194d4a17ae0b2141744dbdbe5c4daa
Signed-off-by: Yankun Zheng <zyk@rock-chips.com>
2017-08-14 16:54:14 +08:00
algea.cao
fa03347549 arm64: dts: rk3368-r88: support rk3368 drm cvbs
add rk1000 node and enable lvds. 3368 RGB output depends on lvds.

Change-Id: Ie1636878fc741338466a437864aa5c3b912170eb
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-08-14 16:44:53 +08:00