Commit Graph

603046 Commits

Author SHA1 Message Date
Elaine Zhang
7b7167fa0f clk: rockchip: rk3368: fix NPLL with NB parameter types RK3066_PLL_RATE_NB
with the NB parameter,can adjust the jitter of the output PLL.
make the npll jitter is better,make it more suitable for DCLK display.

Change-Id: I9d819bdc2b520205a7d63ee8ed83643601ccc821
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-08-30 14:31:21 +08:00
Sandy Huang
4178a86547 ARM: dts: rockchip: add display node for rk3126-evb
Change-Id: I12db3b85c2c5ff948434f1305439451f2f13e33b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-08-30 14:29:56 +08:00
Sandy Huang
ec0aedc5d8 ARM: dts: rockchip: add node for vop and lvds for rk312x
Change-Id: If7c3a2a1503114692f96a79cc527033da557009b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-08-30 14:29:05 +08:00
Sandy Huang
38a47ad844 drm/rockchip: lvds: add support RGB666 output
Change-Id: I9263d82d784c514b3960a75b1626a29c84fd3fa1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-08-30 14:25:30 +08:00
Sandy Huang
3f46fa6cdf drm/rockchip: lvds: add support rk3126 lvds
Change-Id: I30a3fe5a084d58c1427e9d5923170739f762a8ad
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-08-30 14:25:19 +08:00
buluess.li
db41eea25d arm64: dts: rk3328: enable the power domain for encoder
Change-Id: I97e8a07482c30010411d6af9fddf18ce25247831
Signed-off-by: buluess.li <buluess.li@rock-chips.com>
2017-08-30 14:24:30 +08:00
Huang jianzhi
b08c85d899 ARM: dts: rk3288-firefly: add backlight nodes
Change-Id: I5eddf1bd441addf3e1319d2dc5b5a72bfdd4a8cb
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-08-29 17:24:29 +08:00
Finley Xiao
f256a8339a PM / devfreq: rockchip_dmc: Only change min_freq when enable auto-freq
If enable auto-freq, raplace min_freq with status-rate, so the target
rate ranges from status rate to max_freq.
If disabe auto-freq, raplace min_freq and max_freq with statusrate,
so the target rate will be status rate.

Change-Id: Id40c3b859d14fd154735af18e642804fc2895b87
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-08-29 17:23:24 +08:00
Tang Yun ping
85601c5fa1 PM / devfreq: rockchip-dmc: using drm_modeset mutex when get lcdc type
Because ddr freq scanning may get clk mutex than get drm general
mutex to get lcdc_type. But when drm status change, drm may get drm
general mutex first and than get clk mutex. This may cause deadlock.
So when get lcdc type we change to use drm_modeset mutex to avoid
deadlock.

Change-Id: I64d4c236b682d7bd5bdc95264ff2711ebcec2cad
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-08-29 17:06:35 +08:00
Tang Yun ping
404f22df36 PM / devfreq: clk-ddr: using drm_modeset mutex when get lcdc type
Because ddr freq scanning may get clk mutex than get drm general
mutex to get lcdc_type. But when drm status change, drm may get drm
general mutex first and than get clk mutex. This may cause deadlock.
So when get lcdc type we change to use drm_modeset mutex to avoid
deadlock.

Change-Id: Ibaa1c07b14df7e1a861162efd9f7e086b8a55042
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-08-29 17:03:36 +08:00
YouMin Chen
e5c0ce02f2 clk: rockchip: remove spin_lock in the rockchip_ddrclk_sip_set_rate
Change-Id: Ia3d04aef8fbf8093c2a3a89a845f948f69c8611f
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2017-08-29 17:01:35 +08:00
XiaoDong Huang
e5342c38df ARM: dts: rk3229-gva-sdk: update rockchip_suspend node
Add RKPM_CTR_PMIC in sleep-mode-config property

Change-Id: Idfe5334d8676aa7d783513512592056f5fed2522
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2017-08-29 17:00:35 +08:00
Wyon Bi
54b684e928 drm: bridge: analogix: Add support for HBR2 (5.4Gbps)
Change-Id: I3999e4fa0b83ede5719f341d1e9a9a8797c7576b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-08-29 16:58:00 +08:00
Wyon Bi
a5ca275f86 drm/panel: simple: Add support for LG LM270WR3-SSA1
This adds support for the LG Corporation LM270WR3-SSA1 27"
eDP(HBR2, 5.4Gbps) UHD TFT LCD panel, which can be supported
by the simple panel driver.

Change-Id: I542cfe03325a43bc56d7b1c7a62ae7b6aaabc751
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-08-29 16:57:49 +08:00
Mark Yao
2117a44a2b drm/rockchip: keep crtc private bus_format atomic
crtc private bus_format are used for multi connectors,
so we need keep it atomic, otherwise may cause display
abnormal.

