Commit Graph

853544 Commits

Author SHA1 Message Date
Finley Xiao
e5d2ff986f soc: rockchip: pvtm: rename ch to id and sub_ch to ring_sel
Make the name remain consistent with TRM.

Change-Id: Iedf837ca45f4cb54e1a61a32015deeb3c5e7276e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-04-27 18:44:49 +08:00
Finley Xiao
da913c30e2 soc: rockchip: pvtm: Update driver to use clk_bulk and reset array APIs
Change-Id: Ie6ab946fa95fd69607150bd5d48c78f0f58d387d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-04-27 18:44:49 +08:00
Finley Xiao
7204bbf8af soc: rockchip: pvtm: Fix pvtm ch error when get pvtm value
Change-Id: I627d70c103173d7767778e284eafa31e3a3c1db9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-04-27 18:44:49 +08:00
Finley Xiao
a3e34d47db soc: rockchip: pvtm: use SPDX-License-Identifier
This updates the rockchip_pvtm.c file to use SPDX-License-Identifier
instead of more verbose license text.

Change-Id: I9f89999e0668269ff7d9283e90710bf0b06bde7f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-04-27 18:44:49 +08:00
shengfei Xu
227808eed5 mfd: rk808: determine whether the stored data of the PMIC_POWER_EN OTP is valid
If the system doesn't save the PMIC_POWER_EN OTP, we don't have to write
it back.

Fixes: c0570888f0 ("mfd: rk808: Set only resetting pmic register for 817&809.")
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I3cb391202a2967060b79f5bd7af1ebbcc82e9d9a
2020-04-27 18:34:29 +08:00
Wu Liangqing
ff4de39737 arm64: dts: rockchip: rk3368-808-evb: remove firmware_android node
Change-Id: I8ee67f29dd215322a1f4dc0cb9031fd314054184
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-04-27 15:40:41 +08:00
Ding Wei
f9bd64b480 video: rockchip: mpp: add dump info when alloc failed
changes:
1. task->info ==> task->mpp_task.info
2. export mpp_task->reg for dump register setting

Change-Id: I78b024d083e04fcbf8fd76fbe5f24798d912103a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-27 15:23:54 +08:00
Elaine Zhang
c5d6070c6b thermal: rockchip: fix up the thermal panic block
Fixed the panic reloads when there are multiple thermal devices.

Change-Id: Ia08b0bfec940be089440b9246cc1abf9626c19a7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-04-27 11:32:42 +08:00
Xing Zheng
d00bfccedf clk: fractional-divider: add handle to frac numerator is not to be greater than 4
We know that under the condition of even frequency division,
if the numeratoris greater than 4, the duty cycle may not be
equal to 50%.

In the case, weneed to keep the original numerator(<4) and
denominator.

Change-Id: I8cd08199df4e3d27d5697ce80370224a6f267e26
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2020-04-27 11:08:46 +08:00
Wu Jingchen
f8de58c732 arm64: rockchip_defconfig: rk3368 xikp board: enable ov8858
ov8858 camera module used by rk3368 xikp board

Change-Id: Id8380b997c9fe042957a3ba5284e5cf3cc799c37
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2020-04-27 10:12:34 +08:00
Wu Jingchen
4f8d752059 arm64: dts: rockchip: add gc2145 add ov8858 for rk3368-xikp board
Change-Id: Ic0ecbce7e34d8dca4ebfae99317eb8e4865eb053
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2020-04-27 10:09:52 +08:00
William Wu
86d92b4524 usb: dwc2: hcd: fix isoc out transfer with unaligned dma address
This DWC2 driver has handled the unaligned DMA address problem
for urb->transfer_buffer and split in transfer. But it still
has problem to handle the isoc out transfer with unaligned DMA
address.

I test an USB Audio device which supports 24bits 96KHz 3LE format:

