Commit Graph

608874 Commits

Author SHA1 Message Date
Tao Huang
62192d322e rk: rm include/linux/rockchip/pmu.h
Change-Id: I4825dd50a5a69555da4cb6f0762f192c8df57885
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-08 12:11:45 +08:00
Tao Huang
a3a5aa0cf6 soc: rockchip: power-domain: add pm_domains.h
Change-Id: I889a7da10605e70af635e8b7fac26bf26fe6506f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-08 12:11:45 +08:00
Tao Huang
8f26c30ca3 soc: rockchip: system-status: include rockchip-system-status.h
Fix the following warning(s):
drivers/soc/rockchip/rockchip-system-status.c:24:5: warning: no previous prototype for rockchip_register_system_status_notifier [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip-system-status.c:31:5: warning: no previous prototype for rockchip_unregister_system_status_notifier [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip-system-status.c:46:6: warning: no previous prototype for rockchip_set_system_status [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip-system-status.c:70:6: warning: no previous prototype for rockchip_clear_system_status [-Wmissing-prototypes]
drivers/soc/rockchip/rockchip-system-status.c:98:15: warning: no previous prototype for rockchip_get_system_status [-Wmissing-prototypes]

Change-Id: Ic3fb19a4a23f8f6c6833a7ebc573617c372d51bd
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-07 21:02:51 +08:00
Sandy Huang
e5a28d253f drm/rockchip: fix compile warning
warning: no previous prototype for xxx [-Wmissing-prototypes]

Change-Id: I81eeedab887e4a21133510bce81269fb0b337ab1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-05-07 19:33:17 +08:00
Xing Zheng
316be12901 ASoC: rk3308_codec: fix the missing device_unregister
We need unreigster device when we remove platform or
probe failed.

Change-Id: Ic43a9fcc540b404cee119c17c543d509b121e126
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-07 18:56:15 +08:00
Xing Zheng
40c3dcb7aa ASoC: rockchip: add rockchip,mclk-fs description for multicodecs
Change-Id: Icdd9098a90b694f0a1edab94d80ceeee1946f7b2
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-07 18:55:54 +08:00
Xing Zheng
846c569668 arm64: dts: rockchip: rk3308-evb-amic-v10: add rockchip,mclk-fs is 256
Change-Id: Ib0f65c705e5fb4de7c9a94312c298bb8b33e5435
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-07 18:55:14 +08:00
Xing Zheng
beafee85e0 ASoC: rockchip: multicodecs: fix the excessive mclk_fs
Usually, the MCLK should be 256 times that of LRCLK,
the excessive mclk (@FS 16KHz and mclk 12.288MHz) may
cause frequency aliasing.

Change-Id: I2665c44dfcdfb51cc4708427782eb68b897c52c4
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-07 18:54:49 +08:00
Chris Zhong
121bd73bed drm: rockchip: cdn-dp: fixup the warning message of compiler
Change-Id: Ib7b984f6bae7519f1c8c3203cf5a4638e5ce2389
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2018-05-07 16:39:22 +08:00
Zheng Yang
3fe574630c drm/rockchip: inno-hdmi: fix compile warning
drivers/gpu/drm/rockchip/inno_hdmi.c:767:5: warning: no previous
prototype for ‘inno_hdmi_audio_config_set’ [-Wmissing-prototypes]

Change-Id: I08596452ee4c4f63afc644d6808c2bb955f643ea
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-05-07 16:28:13 +08:00
Stephen Boyd
ccbd69f97a UPSTREAM: clk: rockchip: Mark rockchip_fractional_approximation static
Silence the sparse warning

clk/rockchip/clk.c:172:6: warning: symbol 'rockchip_fractional_approximation' was not declared. Should it be static?

Cc: Elaine Zhang <zhangqing@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 1dfcfa721f)

Change-Id: I545f079ff61c6b65363442484cdedd9e01333160
2018-05-07 15:42:23 +08:00
Algea Cao
4a150abd5d drm/bridge: rk1000: Get rk1000 tve preferred mode from dts
Change-Id: I5eeba20ff9a26cc23ee96435dddbc84d6811252c
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-05-07 14:52:25 +08:00
David Wu
7e0f993c89 dts: rockchip: Set pwm pin pull down when used for negative pwm regulator
As a second global reset, the GRF is not reset, the iomux and
pull of PWM pin is still keeping, but PWM controller is reset,
PWM pin goes into input mode. However, the pull is still none
changed in kernel, which can cause voltage problems, so should
always keep the PWM pin pull down mode, with 0~50 μA power
increase.

Change-Id: Ibbb9465f7c550d49d416bc3438c5199434df6eba
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-07 14:52:01 +08:00
Shawn Lin
cda34cc0e4 BACKPORT: FROMLIST: mmc: core: Add tunable delay before detecting card after card is inserted
Allow to use tunable delay before detecting card after card is inserted,
which either comes from firmware node, or comes from debounce value
passed on to mmc_gpiod_request_cd(). If the platform doesn't support
debounce, then we fall back to use the debounce period as the delay,
otherwise, it behaves the same as before that a HW debounce(if set) plus
a 200ms hardcode delay before detecting the card.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Change-Id: Ib3ed4cbcdeb0986b584d7dc9057461888e554967
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from commit 26288b77fd04ea54a84801b1c92c8da519986040
of https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git)
2018-05-07 14:22:45 +08:00
Shawn Lin
d6e7df40b5 FROMLIST: mmc: dt-bindings: Add optional cd-debounce-delay-ms
cd-gpios uses a fixed delay, 200ms, before detecting card after the card
is inserted. 200ms doesn't work for some platforms, so some host drivers
added their own properties for parsing that from DT, for instance,
dw_mmc and pxamci. That being said, it should also be tunable when using
cd-gpios.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Change-Id: I925ff27e7dca1289e3fca610ebfe0d4434ceb3de
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from commit 9bc0607301adeb78884bbdc6e97991f4437fb0fe
of https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git)
2018-05-07 14:22:39 +08:00
Sugar Zhang
182e72a4db ASoC: rockchip: pdm: optimize clear logic
Change-Id: I5d0062345a175942b82a5c6f4ee4e58a3abc655e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-07 14:07:24 +08:00
Yifeng Zhao
1780f2afbd drivers: rk_nand: fix SPOR data lost issue
Suddenly power loss test for F2FS file system,data will be
lost and the file system count not mount.
bug:
[    6.372692] F2FS-fs (rknand_userdata): Found nat_bits in checkpoint
[    6.563942] F2FS-fs (rknand_userdata): Failed to read root inode
[    6.607687] F2FS-fs (rknand_userdata): Found nat_bits in checkpoint
[    6.799042] F2FS-fs (rknand_userdata): Failed to read root inode

