Commit Graph

844196 Commits

Author SHA1 Message Date
Hu Kejun
f839ecef0b media: spi: rk1608: change some message id
To match trunk code of preisp, change some message id.

Change-Id: I08dfc21cc65edefc296901633f3366a5f5241a92
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-11 14:45:11 +08:00
Hu Kejun
4cc5f9fe53 media: spi: rk1608: add enum_frame_size function
Change-Id: Ia27c7f36609d686f724a4d004c54d3c3a4278bac
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-11 14:45:11 +08:00
Wenlong Zhuang
6d37953c2b media: spi: add misc device for rk1608
Change-Id: I2aaf703792b0a37aae03fb4fbe875dddfc06cbd6
Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
2019-10-11 14:45:11 +08:00
Hu Kejun
1f95be543b media: spi: RK1608: support no sensor connect to preisp
To support preisp post-processing and camera hal1,
let driver probe ok when no sensor device is connected.

Change-Id: I1830420f448b47a0bd327ee3950da0eb7af8d3fb
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-11 14:45:11 +08:00
Hu Kejun
e21462512c media: spi: RK1608: add more config information
Change-Id: Ic68ef2dfdcf72a721dca3c4ad263f429144ed537
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-11 14:45:11 +08:00
Hu Kejun
8f6e8b9173 media: spi: add module information
Change-Id: Ic7c56ba0179e30c34d5d714ab43106d0061fbab6
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-11 14:45:11 +08:00
Hu Kejun
5fab1ad470 media: spi: fix compile error on kernel-4.19
Change-Id: Ia8c4a1d068089534a5e2757fc7d601665d7fdd96
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-11 14:45:11 +08:00
Tao Huang
afba9f118b arm64: dts: rockchip: Add reboot_mode label for Android
Support dtbo overlay reboot-mode for Android 10.

Change-Id: I49e2c561ea22da2f35212996ca44d7c7a4f622d5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-10 16:47:31 +08:00
Tao Huang
48fbac4ce3 ARM: dts: rockchip: Add reboot_mode label for Android
Support dtbo overlay reboot-mode for Android 10.

Change-Id: Ic007f0fec02277bbf34425866db9a40890faea1e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-10 16:45:52 +08:00
Tao Huang
b65851e472 ARM: dts: rockchip: ramoops use DT reserved-memory bindings
According to commit 529182e204 ("ramoops: use DT reserved-memory bindings")

Change-Id: Id79d816604f096f4f2e6c25918e65327875cc647
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-10 16:02:16 +08:00
Tao Huang
0067bf6c5b arm64: dts: rockchip: ramoops use DT reserved-memory bindings
According to commit 529182e204 ("ramoops: use DT reserved-memory bindings")

Change-Id: I73efa992937e6faab5cb2987007d98c8e8294cb0
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-10 16:01:35 +08:00
Liang Chen
85f26ab1a9 arm64: configs: rk3326: enable ARM_ROCKCHIP_BUS_DEVFREQ
Change-Id: If03a61a591b2a56032adae0f614f81c4b1dab8cf
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-10-10 15:30:38 +08:00
Tao Huang
ff5af2620c ARM: dts: rockchip: Add chosen label for Android
Support dtbo overlay chosen for Android 10.

Change-Id: I1396ac6a8400ffeec698139a026ee1f95eb3ce6d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-10 15:03:41 +08:00
Tao Huang
68b15a042a arm64: dts: rockchip: Add chosen label for Android
Support dtbo overlay chosen for Android 10.

Change-Id: Id8f11d64ec1c0fc28b714493810d28180b456ae3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-10 15:03:41 +08:00
Liang Chen
0ba42698d3 arm64: configs: px30: enable ARM_ROCKCHIP_BUS_DEVFREQ
Change-Id: Idba7e3eaa7364cf8d182d551bd7b052d0bbb60da
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-10-10 10:18:45 +08:00
Wu Liangqing
922dd5604d arm64: dts: rockchip: rk3399-ind: enable mpu6500 dmc pwm2 for backlight
Change-Id: If3706edd0d96c6edfd6734b370909f997f657b23
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-10-10 09:22:07 +08:00
Rafael J. Wysocki
f082e1f5f7 UPSTREAM: IOMMU: Make dwo drivers use stateless device links
The device links used by rockchip-iommu and exynos-iommu are
completely managed by these drivers within the IOMMU framework,
so there is no reason to involve the driver core in the management
of these links.