usb 1-1: new full-speed USB device number 2 using dwc2
usb 1-1: New USB device found, idVendor=21b4, idProduct=0083, bcdDevice= 1.06
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: AudioQuest DragonFly Black v1.5
usb 1-1: Manufacturer: AudioQuest
usb 1-1: SerialNumber: AQDFBL0100023815

When play 24bits 96KHz WAV file, noise occurs.

The rootcause is that the DWC2 controller use internal DMA to
transfer USB audio data, and the DMA address of data buffer must
be 4 bytes aligned, otherwise, the dwc2 will fail to transfer the
data. In this test case, the USB audio may transfer 572 bytes or
582 bytes in one usb transaction. And one URB contains multiple
usb transactions, if the DWC2 transfer the 582 Bytes in the middle
of the URB, the DMA address will not be 4 bytes aligned.

This patch allocates new aligned buf for isoc out transfer with
unaligned DMA address.

For isoc split out transfer, this patch sets the start schedule at
the 2 * DWC2_SLICES_PER_UFRAME to transfer the SSPLIT-begin OUT
transaction like EHCI controller. Without this patch, the SSPLIT-begin
OUT transaction starts in the seventh microframe, and this makes the
USB HUB unhappy. This patch sets the the SSPLIT-begin OUT transaction
starts in the first microframe.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I251ccf804e062312f9bd348552493f3bab504beb
2020-04-26 22:04:39 +08:00
Shawn Lin
5029583149 mmc: dw_mmc: get host from xfer_timer instead of dto_timer
Change-Id: I89cc058f597d1f408da9367e859e855f7e79f8bf
Fixes: 1d1a1f03f3 ("mmc: dw_mmc: add xfer timer for avoid DTO without actual data payload")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-04-26 18:55:27 +08:00
Andy Yan
e8f1ca159d drm/rockchip: rk618: Avoid one div operation
Get dst->clock from sclk_rate before it changed to avoid one div
operation.

Change-Id: I33a51fd8b9cef5c3e73fc4db436fe8c1dcc57306
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-04-26 12:21:15 +08:00
Andy Yan
0cceb75ca5 drm/rockchip: rk618: Fix compile error on arm32 platform
Fix follow build error on arm32:

In file included from ./arch/arm/include/asm/div64.h:127:0,
                 from ./include/linux/kernel.h:208,
                 from ./include/linux/clk.h:16,
                 from drivers/gpu/drm/rockchip/rk618/rk618_scaler.c:8:
drivers/gpu/drm/rockchip/rk618/rk618_scaler.c: In function
'calc_dsp_frm_hst_vst':
./include/asm-generic/div64.h:222:28: warning: comparison of distinct
pointer types lacks a cast
error, forbidden warning:div64.h:222
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                            ^
drivers/gpu/drm/rockchip/rk618/rk618_scaler.c:123:2: note: in expansion
of macro 'do_div'
  do_div(t_frm_st, src_pixclock);
  ^~~~~~
./include/asm-generic/div64.h:222:28: warning: comparison of distinct
pointer types lacks a cast
error, forbidden warning:div64.h:222
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                            ^
drivers/gpu/drm/rockchip/rk618/rk618_scaler.c:124:19: note: in expansion
of macro 'do_div'
  *dsp_frame_hst = do_div(t_frm_st, src_htotal);

drivers/gpu/drm/rockchip/rk618/rk618_scaler.c:303:
undefined reference to `__aeabi_uldivmod'
drivers/gpu/drm/rockchip/rk618/rk618_scaler.c:304:
undefined reference to `__aeabi_uldivmod'
drivers/gpu/drm/rockchip/rk618/rk618_dsi.o: In function
`rk618_dsi_set_hs_clk':
drivers/gpu/drm/rockchip/rk618/rk618_dsi.c:297:
undefined reference to `__aeabi_uldivmod'

