Commit Graph

1053371 Commits

Author SHA1 Message Date
Elaine Zhang
124c0977a0 clk: rockchip: add a COMPOSITE_DCLK clock-type
The CLK_SET_RATE_PARENT flag make the parent clock and the child clk is 1:1.
If the DCLK frequency is too low, the PLL frequency will be very
low, which will affect the output waveform quality of PLL, and PLL
locking may be abnormal, so add a new COMPOSITE_DCLK clock-type to handle
that.

Change-Id: If9bee9ebf157fcf034aed246b3aa1cff503ef9cf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
e6dfeb296d Revert "clk: fractional-divider: check parent rate only if flag is set"
This reverts commit d13501a2be.

This patch causes 32768Hz can't be divided from 24MHz.

Change-Id: I1e86c2b0c96be0d1a80de83d1ac5e5909becbde1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Xing Zheng
c08b33636a 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>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
5abd502598 clk: rockchip: Add supprot to limit input rate for fractional divider
From Rockchips fractional divider usage, some clocks can be generated
by fractional divider, but the input clock frequency of fractional
divider should be less than a specified value.

Change-Id: Ifd6c5f6a24a64021f990506e8657cd925f9b96f9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
58b846439b clk: rockchip: half-divider: Use maximal and best divider
The bigger the divider, the better the clock jitter.

Change-Id: I4b4e06c71c2f0bdb0e32422fb42c8d490c3ec4bd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
75ec41628c clk: rockchip: add a COMPOSITE_HALFDIV_OFFSET clock-type
The div offset of some clocks are different from their mux offset
and the COMPOSITE clock-type require that div and mux offset are
the same, so add a new COMPOSITE_DIV_OFFSET clock-type to handle
that.

Change-Id: I1c97f7464c3c80ea6dbd7d4052565dd4e35c0931
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Elaine Zhang
6b08b14d6f clk: rockchip: add COMPOSITE_MUXTBL and MUXTBL variant
A clock branch consisting of a mux with non-standard
select values.
The parent in Mux table is sorted by priority.

Change-Id: Ibcaa35541cf8bc255175a62c7950b2241aac2f55
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Tao Huang
abe8f1cd98 rk: init/main.c: support print long kernel command line
With features AVB / dm-verity enabled, cmdline content is about to
exceed previous maximum 2048 bytes. printk can not support long line
exceed LOG_LINE_MAX which less than 1024. So loop printk until all
content are printed in init/main.c.

Change-Id: I4c40b5302d82122b93161fe30082f5abcfcad069
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-31 11:23:10 +08:00
Tao Huang
396ae1c301 ARM: rockchip_defconfig: Enable CONFIG_DTC_SYMBOLS
Required by Android.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iaf8da3f852f6f9647298f1379f8c1f2a12170123
2021-03-31 10:02:20 +08:00
Tao Huang
ae34a12515 arm64: rockchip_defconfig: Enable CONFIG_DTC_SYMBOLS
Required by Android.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id4cc964513967a2e8ad4fff92a15e0a485da555d
2021-03-31 09:56:32 +08:00
Tao Huang
2943395673 rk: kbuild: Introduce CONFIG_DTC_SYMBOLS
dtc generation of symbols by CONFIG_DTC_SYMBOLS.
For support device tree overlay.