For this reason, make rockchip-iommu and exynos-iommu pass
DL_FLAG_STATELESS in flags to device_link_add(), so that the device
links used by them are stateless.

[Note that this change is requisite for a subsequent one that will
 rework the management of stateful device links in the driver core
 and it will not be compatible with the two drivers in question any
 more.]

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ea4f640025)

Change-Id: I5b7ff7d5e6b966f3f5b28ba21a395bde33d3b49a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-10 09:12:49 +08:00
Simon Xue
4262c9fb63 iommu: hack for disable rockchip iommu
Get iommu_ops from platform bus of dev if domain is NULL to avoid
kernel crash

Change-Id: I5554b06a450805fb3812f1ade60f335efa4d2a4e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-10 09:10:56 +08:00
Tao Huang
5e8e93eccb arm64: rockchip_defconfig: Sync for 4.19
Change-Id: Iee6cd2f786dac734ed0fae83850d7412d2ba7fed
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-09 20:54:42 +08:00
Sandy Huang
2b01962c0b drm/rockchip: add more clock protect for loader logo
Change-Id: Ieb11011a3a6ad75c9648d2a09bb24d27284e029d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-10-09 19:45:45 +08:00
Wyon Bi
432e0c7b67 drm/rockchip: lvds: Add support for rockchip kernel logo
Change-Id: If02e2366e39e3aeae529b4c7118819930654887e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-09 19:32:43 +08:00
Wyon Bi
86f284ac9a drm/rockchip: lvds: Add support for PX30/RK3126/RK3368
Change-Id: I0b4383a9c48dcc2ceed2065c2108e8b7d822fb1f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-09 19:32:43 +08:00
Wyon Bi
a35ac3b32c drm/rockchip: lvds: Convert to generic phy interface
Change-Id: I93a60a89b7e84c69627e6d4f555af7a70f47e479
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-09 19:32:43 +08:00
Shawn Lin
645e07d361 mmc: dw_mmc: bypass RPM for native CD
Otherwise now the RPM core will gate the clk and power domain,
so that the hotplug will be broken.

Change-Id: I9104ff1beb2db5ef2752179eb91730f48f3089d7
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-09 11:45:46 +08:00
Yifeng Zhao
ebe734478f drivers: rk_nand: fix some req_op mistake issue
The req_op define had changed and add more operations, the driver
needs to add error handling to handle unsupported operations.

Change-Id: I1ba59ae50ac22f2cf730f21630b42c56f79a96c1
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-09 10:33:04 +08:00
Tao Huang
7e2da880c1 include: remove unused rk_fb.h and display-sys.h
Change-Id: I88672a3ebc130e69650f1c12be5ebef410bf20af
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-08 18:44:07 +08:00
Tao Huang
7c7fecc697 arm64: dts: rockchip: remove android-6.0 files
Change-Id: Ib96ebfb39b58bbb0dc0593c63f5b33e4d3f8901e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-08 18:42:56 +08:00
Tao Huang
ae6dc4e363 Remove rk3366 support
Only remove no upstream files and changes.

Change-Id: Iee793d802ce91fafce20d22e289418ce63589e43
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-08 18:09:14 +08:00
Tao Huang
256935085d net: wireless: rockchip_wlan: cywdhd: Fix for 4.19
According to commits:
b9eaf18722 ("treewide: init_timer() -> setup_timer()")
e99e88a9d2 ("treewide: setup_timer() -> timer_setup()")
bdd1d2d3d2 ("fs: fix kernel_read prototype")
29ce6ecbb8 ("cfg80211: unify cfg80211_roamed() and cfg80211_roamed_bss()")
818a986e4e ("cfg80211: move add/change interface monitor flags into params")
cf124db566 ("net: Fix inconsistent teardown and release of private netdev state.")
4a7c972644 ("net: Remove usage of net_device last_rx member")
ae7e81c077 ("sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h>")

Change-Id: Ic534a0e18e2af8d430a73d65668bf97ca4ec013d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-08 10:54:02 +08:00
Wu Liangqing
54ee490c04 arm64: dts: rockchip: rk3399-sapphire-excavator-edp: enable hdmi
Change-Id: I3ffcaa564dae9a56c9e4ee3b496c6a55f688be01
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-10-08 10:34:16 +08:00
Ren Jianing
b095510d34 arm64: dts: rockchip: Fix usb host can't connect on rk3399-excavator
The previous dtsi set the wrong vbus control GPIO.

