Commit Graph

614141 Commits

Author SHA1 Message Date
Sugar Zhang
a7d7fb454d ARM: dts: rockchip: add rv1108-minievb-v10.dts
This patch add support for rv1108 minievb v10 board.

Change-Id: I579ce78c1c4d3ebaebf25f5aa0a22413799ed06d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-17 14:47:22 +08:00
Sugar Zhang
04ed04fc82 ARM: dts: rockchip: add core dtsi for rv1108
rv1108 is a high performance low power application processor.
embedded with a new generation DSP for digital process and an
arm cortex-a7 single core processor for system and application.

Change-Id: I56f9537467042aa512fb27de974d5ae7dc2ed669
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-17 14:44:11 +08:00
Sugar Zhang
b4f93f7e7b clk: rockchip: add clock controller for rv1108
This patch add the clock tree definition for rv1108.

Change-Id: I9b55cd46c62331057fe8a404c606fe9d08f03388
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-17 14:38:47 +08:00
Sugar Zhang
dae1e6294f clk: rockchip: add dt-binding header for rv1108
Change-Id: I15f39d705c2ab7a19c2f0f7c9c804073ee23631d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-12-17 14:33:56 +08:00
Nickey Yang
7369672155 drm/rockchip: vop: rk312x: add missing config for dclk_pol and en
Change-Id: Ica43ea70163f115c3344f480b9374a81c3c524ce
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-17 09:59:30 +08:00
Liang Chen
d630b488a5 drivers: cpufreq_interactive: recover tunables when switch governor
Android will switch governor between different applications, so we
must recover tunables for interactive governor.

Change-Id: Ieb3d1f46ec628bf0a70d2656b63dd255f36770e0
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-12-14 17:20:15 +08:00
Hu Kejun
cb38ae649b ARM: dts: rk3288-rkisp1: add interrupt name
Change-Id: Ie9d58d68ec857821a1645741899fb58f3db1a096
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:13:49 +08:00
Hu Kejun
1dad3d275a arm64: dts: rockchip: rk1808: add mi/mipi irq setting
Change-Id: I2025e6de06f0aec1e18289bf0eec8445d5a11820
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:13:22 +08:00
Hu Kejun
4b7f84b478 arm64: dts: rockchip: rk3399: add interrupt name for rkisp
Change-Id: If942773bb18b55463cdd2137493f6573ce747893
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:12:58 +08:00
Hu Kejun
89212f02e2 arm64: dts: rockchip: px30: add mi/mipi irq setting
Change-Id: I2146d37c18d8418b32cf13736ecccb0510a851d9
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:12:40 +08:00
Hu Kejun
993dd376b8 media: rockchip: isp1: request isp irqs independently
Change-Id: Ia43930306e41d6475cddcfb1a80a41c848d38ecc
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:12:34 +08:00
Hu Kejun
fb05f0421c camera: rockchip: add ov5640 driver
Change-Id: I6113fc659ae4eb971aa60774ebb90a106e94f06e
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:12:09 +08:00
Hu Kejun
e9d7e12f68 media: rockchip: isp1: add version number
Change-Id: I4b86a96a2242c97f56ff3e053dafa73ae234184d
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-14 17:11:03 +08:00
Chen Lei
5d239ed3da ARM: dts: rk322x: sdmmc add cd-gpios
This modification is to solve the problem of hot plug failure when
SD card is inserted after boot, because det pin is initialized as GPIO

