Commit Graph

596663 Commits

Author SHA1 Message Date
zhangjun
62971dabc8 arm64: dts: rk3399-sapphire-excavator-edp: disable hdmi audio
due to ff8a0000.i2s can't bound to card "rockchip,hdmi" and
"rockchip,cdn-dp-fb" at the same time

Change-Id: Ie43bf882f0eacb6e87d10ba5eba0fd38dbb5462e
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-09-23 15:09:10 +08:00
wuliangqing
1fc37088db ARM64: dts: rk3399-mid: update for emmc&phy
Change-Id: I4dffff1475a6e05344ef1ea4cb9bd662e32e53fc
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-09-23 15:07:22 +08:00
wuliangqing
bbd165be73 ARM64: dts: rk3399-vr: update for emmc&phy
Change-Id: I59c767a37ef072132c3b81fe1029763202420593
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-09-23 15:07:05 +08:00
Wu Liang feng
8f2c7e7cd7 usb: dwc3: fix logical errors and improve stability for rockchip platform
1. put clks err handle at the end of probe.

2. register extcon notifier after dwc3 core initialized successfully.

3. try to get extcon cable state in probe, this can avoid to
   lose the first extcon state notifier.

4. fix pm runtime handle and disable clks in remove operation

Change-Id: I0bea71206801139efb37a835b65562c051a2072e
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-09-23 15:03:29 +08:00
Nikita Yushchenko
756d9ad548 UPSTREAM: regmap: fix deadlock on _regmap_raw_write() error path
Commit 815806e39b ("regmap: drop cache if the bus transfer error")
added a call to regcache_drop_region() to error path in
_regmap_raw_write(). However that path runs with regmap lock taken,
and regcache_drop_region() tries to re-take it, causing a deadlock.
Fix that by calling map->cache_ops->drop() directly.

Change-Id: I55c6d3ed490c47e8b3f5ca774d051a700f707b6e
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from git.kernel.org broonie/regmap.git for-next
 commit f0aa1ce625)
2016-09-23 10:05:03 +08:00
Mark Yao
60a514699d drm/rockchip: vop: support interlace display
Change-Id: I39c66ff90d85c2ee7bc8495ed313c359f0d457d6
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-09-23 10:03:40 +08:00
wuliangqing
46ee4a0ac4 ARM64: dts: rk3399-vr: add n-key for return
Change-Id: I06654319d61d57eabe7556d45501cf081cdd6b39
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-09-23 10:00:04 +08:00
David Wu
a55a3e72a8 i2c: rk3x: Fix variable 'min_total_ns' unused warning
This patch fixs the following warning:
drivers/i2c/busses/i2c-rk3x.c: In function 'rk3x_i2c_v1_calc_timings':
drivers/i2c/busses/i2c-rk3x.c:745:41: warning: variable 'min_total_ns' set but not used [-Wunused-but-set-variable]

Change-Id: I99da5c5dc80da040eb5333bdf204a71de472a332
Reported-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-09-23 09:43:04 +08:00
David Wu
62f63ea380 i2c: rk3x: Fix sparse warning
This patch fixes the following sparse warning:
drivers/i2c/busses/i2c-rk3x.c:888:17: warning: cast truncates bits from constant value (ffffffffff00 becomes ffffff00)

Change-Id: If4ffda2f57ce967a6824765093823bd7ff75ebe3
Reported-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-09-23 09:40:47 +08:00
Jacob Chen
339fab0f14 arm64: configs: add COMPAT configuration
I don't know why it was removed by former savedefconfig.
Maybe I make mistakes..

Change-Id: I4d852320c5b57ba9c72b7ef2981b6b66d76ba0b8
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-22 20:50:49 +08:00
Jacob Chen
a8e6476d04 arm: dts: add ramp delay to vdd_gpu for rk3288
for mali devfreq

Change-Id: I561fe2db1a38bafcf56db7e8991172d6031da41a
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-22 20:50:12 +08:00
Mark Yao
ce4accc725 drm/rockchip: vop: support csc convert for win0/1
Change-Id: I7be5dfb7d2711de5a5aeed730aea0ffd9e080945
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-09-22 20:46:47 +08:00
Mark Yao
c762b0ce17 drm/rockchip: vop: init vskiplines on scale calculate
Here is a Bug on scale calculate:
   int vskiplines = 0;
   maybe vskiplines = 2 on yrgb scl_vop_cal_scale
   maybe vskiplines not update on cbcr scl_vop_cal_scale.
   Then cbcr path would get vskiplines = 2, that is unexpect.