Change-Id: Ie3256631eba4388cef9edec31aea12bfd45bf4d4
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-05-07 09:31:17 +08:00
Tao Huang
57da81b29f PM / devfreq: rockchip_dmc: make rockchip_find_video_info static
Change-Id: I13eb60038410592dc1eab14cf3db8f30d01fc56b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-04 20:11:48 +08:00
Bin Yang
7cccd28135 input: touchscreen: gslx680: compatible with more TP
Each product needs to create a new driver code, even if
they are using the same TP chip. This creates a lot of
code redundant.

Change-Id: I3d7d9982d98deba0ea4067c9adb76fe2a09ab659
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2018-05-04 20:09:36 +08:00
Elaine Zhang
0984fde1d7 soc: rockchip: power-domain: add panic when wait status timeout
Change-Id: Ic0ce83068091313942f9277ba56abffa525da1d2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-04 19:13:15 +08:00
Randy Li
8373cf713d clk: rockchip: rk3036: export the sfc clocks
The serial Flash controller on the rk3036 would request
two clock nodes.

Change-Id: Iaa50c4a25602a68241b0b9b2f186e4c7e55bc3da
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-05-04 19:12:31 +08:00
Binyuan Lan
8a4fa02d9d arm64: dts: rockchip: Enable dmc for rk3326-evb-ai-va
Change-Id: I83ff4a926aef6b11107b9a3723a425bb450b8b9e
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-05-04 19:11:37 +08:00
Sugar Zhang
3e49f3aec4 arm64: dts: rockchip: px30: fixup i2s0 node
Change-Id: Ibf4f59d2f85dad9e7343d9d02c723891a5b7adbd
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-04 15:53:40 +08:00
Tao Huang
2d32260be1 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: Ia05e25f8c7e9675260e5417bce503937ce0cea2f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-04 14:01:48 +08:00
Joseph Chen
e6d758f352 soc: rockchip: fiq debugger: rename notify callbacks
1. rename callbacks to make them more clearly to be understood;
2. add description for intention;

