Commit Graph

615297 Commits

Author SHA1 Message Date
Elaine Zhang
4e4c56833d mfd: rk808: init CLK32KOUT func for rk818
Change-Id: I1e5c261233c08dcbae29a543029fe6455044b9a4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-30 18:42:38 +08:00
Elaine Zhang
f976947cbc ARM: dts: rockchip: rk3288: Add ACLK_GPU init clk freq
Change-Id: I247d4e01b12d90f462b2b4092e9be3b39dd5ed2f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-30 17:42:01 +08:00
Finley Xiao
783e72e661 arm64: dts: rockchip: rk3368: Add devfreq property for display_subsystem
Change-Id: Ic69f578f35cf0adce188297594bbd2445dcb3131
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-30 11:55:38 +08:00
William Wu
f2a2b34e45 usb: dwc3: rockchip: use async_schedule for initial dwc3
The dwc3_rockchip_probe() spends lots of time to initialize
the dwc3 host and pm runtime. It significantly lengthen the
boot time.

I test on RK3399 Excavator Board, the execution time of the
dwc3_rockchip_probe() on Type-C0 is about 220ms without this
patch (Type-C0 connect to PC USB port at the same time). Most
of the time is spent on remove hcd(~16ms) and pm runtime
suspend (~180ms).

1. remove hcd (~16ms)
   When do usb_remove_hcd(), the xHCI should wait 16ms to
   enter the stopped state with the following log:

   xhci-hcd xhci-hcd.11.auto: Host not halted after 16000 microseconds

2. pm runtime suspend (~180ms)
   Race condition is observed during pm runtiem suspend.

              CPU0                            CPU1
              ----                            ----
   rockchip_chg_detect_work()           pm_runtime_suspend
   -> mutex_lock(&rport->mutex)         -> dwc3_runtime_suspend()
               ||                         -> dwc3_suspend_common()
               \/                           -> dwc3_core_exit()
      USB_CHG_STATE_UNDEFINED                 -> phy_power_off(dwc->usb2_generic_phy)
               ||                               -> rockchip_usb2phy_power_off()
               \/(100ms)                          -> wait for rport->mutex
      USB_CHG_STATE_WAIT_FOR_DCD                          .
               ||                                         .
               \/(40ms)                                   .
       USB_CHG_STATE_DCD_DONE
               ||
               \/(40ms)
     USB_CHG_STATE_PRIMARY_DONE

   -> mutex_unlock(&rport->mutex)
                                               -> mutex_lock(&rport->mutex)

This patch runs the remove hcd operation and pm runtime
suspend in an async_domain to speed up the boot time. With
this patch, the dwc3_rockchip_probe() spends only ~12ms.

Change-Id: Ic60774e5c3e7be9f718c18ade86b2d95a9134b4c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-30 11:25:15 +08:00
Wenping Zhang
ba4f1b7e41 ARM64: dts: rockchip: add voltage restriction during high temperature for rk3399K.
Change-Id: If0c3f6529cb234620cca22630c7bf575c6491c4a
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2019-01-29 19:04:51 +08:00
wu jingchen
05702a1e17 arm64: dts: rockchip: px30-evb-ddr3-v10: Separate android firmware
Split DT source files to separate out android firmware for Android Pie & Oreo
Change-Id: Ib16858996e236bb292bc380c0fddea2f5213c15b
Signed-off-by: wu jingchen <oven.wu@rock-chips.com>
2019-01-29 16:42:53 +08:00
Wenping Zhang
ed50fb143d drivers: cpufreq_interactive: enable the boost function of mouse device.
Change-Id: I33bb569cb4abc2a5f0602a6fccfa29bc3d8de274
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2019-01-29 14:27:00 +08:00
William Wu
e192640666 arm64: dts: rockchip: increase atomic coherent pool size for rk3399/rk3328
The Seagate Expansion Portable Drive HDD (ext4 file system,
idVendor=0bc2, idProduct=2321) is reported to fail to work
on the rk3399/rk3328 platforms USB 3.0 interface with the
following error message when do read/write operation by dd
command:

xhci-hcd xhci-hcd.11.auto: Ring expansion failed

It's because that xHCI use the dma_pool_alloc() to allocate
DMA buffer for segment_pool with GFP_ATOMIC flag, however,
the default 256 KiB coherent pool is too small for the USB
HDD, so increase it to 1024 KiB to make sure that devices
will be able to allocate their DMA buffers with GFP_ATOMIC
flag.

Change-Id: Ic94c9ceeeb4adabe860af46546550aa8f73f11ca
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-29 10:34:12 +08:00
Finley Xiao
06165d2e65 arm64: dts: rockchip: rk3308: Set suspend frequency to 408MHz for rk3308k
Change-Id: Idfc2ed6c3c1be8579caae144835904a41b0b03f7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-28 14:39:30 +08:00
Finley Xiao
7175d2320b cpufreq: dt: Implement rockchip_cpufreq_suspend()
Set CPU voltage to low temperature voltage before system suspend,
so that it can resume successfully at low temperature.

Change-Id: Ib9ab16558ff69ea80e862473ef9ec6bfa7cd61ad
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-28 14:39:07 +08:00
Finley Xiao
596651a047 soc: rockchip: opp_select: Add rockchip_cpu_suspend_low_temp_adjust()
If support wide temperature, it necessary to set voltage to low temperature
voltage before system suspend, so that it can resume successfully at low
temperature.

Change-Id: Ie6787092c9510788054217bd830b5ae1e4dd6bc2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-28 14:33:33 +08:00
Jianhui Wang
27f039b43a arm64: dts: rockchip: rk3399-sapphire-excavator-edp: modify sound adapter
HDMI sound use i2s2 & dp sound use spdif

Change-Id: Id4ee15d3eb67dad1372f733ecf16182cc6488835
Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
2019-01-25 15:35:13 +08:00
Jianhui Wang
8ea4ee1c3e ASoC: rockchip: cdndp: use spdif for dp output
Change-Id: I23b3e58ad361ad026e836dc19e1f727c350046f1
Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
2019-01-25 15:32:32 +08:00
Jianhui Wang
b104ddfbbe ASoC: rockchip: cdndp: add support for 176.4k & 192k
Change-Id: I5881829fe29729784d1f16d918f932062664b961
Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
2019-01-25 15:31:50 +08:00
Wenlong Zhuang
5fb2a5cdd2 media/cif: ignore CSI error interrupt when CSI HOST work on DSI RX mode
Only remain PHY error and crc error interrupt.

Change-Id: I8b2690e25c76728c7d3356d9ae69719b56754b55
Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
2019-01-25 14:21:21 +08:00
Elaine Zhang
aa34d0fe71 clk: rockchip: Modify uart frac divider rule
Because uart does not have high requirements
for the clk Jitter, the fractional frequency
divider does not need to meet the 20-fold relationship.
(If uart clk rate < 24M,Use 24M as the fractional
clock source.)

Change-Id: I3f55f8a4ba5dc4c950c2742dc914c41e7b6e4ee6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-25 14:12:36 +08:00
Elaine Zhang
49c8309d05 clk: fractional-divider: Improve fractional divider jitter
Numerator is greater than 4,the clk jitter is better.

Change-Id: I9fda9ddeb7b26c6b8559b4126e2ad1d29bb850d1
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-25 14:12:26 +08:00
Jianqun Xu
07e28b187d drm/rockchip: select DEBUG_FS for ROCKCHIP_DRM_DEBUG
ROCKCHIP_DRM_DEBUG will call API from debugfs, need to select DEBUG_FS.

Change-Id: I06a7c7c2ce9179796e551727fdd2e08313bfe6ff
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-01-24 15:40:25 +08:00
David Wu
b24c62307b iio: adc: rockchip_saradc: Just get referenced voltage once at probe
The referenced voltage is not changed after initiation, so just only
get referenced voltage once.