Change-Id: Iaeb0d125c7bbcfb95fe32005ef5c938703d03ed4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-09-22 20:46:34 +08:00
Tero Kristo
c1834e4eb4 UPSTREAM: regulator: core: remove lockdep assert from suspend_prepare
suspend_prepare can be called during regulator init time also, where
the mutex is not locked yet. This causes a false lockdep warning.
To avoid the problem, remove the lockdep assertion from the function
causing the issue. An alternative would be to lock the mutex during
init, but this would cause other problems (some APIs used during init
will attempt to lock the mutex also, causing deadlock.)

Change-Id: I4a4367f3ebc9c7a00d6a08b547f2cebecd600483
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 07c5c3ad98)
2016-09-22 20:12:28 +08:00
Huang, Tao
05b41faf3f pinctrl: rockchip: better show irq chip name
When call irq_alloc_domain_generic_chips, pass the name of the irq
chip with bank name instead of just rockchip_gpio_irq.
So we can know the irq belong to which gpio by read /proc/interrupts.

cat /proc/interrupts

before:
 56:        435  rockchip_gpio_irq   3 Level     bcmsdh_sdmmc
 58:          0  rockchip_gpio_irq   5 Edge      power
 87:          2  rockchip_gpio_irq   2 Level     fusb302
105:         36  rockchip_gpio_irq  20 Level     gt9xx
106:          0  rockchip_gpio_irq  21 Level     rk808
109:          0  rockchip_gpio_irq  24 Level     fusb302
209:         42  rockchip_gpio_irq  28 Edge      es8316_interrupt

after:
 56:        401     gpio0   3 Level     bcmsdh_sdmmc
 58:          0     gpio0   5 Edge      power
 87:          2     gpio1   2 Level     fusb302
105:         39     gpio1  20 Level     gt9xx
106:          0     gpio1  21 Level     rk808
109:          0     gpio1  24 Level     fusb302
209:         37     gpio4  28 Edge      es8316_interrupt

Change-Id: Iff7afda770e8493dc4c105c1d251aeae0f69f639
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-09-22 18:09:49 +08:00
Huang, Tao
8b9c3887dc arm64: configs: update rockchip config by savedefconfig
Change-Id: Ib70a45ed0a7207705ca5cb3609831a93af5510e9
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-09-22 15:08:41 +08:00
Jianhong Chen
00f8ace787 power: rk818-battery: update to v7.1
1. ajust zero algorithm to smooth low power area;
2. set two level speed for finish charging;
3. check divisor to avoid to be zero;
4. add timeout times for finish adc cablibration;
5. fix some logic error and add more debug info.

Change-Id: I248dc6792304b91473af895d549d2f40bcb7a6e2
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-09-21 16:59:24 +08:00
dalong.zhang
5cbe2de0aa camsys_head: 0.0xd.0
Change-Id: Iba577aeda613a7383d1ea0ef05b1a27e3d251f95
Signed-off-by: dalong.zhang <dalon.zhang@rock-chips.com>
2016-09-21 14:20:38 +08:00
Mark Yao
61c969d5c9 drm/rockchip: vop: optimize register take effect check
Previous version check all the win, check its yrgb_mst and
enable bit, it wastes too manys times.

We can simple check the vop cfg_done register to sure vop register
take effect. when we have a new config, set cfg_done to 1, then the
cfg_done would auto clear at frame start event. So when cfg_done is
zero, means that there is no pending configs.

Change-Id: Ib87114cdaea4d3bbc23fd9e0bd9b49d02f4ae1e3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-09-21 14:06:38 +08:00
Wu Liang feng
787f11f0cf phy: rockchip-inno-usb2: release mutex lock if otg in host mode
We add a mutex lock in rockchip_usb2phy_init(), but foget to
release it if otg port work in host only mode.

Change-Id: I45abf173097be4463b668b51eece99a72047fb18
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-09-21 14:02:48 +08:00
Jianqun Xu
a8efa2f611 ARM64: dts: rk3399-evb: disable dmc
Since ddr initalize codes have some update, so ddr dmc driver
needs to update.

Disable the dmc currently for evb to boot success.

Change-Id: Ica259a81f5412da31d41b68c841dfda7d8c2e3b2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-09-20 16:19:26 +08:00
Frank Wang
b900753b66 arm64: dts: rockchip: add usb2 phy-phandle for ohci on rk3366
This adds support usb2.0 phy-phandle for ohci controller on rk3366.

Change-Id: I9b5e27636e7574669ba01e4302c741d8895c68ff
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-09-20 15:43:09 +08:00
Frank Wang
cbfa108290 arm64: dts: rockchip: correct usb-controler reference clk for rk3366
We found that the system on rk3366-sdk will crash at the first time
after updating the whole firmware, the root cause is the 480m clock
from usb-phy has some issues.

Since the new usb-phy driver have taken over the 480m clock's
maintenance, the clock tree have a bit changes, so related
reference clock for usb-controler also need to correct.

