Commit Graph

847564 Commits

Author SHA1 Message Date
Tao Huang
d72da8b8bd arm64: rockchip_defconfig: disable CONFIG_RELAY
Sync with floral_defconfig

Change-Id: I522f29a0a73c2db0e11c95916516685d6ecdee61
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-28 17:57:00 +08:00
Bradley Bolen
833e626ee6 UPSTREAM: mmc: core: Fix size overflow for mmc partitions
With large eMMC cards, it is possible to create general purpose
partitions that are bigger than 4GB.  The size member of the mmc_part
struct is only an unsigned int which overflows for gp partitions larger
than 4GB.  Change this to a u64 to handle the overflow.

Change-Id: I95594ae67987bc3f9599bc4a13952eb59c43e813
Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from f3d7c2292d)
2019-11-28 11:15:32 +08:00
Wang Panzhenzhuan
99b3695fef media: rockchip: cif: add pipeline power management
reference commit:
Commit fda2824552 ("media: rockchip: isp1: add pipeline power management")

Change-Id: Ibf23890af5efb26a282a490faf5a7320349a5046
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-11-28 10:43:38 +08:00
Wang Panzhenzhuan
1b02d60cf5 ARM: rockchip_defconfig: rk3126c_bnd_m88: enable gc0312 gc2035
Change-Id: Ide53d3bb7cd87314385e7c78dcdd408512975a76
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-11-28 10:42:43 +08:00
Wang Panzhenzhuan
4419a79ab1 ARM: dts: rockchip: rk3126-bnd-m88-emmc: add gc0312 & gc2035 support
Change-Id: I2acb7acea7b548b25e5627199dab2d347943140f
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-11-28 10:42:09 +08:00
Zefa Chen
b7526773a3 media: i2c: add enum_frame_interval function for iq tool 2.2 and hal3
Change-Id: I03344cd6cf278dd7c18fce8e97479089ef185a5c
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-11-28 10:40:19 +08:00
Sandy Huang
ff1c90f701 ARM: dts: rockchip: add rk3228 vop compatible name for rk322x
Upstream kernel and uboot use rockchip,rk3228-vop as rk322x vop
compatible name, so add this.

Fixes: 810b044867 ("ARM: dts: rk322x: add vop display node")
Change-Id: I552b99a64f8de679aa4504624e35482e2b0a0508
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-11-28 10:26:19 +08:00
David Wu
ea92092755 net: ethernet: stmicro: stmmac: Get the ethernet mac address at stmmac_open
When it is the initialized probe, getting or setting the Ethernet address
from the vendor partition will fail. The function for reading/writting
vendor partition is not registered and changed this to stmmac_open to
ensure the operation worked.

Change-Id: Id9401e7ffcbc16a266ecb69b3777499919c50ed6
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-11-28 10:19:01 +08:00
David Wu
0bacdd1bd8 ARM: dts: rockchip: Config the pwm2 pinctrl with pull up for rk322x
Default pull state of pwm2 and pwm3 pin are up, keep them
when pwm2 and pwm3 are used for pwm regulator. And remove
the pull down config for pwm2 and pwm3, they are not used.

Change-Id: Id8c4767627bd00d224aec734f4a1cacb619c79aa
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-11-28 10:12:51 +08:00
Tao Huang
7fa2f030b0 Documentation: remove unused cgroup-legacy
Change-Id: I965839be7b62a3f4cf86b9df3b0d74932958fb91
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-27 16:53:23 +08:00
Tao Huang
a346a6066c Documentation: remove unused pixfmt-yuv422m.xml and pixfmt-yuv444m.xml
Change-Id: Icaf713dd318cd18355a89b6cdff5c12d959de578
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-27 16:51:39 +08:00
Sandy Huang
cb22710859 arm: dts: rk322x: add rockchip,disable-device-link-resume for vop
vop iommu handled by vop driver, so ignore the iommu operation
when vop call pm_runtime_get_sync/pm_runtime_put_sync

Change-Id: Id8e21902ea3941e9ccef3e3d1b12efbbdee8e337
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-11-27 16:38:15 +08:00
Wang Panzhenzhuan
9f37bae407 media: rockchip: isp1: fix crash issue
vb2_fop_release should be called before v4l2_pipeline_pm_use,
otherwise it causes system crash when start stream with v4l2-ctl command,
and stop stream unexpected with ctrl+c.

Change-Id: Ia46078aaf1e436fdc10272ef778b4d8b11589520
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-11-27 16:35:54 +08:00
Xiao Ya peng
72a11f11d8 ARM: dts: rockchip: rk322x: Add the pwm2/pwm3 pinctrl with pull up
The default state of pwm2/pwm3 pin is a pull up, we need to keep it
for the second global reset issue, when pwm2/pwm3 used for the regulator

