Commit Graph

610567 Commits

Author SHA1 Message Date
Eddie Cai
244bf7dea0 UPSTREAM: clk: rockchip: add ids for rk3399 testclks used for camera handling
clk_testout1 and clk_testout2 are used for camera handling, so add their ids.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 25fb42b1cf)

Change-Id: I8000e84264b032835cc3d11a6810264967f4248e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:46:43 +08:00
Eddie Cai
109d953e7c UPSTREAM: clk: rockchip: add ids for camera on rk3399
we use SCLK_TESTCLKOUT1 and SCLK_TESTCLKOUT2 for camera, so add those ids.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit f22e4359cd)

Change-Id: Ibbdb8e9dabd8c955ef3745c0f49c20f4c763e870
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:46:35 +08:00
Chris Zhong
7738401fb0 UPSTREAM: clk: rockchip: fix rk3399 aclk_vio gate bit
Fix incorrect rk3399 aclk_vio gating bit, it should be 0, not 10.

Fixes: 115510053e ("clk: rockchip: add clock controller for the RK3399")
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit a3f457d963)

Change-Id: I6e962f61a7f918e7945ac93dca6a039e90a0df3c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:46:09 +08:00
Yakir Yang
5e64ddee62 UPSTREAM: clk: rockchip: use the dclk_vop_frac clock ids on rk3399
Export the dclk_vop_frac out, so we can set the dclk_vop as the
child of dclk_vop_frac, and then we can start to take use of
the fractional dividers.

Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 7b0f9e357a)

Change-Id: I08686f8ecbcfb5de7bc99aadd314f6e35ac22995
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:59 +08:00
Yakir Yang
c39ba9451b UPSTREAM: clk: rockchip: add dclk_vop_frac ids for rk3399 vop
Export the dclk_vop_frac out, so we can set the dclk_vop as the
child of dclk_vop_frac, and then we can start to take use of
the fractional dividers.

Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit e33075db73)

Change-Id: I3d47c6aecc338de45b48414f0d0327c17e6d2b15
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:59 +08:00
Douglas Anderson
8bef41f00c UPSTREAM: clk: rockchip: drop CLK_SET_RATE_PARENT from rk3399 fractional dividers
Currently the fractional divider clock time can't handle the
CLK_SET_RATE_PARENT flag. This is because, unlike normal dividers,
there is no clk_divider_bestdiv() function to try speeding up the parent
to see if it helps things.

Eventually someone could try to figure out how to make fractional
dividers able to use CLK_SET_RATE_PARENT, but until they do let's not
confuse the common clock framework (and anyone using it) by setting the
flag.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 29edeccb44)

Change-Id: Ic7fa067ed80767c937dd9c8506d2d1e86ee1c93a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:59 +08:00
Xing Zheng
49d2f9f2a7 UPSTREAM: clk: rockchip: add 533.25MHz to rk3399 clock rates table
We need to get the accurate 533.25MHz for the DP display.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 5c1c63f634)

Change-Id: Ib945c80451d52081683488fe410c5200622fb1c3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:59 +08:00
Xing Zheng
25c7cb783d UPSTREAM: clk: rockchip: optimize 800MHz and 1GHz pll rates on RK3399
Usually, the 800MHz and 1GHz are supplied for CPLL and NPLL in the RK3399.
But dues to the carelessly copying from RK3036 when the RK3399 bringing up,
the refdiv == 6, it will increase the lock time, and it is not an optimal
configuration.

Let's fix them for the lock time and jitter are lower:
800 MHz:
- FVCO == 2.4 GHz, revdiv == 1.
1 GHz:
- FVCO == 3 GHz, revdiv == 1.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 1dfbec3905)

Change-Id: I725e8cb542afa7caf7cbb5ff6f747f65d48c5ced
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:59 +08:00
Xing Zheng
913ae6b724 UPSTREAM: clk: rockchip: fix the incorrect pclk_edp div width for RK3399
The range of the  pclk_edp_div_con is [13:8] and 6 bits, not 5.

Reported-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Tested-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 3e1531dbc3)

Change-Id: Ieffcad3f6d44c71d83b7ed00dd30a4bd45995bb2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:59 +08:00
Douglas Anderson
dee1e02869 UPSTREAM: clk: rockchip: Set "ignore unused" for PMU M0 clocks on rk3399
The PMU Cortex M0 on rk3399 is intended to be used for things like
DDRFreq transitions, suspend/resume, and other things that are the
purview of ARM Trusted Firmware and not the kernel.  As such, the
kernel shouldn't be messing with the clocks.  Add CLK_IGNORE_UNUSED to
these clocks.

