Commit Graph

847309 Commits

Author SHA1 Message Date
David Wu
ddce12799c pwm: rockchip: Make pwm configure correctly for enable_conf
If some PWM enable_conf was configured with different values at
uboot/loader, the enable_conf should be cleaned firstly and
configured them at kernel. It is better to use the same parameters
on both sides to ensure excessive smoothing.

Change-Id: Ib1b7b55e9816639d9915543dadf059ce0e8be103
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-31 15:04:41 +08:00
Finley Xiao
5717787f94 arm64: dts: rockchip: rk3368: Add reboot frequcey for cpu
Change-Id: Icc09762bdc11eb33733c3dcc26ba0d4a1bdd59c1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-31 14:59:22 +08:00
Finley Xiao
7a3872f748 arm64: dts: rockchip: rk3368: Add system monitor node
Change-Id: Id35935b83026a88af8bf137a8611dc93dd9ce945
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-31 14:58:32 +08:00
Yifeng Zhao
060a7cf7a7 drivers: rk_nand: fix access to virtual address 0 bug
The write or read request buffers may or may not be a highmem
page highmem or not allocated page, so the page->virtual will be
NULL, kmap it always need.

BUG:
[   25.928352] Unable to handle kernel paging request at virtual address 0
[   31.721348] pgd = a13fe17e
[   31.724062] [0] *pgd=00000000
[   31.727651] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[   31.732966] Modules linked in:

Change-Id: Icdbb052bb488ecc10be1c8a8b0ca954f65c17474
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-10-31 14:57:46 +08:00
Tao Huang
8a61de5df0 ARM: rockchip_defconfig: enable INITRD_ASYNC
Save about 50ms of boot time on RK3288 EVB

Change-Id: Id99a4e73019cad603a243f09f681f8c60faab8af
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-31 11:04:23 +08:00
Tao Huang
2f1bc0f1e6 ARM: rockchip_defconfig: merge q/android-4.19/android-base.config
https://android.googlesource.com/kernel/configs
commit aa4b4db78846 ("Freeze Q kernel configs")

Change-Id: Ibb68cd93491c5a748c675b8bb7a00d7448bfb9ed
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-31 11:04:23 +08:00
Tao Huang
77e6c0b329 ARM: rockchip_defconfig: Sync for 4.19
Change-Id: Ie07e3260bb01b53d52e2d49cd8ce99326cee6838
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-31 11:04:23 +08:00
Jianqun Xu
3cd7acb403 arm64: dts: rockchip: rk3368 init cpub/l freq to 600MHz
Since opp-suspend of cpub/l is 216MHz@950000mV, and the max frequency
under 950000mV is 600MHz, so initialize cpub/l freq to 600MHz.

Change-Id: I02d2ac44f4e5d125dfa90796b839c4a733442274
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-30 16:53:45 +08:00
Sandy Huang
b8f61f5bf3 drm/rockchip: vop: fix multile area win state error
the supported multile area win gate only can be closed when area0 is
disabled.

Change-Id: Idd447bb7c2157587456391c1abeeefc9a5d61bbd
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-10-30 16:10:17 +08:00
Sandy Huang
5b945448b2 drm/rockchip: vop: fix per-pixel alpha[255] calc error
Change-Id: I914711bf3195e1ee7cac18d001adc109888e380a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-10-30 16:10:01 +08:00
Shawn Lin
fedeff5024 mmc: dw_mmc-rockchip: Fix native sdmmc deep resume failure
Native sdmmc does not use rpm, but we set pm_runtime_force_suspend()
and pm_runtime_force_resume() for sleep PM. pm_runtime_force_*()
will check rpm status, so that the it doesn't call the resume
callback if we didn't increase its usage count.

Another drive-by fix is to de-init rpm once when rpm is used.

