Commit Graph

604731 Commits

Author SHA1 Message Date
Putin Lee
593f4a7059 video/rockchip: rga: add pm_runtime funtion
Change-Id: I73e6dbb13a366664c4e530f7e35d42feefef765c
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-24 11:52:42 +08:00
Jianqun Xu
4961c3cae0 drm/rockchip: gem: init dma_address of sg when cma alloc
Change-Id: Iffe011ee0a0ba5177a9b7f426ebd9dcbdcb5f5d5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-11-24 11:20:36 +08:00
Mark Yao
dffa1132a2 ARM: dts: rockchip: rk3126: reserve cma region for drm
Change-Id: I073d452c683ed2b4535488b19a44cca7e200d714
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:59:42 +08:00
Joseph Chen
70daf10039 ARM: dts: rk3036-kylin: set vdd_arm regulator-on-in-suspend
rk3036 doesn't support vdd_arm power supply off when system suspend.

Change-Id: I46bd8a7c2b672be30d8106b867275e8ba7d77e54
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-24 10:59:11 +08:00
Joseph Chen
46f61f7dba ARM: dts: rk3036: enable rk3036 PSCI
Change-Id: I4c5472587583fb176d88e802d2e7fe20daf9ea48
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-24 10:59:00 +08:00
lkg
d0d2368bf8 misc: add gpio-detection driver
This driver is used to detect ACC and car reverse signal
on vehicle system

Change-Id: I74bedfe64ddb6a0f8eaf7ae8c7af74763ee8bf75
Signed-off-by: Kaige Li <kevin.li@rock-chips.com>
2017-11-24 10:44:26 +08:00
Mark Yao
2083f88b02 ARM: dts: rockchip: use logo-memory-region for logo buffer
Change-Id: I05068d75f650945f760cbab1aa263bc0ec9bd698
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:33:05 +08:00
Mark Yao
772e39d999 arm64: dts: rockchip: use logo-memory-region for logo buffer
Change-Id: Ibd535a9c15b1ee0ee52cf8596ac63eee68ac26a4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:32:33 +08:00
Mark Yao
a051460ef3 drm/rockchip: logo: rename logo memory region
Change-Id: Ief80e55753134ed0f443830488d9204ac692f93c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:32:13 +08:00
Mark Yao
f741ee5cab drm/rockchip: support using reserved memory region for cma
Change-Id: I829162c21748052525b0583185db67015f24141d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:30:57 +08:00
Mark Yao
fda0f9d3f6 drm/rockchip: gem: correct dma handle on buffer free
If drm enable iommu support, rk_obj->dma_addr is iommu
mapping address, using dma_addr as dma_free_attrs's handle
is wrong, cause memory leak.

Change-Id: Iee239122602e61e9f54bdf7a90d47904d74f1c38
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:30:34 +08:00
Xinhuang Li
00f0ddd6a2 input: rc: compatible with different numbers of clks definitions
rk3328 has two clk for pwm module

Change-Id: I85e7f08ef2f850a53dd16403f96ee4b0a0596c61
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-24 10:29:26 +08:00
Liang Chen
1b16fb9814 ARM: dts: rk3126-bnd-d708: set VDD_LOG to 0.9V when suspend
Change-Id: Iaf12c5fa9c5c1cdacb482dd0e9fd3d5913991df1
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 10:27:28 +08:00
Liang Chen
d79c36b2fd clk: rockchip: rk3128: fix incorrect configuration
1. The first parent name of sclk_cif_out_src is wrong, it is
"sclk_cif_src".
2. The MUX configuration for sclk_cif_out_src is wrong, it should
be muxdiv_offset=29, mux_shift=2, mux_width=1.

Change-Id: I36a0ec0791afdef398d37ac8b92b7831619fb01b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 10:27:07 +08:00
Liang Chen
dfc5ba5499 ARM: dts: rk3126-bnd-d708: power off VDD_ARM when suspend
Change-Id: I533071166932e0b5cf6a248ca566cfaaef0e6e49
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 10:26:52 +08:00
shengfei Xu
50f088463d mfd: rk808: fix the rtc resource for rk816
Change-Id: Ia237fbd0bb63b1e8ccad3b95240251d8d4ded533
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-11-24 10:21:42 +08:00
Xinhuang Li
1934ca1c8e arm64: dts: rk3328-evb-android: add new dts for rk3328 evb android
this dts is copy from rk3328-evb.dts and add pwm3/firmware nodes