Change-Id: I1cd49faa92fa7502c23dd30c2c35fa712e5d0ea3
Signed-off-by: Chen Lei <lei.chen@rock-chips.com>
2018-12-14 17:08:54 +08:00
Simon Xue
835986100e arm64: dts: rockchip: rk1808: Add missing inbound/outbound win nums
Change-Id: Ibd85ca71f7d6c87d0461eff2ba6dada6b0862040
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-12-14 14:57:20 +08:00
Weixin Zhou
7c3dcf45c5 arm64: dts: rockchip: rk3399pro-evb-v11: set vdd_center off in suspend
Change-Id: I6b9c51a0f036a31b51b69b5f8d1d374511135c10
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-12-14 14:42:55 +08:00
Simon Xue
e8aec0b3a6 PCI: rockchip: Support PCIe training controlled by userspace
Change-Id: I875ea3f3558cb1c3ef4b0a821d51f56a3f8431ae
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-12-14 11:43:12 +08:00
Simon Xue
37091a2c50 PCI: rockchip: Support PCIe dma transfer on RK3399 platform
Change-Id: I8545ddb459b8275489fa9b7a70e54c6b57cc514c
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-12-14 11:43:04 +08:00
Simon Xue
e3e8b9874a PCI: rockchip: enable uDMA interrupt on RK3399 platform
Change-Id: I2ee4cd5de4aa7b4e067b2b8015a833706392e5bd
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-12-14 11:40:32 +08:00
Simon Xue
e5ac47b69e PCI: rockchip: Support DW PCIe dma transfer
Change-Id: I52cb60b22919faadfb83d2026a1dd61c01d48fe5
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-12-14 11:40:25 +08:00
Alex Zhao
409cd1d0b9 net: wireless: update bcmdhd driver to "1.579.77.41.10 (r)"
Change-Id: I8c8c1f7e6b9e9b686eeebb404f5fae061bbad361
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2018-12-14 11:37:28 +08:00
Sudeep Holla
7f34408740 UPSTREAM: drivers: firmware: psci: unify enable-method binding on ARM {64,32}-bit systems
Currently ARM CPUs DT bindings allows different enable-method value for
PSCI based systems. On ARM 64-bit this property is required and must be
"psci" while on ARM 32-bit systems this property is optional and must
be "arm,psci" if present.

However, "arm,psci" has always been the compatible string for the PSCI
node, and was never intended to be the enable-method. So this is a bug
in the binding and not a deliberate attempt at specifying 32-bit
differently.

This is problematic if 32-bit OS is run on 64-bit system which has
"psci" as enable-method rather than the expected "arm,psci".

So let's unify the value into "psci" and remove support for "arm,psci"
before it finds any users.

Reported-by: Soby Mathew <Soby.Mathew@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
(cherry picked from commit 978fa43623)

Change-Id: Ie75091185d9236595c564081083ffc202f9ba178
2018-12-13 18:08:05 +08:00
Lin Jianhua
1c6ad43bbc arm64: dts: rockchip: add uboot wide temperature node for rk3308k
Change-Id: Ie9f907fda41a70b9e8527f0aa7f4e28215928b17
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-12-13 14:28:04 +08:00
Shixiang Zheng
46d6a1ae32 video/rockchip: rga2: add RGA_CACHE_FLUSH command mode
Change-Id: I9b54155fa85fa394a7eb816c48c71523786d6867
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2018-12-13 10:01:44 +08:00
Zorro Liu
9aa48044f7 arm64: dts: rockchip: add display proterty "pixelclk-active" for rk3368-xikp and rk3368-p9 boards
Change-Id: I86f85d8d35b04a9c7de41c083816f5ed00d6435d
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-12-13 09:29:03 +08:00
Weixin Zhou
29d4a50b70 arm64: dts: rockchip: add dts file for RK3399Pro evb v11
Add support for RK3399Pro evb rev11.

Change-Id: I5842ed747f80fafc3beacb5d449c77cf27605af4
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-12-12 20:43:51 +08:00
Zorro Liu
0bd274f4c7 arm64: dts: rockchip: add rk3368-xikp-avb and rk3368-p9-avb board files
Change-Id: Ie9b8a9e95cfdd108ec22141d1cff5b11736d6234
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-12-12 20:37:05 +08:00
Zorro Liu
a67f509e88 arm64: dts: rockchip: rk3368: move firmware_android node from android.dtsi to dts files
Change-Id: I738445395c01fa896071610c1b279afc84448d41
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-12-12 20:37:05 +08:00
Hu Kejun
88f7ff2b04 media: i2c: add ov2718 driver with hdr and linear mode
Change-Id: I534793509a0f607e46822763e97b07d33a138dcb
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-12 17:24:29 +08:00
Hu Kejun
784baba614 media: rockchip: isp1: add ioctl for hdr
Change-Id: I6aa26828a1da063be9f24cd02c5fefd84988d04a
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-12 17:24:29 +08:00
Hu Kejun
c0202e0bc5 media: spi: add driver for rk1608
Change-Id: I8508668fcd1e35c49fe581875fcf9045e004ae9c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-12 17:24:29 +08:00
Wang Panzhenzhuan
642bed250f media: i2c: add gc2355 driver for rkisp1
Change-Id: I500c7133fa98b5b98d074408d4f08c39f57f5c38
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2018-12-12 15:31:45 +08:00
Bin Yang
444ca5e657 arm64: dts: rockchip: fix vbus-5v-gpios flags for rk3399 platforms
Fusb302 driver uses gpiod_set_value() to control VBUS, so vbus-5v-gpios
flags should be used correctly in device tree.