Change-Id: Ia10496031bc02fd3a4ff98ab0acfc6fc9a54951b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-31 09:56:13 +08:00
Tao Huang
77c36d3572 ARM: rockchip_defconfig: update by savedefconfig
-CONFIG_MEMCG_SWAP=y which default y
-CONFIG_SECCOMP=y which default y
-CONFIG_POWER_AVS=y which is removed upstream.
-CONFIG_ZBOOT_ROM_TEXT=0x0 which default 0x0
-CONFIG_ZBOOT_ROM_BSS=0x0 which default 0x0
reorder some configs.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifc45b074751a9ef8d0e5390102fe6c4cc9d5bab2
2021-03-31 09:51:51 +08:00
XiaoDong Huang
bc0263dea7 irqchip/gic-v3-its: flush base table if rk356x
Change-Id: Ia2b0dd3d47742c43939eb99d3f8adac8e1107603
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-03-29 20:10:37 +08:00
XiaoDong Huang
44cbfbc637 irqchip/gic-v3-its: force to config its tables as no-inner-cache in rk356x
Change-Id: Idebfe94622cbb8169f4d464a3152c7828683c72c
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-03-29 20:10:37 +08:00
XiaoDong Huang
a9d1129997 irqchip/gic-v3-its: add GFP_DMA32 flag for memory allocated for ITS in rk356x
Change-Id: Ic1d866733b348b86bbfdf2df4c0416a68eb422b7
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-03-29 20:10:37 +08:00
Tao Huang
03b4c8917e arm64: rockchip_defconfig: update by savedefconfig
-CONFIG_MEMCG_SWAP=y which default y
-CONFIG_SECCOMP=y which default y
-CONFIG_POWER_AVS=y which is removed upstream.
reorder some configs.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1b5651ce91a06f69a6cafb116ad2b67c1850a0a1
2021-03-29 19:40:30 +08:00
Tao Huang
91b217558a rk: arm64: support make image with script mkimg
Change-Id: I6067d9a4d2b68b63c449646f36255dde3d795611
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-29 15:44:01 +08:00
Tao Huang
847ff38921 dt-bindings: soc: rockchip: Revert "rk: revert to v4.19"
This reverts part of commit 251c226c35 ("rk: revert to v4.19").
To keep the changes of include/dt-bindings/soc/rockchip,boot-mode.h.

Change-Id: I4bcb721da1bea0600c92d4e23d33320bff8d0caf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 21:01:44 +08:00
Tao Huang
beda2dd272 ARM: dts: rockchip: bulk convert gpios to their constant counterparts (v2)
According to upstream commit 07f08d9cee ("ARM: dts: rockchip:
bulk convert gpios to their constant counterparts") replace
RK_FUNC_x -> x and RK_GPIOx -> x.

sed -i -e "
/rockchip,pins *=/bcheck
b # to end of script
:append-next-line
N
:check
/^[^;]*$/bappend-next-line
s/<RK_GPIO\([0-9]\) /<\1 /g
s/<\([^ ][^ ]*  *\)0 /<\1RK_PA0 /g
s/<\([^ ][^ ]*  *\)1 /<\1RK_PA1 /g
s/<\([^ ][^ ]*  *\)2 /<\1RK_PA2 /g
s/<\([^ ][^ ]*  *\)3 /<\1RK_PA3 /g
s/<\([^ ][^ ]*  *\)4 /<\1RK_PA4 /g
s/<\([^ ][^ ]*  *\)5 /<\1RK_PA5 /g
s/<\([^ ][^ ]*  *\)6 /<\1RK_PA6 /g
s/<\([^ ][^ ]*  *\)7 /<\1RK_PA7 /g
s/<\([^ ][^ ]*  *\)8 /<\1RK_PB0 /g
s/<\([^ ][^ ]*  *\)9 /<\1RK_PB1 /g
s/<\([^ ][^ ]*  *\)10 /<\1RK_PB2 /g
s/<\([^ ][^ ]*  *\)11 /<\1RK_PB3 /g
s/<\([^ ][^ ]*  *\)12 /<\1RK_PB4 /g
s/<\([^ ][^ ]*  *\)13 /<\1RK_PB5 /g
s/<\([^ ][^ ]*  *\)14 /<\1RK_PB6 /g
s/<\([^ ][^ ]*  *\)15 /<\1RK_PB7 /g
s/<\([^ ][^ ]*  *\)16 /<\1RK_PC0 /g
s/<\([^ ][^ ]*  *\)17 /<\1RK_PC1 /g
s/<\([^ ][^ ]*  *\)18 /<\1RK_PC2 /g
s/<\([^ ][^ ]*  *\)19 /<\1RK_PC3 /g
s/<\([^ ][^ ]*  *\)20 /<\1RK_PC4 /g
s/<\([^ ][^ ]*  *\)21 /<\1RK_PC5 /g
s/<\([^ ][^ ]*  *\)22 /<\1RK_PC6 /g
s/<\([^ ][^ ]*  *\)23 /<\1RK_PC7 /g
s/<\([^ ][^ ]*  *\)24 /<\1RK_PD0 /g
s/<\([^ ][^ ]*  *\)25 /<\1RK_PD1 /g
s/<\([^ ][^ ]*  *\)26 /<\1RK_PD2 /g
s/<\([^ ][^ ]*  *\)27 /<\1RK_PD3 /g
s/<\([^ ][^ ]*  *\)28 /<\1RK_PD4 /g
s/<\([^ ][^ ]*  *\)29 /<\1RK_PD5 /g
s/<\([^ ][^ ]*  *\)30 /<\1RK_PD6 /g
s/<\([^ ][^ ]*  *\)31 /<\1RK_PD7 /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)0 /<\1RK_FUNC_GPIO /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)RK_FUNC_\([1-9]\) /<\1\2 /g
" *.dts *.dtsi

