Commit Graph

596537 Commits

Author SHA1 Message Date
Zorro Liu
5bfcbbd799 driver, inv_mpu: store register suspend and recover register resume, if hardware poweroff when suspend
Change-Id: I758be101acfd7a3a756c75bd4f13542daef850d1
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-09-01 15:49:55 +08:00
lanshh
ff83b530e9 iio: imu: add usb sensor driver to support rkvr
Change-Id: I7aeaba5a90f427304b0debf0e0063685fa2f6f09
Signed-off-by: lanshh <lsh@rock-chips.com>
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-09-01 15:49:25 +08:00
lanshh
bb21b20985 hid: add usb hid driver for rockchip discrete vr device.
repor key event and send sensor data to iio driver

Change-Id: I6fdaa1eb88e8974675550061f022ce506e00f28e
Signed-off-by: lanshh <lsh@rock-chips.com>
2016-09-01 15:48:37 +08:00
Wu Liang feng
7b9548efe6 usb: dwc3: fix possible NULL pointer dereference for rockchip plat
Change-Id: I2afb1fa38ae6e76b8db397bda59fd9fbafe9a53b
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-09-01 12:01:04 +08:00
Wu Liang feng
05b4496284 usb: dwc3: gadget: stop gadget even if fail to stop ctrl
In dwc3_gadget_suspend(), if fail to stop DWC3 controller,
and return without do __dwc3_gadget_stop(), it will not
disable ep0 and ep1, and the dep->flags stays in the state
DWC3_EP_ENABLED, this will casue gadget connect failed.

A typical case is:
DWC3 works as DRD mode, fist plug in OTG HOST cable and
works as HOST mode, then plug out HOST calbe, after this
operation, it will do runtime supend -> dwc3_gadget_suspend()
-> dwc3_gadget_run_stop() fail -> return without stop gadget,
and then plug in OTG device cable, fail to connect with PC.

Change-Id: I79daff8a9e8175cd13ac57e2abc63d4e5f694b1c
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-09-01 11:58:40 +08:00
Wu Liang feng
c1dea417c7 usb: dwc3: support runtime power management for rockchip platform
This patch adds runtime power management support for rockchip platform.
It depends on extcon notifier to do runtime resume and runtime suspend.
And since the dwc3 core dev is the only child of dwc3 rockchip dev, so
we need to ensure dwc3 core dev enter runtime suspend befer put dwc3
rockchip dev in runtime suspend. And after do runtime resume dwc3 core
dev, the PM core will resume dwc3 rockchip dev prior to dwc3 core dev
resume. With this patch, we can power off USB3 power domain and disable
clocks in runtime suspend.

Change-Id: Ib529889a8603d12dcdce80e9e0716be44c028bd3
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-09-01 11:57:54 +08:00
Zhangbin Tong
f3c4a8082b arm64: dts: rk3399-box: vdd_gpu force PWM mode via regulator mode
Change-Id: I20552fb4896cc6de20b7729a6ec42447c447c01c
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-09-01 11:28:42 +08:00
wuliangqing
512272a814 ARM64: dts: rockchip: rk3399: vr: adjust temperature
Change-Id: Ifef9ff7092a6f80e805bfcb249ed41c4a5c7a4fa
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-09-01 11:26:31 +08:00
wuliangqing
51dc5b3de7 ARM64: dts: rockchip: rk3399: vr: add io for syr828/827 sleep off contrl
Change-Id: Ibc9419b86c0038217a69e14a2b7dd511ebe58f5d
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-09-01 11:26:14 +08:00
Binyuan Lan
078afbc833 power: rk818: add power on/off source print
Change-Id: I4ea6cff9ecd0ebe87fb454cd26945c252f342e1f
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2016-09-01 11:22:12 +08:00
Finley Xiao
f19160ef1c arm64: dts: rk3399-rev3: modify the cpu's opp table
The opp table can cover the chips whose leakage is between 30mA and 60mA.