Change-Id: Id7ea1ca95c684fb51867fb87c66f8998fc0758a3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-30 16:09:34 +08:00
Shawn Lin
085eb4c350 arm64: dts: rockchip: add disable-cqe for RK3399
Change-Id: I58cabc18a1f01e020b57ba980a0b8114eed4ba2a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-30 16:09:34 +08:00
Shawn Lin
e3865605b0 mmc: sdhci-of-arasan: Parse disable-cqe
Add support to disable cqe function if disable-cqe
is assiged by firmware.

Change-Id: Iac2826c4b986c122510af1594c971c4135bafc34
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-30 16:09:34 +08:00
Tao Huang
e6010674ac arm64: rockchip_defconfig: merge q/android-4.19/android-recommended-arm64.config
https://android.googlesource.com/kernel/configs
commit 4dd5598f42b7 ("q: Recommend enabling architecture-optimized AES and SHA-256")

+CONFIG_RANDOMIZE_BASE=y

Change-Id: I22afcbc35a0b5ea5f9c3458a0f4e9817f41cd564
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-30 10:03:46 +08:00
Tao Huang
503fb3fc08 arm64: rockchip_defconfig: merge q/android-4.19/android-recommended.config
https://android.googlesource.com/kernel/configs
commit 94efd7a4ecb0 ("q: Recommend enabling ext4 and f2fs encryption support")

+CONFIG_PSI=y
+CONFIG_KPROBES=y
-CONFIG_KSM=y
+CONFIG_NET_SCH_NETEM=y
+CONFIG_DM_BOW=y
+CONFIG_EXT4_ENCRYPTION=y
+CONFIG_OVERLAY_FS=y

Change-Id: Ib45a224cc443c5836bc1883fe908b5cc5b76327e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-30 09:29:17 +08:00
Jianqun Xu
d88bd40057 arm64: dts: rockchip: rk3368 add more ip nodes to core dts
Add more ip nodes to rk3368 core dts file, such as iep, vop, ...

Change-Id: Ief8da75765bb84ebe038e9446c782aff3e3a6aed
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-30 09:14:28 +08:00
Sugar Zhang
a96df3beb9 arm64: dts: rockchip: rk3368: split i2s mclk from i2s-8ch-bus
Change-Id: I7cd8e67bc21ed3b35afb8835a270bc8f9f955aab
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 5e2f47bce0)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-30 08:59:20 +08:00
Rocky Hao
092c617c77 arm64: dts: rockchip: update tsadc node for rk3368
add cpus' dynamic power coefficient and update alert temperature

Change-Id: I502e49d52268b63625e01103b50e6c18fb8da8b0
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
(cherry picked from commit 112fa9a922)
(cherry picked from commit 92f81f9d04)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-30 08:59:20 +08:00
Chen Jinsen
19b08fd725 arm: configs: rockchip_defconfig: enable CONFIG_ION_SYSTEM_HEAP
Android 10 requires ion to allocate buffers for audio playback,
enable system heap by default to support it.

Change-Id: I20653e9377c86e4baed295f33a475e49a63f5082
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
2019-10-30 08:48:19 +08:00
Tao Huang
6b920cb506 drivers/Kconfig: reorder rkflash and headset_observe
Same as 4.4

Change-Id: If0900b63e9dd81ac068670c00357d7b143a5f5a1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-30 08:45:55 +08:00
Shawn Lin
6234aa4bb3 mmc: core: Set clock after changing timing immediately for mmc_select_hs400es()
This's what mmc_select_hs400() or mmc_select_hs() did,
since mmc_set_clock() will let sdhci_arasan_set_clock()
update the PHY clock to match the timing, otherwise
the following mmc_switch_status() will be failed.

Change-Id: Ic1a0178ec209ec71d904f7212a84da6665904007
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-29 16:57:43 +08:00
Shawn Lin
c5d76c0167 mmc: core: don't check card status when flushing cache
It's meaningless to check the card's status which execute
the on-going flush. As the status been responded make no
any sense here.

