Commit Graph

608071 Commits

Author SHA1 Message Date
Xing Zheng
103450b92e arm64: dts: rockchip: Add acodec node for rk3308
Change-Id: I76f4a877711d33620bdef295e9047bdba26d4da4
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-03-21 19:47:03 +08:00
Putin Lee
56961708dd ARM: dts: rockchip: enable rga device node for rk3229-evb-android
Change-Id: I6063f701e49d8bb862012028f3584b54be2c6aa7
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2018-03-21 19:43:46 +08:00
Putin Lee
c5b55cfaa7 ARM: dts: rockchip: add rga node for rk322x
Change-Id: I26edff00d84d2368da2d3b9c55b90e386a347003
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2018-03-21 19:43:37 +08:00
Chris Zhong
e9a6000ec5 arm64: dts: rockchip: support rk3308-evb-rev1 board
Change-Id: I4ba8107b667847506d2d5189b83ee434607ae958
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-03-21 16:46:13 +08:00
Meng Dongyang
a23e379ba3 usb: dwc2: set op_state to peripheral when resume
The operation mode of controller will change to peripheral when
resume if PD is power off during suspend, current code disconnect
hcd and set lx state to L3 in this case to make sure the controller
will be reinit in device mode, but that's not enough, the op_state
is still host which is change when init or ID change interrupt
occur. If the ID change happened after suspend the driver would
miss the interrupt, so when the application call the pullup function
to stop gadget and start again to change to another function, the
disconnect gadget operation can't be done and the gadget restart
directly. This will result in NULL point when gadget work. This
patch set op_state to OTG_STATE_B_PERIPHERAL when resume in this
case.

Change-Id: Ifbafb7fae43d634cfa879c9a066d1e114db4196e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-03-21 16:42:50 +08:00
Andy Yan
5f6721903a arm64: configs: add rk3308_linux_defconfig
Change-Id: I53e3fe76ca157904941a3c03b8bdde81625fb6c9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-21 14:20:45 +08:00
Zhou weixin
244f83c3f5 arm64: dts: rockchip: add always-on vccio_sd for uart debug on PX30/RK3326 boards
Change-Id: Ied5cc8f0cc3fb4a00aef3cd14846c2ead0e7a95e
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-03-21 11:26:46 +08:00
Tao Huang
3fa24cc540 Revert "ASoC: rockchip: i2s: protect I2S_XFER_TXS/I2S_XFER_RXS with mutex"
This reverts commit 686662c6f1.

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
in_atomic(): 1, irqs_disabled(): 128, pid: 385, name: FastMixer
2 locks held by FastMixer/385:
 #0:  (snd_pcm_link_rwlock){......}, at: [<ffffff9008f4130c>] snd_pcm_stream_lock+0x5c/0x68
 #1:  (&(&substream->self_group.lock)->rlock){......}, at: [<ffffff9008f41314>] snd_pcm_stream_lock+0x64/0x68
CPU: 4 PID: 385 Comm: FastMixer Not tainted 4.4.120 #4996
Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
Call trace:
[<ffffff900808cf7c>] dump_backtrace+0x0/0x2b4
[<ffffff900808d244>] show_stack+0x14/0x1c
[<ffffff90085670bc>] dump_stack+0xa8/0xd8
[<ffffff90080ead48>] ___might_sleep+0x178/0x17c
[<ffffff90080eae08>] __might_sleep+0xbc/0xd4
[<ffffff900935a6d0>] mutex_lock_nested+0xa4/0x504
[<ffffff9008fa431c>] rockchip_i2s_trigger+0x164/0x3d0
[<ffffff9008f89960>] soc_pcm_trigger+0x188/0x1b8
[<ffffff9008f3df74>] snd_pcm_do_start+0x54/0x68
[<ffffff9008f3ddcc>] snd_pcm_action_single+0x50/0x98
[<ffffff9008f3eafc>] snd_pcm_action+0x50/0x150
[<ffffff9008f49824>] snd_pcm_start+0x20/0x28
[<ffffff9008f4f5e0>] snd_pcm_lib_write1+0x4a4/0x508
[<ffffff9008f4f6d0>] snd_pcm_lib_write+0x8c/0xac
[<ffffff9008f3fd0c>] snd_pcm_ioctl_xferi_compat+0x188/0x35c
[<ffffff9008f49374>] snd_pcm_ioctl_compat+0x32c/0x7bc
[<ffffff90082f2de8>] compat_SyS_ioctl+0x1f4/0x258
[<ffffff90080832f0>] el0_svc_naked+0x24/0x28