Change-Id: I7a63cf63217e75ca5b2115581d39492642225e81
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-04-24 18:44:30 +08:00
Ding Wei
fdd815e602 video: rockchip: mpp: add iommu fault handle
when iommu fault, dump mem region and register.

Change-Id: Ifa5f175c6f0d8f7688c2d65a4423d975c37fe1af
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-24 13:58:27 +08:00
Tao Huang
5d1c3f0ecd arm64: rockchip_defconfig: update by savedefconfig
Remove some unsupported configs:

-CONFIG_BT_RTKBTUSB=y
-CONFIG_BT_HCIUART_LL=y
-CONFIG_ROCKCHIP_SCR=y
-CONFIG_USB_CAM_GPIO=y
-CONFIG_BATTERY_EC=y
-CONFIG_ROCKCHIP_DRM_BACKLIGHT=y
-CONFIG_DRM_RK1000=y
-CONFIG_DRM_ANALOGIX_ANX6345=y
-CONFIG_SND_SOC_ROCKCHIP_FORCE_SRAM=y
-CONFIG_SND_SOC_ROCKCHIP_I2S=y
-CONFIG_SND_SOC_ROCKCHIP_MULTI_DAIS=y
-CONFIG_SND_SOC_ROCKCHIP_HDMI_ANALOG=y
-CONFIG_SND_SOC_ROCKCHIP_HDMI_DP=y
-CONFIG_SND_SOC_ROCKCHIP_CDNDP=y
-CONFIG_SND_SOC_FM1288=y
-CONFIG_SND_SOC_RK1000=y
-CONFIG_SND_SOC_RT5651=y
-CONFIG_HID_RKVR=y
-CONFIG_USB_CONFIGFS_F_MTP=y
-CONFIG_USB_CONFIGFS_F_PTP=y
-CONFIG_SWITCH=y
-CONFIG_RTC_DRV_FAKE=y
-CONFIG_INV_MPU_IIO=y

Change-Id: Ie59827276b138af879397894ccfb99d9362ea65a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-04-23 21:34:01 +08:00
Tao Huang
3e0232731c ARM: rockchip_defconfig: update by savedefconfig
Remove some unsupported configs:

-CONFIG_BT_RTKBTUSB=y
-CONFIG_BT_HCIUART_LL=y
-CONFIG_ROCKCHIP_SCR=y
-CONFIG_USB_CAM_GPIO=y
-CONFIG_BATTERY_EC=y
-CONFIG_REGULATOR_SYR82X=y
-CONFIG_SND_SOC_ROCKCHIP_HDMI_ANALOG=y
-CONFIG_SND_SOC_ROCKCHIP_HDMI_DP=y
-CONFIG_SND_SOC_ROCKCHIP_CDNDP=y
-CONFIG_SND_SOC_GVA_CODEC=y
-CONFIG_SND_SOC_TC358749X=y
-CONFIG_USB_CONFIGFS_F_MTP=y
-CONFIG_USB_CONFIGFS_F_PTP=y
-CONFIG_LEDS_TRIGGER_BACKLIGHT=y
-CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
-CONFIG_SWITCH=y
-CONFIG_RTC_DRV_FAKE=y
-CONFIG_INV_MPU_IIO=y

Change-Id: If9b8dafe76668ad18de97d1b512ad766eb75f1fc
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-04-23 21:05:33 +08:00
Wu Jingchen
faad12d22f ARM: rockchip_defconfig: Add SONY drivers to fix CtsHardwareTestCases
android.hardware.input.cts.tests.SonyDualshock4TestCase#testAllKeys
android.hardware.input.cts.tests.SonyDualshock4TestCase#testAllMotions

Change-Id: I87beb10acf3afc42029fd5cf75907934707bdbb6
Signed-off-by: Wu Jingchen <oven.wu@rock-chips.com>
2020-04-23 20:56:30 +08:00
Tao Huang
88e51034ef ARM: rockchip_defconfig: update by savedefconfig
Reorder some configs.