Change-Id: I1eeab03f68855fafe010db328ec7bbcfa7d52310
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-01-24 15:40:04 +08:00
Yiqing Zeng
5c9731114e media: soc_camera: add camera sensor sc2232
Change-Id: I26e8291d5fd779d7c8cda80921d21aa57d000aac
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
2019-01-24 15:39:37 +08:00
Cai YiWei
d899b036e2 media: rockchip: isp1: del nonsupport yuv format
from isp specification, only semi-planar with
uv swap.

Change-Id: I3fc713cd6cbab1e12a94d7b8144d7d43a6de5530
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-01-24 14:49:26 +08:00
Cai YiWei
2c61995140 media: rockchip: isp1: fix sp rgb output format
sp rgb888 format is bgrx 32bit in memory, change to BGRX.
sp rgb666 format is 2bit unused + 6bit data as b/g/r,
append 1bits unused, 32bit in memory, no V4L2 format
apply to it, so delete it.

Change-Id: Iff8c2e560030d76b26d81faff19a3bd49ca33643
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-01-24 14:49:15 +08:00
Cai YiWei
ac0c5d3dc3 media: i2c: gc2145 add mipi interface
Change-Id: Ie7ee430c6d34b935f1e9e270d50b2a42b726ef1a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-01-24 14:49:02 +08:00
Cai YiWei
5c6258197f media: i2c: imx323 change to low 10bit output
Change-Id: I053b15f7dc0bd3ca393957d6d23f91752392cb7d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-01-24 14:48:36 +08:00
Cai YiWei
89c354e3b7 media: rockchip: isp1: fix dvp data width config
Change-Id: If90968fbae78fadaf99d68766606143f1f4f2208
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-01-24 14:48:36 +08:00
zack.zeng
7b1fb3919b media: soc_camera: add mono sensor sc031gs
Change-Id: I6b3e376d905895ad9fef4364184b201da5f873cc
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
2019-01-24 14:47:38 +08:00
Hu Kejun
f944fd08f6 media: rk-isp10: add api mutex for multi-thread app
Change-Id: If2f8600a5f6cdf57bc3859b81a68539bb2d05a84
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-01-24 14:28:44 +08:00
Hu Kejun
60edcb0765 media: rk-isp10: add control for clear exposure list
Change-Id: I57aae7bfcf54d0055b63824fb608e6beb621e974
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-01-24 14:28:30 +08:00
Zhen Chen
bf14d07061 arm64: dts: rockchip: add 'gpu_power_model' feature with DDK r14 for linux
Since the mali.ko is *not* upgraded by userspace, rk3399 linux hope keep
mali driver version is the same with userspace.

Change-Id: Id5af615f1f7b0c95587bc5faeeeff35251797e1a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-01-24 14:14:16 +08:00
Zhen Chen
7a480b63d7 arm64: configs: rockchip_linux_defconfig: add CONFIG_MALI_MIDGARD_FOR_LINUX back
In addition, enable CONFIG_MALI_MIDGARD and disable CONFIG_MALI_BIFROST
for rk3399.
Linux devices of rk3326 or px30 have their own defconfig files,
unlike Android devices.

Change-Id: I8bd8c10fad78f5a6a83d1fdd9e99850dda49ac47
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-01-24 14:14:16 +08:00
Zhen Chen
0af9a0968c MALI: rockchip: restore midgard_for_linux/, device driver under it is on DDK r14
The process to get current source code under midgard_for_linux/ :
1. On the status of commit 18166b65,
	revert commit "91842c9 MALI: rockchip: upgrade midgard DDK to r18p0-01rel0",
	which upgraded drivers/gpu/arm/midgard/ from DDK r14 to r18.
2. copy directory drivers/gpu/arm/midgard/ to drivers/gpu/arm/midgard_for_linux/.

