Commit Graph

861684 Commits

Author SHA1 Message Date
Weixin Zhou
ea187fc45b arm64: dts: rockchip: rk3566-rk817-eink-w6: correct leds-gpio configs
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: If8a70b9aae54179be19a09f964f72e7a89d0f026
2021-01-22 20:12:58 +08:00
Andy Yan
227d9c28c0 drm/rockchip: vop2: Fix wait fs irq
Vcnt is stored in the upper 16 bits.
We should wait for the frame start irq status from
low to high.

Fixes: e6113fb4c5b3 ("drm/rockchip: vop2: wait for next frame when close to
frame start of previous vp")

Change-Id: I8dd0930800ada9796f616d9b3ec1962d213aa9b3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:58 +08:00
Cai YiWei
076891bc3e media: rockchip: isp: fix gain buf update
isp2.0 one frame read back many times and gain
address will updated at each read back end. To make
sure gain buffer update right, so one last read back
to the frame start to config next buf, and the frame end
will update to shadow reg for ready to receive next frame.

Change-Id: I1be92f92f9489b7d1ffb5ca72a510e9ea45f5ab0
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-22 20:12:58 +08:00
Weixin Zhou
dfbe9efdae arm64: dts: rockchip: rk3566-rk817-eink-w6: adjust vdd_cpu config for lower consumption
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I80d29caa912c6abf3ef0a52a1f3b6cb5bd361912
2021-01-22 20:12:58 +08:00
Alex Zhao
59a625c690 arm64: dts: rockchip: rk3566-rk817-eink-w6: add wifi-bt-power-toggle
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I8d2dedae7552d55b8b8d67f1a59c8c90c8570220
2021-01-22 20:12:58 +08:00
Alex Zhao
e41861ca07 net: rfkill: rk: add wifi/bt main power control
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I56e106056fc2a6e0b8ec4460eb2e90ffa56dfbfa
2021-01-22 20:12:58 +08:00
Ding Wei
fde78f2de6 video: rockchip: mpp: issue for rcbbuf setting
tips:
1. rcb_size == 0, skip it.
2. if current rcb_size is larger then the remaining buffer size,
  skip it instead of break.

Change-Id: Ide37ccbf0af9ceb3f4a6f6fe5e7045bfbd8ddc74
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-22 20:12:58 +08:00
Cai YiWei
569ae93661 media: rockchip: isp: support to set format if no streaming
Change-Id: I17b9433eae512aa05b295df6b3e86f5c88db0d47
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-22 20:12:57 +08:00
Wenping Zhang
8fee1ec2e0 arm64: dts: rockchip: rk3566-rk817-eink-w103: add back key support.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Iee8f9c3a6b8a447d9e50e1f9b4767848d4ccb1a1
2021-01-22 20:12:57 +08:00
Weixin Zhou
113b6107c5 driver: input: touchscreen: gt9xx: fix irq wakeup fail from deepsleep
1. set edge trigger
2. add wakeup source

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I7ab5893f435ab9e8baa42c17c63636b38a5eab03
2021-01-22 20:12:57 +08:00
Weixin Zhou
a14a813cde arm64: dts: rockchip: rk3566-rk817-eink-w6: add wakeup-source for gt9xx
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ic8c18755d426a76d8a0f0df981afbf0287cab683
2021-01-22 20:12:57 +08:00
Ren Jianing
ba8203c1b8 usb: gadget: u_audio: add uevent for ppm compensation
This patch add uevent to notify the application layer how much ppm
is different between USB clk and AUDIO clk.

The event include two parts USB_STATE and PPM. For example:

  g_audio_work: sent uac uevent USB_STATE=SET_AUDIO_CLK PPM=12
  g_audio_work: sent uac uevent USB_STATE=SET_AUDIO_CLK PPM=-1

Note: The ppm compensation depends on the method implement of
clk drift and compensation in the rockchip_pdm.c driver. So if
you want the ppm compensation to take effect, please make sure
the commit "ASoC: rockchip: pdm: Add support for clk compensation"
is merged.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Id25411397fe376342c773c11f1989ed5854f8ad9
2021-01-22 20:12:57 +08:00
Wenping Zhang
6c3d266cc2 arm64: dts: rockchip: add rk3566 eink w103 board.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Ieeca4e4fecb3eb9eb5950286f9519bec8c974898
2021-01-22 20:12:57 +08:00
Tao Huang
420237601d Revert "ARM: rockchip_defconfig: enable HZ_1000"
This reverts commit 52d7b98f85.

There is no need to keep HZ=1000 after commit 3be6453a90
("kthread: do not preempt current task if it is going to call schedule()").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I42632c8dab553762574249e7fc219a50a9cf5323
2021-01-22 20:12:57 +08:00
Tao Huang
e8caca4ddf Revert "arm64: rockchip_defconfig: enable HZ_1000"
This reverts commit 9a883c648a.

There is no need to keep HZ=1000 after commit 3be6453a90
("kthread: do not preempt current task if it is going to call schedule()").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id035e01cbf274dce0e6f12caef7f4eeb7efc2406
2021-01-22 20:12:57 +08:00
Liang Chen
580882cffa arm64: dts: rockchip: rk356x: adjust system-status-freq for dmc
Change-Id: I8f59c5457029fd9559f4f366257d68b22e9946c7
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-01-22 20:12:57 +08:00
Liang Chen
a5cb2bba3a arm64: dts: rockchip: rk3568: adjust opp-talbe when low-temp for cpu
Change-Id: I5fd3fc83285e557a454da25d3cb00ee007e6af60
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-01-22 20:12:57 +08:00
Tao Huang
013e1bdf50 ARM: rockchip_defconfig: set CONFIG_BLK_DEV_LOOP_MIN_COUNT to 16
Sync to gki_defconfig

CONFIG_BLK_DEV_LOOP_MIN_COUNT must be at least 16 in order
to pass VTS.

Change-Id: I3a0f0a77f8a60cf8a3e48683657f10e160927c58
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-01-22 20:12:57 +08:00
Tao Huang
2d6fe1cb7a arm64: rockchip_defconfig: set CONFIG_BLK_DEV_LOOP_MIN_COUNT to 16
Sync to gki_defconfig

CONFIG_BLK_DEV_LOOP_MIN_COUNT must be at least 16 in order
to pass VTS.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I15e46ac79dc6f149914a540e311369177bccdc23
2021-01-22 20:12:57 +08:00
Tao Huang
d797136cae ARM: rockchip_defconfig: Add CONFIG_UNICODE
Sync to gki_defconfig

Before:
    text	   data	    bss	     dec	    hex	filename
13465267	4345690	2113400	19924357	1300585	vmlinux

After:
    text	   data	    bss	     dec	    hex	filename
13473410	4411226	2113400	19998036	1312554	vmlinux

Change-Id: I023ce20549e9d65198b8a23affe4c9739f867103
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-01-22 20:12:57 +08:00
Sugar Zhang
6f048a072e fiq_debugger_arm: Print real address instead of hashed address
This patch replaces %p with %px to print real address for debugging.

Refer to:
Documentation/core-api/printk-formats.rst: Unmodified Addresses

Before:

debug> bt
pid: 0  comm: swapper/0
 r0 00000000  r1 b0d08cb0  r2 00000008  r3 00000001
 r4 b0c50008  r5 00000000  r6 00000000  r7 b0d01ef0
 r8 f0803000  r9 b0d00000 r10 00000000 r11 b0d01f68  mode SVC
 ip 00000000  sp b0d01ec0  lr b010e308  pc b010e314 cpsr 600001d3
  pc: 319691eb (handle_IPI+0x11c/0x18c), lr 3029134f (handle_IPI+0x110/0x18c)
  pc: d0f03ab2 (gic_handle_irq+0x74/0x78), lr d0f03ab2 (gic_handle_irq+0x74/0x78)
  pc: 86ca801d (__irq_svc+0x58/0x8c), lr 86ca801d (__irq_svc+0x58/0x8c)

After this patch:

debug> bt
pid: 0  comm: swapper/0
 r0 00000000  r1 b0d08cb0  r2 0000000c  r3 00000001
 r4 b0c50008  r5 00000000  r6 00000000  r7 b0d01ef0
 r8 f0803000  r9 b0d00000 r10 00000000 r11 b0d01f68  mode SVC
 ip 00000000  sp b0d01ec0  lr b010e308  pc b010e314 cpsr 600d01d3
  pc: b010e314 (handle_IPI+0x11c/0x18c), lr b010e308 (handle_IPI+0x110/0x18c)
  pc: b03b347c (gic_handle_irq+0x74/0x78), lr b03b347c (gic_handle_irq+0x74/0x78)
  pc: b0101a78 (__irq_svc+0x58/0x8c), lr b0101a78 (__irq_svc+0x58/0x8c)

Change-Id: I9ef798f30531c654ef18ff59d56bb85facccb79d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:57 +08:00
Yifeng Zhao
d1dd426374 drivers: rk_nand: support rk3568
1. add compatible "rockchip,rk-nandc-v9"
2. support samsung ss14 8GB MLC NAND FLASH

Change-Id: I0508ac1d7249b40eac5d5b88bbf0695b7e2ba6f3
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2021-01-22 20:12:57 +08:00
Andy Yan
107a0619dd drm/rockchip: vop2: Move window from inactive video port to active vide port
Set all windows to activated video port at init,
try to avoid change port_mux when display on.

Change-Id: I29b7b0b0a610580ac6e07cc1d8ef35b51d86b8b0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:57 +08:00
Andy Yan
e3fd547c39 drm/rockchip: vop2: Update date port_mux for all vp when one of them changed
Change-Id: I364b19b94d00ee95fad6ccf25f769f7d123e106c
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:57 +08:00
Andy Yan
9d1bc38156 drm/rockchip: vop2: Init window and video port map.
Read port_mux register to get the window and vp map.

Change-Id: If18c55754592df2e9bb8e3fe93e66624cd2cedb9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:57 +08:00
Andy Yan
e40785303b drm/rockchip: vop2: Fix start mixer_id find for vp
Change-Id: I08107a9ffb5eb719809d76a6a0d9efe16c92543b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:56 +08:00
Andy Yan
4719c4e177 drm/rockchip: vop2: wait for next frame when close to frame start of previous vp
Only config done the current vp at the first 3/4 frame time
if there is another vp waiting for config done.

Change-Id: I0ee33182cf11cd6d502e0bf02684c8b09f3df26b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:56 +08:00
Andy Yan
2fc439df49 drm/rockchip: vop2: Read vp config done bits before change it
The config done bits of VP0, VP1, VP2 on RK3568 stands on
the first three bits on REG_CFG_DONE register without mask bit.

If two or three config done events happens one after
another in a very shot time, the flowing config done
write may override the previous config done bit before
it take effect:
 1: config done 0x8001 for VP0
 2: config done 0x8002 for VP1

 0x8002 may override 0x8001 before it take effect.

So we do a read | write here.

Change-Id: I35ad380b1c2751542697c9c7cdacea12dd08d924
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-22 20:12:56 +08:00
Weixin Zhou
ceaaf760e6 arm64: dts: rockchip: rk3566-rk817-eink-w6: add charger leds
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Id2edd426c626b8cc9e3d86626f9e9dc766f91ff6
2021-01-22 20:12:56 +08:00
Yifeng Zhao
2810efc860 soc: rockchip: mtd_vendor_storage: fix write issue
The page offset is need point to empty page. And also need to deal
case with ECC error.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I459345f18823b63cc5084be63c9a64c36838a151
2021-01-22 20:12:56 +08:00
Cai YiWei
a2eee96da1 media: rockchip: isp/ispp get vaddr in buf queue
avoid to map vaddr when vb2_plane_vaddr at interrupt

Change-Id: Id391a405973a9838fbc97065e4e27f6b88c07b8c
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-22 20:12:56 +08:00
Tao Huang
2711475ad6 input: touchscreen: tp_suspend: Remove set but unused variable 'ret'
drivers/input/touchscreen/tp_suspend.h:77:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]

