Commit Graph

607027 Commits

Author SHA1 Message Date
Shawn Lin
3cd33bec92 arm64: dts: rockchip: correct ep-gpios for rk3399 sapphire PCIe slot
Change-Id: I349d7f9267e50d90afb12902ee4ced98f8e4cfa5
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-09 14:19:08 +08:00
Algea Cao
762aa32d74 ARM: dts: rk3288-android: Add hdmi route
Change-Id: I0c0848abac414b1c03afc564a2375e12ec9ab422
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-02-09 11:32:08 +08:00
Binyuan Lan
f29923d120 arm64: dts: rockchip: add headset detect for rk3326
Change-Id: Ia816a8f8fdcdd2265841965a59654e3b5f13cc06
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-09 11:28:13 +08:00
Zorro Liu
caf5f86288 Revert "drivers: input: sensors: reset sensor rate"
This reverts commit 3726b810fe.

Change-Id: I23692bb090f5a1c946b57071366d4611bc3d7189
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-09 11:24:29 +08:00
Zorro Liu
a5e68c507a drivers: input: sensors: add gsensor stk8baxx
Change-Id: I983df89f746e42221009e9123116900041b9a06a
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-09 11:24:13 +08:00
Zhangbin Tong
c170469b8b arm64: dts: rockchip: add rk3328-rock64 android support
Change-Id: Ibc0ce72839858c391280ea109aa731877e6b0928
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-02-09 11:22:58 +08:00
Finley Xiao
7ba436d229 arm64: dts: rockchip: px30: Change bus and peri to sign off frequency
Change-Id: Ie40eb2610b277b1f7e257fdd6e8f578373b0294e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-09 11:10:06 +08:00
Finley Xiao
ea8b9e13c2 clk: rockchip: rk3328: Fix aclk_gmac select register
Change-Id: Ie800d876644f1a7abac3f7d7f8352ba405a9537a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-09 11:09:56 +08:00
Simon Xue
ed2deb3957 iommu/rockchip: return -ENODEV when a disabled iommu node is referenced by master
When a disabled iommu node is referenced by a master which cause the previous iommu nodes
removed from the iommu group, finally cause kernel crash, return -ENODEV instead -EPROBE_DEFER
if iommu node disabled can fix this issue

Change-Id: I3adf3f4119ff6fff0a2068301338813f5aca8969
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-02-09 11:08:29 +08:00
Finley Xiao
5be2cb19cf soc: rockchip: power-domain: Add support to ignore on/off
Change-Id: I96c3ae8ae53b9ae95f6f896363b761798a534821
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-09 11:07:58 +08:00
Liang Chen
36e2b2b2f0 arm: dts: fix reg length err for rk322x
RK322x is a 32-bit SoC, the length of register is 32-bit.

Change-Id: I3fe506b0f9c7f8ec70a56863f95decdc12e61e85
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-09 11:07:30 +08:00
Liang Chen
602e41b469 arm: dts: enable arm arch virtual timer for rk322x
Change-Id: I355c0cd558484cb7fbe96d4c462329ece62348af
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-09 10:27:51 +08:00
Liang Chen
405105146f arm: dts: enable arm arch virtual timer for rk312x
Change-Id: Ife287d9b1de02dfeb75fbb202d4b4e1825af0c2f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-09 10:27:49 +08:00
Liang Chen
816e9c3358 arm: dts: move memory of ramoops to 46M for rk312x/rk322x
We put memory of ramoops on 46M from now on for arm32, beacause some
board only have 128M memory.

Change-Id: Ie94a7619bfe006e196d3269711a499acbd7c87b9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-09 10:27:48 +08:00
Zheng Yang
1ec3c33942 phy: rockchip: inno-hdmi: fix 3328 phy status with uboot logo on
If hdmi phy had been set in uboot, it's need to set power_count
to 1 to match actutal phy status.