It's ensured that changes of commits in drivers/gpu/arm/midgard/
from RK power management group early than commit 18166b65
are correspondingly remained in current drivers/gpu/arm/midgard_for_linux/.

Change-Id: I41463a8c160e5d25365d6872eef1049de4a317fb
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-01-24 14:14:16 +08:00
Wyon Bi
c3cbe0b00e ARM: dts: rockchip: rk3288-evb-android-rk808-edp: Remove unused property
Change-Id: I4c38e5b51b7f6d98e59e4eebd3722c070aad1f2d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-24 14:05:29 +08:00
Xing Zheng
0017828bbc dt-bindings: sound: rk3308_codec: add 'rockchip,internal-micbias' property
Change-Id: I3a9f528f07386394e397e3be6701221ce62f31d9
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-01-24 09:12:19 +08:00
Xing Zheng
c010707ce1 ASoC: rk3308_codec: handle micbias and optimize codec power
Change-Id: I0e21dac2b89230250b70de217afc28447501a906
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-01-24 09:12:19 +08:00
Finley Xiao
1b7c3fcb5b arm64: dts: rockchip: rk3399pro: Add vop-pn-msch-readlatency for dmc
Change-Id: I1a13a9c5c6d861ec419ca4db41bc3058b15e9051
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-23 18:40:06 +08:00
Finley Xiao
b5d345b2e8 PM / devfreq: rockchip_dmc: Change readlatency according to plane number
Change-Id: Ie0340c80c693c86fed90a155104cf2f8ca6ce16e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-23 18:39:42 +08:00
Finley Xiao
85115a5899 PM / devfreq: rockchip_dmc: Implement rk3399_set_msch_readlatency()
The ATF must contain the following commit:
cd61876e275e ("plat: rk3399: ddr: add support adjust noc read latency")

Change-Id: I322f8c9d454fb1234b042438c85521275ceda4bc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-23 18:39:16 +08:00
Finley Xiao
65848fcd25 drm/rockchip: vop: Add support to calculate plane number
Change-Id: I9bad1743d5965724d403a27dc5e27ec28d872815
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-01-23 18:38:55 +08:00
Shunqian Zheng
99797bc22a arm64: dts: rockchip: add robot dts for rk3326 with/-out gpu
Change-Id: I5fd2fad0d14b24dfaa1f90de7b554496495140cd
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-01-23 14:08:18 +08:00
Shunqian Zheng
91de9561f4 arm64: configs: add rk3326 defconfig for robot boards
Change-Id: Ic39bb0f95d5173caafc6ec167588362d425df700
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-01-23 14:05:59 +08:00
Shunqian Zheng
68546583a4 arm64: dts: rockchip: add robot dts for px30 with/-out gpu
Change-Id: Idb68ad9e4cc981f938fc5460f77c5bb2183046d8
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-01-23 14:05:41 +08:00
Caesar Wang
07a50840fe ARM64: config: enable rga2 for rockchip_linux_defconfig
Change-Id: I7d73f9f9ec6dc34786d92d51200d54c32bdd4b8f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-01-23 14:03:27 +08:00
Caesar Wang
790521ed70 arm64: dts: rockchip: add rk3399pro evb v11 DTS for linux
Evb is part of a family of boards called rk3399pro. As best as possible, the
properties shared by the rk3399pro family are placed in rk3399pro.dtsi, while
Evb-linux specific bits are in rk3399pro-evb-v11-linux.dts. This does not add full
support for the base Evb board.

Working and tested (to some extent):
    * cluster cpu/gpu support -- including frequency, performance
    * UART / console
    * Thermal
    * Touchscreen
    * EDP
    * Wifi
    * Bluetooth / Webcam
    * SD card
    * eMMC
    * USB2/USB3
    * Backlight
    * DVFS: included cpu/gpu/ddr
    * CAMERA: had tested the ov13850 camera
    * VIDEO: tested the h264 video source
    * AUDIO: play and mic music
    * NPU
    * HDMI
    * GMAC
    Not tested:
    * Pcie
    * MIPI
    Not working:
    * SD CARD: no sure, maybe the board sd card is broken by hardware.