Fixes: ef0b86754e ("driver: input: touchscreen: gt9xx: add ebc suspend notify support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1fd66d6b8664e6f09cc4aad1544bfef424565dc0
2021-01-22 20:12:56 +08:00
Steven Liu
ca67e68942 ARM: dts: rockchip: Fix UART pull-ups on rv1108
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I46de2a34695075956d66de140c20f3d1b63a18be
2021-01-22 20:12:56 +08:00
Steven Liu
6e0dd2d946 ARM: dts: rockchip: Fix UART pull-ups on rk3288
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I6ab6f53c76b2dc72b9656080e7231f98e1d75ab3
2021-01-22 20:12:56 +08:00
Steven Liu
c599250109 ARM: dts: rockchip: Fix UART pull-ups on rk322x
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I3e57d7c8646c4df6a24c94dcecc774acbd0a2c20
2021-01-22 20:12:56 +08:00
Steven Liu
31acfe769e ARM: dts: rockchip: Fix UART pull-ups on rk3188
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I660b0c7732305d73d4255be877aa48fa9c9afb01
2021-01-22 20:12:56 +08:00
Steven Liu
026248a29f ARM: dts: rockchip: Fix UART pull-ups on rk312x
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I42c00d7e7777cd8ef1012f78aef049b39045b311
2021-01-22 20:12:56 +08:00
Steven Liu
dd2f0befb2 ARM: dts: rockchip: Fix UART pull-ups on rk3066a
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I7466ab47baa86c81bf1f2fe47556aa03fbe67671
2021-01-22 20:12:56 +08:00
Steven Liu
eb04688f6f ARM: dts: rockchip: Fix UART pull-ups on rk3036
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I01e1effcc185fec6207cebb38b7f12701a7ebd35
2021-01-22 20:12:56 +08:00
Zorro Liu
a01e6dba20 drm/rockchip/ebc-dev: dsp output low when power off
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I34b11e07f2dd34262a9b7730e8251af9209b0d8e
2021-01-22 20:12:56 +08:00
Sugar Zhang
452ebfb0a2 power: reset: reboot-mode: Register callback for kernel pre restart
This patch register boot mode into kernel pre restart call chain
to support 'reset [cmd]'

e.g.

/# fiq
Welcome to fiq debugger mode
Enter ? to get command help
debug> help
FIQ Debugger commands:
 reset [<c>]   Hard reset with command <c>
debug>
debug> reset loader
DDR Version V1.04 20201030
DDR4, 328MHz
BW=32 Col=10 Bk=4 BG=2 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
...
boot mode: loader
...
RKUSB: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1d1f000

Change-Id: Ic1792bdd0262c77a09fd780c7ac3e6d912b09008
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:56 +08:00
Sugar Zhang
e656a9a56a reboot: Introduce kernel pre restart handler call chain
This patch renames kernel_i2c_restart to kernel_pre_restart
for general purpose.

This call chain is expected to be executed before kernel_restart
to do something before reset system. such as, i2c restart,
boot mode config.

Change-Id: I67c80c297ca5de83deb4736b5dab0f2c9c8543a6
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:56 +08:00
Sugar Zhang
385f6d70a7 ASoC: rockchip: i2s: Add support for clk compensation
This patch introduces a method to handle clk drift and compensation.

e.g:

/# amixer contents
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=0

/# arecord -D hw:0,0 --period-size=1024 --buffer-size=4096 -r
16000 -c 2 -f s16_le /dev/zero &

/# amixer -- cset numid=1 -10
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=-10

/# amixer -- cset numid=1 10
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=10

Change-Id: I6be8d7275ccf985f43ebc2980ce284c83504ddbc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:56 +08:00
Sugar Zhang
8634d871e4 dt-bindings: sound: rockchip: i2s: Document property 'mclk-calibrate'
Change-Id: I05fa565ba77d77704f82e473ee3b35d6fcc8a6ec
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:56 +08:00
Sugar Zhang
70838da2b1 ASoC: rockchip: pdm: Add support for clk compensation
This patch introduces a method to handle clk drift and compensation.

e.g:

/# amixer contents
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=0

/# arecord -D hw:0,0 --period-size=1024 --buffer-size=4096 -r
16000 -c 2 -f s16_le /dev/zero &

/# amixer -- cset numid=1 -10
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=-10

/# amixer -- cset numid=1 10
numid=1,iface=PCM,name='PCM Clk Compensation In PPM'
; type=INTEGER,access=rw------,values=1,min=-1000,max=1000,step=1
: values=10

Change-Id: Ibc70ce8ccec6dddb082161fa544d066c706c37bc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:55 +08:00
Sugar Zhang
ef3def055b dt-bindings: sound: rockchip: pdm: Document property 'mclk-calibrate'
Change-Id: I64f010b9876fdf736ac6778c7bac52c47e9d905f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-01-22 20:12:55 +08:00
Liang Chen
8b764766dc arm64: dts: rockchip: rk3568: add opp-table for npu
Change-Id: Ia2e7aadda6c0049003d3c715c0217b3731ffa6a1
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-01-22 20:12:55 +08:00
YouMin Chen
7441599a38 arm64: dts: rockchip: rk3568: reduce the size of sram
Change-Id: I3ba4273cb4730080a3512551126392a6e3343a05
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-01-22 11:21:10 +08:00
Wu Liangqing
0c07360f25 arm64: dts: rockchip: rk3566-evb3: enabled sata1
Change-Id: Ic6c63a1fdcea6b13917c9bb29b9f1eccb611acf9
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-01-12 19:07:15 +08:00
Cai YiWei
23bbd27fb4 media: rockchip: isp/ispp add vb2_rdma_sg_memops to support contiguous page
Change-Id: Ic33bfe6fe5d6e095fc1943fd2933376c42360f17
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-12 19:02:10 +08:00