Commit Graph

226 Commits

Author SHA1 Message Date
XiaoDong Huang
209bb1d4ac soc: rockchip: support px30 pm config
Change-Id: Ia1f48c904cf9711f1c6601e50eccd4d2026cffe6
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-03-12 16:26:08 +08:00
Tao Huang
e3ffa5e5db soc: rockchip: add CPU_XXX config
For build kernel only support the given CPU.

Change-Id: I3d4790779d0ad0ecff6661ffb0b70e2df287fd5a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 20:10:52 +08:00
Finley Xiao
b4c3912dce soc: rockchip: pvtm: Stop calculating cycles first if last status is enabled
Change-Id: I7a2188c9f94d776f5421aa25ac2e6e5f0f3042c8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 20:19:25 +08:00
Finley Xiao
c046b46454 soc: rockchip: pvtm: Fix frequency calculate done stutus
Change-Id: I16b0a1bbed3e765093e8cb65bb5524d3b9fa31ec
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 20:05:18 +08:00
Shawn Lin
ef6433360d soc: rockchip: grf: disable jtag switching for PX30 Soc
PX30_GRF_SOC_CON5 is intended for postponing the auto switch
of pinmux from SDMMC to JTAG after removing the SD cards.
However, the default value is too small to meet the actual
requirement. Increase this value to 5 seconds currently.

Change-Id: I18fafe07822b81d9cd448ab71c1f0e49a75db357
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-26 11:55:20 +08:00
David Wu
15840a4670 Revert "soc: rockchip: rockchip_pm_config: set the real pin number to ATF"
This reverts commit ef06da2890.

Change-Id: Ide586a9f1aa079b9d29568ed0c88235f58ccfe9a
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-25 19:34:52 +08:00
Liang Chen
8dab90fc1b soc: rockchip: opp_select: make scale sel do not depend on leakage
When get leakage failed, we assume the leakage is zero.

Change-Id: I7731eaaa6dc31620d0210c1c9138631b8890be8d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-25 14:51:21 +08:00
Finley Xiao
1410747656 soc: rockchip: power-domain: Fix restore error qos value
Change-Id: I74692018652ed2aa45b666f1598662146beec92e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-24 18:07:47 +08:00
Finley Xiao
5be2cb19cf soc: rockchip: power-domain: Add support to ignore on/off
Change-Id: I96c3ae8ae53b9ae95f6f896363b761798a534821
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-09 11:07:58 +08:00
Zhang Yunlong
6b1070e646 camera: rockchip: cif: support multi camera config
fix gpio_desc request fail when multi cameras defined in dts.

Change-Id: I058ea1284ef86fcea621197367e426f018853936
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-02-08 14:57:10 +08:00
Huibin Hong
21ac5604d3 soc: rockchip: fiq debugger: clear busy interrupt before ATF fiq init
If uart has busy interrupt before ATF fiq init, although IER is 0,
it would cause interrupt. Thus after enable uart fiq of gic during init,
it may cause infinite interrupt because there is no uart handler to clear
the interrupts.

Change-Id: If530d266068e25132206519e5bf41762f6a7c9bd
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-02-07 10:23:18 +08:00
Finley Xiao
83ff2ccac7 soc: rockchip: power-domain: Fix wrong value when power up pd
Change-Id: I430db30743d7bf7b6fb5c3adc21591c5d22c0974
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-07 09:16:24 +08:00
Rocky Hao
41decf17a9 soc: rockchip: pm_test: fix memleak bug
Change-Id: If484e4e8d18b860c32fbd2389c59db971b212d80
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-01-31 19:12:38 +08:00
Zhangbin Tong
e9de2f7032 soc: rockchip: grf: support jtag switching for RK3228 Soc
Change-Id: Iaf8c1acf7c118e3c0e8b46bc7caf3a61ff2abc27
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-01-30 10:28:55 +08:00
xiaoyao
45270577c0 soc: rockchip: grf: support jtag switching for RK3128 Soc
Change-Id: I324e436adad9bb519cb17646b682d42aec783b06
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2018-01-26 10:52:09 +08:00
Zhen Chen
0a3542b89b soc: rockchip: rockchip_opp_select: export some functions
Needed by Midgard device driver.

Change-Id: Iea12eb2691846b4282393a8b76d5b522a5e248dd
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-22 19:09:51 +08:00
Zhen Chen
be966d15df soc: rockchip: pvtm: Export rockchip_get_pvtm_value
Change-Id: Icfda32f2d14d293024eec863007fdeffe7fa5cb1
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-22 18:50:52 +08:00
Finley Xiao
49e6525982 soc: rockchip: pvtm: Add support for PX30 SoCs
This adds the necessary data for handling pvtm on the px30.

Change-Id: Ida01e8363f8349c379e10d6a4637eb893591789d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-22 15:21:56 +08:00
Finley Xiao
6d64d2dc10 soc: rockchip: power-domain: Modify power domain driver for rk3228
This driver is modified to support RK3228 SoC.
RK3228 SoC is only support idle.