Change-Id: I8ee2a66094cc25b0d72aba11a239f4fe9c76c4f4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 20:36:53 +08:00
Tao Huang
77bcbf172b arm64: dts: rockchip: bulk convert gpios to their constant counterparts (v2)
According to upstream commit d64420e816 ("arm64: dts: rockchip:
bulk convert gpios to their constant counterparts") replace
RK_FUNC_x -> x and RK_GPIOx -> x.

sed -i -e "
/rockchip,pins *=/bcheck
b # to end of script
:append-next-line
N
:check
/^[^;]*$/bappend-next-line
s/<RK_GPIO\([0-9]\) /<\1 /g
s/<\([^ ][^ ]*  *\)0 /<\1RK_PA0 /g
s/<\([^ ][^ ]*  *\)1 /<\1RK_PA1 /g
s/<\([^ ][^ ]*  *\)2 /<\1RK_PA2 /g
s/<\([^ ][^ ]*  *\)3 /<\1RK_PA3 /g
s/<\([^ ][^ ]*  *\)4 /<\1RK_PA4 /g
s/<\([^ ][^ ]*  *\)5 /<\1RK_PA5 /g
s/<\([^ ][^ ]*  *\)6 /<\1RK_PA6 /g
s/<\([^ ][^ ]*  *\)7 /<\1RK_PA7 /g
s/<\([^ ][^ ]*  *\)8 /<\1RK_PB0 /g
s/<\([^ ][^ ]*  *\)9 /<\1RK_PB1 /g
s/<\([^ ][^ ]*  *\)10 /<\1RK_PB2 /g
s/<\([^ ][^ ]*  *\)11 /<\1RK_PB3 /g
s/<\([^ ][^ ]*  *\)12 /<\1RK_PB4 /g
s/<\([^ ][^ ]*  *\)13 /<\1RK_PB5 /g
s/<\([^ ][^ ]*  *\)14 /<\1RK_PB6 /g
s/<\([^ ][^ ]*  *\)15 /<\1RK_PB7 /g
s/<\([^ ][^ ]*  *\)16 /<\1RK_PC0 /g
s/<\([^ ][^ ]*  *\)17 /<\1RK_PC1 /g
s/<\([^ ][^ ]*  *\)18 /<\1RK_PC2 /g
s/<\([^ ][^ ]*  *\)19 /<\1RK_PC3 /g
s/<\([^ ][^ ]*  *\)20 /<\1RK_PC4 /g
s/<\([^ ][^ ]*  *\)21 /<\1RK_PC5 /g
s/<\([^ ][^ ]*  *\)22 /<\1RK_PC6 /g
s/<\([^ ][^ ]*  *\)23 /<\1RK_PC7 /g
s/<\([^ ][^ ]*  *\)24 /<\1RK_PD0 /g
s/<\([^ ][^ ]*  *\)25 /<\1RK_PD1 /g
s/<\([^ ][^ ]*  *\)26 /<\1RK_PD2 /g
s/<\([^ ][^ ]*  *\)27 /<\1RK_PD3 /g
s/<\([^ ][^ ]*  *\)28 /<\1RK_PD4 /g
s/<\([^ ][^ ]*  *\)29 /<\1RK_PD5 /g
s/<\([^ ][^ ]*  *\)30 /<\1RK_PD6 /g
s/<\([^ ][^ ]*  *\)31 /<\1RK_PD7 /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)0 /<\1RK_FUNC_GPIO /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)RK_FUNC_\([1-9]\) /<\1\2 /g
" *.dts *.dtsi

Change-Id: I789e702620a4d0331d54474d48aaf68133795859
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 20:30:22 +08:00
Tao Huang
f2c8914ffe rk: kbuild: support build resource_tool
Change-Id: I7b55a5644d3818efac296a16b4009bf10becec97
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 18:18:27 +08:00
Tao Huang
4f023b9655 ARM: rockchip: no build mach-rockchip when CONFIG_ARM_PSCI
There is not need to build mach-rockchip when PSCI is enabled.
Save about 5K text, 7K data and fix compilation error for THUMB2_KERNEL.

