Commit Graph

609876 Commits

Author SHA1 Message Date
shengfei Xu
ecfd04800a power: rk817_charger: the system voltage can't be shutdown in bat_off mode
Change-Id: I4d2edc98fd6397a09527d500096f29a0b9f068ff
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-06-21 18:14:51 +08:00
YouMin Chen
1cb7b3ece5 arm64: dts: rockchip: px30: disable ddr standby
The function of ddr standby influence memory stability,
so disable it for the present.

Change-Id: I9df7381944687da8819665009b162c387eb06ceb
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-06-21 18:13:54 +08:00
Jeffy Chen
8a675248f2 arm64: dts: rockchip: Add gt1x's power-supply for rk3326 linux evb board
Change-Id: I1c42b6bf1b07d0a5bab8a0d0e8637a9b3270aa6c
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2018-06-21 16:30:07 +08:00
Sugar Zhang
fadcf87091 arm64: dts: rockchip: rk3308-evb-dmic-*.dts: update compatible for multi-dais
Change-Id: I030edcf8dfa78b662715da2aa81de5b4874b8909
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-21 11:29:21 +08:00
Sugar Zhang
8ffa8458c2 arm64: dts: rockchip: rk3308-evb-dmic-i2s-v10: enable vad + 6mic + 2loopback
Change-Id: Ie0524ee215400aa9f1fe57278aa757db9e051d12
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-21 11:29:21 +08:00
Sugar Zhang
9c5bec97cf ASoC: rockchip: multi_dais: add support for rk3308 i2s-16ch
Change-Id: I63ee1e32ebd70348274ca7da153983071f7906c1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-21 11:28:52 +08:00
Sugar Zhang
158dc61454 arm64: dts: rockchip: rk3308-evb-dmic-i2s-v10: add i2s-16ch support
Change-Id: Ia5b6766b4fe3210a75234b3045a8f8e929161f75
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-21 11:09:39 +08:00
William Wu
ce648f5e4c phy: rockchip: rockchip-inno-usb2: check iddig upon resume
Because USB OTG id irq is disabled during system suspend
and enabled after resume, so the usb2 phy doesn't notice
any id status change upon resume. It may cause two issues:

1. Plug in OTG cable and USB device when system enter
   suspend, it will fail to detect the OTG cable and
   USB device after resume.

2. Plug out OTG cable and USB device when system enter
   suspend, and then connect USB to PC or USB charger
   after resume, it will fail to detect USB charge type.

This patch restores the OTG id status before enter suspend,
and check the id status upon resume, and set the extcon
state and vbus if id status has changed.

Change-Id: Iaca14841cc287e7d82e1cffd64ff18bba86d3ba4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-06-21 11:04:01 +08:00
Jeffy Chen
d08b1af4bd input: touchscreen: gt1x: Add missing power on in resume
Add missing power on to pair with the power off in suspend.

Change-Id: I676b57dd8ba9aff108a3b57c4350d272d54ca996
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2018-06-21 10:56:59 +08:00
Jeffy Chen
6bca9742c8 input: touchscreen: gt1x: Fix NULL pointer exception in unbind
We're using devm_regulator_get, no need to put it manually.

Change-Id: Ida960d938d7557d0174c53e952d80161650ccf1a
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2018-06-21 10:56:42 +08:00
Jeffy Chen
141e813a3c input: touchscreen: gt1x: Reuse the original power control flow
The official driver only has vdd_ana regulator, which matches our case:
https://github.com/goodix/gt1x_driver_generic/blob/master/gt1x.c

So remove the extra regulators, and reuse the original vdd_ana.

Change-Id: Ia080344b3871e1c69b77c0f3048f601d57b8610a
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2018-06-21 10:56:29 +08:00
shengfei Xu
88d0096ddc arm64: dts: rockchip: change the parameters of rk817 and rk809
1. ldo default output voltage 1000mV;
2. charger termination adjustment select analog mode

Change-Id: Iaae81c36db3df50738def462c25d34d8508632ae
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-06-21 10:43:41 +08:00
Tao Huang
485221e0b9 rk: scripts: mkbootimg: support header_version and recovery_dtbo
Merge AOSP 26e01bbdc5cb ("Populate recovery DTBO offset correctly")

Change-Id: Icfc8957b5101d86a1c70bd9c6676824aaaeb75e4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-06-21 10:42:52 +08:00
Randy Li
53530082a8 arm64: dts: rockchip: re-order the rk3328 aliase
Making those items in alphabetical order.

Change-Id: I9d2cc45d814107a2bc9e15465b99b88109f23243
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-06-21 10:37:39 +08:00
Randy Li
124869c6ef arm64: dts: rockchip: re-order the rk3308 aliase
Making those items in alphabetical order.