Change-Id: Ie7f0d1d290750bbf4207c1bc5665e4a0427a7a97
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2018-12-12 15:04:03 +08:00
Bin Yang
a45a91483c mfd/fusb302: cleanup vbus gpio
Currently driver uses gpiod_set_raw_value() to control VBUS, which unable
to parse flags 'GPIO_ACTIVE_LOW' in device tree. We cannot ensure that
vbus-gpio will be designed to active-high in all products. So we should
use the gpiod_set_value() to control VBUS, and also gpio flags be used
correctly in device tree synchronously.

Change-Id: I94d143dde7b44d89b5593fbb5014859fedb83b04
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2018-12-12 15:04:03 +08:00
Elaine Zhang
4604ed7218 clk: rockchip: rk3399: export SCLK_I2SOUT_SRC clk ID for i2s
Change-Id: Ifbcea830e5f49946c1feea3f51d125e6ed566d5f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-12 15:03:25 +08:00
Russell King
b5eac72e73 UPSTREAM: ARM: spectre-v1: mitigate user accesses
Spectre variant 1 attacks are about this sequence of pseudo-code:

	index = load(user-manipulated pointer);
	access(base + index * stride);

In order for the cache side-channel to work, the access() must me made
to memory which userspace can detect whether cache lines have been
loaded.  On 32-bit ARM, this must be either user accessible memory, or
a kernel mapping of that same user accessible memory.

The problem occurs when the load() speculatively loads privileged data,
and the subsequent access() is made to user accessible memory.

Any load() which makes use of a user-maniplated pointer is a potential
problem if the data it has loaded is used in a subsequent access.  This
also applies for the access() if the data loaded by that access is used
by a subsequent access.

Harden the get_user() accessors against Spectre attacks by forcing out
of bounds addresses to a NULL pointer.  This prevents get_user() being
used as the load() step above.  As a side effect, put_user() will also
be affected even though it isn't implicated.

Also harden copy_from_user() by redoing the bounds check within the
arm_copy_from_user() code, and NULLing the pointer if out of bounds.

Change-Id: I7598d2a637267b5979a7013cf450a80caaa2044f
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a3c0f84765)
2018-12-12 11:05:36 +08:00
Russell King
042dc8706f UPSTREAM: ARM: spectre-v1: use get_user() for __get_user()
Fixing __get_user() for spectre variant 1 is not sane: we would have to
add address space bounds checking in order to validate that the location
should be accessed, and then zero the address if found to be invalid.

Since __get_user() is supposed to avoid the bounds check, and this is
exactly what get_user() does, there's no point having two different
implementations that are doing the same thing.  So, when the Spectre
workarounds are required, make __get_user() an alias of get_user().

Change-Id: I32e38a7635961822ffadaad256caf9a34268bd2a
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit b1cd0a1480)
2018-12-12 11:05:36 +08:00
Russell King
ef18c704fd UPSTREAM: ARM: use __inttype() in get_user()
Borrow the x86 implementation of __inttype() to use in get_user() to
select an integer type suitable to temporarily hold the result value.
This is necessary to avoid propagating the volatile nature of the
result argument, which can cause the following warning:

lib/iov_iter.c:413:5: warning: optimization may eliminate reads and/or writes to register variables [-Wvolatile-register-var]

Change-Id: I2663f38f5a278c8406793dc7c8b88403ee6918b1
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit d09fbb327d)
2018-12-12 11:05:36 +08:00
Russell King
f34156cac3 UPSTREAM: ARM: oabi-compat: copy semops using __copy_from_user()
__get_user_error() is used as a fast accessor to make copying structure
members as efficient as possible.  However, with software PAN and the
recent Spectre variant 1, the efficiency is reduced as these are no
longer fast accessors.

In the case of software PAN, it has to switch the domain register around
each access, and with Spectre variant 1, it would have to repeat the
access_ok() check for each access.

Rather than using __get_user_error() to copy each semops element member,
copy each semops element in full using __copy_from_user().

Change-Id: I7174992c0c63cb5f4f191b1961519e0d3c7a72e5
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 8c8484a1c1)
2018-12-12 11:05:36 +08:00
Russell King
e64f679fe3 UPSTREAM: ARM: vfp: use __copy_from_user() when restoring VFP state
__get_user_error() is used as a fast accessor to make copying structure
members in the signal handling path as efficient as possible.  However,
with software PAN and the recent Spectre variant 1, the efficiency is
reduced as these are no longer fast accessors.

