Commit Graph

598955 Commits

Author SHA1 Message Date
Viresh Kumar
2cfe35d495 UPSTREAM: cpufreq: Send START policy notification after sending CREATE
The sequence got a bit wrong as we are sending CPUFREQ_START
notifications even before we have sent CPUFREQ_CREATE_POLICY.

Fix it.

Change-Id: I7d1fba317314bb5e5601b1354494398def156424
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 388612baba)
2016-12-26 17:46:23 +08:00
Finley Xiao
7ac7e477b6 arm64: dts: rockchip: rk3366: add cpu avs node
Change-Id: I7d984bf44e04d205c243eb2012cd06ba7c7fe548
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 17:45:55 +08:00
Shunqing Chen
2718b444f3 ARM64: dts: rk3399-tve1205g: host state notify ec module through gpio
Change-Id: I3716de0618394de010000a0497de1b3c83cd88ab
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-26 17:45:22 +08:00
Shunqing Chen
c76f182c49 power: host state notify ec module through gpio
Change-Id: I6b1401c6959a05fce1d6d7ca7a5fb581782fd30d
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-26 17:45:08 +08:00
wenping.zhang
9c88c3dac1 mfd: fusb302: fix fusb302 disconnect error.
shift the time of vbus enable before attach debounce started,
and merge the code of get_cc from chrome ec driver, which used
to fix connection disconnected issue.

Change-Id: I2fd1f83d0265b3770d75a59d622d0f650d737c5b
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-26 14:56:33 +08:00
huweiguo
7925bc3557 net: rkwifi: enable GET_CUSTOM_MAC_ENABLE
Change-Id: I8ea15be317e4bbe1d9cf0834e42536fc4dc4b9d7
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-26 14:18:34 +08:00
Finley Xiao
d505707379 arm64: dts: rockchip: rk3399: Rename OPP nodes as opp@<opp-hz>
It would be better to name OPP nodes as opp@<opp-hz> as that will ensure
that multiple DT nodes don't contain the same frequency. Of course we
expect the writer to name the node with its opp-hz frequency and not any
other frequency.

And that will let the compile error out if multiple nodes are using the
same opp-hz frequency.

Change-Id: I8c77646329e39390fb135d4d75d34893a8168876
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 12:02:00 +08:00
Finley Xiao
0d418c6105 arm64: dts: rk3399: modify opp table according to latest chips
Change-Id: I2a1b5fac74617cf57a5655411f0326800a6a990d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 12:01:28 +08:00
WeiYong Bi
791aa7dedc arm64: dts: rockchip: support use drm on rk3399 excavator linux
1. fixup edp enable gpio.
2. add backlight enable gpio.
3. enable route_edp node.

Change-Id: I4b4792abe3c8eb7dba0c2f5c0d3ddffff74478d1
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 18:33:53 +08:00
WeiYong Bi
39e7667ca4 arm64: dts: rk3399_linux: support use drm on rk3399 linux
Change-Id: I9b248af7d86d34a669219fbe62a195ee2b49e516
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 18:33:45 +08:00
huweiguo
b58f60a9e8 net: rfkill-wlan: prior to use wifi addr store in vendor storage
Change-Id: I32ef43e1f47ee658675b26d54fa834ae9362382f
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-23 18:06:32 +08:00
Elaine Zhang
ccde3d690b ARM64: dts: rockchip: add power domain node for RK3328 Soc
add pd node for RK3328 Soc
create power domain tree

Change-Id: I0ef5729d397105a7992cb4b7440cdc2b251bd1af
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-23 18:03:26 +08:00
wenping.zhang
f2576a3f56 arm64: dts: rk3399-android: add core reset for dp.
Change-Id: I7c86cfbf28cb278bcadebbb08ba31a8b81bdd290
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-23 17:57:03 +08:00
wenping.zhang
3277fb894f video: rockchip: dp: fix dp fw load error.
Do dptx/apb/core reset on every dp clock enabling, otherwise dp
will fail to load the firmware sometimes.

Change-Id: Ied0caad99d865ec86162dead2b4769a53f8db12a
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-23 17:55:32 +08:00
WeiYong Bi
bd94271915 arm64: dts: rockchip: support use vpu on rk3399 excavator linux
Change-Id: I5ea28cd4539140a149f1725a1622fd1dcae3e020
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 17:50:14 +08:00
Mark Yao
2dc37ec50d drm/rockchip: gem: add mutex lock for drm mm
drm_mm_insert_node_generic and drm_mm_remove_node may access same
resource with list ops, it's not threads safe, so protect this context
with mutex lock.