Change-Id: Id08e5b2e2d11c34dc81d3a335d5e1a7de21e13cb
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-24 10:18:14 +08:00
Sandy Huang
cf9715ed8a drm/rockchip: vop: fix csc for rk3288
There is some hardware bug for VOP win CSC, so we ignore this function
and use the default CSC matrix.

Change-Id: I5a498bbba98563ccb5f37ebffa50b274e8422c73
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-23 18:31:16 +08:00
Caesar Wang
81a9ae5019 ARM: dts: rockchip: support the sdmmc for kylin
Change-Id: If761bb4a1adf857f7315edebb17c31eb6ac08652
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-23 18:30:43 +08:00
Liang Chen
e351a0f0b3 ARM: dts: rockchip: do not access qos-ebc for rk3126b/c
rk3128 have ebc, but rk3126b/c have no ebc, so we need
manage compatibility for them.

Change-Id: I683f292b40603fe31a5eb4cee4e78a2d5d152626
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-23 16:42:15 +08:00
Alex Zhao
bdea008e08 ARM: dts: rockchip: rk3126-bnd-d708: add rtl8703bs bt support
Change-Id: I5973eef8b17094527e8b54fbe5d9aff8e113ef4e
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-11-23 16:27:13 +08:00
Zorro Liu
6bf00d509a driver: input: sensor: improve lis3dh init and data read
Change-Id: Ie5bb012a2f60b966179cacba1fbff530c172dae3
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-23 15:27:17 +08:00
Frank Wang
c8dc9b5859 ARM64: dts: rockchip: fix usb_otg compatible for rk3368-android
Both dwc2 and dwc_otg_310 driver are existed in the system since
commit c3c4fa0, and we use dwc_otg_310 driver for RK3368 android
platform, so only keep one compatible to fit for the driver.

Change-Id: Iee001ef057dcc63b723faf21fec94d5a4b592868
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-11-23 14:10:04 +08:00
Meng Dongyang
dc71e51944 usb: dwc2: make otg manage lowlevel hw on its own
According to the design guide of dwc2, the application must flush
all FIFOs after reallocating the FIFO data RAM and the phy is
required to keep power on when flush FIFO. But on some rockchip
platforms, the usb phy will be powered off when the usb otg/gadget
disconnect, in this case if the application call the function
dwc2_hsotg_udc_start() to start udc, it will result in the error
as below:

dwc2_hsotg_init_fifo: timeout flushing fifos (GRSTCTL=80000430)
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
bound driver configfs-gadget
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001

This patch make the dwc2 driver to manage the power of phy in
udc start and stop function both in otg and peripheral mode. Make
sure that the usb phy is powered on when udc start, and then the
usb phy driver can manage the phy power dynamically.

Change-Id: I15d3cb5313fc157b58a37c9e15f191d7cb966217
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-11-23 11:25:17 +08:00
Xinhuang Li
0f3895a77d ARM: rockchip_defconfig: enable CONFIG_SND_SOC_TC358749X
Change-Id: I817fb1dd6eea07561081cfa4a0268a20271ac989
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-22 09:47:22 +08:00
Xinhuang Li
059e614bdd ASoC: codecs: tc358749x: compatible with different power pin definitions
some boards do not define the power pin such as power18/power33
for tc358749x

Change-Id: I36914dc005e465c290f71df2483d1969f6d101ef
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-22 09:47:04 +08:00
Xinhuang Li
fec2710757 ARM: dts: rk3288-firefly: add tc358749x node
Change-Id: I135ef2399832de717e4ef24fefe41fce678af725
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-22 09:46:58 +08:00
Zheng Yang
d1943fde81 drm: bridge: dw-hdmi: support Dynamic Range and Mastering Infoframe
The Dynamic Range and Mastering InfoFrame carries data such as
the EOTF and the Static Metadata associated with the dynamic
range of the video stream.

This function is introduced in the 2.11a version.

Change-Id: I279cc0665e34d75209774013882ccc8946ce6da5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-22 09:31:48 +08:00
Zheng Yang
b8e71e7b42 drm/rockchip: dw-hdmi: move depth checking into dw_hdmi_rockchip_select_output
For some display device, max_tmds_clock is 0, we think
max_tmds_clock is 340MHz. If tmdsclock > max_tmds_clock,
depth should fall back to 8bit. And If display mode support
YCBCR420, output format is YCBCR420.

Because max tmds clk of RK3368 is 340MHz, hdmi output policy
is same as mentioned above.

It is need to check tmds clock rate at the last. So we move
depth checking into dw_hdmi_rockchip_select_output.