Change-Id: Id4ad668bb5b8cdbb79aecc1d00fed200acf0d6da
2018-03-21 10:45:13 +08:00
Xing Zheng
2aec620881 ASoC: rk3308_codec: Add bindings documentation for RK3308 audio codec
Change-Id: I5163dcf9f463ef75120d4c29581f5db3eceb5c1c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-03-21 09:27:44 +08:00
Xing Zheng
b9d0976101 ASoC: codecs: Add RK3308 internal codec driver
This adds support for the RK3308 audio codec.

Change-Id: Ieccdebaa27f4a46f6de9406046a6e02e20398013
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-03-21 09:27:44 +08:00
David Wu
61c942ad00 arm64: dts: rk3308: Add mac node at dtsi level
Change-Id: I6023ccfb6d318ede47693c5fe57a481d641df22e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-20 21:04:16 +08:00
Nickey Yang
525c583992 ARM64: dts: rockchip: remove hdmi-codec node on rk3399-sapphire-excavator-linux and rk3399-videostrong-linux
hdmi_sound is defined in "rk3399-sapphire.dtsi"
So we do not need to define it again.

Change-Id: Ieb7e11240d06d64c82954ee725589b667480a4cc
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-03-20 21:02:36 +08:00
Nickey Yang
52a7c89b37 ARM64: dts: rockchip: add rt5640 related nodes for vs-rk3399
Change-Id: Ief8e698e5ff64a059a07fa1bf5eada87b3bf5a2c
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-03-20 21:00:45 +08:00
Zhou weixin
ac704a8703 drivers/input/touchscreen/gsl3673_800x1280: reduce crrent in sleepmode
Change-Id: Id7da8a686574b539aeedf4da0ea34e1d8ff69831
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-03-20 20:59:15 +08:00
Shawn Lin
acac4351e6 clk: rockchip: Don't set invalid cached phase
We cache the invalid cached phase when the clock provider be
reparented from orphan to its real parent in the first place,
thus we may mess up the initialization of MMC cards since we
only set the default sample phase and drive phase later on.
So we should skip to restore the invalid phase.

Change-Id: I2d995a4ab53b824737718482f35fcaaf84767dfb
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-03-20 20:56:35 +08:00
Shawn Lin
84901c7616 FROMLIST: clk: Don't show the incorrect clock phase
It's found that the clock phase output from clk_summary is
wrong compared to the actual phase reading from the register.

cat /sys/kernel/debug/clk/clk_summary | grep sdio_sample
sdio_sample     0        1        0 50000000          0 -22

It exposes an issue that clk core, clk_core_get_phase, always
returns the cached core->phase which should be either updated
by calling clk_set_phase or directly from the first place the
clk was registered.

When registering the clk, the core->phase getting from ->get_phase()
may return negative value indicating error. This is quite common
since the clk's phase may be highly related to its parent chain,
but it was temporarily orphan when registered, since its parent
chains hadn't be ready at that time, so the clk drivers decide to
return error in this case. However, if no clk_set_phase is called or
maybe the ->set_phase() isn't even implemented, the core->phase would
never be updated. This is wrong, and we should try to update it when
all its parent chains are settled down, like the way of updating clock
rate for that. But it's not deserved to complicate the code now and
just update it anyway when calling clk_core_get_phase, which would be
much simple and enough.

Change-Id: I21e8899f4dc6cb0d244ea8c9741337b17da3308d
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
(cherry picked from git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
commit 1f9c63e8de)
2018-03-20 20:56:19 +08:00
Shawn Lin
6a0dbbc7e1 arm64: dts: rockchip: remove always-on and boot-on from vcc{io}_sd of PX30/RK3326 boards
vccio_sd and vcc_sd are well better controlled by MMC core
and please don't bother taking care of them instead, otherwise
reboot w/ a working SD3.0 card will fail to respond the correct
OCR in the first place as missing a proper power removal.

Change-Id: I9efa11e25198b66e21538bd6603a3bab6638dc5f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-03-20 20:51:03 +08:00
Algea Cao
6ad9ec862c drm/rockchip: tve: get vdac adjust value from efuse
Change-Id: Idf50443557cfc73fb47613027785bbf88e49f567
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-03-20 20:50:19 +08:00
Algea Cao
ef6e3f4cef ARM: dts: rk322x: tve support get dac adjust value
Efuse byte 29 bit 3-7 is used for tve dac.