Change-Id: Id1274a7565f853c0f387266a4e5dd5e9dd526963
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-06-21 10:37:06 +08:00
Randy Li
3a5dfc8d9a ARM64: dts: rockchip: re-order the px30 aliases
Making those items in alphabetical order.

Change-Id: I2abb29eaed4b5fc970f46dc382e0e82fbf6062d6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-06-21 10:36:00 +08:00
Randy Li
ec986ff5fb ARM64: dts: rockchip: fix rk3399 device aliases
Enable the alias for ethernet in rk3399 and order the items
in alphabetical order.

Change-Id: I7862593ad99028eba75102fb684987cec8762d1c
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-06-21 10:35:29 +08:00
jesse.huang
df6d3bc190 iommu/rockchip: avoid accessing null pointers
kernel panic log:
[ 6841.591067] rk_iommu ff360480.iommu: Page fault at 0x0000000000001340 of type read
[ 6841.591121] Unable to handle kernel paging request at virtual address ffffffc000000000
[ 6841.592463] pgd = ffffffc013b84000
[ 6841.592774] [ffffffc000000000] *pgd=0000000000000000, *pud=0000000000000000
[ 6841.593410] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[ 6841.593906] Modules linked in: 8822bs
[ 6841.594258] CPU: 0 PID: 29403 Comm: stressapptest Not tainted 4.4.120 #1
[ 6841.594852] Hardware name: Rockchip RK3328 box (DT)
[ 6841.595282] task: ffffffc049310d80 task.stack: ffffffc06160c000
[ 6841.595820] PC is at rk_iommu_irq+0x134/0x380
[ 6841.596207] LR is at rk_iommu_irq+0x104/0x380

Change-Id: I5dcc4616dfe34749561dda75cf5f5d26907c7a16
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2018-06-21 09:15:53 +08:00
Xing Zheng
1461253dc2 ASoC: rockchip: multicodecs: fix hang suspend with acodec and vad
There is only one snd_soc_card instance, the parameters that
include card name are overwritten, so that the DUT will be
hung during suspend that dues to snd_power_wait enter twice
because it find the incorrect node name "/vad-sound":

[   14.129501] snd_power_wait, state: 0x0000, np name: /vad-sound
...
[   14.133063] snd_power_wait, state: 0x0300, np name: /vad-sound

Then the "rockchip,rk3308-vad" has been off (SNDRV_CTL_POWER_D3 0x0300),
and enter endless loop in snd_power_wait().

Therefore, we need create independent snd_soc_cards
for multi-codecs, and find the corrent card name
during suspend:

[    8.939576] snd_power_wait, state: 0x0000, card name: /vad-sound
...
[    8.941472] snd_power_wait, state: 0x0000, card name: /acodec-sound

Change-Id: Id30e25eaa4bf5c39284e32e772dca2e9c3cb96b1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-06-20 17:53:54 +08:00
Xing Zheng
671409fa78 ARM: dts: rockchip: add voice module boards on RK3308
Add 3 types boards for rk3308 voice modules:

// Only core board:
rk3308-voice-module-board-v10-aarch32.dts // only supports 2ch amic

// There are core board + main board:
rk3308-voice-module-amic-mainboard-v10-aarch32.dts // using max 4ch amic
rk3308-voice-module-pdm-mainboard-v10-aarch32.dts // using max 4ch pdm mic

Change-Id: Ieed43dbc246e03a6579da160281f858668841ec4
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-06-20 16:54:46 +08:00
Finley Xiao
99023f3df9 soc: rockchip: opp_select: Add support to limit cpu frequency
Change-Id: I6ac41448bbb031b88cc89d5895068191bd2f2dc8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-20 16:13:20 +08:00
Finley Xiao
6a010ad23e clk: rockchip: Fix rk3036 pll rate overflow calculation on 32-bit
Change-Id: I4e367893e97828b01b3e6ec457714c722d2c0af6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-20 16:12:26 +08:00
Wenping Zhang
0fac823c0e power: bq25700: fix crash issue duaring probe bq25700 driver.
In previous code, driver will update the power supply status before
power_supply_register, so it will cause kernel panic. So we put the
bq25700_power_supply_init before bq25700_init_usb to fix this issue.

Change-Id: Id9d206dbecfdadbd968b5c9d24f85f66ef321b9d
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2018-06-20 15:04:03 +08:00
Jeffy Chen
fd5ebc310b arm64: dts: rockchip: Fix gt1x's indent for rk3326 linux evb board
Change-Id: I2b9e99b46376b9da3cbf3cfd3f1cf16910e7056e
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2018-06-20 10:14:40 +08:00
Jeffy Chen
e0618aeace input: touchscreen: gt1x: Enable GTP_POWER_CTRL_SLEEP
According to gt1x_generic.h, the GTP_POWER_CTRL_SLEEP is for
"turn off power on suspend" case.