Change-Id: I34197d1c93c01337dd2e68ec22e3ce8dd195c424
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2019-10-29 16:57:43 +08:00
Finley Xiao
8c07126830 PM / devfreq: rockchip_dmc: stop monitor only when enable auto-freq
This fix the warning:
WARNING: CPU: 1 PID: 1 at kernel/workqueue.c:2934 __flush_work+0x1f8/0x220
Modules linked in:
CPU: 1 PID: 1 Comm: init Not tainted 4.19.53 #303
Hardware name: Rockchip RK3399 EVB IND LPDDR4 Board edp (Android) (DT)
pstate: 00400005 (nzcv daif +PAN -UAO)
pc : __flush_work+0x1f8/0x220
lr : __cancel_work_timer+0x12c/0x1a8
sp : ffffff800804ba20
x29: ffffff800804ba20 x28: ffffffc0f1870000
x27: 0000000000000000 x26: ffffffc0f1870000
x25: ffffff800804bb30 x24: ffffff80094e8000
x23: ffffff80080d1910 x22: 0000000000000000
x21: ffffff800933d000 x20: ffffffc0f0777350
x19: ffffff80094e85b8 x18: ffffffffffffffff
x17: 0000000000000000 x16: 0000000000000001
x15: ffffff800933da88 x14: ffffff80894ecdf7
x13: ffffff80094ece05 x12: ffffff80094ed240
x11: ffffff800935e000 x10: 0000000000000000
x9 : ffffffc00a3a0180 x8 : 0000000000000004
x7 : 0000000002487900 x6 : 0000000000000001
x5 : 0000000000000001 x4 : 0000000000000800
x3 : ffffff800933da88 x2 : 0000000000000000
x1 : 0000000000000000 x0 : ffffffc0f0777350

Call trace:
 __flush_work+0x1f8/0x220
 __cancel_work_timer+0x12c/0x1a8
 cancel_delayed_work_sync+0x10/0x18
 devfreq_monitor_stop+0x10/0x18
 rockchip_dmcfreq_system_status_notifier+0x150/0x160
 notifier_call_chain+0x50/0x90
 __blocking_notifier_call_chain+0x50/0x78
 blocking_notifier_call_chain+0x14/0x20
 rockchip_set_system_status+0xb0/0xd0
 rockchip_monitor_reboot_notifier+0x10/0x20
 notifier_call_chain+0x50/0x90
 __blocking_notifier_call_chain+0x50/0x78
 blocking_notifier_call_chain+0x14/0x20
 kernel_restart_prepare+0x1c/0x40
 kernel_restart+0x14/0x78
 __se_sys_reboot+0x1cc/0x208
 __arm64_sys_reboot+0x18/0x20
 el0_svc_common+0xbc/0x188
 el0_svc_handler+0x2c/0x80
 el0_svc+0x8/0xc
---[ end trace 4548dcc701eee1b0 ]---

Change-Id: I479d0abdfcf6aa144036983c57b0878e104cd8e0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-29 10:02:50 +08:00
Tao Huang
70f1413e90 Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common
* android-4.19: (2854 commits)
  ANDROID: move up spin_unlock_bh() ahead of remove_proc_entry()
  BACKPORT: arm64: tags: Preserve tags for addresses translated via TTBR1
  UPSTREAM: arm64: memory: Implement __tag_set() as common function
  UPSTREAM: arm64/mm: fix variable 'tag' set but not used
  UPSTREAM: arm64: avoid clang warning about self-assignment
  ANDROID: sdcardfs: evict dentries on fscrypt key removal
  ANDROID: fscrypt: add key removal notifier chain
  ANDROID: refactor build.config files to remove duplication
  ANDROID: Move from clang r353983c to r365631c
  ANDROID: gki_defconfig: remove PWRSEQ_EMMC and PWRSEQ_SIMPLE
  ANDROID: unconditionally compile sig_ok in struct module
  Linux 4.19.80
  perf/hw_breakpoint: Fix arch_hw_breakpoint use-before-initialization
  PCI: vmd: Fix config addressing when using bus offsets
  x86/asm: Fix MWAITX C-state hint value
  hwmon: Fix HWMON_P_MIN_ALARM mask
  tracing: Get trace_array reference for available_tracers files
  ftrace: Get a reference counter for the trace_array on filter files
  tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency
  tracing/hwlat: Report total time spent in all NMIs during the sample
  ...