Change-Id: I27e029fc0171b175ddbfa453ed12854ab6a7432b
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-22 09:31:25 +08:00
Zorro Liu
a494bb74a7 ARM64: dts: rockchip: rk3368-android: uart2 disabled default
Change-Id: I75ee10d966cea374508e10bcb5cb275636f04e91
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-22 09:26:29 +08:00
Sean Young
72ba972c19 UPSTREAM: [media] rc: unify nec32 protocol scancode format
There are two different encodings used for nec32:
 - The ir-nec-decoder.c decoder treats it as 32 bit msb first.
 - The img-ir decoder/encoder, winbond wakeup, dib0700, ir-ctl userspace,
   treat nec32 analogous to necx and nec: 4 bytes, each lsb first. So this
   format reverses the 4 bytes.

There are arguments to be had for both formats, but we should not use
different formats in different parts of the kernel. Selecting the second
format introduces the least code churn. It does mean that the TiVo keymap
needs updating.

This change was submitted before as "18bc174 [media] media: rc: change
32bit NEC scancode format", which was reverted because it was unclear
what scancode rc drivers produce. There are now more examples of drivers
which produce nec32 in lsb format.

The TiVo keymap is verified against the Nero Liquid TiVo remote. The
keymap is not for the Tivo DVR remote, which uses rc-5.

Signed-off-by: Sean Young <sean@mess.org>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 6eae57e9d5)

Change-Id: Ib722e0116fe0b590e3fb96d8c7ff1e3a384a0b55
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-22 09:25:36 +08:00
Sean Young
676241a57e UPSTREAM: [media] gpio-ir: do not allow a timeout of 0
According to the documentation, a timeout of 0 turns off timeouts,
which is not the case.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit ee5310e66e)

Change-Id: If6edb518e2c14478d13b9e0bf99a0ef8cd03b579
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-22 09:25:36 +08:00
Eric Nelson
56ce5d3016 UPSTREAM: [media] rc: gpio-ir-recv: add timeout on idle
Many decoders require a trailing space (period without IR illumination)
to be delivered before completing a decode.

Since the gpio-ir-recv driver only delivers events on gpio transitions,
a single IR symbol (caused by a quick touch on an IR remote) will not
be properly decoded without the use of a timer to flush the tail end
state of the IR receiver.

This patch initializes and uses a timer and the timeout field of rcdev
to complete the stream and allow decode.

The timeout can be overridden through the use of the LIRC_SET_REC_TIMEOUT
ioctl.

Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
(cherry picked from commit 3fb136f339)

Change-Id: Ice220af0199cf848bb907c9a419dd079efd94834
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-22 09:25:36 +08:00
Eric Nelson
213bf6dcd9 UPSTREAM: [media] rc-core: define a default timeout for drivers
A default timeout value of 125 ms should work for all decoders.

Declare a constant to help standardize its' use.

Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
(cherry picked from commit c8e1bbc52d)

Change-Id: I672091f1902c3a91c9746dbfd8438896f7c9433d
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-22 09:25:36 +08:00
Eric Biggers
208e9ebabe UPSTREAM: arm64: support keyctl() system call in 32-bit mode
As is the case for a number of other architectures that have a 32-bit
compat mode, enable KEYS_COMPAT if both COMPAT and KEYS are enabled.
This allows AArch32 programs to use the keyctl() system call when
running on an AArch64 kernel.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 5c2a625937)

Change-Id: I100b99f6c2262da5b7c7ea660c47ffedfa6a1297
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-22 09:25:36 +08:00
Frank Wang
c3c4fa01be ARM64: configs: add usb related config to rockchip_defconfig
Enable CONFIG_USB_DWC2 and CONFIG_PHY_ROCKCHIP_INNO_USB3 driver
for rockchip_defconfig.

Change-Id: Ic22cc450e5f139935dc54ffb798413edff7df3cb
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-11-22 09:22:31 +08:00
Joseph Chen
b6f8d1d25b mfd: rk808: add rk818 suspend/resume registers setting
set 3.4v interrupt signal assert when suspend, set 3.0v shutdown
signal assert when resume.

Change-Id: Id15b721bbdc9665a18cf9946b92c435a23f1666c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-22 09:21:15 +08:00
Joseph Chen
9ad17c3dbf mfd: rk808: add rk816 suspend/resume registers setting
set 3.4v interrupt signal assert when suspend, set 3.0v shutdown
signal assert when resume.