And we're turning off TS's power on suspend actually.

Change-Id: I2a8ec852a96beb01d6e4d6cfd4f3e94ef0185608
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2018-06-20 10:14:32 +08:00
Werner Johansson
4ff3c391f0 UPSTREAM: drm/dsi: Add Turn On/Shutdown Peripheral command helpers
The MIPI_DSI_TURN_ON_PERIPHERAL and MIPI_DSI_SHUTDOWN_PERIPHERAL packets
are required for some panels, for example the Panasonic VVX10F034N00.

Change-Id: Ib005eb3e464399a9bb83834d31beff146f56116a
Signed-off-by: Werner Johansson <werner.johansson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 6e8c9e3376)
2018-06-19 17:17:15 +08:00
Wyon Bi
a9b028db37 drm/rockchip: dsi: fix phy power-on sequence
Fixes: 1df398e95a ("drm/rockchip: dsi: fix phy power-on sequence")
Change-Id: I4924cc4104d4e3be5e8b9b5fd52b1fb8d5cfd023
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-19 17:17:04 +08:00
xiaoyao
21dcfd54bc net: wifi: cpyress: fix sleep issue
Change-Id: Ib0dec40fd86e0397a5a17277dfb2aae1489ec189
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2018-06-19 09:34:21 +08:00
zain wang
ad6b6e42a2 mfd: fusb302: Don't ignore UFP_D
Don't ignore UFP_D data, so that we can get
right DP pin cap from DISCOVERY_MODES.

Fix commit 4258959427
mfd: fusb302: add DP UFP_D support

Change-Id: I6a6250d26c1a847c9b75c676b14f47a37bfcc1f9
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-06-19 08:51:10 +08:00
Sugar Zhang
40e877458b ASoC: rockchip: multi_dais: fixup master/slave format
Change-Id: I680035d37144d87bf7f594c4dd0e9222860929ef
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-15 17:06:46 +08:00
chenjh
101dc3fea8 firmware: rockchip_sip: compatible 64-bit ATF works with 32-bit kernel
maily compatible for fiq debugger.

Change-Id: I26cb735fa38997d64c7d080b96d04a29d0146b71
Signed-off-by: chenjh <chenjh@rock-chips.com>
2018-06-15 16:47:38 +08:00
Zhen Chen
e8686e176d MALI: bifrost_for_linux: ipa: make poll_temperature_thread freezable
Change-Id: I378dae2ce5d53a32d90df6bcc29950d61d8924cf
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-06-15 11:53:29 +08:00
Zhen Chen
d26da80d60 MALI: bifrost: ipa: make poll_temperature_thread freezable
Change-Id: I27343b919271be4618687a2311b6bf54e24cefce
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-06-15 11:19:09 +08:00
Elaine Zhang
cd4d3065af clk: rockchip: add support for half divider
The new Rockchip socs have optional half divider,
so we use "branch_half_divider" + "COMPOSITE_NOMUX_HALFDIV \
DIV_HALF \ COMPOSITE_HALFDIV \ CMPOSITE_NOGATE_HALFDIV"
to hook that special divider clock-type into our clock-tree.

Change-Id: I79e3f0e8265ccb6a9839cd83a7a3ee0ca825a020
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-06-15 09:41:09 +08:00
Zhen Chen
e6dda0b9d9 MALI: bifrost_for_linux: add "2EE" in the output of catting sys node "gpuinfo"
Indeed, "2EE" is hardcoded, it's not a good way.
But I could not find a way to get the number of EE(s) at runtime right now.

Change-Id: I15afe580d194c0d8354953fe877ac1d2882826c5
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-06-14 20:42:33 +08:00
Zhen Chen
d0cadf1fc3 MALI: bifrost_for_linux: add recognizing "Mali-G31" for sys node "gpuinfo"
Change-Id: I660f3666e35c59d321698cd10151bc5952be1c1e
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-06-14 20:42:24 +08:00
Xing Zheng
1ee82d86fa ASoC: rk3308_codec: add property 'rockchip,no-deep-low-power'
Change-Id: I22424e3f5198188c8ff1966894ea10ff1f00ab0f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-06-14 10:35:04 +08:00
Xing Zheng
91597a83ea ASoC: rk3308_codec: add support low power mode in runtime
We need to close ADC or DAC mclk if they are not working,
it may reduce a bit of power consumption for runtime.
And, power off and close pclk_acodec during suspend. But
the acodec may be needed by VAD during suspend, we can
use the property 'rockchip,no-deep-low-power' to keep
codec during suspend.

The following is a comparison of power consumption before
and after the modification on RK3308 EVB v10:

[default]       VCC_1V8_CODEC(V*mA=mW)  VCC_3V3_CODEC(V*mA=mW)
idle            1.794*0.9=1.614         3.354*2.8=9.3912    // the ADC and DAC mclk are opened
playback 2ch    1.793*7.9=14.1647       3.354*2.8=9.3912    // the ADC and DAC mclk are opened
capture 8ch     1.789*27.8=49.7342      3.324*2.8=9.3072    // the ADC and DAC mclk are opened
suspend         1.8*0.7=1.26            3.356*2.8=9.3968    // the ADC and DAC mclk are opened

[modified]      VCC_1V8_CODEC(V*mA=mW)  VCC_3V3_CODEC(V*mA=mW)
idle            1.794*0.8=1.4352        3.354*2.8=9.3912    // just close ADC and DAC + close ADC / DAC mclk
playback 2ch    1.793*7.8=13.9854       3.354*2.8=9.3912    // open DAC mclk, close ADC mclk
capture 8ch     1.789*27.7=49.5553      3.323*2.8=9.3044    // open ADC mclk, close DAC mclk
suspend         1.799*1=1.799           3.355*0.3=1.0065    // close 2 micbiases, close mclk tx/rx and pclk_acodec

It seems that the light low power (close ADC and DAC mclk) can't
bring us much help to reduce power (only ~1mA@VCC_1V8_CODEC),
but the deep lower power can help us to reduce ~8mW@VCC_3V3_CODEC
during suspend. However, it's that the power is increased
~0.5mW@VCC_1V8_CODEC in deep low power, it needs to EE's to
help us to check this.

Change-Id: I7982b4e20bcb894e1895f772816b2b188bcc314d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-06-14 10:34:53 +08:00
Yifeng Zhao
a4125a4a82 drivers: rknand: support rk3308
rk3308 has a new nandc, driver need modify to support.

Change-Id: I1b30f5ac106759873cd0a14b6340b49232f5106c
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-06-14 09:31:39 +08:00
Dingqiang Lin
f199655beb drivers: rkflash: add rk_sftl_arm_v7_thumb version
1.Add sftl thumb instruction version lib;
2.Add sftl release data.

Change-Id: I5fa09ada94e7f40a317ca621c3eb1c0abd73847d
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-06-14 09:12:09 +08:00
Dingqiang Lin
ec4385752a drivers: rkflash: remove unused codes
Change-Id: I8938236dfd952342e20ed690bc9b2f6c637027ac
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-06-13 19:31:18 +08:00
Dingqiang Lin
036e7e07a4 arm64: dts: rockchip: add sfc node for rk3308
Change-Id: Ie45bd51d2f56d296a9eadd1dfea5d2a903f29e6c
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-06-13 19:26:12 +08:00
Putin Lee
2ed5e10116 video/rockchip: rga2: Fixup some situation rga will flush null page.
Change-Id: Ie803779eced9524baedf2941d771c9c46edd5a77
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2018-06-13 18:22:23 +08:00
Lihuang
327aa30609 video/rockchip: rga2: Fixup rga2 flush timeout on rk3368.
Change-Id: Ia3c1c83d51c70f9d981bb45dc5c6a8c5e8073995
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2018-06-13 18:21:05 +08:00
Wyon Bi
188c59dc60 drm/rockchip: dsi: enable interrupt function
Change-Id: I5003056c1b7244407310353547f065b13433f3d7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-13 15:24:41 +08:00
Wyon Bi
1df398e95a drm/rockchip: dsi: fix phy power-on sequence
Change-Id: I0ceaedb71776747e8951a75409bcc2521252dd18
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-13 15:24:41 +08:00
Wyon Bi
2c659c75a6 drm/rockchip: dsi: export vendor-specific interface
Change-Id: I8156943179589b7edfeaa486322dfd057d470dea
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-13 15:24:41 +08:00
Wyon Bi
6d5ebad604 drm/rockchip: dsi: fix loader protect for dual-channel mode
Change-Id: I2d5111269393b1eb77f9fccfa28b20fe366ad7d6
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-13 15:24:41 +08:00
Wyon Bi
1e23e1d9ff drm/rockchip: dsi: implement runtime pm to dynamically manage the clock
Change-Id: I7ac757a04b51dded41a9c3f6697bb9390e0e2e5e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-13 15:24:41 +08:00
Wyon Bi
3624c3c987 arm: dts: rockchip: rk3288-th804: Update display clock frequency for panel
Target pixel clock rate for refresh rate @60 Hz
        = (1600 + 35 + 110 + 15) * (2560 + 8 + 12 + 4) * 60
	= 272870400 Hz ~ 272 MHz

Change-Id: Icc26ff98a2d98bdde5093db3dd211846e812069d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-13 14:20:50 +08:00