Commit Graph

860701 Commits

Author SHA1 Message Date
Jon Lin
c7270465b2 drivers: rkflash: Fixed bbt operation calculation error
Fixes: 008340a82 ("drivers: rkflash: Change to use the api which the oob area available")
Change-Id: I140aa76a2acb73271ba04b7060030dc06a2353e6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-12-17 16:09:28 +08:00
Cai YiWei
77d310cf85 Revert "HACK: media: videobuf2: allow cache hints on all memory types"
This reverts commit a7b55392ab.

Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Change-Id: I6eacd69327e0b64d36c8d7c69dd1f0a51ce3480a
2020-12-17 14:58:08 +08:00
Alex Zhao
1b592d162b arm64: dts: rockchip: rk3566-rk817-tablet: set sdio default sample phase to 90
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I8cdd54f2a6154e95c3257ee1c10dd6e1ad08158f
2020-12-17 14:55:08 +08:00
Longjian Lin
ac6bf6f045 arm64: dts: rockchip: rk3399-ind: add BT pinctrl
Signed-off-by: Longjian Lin <llj@rock-chips.com>
Change-Id: I542639f549f7932ce980f21e13f3cad022dd4272
2020-12-17 14:53:37 +08:00
Longjian Lin
1ceda43610 arm64: dts: rockchip: add BT gpio pinctrl for rk3399 excavator
Signed-off-by: Longjian Lin <llj@rock-chips.com>
Change-Id: Icb6408fed0d4f64a87a8adfd6c1a1358a6bc7ab2
2020-12-17 14:52:55 +08:00
Huang zhibao
e58ec60782 arm64: rockchip_linux_defconfig: enable CONFIG_CMA and CONFIG_DMA_CMA config
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I3ccdf71e8a67e93e45f6e1705d3c6b2961055ed2
2020-12-17 14:51:26 +08:00
Simon Xue
4eb691cb07 PCI: rockchip: dw: fix UDMA logic
Clear UDMA interrupt first before starting a new transfer. Otherwise,
the new interrupt corresponding to new transfer may be cleared
when clear the last interrupt which finally cause transfer timeout.

Change-Id: I4d232e41cdfaa68178cdd99942aefa717032c1b9
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-12-17 14:38:14 +08:00
Shawn Lin
e1b9ba4215 arm64: dts: rockchip: rk3568: add aux clock for PCIe
Change-Id: I9318a8ca57b09a3fe792ac0a60f7e82f60d7ff87
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-17 10:13:13 +08:00
Jianqun Xu
507db37b29 arm64: dts: rockchip: rk3568-android fix linux,cma reserved memory
Make linux default cma 8M and inactive

Change-Id: I1ba9da332b6dcafa51f2dc76a0ac2f2c83e20abc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-16 18:17:04 +08:00
Binyuan Lan
bcd526456f arm64: dts: rockchip: Fixed sound card configuration for rk3566-rk817-tablet-rkg11
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: Ic51409e9e0e05459277292b14801cdde79046230
2020-12-16 18:16:06 +08:00
Binyuan Lan
70207c5070 arm64: configs: rockchip_defconfig: enable es7210
This is needed by rk3566-rk817-tablet-rkg11 with mic array

Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I6c1083b402273bfa1492c9a2f851a76a5c71ab7d
2020-12-16 18:16:06 +08:00
Shunqing Chen
1a41b1771a mfd: rk808: fix error of rk817 close rtc alarm
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I242b54485fcc5d32eca3b3cc282e82baa13e1d9a
2020-12-16 18:07:06 +08:00
Shunqing Chen
a59c01682e power: rk817-battery: fix ydsoc calculate error
ydsoc error can lead to charge or discharge become slow.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Ie17f0064eda3723378f49caef08bca212c322d70
2020-12-16 18:05:55 +08:00
Xu Hongfei
d610b5b0ce media: rockchip: isp/ispp to version v1.2.2
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: Ief6e5362117a85949e16949db70832ea309a6e99
2020-12-16 17:45:48 +08:00
Xu Hongfei
a864508368 media: rockchip: isp/ispp: fix error detected by depmod
DEPMOD  4.19.111
depmod: ERROR: Cycle detected: video_rkisp -> video_rkispp -> video_rkisp
depmod: ERROR: Found 2 modules in dependency cycles!

Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: I4136dcb32e6438865b2d1d1f8df811748db1f549
2020-12-16 17:45:48 +08:00
William Wu
c9faa14df7 phy: rockchip: naneng-combphy: add new func for parse dt
This patch adds a new function rockchip_combphy_parse_dt()
to parse devicetree for combphy, and get reset properties
for later reset control.