Change-Id: I1c3e942de13fd241e3893818e2584c25bad69b27
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-19 14:44:34 +08:00
XiaoDong Huang
24c39fdbf9 soc: rockchip: virtual poweroff: not pass pwrkey code to ATF
If it supports "remotectl parse" after system resume,
the remotectl driver would pass pwrkey code to atf.
So we don't need do it again.

Change-Id: Ia73a4fe314e476d551113b111df4bc42b7867ee0
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-01-17 16:19:52 +08:00
XiaoDong Huang
075df03bcd soc: rockchip: support rk3328 pm config
Change-Id: If19dba160fbfdce147e1c851c5cc424d08e0c4fd
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-01-15 16:46:32 +08:00
Zhou weixin
05ba6262c6 Rockchip: vip: add gc0312 driver
Change-Id: I2cc81469f48b35833832ff102b45221ea340f5a9
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2018-01-12 19:31:29 +08:00
Finley Xiao
32c581e78e soc: rockchip: power-domain: export qos save and restore
Change-Id: I89af4462f561fa06ace7761e20cf522b5954aaed
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-08 09:35:18 +08:00
Jianqun Xu
1d4da5168e soc/rockchip: rk_fiq_debugger register as platform device
Register rockchip fiq debugger as platform device, also do some
codingstyle for the driver.

Change-Id: I78e6c3365275e3d45e37eee86378c350a18f259d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-01-05 09:21:23 +08:00
Liang Chen
17efab953d soc: rockchip: add functions to select opp level form device-tree
Some chips need adjust opp level by different chip-process, add
common functions to select opp level from device-tree, so modules
can select opp level easy.

Change-Id: Ifbd5f720e6a52a68f13697bbb37ac01ff4a87e3e
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-01-02 10:21:39 +08:00
Liang Chen
8015fd9804 soc: rockchip: pvtm: add support for RK3288 SoCs
Change-Id: Ie2ced08cbaf8ed992cbe6e01a615f9fe2a1637e4
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-12-29 09:22:02 +08:00
Huibin Hong
c8d875c9c6 rk_fiq_debugger: disable RLSI interrupt
RDI interrupt is enough, disable RLSI, which can also
reduce the risk of continuous interrupt.

Change-Id: I1946813034cb895e550c5f5ab2aa9647256dda9c
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-12-20 14:10:25 +08:00
Finley Xiao
feb173722d soc: rockchip: power-domain: Modify power domain driver for px30
This driver is modified to support PX30 SoC.

Change-Id: I0226327d6d63302627a823bf73a5f8239b70adaf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-12-13 18:03:22 +08:00
Peng Zhou
711af44ea8 camera: rockchip: cif: rm redundant cif driver
Only register cif platform_driver on rk30_camera_oneframe.c
Remove redundant code.

Change-Id: I70b8b65da6e5869ba1f94917442c40fcf5fa805f
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-12-11 15:30:02 +08:00
Caesar Wang
1f232f6bb2 soc/rockchip: support the power domains for rk3036 SoCs
The rk3036 SoCs have some domains with NOC idle function, but it can't
turn the power domain off. This patch supports it to handle some devices
for needing.

Change-Id: I515f2cea07f1af1777bb877a5f396fd21caba3ad
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-29 11:45:39 +08:00
Shawn Lin
34fec92792 UPSTREAM: soc: rockchip: disable jtag switching for RK3328 Soc
Disable IO function switching between sdmmc and jtag
for RK3328 Soc.

Change-Id: Ic8f4494b11e1091fa7a4d71674940d3c8fd5b1ad
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 887758c325)
2017-11-28 17:31:40 +08:00
Heiko Stuebner
81ec76caaf UPSTREAM: soc: rockchip: add driver handling grf setup
The General Register Files are an area of registers containing a lot
of single-bit settings for numerous components as well full components
like usbphy control. Therefore all used components are accessed
via the syscon provided by the grf nodes or from the sub-devices
created through the simple-mfd created from the grf node.

Some settings are not used by anything but will need to be set up
according to expectations on the kernel side.

Best example is the force_jtag setting, which defaults to on and
results in the soc switching the pin-outputs between jtag and sdmmc
automatically depending on the card-detect status. This conflicts
heavily with how the dw_mmc driver expects to do its work and also
with the clock-controller, which has most likely deactivated the
jtag clock due to it being unused.

So far the handling of this setting was living in the mach-rockchip
code for the arm32-based rk3288 but that of course doesn't work
for arm64 socs and would also look ugly for further arm32 socs.

Also always disabling this setting is quite specific to linux and
its subsystems, other operating systems might prefer other settings,
so that the bootloader cannot really set a sane default for all.

So introduce a top-level driver for the grf that handles these
settings that need to be a certain way but nobody cares about.

Other needed settings might surface in the future and can then
be added here, but only as a last option. Ideally general GRF
settings should be handled in the driver needing them.