Change-Id: Ieb17867592d7d49a8b983dc5c7e8d1d1df14d864
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-24 19:28:29 +08:00
Andy Yan
aa5ccab207 Use standard lz4 format for Image.lz4 on ARM64
The lz4 Legacy format(which specified by -l) is
not supported by U-Boot.

Change-Id: I6b94881117b59384daca4efd796c933e8dc9e5a6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-24 19:18:33 +08:00
Tao Huang
f45127c595 media/i2c/soc_camera: remove unused rockchip drivers
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I898b1035c9d591143ec35e7b4c137603201ef89a
2021-03-24 18:57:24 +08:00
Tao Huang
c2482146d1 rk: Makefile: add gcc-wrapper
Change-Id: Ie5025f30a747cd40e26eeb6ec939de28af899645
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-23 15:49:03 +08:00
Tao Huang
82d9ddc0c9 scripts/gcc-wrapper.py: Fix for v5.10
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idbacecef243a0469c8cb23491ceba22e2f52deb1
2021-03-18 20:58:51 +08:00
Tao Huang
784f0cee89 ANDROID: Incremental fs: Fix printk format warnings in format.c
fs/incfs/format.c: In function 'incfs_read_next_metadata_record':
./include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
fs/incfs/format.c:619:3: note: in expansion of macro 'pr_warn'
   pr_warn("incfs: The record is too large. Size: %ld",
   ^~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1a0b1e32761dd4358ff3ca210041893373f0a1a5
2021-03-18 18:49:03 +08:00
Tao Huang
85c88d7580 rk: .gitignore: ignore top img files and out directory
Change-Id: Icfd5518a10fef49c76164f4943f6451877c32f99
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-17 21:12:51 +08:00
Tao Huang
659587fbd5 rk: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4c5994349586905abf7ec44c9c01f22f8e3bfa37
2021-03-17 21:12:44 +08:00
Tao Huang
bc69b758ef Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (176331 commits)
  ANDROID: GKI: Enable bounds sanitizer
  ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS
  ANDROID: abi_gki_aarch64_qcom: Add cpufreq related symbols
  ANDROID: cpufreq: Add a restricted vendor hook for freq transition
  ANDROID: scsi: ufs: add hooks to track ufs commands
  ANDROID: Fix compilation error when CPU_FREQ is disabled
  BACKPORT: kasan, arm64: allow using KUnit tests with HW_TAGS mode
  Revert "FROMGIT: kasan, arm64: allow using KUnit tests with HW_TAGS mode"
  Revert "BACKPORT: kasan: remove redundant config option"
  UPSTREAM: arm/kasan: fix the array size of kasan_early_shadow_pte[]
  FROMGIT: KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility
  FROMGIT: KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config()
  FROMGIT: KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available
  FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
  FROMGIT: KVM: arm64: Fix nVHE hyp panic host context restore
  FROMGIT: KVM: arm64: Avoid corrupting vCPU context register in guest exit
  FROMLIST: arm64: cpufeatures: Fix handling of CONFIG_CMDLINE for idreg overrides
  ANDROID: sched: Add vendor hook for uclamp_eff_value
  ANDROID: abi_gki_aarch64_qcom: Add CFS scheduler symbols
  ANDROID: GKI: Add mempool APIs to the symbol list
  ...

Change-Id: I4ed13984b97bc531d1dae61920457f31b84190e9

Conflicts:
	Documentation/devicetree/bindings/nvmem/rockchip-otp.txt
	arch/arm64/boot/dts/rockchip/px30.dtsi
	arch/arm64/boot/dts/rockchip/rk3308.dtsi
	arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
	drivers/clk/rockchip/Kconfig
	drivers/clk/rockchip/clk-rk3308.c
	drivers/gpu/drm/rockchip/rk3066_hdmi.c
	drivers/gpu/drm/rockchip/rockchip_rgb.c
	drivers/media/i2c/imx219.c
	drivers/nvmem/rockchip-otp.c
	drivers/power/supply/cw2015_battery.c
	sound/soc/codecs/cx2072x.c
	sound/soc/codecs/cx2072x.h
	sound/soc/codecs/rk3328_codec.c
2021-03-17 18:07:51 +08:00
Tao Huang
251c226c35 rk: revert to v4.19
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I502dce68b639df4ebf5a1688e0dc2e5c5763ebc2
2021-03-17 18:05:39 +08:00
Andy Yan
8e964a33a1 drm/rockchip: vop2: print module name when dump register
Change-Id: Ifaee56deff46ac0156831a37cbf7b77586beab84
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-17 17:34:21 +08:00
Ren Jianing
5bdeec86b6 arm64: dts: rockchip: rk3566-box: fix combphy1 ref-clk to 100MHz
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I2808f908d087843aba7c4c0fd769b7c80518c022
2021-03-17 17:33:28 +08:00
Ren Jianing
365de1ccfa phy: rockchip: inno-usb2: add pre-emphasis at RK356x tuning
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ie6375b363d4ca641b971b331971ce7985d985075
2021-03-17 17:33:19 +08:00
Sandy Huang
f07e966dbd drm/rockchip: vop2: turn down scale fac cali log level
Change-Id: I13395bfb054c170dd58de4af4bccb35a52565dfa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-03-17 15:18:49 +08:00
Zefa Chen
1cb6be0adb media: i2c: sensor driver add g_mbus_config for isp2
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I14dfc95c06ab93843a7c9956e7da5b04cdb820bb
2021-03-17 15:18:37 +08:00
William Wu
a140608dec usb: dwc3: gadget: fix request already in flight
Test on RV1126 board with UVC function. When do UVC streaming on/off
@H265 3840 * 2160 stress test, it fails to streaming on UVC with the
following log:

[ 1589.834573] WARNING: CPU: 3 PID: 3075 at drivers/usb/dwc3/gadget.c:1611 dwc3_gadget_ep_queue+0x148/0x178
[ 1589.834593] ep3in: request 638c13d3 already in flight
[ 1589.834603] Modules linked in: galcore(O)
[ 1589.834622] CPU: 3 PID: 3075 Comm: kworker/3:2 Tainted: G        W  O      4.19.111 #2
[ 1589.834631] Hardware name: Generic DT based system
[ 1589.834648] Workqueue: events uvcg_video_pump
[ 1589.834673] [<b010f408>] (unwind_backtrace) from [<b010b96c>] (show_stack+0x10/0x14)
[ 1589.834741] [<b010b96c>] (show_stack) from [<b0645104>] (dump_stack+0x90/0xa4)
[ 1589.834766] [<b0645104>] (dump_stack) from [<b0126204>] (__warn+0xfc/0x114)
[ 1589.834787] [<b0126204>] (__warn) from [<b0126260>] (warn_slowpath_fmt+0x44/0x68)
[ 1589.834806] [<b0126260>] (warn_slowpath_fmt) from [<b04571d8>] (dwc3_gadget_ep_queue+0x148/0x178)
[ 1589.834826] [<b04571d8>] (dwc3_gadget_ep_queue) from [<b0472074>] (uvcg_video_pump+0x94/0x164)
[ 1589.834849] [<b0472074>] (uvcg_video_pump) from [<b013cce0>] (process_one_work+0x1f0/0x408)
[ 1589.834869] [<b013cce0>] (process_one_work) from [<b013d9b8>] (worker_thread+0x30/0x564)
[ 1589.834891] [<b013d9b8>] (worker_thread) from [<b0142910>] (kthread+0x140/0x170)
[ 1589.834907] [<b0142910>] (kthread) from [<b01010d8>] (ret_from_fork+0x14/0x3c)
[ 1589.834922] Exception stack(0xbbdfffb0 to 0xbbdffff8)
[ 1589.834938] ffa0:                                     00000000 00000000 00000000 00000000
[ 1589.834953] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1589.834966] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1589.834979] ---[ end trace b30d445a1f050523 ]---
[ 1589.834979] ---[ end trace b30d445a1f050523 ]---
[ 1589.834992] Failed to queue request (-22).