Fix bug:
[49451.856244] ==================================================================
[49451.856350] BUG: KASAN: wild-memory-access on address dead000000000108
[49451.856379] Write of size 8 by task Binder:218_4/683
[49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
[49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[49451.856469] Call trace:
[49451.856519] [<ffffff900808a9d0>] dump_backtrace+0x0/0x230
[49451.856556] [<ffffff900808ac14>] show_stack+0x14/0x1c
[49451.856592] [<ffffff90084a4de0>] dump_stack+0xa0/0xc8
[49451.856633] [<ffffff900821b700>] kasan_report+0x110/0x4dc
[49451.856670] [<ffffff900821aa84>] __asan_store8+0x24/0x7c
[49451.856715] [<ffffff90086158c4>] drm_mm_insert_node_generic+0x2dc/0x464
[49451.856760] [<ffffff90086406a8>] rockchip_gem_iommu_map+0x60/0x158
[49451.856794] [<ffffff9008640bb4>] rockchip_gem_create_object+0x278/0x488
[49451.856827] [<ffffff9008641020>] rockchip_gem_create_with_handle+0x24/0x10c
[49451.856862] [<ffffff9008641364>] rockchip_gem_create_ioctl+0x3c/0x50
[49451.856896] [<ffffff900860aee4>] drm_ioctl+0x354/0x52c
[49451.856939] [<ffffff900823d948>] do_vfs_ioctl+0x670/0x78c
[49451.856976] [<ffffff900823dac4>] SyS_ioctl+0x60/0x88
[49451.857009] [<ffffff9008082ef0>] el0_svc_naked+0x24/0x28

Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-12-23 11:11:55 +08:00
Zhou weixin
ff541f79f1 ARM64: dts: rk3399-tve1205g: add wakeup support for hid keyboard
Change-Id: I21d0f6dac30f64b90c68f98c11c0cc7012e2b1b6
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 18:12:45 +08:00
Zhou weixin
578582392c HID: i2c-hid: add support wakeup
Change-Id: I15890509ff5983e1a8adaa48b28391ec67de8bb5
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 16:24:27 +08:00
huweiguo
215fd01589 ethernet: rockchip: get and save eth addr in vendor storage
Change-Id: I83d8bc81ca8d33e6f2575d0d90a3dc5978500a64
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-22 16:07:34 +08:00
Huang, Tao
c8e3cdd349 input: keyboard: rk_keys: add rk_keys.h
Make sure drivers work if rk_keys do not selected.

Change-Id: I2882e6c69f0ddbff54089f824be33964ded3cb2e
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 15:31:12 +08:00
Huang, Tao
fa25ca7318 rk: rm drivers/clk/rk
Change-Id: I8c541c0edb446a285ca5097b597216635e755460
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 14:23:30 +08:00
dalong.zhang
436d4c489e camera: rockchip: camsys driver v0.0x21.9
Change-Id: I371f3bfc1e6276407bb9481f4a7897d4955903ba
Signed-off-by: dalong.zhang <dalon.zhang@rock-chips.com>
2016-12-22 14:00:27 +08:00
Huang, Tao
b208f11618 soc: rockchip: reboot-mode: rename BOOT_LOADER to BOOT_BL_DOWNLOAD
Same as upstream.

Change-Id: Id9042d288bdbac2fede7da4aee13cc7a32609d6d
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 12:04:44 +08:00
Huang, Tao
541ba1412b arm64: dts: rockchip: move vpu/rkvdec to rk3399.dtsi
Right now only one driver support vpu and rkvdec,
so move the nodes from rk3399-android[-next].dtsi to rk3399.dtsi.

Change-Id: Id908843774ed8eede3aeddb24059ae92a35e5b98
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 11:58:18 +08:00
Shunqing Chen
e74a918a47 arm64: rockchip_defconfig: enable EC_BATTERY
Change-Id: I7f467608e6d366b8839dc171ad98c928fe3ed788
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-22 10:36:41 +08:00
Elaine Zhang
0f2a06b135 soc: rockchip: power-domain: Modify power domain driver for rk3328
This driver is modified to support RK3328 SoC.
RK3328 SoC is only support idle.
add DOMAIN_M type, for support regs have write_enable bit.

Change-Id: I5780b7bab680ddd9d9480e19d7c49681dd571d27
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-22 10:19:29 +08:00
Elaine Zhang
1a0ee03a6b dt-bindings: add binding for rk3328 power domains
Add binding documentation for the power domains
found on Rockchip RK3328 SoCs.
But RK3328 SoC just support idle, not support pd.

Change-Id: I331680b2e91a45fd09f4bdab7ff9fd3990cb35c4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-22 10:19:16 +08:00
Elaine Zhang
5e7595141e dt/bindings: power: add RK3328 SoCs header for idle-request
According to a description from TRM, add all the idle request.

Change-Id: Ia2fdb20d89f7e668a3c86074ebed8c73ab0a9429
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-22 10:19:09 +08:00
Shunqing Chen
620a4f67a4 power: add ec battery driver
Change-Id: I7b1b0087a9ec361ec322a34b4caefc71a51bd2c9
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-22 10:18:37 +08:00
Zhaoyifeng
bef7ae199a drivers: soc: rockchip: fix vendor storage write issue
Change-Id: I65bf5896ac8cf792c400755fc62e3e433209891d
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2016-12-22 10:17:30 +08:00
Zhou weixin
739d11dee7 ARM64: dts: rk3399-tve1205g: add leds gpio control
Change-Id: I89b0c1a2ee631b133f81494063b6cb4a57a1daca
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 10:14:31 +08:00
Huang, Tao
d83da99f31 soc: rockchip: rename rockchip_boot-mode.h to rockchip,boot-mode.h
Same as upstream.

Change-Id: Ic1887e5cf808ebf214168b51683dec25880f0dac
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-21 21:41:34 +08:00
zhangjun
b50d6cbbe2 ASoC: es8316: fix null pointer error
due to function will be called from rk_headset_irq_hook_adc.c
when es8316 configured in defconfig file but not in device tree

Change-Id: Ie0294fff2c05b9f77c6740d81dc9445007c1b62b
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-12-21 17:57:37 +08:00
zhangjun
e4dc8c0001 arm64: rockchip_defconfig: enable cx2072x
Change-Id: If2aaec6ffd360033f911ac2e5e2d3bd575dfdcb1
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-12-21 16:36:40 +08:00
Shawn Lin
e946f494b4 NVMe: don't try to read csts when failing to reset it
We could find the external abort for trying to access
nvme's BAR space to check the csts, but it's possible
that the link state is forbidden to access the BAR when
failing to reset it. So we should reuse the former csts
to print the log instead of doing that again.

Change-Id: I34438a726381e588eb21149b1aab76a66ef0e665
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-12-21 11:22:23 +08:00
Frank Wang
5cd329fd35 usb: dwc3: redo the mode setting at core init
When dwc3 core enters into suspend mode, the PD may turn off
for power saving, which will cause dwc3 controller lost the
mode operation when resuming time.

This adds redo the mode setting into dwc3_core_init() function
to avoid this issue.

BUG=Redmine: Defect#110481
TEST=rk3399-sapphire-excavator-box(CVTE), check if USB3.0 HUB
can be enumerated after PM resume.

Change-Id: I61c512e9c368afc665cd4d5900367079ed22a34e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-12-21 11:07:12 +08:00
Frank Wang
77f6848ad5 phy: rockchip-inno-usb2: rm phy_power_on/off in suspend/resume cases.
Usb-controller can invoke phy_power_on/off in its suspend/resume
process, so usb-phy need not do it again.

This adds remove phy_power_on/off in its suspend/resume cases.

Change-Id: Ice30e79ffba8116ca9bfae344c7ea232f6580130
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-12-21 11:06:31 +08:00
William Wu
47b413c592 usb: dwc3: rockchip: power off usb2 phy in suspend
DWC3 use extcon notifier to manage USB cable detection
and mode switch. For host mode, if USB device connected,
it requires to reset the whole DWC3 controller to make
sure that pipe power state in P2 before power on USB3 PHY,
after do DWC3 reset we will do phy power on in extcon evt
work, however, the DWC3 core will do phy power on again
in runtime resume process (dwc3_runtime_resume() ->
dwc3_core_init() -> phy_power_on()). This will cause PHY
power off failure during suspend because we just do once
phy power off in suspend(dwc3_suspend() -> dwc3_core_exit()
-> phy_power_off()).

This patch does phy power off in suspend to make sure that
USB2 PHY enter suspend in HOST mode. And because USB3 PHY
power on operation need to be done while the pipe is in P2
state, but after resume the pipe is in P0 state, so we just
put USB3 PHY in power on state.

Change-Id: I643ba0abeb015be9285fd29d59fa0e006131c39b
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-21 11:06:11 +08:00
Frank Wang
c2428419e7 arm64: dts: rockchip: keep vbus always on for usb2.0 host of rk3399
One basic condition of usb remote wakeup is vbus on, so we add
regulator-always-on property for vcc5v0_host regulator in this adds.

In the previous codes, ehci/ohci-platform did not power off
vcc5v0_host regulator due to some oddish codes, and we have fixed it
at commit b5a0a9e8794d.

Change-Id: I95c225c9c3aeec6e346d62e61fdcde5e5e02d143
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-12-21 11:05:41 +08:00
Kever Yang
62bde09948 arm64: rockchip_cros_defconfig: enable Type-C PHY and DP config
Change-Id: Iac8930ad5c229e385889fa8b042973730a5aea2b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2016-12-21 09:37:42 +08:00
zhangjun
59bdb4b943 ASoC: Add driver for codec cx2072x
Change-Id: I9a0eb611a4e0d861b7d47d4944b93203f823738b
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-12-21 09:31:15 +08:00
Hao Xiaowei
bf108cf93f arm64: dts: rockchip: modify logo-mode as center for rk3399 mid
Change-Id: I529a1063efd6475d49f6eb738e4612cfb711ced1
Signed-off-by: Hao Xiaowei <hxw@rock-chips.com>
2016-12-20 21:32:20 +08:00
Jung Zhao
3d6d4e5b2a video: rockchip: vcodec: add log message in iommu drm
Change-Id: If66e7654d87c790977378630824d582f2f4c4ffa
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-12-20 21:03:26 +08:00
Jung Zhao
3738993494 video: rockchip: vcodec: add buffer recycle mechanism in vpu
when info change, vpu driver doesn't know when to release
buffers. with this mechanism, vpu driver will auto release
when buffer nums bigger than BUFFER_LIST_MAX_NUMS.

Change-Id: Id4fb91257d260bfd2e18388731941c4f0cc191b0
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-12-20 21:01:22 +08:00
Jung Zhao
5c788fa92a video: rockchip: vcodec: fix fd import error
Since fd will be reused even if dma buffer doesn't release,
this will cause output buffer error when use usb camera
with mjpeg or h264 format.

Change-Id: I2baeb2c5d9127df0a0eb362b8c577c05ceca470d
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-12-20 21:01:04 +08:00
Chris Zhong
7b6b1d893a arm64: dts: rockchip: enable cdn-dp for rk3399-evb-cros
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I7f86533a5890edd1fc113bf9553764ab3dee7640
2016-12-20 20:20:14 +08:00
Sugar Zhang
ed1e3669a3 UPSTREAM: ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle
when step into runtime_suspend, i2s pd will be disabled and loss state.
so need to restore register when runtime_resume.

Change-Id: Ie37aba46f6ee21be2af404da24ba667e3ca86d6c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from git.kernel.org broonie/sound.git topic/rockchip
 commit f0447f6cbb)
2016-12-20 20:17:10 +08:00
Chris Zhong
945920c2d7 arm64: dts: rockchip: add cdn-dp node for rk3399
Add a node for the cdn DP controller which is embedded in the rk3399
SoC.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Change-Id: I253bb9b9d6c1b8a407f7c49503ec666bb8b64d4d
2016-12-20 20:16:03 +08:00
Chris Zhong
5da8af22eb drm/rockchip: cdn-dp: add hdmi-codec jack event
Use HDMI connection / disconnection notifications to update an ALSA
jack object.

Change-Id: Ia18537be1ddb899b7ac490560bf91d7de83eae02
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-12-20 20:13:48 +08:00
Philipp Zabel
bbf5af445f FROMLIST: ASoC: hdmi-codec: Use HDMI notifications to add jack support
Use HDMI connection / disconnection notifications to update an ALSA
jack object. Also make a copy of the ELD block after every change.

Conflicts:
	sound/soc/codecs/Kconfig
	sound/soc/codecs/hdmi-codec.c

(am from https://patchwork.kernel.org/patch/8887251/)
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: I5f4a931c3b91c2b230ce5a61b60f191628d93105
2016-12-20 20:04:25 +08:00