Change-Id: I54dcc6f416adf61c34df2b9b897e5b58f3b6fed8
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-09-20 15:42:58 +08:00
Jianhong Chen
e6291fd402 ARM64: dts: rk3366-tb: add rk818 battery node
Change-Id: I03c2668f157b33bdfeff36c474104dd337632aa0
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-09-20 09:55:41 +08:00
smj
a8376d64f4 video: rockchip: hdmi: v2: improved the hdmi nlpcm_mode for bitstream output
- Add the corresponding to samplerate for bitstream
- Add the audio type judgement when open the mode

Change-Id: Ic5bbd2ee214e707fd3695f1a1f359cd43fed9618
Signed-off-by: smj <smj@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-09-19 20:25:26 +08:00
Yakir Yang
8e7db2f928 ARM: dts: add 'support-emmcs' flag for RK3228 EVB board
Private flag of our downstream kernel.

Change-Id: I6dbfcb04748e9d54492df6df20382367ce1218b2
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-09-19 16:54:11 +08:00
Nickey Yang
7b386d5ca4 ARM: configs: rockchip: enable es8323 support
Default enable es8323 codec in rockchip defconfig

Change-Id: I9a080fa72069d15bfe188d4b33c1fd06358f4839
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-09-19 10:52:17 +08:00
Nickey Yang
662648e603 ARM: dts: rockchip: add codec es8323 for rk3288 fennec
This patch makes es8323 work well on the RK3288-Fennec boards.

Change-Id: Ia71101363c5cc4a9650c21c5dbebcad4d785ebf8
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-09-19 10:51:31 +08:00
Nickey Yang
ec49d46958 ASoC: es8323: update codec es8323 driver
This patch update the es8323 codec drivers as follows:

o Remove snd_soc_control_type:
  Now that upstream remove definition of snd_soc_control_type.

o Replace SOC_DAPM_VALUE_ENUM:
  SOC_DAPM_VALUE_ENUM is replaced by SOC_DAPM_ENUM.

o Remove codec->dapm.bias_level = level:
  The line at the end of the set_bias_level callback to update the bias_level state. Now that upstream move this update into snd_soc_dapm_force_bias_level().

o Remove .owner = THIS_MODULE:
  No need to set .owner here.The i2c_driver core will do.

o module_i2c_driver:
  Convert to use module_i2c_driver is simple.

o Add match table:
  Add a device tree match table for es8323 codec driver.

o Add mclk:
  The I2S block provide the output clock as the mclk,so add it.

o Adjust code format:
  Adjust some problems of code format.

Change-Id: I8e0647310eb11325c39ebb408f75cc9ed28df71d
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-09-19 10:51:06 +08:00
wjh
738c6731d1 video: rockchip: dp: add sharp2.89" and AUO3.81" lcd for rockchip discrete vr device.
Change-Id: I6a43bb7da3feeb2a96df56b09aa4e77a9c4d8812
Signed-off-by: wjh <wjh@rock-chips.com>
2016-09-18 19:11:49 +08:00
Elaine Zhang
73fb869fa1 ARM64: dts: rockchip: rk3399: add edp power domain
add pd_edp node.
add the edp needed power domain node for rk3399.

Change-Id: Ie1a4a7013b0d5cfc2b0180f701341a6b977a637a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-09-18 19:11:10 +08:00
xubilv
1ac737f21c video: rockchip: edp: runtime get sync in probe if support uboot display
Change-Id: I0373ef165cf7e21410b05159d4ed25c69bf05d5e
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-09-18 19:10:09 +08:00
Jacob Chen
86cea99f80 ARM64: configs: remove btsdio in linux defconfig
It will cause conflict if we are using other vendor driver.


Change-Id: Ia5f6ccc22c1f733abc1569486d5a864e41d4f4a5
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-18 16:51:58 +08:00
Jacob Chen
cb14aea76b arm: configs: remove btsdio in linux defconfig
It will cause conflict if we are using other vendor driver.

Change-Id: I269c253fae874acf1b0290f5f16ca1433cf33b15
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-18 16:51:25 +08:00
Bin Yang
78057612a8 arm64: dts: rockchip: add hall-sensor device node for rk3399-mid
Change-Id: Iaf9c8aebc1006fe6058536689c1561c66ddde162
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-09-18 16:44:14 +08:00
Bin Yang
5b8dd3f118 sensor: add hall sensor mh248 driver support
Change-Id: Idc8a068af8de06c058a2553d174b75166436a5ed
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-09-18 16:43:14 +08:00
Bin Yang
7d9036b161 Documentation: bindings: add DT documentation for rk_sensor.txt
Change-Id: I06710a0adf648deff3700ec66fba5ac658a49fe7
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-09-18 16:42:12 +08:00
Mark Yao
9cb1ed8edf drm/rockchip: vop: fix rk3036 no display
Rk3036 vop default is blank, so init vop with unblank.

