Commit Graph

615308 Commits

Author SHA1 Message Date
Xing Zheng
c22df0a44e dt-bindings: sound: rk3308_codec: rename internal-micbias to rockchip,micbias1(2)
Change-Id: I2302100c4b4ebf1e4a38db8a3949c7dcbfaad711
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-02-01 11:51:05 +08:00
Xing Zheng
55aebfa23b ASoC: rk3308_codec: To clairfy micbias1 and micbias2
Change-Id: I38ce7b06ff265213908e45edcda38f146e78a736
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-02-01 11:50:59 +08:00
Xing Zheng
1feeff8758 ASoC: rk3308_codec: Clean up ADC MIC gains
From the TRM, the MIC PGA gains for 8 ADCs:
- version A:
0dB, 20dB
- version B:
0dB, 6.6dB, 13dB, 20dB

Change-Id: I9cf758708ec80afe06340f48a2f71f24654f36fe
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-02-01 11:50:42 +08:00
Xing Zheng
5f13e3c4ea ASoC: rk3308_codec: Clean up the order of enable_micbias by alphabetically
Change-Id: I35cd9fc3e237b5abd6c9a81099b3a35a01f427c0
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-02-01 10:56:39 +08:00
Shengfei Xu
eefa54c0db mfd: rk808: restore the OTP value to POWER_EN register of rk817/rk809
rk817/rk809 must restore the PMIC_POWER_EN OTP value before the system reboot.

Change-Id: I2ccfbb4d47eb41cdcea048111873b6ab85477d64
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-02-01 10:29:53 +08:00
Wyon Bi
e57a003936 ARM: dts: rockchip: rk3288-th804-avb: assign clock parent for DCLK_VOP0 and DCLK_VOP1
Change-Id: Ibfaf29a1f78c0fbfd538dc8bc2bc97075b77849e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-02-01 09:11:52 +08:00
Wyon Bi
466b1dd984 ARM: dts: rockchip: rk3288-evb-android-rk808-edp-avb: assign clock parent for DCLK_VOP0 and DCLK_VOP1
Change-Id: I8712a64b56d7da9033e798e3dbfb435a70972b88
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-02-01 09:11:30 +08:00
Joseph Chen
af6ef89d6f arm64: dts: rockchip: set pwm regulator in default voltage for rk3308k
rk3308k supports wide temperature feature, it makes system suspend
stable in extrem low temperature.

Change-Id: I07427c21263e5a48bc07c935291f8494e50ec9e3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-31 18:32:40 +08:00
Joseph Chen
c57746b0bb dt-bindings: suspend: rk3308: add pwm regulator voltage state configure
Change-Id: I7f90cb93c1bd82def832aa930daa0de4983af90e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-31 18:30:07 +08:00
Wang Panzhenzhuan
0133c23808 ARM: rockchip_defconfig: enable CONFIG_VIDEO_ROCKCHIP_ISP1
Change-Id: I2855147084ae062a030271fd587992e45d43ff60
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-01-31 18:29:46 +08:00
Finley Xiao
b3863a4e19 arm64: dts: rockchip: rk3368: Modify vop-bw-dmc-freq for rk3368-xikp
Change-Id: I38154474748e2e8156bbc76c03cc2efbf9c24e11
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-31 14:24:36 +08:00
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