Commit Graph

607120 Commits

Author SHA1 Message Date
shengfei Xu
87dbd10b5f power: rk817: fix the OTG mode judgement
Change-Id: I23ecea8b26aa2aff0101bb5237fe89ad2b00fb9c
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-24 10:33:13 +08:00
shengfei Xu
55f42a9aed arm64: dts: rockchip: the boost and otg may be disabed for rk3326 board
Change-Id: I3a320614d13fe87156e8f85815a5eb89157a3c1f
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-24 10:32:58 +08:00
Xinhuang Li
1097ca8f2c ARM: dts: rockchip: rk3229-evb-android: enable iep&iep_mmu
Change-Id: Id1f4bd5726a5d15e977a11b83c1849cef80de47b
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2018-02-24 10:09:45 +08:00
Zheng Yang
7b2618e5e6 phy: rockchip: inno-hdmi: manual power down RK3328 post-PLL with no uboot logo
For 3328, inno hdmi phy post pll is enabled by default, it's need to
manual power down post pll if uboot logo is not shown.

Change-Id: Ia175ff0aad006be950b8bc13e1cf2ecb4f00e04c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-02-24 10:05:09 +08:00
Jung Zhao
87d7e43c42 video: rockchip: vpu: fix shutdown crash bug
now shutdown function just wait for vpu finishing his work,
and do nothing else.

Change-Id: I54f227768314edd85154705d07054bd493e350aa
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-02-24 10:03:46 +08:00
Finley Xiao
76c2aced00 arm64: dts: rockchip: rk3328: Avoid showing blurred screen
If show logo in uboot, can't change vop clocks.

Change-Id: Ia149b452e16dedcafaa15bfa5d5dc989b06737ff
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-24 09:21:06 +08:00
Tao Huang
fa89f964b5 power: rk817: add pr_fmt() macro
Make the printks look a bit nicer by adding a prefix.

Change-Id: Id268a55a1681c6805e7c3f5929350891e92df816
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-23 16:52:13 +08:00
Binyuan Lan
cbac12bed5 arm64: dts: rockchip: add headset detect for px30
Change-Id: I640389607f7ef7be4e966b78afefcb9052b83214
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-23 14:40:22 +08:00
Binyuan Lan
31328fc2b3 arm64: dts: rockchip: add rk809 codec for px30
Change-Id: Icdc8f3694fc2dc962b779173d1e25d6a0bf5a57e
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-23 14:39:43 +08:00
Binyuan Lan
be138b5dc6 arm64: dts: rockchip: set hp/spk volume for 3326
Change-Id: If466d0cacc5c9247c1858775508a410943d78ce2
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-23 14:38:57 +08:00
Binyuan Lan
ad85bca9e8 ASoC: rockchip: rk817-codec: add some functions
distinguish MIC input differential or single-ended
disable DAC_D_HPF
add pdm support

Change-Id: Id2befb3f817c9eaf273e1120036cf013db463639
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-23 14:37:59 +08:00
Weiguo Hu
7e99010694 net: phy: rockchip: do phy reset once in no link status
This solve failed to linkup for very few chip
This can reduce udp package lost rate sometimes

Change-Id: I684d9ea974e56478e7906c6e79c4c8505c042823
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2018-02-23 14:37:38 +08:00
Tao Huang
921df26c80 f2fs: fix out-of-bounds read in update_free_nid_bitmap
test_bit will access with unsigned long, which cause this bug.
Workaround by enlarge free_nid_bitmap.

BUG: KASAN: slab-out-of-bounds in update_free_nid_bitmap+0x98/0x16c
Read of size 8 at addr ffffffc06275c9ff by task init/195