Conflicts:
	drivers/clk/rockchip/clk-mmc-phase.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/regulator/core.c
	drivers/tty/serial/8250/8250_port.c
	drivers/usb/dwc3/core.h
	drivers/usb/dwc3/gadget.c
	drivers/usb/dwc3/gadget.h

Change-Id: I65599d770d6613caba14251b890fcfd1cfa0f100
2019-10-28 20:26:28 +08:00
David Wu
64d40c4000 pinctrl: rockchip: Add iomux recalculated for rk3328 GPIO2B0~GPIO2B6
The pins from GPIO2B0 to GPIO2B6 are located at GRF_GPIO2BL_IOMUX,
they are recalculated to get correct iomux.

Change-Id: I1e46697c4508c396b5e8140c32c4185925a040ea
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:36 +08:00
Jianqun Xu
37f7f42dec pinctrl: rockchip: add calculate slew rate for rk1808
Change-Id: Ia78e6ceda688942b655623d80fe4fe9fc1b349cc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-28 18:24:36 +08:00
David Wu
6bfc507057 pinctrl: rockchip: Add slew rate support for px30
The usage of slew rate is needed to config it at DTS,
such as:
  fast speed: slew-rate = <1>;
  slew speed: slew-rate = <0>;

Change-Id: Iefa9c15a35c6c1e94f716f5d6dd7e30d20a7293f
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:36 +08:00
David Wu
74b11898ca pinctrl: rockchip: Disable GPIO_INTEN bit while gpio irq type setting
If the gpio IRQ type changes, it is possible to accidentally trigger
an interrupt, such as when the input is high, changed from level to
rise edge. For now, the best way to do this is to disable the INTEN
bit first, then configure the type to stagger this period of time.

Change-Id: I71351b9ed6f7920958c7451c2e51ab5f699875d1
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:36 +08:00
David Wu
c063b854bd pinctrl: rockchip: Add IOMUX_WRITABLE_32BIT flag for rk3288 gpio0 iomux
There are writable 32 bits for PMU_GPIO0's iomux, so add the
IOMUX_WRITABLE_32BIT to read iomux register at first, it would
not change others' bits.

Change-Id: I1fb27c60d5d26e5719b6911a78e7cdf144feba26
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:35 +08:00
David Wu
73c45e6cda PM / AVS: rockchip-io: add io selectors and supplies for rk3308
This adds the necessary data for handling io voltage domains on the rk3308.
As interesting tidbit, the rk3308 contains one iodomain area at grf,

Change-Id: Ife72a284a8926d02ef5df7a422d41924494d0300
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:14 +08:00
Lin Jinhan
fe499d0afe arm64: dts: rockchip: rk3368: add rng node
Change-Id: Ibbfbff20192e3bf60a07651a44220379ad7f8043
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-28 17:24:59 +08:00
Shunhua Lan
67f6b1a1e7 arm64: configs: rockchip_defconfig: enable rt5651
Change-Id: Iee3a5da70533611cecb0b094cd552398fe13697d
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-28 16:56:39 +08:00
Tao Huang
cd85a6c1a5 arm64: dts: rockchip: enable rng for rk3328-android
Change-Id: Idca36d07af538102e28ded94dbd481f69e7f2433
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-28 16:56:23 +08:00
Huang zhibao
d5073cca28 ASoC: rt5651: add prompt text
Change-Id: Id538b6e4abb33fb6c01a5d7e89d1a0f269f29867
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-28 16:44:50 +08:00
Wu Liangqing
3bbb5b5aa2 arm64: dts: rockchip: rk3399-evb-ind v11 board
Change-Id: Id9c90403d8639c98f372ba4b89295d63602f8800
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-10-28 16:38:13 +08:00
Shunhua Lan
4a4ef4d008 rk_headset: Porting to kernel 4.19
use extcon instead of switch
fix some codes style

