Commit Graph

603010 Commits

Author SHA1 Message Date
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
algea.cao
b0520612e2 arm64: rockchip_defconfig: enable rk1000
add mfd rk1000-core and drm bridge rk1000-tve.

Change-Id: I0c030f2f90eab1242af44c39bea1af7a1870f3fe
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-08-14 16:44:03 +08:00
algea.cao
83f1c1d9ac drm/bridge: support rk1000 tv encoder
RK1000 is a digital-analog mixed chip which has tve output function.
RK1000's registers can be written and read through I2C interaface.
Because RK1000's I2C need dclk and mclk, RK1000 TVE should be registered
after RK1000 CORE. RBG signal output is controlled by LVDS, so RK1000
should be registered as connector and attach LVDS encoder.

Change-Id: I65b40826bd1dbf07d4fa94ecdf8c75005008731f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-08-14 16:43:08 +08:00
algea.cao
bce841cc7f mfd: rk1000: update mfd rk1000 core driver
RK1000's control register block need mclk for i2c communication.
So mclk should be enabled in advance.
RK1000's control register block should be registered before RK1000
TVE.

Change-Id: Iba9a2a410fe927666072f8d246995462a860ec3a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2017-08-14 16:42:57 +08:00
Xu Xuehui
98b4237c7d net: wireless: rockchip_wlan: update bcmdhd driver to 1.363.59.144.10 (r)
1. Fix disconnect issue during system suspend
2. Add more module support
3. fix read country code from config
4. modify config.txt reading behavior

Change-Id: Ib6392523752d9af60329df0dd810ceb8b76467ff
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2017-08-14 16:19:38 +08:00
Laurent Pinchart
fcb60baab3 UPSTREAM: drm/bridge: Make (pre/post) enable/disable callbacks optional
Instead of forcing bridges to implement empty callbacks make them all
optional.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit c8a3b2ae07)

Change-Id: Id37cbb6114e69957dfd6b72c8bd7b66dcc6f0590
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-14 14:57:20 +08:00
Mark Yao
2ab91f190d drm/rockchip: vop: fixup error handle on crtc register
Change-Id: I969a3994360331f4ce66e7affcc9ed3869599777
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-14 11:47:04 +08:00
Jeffy Chen
2169a9db46 UPSTREAM: drm/rockchip: Reorder drm bind/unbind sequence
Current drm bind/unbind sequence would cause some memory issues.
For example we should not cleanup iommu before cleanup mode config.

Reorder bind/unbind sequence, follow exynos drm.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
[seanpaul fixed spelling typo in commit subject]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-11-git-send-email-jeffy.chen@rock-chips.com

(cherry picked from commit ccea91998c)

Change-Id: I8571a34419735f8b8a51666b31b91cbdb18250bd
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-14 11:47:03 +08:00
Mark Yao
8ecd10c962 drm/rockchip: backlight: fix modules compile error
Fixes:
error: redefinition of 'rockchip_drm_backlight_update'
error: redefinition of 'of_rockchip_drm_sub_backlight_register'

Change-Id: I4eeebc6075387f720acec597cee765e2a1a83b7c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-14 11:47:02 +08:00