CPU: 3 PID: 195 Comm: init Not tainted 4.4.114 #55
Hardware name: Rockchip rk3326 evb board (DT)
Call trace:
 dump_backtrace+0x0/0x244
 show_stack+0x14/0x1c
 dump_stack+0xa4/0xcc
 print_address_description+0xa4/0x308
 kasan_report+0x258/0x29c
 __asan_load8+0x78/0x80
 update_free_nid_bitmap+0x98/0x16c
 build_node_manager+0x884/0x950
 f2fs_fill_super+0x14bc/0x1ca8
 mount_bdev+0x174/0x208
 f2fs_mount+0x14/0x1c
 mount_fs+0xbc/0x1b0
 vfs_kern_mount+0xbc/0x1c8
 do_mount+0xcf0/0xe68
 SyS_mount+0x94/0xe0
 el0_svc_naked+0x24/0x28

Change-Id: I9167447ded0a8c2da1b80cdc671615c9108c02be
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-23 11:47:45 +08:00
Shawn Lin
bc6e99f243 mmc: dw_mmc: Fix the CTO timeout overflow calculation for 32-bit systems
Just follow the convention of fixing for DTO timeout.

Change-Id: I753b5a6f2ab409e58c83a59212592f3b430b018a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-23 11:26:18 +08:00
Evgeniy Didin
9c8f6bbf41 FROMLIST: mmc: dw_mmc: Fix the DTO timeout overflow calculation for 32-bit systems
In commit 9d9491a7da ("mmc: dw_mmc: Fix the DTO timeout calculation")
have been made
changes which cause multiply overflow for 32-bit systems.
The broken timeout calculations caused false interrupt latency warnings
and stacktrace splat (such as below) when accessing the SD Card.

| Running :  4M-check-reassembly-tcp-cmykw2-rotatew2.out -v0 -w1
| -  Info: Finished target initialization.
| mmcblk0: error -110 transferring data, sector 320544, nr 2048, cmd
response
|  0x900, card status 0x0
| mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz,
actual
| 396825HZ div = 63)
| mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 25000000Hz,
actual
|  25000000HZ div = 1)
| ------------[ cut here ]------------
| softirq: huh, entered softirq 6 TASKLET 6f6a9412 with preempt_count
00000101,
| exited with 00000100?
| WARNING: CPU: 2 PID: 0 at ../lib/scatterlist.c:652
sg_miter_next+0x28/0x20c
| Modules linked in:
| CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.15.0 #57
|
| Stack Trace:
|  arc_unwind_core.constprop.1+0xd0/0xf4
|  dump_stack+0x68/0x80
|  warn_slowpath_null+0x4e/0xec
|  sg_miter_next+0x28/0x20c
|  dw_mci_read_data_pio+0x44/0x190
|  dw_mmc f000a000.mmc: Unexpected interrupt latency
|   dw_mci_interrupt+0x3ee/0x530
|  __handle_irq_event_percpu+0x56/0x150
|  handle_irq_event+0x34/0x78
|  handle_level_irq+0x8e/0x120
|  generic_handle_irq+0x1c/0x2c
|  idu_cascade_isr+0x30/0x6c
|  __handle_domain_irq+0x72/0xc8
|  ret_from_exception+0x0/0x8
|---[ end trace 2a58c9af6c25fe51 ]---

Lets cast this multiply to u64 type which prevents overflow.

Tested-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Fixes: 9d9491a7da ("mmc: dw_mmc: Fix the DTO timeout calculation")
Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com> # ARC STAR
9001306872 HSDK, sdio: board crashes when copying big files
Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
CC: Alexey Brodkin <abrodkin@synopsys.com>
CC: Eugeniy Paltsev <paltsev@synopsys.com>
CC: Douglas Anderson <dianders@chromium.org>
CC: Ulf Hansson <ulf.hansson@linaro.org>
CC: linux-kernel@vger.kernel.org
CC: linux-snps-arc@lists.infradead.org
Cc: <stable@vger.kernel.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib7614b17116e53debe738787fc26a04beba5f388
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-23 11:25:08 +08:00
XiaoDong Huang
f64e967ae6 arm64: dts: rockchip: px30: adjust suspend voltage
1. adjust vdd_logic to 950000uV.
2. adjust vdd_arm to 950000uV.
3. set vdd_10 on.
4. set vcc3v0_pmu on.

