Commit Graph

606689 Commits

Author SHA1 Message Date
William Wu
8177616add usb: dwc3: rockchip: reduce the delay of controller reset
The dwc3 controller gets clocks from the pipe_clk(125MHz),
utmi_clk(30MHz) and aclk(300MHz). It requires to wait several
clock cycles for the reset controller operation done. The
minimum clock is utmi_clk 30MHz, and suppose that 10 clock
cycles are required, it's about 0.33us. So delay 1us is enough.

Change-Id: I6980b92249356efc20c1f537aa3c83f91561cdd4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-01-30 10:30:41 +08:00
William Wu
9cd51a5d78 usb: dwc3: rockchip: use msleep() for long delays
ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. Fix up the 20+ ms delays here passing the adjusted
"min" value to msleep().

Change-Id: Ideb6798d3a9465b64dee5aaf78a73054474dd017
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-01-30 10:29:59 +08:00
Zhangbin Tong
e9de2f7032 soc: rockchip: grf: support jtag switching for RK3228 Soc
Change-Id: Iaf8c1acf7c118e3c0e8b46bc7caf3a61ff2abc27
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-01-30 10:28:55 +08:00
Sandy Huang
dfd9730661 arm64: dts: rockchip: rk3399: correct vop1_pwm_pin define
vop1_pwm_pin iomux with pwm0, not pwm1

Change-Id: I7eac8f57f953e774e4ec0792e7de03e0e8806f85
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-01-30 10:17:43 +08:00
Jung Zhao
298e91c13a video: rockchip: vpu: default freq is 300MHz
Change-Id: I857eebcc54a2a0c59c5a5c7e316379cf73ac71e3
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-30 09:07:55 +08:00
Jung Zhao
e31b48f289 video: rockchip: vpu: fix dead lock of reset_lock
we cannot do vpu_reset when translate address. that
is the only situation we need to protect. so remove
extra reset_lock place.

Change-Id: Ibb23909788e9a3c7ef1c455cdeacdf6c964a5868
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-30 09:07:53 +08:00
Zhang Yunlong
96c5f41300 camera: rockchip: camsys_drv: v0.0x25.0
support px30

Change-Id: I60dc9c0d7f47a29d3f0fd88a85cea0aeb4b28b38
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
2018-01-29 19:12:54 +08:00
Wyon Bi
7f0ab5738f arm64: dts: rockchip: Enable dual display on rk3368 Sziauto
Change-Id: I02b8c1e7e8d11e559e1ac6784fd1ee7c3a4b41fb
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-01-29 17:53:44 +08:00
Zorro Liu
814f33871d arm64: dts: rockchip: rk3399-android: add android firmware node for android8.1
Change-Id: Ia266c515ae29b1e2555d450c2678241ac15f5e13
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-01-29 17:52:37 +08:00
Zhen Chen
ee184d68b8 arm64: dts: rk3326-863-lp3-v10: enable GPU device
Change-Id: If510638105e265085550a4812732669f365bc4b3
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-29 17:18:26 +08:00
Zhen Chen
127d766988 arm64: dts: rockchip: px30-evb-ddr4-v10: enable GPU device
Change-Id: I422b8f5bc40aaa6d8aa80e94d5a3fefbb9b929da
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-29 17:18:02 +08:00
Zhen Chen
a00776f7cf arm64: dts: rockchip: px30-evb-ddr3-v10: enable GPU device
Change-Id: I58d0cf3d9312351599fb40e8ba170bc9e7bce4c4
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-29 16:58:48 +08:00
Zhen Chen
cf2ab5fb09 arm64: dts: rk3326-evb-lp3-v10: enable GPU device
Change-Id: Ib07b985eefe79073ab66346369bbd004a45a7b16
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-29 16:58:14 +08:00
Zhen Chen
17fb80e1ae arm64: dts: rockchip: px30: add node for GPU
Change-Id: I6989036d63b03df12f98d967e556ca55bf615b57
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-01-29 16:57:32 +08:00
Sugar Zhang
732828af25 ASoC: rockchip: i2s: 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: Iafa18acb59995ad86885a8d6a6f5f49a7d233962
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-01-29 14:35:58 +08:00
William Wu
6771a00c43 usb: quirks: add device quirk for HD Camera PID 0x9320
The commit 62b2a34a21 ("uvcvideo: add quirk for devices
with broken auto suspend") introduced quirk to workaround
an issue with some HD Cameras.

There is one more model that has the same issue - idProduct
=0x9320, so applying the same quirk as well.

Change-Id: I24e3fc1746a9d21d529bc91f52fd5822e998bd93
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-01-29 14:13:00 +08:00
Huibin Hong
636c30b38a dmaengine: pl330: fix bug that chan descdone is null
The pl330 irq may come after terminal chan, and desc is
set null. It can't be avoided by disabling irq, because
other chans use the common irq. If the chan is terminaled,
we needn't call its callback or restart it.

Change-Id: I73201eaa4dbdd09c765129f9f3f41573c73faf73
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-01-29 14:12:32 +08:00
Zhou weixin
4e15e8d473 arm64: dts: rockchip: add cif camera config for rk3326 863/evb board
Change-Id: I87ad58868029dc969d2abb349b21b78323215ab2
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-01-29 10:03:20 +08:00
Tao Huang
640193f76b Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (733 commits)
  LSK-ANDROID: memcg: Remove wrong ->attach callback
  LSK-ANDROID: arm64: mm: Fix __create_pgd_mapping() call
  ANDROID: sdcardfs: Move default_normal to superblock
  blkdev: Refactoring block io latency histogram codes
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  FROMLIST: arm64: mm: Rename post_ttbr0_update_workaround
  sched: EAS: Initialize push_task as NULL to avoid direct reference on out_unlock path
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee: add ARM_SMCCC dependency
  BACKPORT: selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
  ...

Conflicts:
	arch/arm64/kernel/vdso.c
	drivers/usb/host/xhci-plat.c
	include/drm/drmP.h
	include/linux/kasan.h
	kernel/time/timekeeping.c
	mm/kasan/kasan.c
	security/selinux/nlmsgtab.c

Also add this commit:
0bcdc0987c ("time: Fix ktime_get_raw() incorrect base accumulation")
2018-01-26 19:26:47 +08:00
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