Without this change, the following was observed on a Chromebook with a
rk3399 (using not-yet-upstream ARM Trusted Firmware code and
not-yet-upstream kernel code based on kernel-4.4):

1. We init the clock framework.

2. We start up "DDRFreq", which causes ATF to occasionally fire up the
   M0 for transitions.  Each time ATF fires up the M0 it will turn on
   these clocks and each time it is done it will turn them off.

3. We finally get to the the part of the kernel that calls
   clk_disable_unused() and we disables the clocks.

You can see the race above.  Basically everything is fine as long as
ARM Trusted Firmware isn't starting up the M0 at exactly the same time
that the kernel is disabling unused clocks.  ...but if the race
happens then we go boom.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 60aadea57e)

Change-Id: I2a78c74edc9bc5d5b4f26224ebdb34eb83afb022
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:24 +08:00
Derek Basehore
77a209b4ae UPSTREAM: clk: rockchip: Add 1.6GHz PLL rate for rk3399
We need this rate to generate 100, 200, and 228.57MHz from the same
PLL. 228.57MHz is useful for a pixel clock when the VPLL is used for
an external display.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 4ee3fd4abe)

Change-Id: I118c877882d694b358697470225d8d94cb1271b5
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:24 +08:00
Alberto Panizzo
e73ac0e248 UPSTREAM: clk: rockchip: fix clk_i2sout parent selection bits on rk3399
Register, shift and mask were wrong according to datasheet.

Fixes: 115510053e ("clk: rockchip: add clock controller for the RK3399")
Cc: stable@vger.kernel.org
Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit a64ad00898)

Change-Id: I5d26dd7073cc14125a37cd02bdf964548248c60b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-07-25 14:43:24 +08:00
Xing Zheng
3bbf75c4ed ASoC: rk3308_codec: increase de-pop loop delay
There is a bit of headphone pop during power on, we
need to increase delay time (200us per loop step).

It looks fine that it may take 200us*128=25.6ms here.

Change-Id: Idbc5b235fd55c26cd71f4693cce98fccce60368f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-25 11:55:19 +08:00
Hu Kejun
9cbb7a269a media: rk-isp10: update to v0.1.e
Change-Id: I84abcfb5f49c0acd0c16616321d49d01ad1c89aa
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-24 15:26:40 +08:00
Hu Kejun
18f87aa6b8 media: rk-isp10: add module parameter for dumpsys
Change-Id: I7ab56cbdcc5a0ce1441c972a1daa044593e6eb9f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-24 15:25:20 +08:00
Hu Kejun
51bbf5c3aa camera: rockchip: Add VTS when setting exposure
Change-Id: Ia06631238bd99d8736ccfed9cb98e3f8fcb319d8
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-24 15:24:18 +08:00
Hu Kejun
49050da367 camera: rockchip: modify for af function
Change-Id: I0d4b0d2059c8cbf173dd337b0e6e92b3be44a8b0
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-24 15:22:27 +08:00
Alex Zhao
307cd59745 net: wireless: rockchip_wlan: fix bcmdhd driver crash when doing recovery test
kernel log:
<6>[50762.063251] Task dump for CPU 3:
<6>[50762.063256] dhd_eventd      R running      0   966      2 0x00000002
<4>[50762.063284] [<c0a5015c>] (__schedule) from [<c110394c>] (__stack_chk_guard+0x0/0x4)

Change-Id: I552df4a8cd9ee2da2a93d2d38a9f85b458ac866a
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2018-07-24 14:24:03 +08:00
Finley Xiao
106471a6e4 soc: rockchip: pm_test: Add support for dvfs_table_scan
Change-Id: Ie03ed876661286d19b57029f32fe5365c0b60415
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-23 15:26:47 +08:00
Zhang Yunlong
9d76b2eb09 camera: rockchip: camsys_drv: v0.0x30.0
rk3326 and other platform power management implementation