It's because that the __dwc3_gadget_start_isoc is called very late after
XferNotReady, so the frame number is outdated and start transfer fail
with the cmd_status "DEPEVT_TRANSFER_BUS_EXPIRY". In this case, the dwc3
driver return -EINVAL to the UVC function driver without delete and unmap
the failed request, this cause the request requeue fail next time.

Change-Id: I4cc919bcd4e1e0abbb6a929483e6fc2fe7dc9750
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-03-17 15:14:39 +08:00
Michael Olbrich
582ea1370a UPSTREAM: usb: dwc3: gadget: make starting isoc transfers more robust
Currently __dwc3_gadget_start_isoc must be called very shortly after
XferNotReady. Otherwise the frame number is outdated and start transfer
will fail, even with several retries.

DSTS provides the lower 14 bit of the frame number. Use it in combination
with the frame number provided by XferNotReady to guess the current frame
number. This will succeed unless more than one 14 rollover has happened
since XferNotReady.

Start transfer might still fail if the frame number is increased
immediately after DSTS is read. So retries are still needed.
Don't drop the current request if this happens. This way it is not lost and
can be used immediately to try again with the next frame number.

With this change, __dwc3_gadget_start_isoc is still not successfully in all
cases bit it increases the acceptable delay after XferNotReady
significantly.