Change-Id: Ic119b25ae8b74969ff7968d8772f7a008d3c920c
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-03-20 20:50:19 +08:00
Sandy Huang
38a1973ae2 drm/rockchip: 3229 vop: fix mistake fild when in interlace mode
set frame effect to fix mistake fild when in interlace mode

Change-Id: I74143cc28cbd9a7864a1df57979f3888137c141c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 20:46:55 +08:00
Sandy Huang
ac1f715f53 drm/rockchip: vop: fix lb mode config error
when video width is bigger than 3840 the linebuffer mode
should be LB_YUV_3840X5.

Change-Id: I27dce8a6fcb7f6f5b8d196671a515c68f188c101
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 20:46:37 +08:00
Wyon Bi
6ee21b2eae drm/rockchip: vop: Fix bcsh_out_mode register field definitions
Change-Id: I5436d748be938ee5795ce7b3fd49f582fad58bdf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-20 20:46:07 +08:00
Huang jianzhi
cd028dbdac ARM: dts: rockchip: rk3229-evb-android: Modify pwm frequency from 40k to 200k
Change-Id: I53a363b1c54165189fb246ed7030c372786badd2
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2018-03-20 14:36:20 +08:00
Xu Hongfei
710c5332ee camera: rockchip: change gc0312 fps to 20fps for the test of cts/vts
Change-Id: Ic409f1ff0918482367da10cd3d7f07ef957a34b1
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2018-03-20 14:35:57 +08:00
Zheng Yang
41ada5352f phy: rockchip: inno-hdmi: fix vco calculating in recalc_rate
On 32bit platform, vco may be out of range. The variable type
of vco needs to be set to u64.

Change-Id: I2f6b967278986bb77bf74c7a11794fc4d73645db
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-03-20 14:29:43 +08:00
Tao Huang
e07667aa2d usb: bc: Fix compile error when !DWC_OTG_310
Change-Id: I726d459a5e9a7043bc6543fe58fee51b8cc5f034
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-20 14:25:44 +08:00
Sandy Huang
91783f5900 drm/panel: simple: add support spi init screen
Change-Id: I58c77b5042d3a7456b553f369f7a44286472f582
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 14:18:02 +08:00
Sandy Huang
6200d44596 drm/panel: simple: rename dsi panel cmd name
panel init cmds is not only for dsi panel, some mcu screen and
spi screen also need init cmds, so we update this panel init cmd
name and reuse this part logic.

Change-Id: I9e633647fa3f3d92eb90b443a8a5da99a24a3b42
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 14:16:32 +08:00
Liang Chen
78ffe82012 arm64: dts: rockchip: adjust opp-table and IR-Drop for px30/rk3326
Change-Id: I266078b219edc60b27cea547462cad886e3af1bb
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-20 14:16:04 +08:00
Finley Xiao
310a0955e9 clk: rockchip: px30: Make usb480m critical
Gpu 480M is from usb480m and the source clocks should be always on
if change gpu frequency after power off pd.

Change-Id: I11b5b05381e1745919b7137a64e4d334786cf433
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-20 14:14:45 +08:00
Zhang Yunlong
01fc57fe3f soc: rockchip: rk_camera: correct macro definition
Change-Id: Ib7bba62d4f25905e5e42d5f76092eddeb8806ee9
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-03-20 14:13:22 +08:00
Zhang Yunlong
830d9321e7 arm64: dts: rockchip: rk3326-863-lp3-v10: remove dvp regulator 'always-on' property
Change-Id: I3790833144ae17fd5417bfc056d82cf7fe6866e6
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-03-20 14:12:17 +08:00
Zhang Yunlong
cd5d124bba arm64: dts: rockchip: rk3326-863-cif-sensor: config dvp regulator
Change-Id: Ia8a9e6dc71067420b3da2b95ab16706715147001
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-03-20 14:11:57 +08:00
David Wu
e38aa951c8 pwm: rockchip: Make pwm pinctrl setting after pwm enabled
If the PWM pinctrl uses default state, the iomux setting will
be done at probe, the PWM may not be enabled at this moment.
It will make PWM into an intermediate state, destroy the default
hardware state, the PWM is not ready for work yet. So it is better
for doing PWM pinctrl setting after PWM enabled.

