Commit Graph

860719 Commits

Author SHA1 Message Date
Jianqun Xu
d386b9cfa6 Revert "staging: ion: remove __GFP_NOWARN when use low order gfp flags"
This reverts commit d2805d7fff.

Change-Id: Id70bd22428df247703d3e4c466fe450faf680d03
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-22 09:31:29 +08:00
Shunqing Chen
b76b1f8f53 drm/bridge: synopsys: dw-hdmi: fix no display between kernel logo and android logo
def_mode picture_aspect_ratio is no HDMI_PICTURE_ASPECT_NONE,
but Android set mode, the picture_aspect_ratio is HDMI_PICTURE_ASPECT_NONE,
When comparing the new mode with the old mode, the two are inconsistent,
so the mode will be changed.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Ide07f9f7251a4ad22d4c27136005be77f1dfd4e2
2020-12-21 15:53:41 +08:00
Shawn Lin
9bbced880c mmc: sdhci-of-dwcmshc: auto gate clk when changing phase in tuning
Change-Id: I24a86622cc41c58dcf6e7edd9e458fe976573954
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-21 10:23:38 +08:00
Shawn Lin
57621d50a1 mmc: sdhci-of-dwcmshc: Set timeout broken flag for rk platform
Actually from test, it seems the expected DATA timeout is broken
for some CMD transfers which is wired, so we have to add
SDHCI_QUIRK_BROKEN_TIMEOUT_VAL for sdhci core to always set max
timeout value

Change-Id: Ib41ca137f700f939a13c9f9d0fc30cb8590f1183
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-21 09:47:33 +08:00
Weixin Zhou
0449e66bd5 arm64: dts: rockchip: Adjust tx phase to 0x8 for rk3566 tablet
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Iab71da05f6cd553d158100b5bddf53fe0028ac34
2020-12-21 09:41:58 +08:00
Hu Kejun
09cdad0647 media: rockchip: isp/ispp: release ldch/fec buffer when close video
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I527e2658e69c11c415f3df4b604693d1ef18b360
2020-12-18 17:42:30 +08:00
Frank Liu
fd06e4f6d5 media: i2c: add sc500ai driver
Signed-off-by: Frank Liu <frank.liu@rock-chips.com>
Change-Id: I2c77e19dfe67e943bf18d6f775d30b4180f59b95
2020-12-18 17:34:10 +08:00
Shawn Lin
f43f195636 phy: rockchip: naneng-combphy: Adjust PCIe signal
Set SSC downward spread spectrum for PCIe and set proper
RMJ for inner 100M and external 100M refclk.

Change-Id: Ic7d9d1651f7687858e6c5e399bc98ee03b5ee964
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-18 17:31:19 +08:00
Jianqun Xu
5a7e222b78 BACKPORT: ANDROID: staging: ion: Skip sync if not mapped
This is back from android mainline with conflict fix from
(f2bcdb43a7 ANDROID: staging: ion: Skip sync if not mapped)

Only sync the sg-list of an Ion dma-buf attachment when the attachment
is actually mapped on the device.

dma-bufs may be synced at any time. It can be reached from user space
via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when
syncs may be attempted, and dma_buf_end_cpu_access() and
dma_buf_begin_cpu_access() may not be paired.

Since the sg_list's dma_address isn't set up until the buffer is used
on the device, and dma_map_sg() is called on it, the dma_address will be
NULL if sync is attempted on the dma-buf before it's mapped on a device.

Change-Id: I11f7c13cfc7fa9672df803457c1708e60bf51ae7
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-18 17:21:41 +08:00
Ren Jianing
9b9650c3d5 arm64: dts: rockchip: rk3568-nvr: add usb3otg support
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Icd68825442e89ff78ae8139b7326ad1ba253e7a9
2020-12-18 10:49:07 +08:00
Alex Zhao
e37604f00f arm64: dts: rockchip: change the wifi power-on method for rk356x evb
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I2859c7e701ae7f023894e19a2e9fd96f6f5df9db
2020-12-18 10:31:57 +08:00
Alex Zhao
0472b0ebac net: rfkill-wlan: set the correct gpio direction
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I5e3af65df302304f0b6ea4ccef86bf8572c3b9ac
2020-12-18 10:24:31 +08:00
Elaine Zhang
6866058796 arm64: dts: rockchip: set ACLK_VOP to 500M for rk3568
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ib96868c3a5bdebd9144d957e567318e57991cc3e
2020-12-18 10:12:29 +08:00
Shawn Lin
74cc51c949 arm64: dts: rockchip: Adjust tx phase to 0x8 for rk3568-evb
Change-Id: Ib9709f463a4fd1e0f1403e9bf0fe8fca043be537
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-18 10:10:42 +08:00
Shawn Lin
e66979ea8b mmc: sdhci-of-dwcmshc: Don't gate bus clock for RPM
Gate bus clock will make DLL module lost tuning value.

Change-Id: I3af2d7c6601acbdeb4eb732e597d7d5725e0354b
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-18 10:07:28 +08:00
Shawn Lin
0fa85aaa6c mmc: sdhci-of-dwcmshc: add adma_write_desc support for rk platforms
Change-Id: I44226752d0ece413be622cd5f994782b6832f2eb
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-12-18 09:10:00 +08:00
Jisheng Zhang
9a89c11550 UPSTREAM: mmc: sdhci: fix __sdhci_adma_write_desc
If hosts provides ops->adma_write_desc, we should not fall back to the
general sdhci_adma_write_desc().

Change-Id: I42e14edddbf7eccecb18bbff2abd802ea8dacd43
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 07be55b567)
2020-12-18 09:00:35 +08:00
Zhihua Wang
a3c7d4b409 ARM: dts: add rv1126-evb-ddr3-v13-dualcam-tb-emmc.dts
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: I7e2d8bbf021dea66fdf75aac9403b19fdc87a9d6
2020-12-17 18:44:21 +08:00
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