Change-Id: Ida4a95dc1862544104d576e774a2f5d4d4423594
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-04-23 17:47:35 +08:00
Ding Wei
7997c3fdb8 video: rockchip: mpp: fix issue for fd find dmabuf
Multiple fd may point to the same dmmabuf, which means the
same buffer. Therefore, fd cannot be added as a judgment.

Change-Id: I459a3350a692299932e58f3e274d2509a5b9a48e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-23 09:52:06 +08:00
Sandy Huang
a5a513a1bf ARM: rockchip_defconfig: Disable kernel logo
If you want to enable kernel logo set the following state:
  1. enable CONFIG_FRAMEBUFFER_CONSOLE
  2. enable CONFIG_LOGO
  3. disable route_HDMI/eDP/MIPI state at dts file;

Change-Id: I40c9c8bf4133c6e8e3fa829c4402bbe2c800d364
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-04-22 17:44:28 +08:00
Sandy Huang
ec95c01623 arm64: rockchip_defconfig: Disable kernel logo
If you want to enable kernel logo set the following state:
  1. enable CONFIG_FRAMEBUFFER_CONSOLE
  2. enable CONFIG_LOGO
  3. disable route_HDMI/eDP/MIPI state at dts file;

Change-Id: Ibe35ef6e296718cde9871c8cc2e61e1621c4d6a6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-04-22 17:20:54 +08:00
Jianqun Xu
d74d826a4b soc/rockchip: fix WARNING on system monitor to cancel work
------------[ cut here ]------------
 WARNING: CPU: 7 PID: 1 at kernel/workqueue.c:2944 __flush_work+0x274/0x294
 Modules linked in:
 CPU: 7 PID: 1 Comm: init Not tainted 4.19.111 #542
 Hardware name: Rockchip rk3368 808 evb board (DT)
 pstate: 60400005 (nZCv daif +PAN -UAO)
 pc : __flush_work+0x274/0x294
 lr : __flush_work+0x270/0x294
 ...
 Call trace:
  __flush_work+0x274/0x294
  __cancel_work_timer+0x110/0x1a0
  cancel_delayed_work_sync+0x10/0x1c
  rockchip_monitor_reboot_notifier+0x78/0x84
  blocking_notifier_call_chain+0x54/0x98
  kernel_power_off+0x20/0xf8

Change-Id: Ia666a2901a1ce1d66b231e6615205e6e83f3093c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-04-22 17:00:24 +08:00
Mark Salyzyn
d1c98f264d Revert "UPSTREAM: mm, page_alloc: spread allocations across zones before introducing fragmentation"
This reverts commit 8ad4b225e8.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I340fb8af98b3f6e033fd5463b082fbca43abe941
2020-04-22 14:10:19 +08:00
Mark Salyzyn
803546c485 Revert "UPSTREAM: mm: use alloc_flags to record if kswapd can wake"
This reverts commit 112ced56ce.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I400cabb69dc9e24ea5d84f677315dbb3bfd34e45
2020-04-22 14:10:19 +08:00
Mark Salyzyn
e77ca8f9c9 Revert "BACKPORT: mm: move zone watermark accesses behind an accessor"
This reverts commit acfb1c608b.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I4988ddf1fc24579d4fc478de1de6e45b870f7bcd
2020-04-22 14:10:19 +08:00
Mark Salyzyn
240610c486 Revert "BACKPORT: mm: reclaim small amounts of memory when an external fragmentation event occurs"
This reverts commit 5cbbeadd5a.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I65735f27f6a44a112957bcec07e2f63f2d8ccff6
2020-04-22 14:10:19 +08:00
Mark Salyzyn
bea61f8995 Revert "BACKPORT: mm, compaction: be selective about what pageblocks to clear skip hints"
This reverts commit fd9c71c06b.