Change-Id: I34b9c773cfee1e684e833cdbcf687ac54cd8d88a
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-07-23 15:14:14 +08:00
Lin Jianhua
a1065a4d6c arm: dts: rockchip: add dot v10 dts for rk3308
Change-Id: I0acc3c964183db0bdcbeacd3abf9c7885f0b9584
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-07-23 14:53:32 +08:00
Cai YiWei
b4539c7dad ARM64: dts: rockchip: add a new cif node for px30
Change-Id: Ibfe9412ebaaede23168c1afe0104fad32a9d7882
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-07-23 14:44:26 +08:00
Cai YiWei
3d08292719 dt-bindings: Document add px30 to Rockchip CIF bindings
Change-Id: I63c267a738d5fc23d989c686045d76db09f95ef6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-07-23 14:44:11 +08:00
Dingqiang Lin
f091fa7c6f rockchip: rkflash: adjust vendor part design for rkflash
1.Using internal vendor strategy for slc nand and spi nand storage;
2.Using outernal vendor strategy for spi nor;
3.Rejust rkflash_debug design.
4.Remove gcc -g

Change-Id: Ib5eca61a7a600f99d438448e4b7f03dd3dddb5f2
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-23 14:43:13 +08:00
Cai YiWei
c5e0b1b35a media: i2c: add gc2155 driver
Change-Id: I8c7ab7abf9ca2b3d33b3bdae3593f727d61955dc
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-07-23 14:42:10 +08:00
Wyon Bi
e800c52921 drm/rockchip: vop: Fix grf_dclk_inv register field definitions
Fixes: c2b587fa35 ("drm/rockchip: vop: config dclk invert from grf register")
Change-Id: I113f9d4c8c58389307d1e03eee2ccbba5c95b2c1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-07-23 14:41:55 +08:00
Zhen Chen
94f98e877c Mali: midgard: add an error handling pass in kbase_mmu_interrupt()
For RK redmine Defect #168230.

Change-Id: I3cd6544dd23b833138e4cc700a8f2cdd627ff592
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-07-23 11:19:08 +08:00
Cliff Chen
7dc1699c5d f2fs: modify f_blocks for statfs
The f_blocks of statfs include file system overhead,it is not normal
usage of Posix.

Change-Id: If481626b08c05290626938586e2dc721690f1a91
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
2018-07-23 11:03:47 +08:00
shengfei Xu
c0ce1fa016 power: rk817-battery: optimize charging curve
Change-Id: I3a11593324be523649f6c5b12872336fb24a5283
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-07-20 17:11:21 +08:00
Yifeng Zhao
80cc682ae7 drivers: rk_nand: zftl: fix hynix F16 64Gb NAND multi plane prog error issue
3326: fix hynix F16 64Gb NAND multi plane prog error issue
bug:
[   15.257968] hynix RR 12 row=2000, count 12, status=-1
[   15.257985] flash_complete_page_read 0 2000 error_ecc -1 1
[   15.258000] blk= 20, page=0, ppa = 2000, status = ffffffff

Change-Id: I7e6b6d4dd966bd671b0dcd46f3ee9b6f6e8c8bff
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-07-20 17:09:16 +08:00
William Wu
34ef2afe59 arm64: dts: rockchip: add usic node for rk3399
Add usic node for rk3399 USB 2.0 EHCI controller
with usic phy.

Change-Id: Ibb4179ff1479816daa3b8455b0229f8a7a05bbdf
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:37:43 +08:00
William Wu
e5708aad7f USB: ehci-platform: support EHCIs with usic phy
Some EHCI controllers use usic phy (e.g rk3399/rk3288),
in order to enable these controllers, we need to set
some additional EHCI vendor-specific registers.

Support this feature in device tree when using the ehci
platform driver by adding a new property for it.

Change-Id: I279ccfdb5866df49828825bfd41b39fcd58a2832
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:37:43 +08:00
William Wu
8c47ad3c7b usb: dwc3: rockchip: Don't reset otg logic if device connect
During dwc3 resume, it shoudn't reset otg controller logic
if device is connecting with the otg port, because it will
cause device to be reenumerated. More seriously, it may
cause the otg_work to enter disconnect process and power
down usb3 controller power domain, at the same time, if
the xHCI driver is accessing the controller asynchronously,
it will cause system hang.

Change-Id: Id546277bd4082b7baeff830788643a800330ae8e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:28:43 +08:00
William Wu
04da766284 usb: dwc3: Don't reset core in host mode
When do core init, only reset the core for device mode.
Becasue in host mode, xHCI driver will reset the core
and its host block via usbcmd.hcrst. If we do core reset
in dwc3_core_init() for host mode, it will reset both
the dwc3 core registers and xHCI registers, and cause
device to be reenumerated when usb suspend/resume.