Change-Id: Ic57e26338f7f546e3f784bd34790ed9b027d78de
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
2019-11-27 15:53:55 +08:00
Zhen Chen
eccee24a64 ARM: dts: rockchip: rk312x: Fix incorrect base address of gpu register
Fixes: 1f66f15d73 ("ARM: dts: rockchip: rk312x: refine gpu node")
Change-Id: I47cc24625d3b5455351573333d7e653ef4a6c51b
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-11-27 14:36:26 +08:00
Sandy Huang
7091540a86 drm/rockchip: gem: support cpu cache for drm memory
Change-Id: Ic9ca3d0862eb8c5c4d8a002db8cbbcc93d2dcc02
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-11-27 14:06:26 +08:00
Grey Li
7abe2657b7 ARM: dts: rockchip: change rkvdec version for rk322x
Fixes: 41ee9439d0 ("ARM: dts: rockchip: rk322x: dtsi for video codec")
Change-Id: I2ebb36b3f990a9420c418cc9ed9861be7bfd740f
Signed-off-by: Grey Li <grey.li@rock-chips.com>
2019-11-27 08:49:21 +08:00
Zhen Chen
4e2b2ec2ef Mali: utgard: adjust corresponding to the refined gpu node in dts files
Such as :
	arch/arm/boot/dts/rk312x.dtsi,
	arch/arm/boot/dts/rk322x.dtsi

Change-Id: Ib92193685fc7572558f2f4e65fec6be29d20ac2f
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-11-26 19:37:41 +08:00
Zhen Chen
20a1cf7ac6 arm64: dts: rockchip: rk3328: refine gpu node
Change-Id: Ibf3975e0d7e77bc24bca8dac06d8308d65013dee
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-11-26 19:37:41 +08:00
Zhen Chen
1f66f15d73 ARM: dts: rockchip: rk312x: refine gpu node
Change-Id: I9e6ebd6fc01a2bbfecdefeda307ed94334edccae
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-11-26 19:37:41 +08:00
Grey Li
701a3b0ff8 ARM: dts: rockchip: add iep iommu clk for rk322x
Change-Id: If980d9bc1d448f94a9fc5dfe777a92c155f971e5
Signed-off-by: Grey Li <grey.li@rock-chips.com>
2019-11-26 19:35:19 +08:00
Xiao Ya peng
c74dfe312c ARM: dts: rockchip: enable rng for rk322x-android
Change-Id: Ic2b582b04eba22a2e7e608bedcb43924432f4efe
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
2019-11-26 19:21:03 +08:00
Zhen Chen
786105b4d0 ARM: dts: rk322x: Adapt gpu node for Mali400 device driver base on ARM DDK
The source files are under drivers/gpu/arm/mali400.

Change-Id: I4ee1055cf3f630e2d609ab72e26c36daf51cddbb
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-11-26 19:14:08 +08:00
Lin Jinhan
c79f3d6056 ARM: dts: rockchip: rk322x: add rng node
Change-Id: Ie39242a306d8d6f26c4b6adc19ec09cea5b93ede
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-11-26 19:12:46 +08:00
Finley Xiao
f02d92ba53 ARM: dts: rockchip: rk312x: Add SYS_STATUS_REBOOT for dmc
Add SYS_STATUS_REBOOT for dmc so that the frequency and voltage will
change when reboot.

Change-Id: If26c704bfda361d03cf3a8b0e16781902ddf7e12
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-26 19:09:19 +08:00
Finley Xiao
7b2e34a7e4 soc: rockchip: system_monitor: Add default reboot frequency for cpu
There is an reboot frequency event if don't add property 'rockchip,reboot-freq'
in cpu opp table node.

Change-Id: I79a56d62c70d99f60840cd3304622799aaa66476
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-26 15:53:57 +08:00
Finley Xiao
28cab7d2d6 ARM: dts: rockchip: Add system monitor node for some platfroms
The reboot and fb notifiers are also need for some platfroms when enable
dmcfreq.