In the case of software PAN, it has to switch the domain register around
each access, and with Spectre variant 1, it would have to repeat the
access_ok() check for each access.

Use __copy_from_user() rather than __get_user_err() for individual
members when restoring VFP state.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
(cherry picked from commit 42019fc50d)

Change-Id: I978369093e075213b01e27aff3c633acfb3592be
2018-12-12 11:05:36 +08:00
Russell King
607844100f UPSTREAM: ARM: signal: copy registers using __copy_from_user()
__get_user_error() is used as a fast accessor to make copying structure
members in the signal handling path as efficient as possible.  However,
with software PAN and the recent Spectre variant 1, the efficiency is
reduced as these are no longer fast accessors.

In the case of software PAN, it has to switch the domain register around
each access, and with Spectre variant 1, it would have to repeat the
access_ok() check for each access.

It becomes much more efficient to use __copy_from_user() instead, so
let's use this for the ARM integer registers.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
(cherry picked from commit c32cd419d6)

Change-Id: I3e285582bedc3973ca0cc08d63562d71aad2f520
2018-12-12 11:05:36 +08:00
Russell King
44bca95698 UPSTREAM: ARM: spectre-v1: fix syscall entry
Prevent speculation at the syscall table decoding by clamping the index
used to zero on invalid system call numbers, and using the csdb
speculative barrier.

Change-Id: Idce90686d2e49703c5794c81b9bc9a41d93cc658
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 10573ae547)
2018-12-12 11:05:36 +08:00
Russell King
7a633b2249 UPSTREAM: ARM: spectre-v1: add array_index_mask_nospec() implementation
Add an implementation of the array_index_mask_nospec() function for
mitigating Spectre variant 1 throughout the kernel.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
(cherry picked from commit 1d4238c56f)

Change-Id: I69fc8c673578a937a06cfdf85ae73492d25d069f
2018-12-12 11:05:35 +08:00
Russell King
76e84854a6 UPSTREAM: ARM: spectre-v1: add speculation barrier (csdb) macros
Add assembly and C macros for the new CSDB instruction.

Change-Id: If7ff45e33cc2386702b6e76636a6c5fa665dccdd
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a78d156587)
2018-12-12 11:05:35 +08:00
Russell King
58d750babb UPSTREAM: ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
Add a Kconfig symbol for CPUs which are vulnerable to the Spectre
attacks.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Boot-tested-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit c58d237d08)

Change-Id: I69c87355f2f691f0679df63e3d2cdf5570e5e35b
2018-12-12 11:05:35 +08:00
Hans Verkuil
d1dbde442d UPSTREAM: [media] media Kconfig: improve the spi integration
The SPI driver looked a bit lonely in the config menu, and it didn't
support the autoselect. Shift things around a bit so it looks more logical.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 8283a09299)

Change-Id: I8f67aa29dffe477b349b0a503b6db7abfd2357ec
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-12-11 17:33:28 +08:00
Charles-Antoine Couret
dc08c1afb9 UPSTREAM: [media] Add GS1662 driver, a video serializer
You can read datasheet here:
http://www.c-dis.net/media/871/GS1662_Datasheet.pdf

It's a component which supports HD and SD CEA or SDI formats
to SDI output. It's configured through SPI bus.

GS1662 driver is implemented as v4l2 subdev.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 7aae6e2df1)

Change-Id: I1ae9065fc91aae13c4498eece89458831e20499d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-12-11 17:32:16 +08:00
Lin Jianhua
65f4a3e028 ARM: dts: rockchip: add voice module boards v11 for RK3308
Separate the power supply to arm&logic, arm freq support 1.2G,
disable vad and include rk3308k.dtsi

Change-Id: I91516773e74fd098117bfdcf8213803e19cf7527
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-12-11 17:20:17 +08:00
Lin Jianhua
60c60b8c57 ARM64: dts: rockchip: rk3308: add rk3308k dtsi use to support wide temperature chip
Ambient temperature range: -20~85
Supported chips: RK3308K/RK3308GK/RK3308BK/RK3308HK

Change-Id: I40f23e20b2323a5a7d93cd022382b5eda9b6a3a0
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-12-11 17:20:07 +08:00
XiaoDong Huang
ec2157254d arm64: rk1808_linux_defconfig: enable CONFIG_PINCTRL_RK805
Change-Id: Ie96bf3b38cb9db86ad1a5ba203033a242abb48f6
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-12-11 17:04:52 +08:00