Change-Id: If723ce8a771975e9757d28cb2c114d6269581677
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:28:43 +08:00
Xing Zheng
46dcb4d5f8 arm64: dts: rockchip: enable Bluetooth PCM sound for RK3308 EVB Boards
By default, only using lrck_tx for PCM by hardware,
therefore, we need to use I2S_CKR_TRCM_TXONLY.

Change-Id: I6c4077e7e7e65b8a3a21416fd61d5900b3b72f42
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Xing Zheng
3e056d403d arm64: dts: rockchip: add bluetooth pcm node for RK3308 EVB V10/V11
This patch using PCM rising late1 and slave mode for
Bluetooth HFP.

Change-Id: I4a0188134d7d0ef0690c6c7c9f94fc8ec50c1671
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Xing Zheng
1dc24c8e2c ASoC: rockchip: i2s: add 'rockchip,clk-trcm' property
Change-Id: I0756185c677b5cb9512ff25b69ceba5b248ec031
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Xing Zheng
b73b288508 ASoC: rockchip: i2s: add support 'rockchip,clk-trcm' property
If there is only one lrck (tx or rx) by hardware, we need to
use 'rockchip,clk-trcm' specify which lrck can be used.

Change-Id: I3bf8d87a6bc8c45e183040012d87d8be21a4c133
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Hu Kejun
bb7bcb0a02 media: rk-isp10: modify for af function
add af funtion first time

Change-Id: I91fc8c532e47987cc63694b242f5bac7ef1bc59c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
347d89b653 media: rk-isp10: remove "Measurement late" check
Change-Id: I6cbabc0faff7003c591142570270475e7afd8dde
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
71f641cab4 media: rk-isp10: modify for dumpsys tool
Change-Id: I53df81d70fb730634c7600e2a7a18f93b62191df
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
6976e95c0a media: rk-isp10: fix write fmt is not correct when setting mi_ctrl
Change-Id: I55b4c3ced65d690a2f27755e09c3933dfc265ee7
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
bd5d042b1a media: rk-isp10: fix owned_by_drv_count is not 0 when stop stream
Change-Id: Iec72be86e515c2f29dfb12a6004db443769edd9f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Shunqian Zheng
41c170c42f scripts: make gcc-wrapper.py compatible with python 2.7 and 3
Python 3 requires parentheses in call to 'print', meanwhile
the 'line' could be bytes-like, let's decoding to str as utf-8.

This makes the gcc-wrapper.py compatible with both 2.7 and 3.

For example, a bytes-like string as below,
 b'kernel/reboot.c:47:13: error: function declaration isn\xe2\x80\x99t a
 prototype [-Werror=strict-prototypes]\n'
 b' static void no_use()\n'
 b'             ^~~~~~\n'

After decoding, it looks like,
 kernel/reboot.c:47:13: error: function declaration isn’t a prototype
 [-Werror=strict-prototypes]
  static void no_use()
              ^~~~~~

Change-Id: Icacdbe2ca7b7ab674ab90e54b79d3176e0061ac6
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-19 11:58:45 +08:00
Finley Xiao
0658b84702 soc: rockchip: pvtm: Add support to show temperature
Change-Id: Ibdf09a5a043e7f1a6d203513a6f22172e9e24c09
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-19 09:14:52 +08:00
Tao Huang
d20c557078 Input: rmi4 - remove unused synaptics s3202 driver
Change-Id: If377d7af56ad443a905947a585ff826b6c1625b2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-18 19:23:06 +08:00
Dingqiang Lin
a9558e9bdf rockchip: rkflash: fix compile error if !NAND
Change-Id: I890ff638ff3b6fe3e9fb8fc43f4fa4522bd75c11
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-18 19:02:23 +08:00
Cliff Chen
2093a9abe6 f2fs: add a new limit for reserve root
The reserved root blocks is not enough for booting Android due to
the limit of 0.2% if the fs size too small. so we add a new mini-
mum limit is 128MB.

Change-Id: I5af3b182001d27e4d18b4090c5270bbb2ac6253b
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
2018-07-18 11:12:22 +08:00
Zhou weixin
6b600c5baa input: sensors: accel: lsm303d: add data convert
Change-Id: Ied735816cb86cf73ebef76522f0882dbb19a9eb3
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-07-18 10:16:35 +08:00
Xing Zheng
7ea4433197 ASoC: rk3308_codec: fix incorrect idx with loopback_grp
Here should use the mapped grp as a reference, not idx.

Change-Id: Ia40dafc11f4f5f077f764f49985bb8d3ec800c28
Reported-by: Lin Jianhua <linjh@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-17 21:08:14 +08:00