Commit graph

605,924 commits

Author SHA1 Message Date
Sandy Huang
6802789fb9 drm/rockchip: vop: post vsize should be 2 align when in interlace mode
Change-Id: I154f8fcb97e9f54f5a3c0254c05ff9c6505dd965
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-26 18:39:58 +08:00
Sandy Huang
c6fe4ba3a0 drm/rockchip: vop: fix hdmi swith color mode lead to post csc error
Change-Id: Iff1e6369c02ca585a8973a5d2d68a20a8701c6b1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-26 18:39:58 +08:00
Sandy Huang
08bfd4ef4e drm/rockchip: px30 vop: add win layer selete
Change-Id: I7c4b63bf39266c91087fe493e0fa63d43093fadd
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-26 18:39:58 +08:00
Sugar Zhang
e222d0efb0 ASoC: rockchip: pdm: fix regmap_ops hang issue
This is because set_fmt ops maybe called when PD is off,
and in such case, regmap_ops will lead system hang.
enale PD before doing regmap_ops.

Change-Id: I86c04679c22e4763fd2539f88371ad1d33951723
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-01-26 18:33:43 +08:00
Zhou weixin
30ed75c6a1 arm64: dts: rockchip: add some peripheral configuration for px30-evb-ddr4-v10.dts
Change-Id: Ib06470461d3fb70c57c0f88724c29dec28237600
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-26 18:23:15 +08:00
Zhou weixin
121437d0c1 arm64: dts: rockchip: Using the open source ADC drivers for px30/rk3326 board
Change-Id: I1d80dc9f25ed92c380811ec54e748ca89931063e
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-26 15:50:46 +08:00
Finley Xiao
545c52479c clk: rockchip: px30: Add clock id for pclk_otp_phy
Change-Id: If9c368c6ff93d31f306ab16dbf49dd698f320f72
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-26 14:25:57 +08:00
Marc Zyngier
05365c87be FROMLIST: arm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12 and A17
In order to prevent aliasing attacks on the branch predictor,
invalidate the BTB on CPUs that are known to be affected when taking
a prefetch abort on a address that is outside of a user task limit.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git kpti
 commit a07373c8c365746583f25f49fee41b1bc0ff94b2)

CVE-2017-5715
Change-Id: I6b0db5fbf1d495b03560b665dca37c2834d6f3a9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-26 14:24:52 +08:00
Marc Zyngier
d3e24532c5 FROMLIST: arm: Add BTB invalidation on switch_mm for Cortex-A9, A12 and A17
In order to avoid aliasing attacks against the branch predictor,
some implementations require to invalidate the BTB when switching
from one user context to another.

For this, we reuse the existing implementation for Cortex-A8, and
apply it to A9, A12 and A17.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git kpti
 commit efcd0e857a656bbd1c1da15ff984ad6402332c61)

CVE-2017-5715
Change-Id: Ica839802de678a5456abadf09bb6434efd43da2c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-26 14:24:45 +08:00
David Wu
25cfc3a020 arm64: dts: rockchip: Enable gmac at px30*.dts level
Change-Id: I3d6b4cfc8daa51f52f8fadddcad0cde8b098c53e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-01-26 14:22:23 +08:00
David Wu
0134b9e70e arm64: dts: rockchip: Add px30 gmac node
Change-Id: Ib4f2ce280ace348c07c97ec8c61cea156f859785
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-01-26 14:22:23 +08:00
David Wu
8b23dec47f ethernet: stmmac: dwmac-rk: Add GMAC support for px30
Add constants and callback functions for the dwmac on px30 soc.
The base structure is the same, but registers and the bits in
them moved slightly, and add the clk_mac_speed for the select
of mac speed.

Change-Id: If1aeb2fbafb70a8cb68f9d26a97c5b2a46dcb90f
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-01-26 14:22:23 +08:00
xiaoyao
45270577c0 soc: rockchip: grf: support jtag switching for RK3128 Soc
Change-Id: I324e436adad9bb519cb17646b682d42aec783b06
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2018-01-26 10:52:09 +08:00
Jung Zhao
f83a17343d arm64: dts: rockchip: px30: add vpu_combo node
vpu_combo contain vpu & hevc sub node