Change-Id: Ie91d8ce6a79e5ea50b654ea52c3ed8acf047f8fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-22 09:21:15 +08:00
Joseph Chen
3599b49698 mfd: rk808: fix position typo of mask and value for rk816
Change-Id: I29fa67327b18a6c3cd2a22d223a30c7546c7ffac
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-22 09:21:15 +08:00
William Wu
6e3c63017e phy: rockchip-inno-usb2: reinit charge state when usb disconnect
When detect the usb peripheral disconnect from PC usb
host port or usb charger, we need to reinit the charge
state immediately, then it can do usb battery charge
detect work to get correct charge type if usb re-plug
in again in a short time.

Change-Id: I187f1d23a11b00f57e0a3699b6174cd7a59be3f1
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-11-22 09:20:47 +08:00
Finley Xiao
16efe6c228 arm64: dts: rockchip: rk3399: Add nocp device node
Change-Id: I9ef68b69a263720aea3d51e854375b51027c94a2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-21 20:34:37 +08:00
Finley Xiao
488e660611 arm64: dts: rockchip: rk3368: Add nocp device node
Change-Id: I21b8a073491910a4c20e974008b961b29c986ec2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-21 20:34:31 +08:00
Finley Xiao
c2c3c9bda9 ARM: dts: rockchip: rk3288: Add nocp device node
Change-Id: I7432a68be8730718b1d6d22c7e97f83827d0eb75
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-21 20:34:25 +08:00
Finley Xiao
ae74e02de8 arm64: rockchip_defconfig: enable CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP
Change-Id: I0efed176f35018cea510ca8ddb41cac23ae23d96
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-21 20:33:46 +08:00
Finley Xiao
41193192bb ARM: rockchip_defconfig: enable CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP
Change-Id: I13ab528a35285290e7a99b4ae2de54bddf02185d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-21 20:32:04 +08:00
Finley Xiao
ccfeccfe22 PM / devfreq: event: Add new Rockchip NoC probe driver
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. For example, RK3399
has multiple NoC probes to monitor traffic statistics for analyzing
the transaction flow.

Change-Id: I66f6708f0d244488ca08f0f1f1cb36b19c7a2d0a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-11-21 20:24:57 +08:00
Tao Huang
90454edfc6 ARM: rockchip_defconfig: update by savedefconfig
Change-Id: I561581485fdbff1b6f3f5a41e26d6049cbd672e4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-11-21 17:39:12 +08:00
Zhen Chen
dac44b4210 MALI Utgard: RK: add nodes to get gpu_utilisation
Change-Id: I7ceebd882282fc08c8560fba5ec8978d18d5b819
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2017-11-21 17:19:07 +08:00
William Wu
6b406ee4c7 usb: dwc_otg_310: hcd: fix isoc split in transaction
The handle_xfercomp_isoc_split_in() use two conditions
to check if the isoc in csplit transcation is done:

 - the actual xfer length of the current frame is zero
 - the total xfer length of the frames equals to the
   request length of the frames

But in some case, we find that the two conditions are
not enough, e.g. on rockchip platforms, connect the usb
audio card with the FE1.1 HUB, the audio is setted to
44100 2ch 16 bits, the csplit transcation sequence is:

 - CSPLIT IN transcation
   - MDATA packet [176 bytes]

 - CSPLIT IN transcation
   - DATA0 packet [No data]

In this case, the total actual xfer length of frames is
less than the request length of frames, so the current
code will not update the status of frame and the qtd
isoc_frame_index, this cause usb audio data corrupted.

According to the USB 2.0 spec "Figure 11-85. Isochronous
IN Complete-split Transaction Sequence", we can use DATA0
to check if the transaction is last data. So use DATA0
instead of zero length transaction to check if the csplit
transcation is done.

Change-Id: I55cfa3f7b93ed6bfba3ecec5820d7b534c05ba34
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-11-21 17:17:13 +08:00
Wu Liang feng
41ebd2ae40 usb: dwc_otg_310: add force host channel halt quirk
According to DWC2 Programming Guide, if a host channel is
used for non-split periodic transfer, we must not disable
the channel if we want to halt it, and at the end of the
next uframe/frame (in the worst case), the core generates
a channel halted and disables the channel automatically.

But some specil usb device, like usb audio (VID = 0x0572,
PID = 0x1494, Manufacturer: Conexant Systems INC), we
need to halt the channel immediately when do close usb
audio operation. Otherwise, the host may still start a
new transaction after usb audio close, and cause to set
usb interface failed when open usb audio next time.

This patch introduces a new quirk to force host channel
halt even if it's used for a non-split periodic transfer.

Change-Id: I2911ad8f68bb3738691ac683b0b64330d3428213
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2017-11-21 17:17:13 +08:00