Change-Id: I656b487b9a265921ae612a071ebcd496ffe5f510
Reviewed-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit c5a7092f40)
2021-03-17 15:14:39 +08:00
Xing Zheng
81b3c14f77 ASoC: rockchip: pdm: fix the missing register sound with 'rockchip,path-map' property
The return value equal 0 should be correct.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Id0ac8012f4e2eeb95a4dbf590f02843cbc3c863f
2021-03-17 14:01:36 +08:00
Shawn Lin
c84a4aa411 PCI: rockchip: dw: Move deassert #PERST after enabling LTSSM
It was recommended by ECN document, so following it will make
less risk in probing devices in case the refclk is coming from
SoC.

Change-Id: Ic4514f373b6014c406d5436738419c64df6d32b2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-03-17 11:19:17 +08:00
Andy Yan
9a75da1582 drm/rockchip: vop2: Fix wait fs_by_vcnt in interlace mode
Change-Id: I940c690b8b4246b38ec94847fd2d2b0f8d481888
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-17 10:13:55 +08:00
Andy Yan
09d4b2c521 drm/rockchip: vop2: wait for fs by intr raw status
Change-Id: Idda6f973e70aa1ea0146e023173829555ccaa551
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-17 10:13:55 +08:00
Algea Cao
e616f98e1c drm: rockchip: dw-hdmi: Clean output_if when hdmi disable
To support multi-display output_if must be clean when
hdmi disable.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic4205a59ce1adab7f4ac6f673c740a14556fdeae
2021-03-17 09:03:00 +08:00
Finley Xiao
c472f79a09 PM / devfreq: rockchip_dmc: Add SYS_STATUS_CIF0/1 system status support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie683ed0cc49b21ec95765396a73e2e7a3f7cbb04
2021-03-16 17:16:12 +08:00
Huang zhibao
241b780cac arm64: dts: rockchip: rk3568-nvr: set rockchip,default-max-load to 100
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I31859f56b753635999414342d934d18fa68298ad
2021-03-16 14:47:14 +08:00
Jianqun Xu
e169bc2262 irqchip/gic-v3: get free page instead of kmalloc for itt
Since kmalloc may not care about GFP_DMA32, change to use get free pages
for itt on its device.

Change-Id: I2e91c97bd4d61d2542cf437363fc3dd1d9fa669c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-03-16 14:43:13 +08:00
Shawn Lin
58a17c4f09 PCI: rockchip: dw: Fix possible wrong power supply
regulator_disable/enable() accessories may not be supported by
all regulator drivers such as gpio regulator. In order to compliant
to all, it would be better to call a .set_voltage() before enabling
or disabling regulators as this hook fits for all, no metter if enable
or disable hooks were implemented.

Change-Id: Id6c67728ed29ae76986908908361dec966724a3e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-03-16 14:41:01 +08:00
Shunqing Chen
ba901481e0 arm64: dts: rockchip: rk356x: evb: add hdmi phy-table
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I7314c505028f2e69698b693a036da8162c4842d8
2021-03-16 10:03:01 +08:00
Yifeng Zhao
f1be951d1b drivers: rk_nand: fix some NAND FLASH initialization failed issue
There are two sets of NAND flash drivers. The NAND flash state needs
to be restored to the default value after detection.

bug:
[    2.722218] No.1 FLASH ID:45 3a 94 93 76 51
[    2.726295] toshiba RR 18 row=400,count 18,status=-1
[    2.726353] flash_read_page_en 0 400 error_ecc -1 1

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I80c95a68ad900e0653684ba3978e59102d27bf70
2021-03-16 10:02:44 +08:00
Herman Chen
6e04278ece video: rockchip: mpp: rkvdec2: Rename functions
Rename rkvdec2 functions which have the same name to the rkvdec
functions.

Change-Id: I188ce1afa8e9fab0a63813a4071e42b51fe92ccf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-16 09:17:50 +08:00