Change-Id: I7a02e43ebfff6f8cdccd050a30a9e6c270fc5b5e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-26 15:53:27 +08:00
Ding Wei
869938b29a video: rockchip: mpp: fix mistake writing
Change-Id: I0cd75cc86810bdc29f75d9dd797c9100e1d5c440
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-26 11:03:18 +08:00
Finley Xiao
8e651bd57d cpufreq: dt-platdev: Add rk3229 project into blacklist
Change-Id: I38a3880206f0772b8b0ba29798389cac616197ad
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-26 09:06:26 +08:00
Ding Wei
41ee9439d0 ARM: dts: rockchip: rk322x: dtsi for video codec
Change-Id: I96428170f3d588225de24e028db42c431817dbd1
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-26 09:04:55 +08:00
shengfei Xu
c05dfd186f arm64: dts: rockchip: remove the regulator-boot-on property from the OTG_SWITCH for rk3326 board
the OTG_SWITCH supply OTG, it doesn't need to be on When the driver initializes.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I44f4fa618f66f18fa552353c425c7baa6831ab0c
2019-11-25 19:26:32 +08:00
Tao Huang
a1fa6e57ba rk: clang-wrapper.py ignore atags_to_fdt.c:109
stack frame size of 4416 bytes in function 'atags_to_fdt'

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I07d22e8ca0006b8797a0cfaf42d93e46fdd4ee5c
2019-11-25 16:38:30 +08:00
Heiko Stuebner
2994e8c882 UPSTREAM: clk: rockchip: add a type from SGRF-controlled gate clocks
Some clk gates on Rockchip SoCs are part of the SGRF (secure general
register files) and thus only controllable from secure mode, with the
most prominent example being the watchdog.

In most cases we still want to define this as a real clock though,
to have complete clock tree and not reference the generic base-clock
from the devicetree.

So far we've just defined this as factor-1-1 clocks in the clock init,
so define a special clock-type for it so that this definition can be
part of the general tree-definition and save some boilerplate code.

Change-Id: I19ba9125781812dccb5703a9d914253ef54de7c5
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit b3b723d8c4)
2019-11-25 16:11:48 +08:00
Algea Cao
79886cd5c7 drm/bridge: synopsys: Delete set device name
There is not need to set dev name without address.

Fixes: 76f27bdd76 ("drm: bridge: dw-hdmi: using extcon instead of switch")
Change-Id: I2c23e29ad8f7b4a0b05b2237ae319e14c69a1cb1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-11-25 14:11:13 +08:00
Tao Huang
1c914130c7 random: force generate entropy for rockchip platform
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4fafc86aff2f9e37ac74b92114a8fd5c8c3e50c9
2019-11-25 08:53:16 +08:00
Linus Torvalds
4be500a1fd UPSTREAM: random: try to actively add entropy rather than passively wait for it
For 5.3 we had to revert a nice ext4 IO pattern improvement, because it
caused a bootup regression due to lack of entropy at bootup together
with arguably broken user space that was asking for secure random
numbers when it really didn't need to.

See commit 72dbcf7215 (Revert "ext4: make __ext4_get_inode_loc plug").

This aims to solve the issue by actively generating entropy noise using
the CPU cycle counter when waiting for the random number generator to
initialize.  This only works when you have a high-frequency time stamp
counter available, but that's the case on all modern x86 CPU's, and on
most other modern CPU's too.

What we do is to generate jitter entropy from the CPU cycle counter
under a somewhat complex load: calling the scheduler while also
guaranteeing a certain amount of timing noise by also triggering a
timer.

I'm sure we can tweak this, and that people will want to look at other
alternatives, but there's been a number of papers written on jitter
entropy, and this should really be fairly conservative by crediting one
bit of entropy for every timer-induced jump in the cycle counter.  Not
because the timer itself would be all that unpredictable, but because
the interaction between the timer and the loop is going to be.

Even if (and perhaps particularly if) the timer actually happens on
another CPU, the cacheline interaction between the loop that reads the
cycle counter and the timer itself firing is going to add perturbations
to the cycle counter values that get mixed into the entropy pool.

As Thomas pointed out, with a modern out-of-order CPU, even quite simple
loops show a fair amount of hard-to-predict timing variability even in
the absense of external interrupts.  But this tries to take that further
by actually having a fairly complex interaction.

This is not going to solve the entropy issue for architectures that have
no CPU cycle counter, but it's not clear how (and if) that is solvable,
and the hardware in question is largely starting to be irrelevant.  And
by doing this we can at least avoid some of the even more contentious
approaches (like making the entropy waiting time out in order to avoid
the possibly unbounded waiting).

Change-Id: I77f527785e5d3fa90c14c8887201c2c0ae8b85db
Cc: Ahmed Darwish <darwish.07@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Nicholas Mc Guire <hofrat@opentech.at>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Alexander E. Patrakov <patrakov@gmail.com>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 50ee7529ec)
2019-11-25 08:53:16 +08:00
Tao Huang
4d7c122ba3 extcon: Add named extcon link without address
Fixes: 513c60a1ba ("extcon: Add named extcon link")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I77c13a88aa1f4a0683adfca7dc8c99ed57ce8539
2019-11-25 08:52:19 +08:00
Ding Wei
b82e249b9b video: rockchip: mpp: change code position for arm32-arch attach
Base the Change-Id: I14ae67d0bfa76d2581eebae100ebf6bad15f8614
One task attach once instead of each fd translate.

