Commit Graph

603062 Commits

Author SHA1 Message Date
Andy Shevchenko
ad4e08fe32 UPSTREAM: device property: avoid allocations of 0 length
Arrays can not have zero elements by definition of the unified device
properties. If such property comes from outside we should not allow it to pass.
Otherwise memory allocation on 0 length will return non-NULL value, which we
currently don't check.

Prevent memory allocations of 0 length.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit f6740c1899)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I1e297ee59746f1a152600aeae096a807fcb6a868
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528507
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Heikki Krogerus
a25045c5e0 UPSTREAM: device property: the secondary fwnode needs to depend on the primary
This fixes NULL pointer dereference when the primary fwnode handle
does not exist, for example with PCI devices that do not have ACPI
companion.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 0fb5902f2f)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I7035834cb23e66e7bd470c01f599580e5444e3e8
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528506
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Mika Westerberg
490feb8e9b UPSTREAM: device property: Take a copy of the property set
It is convenient if the property set associated with the device secondary
firmware node is a copy of the original. This allows passing property set
from a stack for example for devices created dynamically. This also ties
the property set lifetime to the associated device.

Because of that we provide new function device_remove_property_set() that
is used to disassociate and release memory allocated for the property set.
(cherry-pick from 13141e1cb8)

Change-Id: Ia7e05b72726226628cc2a6bd910149d22c3f42f0
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
b5d67194cb UPSTREAM: device property: Fallback to secondary fwnode if primary misses the property
The struct fwnode has notion of secondary fwnode. This is supposed to used
as fallback if the primary firmware interface (DT, ACPI) does not have the
property in question.

However, the current implementation never checks the secondary node which
prevents one to add default "built-in" properties to devices.

This patch adds fallback to the secondary fwnode if the primary fwnode
returns that the property does not exists.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 362c0b3024)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Ibf7ec7252154b42a348967f30803b1e953cde756
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528504
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
fb0f1244f5 UPSTREAM: device property: improve readability of macros
There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 1d656fb757)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I72d7ad3b4f279e5b377d41f049e3d5743a7823e5
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528502
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
4e96a0d355 UPSTREAM: device property: keep single value inplace
We may save a lot of lines of code and space by keeping single values inside
the struct property_entry. Refactor the implementation to do so.
(cherry-pick from 66586baba5)

Change-Id: Ife4010518d3a89ac719cc2ba0ce9e497a30384fc
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
09a28924b4 UPSTREAM: device property: refactor built-in properties support
Instead of using the type and nval fields we will use length (in bytes) of the
value. The sanity check is done in the accessors.

The built-in property accessors are split in the same way such as device tree.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 318a197182)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: Id671146dd6cc89641c4db6c0827ed4ea36ebe835
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528500
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:50:28 +08:00
Andy Shevchenko
5c13bfba0d UPSTREAM: device property: rename helper functions
To be in align with the rest of fwnode types we rename the built-in property
set ones, i.e.
	is_pset() -> is_pset_node()
	to_pset() -> to_pset_node()

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 61f5e294b8)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I347b1c0d83f95eee61a891d55f3b3ca0986d5b57
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528499
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:44:57 +08:00
Andy Shevchenko
a0882f43ab UPSTREAM: device property: always check for fwnode type
Currently the property accessors unconditionally fall back to built-in property
set as a last resort. Make this strict and return an error in case the type of
fwnode is unknown.

This is actually a follow up to the commit 4fa7508e9f (device property:
Return -ENXIO if there is no suitable FW interface).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit e3f9e299bf)
from v4.5-rc1

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: I0f1efb165051f65f945d46356097113dc0ac97de
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528498
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 14:44:22 +08:00
shengfei Xu
f99288a52e ARM: dts: rockchip: rk3126-evb: the display hardware need ldo6 not boot on
Change-Id: I43f837d4face1097c6560f311028367fb91825ce
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-08-30 14:42:52 +08:00
zah
470dbb09e6 i2c: Devices which have some i2c addr can work in same i2c bus
If i2c slave devices don't work at the same time, which have 
the same i2c addr, this patch can make them working.

Change-Id: I1bfb7783924b08bdc6e12bf47c2de01bdac7c2e2
Signed-off-by: Zhang aihui <zah@rock-chips.com>
2017-08-30 14:38:09 +08:00
Huibin Hong
04441e6f89 rk_fiq_debugger: set recv fifo trigger as on byte
Change-Id: Ib816f3f9cedab635c3b5a5fe59082c14a53b2fc6
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:36:19 +08:00
Huibin Hong
38457b014a ARM: rockchip_linux_defconfig: set default uart number 5
Many RK socs have 5 uarts, and they may be used at the same time.
CONFIG_SERIAL_8250_NR_UARTS=5
CONFIG_SERIAL_8250_RUNTIME_UARTS=5

Change-Id: I065d5e736a3bd687aff1a3f4db1b61c03bfa9fec
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:35:39 +08:00
Huibin Hong
359316c0d0 ARM: rockchip_defconfig: set default uart number 5
Many RK socs have 5 uarts, and they may be used at the same time.
CONFIG_SERIAL_8250_NR_UARTS=5
CONFIG_SERIAL_8250_RUNTIME_UARTS=5

Change-Id: I31665abde3991bcb7a60f119b1c4b7411837ce9a
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:35:24 +08:00
Huibin Hong
639954310e arm64: rockchip_linux_defconfig: set default uart number 5
Many RK socs have 5 uarts, and they may be used at the same time.
CONFIG_SERIAL_8250_NR_UARTS=5
CONFIG_SERIAL_8250_RUNTIME_UARTS=5

Change-Id: I5803b0715344acf173f7c522880088cc8ad58b3b
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:35:07 +08:00
Huibin Hong
d64c2c7687 arm64: rockchip_defconfig: set default uart number 5
Many RK socs have 5 uarts, and they may be used at the same time.
CONFIG_SERIAL_8250_NR_UARTS=5
CONFIG_SERIAL_8250_RUNTIME_UARTS=5

Change-Id: If86077a74c2ed8e6d5c163c8669eab98f2e6af74
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-08-30 14:34:51 +08:00
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