Change-Id: Ic0e28aa98793495c01f531331e9d5dc816ee0820
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-05-04 13:53:43 +08:00
shengfei Xu
daa327cbb0 power: rk817-battery: improve the storage accuracy of dsoc
The save dosc accuracy is not enough to cause the display soc
to be reduced by 1 when system reboot.

Change-Id: Iefd29a0ce16b9975be3d90260d1793ba322db303
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-05-04 11:49:00 +08:00
Zhou weixin
dfb23b6072 arm64: dts: rockchip: disable kpti for px30
The cpu will block if the CONFIG_RANDOMIZE_BASE\rockchip-dmc\kpti
are enabled, and the kpti will reduced system performance.

Change-Id: Icd054a4a9cbbea20bd8f8c33a6db64c6fd304fd0
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-05-04 11:48:13 +08:00
Yu YongZhen
418662ad19 arm64: dts: rockchip: rk3308-evb-amic-v10: fix is31fl3236 reg to 0x3f
Change-Id: I961f0fab7c6af8e357bb95c7d30ca2e9f5702f90
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2018-05-03 20:42:13 +08:00
XiaoDong Huang
3a13a2ae52 arm64: dts: rockchip: px30: disable cpu CLUSTER_SLEEP
Change-Id: I240d47f2c8f665af9d2b4c0cc87bf70ecd420bc4
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-05-03 19:54:45 +08:00
Tony Xie
c71109b38b arm64: configs: rockchip_defconfig: enable CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ
Change-Id: I37ff6d6a689f74f907500f3611e5e0c8107b7d56
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-05-03 19:54:14 +08:00
Tony Xie
486b994199 arm64: dts: rockchip: add soc_bus support for px30.
Change-Id: I22c0865b2624c43e2b338dd055c266b4562c8213
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-05-03 19:53:51 +08:00
Tony Xie
b66148ef0d PM / devfreq: rockchip_bus: support soc bus devfreq.
Change-Id: Iba750d4522b99e88c16c8e4a77d3367fbb2a0d82
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-05-03 19:53:43 +08:00
Cliff Chen
501046621d crypto: fix NEON bit sliced AES decryption error
The Neon bit sliced AES decryption store the key schedule in BS_KEY struct,
it introduces a competitive risk,such as dm-crypt without samecpu option.
So backport from linux stable version 4.14.13.

Change-Id: I8c728669ae626f56b38c24ed391aa3078a60f623
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
2018-05-03 15:18:59 +08:00
Sugar Zhang
015775bc79 clk: rockchip: rk3308: fixup clk_audio_src
Change-Id: I83cc0f1260e101681746c3847e1ec046d596fd7c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-03 11:56:00 +08:00
Xing Zheng
cfb4b8e9b2 ASoC: rk3308_codec: fix the incorrect description for ADC1/ADC2
From the broken spec from vendor, the PGA GAIN description
for MIC-IN should be like this:
 * 0x0 - MIC1~MIC8 0dB
 * 0x1 - MIC1~MIC2 are invalid, MIC3~MIC8 6.6dB
 * 0x2 - MIC1~MIC2 are invalid, MIC3~MIC8 13dB
 * 0x3 - MIC1~MIC8 20dB

Therefore, we need to update the MIC-INs dapm controls:

- MIC1 / MIC2:
numid=25,iface=MIXER,name='ADC MIC Group 0 Left Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
  : values=0
  | dBrange-
    rangemin=0,,rangemax=0
      | dBminmax-min=0.00dB,max=0.00dB
    rangemin=3,,rangemax=3
      | dBminmax-min=20.00dB,max=20.00dB

- MIC3 ~ MIC8:
numid=27,iface=MIXER,name='ADC MIC Group 1 Left Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
  : values=0
  | dBrange-
    rangemin=0,,rangemax=0
      | dBminmax-min=0.00dB,max=0.00dB
    rangemin=1,,rangemax=1
      | dBminmax-min=6.60dB,max=6.60dB
    rangemin=2,,rangemax=2
      | dBminmax-min=13.00dB,max=13.00dB
    rangemin=3,,rangemax=3
      | dBminmax-min=20.00dB,max=20.00dB

Change-Id: I977179fdf33d6bb7e27708baef37cc308c3d0a71
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-03 10:52:36 +08:00
Tony Xie
686e6dfc50 regulator: rk808: DCDC_REG5 registers early.
If a regulator is supplied by the DCDC_REG5, and the regulator registers
behind the DCDC_REG5, then some devices can not have the regulator_get()
because the regulator has not get its suplly. The case happen in
rdev_init_debugfs() typically.