Change-Id: I6bfd6b4eb0731fdc5dbc6ac63e2c121774309cbb
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-26 10:46:37 +08:00
Jerry Xu
ed6a5401ea drm/bridge: add support for adi adv7125
Change-Id: Ica6080548d9b4e3eb8ae4214b23fba97ba33775c
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-26 10:40:58 +08:00
Jerry Xu
041de7d0c1 Documentation: display: bridge: add adv7125 documentation
Change-Id: I637c8ffc9cd7f22a1bfabff109c5c87a42a30cd0
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-26 10:40:58 +08:00
Jerry Xu
92b345eb3e ARM: dts: rk3288-popmetal: Add RGB to VGA bridge support
Change-Id: I8a584752fb4fbfb4a247aa53e31c372d5fdf5103
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-26 10:40:19 +08:00
Jerry Xu
751b94a7e9 drm/bridge: add psave gpio control for dumb-vga-dac
Change-Id: If2c5402d842e13df4baf2d608718e0597f5d4ff7
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
2018-01-26 10:39:49 +08:00
Dingqiang Lin
1a0b9345e8 arm64: dts: rockchip: add nandc node for px30
Change-Id: Ifaa92e2d4ec1e35356a4051ae19084859149770e
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-01-26 09:26:26 +08:00
Zhang Yunlong
354664b4b4 arm64: dts: rockchip: px30: correct cif pinctrl place
Change-Id: I0181fe97e0528c3552f4cef25453f9c2f834f7c8
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-01-25 20:29:52 +08:00
Zhang Yunlong
a75b4427e1 arm64: dts: rockchip: px30: add cif and isp node
Change-Id: Ic6f6780acf315ab46bd1023f449ca2eca97132fe
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-01-25 18:28:20 +08:00
Zorro Liu
d35c257365 arm64: dts: rockchip: add sensor config for px30 and rk3326
Change-Id: I474977744146b72928a66ef4bd35858260de0364
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-01-25 18:21:19 +08:00
William Wu
b742b07e84 usb: dwc_otg_310: increase otg max_transfer_size to 128KB
The default value of the max_transfer_size is only 65535,
but according to the field of PktSizeWidth in GHWCFG3, the
otg controller on rockchip platforms can support max 512KB
transfer size. So we increase the otg max_transfer_size to
128KB, it can help to avoid dividing into two hardware
transmissions if the usb device class driver(e.g. f_mtp.c)
request to transfer more than 65535 Bytes data in a single
usb request.

Change-Id: Ic281965815e48e4a146a13f9d37f88a10ee0d33e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-01-25 15:09:20 +08:00
William Wu
c94093c84f usb: dwc_otg_310: pcd: fix out short packet handle
If there is more data in the request than we could fit into
a single hardware request, then check both of the following
conditions:

- ep->dwc_ep.xfer_len < ep->dwc_ep.total_len;
- deptsiz.b.xfersize == 0;

If ep->dwc_ep.xfer_len < ep->dwc_ep.total_len and deptsiz.b.xfersize
isn't zero, it means that we have received a short packet from
host, then we shouldn't setup transfer for next portion of
data.

This patch can fix the following issue:
Use MTP to transfer more than 4GB single file from PC to RK3368
tablet base on the follow conditions:

- Increase the default Tx/Rx buf size to 64K or more in f_mtp.c
- Set the core_params->max_transfer_size to 65535;

Without this patch, it will fail to transfer the file at the end
because the f_mtp driver is waiting for a short packet to signal
EOF for file sizes > 4 gig, but the dwc2 driver doesn't handle
the short packet.