Change-Id: Ie5b4062873483a167b5a6ed47bb9dde209124d3f
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
2019-10-08 10:28:11 +08:00
Sugar Zhang
c8e2fd2ca9 soc: rockchip: power-domain: Fix rockchip_pd_keepon_release crash
Change-Id: I6449e06ec7e8680ce94a197e10b9fa67cc62050e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-09-30 19:37:22 +08:00
Tao Huang
ca50cb058e ASoC: rockchip: pdm: Fix compile warning
sound/soc/rockchip/rockchip_pdm.c: In function 'rockchip_pdm_hw_params':
sound/soc/rockchip/rockchip_pdm.c:179:3: warning: 'clk_out' may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: I10b240781043a61ce365e6349a102b625db433c7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-30 18:17:14 +08:00
Elaine Zhang
d6ecef678c regulator: rk809 & rk817: fix up the is_enable return error
mark rk8xx_is_enabled_wmsk_regmap as is_enable callback func for switch ops.

Change-Id: Id54b6181fd8a39fa51607322c69dc9f5da18593a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-09-30 11:15:17 +08:00
Shengfei Xu
8da4ebf85d arm: dts: rk3288: add rockchip-suspend node
Change-Id: Id5700548a6034248ed5ad3226dd652d0833eec13
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-09-30 11:01:37 +08:00
Shengfei Xu
ebee13ef24 mfd: rk808: adjust sleep pin operation sequence for rk817/rk809
operation sequence of the sleep pin working mode:
1. isable sleep pin function.
2. set sleep pin polarity.
3. enable the mode.

Change-Id: I54b12ac07a64433dbe5c6167658e815c3275d105
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-09-30 10:53:26 +08:00
Sandy Huang
9679919e6f drm/rockchip: vop: fix memory double free when resume
[   58.656266] BUG: KASAN: double-free or invalid-free in
vop_atomic_plane_reset+0x4c/0x90
[   58.656276]
[   58.656297] CPU: 2 PID: 1631 Comm: Binder:269_2 Not tainted 4.19.53
[   58.656308] Hardware name: Rockchip rk3326 evb board (DT)
[   58.656322] Call trace:
[   58.656343]  dump_backtrace+0x0/0x150
[   58.656356]  show_stack+0x14/0x1c
[   58.656376]  dump_stack+0x90/0xb0
[   58.656395]  print_address_description+0x64/0x250
[   58.656409]  kasan_report_invalid_free+0x74/0xb0
[   58.656423]  __kasan_slab_free+0xe4/0x204
[   58.656432]  kasan_slab_free+0x10/0x18
[   58.656446]  kfree+0xfc/0x270
[   58.656460]  vop_atomic_plane_reset+0x4c/0x90
[   58.656477]  drm_mode_config_reset+0x90/0x170
[   58.656491]  drm_atomic_helper_resume+0x54/0x140
[   58.656502]  rockchip_drm_sys_resume+0x6c/0xd0
[   58.656522]  platform_pm_resume+0x2c/0x54
……
[   58.656777] Allocated by task 320:
[   58.656795]  kasan_kmalloc.part.4+0x48/0xf4
[   58.656808]  kasan_kmalloc+0x8c/0xa0
[   58.656821]  kasan_slab_alloc+0x14/0x1c
[   58.656834]  __kmalloc_track_caller+0x1c8/0x2b8
[   58.656850]  kmemdup+0x28/0x50
[   58.656861]  vop_atomic_plane_duplicate_state+0x34/0x84
[   58.656881]  drm_atomic_get_plane_state+0x80/0x114
[   58.656895]  drm_atomic_set_property+0x424/0x6c8
[   58.656909]  drm_mode_atomic_ioctl+0x47c/0xac4
[   58.656929]  drm_ioctl_kernel+0x80/0xe4
[   58.656941]  drm_ioctl+0x26c/0x394
[   58.656958]  drm_compat_ioctl+0x3c/0xd4
……
[   58.657035] Freed by task 1631:
[   58.657050]  __kasan_slab_free+0x140/0x204
[   58.657060]  kasan_slab_free+0x10/0x18
[   58.657072]  kfree+0xfc/0x270
[   58.657088]  drm_atomic_helper_plane_reset+0x24/0x70
[   58.657101]  vop_atomic_plane_reset+0x1c/0x90
[   58.657116]  drm_mode_config_reset+0x90/0x170
[   58.657129]  drm_atomic_helper_resume+0x54/0x140
[   58.657142]  rockchip_drm_sys_resume+0x6c/0xd0
[   58.657159]  platform_pm_resume+0x2c/0x54