Change-Id: I3f1906ddca16b2fedf403c7c88e00ff1dc4edd42
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-28 16:09:36 +08:00
Alex Zhao
dd7fdbcb04 net: rockchip_wlan: rtl8723cs: enable wowlan
Change-Id: Iadce78000563e91eac21a10cdd82f7dc7da9463c
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-10-28 14:14:49 +08:00
Wyon Bi
508931efa6 ARM: rockchip_defconfig: remove CONFIG_ROCKCHIP_CDN_DP
Change-Id: I88591f080d74fc1b3c3d39e9a1694193e241c985
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-28 11:43:25 +08:00
Shengfei Xu
67ad424234 arm: configs: rockchip_defconfig: enable CONFIG_INPUT_RK805_PWRKEY
Change-Id: I3be596cf091e8034bf144629d391f4ad775f4267
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-28 10:52:32 +08:00
Wyon Bi
7dcaa64ce1 drm/bridge: analogix_dp: set IRQ_NOAUTOEN to the irq flag
The interrupt is requested before the device is powered on and
it's value in some cases cannot be reliable. It happens on some
devices that an interrupt is generated as soon as requested
before having the chance to disable the irq.

Change-Id: I889c069239d005ab0a3fb4eb36123608ec81d9ab
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-28 10:16:16 +08:00
Shixiang Zheng
99294c04e4 video/rockchip: rga2: fix compile err in kernel 3.10
Change-Id: Iccedaf44eadd006bd0ce6270fd6d6a4493c0bcc5
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Shixiang Zheng
7f00098197 video/rockchip: rga2: fix rga_dma_flush_page crash issue
Unable to handle kernel paging request at virtual address
ffffffc000000000
PC is at __dma_flush_range+0x18/0x30
LR is at rga_dma_flush_page+0x40/0x48

Change-Id: I6c15bc60edac042884ad14611485f0380e3bd355
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Shixiang Zheng
0745fcace7 video/rockchip: rga2: open rop_mode for user select
Change-Id: I990973d04f693393046985a46e8cd451b1d024e5
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
a5d2c44af3 video/rockchip: rga2: coding style rm ^M
Change-Id: I3ecaa907c606c6316505fe7ba524c2feba5f2621
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
49c78f7c48 video/rockchip: rga2: fix alpha blend 405 mode not working issue
Change-Id: Ic4857ee0f721bcab9011ee7dab06dbcf09b4be0b
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Shixiang Zheng
f15b108e67 video/rockchip: rga2: alter some print level for debug
Change-Id: I776a07416ddc36d473cd9ed39aa6fbf900facce7
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
04bb8c98db video/rockchip: rga2: fix a page count calc err
the driver has a bug in calc of page num when virtual
    address may not 4k align

Change-Id: Ifc3759d7a0e8954057e238c714de2059b691f17c
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
e1f6f92d1c video/rockchip: rga2: add YUV packet format support
Change-Id: I3b002b1bc0f06a1480936a66a90e8545402bdb84
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:09 +08:00
Shixiang Zheng
540302b817 video/rockchip: rga2: fix the issue of yuv422p format conversion
Change-Id: I5213a7be831e7a5166231f4e7179ce4a564a14fb
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:00 +08:00
Shixiang Zheng
22de8befe8 video/rockchip: rga2: extend timeount err message
Change-Id: Ibf8698fa835ca28850d07b1cd66a4d1e6e0df3be
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:52:29 +08:00