Reason for revert: revert customized code
Bug: 140544941
Test: boot
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I58d978c6f74f8a1a04b17fa6d3890ddc4f1988c0
2020-04-22 14:10:19 +08:00
Jianqun Xu
b53e459d52 staging: android: ion_legency: fix debug dir name
Change-Id: I97011e4bb17add08408856dda9c821673f299708
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-04-22 10:52:31 +08:00
Wang Jie
9fca8e9e48 arm64: dts: rockchip: modify vcca_33 and vcc_lan for rk3368 808 evb
solve the machine sleep and wake up, 4G module is abnormal.
Under normal circumstances, sleep and wake up, 4g can not disconnect the network.

Change-Id: Iee28bdcee57747c4f4cbceae8c413b7f46c2b6ad
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2020-04-22 08:54:36 +08:00
Jon Lin
182a156aa0 spi: rockchip: support 64-location deep FIFOs
Change-Id: Id229ef4ff82e1066267ccfd562ff05375febfb06
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-21 19:13:14 +08:00
Jon Lin
a78947d29f drivers: rkflash: enable reinit SNOR from snor flash packet
Firstly, init SNOR from flash table, then if this SPI Nor isn't
in flash table, reinit from snor flash packet.

Change-Id: Ia6fc76801ac44f978a198f4d369ade5c0af36f8b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-21 19:12:44 +08:00
Jon Lin
e38982578f drivers: rkflash: support SNOR reinit from snor flash packet
That snor_info_packet is SPI Nor information placed in IDB header
area, each progress can parse it to get flash information.

Change-Id: I101e3720050f8b926d3f3f9da812112a408e5586
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-21 19:12:44 +08:00
Li Huang
ea70891842 RK3368 GPU: Solve crash on Copydate on Clang compile ver
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I4af20dadb4310ea6fa8c2421831e58a84fae5d9a
2020-04-21 18:55:00 +08:00
Wu Liangqing
433202c5ac mmc: dw_mmc-rockchip: set xfer timer 100ms
Fixes: 1d1a1f03f3 ("mmc: dw_mmc: add xfer timer for avoid DTO without actual data payload")
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I00ae095cff35b3960e1f9189d03f9908fed0aa33
2020-04-21 18:20:27 +08:00
Wang Jie
b7cc13dcec arm64: rockchip_defconfig: enable OV5695 for rk3368 808 evb
Change-Id: Ia6ecec3e66f88070c3d247bf45b59a18f00fb0ec
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2020-04-21 16:57:47 +08:00
William Wu
aabebc2bdf usb: gadget: uvc: fix possible NULL pointer dereference
This patch fixes the following panic when close the uvc
application in usb host.

Unable to handle kernel NULL pointer dereference at virtual address 00000003
pgd = 21faf91f
[00000003] *pgd=151af835, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in: galcore(O)
CPU: 1 PID: 720 Comm: uvc_gadget_pthr Tainted: G        W  O      4.19.111 #8
Hardware name: Generic DT based system
PC is at uvcg_video_ep_queue+0x40/0x58
LR is at uvcg_video_ep_queue+0x38/0x58
...
[<b04fff54>] (uvcg_video_ep_queue) from [<b05003a4>] (uvcg_video_pump+0x7c/0x104)
[<b05003a4>] (uvcg_video_pump) from [<b0527cd8>] (__video_do_ioctl+0x1c8/0x3a0)
[<b0527cd8>] (__video_do_ioctl) from [<b052b40c>] (video_usercopy+0x200/0x494)
[<b052b40c>] (video_usercopy) from [<b022043c>] (do_vfs_ioctl+0xac/0x798)
[<b022043c>] (do_vfs_ioctl) from [<b0220b5c>] (ksys_ioctl+0x34/0x58)
[<b0220b5c>] (ksys_ioctl) from [<b0101000>] (ret_fast_syscall+0x0/0x4c)

