Commit Graph

853599 Commits

Author SHA1 Message Date
Caesar Wang
c2395e6617 arm64: dts: rockchip: add rk3399 evb ind v11 board support for linux
Evb ind is part of a family of boards called rk3399 Industry development.
As best as possible, the properties shared by the rk3399 family are placed
in rk3399-evb-ind.dtsi, while Evb-linux specific bits are in
rk3399-evb-ind-lpddr4-linux.dts. This does not add full support for the base
Evb ind board.

Working and tested (to some extent):
* cluster cpu/gpu support -- including frequency, performance
* DVFS: included cpu/gpu/ddr
* UART / console
* LPDDR4
* TF cards
* USB2/USB3
* Thermal
* Touchscreen
* EDP
* Backlight
* System Key (ADC and Power keys, including the reset/vol+/recovery/maskrom)
* Wifi
* Bluetooth / Webcam
* eMMC
* VIDEO: tested the h264 video source
* AUDIO: play and mic music
* HDMI Out
* GMAC
Not tested:
* RS485
* CIF
* Mini Pcie
* IR Receive
* Sensor
* CAMERA

Note: this patch had *not* verified the all functions, it can bringup for
v11 board and some basic functions.
(included wifi/bt, camera, display, video, usb...and so on.)

Change-Id: Ibae4853f4c11d3a269cd3aa96478c45cdb126597
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
Caesar Wang
0d423cbb03 arm64: dts: rockchip: rk3399-evb-ind: move the configure for right place
Move the common configure are used for rk3399-evb-ind.dtsi.

Change-Id: Ia42ed2bb823d3d30c8433be5bfc07ed48e6b0015
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
William Wu
9bb842fa92 usb: gadget: uvc: configfs: fix the desc of framebased format
Refer to the spec "USB_Video_Payload_Frame_Based_1.1", we
set the bBitsPerPixel of framebased format descriptor to 16,
it means that 16 bits per pixel used to specify color in the
decoded video frame. And set bVariableSize of framebased format
descriptor to 1, it means that the data within the frame is of
variable length from frame to frame is variable.

With this patch, the uvc H264 format can work normally on
Linux OS platform.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ibc25b5f67efb8cfcae9d66a509399cfe896f7943
2020-05-09 16:51:50 +08:00
Finley Xiao
fd315abb67 soc: rockchip: opp_select: Add support to adjust leakge
Change-Id: Ie209113abac74660014a6dc4984fd13ef76e02e2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 16:45:10 +08:00
Finley Xiao
746b4c8606 arm64: dts: rockchip: rk3368: Add leakage temperature and voltage for cpu
Change-Id: I4228a3d5787e29ea697cd022575132cca31c4fb5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 16:32:09 +08:00
Alex Zhao
f70750b3b4 arm64: rockchip_defconfig: enable CONFIG_RTL8821CS
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Ib01765c0a0ae54565af008ea4c5ccc75f0d0c2bd
2020-05-09 15:23:27 +08:00
Alex Zhao
5fd52cc320 net: rockchip_wlan: add rtl8821cs driver: v5.8.1.2_35313.20191016_COEX20191014-4141
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Icca896b4f64a7caa348b5f488ee49ce910033ddc
2020-05-09 15:23:12 +08:00
Tao Huang
9451c0bf46 arm64: dts: rockchip: rk3399-sapphire-excavator-edp: remove isp node
Fixes: 5ea0aa0609 ("arm64: dts: rockchip: rk3399-android: remove isp node")
Change-Id: Idfecde016a7bfb78008c3d67223b0d8568d35f02
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-09 15:10:46 +08:00
shengfei Xu
70282202ba regulator: rk809 & rk817: correct enable/disable for runtime
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I4b4b29c6f31b3c877a3d74d791e14879620c6ff3
2020-05-09 14:53:21 +08:00
Tao Huang
5572fc7fe8 nvmem: rockchip-otp: refactor rockchip_data
Add clocks and reg_read to rockchip_data, allow support more SoCs.