Conflicts:
	drivers/soc/rockchip/Kconfig
	drivers/soc/rockchip/Makefile

Change-Id: I6c7202f8e6c51898f25ffd0775c7c2d2f456d80e
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 4c58063d42)
2017-11-28 17:31:35 +08:00
Tao Huang
4eef96a320 rk_fiq_debugger: use kthread_run
Use kthread_run instead of kthread_create when create kconsole thread.
We should call wake_up_process after kthread_create, otherwise kconsole
will keep in TASK_UNINTERRUPTIBLE state when loglevel=0. Then kconsole
will become hung task, and will trigger hung task timeout.

Change-Id: I440f6bed4ace755d51d6a91600735aaa7ee5925d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-20 16:42:44 +08:00
Tao Huang
08c0b9e1e1 soc: rockchip: cpuinfo: init rockchip_soc_id for rk3288/rk312x
Change-Id: Ida9342d2c64e586e41aceaec991887115b3db80c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-15 18:45:00 +08:00
Elaine Zhang
c0ff4d90ed soc: rockchip: power-domain: add power domain support for rk3128
This driver is modified to support RK3128 SoC.

Change-Id: Ica063ae432fe5bdc1d4eb10d0749fcf039f43d35
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-11-02 15:50:44 +08:00
Peng Zhou
5a709389a8 rockchip: vip: power manager with power-domains
Remove cru, update new api for clk control.

Change-Id: I3dd1294b723b2d146bb80ec6cd58dbc87c2e090a
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-11-01 17:23:42 +08:00
Peng Zhou
016f7ec166 Rockchip: vip: support cif controller
Transplant from kernel v3.10.

Change-Id: I8b1f8d664ebcaad435132f260250204255793b66
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-10-31 09:49:17 +08:00
shengfei Xu
ef06da2890 soc: rockchip: rockchip_pm_config: set the real pin number to ATF
If the gpio base is started from 1000, The real pin
number is "gpio number - 1000".

Change-Id: If9b627ce9689105d0cdb7314869d598b4132f486
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-09-30 15:47:07 +08:00
Tao Huang
6a1a092749 soc: rockchip: add android version support
Add config ANDROID_VERSION, default is Android 7.1.
And add ANDROID_VERSION macro.

Change-Id: I6309ea9118c1d847224f329f6c2d6ab7e073ee5a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-04 16:29:48 +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
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
zzc
9b18f3c7d7 net: rfkill-wlan: fix read wifi mac address failed
Change-Id: I4eea5e32a063bca45671c8a70d48b26bb2e7bd44
Signed-off-by: zzc <zzc@rock-chips.com>
2017-08-03 14:45:58 +08:00
Finley Xiao
db501ad8fa soc: rockchip: power-domain: vpu and rkvdec ignore idle request for rk3366
As vpu and rkvdec use the common idle request, if vpu enable idle request
and rkvdec is working, the rkvdec will be crash, so let them both don't
do idle request.

Change-Id: I1fe2bc99c81d3b2018e86896548514e5e8093a4a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-07-24 09:38:10 +08:00
Zhaoyifeng
5d40559119 soc: rockchip: vendor storage support realloc
To rewrite the same id with the data size large than first alloc size,
it`s will write fail. This commit will support realloc new memory
for rewrite.

Change-Id: Icd53afd072328dc45f1faae033471c5069664f05
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2017-07-12 14:28:43 +08:00
Huibin Hong
da9b140b66 rk_fiq_debugger: reset and init uart, if uart is abnormal
Change-Id: Idaa5d3d9ecd03325f3412a5b9e9b95eae20b0a22
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-07-06 21:28:11 +08:00
Finley Xiao
7e1f848e15 soc: rockchip: introduce system status notifier
This makes dmc driver possible to register a system status notifier and
other drivers possible to call the notifier call-back easily, so that
the dmc driver can change frequency according to different system status.

Change-Id: I1a4fb4649366d75310d2e29f87775bb2d9ca3d67
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-06-26 17:56:39 +08:00
Liang Chen
06b2370417 soc: rockchip: cpuinfo: read cpu version from eFuse
Change-Id: Ia18ff4e745f09fa04690bb7bc6d95169c389b9d2
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-06-02 16:40:04 +08:00
wlq
31ced208e2 drivers: vendor_storage: add retry when emmc initialize failed
Change-Id: I28202c5e3a4eb9ab58a430f40ff5e969fd110f54
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-05-25 10:00:26 +08:00
XiaoDong Huang
916efae9c4 soc: rockchip: support rk322x pm config
Change-Id: I29c5685f09a846b62196ab8614ebe168bfed75ef
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2017-05-24 09:35:51 +08:00
Zhangbin Tong
f19114808f soc: rockchip: add devinfo parser driver
Change-Id: I8e16d5ee8a1456de43e46e68bee60e7fb2a7b266
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-05-12 19:30:26 +08:00