Change-Id: I172d48d727da4b75153705ce6b60728203dd35ca
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-01-25 15:09:20 +08:00
Zhang Yunlong
b988a8dabd camera: rockchip: cif: oneframe mode support px30
Change-Id: Ic65a33cb9edb40e552ff0510ff9dbadb7eb9674f
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-01-25 14:41:54 +08:00
Algea Cao
1a3b8415bc drm/rockchip: Fix up cvbs NTSC timing
Change-Id: Ieb0491da7fdd5babf8b016d680111bee56cf6bff
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-01-25 14:37:01 +08:00
Tao Huang
717b50db3a gpio: remove unused rk drivers
Change-Id: I5422c234f695874d7585db80c1d8d47629332852
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 11:12:37 +08:00
Tao Huang
5bd9647081 mfd: remove unused rk-rk808 drivers
Change-Id: I3f20b66b9e1c426407d8a09b0a61f7445158f75c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 11:11:40 +08:00
Tao Huang
1992cc0e41 serial: remove unused rk drivers
Change-Id: If7356271263694862030136aed9b32016e6327e4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 11:11:32 +08:00
Tao Huang
8f5dace1e0 spi: remove unused rk drivers
Change-Id: Ib0eb7eb391637253cbe5f09f684ef2dc9a266b2e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 10:54:59 +08:00
Tao Huang
052b8beaa3 i2c: remove unused rk drivers
Change-Id: I7e198d811ec2163c28ac095d60e95f4e9ac702e3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 10:39:37 +08:00
Tao Huang
8f9e364c9c input: keyboard: remove unused rk29_keys driver
Change-Id: I4faf4e44cbfad2b3353d49baa75b3d21d9a01edf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-25 10:23:37 +08:00
Jung Zhao
1c67d0330a video: rockchip: vpu: remove extra lock
when power off, no need to lock/unlock reset_lock. and
if set reg failed, need to unlock reset_lock.

Change-Id: If0a50920504bb69f9fa13790e85af1830fda7946
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-25 10:14:14 +08:00
Jung Zhao
0d4515d3bb video: rockchip: vpu: add default power off when rk322x power off
Change-Id: I860a6624724468b1e61d56f9b638e2e300a81184
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-25 10:14:10 +08:00
Zhou weixin
b12504fad6 ARM: dts: rockchip: rk3126-bnd-d708: update system/vendor partition path
The new partition path is compatible with the following two partition names.
GTP partition: rknand0px
Old partition: rknand_X(rknand_system)