Change-Id: I0c17880f69956cae38d1c83467dd946e7b5de058
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-01-23 14:03:27 +08:00
Caesar Wang
b6f547bdcd arm64: dts: rockchip: add rk3399pro evb v10 board support for linux
Added this patch to support the v10 board before, as the most people used
the rk3399pro v11 board for now.

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

Change-Id: I6da3edd89e2d85fc75e519ef931727903991c6b7
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-01-23 14:03:27 +08:00
Wyon Bi
35c77451c5 Revert "drm/bridge: analogix_dp: Fix unbalanced phy_power_on"
This reverts commit e82ecb98b4.

Change-Id: Ice373a612fdd7fa457ca0ce18026128b83edcc1f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-23 11:35:18 +08:00
Shunqian Zheng
2847572fdb arm64: dts: rockchip: add robot dtsi for px30 & rk3326
With minimal interfaces, the robot dts can with or without
gpu enabled, running in bad thermal environment.

Change-Id: Ia7f65941d932e88c33ef33f0d7877efa6a444852
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-01-23 11:27:48 +08:00
Shunqian Zheng
0842ad011a arm64: configs: add px30 defconfig for robot boards
The robot defconfig is for cpu-intensive, w/o displays and
only minimal interfaces are enabled.

Change-Id: I08c11b4eaf1d4bc8b23470643beaab7487bafb3a
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-01-23 11:27:29 +08:00
Elaine Zhang
4ea26dfab6 arm64: dts: rockchip: rk3368: Add armclkl/b clk init
Change-Id: I1b62e8075e2567b67468e44114193c4929b8ed61
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-22 17:01:34 +08:00
William Wu
a94285268a usb: xhci: fix issues introduced by enable TRB ENT
This patch fixes two bugs introduced by commit c0bd48bb3e
("usb: xhci: set xhci trb ent quirk based on platform data").

1. Connect with VFAT USB 3.0 disk, do "mount" command cause
   the error log:

   usb 8-1: reset SuperSpeed USB device number 2 using xhci-hcd
   sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
   sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 0d a9 00 00 f0 00
   blk_update_request: I/O error, dev sda, sector 3497

2. Connect with USB 3.0 disks which support UAS mode, mount
   fail with the error log:

   xhci-hcd xhci-hcd.12.auto: ERROR Transfer event for disabled endpoint slot 1 ep 7 or incorrect stream ring
   xhci-hcd xhci-hcd.12.auto: @00000000f704d1c0 00000000 00000000 0a000000 01088000
   sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT
   sd 0:0:0:0: [sda] tag#1 CDB: Write(10) 2a 00 00 60 08 06 00 00 02 00
   sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT
   sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 00 08 16 00 00 02 00
   scsi host0: uas_eh_bus_reset_handler start
   xhci-hcd xhci-hcd.12.auto: ERROR Transfer event for disabled endpoint slot 1 ep 4 or incorrect stream ring

It's because that in the above two cases, the transfer length
of the first TRB in the URB maybe not an integer multiple of
the EP maxpacket, and if we enable the ENT flag in the any
TRB of the URB, it will cause xHCI babble error.

This patch avoids to enable the ENT flag if the transfer
length of the first TRB isn't an integer multiple of the
EP maxpacket, or if the EP support bulk streaming protocol.

Fixes: c0bd48bb3e ("usb: xhci: set xhci trb ent quirk based on platform data")
Change-Id: I07fef2903bd1024f6e5aa1e253cb86f538083e31
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-22 14:07:54 +08:00
Sandy Huang
afb13c8c81 media/i2c: virtual-camera: add more frequency
add 4096x2048 for 512 pixel align
add 5760x1080 equal to rgb888 1920*3 x 1080

Change-Id: I03e9ecc77524fe27b1b17608458c14d368e14ad8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-01-22 10:47:31 +08:00