Change-Id: Iea34a7baf6a4d7df0c631f7f4fdab5b9d61bbd5f
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-19 16:30:38 +08:00
Finley Xiao
f636c5450a arm: dts: rk3228: Assign aclk_vop to 400MHz
Change-Id: I044cd80e47f460dc4ec419e6f9627b0f48d867b9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-19 15:48:14 +08:00
Finley Xiao
2bcdca5264 arm: dts: rk3228: Assign gpll to 1200MHz
Change-Id: I2be3d9a668f9c722a09b0caac6cb620e131ea1d3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-19 15:48:14 +08:00
Finley Xiao
86eabe311f clk: rockchip: rk3228: remove the flag ROCKCHIP_PLL_SYNC_RATE for GPLL
To slove the display shaking, when uboot logo display to kernel show.

Change-Id: Ifc97f72df27b4e8dbcd34ab8ed65ac027fd424d1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-19 15:48:14 +08:00
Sandy Huang
2f4dee4910 drm/rockchip: fix kernel panic when drm driver probe failed
For some reason drm driver maybe probe failed, so the drm_dev is
null. this will lead to kernel panic when enter suspend function.

Change-Id: Ic529ba9103d27b0766189285bd6cf8e43b23b912
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-19 15:06:37 +08:00
Zhang Yunlong
5b1eeb6646 arm64: dts: rockchip: add cif data pin combinations for px30
Change-Id: Ia1d81e1e6450cfc9c13c775ac6ed5d70613ee90e
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-03-19 14:15:15 +08:00
Finley Xiao
40b3301c59 clk: rockchip: rk3228: Fix sclk_wifi div_width
Change-Id: I8e216249fbd588ce55660eba9911fc59aedc920d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-18 21:41:43 +08:00
Meng Dongyang
079b3c7cdb usb: dwc2: make hcd into L3 power off state when suspend
The controller will reset and run into error state if turn
off power when suspend in host mode. This patch stop hcd to
make the controller into L3 state to make sure that the
controller and driver state will reset when resume.

Change-Id: If66bc1a249e919f440ecde0c66f18dabde0b2e62
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-03-16 17:51:16 +08:00
shengfei Xu
ab4a44bf83 power: rk817_charger: enable boost if charger offline
Change-Id: I43d1ded1098c7b37c40bc6a66949b77a0c1e1172
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-03-16 17:50:19 +08:00
Liang Chen
1641eb4fc2 PM / devfreq: adjust opp-table by board IR-Drop
Change-Id: I94280b3f4a122961c0201cf9f8fbf5dc34058581
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-16 17:49:29 +08:00
Liang Chen
3ccca07e3f cpufreq: dt: adjust opp-table by board IR-Drop
Change-Id: Ia51daad4bf5b73621875d1608cd0e486024fcf95
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-16 17:49:29 +08:00
Liang Chen
f31ed416e5 soc: rockchip: add support for adjust opp-table by board IR-Drop
The IR-Drop is always different between different boards, so we
need know the IR-Drop to adjust opp-table to guarantee stably
for the board.

Change-Id: I8ad05d30e15a7e62910a952cc6fa199d70129660
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-16 17:49:29 +08:00
Zhaoyifeng
5790f6182b drivers: rk_nand: update ftl for rk3226 and px30
1. Optimize the garbage processing.
2. Add data list for block manager.

Change-Id: I1c5563151e80dd3b3e941835dd93e2fe4eb4e20b
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2018-03-16 17:49:19 +08:00
Binyuan Lan
7a4fcedce8 ASoC: rockchip: rk817-codec: dynamically enable/disable mclk
Change-Id: I57c97c72ff294bcf63590aa79c6ce0656dc8b022
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-03-16 17:35:30 +08:00
Zhangbin Tong
de5b227eb5 ARM: dts: rockchip: rk3229-evb-android: Fix pin config for bluetooth uart rts
Change-Id: I1745fe8a02994ccbbc6dcfdb2db69319d5312841
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-03-16 10:23:37 +08:00
XiaoDong Huang
ca9d744625 ARM: dts: rockchip: rk3229-evb-android: enable virtual-poweroff
Change-Id: I7d4dd53190e58cc9caec9f8fd9e1330cf34e6d2b
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-03-16 09:23:26 +08:00
XiaoDong Huang
7490a94de2 arm: dts: rockchip: rk322x: add virtual-poweroff
Change-Id: I730cf886ee20a16f638c7e5d74ee6927c0f3022b
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-03-16 09:23:25 +08:00