Commit Graph

609902 Commits

Author SHA1 Message Date
Ziyuan Xu
ff91a5dc43 pwm: pwm-rockchip-i2s: initialize the dma_slave_config to zero
Fixes: ddd2e87ad41e("dmaengine: pl330: add support for interlace size config")

Change-Id: I685d911f41f4654792a0b8cdecf29f928e938656
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-06-27 11:17:33 +08:00
Zhangbin Tong
370c79d9ff arm64: rockchip_linux_defconfig: enable CONFIG_SND_PROC_FS
Change-Id: Ie7b6dda20c004aedfb3c4ef5d03c10a8c8f945b5
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-06-27 11:04:46 +08:00
Tao Huang
125fc59fee arm64: rockchip_linux_defconfig: update by savedefconfig
Change-Id: I5cf3067fed0638c9467542e068f24036347a6c7b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-06-27 11:03:45 +08:00
Nickey Yang
5c71c6f8a6 ARM: rockchip_linux_defconfig: Add PVTM support
Change-Id: I64fcb29936c2d6189c27579ba944f68378293e38
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-06-27 10:34:05 +08:00
Andy Yan
23c2ba084d Use standard lz4 format for Image.lz4 on ARM64
The lz4 Legacy format(which specified by -l) is
not supported by U-Boot.

Change-Id: I6b94881117b59384daca4efd796c933e8dc9e5a6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-06-27 10:33:16 +08:00
zain wang
851673a7f3 arm64: dts: rockchip: add fastboot mode for rk3308
Enable fastboot when reboot command with fastboot.

Change-Id: I6a00700a014d5bd04eaf4980779bf89edc352426
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-06-27 10:24:30 +08:00
Huibin Hong
c877ff73ec serial: 8250: reset uart when set baud rate
If external device sends data continuously, then uart is
always busy, and baud rate can't be set. It is useful
to reset uart and set loop back mode to make sure it is
idle.

Change-Id: I87286711870ff685ea29e36e61c97d45be5a6d08
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-06-27 10:18:54 +08:00
Finley Xiao
79096fa6e0 clk: rockchip: rk3308: Make sclk_ddrc critical
Change-Id: I1bf8ae0677c90fa725ecb6f3ab88f12483377fd9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-26 16:09:41 +08:00
Sugar Zhang
08725d4ae9 ASoC: rockchip: multi_dais_pcm: refine dma slave config
This patch refine dma slave config only when interlace size is valid.

Change-Id: If02cec29083d5f582ccd0efcd78e7a6547d2df66
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-26 14:17:48 +08:00
Sugar Zhang
8be761ecda arm: dts: rockchip: rk3308-voice-module: update compatible for multi-dais
Change-Id: Ic41f660e10d3f296852f68ee44e31d34df7742e8
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-06-26 14:17:03 +08:00
Finley Xiao
03c7f95359 clk: rockchip: half-divider: Use maximal and best divider
The bigger the divider, the better the clock jitter.

Change-Id: I4b4e06c71c2f0bdb0e32422fb42c8d490c3ec4bd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-26 14:07:00 +08:00
Finley Xiao
734b08ee50 clk: rockchip: half-divider: Fix error value when bestdiv is zero
Zero is a valid value for half-divider.

Change-Id: I23aa8afcd391da95396e5d808c3c424f993c66e3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-26 14:07:00 +08:00
Joseph Chen
6ccd9a7567 firmware: rockchip: add last log request interface
Change-Id: I26e37b25d75ac07928f1964f5165e1a2a568ac69
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-06-25 16:03:54 +08:00
Shunqian Zheng
d55e688a4f ARM: dts: rockchip: override codec i2s_clk in rk3128.dtsi
Inside rk3128, the codec connects to i2s_8ch which is different
from the rk3126. This changes the i2s_clk to SCLK_I2S0, the mclk
of i2s_8ch, for rk3128.

Change-Id: I204e46dc2cf2c05bc85ef233b3139af94445ac90
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-06-25 09:40:17 +08:00
Finley Xiao
421e14f3bc clk: rockchip: add a COMPOSITE_DIV_OFFSET clock-type
The div offset of some clocks are different from their mux offset
and the COMPOSITE clock-type require that div and mux offset are
the same, so add a new COMPOSITE_DIV_OFFSET clock-type to handle that.

Change-Id: I7d541e29328f37d2ad806b3b6e5ab35b5513b345
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-25 09:39:24 +08:00
Finley Xiao
ba98e189b6 arm64: dts: rockchip: px30: Change armclk rate to 600MHz
The initial voltage may be too low for 816MHz and it is enough for
600MHz. And as the alternate pll clock of armclk is created when
pmucru driver initialize, so move ARMCLK to pmucru node.

Change-Id: I1f443d55c74e5212a19e42e08b54ec946b4692d6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-06-25 09:34:41 +08:00
Caesar Wang
403e528a22 drm/rockchip: vop: the display be turn off when wakeup
As the vop will turn off the all planes when the system wakeup, that can
avoid the splash screen issues.

But the normal display will be show util the
application is refreshed. That's clearly not sensible.

For now, we can stop dma for turning off vop data.