This patch use regc8 bit[7:6] to detect phy is set in uboot or not.
After phy power up, value will be zero which is different to its
default value(2'b11).

Change-Id: I6e5deea1d5a0973788c39a200d5c5a0f6a14bdd2
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-02-09 10:13:48 +08:00
Binyuan Lan
d86b2eeb56 arm64: rockchip_defconfig: add CONFIG_SND_SOC_RK817
Change-Id: I3771ee617de44d9cfd8d142fc66ca5ea8df64899
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-08 21:15:51 +08:00
William Wu
51246818af arm64: dts: rockchip: remove HCLK_HOST_ARB from usb host for px30
The HCLK_HOST_ARB is enabled with CLK_IGNORE_UNUSED flag,
so we don't need to control this clk in usb host EHCI and
OHCI controller driver.

Change-Id: I25201170977b30f904611bbcfdcb1eb6230195fe
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-08 21:13:52 +08:00
Feng Mingli
cdfac2ac67 usb: dwc_otg_310: hcd: Giveback URB in tasklet context
In commit 94dfd7edfd ("USB: HCD: support giveback of URB in tasklet
context") support was added to give back the URB in tasklet context.
Let's take advantage of this in dwc_otg_310.

This speeds up the dwc_otg_310 interrupt handler considerably, it means
we've got a better chance of not missing SOF interrupts.

TEST=Unable to preview yuyv format usb camera on rk3288 board when use
dwc usb controller because of missing SOF interrupts.

Change-Id: I52194d7fbddaf684c601d328e2a3c0f28fcb83b8
Signed-off-by: Feng Mingli <fml@rock-chips.com>
2018-02-08 21:12:13 +08:00
William Wu
109121e68d FROMLIST: usb: gadget: f_fs: Use config_ep_by_speed()
In commit 2bfa0719ac ("usb: gadget: function: f_fs: pass
companion descriptor along") there is a pointer arithmetic
bug where the comp_desc is obtained as follows:

 comp_desc = (struct usb_ss_ep_comp_descriptor *)(ds +
	       USB_DT_ENDPOINT_SIZE);

Since ds is a pointer to usb_endpoint_descriptor, adding
7 to it ends up going out of bounds (7 * sizeof(struct
usb_endpoint_descriptor), which is actually 7*9 bytes) past
the SS descriptor. As a result the maxburst value will be
read incorrectly, and the UDC driver will also get a garbage
comp_desc (assuming it uses it).

Since Felipe wrote, "Eventually, f_fs.c should be converted
to use config_ep_by_speed() like all other functions, though",
let's finally do it. This allows the other usb_ep fields to
be properly populated, such as maxpacket and mult. It also
eliminates the awkward speed-based descriptor lookup since
config_ep_by_speed() does that already using the ones found
in struct usb_function.

Fixes: 2bfa0719ac ("usb: gadget: function: f_fs: pass
companion descriptor along")

Change-Id: Ic3f6297781571268a0b6b1b3f0a04b70d7fa7a68
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://www.spinics.net/lists/linux-usb/msg165149.html)
2018-02-08 21:12:13 +08:00
John Keeping
984ae2a17b UPSTREAM: usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT
The specification says that the Reserved1 field in OS_DESC_EXT_COMPAT
must have the value "1", but when this feature was first implemented we
rejected any non-zero values.

This was adjusted to accept all non-zero values (while now rejecting
zero) in commit 53642399aa ("usb: gadget: f_fs: Fix wrong check on
reserved1 of OS_DESC_EXT_COMPAT"), but that breaks any userspace
programs that worked previously by returning EINVAL when Reserved1 == 0
which was previously the only value that succeeded!

If we just set the field to "1" ourselves, both old and new userspace
programs continue to work correctly and, as a bonus, old programs are
now compliant with the specification without having to fix anything
themselves.

Change-Id: I7fe3d54ce649049ad0a1db4564319af03488ad48
Fixes: 53642399aa ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT")
Cc: <stable@vger.kernel.org>
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit a3acc69608)
2018-02-08 21:12:13 +08:00
Andrew Gabbasov
bb16981daa UPSTREAM: usb: gadget: f_fs: Fix use-after-free in ffs_free_inst
KASAN enabled configuration reports an error

BUG: KASAN: use-after-free in ffs_free_inst+... [usb_f_fs] at addr ...
Write of size 8 by task ...

This is observed after "ffs-test" is run and interrupted. If after that
functionfs is unmounted and g_ffs module is unloaded, that use-after-free
occurs during g_ffs module removal.

Although the report indicates ffs_free_inst() function, the actual
use-after-free condition occurs in _ffs_free_dev() function, which
is probably inlined into ffs_free_inst().

This happens due to keeping the ffs_data reference in device structure
during functionfs unmounting, while ffs_data itself is freed as no longer
needed. The fix is to clear that reference in ffs_closed() function,
which is a counterpart of ffs_ready(), where the reference is stored.

Change-Id: Ia7d30dfe643ef5de184620b483ef3ad16a76d309
Fixes: 3262ad8243 ("usb: gadget: f_fs: Stop ffs_closed NULL pointer dereference")
Cc: stable@vger.kernel.org
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit cdafb6d8b8)
2018-02-08 21:12:13 +08:00
Jim Baxter
67bb2799fb UPSTREAM: usb: gadget: f_fs: Stop ffs_closed NULL pointer dereference
The struct ffs_data::private_data has a pointer to
ffs_dev stored in it during the ffs_fs_mount() function
however it is not cleared when the ffs_dev is freed
later which causes the ffs_closed function to crash
with "Unable to handle kernel NULL pointer dereference"
error when using the data in ffs_data::private_data.

This clears this pointer during the ffs_free_dev clean
up function.

Change-Id: I1fde26421cb44084d73e8c2a1786ea3f09f952fc
Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 3262ad8243)
2018-02-08 21:12:13 +08:00
Vincent Pelletier
411314c56d UPSTREAM: usb: gadget: f_fs: Fix iterations on endpoints.
When zero endpoints are declared for a function, there is no endpoint
to disable, enable or free, so replace do...while loops with while loops.
Change pre-decrement to post-decrement to iterate the same number of times
when there are endpoints to process.

Change-Id: Ia6cb1324ce5acdab00677181475b34ab5731f578
Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 08f37148b6)
2018-02-08 21:12:13 +08:00
Jim Lin
9fac9f59aa UPSTREAM: usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT
Current __ffs_data_do_os_desc() of f_fs.c will check reserved1 field
of OS_DESC_EXT_COMPAT and return -EINVAL if it's 1.
But MS OS 1.0 Descriptors
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx
defines that field to be 1.

Change-Id: I9a3c7cf148c161ff1f0f8e798208a196c4aca3d2
Signed-off-by: Jim Lin <jilin@nvidia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 53642399aa)
2018-02-08 21:12:13 +08:00
William Wu
2f0ec89e19 Revert "usb: gadget: f_fs: Update driver to handle compat id descriptors"
This reverts commit 548b453dcc which
is replaced with the upstream commit 53642399aa ("usb: gadget: f_fs:
Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT").

Change-Id: I34e0f68d1e54a1852d021ee3ef78e3944fea675f
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-08 21:12:13 +08:00
Binyuan Lan
63c07f8a39 arm64: dts: rockchip: add rk817 codec for rk3326
Change-Id: I8d86246b8e75ae028ba0f1d9b58c8facd2816556
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-08 21:01:14 +08:00
Binyuan Lan
8c4db84a0a ASoC: rockchip: add support for rk817 codec
Change-Id: I4fd64900d3ac0e573371af5ba47a3cb7b83a7c93
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-02-08 21:00:48 +08:00
Sugar Zhang
7a53209b74 ARM: configs: rockchip_defconfig: add rk3228 internal codec
Change-Id: I7f6cf60a7881a3452a92ce08f9637e52f93627f8
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-08 18:16:11 +08:00
Sugar Zhang
245adad7ad ARM: dts: rockchip: rk3229-evb: add internal sound card
Change-Id: I60fe52867a60548dbe2d476b2fc161fc13ec8fc1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-08 18:16:11 +08:00
Sugar Zhang
4d4dfc7e3c ARM: dts: rockchip: rk322x: add internal codec
Change-Id: I3d376232d02770c72be396487a7481fe8fcbede5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-08 18:16:11 +08:00
Sugar Zhang
02213b12e1 ASoC: codec: add rk3228 internal codec
Change-Id: Icf83257726f12558cbdde4d4b2876dc8a3123626
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-08 18:16:11 +08:00
Zhou weixin
92b2aac00e arm64: dts: rockchip: Disabeld cif for rk3326 evb board
Change-Id: Iebd5858561720521a863bacf5331ace3b89d1150
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-02-08 18:13:36 +08:00
David Wu
ff72078491 arm64: dts: rockchip: Fix some adc key issues for rk3326/px30 board
1. add vref voltage 1.8v;
2. Alphabetical order;
3. Fix the press-threshold-microvolt;
4. Add poll interval 100ms

Change-Id: If5e29f5073155be3022053cc3516dda88c5db223
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-08 18:12:35 +08:00
David Wu
bbdfca3f4f arm64: configs: Enable CONFIG_KEYBOARD_ADC config for rockchip_defconfig
Change-Id: Ibb1deaeadc13186f12251a8596c8dd214bd0c12b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-08 18:11:56 +08:00
Sandy Huang
bc11949511 drm/rockchip: vop: fix iommu pagefault
This version vop will read buffer when win2 master0-3 disable but
win2 enable, this is different from old vop version. so we add to
disable win2 en to make sure it's save.

Change-Id: Ib239a8901095a6eff980747f219c3aa585437dae
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-02-08 18:11:33 +08:00
Putin Lee
230ab0bd6c arm64: dts: rockchip: px30: add SCLK_RGA_CORE for rk_rga.
Change-Id: Ib183606bbd1a4ac2c9669100a6634aca45bcfb5e
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2018-02-08 15:31:57 +08:00
Zhang Yunlong
6b1070e646 camera: rockchip: cif: support multi camera config
fix gpio_desc request fail when multi cameras defined in dts.

Change-Id: I058ea1284ef86fcea621197367e426f018853936
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-02-08 14:57:10 +08:00
YouMin Chen
56dfe1fdbe arm64: dts: rockchip: add px30 ddr relate node
Change-Id: I33119ba0250c6c9fe78d124bf92a94a52f9442bf
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-02-08 14:56:22 +08:00
YouMin Chen
3f9d4749de PM / devfreq: event: add support for px30 dfi
Change-Id: Ib6808d961b65d993fea05ab15d648d814d14a4a2
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-02-08 14:53:27 +08:00
YouMin Chen
8865f61ad2 PM / devfreq: rockchip_dmc: add support for px30
Change-Id: I225088ce179f9b9cd62fce256b87bccb591fd2b2
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-02-08 14:52:32 +08:00
YouMin Chen
326d6f59d1 clk: rockchip: px30: Add SCLK_DDRCLK for dmc
Change-Id: I03d6c18829f8895c28bbaef883e187304c48f9aa
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-02-08 14:52:26 +08:00
Huibin Hong
53d9e933bc fiq_debugger: rockchip: deal with this_cpu and current_cpu are different
If this cpu is not the same as current cpu, it means we don't use
current cpu any more, and this cpu handles uart interrupt. So it
is unnecessary to set uart interrupt to this cpu again.

Change-Id: Ia454af96ee766dcbc8b22339652a4aa7eb229568
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-02-08 14:29:02 +08:00
Zorro Liu
92d992f480 arm64: dts: rockchip: modified sensor layout of rk3326-evb-lp3-v10 board
Change-Id: Ib8fbddaf02f0e3d77f230e6ff44f0613ff12d822
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-02-08 14:22:43 +08:00
Zhou weixin
70d0347a0b arm64: dts: rockchip: enable vip for rk3326 863 board
Change-Id: Ied60270696bc0dfd0dc41937c1e24b289e6063f5
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-02-08 14:22:20 +08:00
Zhong Yichong
2c20095fea arm64: dts: rockchip: px30: add vip iommu node reference to vip node
Change-Id: Ic2772881a47aeb25ff68e2a39f3895e40db70a42
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-08 14:21:28 +08:00
Sugar Zhang
65c32d2028 arm64: dts: rockchip: px30: add default pinctrl for i2s, pdm
Change-Id: I5cf7436e65c04a30cc3ef4c89ee49e1e76ef0527
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-02-08 14:20:41 +08:00
Finley Xiao
8ee4287ff7 clk: rockchip: px30: Make pclk_top_pre critical
Change-Id: I86081f6dbd85ab36e0e83b5b22fdd7b686a2cf9d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-08 14:10:58 +08:00
Caesar Wang
e2e86394f6 arm64: rockchip_linux_config: enable the cdn DP
Change-Id: I2b9812be9a33b31e7b9e9531f5c1acd2c8dc53a2
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-08 13:42:26 +08:00
Caesar Wang
628c1aeb34 arm64: dts: rockchip: enable cdn DP for rk3399 sapphire
As we had posted the DP firmeware to /lib/firmware/rockchip,
so you need check this path in your rootfs first, if enable the DP.

Change-Id: Id24a42edc9d6cd0b0de0a2dfefe2727df3965b67
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-08 13:42:20 +08:00
Rocky Hao
f417571488 PM / devfreq: rockchip_dmc: record opp rate instead of real clock rate
opp rate is used to calc power in thermal framework, so we record this rate
instead of real clock rate.

Change-Id: Ic51a8c36be8d63fcf765e6d49930d1d437a2e502
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-02-08 09:47:01 +08:00