Change-Id: I188d70ac54eedba502609921ccd33e33314c265b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-08-29 16:54:32 +08:00
Zhou weixin
8ab42b9c89 arm64: dts: rockchip: add new dts for xikp board
Change-Id: I75044c496422795db9e9c82c44191e40bdfa2ab2
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-08-29 16:53:07 +08:00
Sandy Huang
935a7949ef drm/rockchip: vop: add rk3126 vop support
Change-Id: I6ffd9b151387e0cb5c913500098ebb7cf69153a5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-08-29 10:21:41 +08:00
jesse.huang
06560f914e ARM: dts: rockchip: add RK3288 firefly reload board dts file
rk3288-firefly.dtsi: move panel nodes to the edp_panel

Change-Id: I7c613f172c7d36c8bb5450bae9763a2bd8b535e3
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-08-28 12:01:13 +08:00
shengfei Xu
5256a970bf regulator: rk808: fix the enable_val of rk816
The bitmask value must equal enable_val, then the regulator can
be enabled with the regulator output at the predefined voltage.

Change-Id: Ieadac80c04f3826b364d6fd9fa2e3c956f79b6c4
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-28 11:31:22 +08:00
Adam Thomson
a17856c5e7 UPSTREAM: device property: Add function to search for named child of device
For device nodes in both DT and ACPI, it possible to have named
child nodes which contain properties (an existing example being
gpio-leds). This adds a function to find a named child node for
a device which can be used by drivers for property retrieval.

For DT data node name matching, of_node_cmp() and similar functions
are made available outside of CONFIG_OF block so the new function
can reference these for DT and non-DT builds.

For ACPI data node name matching, a helper function is also added
which returns false if CONFIG_ACPI is not set, otherwise it
performs a string comparison on the data node name. This avoids
using the acpi_data_node struct for non CONFIG_ACPI builds,
which would otherwise cause a build failure.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
commit 613e97218c)

BUG=chrome-os-partner:54440
TEST=Boot on kevin

Change-Id: Ide996e72bd1a290da4bd31233046da4cd2fc71f7
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/365263
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-24 18:40:10 +08:00
Andy Shevchenko
02eac3ee40 UPSTREAM: lib/string: introduce match_string() helper
Occasionally we have to search for an occurrence of a string in an array
of strings.  Make a simple helper for that purpose.

BUG=chromium:622499
TEST=Build image with match_string() enabled

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: David Airlie <airlied@linux.ie>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 56b060814e)
Signed-off-by: Guenter Roeck <groeck@chromium.org>

Change-Id: I6075bb868e3578caa33561c85f4be57f4ea94cc2
Reviewed-on: https://chromium-review.googlesource.com/355210
Commit-Ready: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-24 18:39:04 +08:00
shengfei Xu
c56195feba ARM: dts: rockchip: add rk816 node for rk3126-evb
Change-Id: I93d1d2c6115448cc6d12f87dd268b1f9fd9a0444
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-24 14:20:10 +08:00
shengfei Xu
206964ccd4 arm64: rockchip_linux_defconfig: enable suspend mode config
Change-Id: I00af7bf7964059ca7a459b116789726a045d68a1
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-24 14:04:33 +08:00
shengfei Xu
1b4c461c5b arm64: rockchip_linux_defconfig: enable SIP interface
Change-Id: Ic35a841e04ca84631d440ef5b09d2406a546e345
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-24 14:04:28 +08:00
Sandy Huang
1e23e1f0b2 clk: rockchip: rk3128: add clk gate for PCLK_MIPIPHY
Change-Id: Icf55c315edc9514a23d00433ffe56c864ad7f3d8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-08-24 11:31:50 +08:00
shengfei Xu
f6cd885bf2 regulator: rk808: add support for get_mode/set_mode/set_suspend_mode on regulators
The regulators support mode switching, so add support for
these ops to those types of regulators

Change-Id: Ia2d052aed85988c10137ecc5681867bed2d44c24
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-23 20:38:30 +08:00
shengfei Xu
8516153ecb regulator: rk808: fix regulator operations table to the bucks for rk816
the patch fixes the following BUG:
[    2.249731] PC is at regulator_map_voltage_linear+0x78/0x16c
[    2.255413] LR is at regulator_map_voltage_linear+0x68/0x16c
[    2.261092] pc : [<c042c1a8>]    lr : [<c042c198>]    psr: 60000013
[    2.261092] sp : ef0a5a08  ip : 00000000  fp : c0c34368
[    2.272578] r10: 000b71b0  r9 : c120394c  r8 : 000b71b0
[    2.277817] r7 : 000b71b0  r6 : ee85b800  r5 : 000b71b0  r4 : ee85b800
[    2.284357] r3 : 00000000  r2 : dc8ba64d  r1 : 60000013  r0 : 00000021
[    2.290899] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    2.298047] Control: 10c5387d  Table: 6000406a  DAC: 00000051

Change-Id: I4a0d773f7847e7af14d1850e2250671a216b0c86
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-23 20:37:15 +08:00
shengfei Xu
e7edb8f017 rtc: rk808: check the rtc is available for rk816
Change-Id: I383c08cd5ad7cb282c0ec0aa12e9e84c9df52ba3
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-23 20:35:50 +08:00
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