Change-Id: I893e4c2b95f9b583423e68d68e7beff1cd114687
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-21 11:08:23 +08:00
Elaine Zhang
9ff5eca3a1 clk: rockchip: rk3399: add CLK_SET_RATE_PARENT for spdif\i2s\uart1 clks
Change-Id: I797b06e412a0029087bb10ead200f6fca9babbb1
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-04-20 16:01:18 +08:00
Binyuan Lan
02951d0061 ASoC: rockchip: rk817-codec: Increase the classD's current limit and close hpout when classD out
Change-Id: I6005c65b9d1a7c51aae0842ab1b016a63058f353
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2020-04-20 15:40:42 +08:00
William Wu
c2185009e2 usb: dwc3: gadget: fix init endpoints and resize tx fifos
The dwc3 initializes all of the endpoints in the following order:
epnum 0: USB EP0-OUT
epnum 1: USB EP0-IN
epnum 2: USB EP1-OUT
epnum 3: USB EP1-IN
...

This initialization logic works well if the number of IN endpoints
is equal to OUT endpoints. However, some SoCs have different number
of endpoints between the EP-IN and EP-OUT (e.g. RK3399/RV1109 7 IN
endpoints and 6 OUT endpoints), it will fail to init all of the
endpoints in this case.

This patch fixes the initialization logic for all of the IN and OUT
endpoints.

In addition, this patch also fixes the fifo depth of the Tx fifo0
when resize all of the tx fifos. And increase the fifos of isoc IN
endponits to hide system high bus latency.

Change-Id: I2928024f39cafaf669fd8e19b945a570c9650ca8
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-20 13:07:52 +08:00
William Wu
e9494f6332 usb: dwc2: host: fix channel halt with unknown reason
Channel halt with unknown reason happens in the following case:
DWC2 + USB 2.0 HUB + HS Device + FS Device

The HS Device is an optical fingerprint:
usb 1-1.4: USB disconnect, device number 5
usb 1-1.4: new high-speed USB device number 6 using dwc2
usb 1-1.4: New USB device found, idVendor=28ed, idProduct=7000
usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.4: Product: Aratek Capture Device
usb 1-1.4: Manufacturer: Aratek

The FS Device is an ID card identification module:
usb 1-1.3: new full-speed USB device number 9 using dwc2
usb 1-1.3: New USB device found, idVendor=0400, idProduct=c35a
usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0

When the issuse occurs, it always dump the error log:

dwc2 ff540000.usb: dwc2_hc_chhltd_intr_dma: Channel 13 - ChHltd set, but reason is unknown
dwc2 ff540000.usb: hcint 0x00000002, intsts 0x04000021
dwc2 ff540000.usb: dwc2_update_urb_state_abn(): trimming xfer length
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at drivers/usb/dwc2/hcd.c:2796 dwc2_assign_and_init_hc+0x554/0x8e4()
Modules linked in: bcmdhd
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.143 #3
Hardware name: Generic DT based system
[<c010f854>] (unwind_backtrace) from [<c010bb84>] (show_stack+0x10/0x14)
[<c010bb84>] (show_stack) from [<c03ed8b4>] (dump_stack+0x7c/0x9c)
[<c03ed8b4>] (dump_stack) from [<c012737c>] (warn_slowpath_common+0x88/0xb4)
[<c012737c>] (warn_slowpath_common) from [<c0127488>] (warn_slowpath_null+0x18/0x20)
[<c0127488>] (warn_slowpath_null) from [<c05c8314>] (dwc2_assign_and_init_hc+0x554/0x8e4)
[<c05c8314>] (dwc2_assign_and_init_hc) from [<c05c8788>] (dwc2_hcd_select_transactions+0xe4/0x178)
[<c05c8788>] (dwc2_hcd_select_transactions) from [<c05ca0e4>] (dwc2_release_channel+0x1b8/0x1cc)
[<c05ca0e4>] (dwc2_release_channel) from [<c05cbaa8>] (dwc2_hc_n_intr+0x4a0/0x728)
[<c05cbaa8>] (dwc2_hc_n_intr) from [<c05cc1dc>] (dwc2_handle_hcd_intr+0x4ac/0x4d8)
[<c05cc1dc>] (dwc2_handle_hcd_intr) from [<c05b247c>] (usb_hcd_irq+0x24/0x38)
[<c05b247c>] (usb_hcd_irq) from [<c017dea4>] (handle_irq_event_percpu+0xa8/0x28c)
[<c017dea4>] (handle_irq_event_percpu) from [<c017e0c0>] (handle_irq_event+0x38/0x5c)
[<c017e0c0>] (handle_irq_event) from [<c0181560>] (handle_fasteoi_irq+0xa8/0x124)
[<c0181560>] (handle_fasteoi_irq) from [<c017d5cc>] (generic_handle_irq+0x18/0x28)
[<c017d5cc>] (generic_handle_irq) from [<c017d890>] (__handle_domain_irq+0x88/0xb0)
[<c017d890>] (__handle_domain_irq) from [<c010142c>] (gic_handle_irq+0x44/0x74)
[<c010142c>] (gic_handle_irq) from [<c010c554>] (__irq_svc+0x54/0x90)