Change-Id: I45271d69dae808d741c953ce61b921b9a3d21202
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-09 14:51:50 +08:00
Finley Xiao
d821f78322 nvmem: rockchip-efuse: Update driver to use clk_bulk array APIs
Change-Id: I0489a992ed7edb3317b1b5a57522df3a5374cec2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 14:08:55 +08:00
Finley Xiao
3758737250 nvmem: rockchip-otp: Add support to initialize otp when probe
Change-Id: I6ae99f68394787fc2e8e6868d788390f271073ed
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 10:30:14 +08:00
Wu Liangqing
04e6b38f51 net: wireless: rockchip_wlan: bcmdhd enabled CONFIG_BCMDHD_OOB
Fixes: 9d5a7a9c5a ("net: wifi: rockchip_wlan: add wifi6 support for bcmdhd chipset")
Change-Id: I16e0ede9ce03a5f19c7bdfa78db3051ff20c02b1
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-09 10:29:40 +08:00
Wu Liangqing
5ea0aa0609 arm64: dts: rockchip: rk3399-android: remove isp node
Change-Id: Ia89c18b3c5957980c5a17991effc93250771db6f
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-09 10:25:04 +08:00
Allon Huang
e081456171 drivers: media: platform: rockchip: cif: reconstruct register's reading and writing
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I47e6e118a066a7740a34645cc9736a9a3f5f6afb
2020-05-08 21:52:17 +08:00
Wu Liangqing
b6906fc97d arm64: rockchip_defconfig: enable CONFIG_TOUCHSCREEN_HYN_CST2XX and CONFIG_GS_SC7A30
For rk3368a tablet.

Change-Id: I588802e3ee785cd55327c5b5edb7d256b41403ef
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-08 20:59:27 +08:00
Wu Liangqing
ce45b3c0d1 input: touchscreen: add hyn_cst2xx support
Change-Id: I57e6bd1ec989cf8c803a3648f24cb3fd834940b2
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-08 20:43:58 +08:00
Wu Liangqing
844ba815a5 intput: sensors: accel: add sc7a30 support
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I7727b6bf642b9f2f2a1ee53e7de283c4f818d7f9
2020-05-08 20:34:48 +08:00
Shunqing Chen
1e5052252d arm64: dts: rockchip: rk3368-xikp: add extcon for rk818
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I9f96a6548cdd8111e309a167bba370429ae205c0
2020-05-08 20:02:29 +08:00
Wu Liangqing
42c9a9370d arm64: dts: rockchip: add rk3368-tablet.dts
Change-Id: I8ff1ea45b9de1f9f6497aff158491a352a441bb6
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-08 14:57:15 +08:00
Andy Yan
159b2c4d15 arm64: dts: rockchip: Remove data-sync property for px30-ad-d6-anx6345 rgb interface
The data-sync is enabled by default, so we don't need
this property.

Change-Id: I3cfbb051368a2065cf6db5d0bcc91b8e77e77d10
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-05-08 09:12:45 +08:00
Andy Yan
802974d4f2 drm/rockchip: rgb: Fix data-sync logic
According to IC designer:
For RGB screen: The data-sync should enabled to get better SI.
For MCU screen: The data-sync must bypassed, otherwise the mcu signal
can't output.

Because we use much more rgb screen than MCU screen, so it's better
to enable data-sync by default. And for MCU screen, add the
data-sync-bypass property to bypass data-sync.

Fixes: c8f3ab90c0 ("drm/rockchip: rgb: Allow to configure data sync from DT")
Change-Id: Iacb0f7813ea038a210c2bbb88126356381509bf6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-05-08 09:11:07 +08:00
Caesar Wang
8f427fc73c arm64: configs: update defconfig for rockchip_linux_defconfig
1. clean rockchip_linux_defconfig for kernel 4.19.
2. update codec configs:
 add configs:
        CONFIG_ROCKCHIP_MPP_RKVDEC
        CONFIG_ROCKCHIP_MPP_VDPU1
        CONFIG_ROCKCHIP_MPP_VDPU2
        CONFIG_ROCKCHIP_MPP_VEPU1
        CONFIG_ROCKCHIP_MPP_VEPU2
3.enable CONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER
4.enable CONFIG_REGULATOR_TPS65132
  Enable TPS65132 regulator driver to support dual output power
supply used in LCD panels for RK3399 M series tablet board.
5.add FIQ_DEBUG and RK_CONSOLE
CONFIG_FIQ_DEBUGGER_TRUST_ZONE=y
CONFIG_RK_CONSOLE_THREAD=y

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I1de5e663541987e166b661b7c43b4c9b00e4233f
2020-05-07 15:43:09 +08:00
shengfei Xu
9516a7b1a8 mfd: rk808: use REGCACHE_RBTREE cache_type for rk817/809
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I83d6f5f3db906b74760fd32a1c072ac9e4fb956f
2020-05-07 14:14:58 +08:00
xuhuicong
89b50da9d4 drm/rockchip: fix hdmi no display when resume or switch resolution
spelling mistake cause hdmi phy configure error, now correct it