Change-Id: I1af72ccbc615f6bdcb59f51ac6ea54e8c3bfe2af
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-02-22 16:28:36 +08:00
Wyon Bi
99cb28c225 arm64: dts: rockchip: allow to disable vcc3v3_lcd on px30-evb board
remove the 'regulator-always-on' property from vcc3v3_lcd

Change-Id: I056601ed575b993065c17d245195bd376808bbed
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-02-22 15:31:08 +08:00
Finley Xiao
14aba8d378 clk: rockchip: Fix cpu frequency overflowing
If change parent to alternate parent and the old parent clock speed is less
than the clock speed of the alternate parent, add dividers first and then
select alternate parent.

If change parent to primary parent, select primary parent first and then
remove dividers.

Change-Id: Ib82de9a936effe5c885639799f3bb5629dc89f8d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-22 15:30:40 +08:00
shengfei Xu
2c1c86dca0 power: rk817: fix the battery charging but dispaly soc not up
Change-Id: I3153dad46c959670f11dd91c7cbd687f4136c171
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-22 11:39:59 +08:00
Finley Xiao
73403cf5b2 clk: rockchip: px30: fix gpll enable_cnt and prepare_cnt error
The gpll clock has not yet been created when its children do enable and
prepare in cru critical talbe, so move its children into pmucru critical
talbe that the gpll clock has been created before its children do enable
and prepare.

Change-Id: If5243326bf1d3c926bb1bb12e56e4b9fc9282762
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-22 10:57:17 +08:00
Finley Xiao
fda77d7005 clk: rockchip: px30: Add clock id for aclk_bus_src and aclk_peri_src
Change-Id: I3467b4f799a6f5402eed3d20e4bd2c02ae30c92f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-22 10:55:21 +08:00
Finley Xiao
d9c3f985e4 arm64: dts: rockchip: px30: xin32k use the fixed clk
If xin32k use the rk808_clkout1, rk808 init is too late,
xin32k enable count and prepare count is not match with it's child clk.

Change-Id: Iec5d1f91b2289b18f41b4d915e6859154a5b7635
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 17:57:25 +08:00
Finley Xiao
0813f9a09a arm64: dts: rockchip: px30: Change clock id for gpu
Change-Id: I04ccacc3f60c7a1e4b0fa854680564963ec110fd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 17:34:58 +08:00
Finley Xiao
dd6270d4da clk: rockchip: px30: Fix gpu frequency overflowing
It needs to contains rate and mux clk for gpu composite clk, so that
the clk_composite_set_rate_and_parent function can be called.

Change-Id: I9818df2adbbcf40f616d2ca230cd83ea1ef2c14f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 17:34:57 +08:00
Finley Xiao
f09c78549e MALI: bifrost: support sharing regulator with other devices
If the regulator is shared between several devices then the lowest
request voltage that meets the system constraints will be used.

Change-Id: Icb6afcb571bddd6709d352dfad8fc2da80567bc0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 16:21:57 +08:00
Finley Xiao
6e0e7a80fa MALI: bifrost: Avoid GPU voltage domain keeping the initial voltage
If there is only one opp whose frequency is equal to the initial value
in opp table list, the GPU voltage domain will keep the initial voltage,
it may be too large.

Change-Id: If2ae1c876de185d810e05296b1b9e98855c3ef48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-13 16:21:48 +08:00
shengfei Xu
2fcb17dc99 regulator: rk808: rk809: the sw1 enable bit intercnvert with sw2
Change-Id: I240ac375005e0521c808c09b3f7f07e9899bda63
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-13 11:21:32 +08:00
Tao Huang
375c137b91 drivers/regulator/syr82x: fix compile warning
drivers/regulator/syr82x.c:451:3: warning: this if
clause does not guard... [-Wmisleading-indentation]

Change-Id: Ibdb1f6f903d1e0dece7b58aa3ec89d075e6d5b79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-13 10:29:31 +08:00
Tao Huang
0be7b88d66 drivers/input/touchscreen/cy8c_touchpad: fix compile warning
drivers/input/touchscreen/cy8c_touchpad.c:77:20: warning: xfer_msg[1].flags
is used uninitialized in this function [-Wuninitialized]