Change-Id: I46d80ac0d90054dac1c2787a2733d964d253d1fb
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-09-30 10:47:02 +08:00
Lin Jinhan
c1489ff5ae crypto: rockchip - add px30 crypto aes/des support
cipher mode list:
  aes:      ecb/cbc/xts
  des/3des: ecb/cbc

Change-Id: I46e8f698a099dd9d4e9a81afb6f3a992dadfd79f
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-09-30 10:31:07 +08:00
Lin Jinhan
e107ba4be4 arm: configs: rockchip_defconfig: enable crypto rockchip
enable CONFIG_CRYPTO_DEV_ROCKCHIP_V1
enable CONFIG_CRYPTO_DEV_ROCKCHIP_V2

Change-Id: I4f801cb70fca8893fdc70332241f404760c30951
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-09-30 09:28:10 +08:00
Lin Jinhan
afe3180643 arm64: configs: rockchip_defconfig: enable crypto rockchip
enable CONFIG_CRYPTO_DEV_ROCKCHIP_V1
enable CONFIG_CRYPTO_DEV_ROCKCHIP_V2

Change-Id: Idd4a8e0df284348980c54e7bdc36324f5053e19a
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-09-30 09:27:56 +08:00
Lin Jinhan
f4bee32605 arm64: dts: rockchip: px30 add crypto node
Change-Id: Ib8026ce7dd008d303decd61c41ec26b08b8782b1
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-09-30 09:27:09 +08:00
Lin Jinhan
b98e78a05a dt-bindings: crypto: rockchip: add support for px30
Add DT bindings documentation for the px30 crypto drivers.

Change-Id: I15a7ce60cc56c5690d5d2640e78358060f4efa80
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-09-30 09:26:11 +08:00
Lin Jinhan
248a42bbfc ARM: dts: rk3288: default disable crypto node
Change-Id: Ie89f18bb91eed4f04b05253e4e917eaf882139a6
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-09-30 09:25:31 +08:00
Tao Huang
e73b082650 clk: rockchip: Fix build for rv1108
CONFIG_CPU_RV1108 should be CONFIG_CPU_RV110X

Fixes: b7a15f8858 ("clk: rockchip: build depends on CPU config")
Change-Id: I551a27bd8e76fc10fd7df4d558f3a1b04e4f53da
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-29 17:22:41 +08:00
Elaine Zhang
e2fd10bcb5 clk: rockchip: rk3288: mark pclk_peri as critical clk
Avoid disable the parent clock after the child clock has disabled.

Change-Id: I1ea91afe0b6bbefd3a5d8e88641e4a3af5a368a4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-09-29 11:49:37 +08:00
Finley Xiao
379be71085 clk: rockchip: half-divider: Use DIV_ROUND_UP to round divisor values
Some divisor calculations were misrounded, causing higher than requested
rates on some clocks. Fix them up using DIV_ROUND_UP.

Change-Id: I8e68282ccfc9c46302913c0946196260ccef0701
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-09-29 11:49:21 +08:00
Elaine Zhang
49fb63bac7 clk: rockchip: rk3399: fix up the FRAC_MAX_PRATE limit for i2s and uart
I2S and UART may be application requirements higher than 30M frequency,
So increase the input frequency limit of the frac divider.
IC back-end emulation 800M is safety.

Change-Id: Ida63505b5124799ad8a64d70af4403eae121cbb8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-09-29 11:49:02 +08:00
Wyon Bi
2cc41492f6 clk: rockchip: px30: Add CLK_SET_RATE_PARENT for clk_i2s1_out_pre
Change-Id: Ie01e78ecf49cbbc3101c7ff0fafff11d3428b271
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-09-29 11:48:39 +08:00
Finley Xiao
4a9e89e94a clk: rockchip: rk3308: Fix input rate of vop frac clock
Change-Id: Iec4e8464cb05b35c2a9493fc4907ef9b9946899e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-09-29 11:48:08 +08:00
Elaine Zhang
82c191700f clk: rockchip: rk3399: Use MUXTBL to cover Mux selects priorities
add CLK_SET_RATE_PARENT for clk_uartx_frac.

Change-Id: Ide6eab4bd76b9900a8a55f2dc3c79563fc8feda3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-09-29 11:47:34 +08:00