Change-Id: I02e336ad97e956c53351ca18af6c651126b3149d
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-05-03 10:51:53 +08:00
David Wu
ffc12e054c i2c: rk3x: Add "suspended" flag to forbid access I2C bus during suspend/resume noirq
Add "suspended" flag in suspend_noirq()/resume_noirq() callback
to prevent new i2c job started, and use i2c_lock_adapter() to wait
for current i2c transfer finished.

If any i2c client try to access I2C after suspend_noirq() or
before resume_noirq() callback, return the error, and they
should fix it, not to start i2c access at this moment.

Change-Id: Idd1142058d10547d085895a498201c2ade6b9e96
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-03 09:53:01 +08:00
chenzhen
91842c9d8b MALI: rockchip: upgrade midgard DDK to r18p0-01rel0
with following modifications :
	fix some compile errors when ARCH=arm;
	replace "mali_base" with "midgard_base" in Kbuild files;
	fix a compile error when MALI_PWRSOFT_765 enabled;
	set "default n" for MALI_KUTF and MALI_IRQ_LATENCY.

Change-Id: I858c72aab939002c8e6241cd75fa8877ebbf6c35
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-05-02 20:32:05 +08:00
Sugar Zhang
17138ba258 arm64: dts: rockchip: rk3308-evb-dmic-pdm-v10: add pdm-vad sound
Change-Id: Ideed6aa1961396206ba7b55fcbcdd392d59e92e4
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-02 19:51:17 +08:00
Sugar Zhang
d25bfd1af9 arm64: dts: rockchip: rk3308-evb-dmic-i2s-v10: add i2s-vad sound
Change-Id: I52f0312327547827a6bd72f68f5ba98cbe3abc83
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-02 17:48:11 +08:00
Sugar Zhang
a260f656a4 ASoC: rockchip: pdm: add default regs
Change-Id: I0453d04c035b8b6d6f084b5bac434ada64ea6e73
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-02 17:46:44 +08:00
Sugar Zhang
a8affcb419 ASoC: rockchip: vad: fixup total channel num
Change-Id: I88fcde558d48d39d8ea75ac564e1f9fcd8588efd
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-02 17:46:44 +08:00
Finley Xiao
4f2a3c9ff9 regulator: core: Update voltage only when other consumer set min_uV or max_uV
Change-Id: I95655978680610d47b8078a5f9c2fd8794f478b2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-05-02 17:45:31 +08:00
Algea Cao
7690fe3886 drm/rockchip: tve: Get tve preferred mode from dts
Change-Id: I597328fd9a02ffd774d452497ae378c9d8204a21
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-05-02 14:19:32 +08:00
Sugar Zhang
c917c8e6c2 arm64: dts: rockchip: rk3308-evb-amic-v10: add vad-acodec sound
Change-Id: Ic1c82db03d6e0fe3e0f7caf52717879f80e0eefc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-28 21:20:19 +08:00
Sugar Zhang
162ecad769 arm64: dts: rockchip: rk3308-evb-v10: add alias for acodec sound
Change-Id: I895c490f419760a176af993867106af7faf73b3d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-28 21:20:05 +08:00
Sugar Zhang
694fdd8cba ALSA: pcm: add support for vad
Change-Id: I092ee1fb4b5e8c621cc00fc5c57a147eec23ea08
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-28 21:19:28 +08:00
Sugar Zhang
2372a65091 arm64: configs: rk3308_linux_defconfig: enable vad
Change-Id: I6ae2c80e5c83a02929f8fecacad98274389605ee
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-28 21:00:59 +08:00
Sugar Zhang
dc6319ec6f arm64: dts: rockchip: rk3308: remove unused property for vad
Change-Id: I37c48be7c47834a0157be5a5136cf691e0301bcb
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-28 21:00:44 +08:00
Sugar Zhang
f9cbc2829b ASoC: rockchip: add support for vad
This patch add support for rockchip voice activity detection.
The vad is used to detect the amplitude of voice which is
received by analog mic, i2s digital mic or pdm digital mic
when soc is in low power mode. if the amplitude of voice is
over threshold, the vad will assert interrupt to wake up soc,
then soc will exit low power mode.

Change-Id: Idb7a3adb87ec4c07274eefd82da4672d493c7627
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-28 21:00:38 +08:00