Change-Id: I50be3923eb6016cba6309380006ce902d22fe123
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-09-01 11:21:53 +08:00
Zhou weixin
f0ca5a2c13 arm64: dts: rockchip: enable dmc and set A53 1.5G voltage to 1.1V on rk3399 mid
Change-Id: Iba037b12276f2f4db22611e6cb944643056345c6
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-09-01 11:13:21 +08:00
Weilong Gao
25cca9ca64 arm64: dts: rockchip: add 32.768K clk node for BT on rk3399 evb/mid/vr board
Change-Id: I712fa3915e7fa071d136cdf157dceee6b1f18994
Signed-off-by: Weilong Gao <gwl@rock-chips.com>
2016-09-01 11:11:03 +08:00
Jianqun Xu
a92d1b947f ARM64: dts: rk3399-android: add ddr devfreq nodes for rkfb
Devfreq will register notify to rkfb, to handle vop during ddr
changing frequency.

Change-Id: I22365597054b2155ef1b9754d6ecac243520b3ee
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-09-01 10:03:12 +08:00
Shawn Lin
68ffa69929 PCI: rockchip: fix wrong clr for phy interrupt
We probably didn't notice this as we still use
evb-rev1 to test our SSD with PCIe on which
the client interrput is broken actually.

Change-Id: I70e2644b9017cc5cd1b7445efb24fa69e22e0901
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-08-31 14:02:04 +08:00
Jacob Chen
9d02460ccb arm64: rockchip_linux_defconfig: add some driver config according to cros
Some changes is made by savedefconfig

Change-Id: I19ac249e4510368299e8376bfbda30a34ade7b59
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-08-31 14:01:23 +08:00
Jacob Chen
8407f6daed arm64: dts: rockchip: enable the backlight device node for Sapphire-linux
Change-Id: I6b9fe6d2563975a5524262aa3c32ebd37741f33c
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-08-31 14:01:13 +08:00
Huang Jiachai
e4ae32ab8d video: rockchip: fb: add car_reversing for px5
if userspace set car_reversing 1, rk fb will ignore
buffer from hwc.

Change-Id: Ib3bb9a105a8d6b7a2cc0e71c21bf8cc208b4ffd3
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-08-31 14:00:00 +08:00
David Wu
7bef813023 pwm: rockchip: add rk_fb config_done for voppwm
Change-Id: Iea012bfcec972f4b722950ea06713d2df4690242
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-08-31 13:57:58 +08:00
wenping.zhang
914ca81004 video: rockchip: hdmi: add new hdmi resolution mode support for discrete vr device.
For some special hdmi pixclock we should add support for this clock in hdmi phy mpll table.

Add new format SUPPORT_RK_DISCRETE_VR for rockchip discrete vr device,if hdmi device
is rockchip discrete vr device, please set the vic = HDMI_VIDEO_DISCRETE_VR in hdmi timing.

Change-Id: I820f967a84fbb7737cd9e1c2951b89df63863298
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-08-31 09:46:27 +08:00
wenping.zhang
9c80b56db4 video: rockchip: hdmi: add SUPPORT_VESA_DMT feature support for rk3399 hdmi.
Change-Id: Idafd772831593285af864eb3adf045e99f3c8d4a
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-08-31 09:42:12 +08:00
Elaine Zhang
3517f21ca6 ARM64: dts: rk3399: syr82x: support vsel pin to en/disable dcdc
Set vsel pin to active to disable DCDC,
Set vsel pin to inactive to enable DCDC.

Change-Id: Ie7d98730e5f59ffe38f0b88388cfb5b852316fe3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-08-30 15:21:10 +08:00
Elaine Zhang
4336ef5f14 regulator: fan53555: fix up the dcdc is disabled when reboot
Before reboot if the DCDC is disabled,
the DCDC is still disabled after restart.
We have an method to workaround:
Use vsel pin to switch the voltage between value in FAN53555_VSEL0
and FAN53555_VSEL1. If VSEL pin is inactive, the voltage of DCDC
are controlled by FAN53555_VSEL0, when we pull vsel pin to active,
they would be controlled by FAN53555_VSEL1.
In this case, we can set FAN53555_VSEL1 to disable dcdc,
So we can make vsel pin to active to disable dcdc,
VSEL pin is inactive to enable DCDC.

Change-Id: I14c823ed11dc3369044ad2ed0b53a6027acbccd0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-08-30 15:21:02 +08:00
Zhou weixin
e54b749e80 arm64: dts: rockchip: set gpu and cpu power control in suspend on rk3399 mid
Change-Id: I0c96ccc04f18c3a5df3a045dde62c7741acbbfbd
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-08-30 10:47:21 +08:00
Herman Chen
d16a8c7220 rockchip/vcodec: fix crash on decoder buffer empty
On vpu2 register separate interrupt bit and enable bit to different
register. When decoder found a buffer empty error which means the input
stream is not enough for one complete frame decoder will not stop
reading input stream buffer until it reach the end of buffer. This will
cause mmu fault on the buffer end.