Change-Id: I41821ec9c99a866b04c4514f0fbca55d118b7175
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-12-16 15:23:35 +08:00
Binyuan Lan
a35a0174ec ASoC: es7210: add es7210 I2S adc support
ES7210 is a 4-ch ADC with I2S interface for Microphone Array

Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I71faf344eb8b058349a7a889eae296115cc788c8
2020-12-16 14:54:48 +08:00
Shawn Lin
17256ed165 mmc: sdhci-of-dwcmshc: Disable cmd conflict check for every set_clock()
Change-Id: Ia5daa982d14ba2788786b5ecfb6cd96f98012a97
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-16 12:00:45 +08:00
Yandong Lin
29f5d6e2cd video: rockchip: mpp: adjust trans_tbl_vp9d for rkvdec2
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic5a7f007173156c7a16e25da6f56d8adc6be50d1
2020-12-16 09:22:59 +08:00
Tao Huang
adda69fcaa ASoC: rockchip: multicodecs: Fix the build as module
ERROR: "snd_card_locked" [sound/soc/rockchip/snd-soc-rockchip-multicodecs.ko] undefined!

Fixes: 49950d606a ("ASoC: rockchip: multicodecs: add support property 'rockchip,wait-card-locked'")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I71b9ec38072d1a0147ad0f9c3b6198f89aa385ec
2020-12-15 20:50:53 +08:00
Tao Huang
f1fc660064 ASoC: cx2072x: fix compilation issue on 32bit
sound/soc/codecs/cx2072x.c:778:3: warning: comparison of distinct pointer types ('typeof ((frac_num)) *' (aka 'unsigned long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
                do_div(frac_num, 7);
                ^~~~~~~~~~~~~~~~~~~
sound/soc/codecs/cx2072x.c:1001:9: warning: comparison of distinct pointer types ('typeof ((div)) *' (aka 'unsigned long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
                mod = do_div(div, bclk_rate);
                      ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iab3ff22c4bea8144fd566b6fe64da6c1aef24455
2020-12-15 20:50:53 +08:00
Tao Huang
7245f06953 ASoC: es7243e: Add terminate entry for of_device_id table
Fixes below build error:
FATAL: sound/soc/codecs/snd-soc-es7243e: struct of_device_id is not terminated with a NULL entry!

Fixes: 02a49287b0 ("ASoC: es7243e: add es7243e I2S adc support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iaf1a5dbe7ad4534530d87bca80954caecf861323
2020-12-15 20:45:24 +08:00
Tao Huang
6493382a8c ASoC: es8323: Fix unneeded variable warning
sound/soc/codecs/es8323.c:139:27: warning: variable 'es8323_pga_sel' is not needed and will not be emitted [-Wunneeded-internal-declaration]
static const char * const es8323_pga_sel[] = {
                          ^

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id17a0005cc933317e906107a51b22696020c0a51
2020-12-15 19:32:27 +08:00
Ren Jianing
c13a49d1f7 phy: rockchip-naneng-usb2: support to force otg mode
This patch creates an usb2 phy attribute group and
provides an attribute "otg_mode" for otg port to
force otg mode independently of the voltage of otg
id pin.

In order to implement the force mode function, we can
select otg plug indicator output (AKA iddig) from GRF,
and set GRF USB otg plug indicator to "0" or "1" to
control iddig status.

Attention, we set iddig to "0" by disable idpullup rather
than set GRF, the otg_suspendm will be set to 1 to enable
the disconnect detection module, and the LS_PAR_EN will be
set to 1 to enable low speed device enumerate.

Usage:
[1] Force host mode
echo host > /sys/devices/platform/<u2phy dev name>/otg_mode

[2] Force peripheral mode
echo peripheral > /sys/devices/platform/<u2phy dev name>/otg_mode

[3] Force otg mode
echo otg > /sys/devices/platform/<u2phy dev name>/otg_mode

For RV1109 and RV1126 EVB, the <u2phy dev name> is ff4c0000.usb2-phy.

Change-Id: Icba5e4a3d2aae6cd1df5435d64fd0caea4348ec2
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-12-15 18:55:41 +08:00
Jianqun Xu
205f98feac arm64: dts: rockchip: rk3568-linux: add swiotlb=1
Force TLB size

Change-Id: I806f80aecbd64d85d618ea094d3b656663c9d4e8
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-15 17:25:43 +08:00
Andy Yan
972ff062a4 drm/rockchip: vop2: No scale if gt2/gt4 enabled
Change-Id: I9766b44d87b4b20ec12eac0422bc07ec8b66fdda
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-15 17:23:54 +08:00
Andy Yan
49ca5b62dd arm64: dts: rockchip: assign DCLK_VOP1 to VPLL for rk3568 nvr
NVR demo board use DCLK_VOP1 drive VGA monitor, which should
as accuracy as possible.

Change-Id: Ie19174cf2b0c951216c8f5e1850758a9df66be0b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-15 17:18:36 +08:00
Jianqun Xu
24a7351546 arm64: dts: rockchip: rk3568-android: add swiotlb=1
Force TLB size

Change-Id: Icbb63b8fb7c0833f5391c3136e650ff19d22729a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-15 15:55:55 +08:00
Finley Xiao
763b3c9f61 ARM: rockchip_defconfig: Enable CONFIG_ENERGY_MODEL
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If9de83ec87c3aa236ee2f33effda22a499f2cda1
2020-12-15 15:50:13 +08:00
Shawn Lin
2fbb627806 PCI: rockchip: dw: Add loopbask master support
In order to make loopback slave into LPBK.Active state,
we add "rockchip,lpbk-master" for DTU to force it as a
remote loopback master device. Nothing needed for slave.

Change-Id: Id851ad8e34e29939f12f76cb132d942bc059a811
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-15 15:33:47 +08:00
Sandy Huang
25120743e0 drm/rockchip: vop2: fix esmart display black screen
This is workaround solution for IC design:
esmart can't support scale down when actual_w % 16 == 1.

Change-Id: I0fa090c5e28b79e644ef31ea1184b724b9d32ffa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-15 15:31:23 +08:00
Zefa Chen
0e7b110700 media: i2c: sc4238 support digital gain
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3adeddbd245c67e99564db4c9544a876c26aab62
2020-12-15 10:52:05 +08:00
Hu Kejun
7c3cdfb472 media: rockchip: isp/ispp: support output isp/ispp reg on each frame
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Idff87c8af4e5a097e9279ea7a0247941246fec50
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2020-12-15 10:05:25 +08:00
York Zheng
8117cf5d6e arm64: dts: rockchip: rk3399-evb-ind: i2c1 clock-frequency 400k
Signed-off-by: York Zheng <zyk@rock-chips.com>
Change-Id: I669fad88c7414da611076643665519439693119a
2020-12-15 09:43:00 +08:00
Tao Huang
f8db99ebac media: i2c: hall-dc-motor: fix compilation issue on 32bit
ERROR: "__aeabi_uldivmod" [drivers/media/i2c/hall-dc-motor.ko] undefined!

Fixes: a73b62eb59 ("media: add hall-dc-motor driver for camera iris")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I22fec672086f1187da795a510373eb3ee579e1f2
2020-12-14 20:55:54 +08:00
Tao Huang
427ab8296d input: sensors: accel: dmard10: Fix 'DMARD10_RANGE' macro redefined warning
Fixes: 2c9f4903b5 ("sensor:add gsensor dmard10 support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5fd552c0ca4b59cc0d27a2b0481a0dbd1de238ef
2020-12-14 20:51:48 +08:00
Tao Huang
438c461331 media: i2c: Add missing VIDEO_OV7750 to Makefile
Fixes: 7973ba63f2 ("media: i2c: sensor drivers synchronize with kernel 4.4")
Change-Id: Icac59d5c7f5e20ffa0811a064cccf9bc18d17e22
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-12-14 20:07:43 +08:00
York Zheng
7fa2df0cf1 input: touchscreen: gsl3673 remove report point in suspend
Signed-off-by: York Zheng <zyk@rock-chips.com>
Change-Id: Ieaca0cc4a3e0ec54fb954c4c14da91e255be6f01
2020-12-14 19:47:30 +08:00
Tao Huang
833022e6e7 input: sensors: lsensor: ls_ap321xx supports modularity
Fixes: c8ebec26c7 ("input: sensor: sensor supports modularity")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If35571893de2efd484b00bbcf940915a201dfa65
2020-12-14 18:44:10 +08:00
Tao Huang
60c008c335 input: sensors: compass: Remove useless config COMPASS_MMC328X
No rule to make target 'drivers/input/sensors/compass/mmc328x.c',
needed by 'drivers/input/sensors/compass/mmc328x.o'.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic29c4ebfb85f482470e7e5d24f2e6429187fda37
2020-12-14 18:33:48 +08:00
Wyon Bi
fcfe49fdb3 phy/rockchip: naneng-edp: Add delay after release aux_idle
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Id82b2983c174f8d99c686af61586c731a9ec91f9
2020-12-14 17:56:32 +08:00
Sandy Huang
ee81411850 drm/rockchip: vop2: update vop scale factor
Change-Id: I2bb22e56de8f2daafb510d8f3eec49928d1fa213
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-14 17:10:47 +08:00
Shunqing Chen
d5d2966907 drm/rockchip: rk618: rgb: fix find bridge fail
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I0ac8b1b2b3db90e5608a3bc8e5372cdb4863182a
2020-12-14 17:00:50 +08:00
Sandy Huang
8877840a6f drm/rockchip: vop2: add support gamma function
Change-Id: I8e86cfa4e7229d26cfcf729890445d6180a1c0c5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-14 16:04:00 +08:00
Sandy Huang
cb8a4f52ea arm64: dts: rockchip: rk3568: add vop gamma register
Change-Id: I8d589ce5ab98dfb5f6b8ca1dc23c1150edacfef9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-14 16:04:00 +08:00
Luo Wei
d5dd0267d5 arm64: dts: rockchip: add dts file for rk3566-evb5
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I3eeb023b7ce622acd8ed151f0948489d5cd07ad8
2020-12-14 15:42:01 +08:00
Liang Chen
f7a1c6f2a1 cpufreq: interactive: fix deadlock
up_read() may wakeup some tasks, so do not call up_read() in scheduler,
or it will cause deadlock as below:

Thread #4 5 (Name: cpu3, state: debug-request) (Suspended : Container)
	queued_spin_lock_slowpath() at qspinlock.c:369 0xffffff8008119120
	queued_spin_lock() at qspinlock.h:88 0xffffff8008f0a470
	do_raw_spin_lock() at spinlock.h:180 0xffffff8008f0a470
	__raw_spin_lock() at spinlock_api_smp.h:143 0xffffff8008f0a470
	_raw_spin_lock() at spinlock.c:144 0xffffff8008f0a470
	rq_lock() at sched.h:1,244 0xffffff80080f2f4c
	ttwu_queue() at core.c:2,442 0xffffff80080f2f4c
	try_to_wake_up() at core.c:2,658 0xffffff80080eb998
	wake_up_q() at core.c:450 0xffffff80080eb6a8
	rwsem_wake() at rwsem-xadd.c:703 0xffffff800811a44c
	__up_read() at rwsem.h:107 0xffffff8008118930
	up_read() at rwsem.c:122 0xffffff8008118930
	cpufreq_task_boost() at cpufreq_interactive.c:1,449 0xffffff8008a4bdb4
	enqueue_task_fair() at fair.c:5,285 0xffffff80080f7814
	enqueue_task() at core.c:1,324 0xffffff80080ec15c
	activate_task() at core.c:1,346 0xffffff80080ec15c
	ttwu_activate() at core.c:2,240 0xffffff80080f2fc0
	ttwu_do_activate() at core.c:2,299 0xffffff80080f2fc0
	ttwu_queue() at core.c:2,444 0xffffff80080f2fc0
	try_to_wake_up() at core.c:2,658 0xffffff80080eb998
	wake_up_q() at core.c:450 0xffffff80080eb6a8
	futex_wake() at futex.c:1,636 0xffffff8008159e78
	do_futex() at futex.c:3,714 0xffffff8008158fb0
	__do_sys_futex() at futex.c:3,770 0xffffff800815bd98
	__se_sys_futex() at futex.c:3,738 0xffffff800815bd98
	__arm64_sys_futex() at futex.c:3,738 0xffffff800815bd98
	__invoke_syscall() at syscall.c:36 0xffffff8008098d6c
	invoke_syscall() at syscall.c:48 0xffffff8008098d6c
	el0_svc_common() at syscall.c:117 0xffffff8008098d6c
	el0_svc_handler() at syscall.c:163 0xffffff8008098ccc
	el0_svc() at entry.S:940 0xffffff8008083d08

Fixes: 2d367d61e8 (cpufreq: interactive: introduce boost cpufreq interface for task)

Change-Id: I9607faa5ede3a662e7f2f55da29b08fc328f4d43
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-12-14 14:11:26 +08:00
Hu Kejun
d811fd17a0 media: spi: rk1608: fix compile error by module
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Idfd973e154eb8d97eee0deb4a73c26a8a711d462
2020-12-14 14:07:06 +08:00
Hu Kejun
15f6bb1725 media: i2c: restore vcm_config ioctl
restore vcm_config ioctl deleted by commit a3907e42d2 ("media: add motor driver of MP6507 for camera IRIS/FOCUS/ZOOM")

Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I391ec77a31291c65fbb04da1915647be25dcf4b5
2020-12-14 11:42:12 +08:00
Jon Lin
495203b0c3 soc: rockchip: thunderboot_sfc: Change to wait for SFC idle
Change-Id: Idc7e1b8ae8d14c0f0bbac5714f53f50914982a65
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-12-14 11:11:56 +08:00