Change-Id: I2d1f199f098b38af92037e2ebbd63c05fc4a1f35
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-13 10:01:26 +08:00
Wen Nuan
2ae8d516c3 ARM: dts: rockchip: rk3288: Add dts mipi-dphy TXRX1 node for rk3288
Change-Id: I0b6122b2b34ae0f24f0d4a1111c1bbe6018cac4e
Signed-off-by: Wen Nuan <leo.wen@rock-chips.com>
2018-02-13 09:55:56 +08:00
Wen Nuan
ad46e68846 phy: rockchip: mipi-dphy-tx1rx1: add mipi-dphy TX1RX1 channel for RK3288
This patch adds the function of mipi-dphy TX1RX1 for RK3288, the
mipi-dphy TX1RX1 is matched when "txrx_base_addr" is valid.

Change-Id: I01640925157a7082e942188b29f6bbf1318cf3d5
Signed-off-by: Wen Nuan <leo.wen@rock-chips.com>
2018-02-13 09:39:36 +08:00
William Wu
67217a757a arm64: dts: rockchip: use spdifm2_tx for rk3328-evb-android
Change-Id: I6d13fb703deffccb87bc311733afb88c1c90bbdd
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-11 21:13:25 +08:00
Sugar Zhang
84c9e0030a arm64: configs: rockchip_defconfig: enable pdm interface
Change-Id: I3d6b75d3e08bf542e8b0da014fd4a6b263fac124
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-11 21:08:29 +08:00
Sugar Zhang
8b8065853a arm64: dts: rockchip: px30: fixup pdm pinctrl
Change-Id: I5a3978a486c63dae718b46be142eed263788e5f3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-11 21:08:17 +08:00
Tao Huang
2e98315186 arm64: rockchip_defconfig: enable CONFIG_CRYPTO_CRC32_ARM64
Change-Id: I70e8ba303d5c3b0210912a31e3175425c1f1a63f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 20:56:13 +08:00
Tao Huang
d1c247b600 sound/soc/codecs/rt5651: fix compile warning
sound/soc/codecs/rt5651.c:351:14: warning: duplicate const
declaration specifier [-Wduplicate-decl-specifier]

Change-Id: I25ac1012398c7742c7b66d6a57f4956b96ba0aa4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 20:29:43 +08:00
Tao Huang
f1da8a190e sound/soc/codecs/rk817_codec: fix compile warning
sound/soc/codecs/rk817_codec.c:405:14: warning: duplicate const
declaration specifier [-Wduplicate-decl-specifier]

Change-Id: I572b1778f29a48b0756ac60488ce2311cc372f8b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 20:20:51 +08:00
Tao Huang
75df0e02ac ARM: rockchip_defconfig: bump CONFIG_ANDROID_VERSION to 0x08000000
Change-Id: Ia66100f8d828aa0ae3a7c3c66906c51d07548b92
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:23:00 +08:00
Tao Huang
4f33232979 Revert "Revert "ARM: rockchip_defconfig: enable CONFIG_IKCONFIG""
This reverts commit cbd1d90f72.

8588d88f1a ("ANDROID: android-base.cfg: add CONFIG_IKCONFIG option")

This adds CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC options, which are a
requirement for the O release.

Change-Id: I438ade881219034618afb4cd5174bf750a79d319
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:22:54 +08:00
Tao Huang
badf2c4918 arm64: rockchip_defconfig: bump CONFIG_ANDROID_VERSION to 0x08000000
Change-Id: Iafd493187f579ec4f5d202a496548f70be7a868a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:22:26 +08:00
Tao Huang
ea18c3d20d Revert "Revert "arm64: rockchip_defconfig: enable CONFIG_IKCONFIG""
This reverts commit 95bc3a8935.

8588d88f1a ("ANDROID: android-base.cfg: add CONFIG_IKCONFIG option")

This adds CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC options, which are a
requirement for the O release.

