Commit Graph

607135 Commits

Author SHA1 Message Date
Sandy Huang
613b6b6a10 drm/rockchip: px30 vop: update afbdc format for color transform
Change-Id: Ic551f0b7de22bd9154535a64daba2ca51fd79f37
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-02-24 16:06:27 +08:00
Tao Huang
7ae77dea79 Revert "ARM: rockchip_defconfig: remove CONFIG_ANDROID_LOW_MEMORY_KILLER"
This reverts commit aa349fbf38.

Failed to pass vintf compatibility test.

Change-Id: I002feeb65cc2d7d679c0a00a984b149eef068be1
2018-02-24 16:01:31 +08:00
Tao Huang
2057215f36 Revert "arm64: rockchip_defconfig: remove CONFIG_ANDROID_LOW_MEMORY_KILLER"
This reverts commit 7adc50bef2.

Failed to pass vintf compatibility test.

Change-Id: Ia8f3d3be1b65b194cea68dc495a2718f7b2efbfc
2018-02-24 16:01:23 +08:00
Tao Huang
4025e85574 Revert "ARM: rockchip_defconfig: remove CONFIG_PM_AUTOSLEEP"
This reverts commit e868d4ecb9.

Failed to pass vintf compatibility test.

Change-Id: Iba9ee00c8bab3d917d155aeab82e7926d44387d9
2018-02-24 16:01:08 +08:00
Tao Huang
c53c2695b1 Revert "arm64: rockchip_defconfig: remove CONFIG_PM_AUTOSLEEP"
This reverts commit 3c4e6c9040.

Failed to pass vintf compatibility test.

Change-Id: I2455a12a1174b8975cac53d0423ac3a7983f1379
2018-02-24 15:46:57 +08:00
Finley Xiao
0d5b78c345 clk: rockchip: px30: Fix dclk_vopl_src parent
Change-Id: I24304460ae29ecc203ba8bef57ada4926947a1ea
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-24 15:10:40 +08:00
Jacob Chen
eae92ae2b9 media: rockchip: rga: add userptr to use normal cache-enabled memory
It seems people still need it

Change-Id: I4aa312b46f795beeb3eff415a971d13e81f030f8
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-02-24 14:07:51 +08:00
Caesar Wang
ddc05360bd media: soc_camera/rockchip: Fix the build error
As enable the releated config, hit the below error:

drivers/media/i2c/soc_camera/rockchip/adv_camera_module.c:937:34: error:
    assignment to expression with array type
        timings->exposure_valid_frame =
...

and

drivers/media/i2c/soc_camera/rockchip/tc_camera_module.c:963:34: error:
    assignment to expression with array type
        timings->exposure_valid_frame =
....

Change-Id: I4381cc8aa00bb6a968c01d7537a8942b5715fa5c
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-24 14:06:45 +08:00
David Wu
5060d58965 arm64: dts: rockchip: Fix the RMII REF_CLK with input mode for px30-evb
Base on the evb board, the mode of RMII REF_CLK need to be setup for input.

Change-Id: I06220d3422835a456b5567d7797a008d313e185a
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-24 10:58:39 +08:00
David Wu
52acfab66d arm64: dts: rockchip: Add gmac_clkin fixed clock for gmac usage for px30
Change-Id: Ibb155666235c609603e0a89316398c3aeb303805
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-24 10:58:27 +08:00
David Wu
d23333f9d6 arm64: dts: rockchip: Make adc key detected value more accurately for rk3326/px30 board
Change-Id: Ibcc08001789478d714628fdec10024e6254daa74
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-24 10:39:03 +08:00
David Wu
807a02af27 ethernet: stmmac: dwmac-rk: Add speed setting for gmac controller of px30
Need to setup the speed setting for 10/100, otherwise the gmac can't
work.

Change-Id: I92a410b7b453e145fecc817841eecc54afca4051
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-24 10:37:58 +08:00
Longjian Lin
72a3380985 arm64: dts: rockchip: add bluetooth clk control on rk3326-evb-lp3-v10
Change-Id: I745d4f9b80e0d6cb70844b0508931f394b7f5b8d
Signed-off-by: Longjian Lin <llj@rock-chips.com>
2018-02-24 10:37:17 +08:00
Wyon Bi
84dd6061e3 arm64: dts: rockchip: add px30-evb lvds board support
Change-Id: I50b587f592d88d704c4843db428c5e847eb484cb
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-02-24 10:36:08 +08:00
Joseph Chen
b0104476f8 arm64: dts: rockchip: rk3326/px30: add pmic pwrkey node
pwrkey node is necessary for U-Boot RK817/RK809 pwrkey driver,
because the device-driver model requires it to make a match.

Change-Id: Ica766232646ba93508592ab1a20b65157859d688
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-02-24 10:35:36 +08:00
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