In order to avoid this case decoder need to clear the enable bit in the
enable register to stop decoder from reading.

Change-Id: I6133aa4611fab03f6545b4775e8ee2320552445f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-08-29 19:46:26 +08:00
Shengqin.Zhang
849db440c5 rockchip/rga: add src1 mmu table config when ABB mode
when rga2 use alpha under mmu, it must config src1
mmu addr for src1 channel will read mmu table

Change-Id: I6131a546421a5195bf3ae183f6fc7cb50fb09cfc
Signed-off-by: Shengqin.Zhang <zsq@rock-chips.com>
Signed-off-by: Zhiqin Wei <wzq@rock-chips.com>
2016-08-29 17:57:58 +08:00
Huang, Tao
9274f2a4fc Revert "arm64: Increase the max granular size"
This reverts commit 9730348075.

All Rockchip SoCs only have 64 bytes cache line length, so
it is not need this patch, which increase memory consumption.

Change-Id: Idf684189e7f7011562337a70dc7d26c8dceee7a6
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-08-29 15:46:12 +08:00
Elaine Zhang
f873212d3e regulator: fan53555: add regulator-initial-mode to set default mode
regulator-initial-mode: default mode to set on startup
regulator-initial-mode is set as:
        REGULATOR_MODE_FAST                     0x1
        REGULATOR_MODE_NORMAL                   0x2
Example:
 vdd_cpu_b: syr827@40 {
                compatible = "silergy,syr827";
                reg = <0x40>;
                vin-supply = <&vcc5v0_sys>;
                regulator-compatible = "fan53555-reg";
                regulator-name = "vdd_cpu_b";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
                regulator-ramp-delay = <1000>;
                fcs,suspend-voltage-selector = <1>;
                regulator-always-on;
                regulator-boot-on;
                regulator-initial-state = <3>;
                regulator-initial-mode = <1>;/*1:pwm 2: auto mode*/
                        regulator-state-mem {
                        regulator-off-in-suspend;
                };
        };

Change-Id: I4d3bbd50fd40531113f2cc6fe63905e24888a752
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-08-29 15:17:14 +08:00
Jianqun Xu
0f75dc4209 PM / devfreq: add to show current load of device
Calculate current load with busytime / totaltime from status,
also show the current frequency.

Change-Id: Ic310035db9c5478aa3d0b1e526b47c451fe09d23
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-29 14:58:21 +08:00
dalon.zhang
72f7047efc camera: rockchip: camsys driver 0.0x21.5
Change-Id: I4855b2e31fff158ae4690781ccc8e0ab0a20273c
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
2016-08-29 11:36:54 +08:00
Huang, Tao
58f443ef96 HACK: lib/kobject_uevent.c: ignore thermal uevent when suspend
Android healthd try to listen power_supply subsystem uevent,
but which will block system from suspend on big.LITTLE system
because thermal_cooling_device_unregister will called when
cpufreq_exit. So ignore this uevent when suspend.

Change-Id: I35948498916560d5ec75fe561c9e9d588663ad22
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-08-26 19:44:52 +08:00
Rocky Hao
83fb4e1f93 thermal: rockchip: add temperature dump when panic
Change-Id: I8cf3bbaea76d379dcfd1c89482254854df62cfea
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-08-26 17:26:48 +08:00
Sugar Zhang
e489b53214 ARM64: dts: rk3399: add pd control for i2s, spdif
Change-Id: Ifdf9b9432f66d54ce99888e41f86bd773df86dbb
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-08-26 16:53:21 +08:00
Peter Ujfalusi
7e867dd12a UPSTREAM: ASoC: simple-card: Add pm callbacks to platform driver
Set snd_soc_pm_ops for the pm ops to make sure that the ASoC level of PM
operations are going to happen. This is needed to get suspend/resume
working correctly when the audio is using simple-card.