Change-Id: Id02fde91ed902f266ff5c81ec04e2427a2877847
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:22:10 +08:00
Tao Huang
aa349fbf38 ARM: rockchip_defconfig: remove CONFIG_ANDROID_LOW_MEMORY_KILLER
e8f5f841b764 ("remove CONFIG_ANDROID_LOW_MEMORY_KILLER requirement")

Kernel configuration options should include either
CONFIG_ANDROID_LOW_MEMORY_KILLER for in-kernel lowmemorykiller driver
to be used or a combination of CONFIG_MEMCG and CONFIG_MEMCG_SWAP
if userspace lmkd is preferred. It is not currently possible to express
this logical requirement in the config fragment so the
CONFIG_ANDROID_LOW_MEMORY_KILLER requirement is simply
removed for now.

Change-Id: I9cea0552a285ac635fc44f4b45762988e423d7db
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:21:55 +08:00
Tao Huang
7adc50bef2 arm64: rockchip_defconfig: remove CONFIG_ANDROID_LOW_MEMORY_KILLER
e8f5f841b764 ("remove CONFIG_ANDROID_LOW_MEMORY_KILLER requirement")

Kernel configuration options should include either
CONFIG_ANDROID_LOW_MEMORY_KILLER for in-kernel lowmemorykiller driver
to be used or a combination of CONFIG_MEMCG and CONFIG_MEMCG_SWAP
if userspace lmkd is preferred. It is not currently possible to express
this logical requirement in the config fragment so the
CONFIG_ANDROID_LOW_MEMORY_KILLER requirement is simply
removed for now.

Change-Id: I69b9682029a50f4579f3ba11e6a9a497c5a51c28
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:21:41 +08:00
Tao Huang
1dd2b51cdf net/wireless/rockchip_wlan: fix compile warning
Change-Id: Ife9d64914e2986a07a649064ee0141d83fea69e2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-11 19:21:16 +08:00
Zorro Liu
d55db1d3ba arm64: dts: rockchip: modify gsensor layout value of px30-evb-ddr3-v10 board
Change-Id: I7ecdf9db002e3754189e345e27efbb249146539b
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-11 19:18:00 +08:00
Zorro Liu
5db5490025 drivers: input: sensors: update accel sensor mma7660 driver
Change-Id: Id3cf0cf3a14a07010524d0de58dc523bfcb3b735
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-11 19:17:53 +08:00
Caesar Wang
2a8ce270ad arm64: dts: rockchip: remove the hdmi-cec pinctrl for rk3399 excavator
As the edp_hpd pinctrl is reused by hdmi-cec. So the rk3399 will hit the
pinctrl register failed on bootup.

Says: the failed log:
[0.927577] rockchip-pinctrl pinctrl: pin gpio4-23 already requested by
ff940000.hdmi; cannot claim for ff970000.edp
[0.928519 ] rockchip-pinctrl pinctrl: pin-151 (ff970000.edp) status -22
[0.929112] rockchip-pinctrl pinctrl: could not request pin 151
(gpio4-23) from group edp-hpd  on device rockchip-pinctr

That will cause the edp can't work on rk3399 SoCs.

Fixes: commit
6e4eaff822 ("arm64: dts: rockchip: add HDMI cec support for rk3399")

Change-Id: I8ba20db55025e33c082beda5160e0398f1681766
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-11 19:17:18 +08:00
Finley Xiao
093bfc848c clk: rockchip: rk3328: Fix clk_cif_src parent
Change-Id: I0ea209224880b8c51a385ed46827bb0d8f7dd219
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 19:15:16 +08:00
Finley Xiao
0cb664eb76 clk: rockchip: px30: Remove clk_gpu_divnp5
Change-Id: I67f47f5fdd7873c22b1349e3aeb80b7157c7844c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 19:12:19 +08:00
Finley Xiao
f457f16cd2 clk: rockchip: px30: Fix clk_gmac_rmii_sel parent
Change-Id: Idf1bd416a3879048afd3763d4a6d056c34171bbb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-11 19:10:15 +08:00