Change-Id: I548d76dd44e8d39e35b95138ec3d25b358cf3376
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2020-05-07 11:07:52 +08:00
Wang Panzhenzhuan
da6c923d97 media: rockchip: cif: fix front/back camera switch green issue
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I70b30bdbf6321a3f6f60b68f76f711c65a10534b
2020-05-07 11:05:50 +08:00
Zhaoyifeng
c9c13e83df driver: soc: vendor storage support realloc
To rewrite the same id with the data size large than first alloc size,
it`s will write fail. This commit will support realloc new memory
for rewrite.

Change-Id: I3345fc9e4a12d0f61f88cfb944b7efc5a4b5e215
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2020-05-07 09:37:10 +08:00
Elaine Zhang
024ecfe711 clk: rockchip: rk3368: use COMPOSITE_DCLK for dclk_vop
Change-Id: I45ce9a2e404acb7eae885fbca0b4703ec67176e9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-05-06 16:09:54 +08:00
Elaine Zhang
840eb062cc clk: rockchip: add a COMPOSITE_DCLK clock-type
The CLK_SET_RATE_PARENT flag make the parent clock and the child clk is 1:1.
If the DCLK frequency is too low, the PLL frequency will be very
low, which will affect the output waveform quality of PLL, and PLL
locking may be abnormal, so add a new COMPOSITE_DCLK clock-type to handle
that.

Change-Id: If9bee9ebf157fcf034aed246b3aa1cff503ef9cf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-05-06 16:09:33 +08:00
Tao Huang
2778018fd8 rk: arm: do not build Image.gz/lz4 when build img
Sometimes Image is not ready when build Image.gz. Do not know why.

Fixes: 6bec2128bb ("rk: arm: support build Image.gz and Image.lz4")
Change-Id: Iafa7a7cd138d7169f5f198977be0c9d01765a5fc
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-06 15:37:50 +08:00
Wu Liangqing
c19a9a7179 net: wifi: rockchip_wlan: enabled RTL_WIRELESS_SOLUTION
Fixes: 9d5a7a9c5a ("net: wifi: rockchip_wlan: add wifi6 support for bcmdhd chipset")
Change-Id: Iafbe9b33b40498597028f602320d46c5a750d86e
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-06 15:30:19 +08:00
Sandy Huang
5880345a4c drm/rockchip: vop: add yuyv format support for rk3399
Change-Id: I838c860a96d1f3869fecad7af67a97aa6a8df1ba
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-05-06 15:25:25 +08:00
Sandy Huang
86a4204e3c drm/rockchip: vop: correct win full data format
not all win full can support 10bit yuv format, so use formats_win_full
and formats_win_full_10bit to distinguish.

Change-Id: I2ed500a21c072ec79fa6c581bfdc30a7e4474251
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-05-06 15:25:25 +08:00
Tao Huang
8910f15f2e arm64: rockchip_defconfig: enable CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED
According to the Android 10 Go edition Device Configuration Guide 1.0.

Change-Id: Ibd9adb2ad2a000f0332bca6524bf427710572459
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-06 10:49:35 +08:00
Tao Huang
ed66bca992 ARM: rockchip_defconfig: enable CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED
According to the Android 10 Go edition Device Configuration Guide 1.0.

Change-Id: I5514042d984ed54ed62799a5ebd49cd7d0c2a5f3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-06 10:14:01 +08:00
Zhenke Fan
b23dc2fd5b media: i2c: add gc4c33 sensor driver
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I86e49488c73d2be1c4ca24dd785df55e02fd16c9
2020-04-30 19:58:28 +08:00
Ding Wei
86dfe95101 video: rockchip: mpp: add running_list for taskqueue
for link mode, several tasks are running at the same time.
so, it need a list to manage these.

Change-Id: Iff4c208d066342a60ecee589dcf5df3831fc3e38
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-30 18:49:56 +08:00
Wang Panzhenzhuan
b6451c04d4 media: i2c: imx317 fix exposure issues
fix exposure and gain control issues && adjust register settings

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ia7198cfd60d21689811f789eaf559ae187c644a9
2020-04-30 18:30:57 +08:00
Sandy Huang
5be8f596ff drm/rockchip: vop: optimize dump buffer cmd
vop driver need to backup the last plane info for dump buffer cmd,
but the kmemleak tool will identify as a memleak buffer, so store the
planelist to rockchip_plane_state, and kfree the planlist at next frame
update or disable.

Change-Id: I6e95bfb9740a0ff4ad9033bbe3a34c28e1114c3d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-04-30 14:45:01 +08:00
Sandy Huang
9f4bb6067d drm/rockchip: fix memleak at kernel logo logic
Change-Id: I2aea4f8067fbded3c135b5a992134c77d7b0bf05
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-04-30 14:45:01 +08:00
Xing Zheng
d92e05ea5a ASoC: rk3308_codec: disable zero-cross without working AGC
Enabling zero-cross without AGC, it's may cause loss some
data when start capturing.

Change-Id: I57fcf2cdfc0f67b54700639c4a73bf6c92ac254a
Reported-by: XiaoTan Luo <lxt@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2020-04-30 14:41:27 +08:00
Ding Wei
06973883c2 video: rockchip: mpp: put node for attach mpp service
relative function:
of_parse_phandle ==> of_node_put
of_find_device_by_node ==> platform_device_put

Change-Id: I06ef97baa675efff79b2bc653fabda54e3f707df
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-30 11:24:16 +08:00
William Wu
ea9afa6584 usb: gadget: udc: core: fix possible NULL pointer dereference
This patch fixes the following panic when use uvc function and
do reboot during uvc preview.

Unable to handle kernel NULL pointer dereference at virtual address 000001fd
pgd = 85dd55c1
[000001fd] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in: galcore(O)
CPU: 0 PID: 716 Comm: xc:RkAiqCoreThr Tainted: G        W  O      4.19.111 #18
Hardware name: Generic DT based system
PC is at usb_gadget_deactivate+0x0/0x6c
LR is at usb_function_deactivate+0x54/0x74

It's because that do reboot operation will call configfs_composite_unbind()
to set cdev->gadget to NULL.

Change-Id: I6fbfe9b58f865113d04ca7ce0b74b00f8d89227c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-30 10:44:38 +08:00
Ding Wei
caa640e869 video: rockchip: mpp: add rollback when iommu probe error
when error, it must realse the got resource.

Change-Id: Ib1c8f4495c41c0a82dda2ab087c6dd7a04c3e7ab
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-30 10:17:34 +08:00
Ding Wei
4942a0ef0b video: rockchip: mpp: mpp->rw_sem ==> mpp->iommu_info->rw_sem
Change-Id: I26be1d109b211d9e95fcf4f42236338bcc64e880
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-30 09:44:12 +08:00
Huang jianzhi
5863551f82 rtc: rtc-fake: add fake rtc driver
Change-Id: Ia06db4f5d967338c3f74fed9d35d2cd05209d746
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2020-04-29 18:30:37 +08:00
Jianqun Xu
fd7e5ad076 video/rockchip: mpp_rkvdec fix reset for rk3368 ops
Change-Id: Iba61a21e4a4cc102eb68ec39afe927e7f2d39558
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-04-29 09:10:40 +08:00
Finley Xiao
d2b07cf531 soc: rockchip: pvtm: Add support to get remapped base address
Change-Id: I50938f27d8ee88059114069f2edfff78d0dd066f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-04-28 18:52:30 +08:00
Elaine Zhang
9094c9a14c clk: rockchip: Modify the rules of the fractional divider
Fractional frequency divider to do integer frequency divider does not
need 20 times the limit.

Change-Id: I98e413230a237fc5aafebabb9c0696d0ce51281a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-04-28 15:32:26 +08:00
Yao Xiao
9d5a7a9c5a net: wifi: rockchip_wlan: add wifi6 support for bcmdhd chipset
1. support wifi6
2. support sta/ap coex for Android P
3. support sta/ap coex for Linux Connman(Connection Manager)

notice:
  As the new drivers are unstable, the vendor suggests to maintain
two sets of drivers, and delete them after the new drivers are stable.

Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: I6c98e6e031aee1d619a7f1f4a357b09975237d80
2020-04-28 15:09:48 +08:00