Change-Id: Ieff151bee7813b978bc3cb65f0457e37dc20bf2c
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-06-22 17:01:54 +08:00
Wenping Zhang
ae2cb0019b ASoC: soc-generic-dmaengine-pcm: fix kernel panic caused by no dma channel.
if there is no dma channel for sound, it will cause kernel panic.
CallTrace:
[    3.051899] Unable to handle kernel NULL pointer dereference at virtual address 00000268
[    3.056756] PC is at dmaengine_pcm_new+0x94/0x268
[    3.057189] LR is at soc_new_pcm+0x394/0x42c
[    3.225565] [<ffffff80088c8b80>] dmaengine_pcm_new+0x94/0x268
[    3.226083] [<ffffff80088c6cf0>] soc_new_pcm+0x394/0x42c
[    3.226568] [<ffffff80088bb6bc>] snd_soc_register_card+0x9cc/0xe78
[    3.227124] [<ffffff80088c733c>] devm_snd_soc_register_card+0x4c/0x88
[    3.227704] [<ffffff80088d4848>] asoc_simple_card_probe+0x3c8/0x3f8
[    3.228274] [<ffffff80084f811c>] platform_drv_probe+0x58/0xa4
[    3.228791] [<ffffff80084f638c>] driver_probe_device+0x118/0x2ac
[    3.229333] [<ffffff80084f666c>] __device_attach_driver+0x88/0x98
[    3.229886] [<ffffff80084f479c>] bus_for_each_drv+0x7c/0xac
[    3.230391] [<ffffff80084f61c0>] __device_attach+0xa4/0x124
[    3.230896] [<ffffff80084f67d8>] device_initial_probe+0x10/0x18
[    3.231425] [<ffffff80084f5820>] bus_probe_device+0x2c/0x8c
[    3.231930] [<ffffff80084f5c94>] deferred_probe_work_func+0x74/0xa0
[    3.232500] [<ffffff80080bac00>] process_one_work+0x228/0x3f4
[    3.233018] [<ffffff80080bb618>] worker_thread+0x304/0x418
[    3.233512] [<ffffff80080bff84>] kthread+0xe8/0xf0
[    3.233944] [<ffffff80080832a0>] ret_from_fork+0x10/0x30

Fixes: 57fae85633 ("ASoC: rockchip: add support for "rockchip,force-iram"")
Change-Id: Ia225ec129d04690fe64a61f15ad6152a71927d27
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2018-06-22 16:45:04 +08:00
Wyon Bi
5a6b1b87d1 drm/rockchip: dsi: Add Turn On/Shutdown Peripheral command support
Change-Id: I93ed400ce7db63928cab06b68954ed085b37cdb2
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-06-22 16:38:56 +08:00
Shunqian Zheng
4f7296c02d ARM: rockchip_linux_defconfig: Add more functions for px3se
This mainly enables rk312x codec and inno mipi dphy.

Note that the ES8396 is used by px3se-evb board, and
SWITCH is required by rk312x codec.

Change-Id: Ie2a0715ba04a073875423329654fe3a77d46965d
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-06-22 16:25:52 +08:00
Shunqian Zheng
eb73f10672 ASoC: rk312x: fix duplicate const
SOC_ENUM_SINGLE_DECL already defined with const, removing
the duplicate const in rk312x_codec.c

Change-Id: I085b1faf99a9ccd3b06e4e642abc1bc43cc8bac7
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-06-22 16:23:04 +08:00
Randy Li
fda925c797 drm/rockchip: enable async page flip configure
We support page flip through the drm atomic helper function.
But if we don't enable it the userspace won't know this
driver has such a capability.

Change-Id: If3689a526ea95235d191c0bbeba89745ae70d9c7
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2018-06-22 16:19:09 +08:00
Yifeng Zhao
911b15f3de drivers: rk_nand: fix update loader fail issue
patch for arm aarch32 and aarch64.

bug: The NAND driver will write data to the wrong address with
2K page size SLC NAND FLASH.

[   14.047987] IDBlockWriteData 100 100
[   14.074717] IDBlockWriteData 100 100 ret= 0
[   14.075091] IdBlockReadData 100 100
[   14.084396] IdBlockReadData 100 100 ret= 0
[   14.084777] write and check error:1 idb=1,offset=86,r=238,w=40238

Change-Id: I2d635d0939edb2b2674c37898d5afd668da2ae5a
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-06-22 16:14:20 +08:00
Yifeng Zhao
3f3c077099 drivers: rk_nand: add full disk for gpt and recovrey
Add full nand disk device for gpt and recovery.
Device path is /dev/block/rknand0 or /dev/rknand0.

Change-Id: If6f52e4fd2b32c55ef4795692c40b6a18d066cb0
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-06-22 16:10:56 +08:00
Sandy Huang
8bc3f8e449 arm64: dts: rockchip: set logo to center display for rk3399-linux
set uboot and kernel logo center display for linux product.

Change-Id: I481432b2719598b5d776eb39c4809c05dfb646b0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-06-22 16:10:25 +08:00
Shunqian Zheng
0fa6eee801 ARM: dts: rockchip: correct px3se codec interrupt number
From the datasheet, the built-in codec interrupt number
should be 64 = 96 - 32.

Change-Id: I8078949fe57ce3c87867a8f2853efba8fce0a634
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-06-22 11:49:15 +08:00
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