This patch only clears the unmask interrupts to avoid trigger
unknown Channel Halted interrupt. However, if the Channel Halted
interrupt happens unexpected, we need to check if the urb->length
is 4-byte alignment in dwc2_update_urb_state_abn(), this can help
to avoid the above warning.

Change-Id: I501e7d2e5194d5fe3ad797b05cf400ecc95387f0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-20 13:07:52 +08:00
Chen Jinsen
8396c1b788 ARM: dts: rockchip: vdpu support automatic frequency for rk3288
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I0378d57524d1b7146dbebec3d4fa9c125430b0d0
2020-04-20 13:05:45 +08:00
Chen Jinsen
7d317c7198 video: rockchip: mpp: automatic frequency for rk3288
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: Ieb0c5abfbd719d50d8059850e523e2a9f4f2a714
2020-04-20 13:04:22 +08:00
Chen Jinsen
9605e2da31 dt-bindings: video: rockchip_codec: add rk3288 codec properties
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: Ib22a7d9504b9b1ecaa3a6fcce311088309891d8e
2020-04-20 13:04:06 +08:00
Jianing Ren
22c15ccc6d usb: dwc3: core: fix drd bug for micro USB interface
Vbus detect function for INNO USB2PHY will be disabled when otg
cable is plugged. If we do not enable vbus detect when otg cable
unplugged, bvalid irq will never be triggered. Therefore, we set
phy mode to device when otg port is disconnected.

Change-Id: I5f53024d7a2a3a3f4f92ebcd716a25266fd009a1
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-04-20 10:17:11 +08:00
Jon Lin
9ff22ce691 drivers: rkflash: Fix mtd mark bad strategy
1.Fix wrong return value
2.Results are subject to back reading verification

Change-Id: Ifd3965423261617bdaeecc10fd4da28cb703b2aa
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-17 19:16:02 +08:00
Wang Jie
6662e6c683 arm64: rockchip_defconfig: enable CONFIG_GS_MXC6655XA.
Because many customers have already started using mxc6655xa, so enable it.

Change-Id: I9aa83a9342b1a7a70da8cdb07ce88c9971d3230e
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2020-04-17 18:30:29 +08:00
Wang Jie
16be479deb drivers: input: sensor: add mxc6655xa gsensor support.
Change-Id: I0d3c70cd5ee917b8a64f2ffb4e63615edda33cf9
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2020-04-17 18:28:28 +08:00
Wu Liangqing
6a779d6788 arm64: dts: rockchip: rk3399-mid-818-android.dts support android-Q
Change-Id: Idf51ee5dff60a97372138e2c9b5638951f636b3c
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-04-17 18:07:53 +08:00