Change-Id: I10c21af70cec95b7073f8c999e655031ee154747
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-09-18 10:04:29 +08:00
Jacob Chen
c286307439 arm: configs: enable mali devfreq in rockchip_linux_defconfig
Change-Id: Idb43bc4a60c4d1b22d330cf2ea1d0e4b48b60d4d
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-14 18:58:33 +08:00
Doug Anderson
5330549bfd UPSTREAM: i2c: rk3x: Restore clock settings at resume time
Depending on a number of factors including:
- Which exact Rockchip SoC we're working with
- How deep we suspend
- Which i2c port we're on

We might lose the state of the i2c registers at suspend time.
Specifically we've found that on rk3399 the i2c ports that are not in
the PMU power domain lose their state with the current suspend depth
configured by ARM Tursted Firmware.

Note that there are very few actual i2c registers that aren't configured
per transfer anyway so all we actually need to re-configure are the
clock config registers.  We'll just add a call to rk3x_i2c_adapt_div()
at resume time and be done with it.

NOTE: On rk3399 on ports whose power was lost, I put printouts in at
resume time.  I saw things like:
  before: con=0x00010300, div=0x00060006
  after:  con=0x00010200, div=0x00180025

Change-Id: I9799a77b9f332ef6b72ca2a8c1ee348b470a4d53
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Tested-by: David Wu <david.wu@rock-chips.com>
[wsa: removed duplicate const]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-09-14 18:55:54 +08:00
lanshh
89f21aa60d hid: rkvr: add remove sync process, add sync ioctl to sync with nanoc before trasmitting
Change-Id: I46c8577b2a9c8dd9b66597fba3775966f030ecfd
Signed-off-by: lanshh <lsh@rock-chips.com>
2016-09-14 09:03:52 +08:00
lanshh
be87e0b1f2 drivers: iio: imu: remove sync attribute in sysfs, we direct access hid-rkvr by ioctl
Change-Id: Ic3605da06f3c8388910b162cf468e03709a98dd0
Signed-off-by: lanshh <lsh@rock-chips.com>
2016-09-14 09:03:38 +08:00
zzc
3dedf8022e arm64: dts: rockchip: keep wlan power in suspend for rk3399_evb
Change-Id: Iad47ee30f9668ad8ad558dbcebc9023b737911a1
Signed-off-by: zzc <zzc@rock-chips.com>
2016-09-13 20:33:49 +08:00
Huang Jiachai
651dc6cdce video: rockchip: fb: update for one vop dual mipi ver scan mode
Change-Id: I07b5970a6f3dc01110dde59615e537612c408e2a
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-09-13 20:33:27 +08:00
Wu Liang feng
3caa76d5fd phy: rockchip-inno-usb2: don't cancel chg_work if otg in host mode
Because chg_work is used for charge detection, so if OTG works in
Host mode, we don't need to initialize chg_work, and aslo we don't
need to cancel it when phy exit.

Change-Id: I19cbede5aeb4c1f7f8faa32f195fffb0fc71eca9
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-09-13 20:32:40 +08:00
Jianqun Xu
ab01a407fc ARM64: dts: rk3399-evb: support ddr devfreq
Enable ddr devfreq for rk3399-evb.

Change-Id: Ie9f0f6d149f547fea35cabc995fe87f33e5c934d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-09-13 16:04:15 +08:00
Jacob Chen
5e628b3d38 ARM: dts: rockchip: add ums boot mode for Linux
Change-Id: I7f5edb9edbe5b9656fafdfb84f523aa45aa93d93
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-13 14:46:06 +08:00
Jacob Chen
58e70152a1 dt-bindings: soc: rockchip: add ums mode
On upstream uboot, we use ums mode to update firmware.
Add this flag to help enter USB Mass Storage mode.

Change-Id: I0e515bfd8703bd48d950b72787b365226af11ce9
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-13 14:42:44 +08:00
Jacob Chen
a5b2de5cc9 FROMLIST: ARM: dts: rockchip: add syscon-reboot-mode DT node
Rockchip platform use a SYSCON mapped register store
the reboot mode magic value for bootloader to use when
system reboot. So add syscon-reboot-mode driver DT node
for rk3xxx/rk3036/rk3288 based platform

Change-Id: I625613021621bd07a531d29cdb4b7c31a8bfc364
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-13 14:42:18 +08:00
Jacob Chen
2167cc1b27 arm: dts: add rk3288 miqi board
Change-Id: I2056e5698bc9f3ccad773859fd5168607516b6eb
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-09-13 14:41:31 +08:00