Change-Id: I993d42064bf4e093bfe01512db563f635baeff39
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-25 10:13:17 +08:00
zhangyunlong
df069b4939 camera: rockchip: camsys_drv: v0.0x22.4
Change-Id: I169afc59a55a4056da76d2bdd1a32fbf86d28658
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-01-25 10:03:41 +08:00
zhangyunlong
1cea76da68 camera: rockchip: camsys driver v0.0x23.0
Change-Id: Ia4f527488f588c3adb6c3ea6cd1be868fe006d14
Signed-off-by: zhangyunlong <dalon.zhang@rock-chips.com>
2018-01-25 10:03:31 +08:00
Frank Wang
62932c7e33 usb: amend ehci no-relinquish-port for rk3288 platform
For the hardware bug of RK3288 OHCI, we use commit cfe6f1dd57
("usb: ehci: add rockchip relinquishing port quirk support") to fix
it previously. However, it have been ineffective after upstream commit
94c43b9897 ("USB: Check for dropped connection before switching to
full speed") was merged due to the condition of relinquishing port was
changed.

This patch adds an additional condition for the previous commit to ensure
no relinquish port quirk can take effect for RK3288 EHCI.

Change-Id: I0630265e101afb349816955e069e1c121745ac08
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-01-24 20:02:00 +08:00
Wyon Bi
35cd525521 drm/rockchip: lvds: Add support for PX30
Change-Id: I353e76f1afdac02edd2ec78b5d107d6431c4a7d8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-24 15:27:44 +08:00
Wyon Bi
d79a942925 arm64: dts: rockchip: px30: update lvds and dsi node
Change-Id: Ib78c7287e75bbc3ded341a9b44a8531b374b8740
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-24 11:21:10 +08:00
Zhou weixin
f8eee37712 ARM: dts: rockchip: detect sdcard by gpio for rk312x
if the sdmmc detect with iomux sdmmc_detn will false trigger
once the system into deepsleep

Change-Id: I5928b94327175ee2b39bd0740ea2eafa9d28604d
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-24 11:17:14 +08:00
Tao Huang
117a23131e Revert "asm-generic: fncpy: Add function copying macros"
This reverts commit 49d083bd72.

The patch is part of PIE, we do not need it anymore.

Change-Id: Iedc231105fa18c3cadd2cfd023c451c40570be96
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-24 10:58:19 +08:00
Finley Xiao
38cd02b946 clk: rockchip: px30: Add pclk for cif and isp
Change-Id: Ied25f2c6746e7cc233c4c22436f45ba82900631a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-24 10:36:56 +08:00
David Wu
f37ae45b20 dt-bindings: clock: px30-cru: Rename the gmac reset
Change-Id: I91976f4f4fe4e8b81a5520a12995c317c16b0190
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-01-24 09:45:19 +08:00
Xinhuang Li
28b5fdf0f4 ARM: dts: rk322x: add iep and iep_mmu node
Change-Id: I023fd9ca35c605f36555d8e7a4499c59b2573e0c
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2018-01-24 09:24:48 +08:00
Alex Zhao
6b8e6ee695 net: wireless: rockchip_wlan: add WIFI_FEATURE_LINK_LAYER_STATS support
Change-Id: I97334e69270e280f39236eebee7663e08b78d6be
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2018-01-24 09:23:36 +08:00
Huicong Xu
fe62b85484 phy: rockchip: inno-hdmi: fix hdmi no display sometime wake up
when wake up only power on hdmi phy, it may result in tmds pll unlock
because when in deep suspend, the power maybe no in a normal state.
now reinstall all register when wark up.

Change-Id: Ie882fa9b99bc6f4bfb3b2a6ea88a043b2f89ed58
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2018-01-23 14:31:02 +08:00
Huicong Xu
bc980e7ce2 phy: rockchip: inno-hdmi: fix hdmi abnormal after set color depth
reinstall hdmi TMDS clock when set color depth between 8bit and 10bit
to fix tmds clock frequency mismatch

Change-Id: I5ac951cd6cc0ac04b595009be7ae250e42290854
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2018-01-23 14:30:05 +08:00
William Wu
784560b520 usb: dwc2: don't clear mode if already in normal mode
When clear the force mode bits, it needs to wait up to
100 ms to account for any potential IDDIG filter delay.
In the current code, it will call this three times during
probe if dr_mode == OTG. With this patch, we can reduce
it to once. It can help to speed up the DWC2 probe time.

Change-Id: I588042b03b086599e4020c3072653dfb3138fdc1
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-01-23 14:28:19 +08:00
John Stultz
8fff4c95e6 UPSTREAM: usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode
We've found that while in host mode, using Android, if one runs
the command:
  stop adbd

The existing usb devices being utilized in host mode are disconnected.
This is most visible with usb networking devices.

This seems to be due to adbd closing the file:
  /dev/usb-ffs/adb/ep0
Which calls ffs_ep0_release() and the following backtrace:

[<ffffff800875a430>] dwc2_hsotg_ep_disable+0x148/0x150
[<ffffff800875a498>] dwc2_hsotg_udc_stop+0x60/0x110
[<ffffff8008787950>] usb_gadget_remove_driver+0x58/0x78
[<ffffff80087879e4>] usb_gadget_unregister_driver+0x74/0xe8
[<ffffff80087850c0>] unregister_gadget+0x28/0x58
[<ffffff800878511c>] unregister_gadget_item+0x2c/0x40
[<ffffff8008790ea8>] ffs_data_clear+0xe8/0xf8
[<ffffff8008790ed8>] ffs_data_reset+0x20/0x58
[<ffffff8008793218>] ffs_data_closed+0x98/0xe8
[<ffffff80087932d8>] ffs_ep0_release+0x20/0x30

Then when dwc2_hsotg_ep_disable() is called, we call
kill_all_requests() which causes a bunch of the following
messages:

dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
init: Service 'adbd' (pid 1915) killed by signal 9
init: Sending signal 9 to service 'adbd' (pid 1915) process group...
init: Successfully killed process cgroup uid 0 pid 1915 in 0ms
init: processing action (init.svc.adbd=stopped) from (/init.usb.configfs.rc:15)
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 8 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 12 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 15 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 3 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_update_urb_state_abn(): trimming xfer length

And the usb devices connected are basically hung at this point.

It seems like if we're in host mode, we probably shouldn't run
the dwc2_hostg_ep_disable logic, so this patch returns an error
in that case.

With this patch (along with the previous patch in this set), we avoid
the mismatched interrupts and connected usb devices continue to function.

I'm not sure if some other solution would be better here, but this seems
to work, so I wanted to send it out for input on what the right approach
should be.

Change-Id: Iabdcdd0e33dc2009bfa5127971b7c6097a69c98f
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: YongQin Liu <yongqin.liu@linaro.org>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Chen Yu <chenyu56@huawei.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Tested-by: Minas Harutyunyan <hminas@synopsys.com>
Reported-by: YongQin Liu <yongqin.liu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 9b481092c2)
2018-01-23 14:28:19 +08:00