Change-Id: Id0355673bc89456fedd3d035cbfd0f7f8f51d1da
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 7c3767115a)
2016-08-26 16:53:21 +08:00
Zorro Liu
c490e7c0c2 ARM: dts: rockchip: vr-android: add spi1 sleep pinctrl
Change-Id: Ie3a4d8ea56dc2343a749ccc035002f0b25a356a3
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-08-26 16:40:35 +08:00
Jianhong Chen
8e56d04626 power: rk818-battery: remove zero algorithm init and add dump info
Change-Id: I47c02b4ac383de1b6943cd63a397fc99f594c9b9
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-08-26 15:52:53 +08:00
xuhuicong
f50b772b0a arm64: dts: rockchip: add cdn-dp-fb node for rk3399 android
Change-Id: Ie9651babf59d29547f6b506356cce5cd2618e5ae
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-08-26 12:03:35 +08:00
xuhuicong
76cc443cfc arm64: rockchip: rockchip_defconfig enable dp with rk fb
Change-Id: I3208244641cb95fd14c6b814efe2cc6af214affd
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-08-26 12:00:03 +08:00
xuhuicong
5f713d0f60 video: rockchip: dp: add cdn DP support for rk3399 with rk fb
Change-Id: Iaa36594e15d19e939f0929e2d6ee2ae99b6ce799
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-08-26 11:55:55 +08:00
Lin Huang
289e55a533 ARM64: dts: rk3399: add dmc and dfi node
To support ddr frequency scaling function, we need
enable dmc and dfi node.

Change-Id: I84ea6bff679365d86937ff10bcdf466ea31901fb
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-26 11:28:29 +08:00
Huibin Hong
3510d70d3e spi: rockchip: set pinctrl state when suspend and resume
Change-Id: I3bfd641513dc8ad0112cb718383eb458c7659a84
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-08-26 10:46:22 +08:00
Jianqun Xu
fd3bb70480 ARM64: dts: rk3399: fix error address for wdt0
The address of wdt0 and wdt1 are swapped, let's fix it.

Change-Id: I715d181b8984a72ad234d4c1389154f15b60738a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-26 10:25:29 +08:00
Huang Jiachai
3018fa691e video: rockchip: lcdc: add support dmc
Register dmc notify after than dmc driver.

Change-Id: I11c7daee1b4882da87d209854f0bda980c14551b
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 21:22:12 +08:00
jerry.zhang
b403b6bc55 arm64: dts: rockchip: modify l-sensor node for rk3399 tablet product
Change-Id: I41c90b8d24b79009cbb1320e19de2e4a1a400a97
Signed-off-by: jerry.zhang <jerry.zhang@rock-chips.com>
2016-08-25 21:02:30 +08:00
jerry.zhang
bcc129a3a5 arm64: dts: rockchip: change N key to home for rk3399 VR product
Change-Id: Ie173ee9fedec12cc1ef19e90673488d54e887807
Signed-off-by: jerry.zhang <jerry.zhang@rock-chips.com>
2016-08-25 21:02:19 +08:00
Jianqun Xu
b35f4b240e ARM64: configs: rockchip_defconfig: enable rk3399 dmc
Change-Id: I1e9a35d65d44a5f82c36546e5520ea5072b2231d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 20:51:07 +08:00
Jianqun Xu
edce4a4919 PM / devfreq: rockchip-dfi: disable irqs during accessing ddr monitor
Change-Id: Ie4817a77fcb1283f37f41ab097f02ed7dc9cd18c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 20:30:07 +08:00
Jianqun Xu
e92cf67a4c PM / devfreq: rockchip: rk3399 dmc get opp table from dts
Get opp table from device node for rk3399 dmc table.

Change-Id: I689078d60ebdadf0954b60de70d05bc56a8d6597
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 20:29:02 +08:00
huang lin
200781e81d FROMLIST: PM / devfreq: rockchip: add devfreq driver for rk3399 dmc
Base on dfi result, we do ddr frequency scaling, register
dmc driver to devfreq framework, and use simple-ondemand
policy.

Change-Id: I4cc6bd9218f6fe0ae09d79c23516c6dbdaa59af2
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 20:25:52 +08:00
huang lin
6b37710281 FROMLIST: Documentation: bindings: add dt documentation for rk3399 dmc
This patch adds the documentation for rockchip rk3399 dmc driver.

Change-Id: Icaff8fa2173ded5c64a08e877d32a8eca1a0c3be
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 19:04:37 +08:00