Change-Id: I158ef1ee32f9e7a62dc45de3f25de4decee8c112
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2019-11-22 20:51:38 +08:00
Bin Yang
abb53bd7f5 mfd/fusb302: Set CC pull up current to 80uA
The current driver set CC pull up current to 180uA, but FUSB302B was
designed with 80uA for sink detection which means it only guarantee
FUSB302B will works well with that setting. So we change the CC pull
up current to 80uA.

Change-Id: I5bcb0caaffafbcdf7972396b64f296606bbf3986
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-11-22 15:53:57 +08:00
Bin Yang
c00cc673bf mfd/fusb302: Add fusb302 suspend/resume functions
We found that the Type-C OTG cable was plugged in while the system
was suspending, it may fail to detect the Type-C OTG cable after
resume. That's because the fusb302 registers will fail to operate
during suspend, this will cause the fusb302 CC logic to be abnormal.
So we should not operate queue_work function while the suspend.

Change-Id: Idc675c25de5452ec39513eb484cfaa75534790cd
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-11-22 15:53:47 +08:00
Zain Wang
52b7a55db3 mfd/fusb302: add input event for Accessory insert
Change-Id: Ifbdbadbb198146f1dc904c33bf9948c4316fc8d5
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2019-11-22 15:53:31 +08:00
Zain Wang
f86fc39e3e mfd/fusb302: Add Type-C Audio Accessory support
Change-Id: I7b7c1fe7ecc30ded6149c3d0d4e1f82ee9cc52c9
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2019-11-22 15:53:19 +08:00
Algea Cao
4d8a1760c1 drm: rockchip: dw-hdmi: Set bus width 8 bits when check mode valid
4.19 kernel will check mode valid before encoder atomic check
when resolution switch. Because when checking mode the
detailed color format and color depth are not considered, some
mode can be mistaken for unsupported, such as 4K-60HZ YUV420 10 bits.
So bus width should be set 8 bits when check mode valid.

Change-Id: I0869868b73060bc0f539243d7fccb6c775141ec4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-11-22 15:27:54 +08:00
Sugar Zhang
bd1d86e5e3 ASoC: codecs: Adds support for conexant cx2072x
Change-Id: I9a0eb611a4e0d861b7d47d4944b93203f823738b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-11-22 15:16:38 +08:00
Weiguo Hu
e63a92198b net: rfkill-bt: control bt host wake when power on bt
some broadcom bt chip need bt host wake is high level when power on,
like ap6356

Change-Id: I509268b84d22b8c17a0996cdd3b2c3e4e05af1bb
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2019-11-22 14:54:53 +08:00
Tao Huang
b8f2e67cb1 rk: add scripts/clang-wrapper.py
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic51c803563c9f32080c7ee93077d22469cb47df5
2019-11-22 12:43:07 +08:00
Tao Huang
591d2512ef ARM: dts: rockchip: rk3126-bnd-d708: fix clang warning
In file included from arch/arm/boot/dts/rk3126-bnd-d708.dts:7:
arch/arm/boot/dts/rk3126-bnd-d708.dtsi:558:38: warning: '/*' within block comment [-Wcomment]
                                /* <2 RK_PB1 1 &pcfg_pull_none>, /* HSYNC */
                                                                 ^

Change-Id: Id05936c12f3cbad6bcbf9ed5a4eacb149e8bc5d4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-22 12:24:51 +08:00
Finley Xiao
6795fd4467 clk: rockchip: add a COMPOSITE_HALFDIV_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: I1c97f7464c3c80ea6dbd7d4052565dd4e35c0931
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-11-22 11:09:39 +08:00
Tao Huang
1470eea92e ARM: rockchip_defconfig: CONFIG_FRAME_WARN=1280
Avoid clang warning:

s/select.c:594:5: warning: stack frame size of 1056 bytes in function 'core_sys_select' [-Wframe-larger-than=]
int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
    ^
net/core/ethtool.c:2628:5: warning: stack frame size of 1216 bytes in function 'dev_ethtool' [-Wframe-larger-than=]
int dev_ethtool(struct net *net, struct ifreq *ifr)
    ^

Change-Id: Id2d961993e9823fe74854d33cd24d28869a541ef
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-22 10:01:24 +08:00
Tao Huang
e54e597dbf input: touchscreen: vtl_ts: fix clang warning
drivers/input/touchscreen/vtl_ts/vtl_ts.c:52:31: warning: unused variable 'thread_running_flag' [-Wunused-variable]
static volatile unsigned char thread_running_flag =0;
                              ^

Change-Id: Ibaafeff284140a42ccca8a21f455fa5baeb178b6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-11-22 09:58:11 +08:00