Commit Graph

865420 Commits

Author SHA1 Message Date
Dingxian Wen
cd0c2a18da arm64: dts: rockchip: rk3568-evb6: add lt8619c configuration
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I9bff56d2cddd1d8d16bac0ffd09bd48167dd58ed
2021-09-07 15:44:20 +08:00
Dingxian Wen
32d6a552bb media: i2c: lt8619c: add lt8619c HDMI to BT656/BT1120 bridge driver
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I894dc4822d4a9efb6cf3b6d5b6c12b4f03c3ae92
2021-09-07 15:44:20 +08:00
Yu Qiaowei
c0b26710c9 video/rockchip: rga2: Add RGA debugger.
1. Support procfs, both debugfs and procfs.
2. Modify the debug node name:
   /sys/kernel/debug/rga2_debug/rga2
   -> /sys/kernel/debug/rkrga/debug
   -> /proc/rkrga/debug (add)
3. Add a node to view the driver version number: driver_version.
4. Add CONFIG_ROCKCHIP_RGA2_PROC_FS/ROCKCHIP_RGA2_DEBUG_FS/
   ROCKCHIP_RGA2_DEBUGGER, Where CONFIG_ROCKCHIP_RGA2_PROC_FS
   defaults to n, CONFIG_ROCKCHIP_RGA2_DEBUGGER defaults to y.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I89a971f18301ffa9cc7ac1962ebeee5e97d209aa
2021-09-07 15:42:36 +08:00
Badhri Jagan Sridharan
14fd077fca UPSTREAM: usb: typec: tcpci: update ROLE_CONTROL for DRP
ROLE_CONTROL register would not have the actual CC terminations
unless the port does not set ROLE_CONTROL.DRP. For DRP ports,
CC_STATUS.cc1/cc2 indicates the final terminations applied
when TCPC enters potential_connect_as_source/_sink.
For DRP ports, infer port role from CC_STATUS and set corresponding
CC terminations before setting the orientation.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20200901025927.3596190-4-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: I108119eb0d9accf5697b9d69f1188766c2bdb0b9
(cherry picked from commit 57ce64668f)
2021-09-07 11:19:03 +08:00
Li Jun
ef9dc469db UPSTREAM: usb: typec: tcpm: cancel vdm and state machine hrtimer when unregister tcpm port
A pending hrtimer may expire after the kthread_worker of tcpm port
is destroyed, see below kernel dump when do module unload, fix it
by cancel the 2 hrtimers.

[  111.517018] Unable to handle kernel paging request at virtual address ffff8000118cb880
[  111.518786] blk_update_request: I/O error, dev sda, sector 60061185 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[  111.526594] Mem abort info:
[  111.526597]   ESR = 0x96000047
[  111.526600]   EC = 0x25: DABT (current EL), IL = 32 bits
[  111.526604]   SET = 0, FnV = 0
[  111.526607]   EA = 0, S1PTW = 0
[  111.526610] Data abort info:
[  111.526612]   ISV = 0, ISS = 0x00000047
[  111.526615]   CM = 0, WnR = 1
[  111.526619] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041d75000
[  111.526623] [ffff8000118cb880] pgd=10000001bffff003, p4d=10000001bffff003, pud=10000001bfffe003, pmd=10000001bfffa003, pte=0000000000000000
[  111.526642] Internal error: Oops: 96000047 [#1] PREEMPT SMP
[  111.526647] Modules linked in: dwc3_imx8mp dwc3 phy_fsl_imx8mq_usb [last unloaded: tcpci]
[  111.526663] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.13.0-rc4-00927-gebbe9dbd802c-dirty #36
[  111.526670] Hardware name: NXP i.MX8MPlus EVK board (DT)
[  111.526674] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO BTYPE=--)
[  111.526681] pc : queued_spin_lock_slowpath+0x1a0/0x390
[  111.526695] lr : _raw_spin_lock_irqsave+0x88/0xb4
[  111.526703] sp : ffff800010003e20
[  111.526706] x29: ffff800010003e20 x28: ffff00017f380180
[  111.537156] buffer_io_error: 6 callbacks suppressed
[  111.537162] Buffer I/O error on dev sda1, logical block 60040704, async page read
[  111.539932]  x27: ffff00017f3801c0
[  111.539938] x26: ffff800010ba2490 x25: 0000000000000000 x24: 0000000000000001
[  111.543025] blk_update_request: I/O error, dev sda, sector 60061186 op 0x0:(READ) flags 0x0 phys_seg 7 prio class 0
[  111.548304]
[  111.548306] x23: 00000000000000c0 x22: ffff0000c2a9f184 x21: ffff00017f380180
[  111.551374] Buffer I/O error on dev sda1, logical block 60040705, async page read
[  111.554499]
[  111.554503] x20: ffff0000c5f14210 x19: 00000000000000c0 x18: 0000000000000000
[  111.557391] Buffer I/O error on dev sda1, logical block 60040706, async page read
[  111.561218]
[  111.561222] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[  111.564205] Buffer I/O error on dev sda1, logical block 60040707, async page read
[  111.570887] x14: 00000000000000f5 x13: 0000000000000001 x12: 0000000000000040
[  111.570902] x11: ffff0000c05ac6d8
[  111.583420] Buffer I/O error on dev sda1, logical block 60040708, async page read
[  111.588978]  x10: 0000000000000000 x9 : 0000000000040000
[  111.588988] x8 : 0000000000000000
[  111.597173] Buffer I/O error on dev sda1, logical block 60040709, async page read
[  111.605766]  x7 : ffff00017f384880 x6 : ffff8000118cb880
[  111.605777] x5 : ffff00017f384880
[  111.611094] Buffer I/O error on dev sda1, logical block 60040710, async page read
[  111.617086]  x4 : 0000000000000000 x3 : ffff0000c2a9f184
[  111.617096] x2 : ffff8000118cb880
[  111.622242] Buffer I/O error on dev sda1, logical block 60040711, async page read
[  111.626927]  x1 : ffff8000118cb880 x0 : ffff00017f384888
[  111.626938] Call trace:
[  111.626942]  queued_spin_lock_slowpath+0x1a0/0x390
[  111.795809]  kthread_queue_work+0x30/0xc0
[  111.799828]  state_machine_timer_handler+0x20/0x30
[  111.804624]  __hrtimer_run_queues+0x140/0x1e0
[  111.808990]  hrtimer_interrupt+0xec/0x2c0
[  111.813004]  arch_timer_handler_phys+0x38/0x50
[  111.817456]  handle_percpu_devid_irq+0x88/0x150
[  111.821991]  __handle_domain_irq+0x80/0xe0
[  111.826093]  gic_handle_irq+0xc0/0x140
[  111.829848]  el1_irq+0xbc/0x154
[  111.832991]  arch_cpu_idle+0x1c/0x2c
[  111.836572]  default_idle_call+0x24/0x6c
[  111.840497]  do_idle+0x238/0x2ac
[  111.843729]  cpu_startup_entry+0x2c/0x70
[  111.847657]  rest_init+0xdc/0xec
[  111.850890]  arch_call_rest_init+0x14/0x20
[  111.854988]  start_kernel+0x508/0x540
[  111.858659] Code: 910020e0 8b0200c2 f861d884 aa0203e1 (f8246827)
[  111.864760] ---[ end trace 308b9a4a3dcb73ac ]---
[  111.869381] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[  111.876258] SMP: stopping secondary CPUs
[  111.880185] Kernel Offset: disabled
[  111.883673] CPU features: 0x00001001,20000846
[  111.888031] Memory Limit: none
[  111.891090] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---

Change-Id: I4fae27939edca3a9c09020e6252c96ae373eaaf2
Fixes: 3ed8e1c2ac ("usb: typec: tcpm: Migrate workqueue to RT priority for processing events")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1622627829-11070-1-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
(cherry picked from commit 3a13ff7ef4)
2021-09-07 11:14:07 +08:00
Badhri Jagan Sridharan
14d6da04a6 UPSTREAM: usb: typec: tcpm: Migrate workqueue to RT priority for processing events
"tReceiverResponse 15 ms Section 6.6.2
The receiver of a Message requiring a response Shall respond
within tReceiverResponse in order to ensure that the
sender’s SenderResponseTimer does not expire."

When the cpu complex is busy running other lower priority
work items, TCPM's work queue sometimes does not get scheduled
on time to meet the above requirement from the spec.
Moving to kthread_work apis to run with real time priority.

Further, as observed in 1ff688209e, moving to hrtimers to
overcome scheduling latency while scheduling the delayed work.

TCPM has three work streams:
1. tcpm_state_machine
2. vdm_state_machine
3. event_work

tcpm_state_machine and vdm_state_machine both schedule work in
future i.e. delayed. Hence each of them have a corresponding
hrtimer, tcpm_state_machine_timer & vdm_state_machine_timer.

When work is queued right away kthread_queue_work is used.
Else, the relevant timer is programmed and made to queue
the kthread_work upon timer expiry.

kthread_create_worker only creates one kthread worker thread,
hence single threadedness of workqueue is retained.

Change-Id: Iafd9ca68a00b61e39cc9de2609eaef2c277eabb0
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200818192758.2562908-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
(cherry picked from commit 3ed8e1c2ac)
2021-09-07 11:10:25 +08:00
Badhri Jagan Sridharan
79ba1940b3 UPSTREAM: usb: typec: tcpm: Ignore CC and vbus changes in PORT_RESET change
After PORT_RESET, the port is set to the appropriate
default_state. Ignore processing CC changes here as this
could cause the port to be switched into sink states
by default.

echo source > /sys/class/typec/port0/port_type

Before:
[  154.528547] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms
[  154.528560] CC1: 0 -> 0, CC2: 3 -> 0 [state PORT_RESET, polarity 0, disconnected]
[  154.528564] state change PORT_RESET -> SNK_UNATTACHED

After:
[  151.068814] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev3 NONE_AMS]
[  151.072440] CC1: 3 -> 0, CC2: 0 -> 0 [state PORT_RESET, polarity 0, disconnected]
[  151.172117] state change PORT_RESET -> PORT_RESET_WAIT_OFF [delayed 100 ms]
[  151.172136] pending state change PORT_RESET_WAIT_OFF -> SRC_UNATTACHED @ 870 ms [rev3 NONE_AMS]
[  152.060106] state change PORT_RESET_WAIT_OFF -> SRC_UNATTACHED [delayed 870 ms]
[  152.060118] Start toggling

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200402215947.176577-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: Ic8a06dafdd4583cba12c7b66b1c9faf8ca830200
(cherry picked from commit 901789745a)
2021-09-07 11:03:13 +08:00
Cai YiWei
4a7a52e98c media: rockchip: isp: compiled with differe hardware version
Change-Id: Ic18a8ba5005e14f9676716fc9b089ed81bdd38b0
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-07 10:50:23 +08:00
Cai YiWei
acfebbb68f media: rockchip: isp: selfpath bytesperline 16 align
Change-Id: I39b36e7e3a8c483f5c77ddbea0f6bebb4e1a0b0a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-06 19:17:40 +08:00
Andy Yan
39f12dae1f drm/rockchip: vop2: Remove prepare_fb/cleanup_fb callback
According to commit 9bde4e671f ("drm/rockchip: vop: fix iommu crash
with async atomic")
These two callback were added to avoid iommu crash on async
commit caused by drm_atomic_clean_old_fb after drm_atomic_async_commit.

drm_atomic_clean_old_fb was removed after commit
e00fb8564e ("drm: Stop updating plane->crtc/fb/old_fb on atomic drivers")

So we can remove them to make life  simpler.

Change-Id: Iea1f2dbadd9bcfad5b8447831c0d31068d4fa97b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-06 09:51:42 +08:00
Andy Yan
bcd4aed392 drm/rockchip: vop2: Use macro for window phys_id
Change-Id: I91ff9d169f5713e38c994f56980dfcf0cba0fe40
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-03 19:23:29 +08:00
Andy Yan
55462060b2 drm/rockchip: vop2: No need to check active vp in layer_map_initial
We assign window between vp by plane_mask now, no
need to check which vp is activated from register.

Change-Id: I89d22f253dcd26898dc79304d51b8a8d9e802bb2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-03 19:23:29 +08:00
Shawn Lin
9d60286b72 mmc: sdhci-of-dwcmshc: Remove HS200 and HS400 at low speed for rockchip
Rockchip platforms don't support HS200 or HS400 at low speed, so
we must limit it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I40eb9f117fd83789b6ab7a16d44049e16786698b
2021-09-03 17:45:07 +08:00
Zefa Chen
80fe73c741 media: rockchip: cif: add module exit to fix the failure of rmmod video_rkcif
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I97fc14eb411339796dfc58b28460ed00cd898814
2021-09-03 11:02:21 +08:00
Shawn Lin
c18fd2aea2 arm64: dts: rockchip: rk3568: Set SDHCI core clk to 200MHz
As we mask our SDHCI controller as SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
host->max_clk is derived from core clock in the first place. Then
f_max works together with it.

If we adjust loader's core clk setting, such as 50MHz, we will get
50MHz for host->max_clk, because .get_max_clock() reads core clk
when probing driver. That will lead f_max be set to 50MHz as well,
no matter if max-frequency is set higher than 50MHz.

We can simple solve this problem by assigning core clk as 200MHz
in the first place and then let max-frequency property takes over
it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Idb2fdb8f68881d0286d977dc3718b74c30d3bc67
2021-09-03 10:05:27 +08:00
Jon Lin
2ecea59132 drivers: rkflash: Support new SPI Nand devices
GD5F1GQ4UExxH, W25N512GVEIG, SGM7000I-S24W1GH

Change-Id: Ib9e5422c3f57ef80e60fc6847d0ba9e1dd55dc3b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-02 16:36:04 +08:00
Jon Lin
abce936f23 drivers: rkflash: Add mutex for deinit ops.
Change-Id: I477c161cb22f58263963a4d8e0d08eaeda676f69
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-02 15:18:29 +08:00
Dingxian Wen
32210c5c1e arm64: configs: rockchip_defconfig: enable LT6911UXC
Enable lt6911uxc HDMI to MIPI CSI-2 bridge driver for hdmi-in
application. Which found on rk3568-evb2-lp4x-v10.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I4ce22f3040dbe55c3236ac3d0ac62f7821011c8d
2021-09-02 15:16:17 +08:00
Dingxian Wen
5b721d45c8 arm64: dts: rockchip: rk3568-evb2: add lt6911uxc configuration
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I27e7cd02314fb288a4f553105de1027975b8e9d6
2021-09-02 15:15:13 +08:00
Dingxian Wen
f7e55b0143 media: i2c: lt6911uxc: add lt6911uxc HDMI to MIPI CSI-2 bridge driver
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I5dc11d3c8a2559303d96b3206fafadb46f95ed0f
2021-09-02 15:15:13 +08:00
Jianqun Xu
5efc9197d8 pinctrl: rockchip: fix pinconf_get for PIN_CONFIG_OUTPUT
Do not print error information when pin is not mux to gpio,
since it will break debug print.

Also check the gpio direction before check gpio value.

Change-Id: Id3afb0af12cd1e33677f5a929a879f7d00f63318
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-09-01 15:13:04 +08:00
Algea Cao
031871bacc drm/edid: add config option of edid function
rv1126 does not support display interface which need to
read and parse edid, such as hdmi and dp, so add config
option to reduce memory usage.

./ksize.sh  drivers/gpu/drm/

before ksize: 482336 Bytes
after  kszie: 396762 Bytes
save   about: 85574  Bytes

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I0c3813711cfdb4a38ec66136569ca826c94c6c58
2021-09-01 15:08:03 +08:00
Damon Ding
4d13755e45 drm/rockchip: add config option of DRM DP support
Add config option to modularize the DP interface support of DRM.

make ARCH=arm rv1126_defconfig
make ARCH=arm rv1126-evb-ddr3-v13.img -j32

./ksize.sh  drivers/gpu/drm/

before ksize: 517946 Bytes
after  kszie: 482336 Bytes
save   about: 35610  Bytes

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ie2157fad13a71a3099b79085e0de40efe4b4ab34
2021-09-01 15:01:43 +08:00
Damon Ding
6e759276d2 drm/rockchip: add config option of PSR function
rv1126 does not support PSR function, so add config option to
reduce memory usage.

make ARCH=arm rv1126_defconfig

./ksize.sh  drivers/gpu/drm/

before ksize: 581268 Bytes
after  kszie: 579486 Bytes
save   about: 1782   Bytes

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I578bb6f4768ae807b6fc20987d421afefd421fcc
2021-09-01 14:35:57 +08:00
Jon Lin
97902663a9 arm64: dts: rockchip: rk3568: Add sfc a spi4 alias
Kernel's SFC is used for a private flash drivers not like
the standard one, but u-boot SFC is register as standard
spi, and the alias UCLASS_SPI id is required for part of
spi initialization progress. So kernel's alias is also
required when u-boot enable using kernel dtb case.

Change-Id: Ic763eefb35ef5a93f6121055a5e04a2d72636430
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-01 11:32:22 +08:00
Andy Yan
1d9acc4e67 drm/rockchip: vop2: Use clipped src/dst coordinates
Some linux app(cusor) may set negative coordinates(crtc_x/y)

And some linux app(mpv) may set coordinates outside the screen.

These are both unsupported on rockchip vop.

so we use clipped coordinates here.

Change-Id: I63288cf9120cea75e784d49bc88b591f243e7d8d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-01 10:49:54 +08:00
Wyon Bi
e0354482bd arm64: dts: rockchip: Add rk3566-evb2-lp4x-v10-edp.dts
Change-Id: Id56ca263872b42643a66dd063d541968436c4ca6
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-09-01 10:34:37 +08:00
Zefa Chen
c30b539aa2 media: rockchip: cif: reinit buffer status when cif reset in mipi interlace mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5f691cd65badda8cedf120a155de7096de8714b5
2021-08-31 18:31:59 +08:00
Jianqun Xu
9df5bfa9fc pinctrl: rockchip: treat pcfg_xxx nodes as invalid function nodes
Look at the pinmux-functions debug node, there are several pcfg_xxx
nodes which actually are not pinctrl functions:

Under RV1126 EVB:
  function: pcfg-pull-up, groups = [ ]
  function: pcfg-pull-down, groups = [ ]
  function: pcfg-pull-none, groups = [ ]
  function: pcfg-pull-none-drv-level-1, groups = [ ]
  function: pcfg-pull-none-drv-level-2, groups = [ ]
  function: pcfg-pull-none-drv-level-3, groups = [ ]
  function: pcfg-pull-up-drv-level-1, groups = [ ]
  function: pcfg-pull-up-drv-level-2, groups = [ ]
  function: pcfg-pull-none-smt, groups = [ ]
  function: pcfg-output-low-pull-down, groups = [ ]
  function: acodec, groups = [ acodec-pins ]

This patch fixs the function node valid check to ignore them.

Change-Id: I432783de72e137e2fb406ce400a69cd56cb1a8de
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-31 14:28:56 +08:00
Jianqun Xu
295855202f pinctrl: rockchip: add function node valid check
There are many kinds of nodes under pinctrl node, such as function
nodes, gpio nodes, and pcfg nodes.

The driver do a match check for the nodes, to ignore the gpio nodes.
This patch try to put the valid check as a function, it's better to
avoid error fix.

Change-Id: Ib9295fa77240f741a0a124d3235f5e2a6e51b499
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-31 14:28:56 +08:00
Sugar Zhang
cb8e6654bb ASoC: rk817: Move dbg message into CONFIG_SND_DEBUG
$ ./scripts/bloat-o-meter rk817_codec.o.old rk817_codec.o
add/remove: 0/3 grow/shrink: 0/15 up/down: 0/-1680 (-1680)
Function                                     old     new   delta
dbg_enable                                     4       -      -4
__param_dbg_level                             20       -     -20
__param_str_dbg_level                         24       -     -24
rk817_probe                                  328     284     -44
rk817_remove                                 156     108     -48
rk817_set_dai_sysclk                          76      24     -52
rk817_platform_shutdown                       84      32     -52
rk817_playback_path_get                       84      28     -56
rk817_capture_path_put                       504     444     -60
rk817_hw_params                              464     396     -68
rk817_digital_mute                           384     308     -76
rk817_playback_path_put                      880     788     -92
rk817_codec_ctl_gpio                         188      96     -92
rk817_set_dai_fmt                            196      92    -104
rk817_codec_power_up                         416     292    -124
rk817_codec_power_down                       460     336    -124
__func__                                     310      94    -216
rk817_platform_probe                        1304     880    -424
Total: Before=8618, After=6938, chg -19.49%

Change-Id: I98471c52ea342672e10deb02c4fb38d9fb82f906
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-31 14:28:12 +08:00
Cai YiWei
2a4f54dcf3 media: rockchip: ispp: fix monitor switch if don't power off
Change-Id: Iefe1f7df7417c84a09437d663cca3c342bf3888a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 14:26:56 +08:00
Cai YiWei
81abdf229b media: rockchip: isp: check the output status of statistics v2x
Change-Id: If6076b93b37112ab28c58b6ffabe5770fc847cb8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-08-31 14:26:56 +08:00
Damon Ding
834f43e2ba ARM: rv1126_defconfig: Enable CONFIG_DRM_PANEL_SIMPLE_OF_ONLY
Select DRM_PANEL_SIMPLE_OF_ONLY as default on RV1126 SoC, so as to
reduce memory usage.

make ARCH=arm rv1126_defconfig
make ARCH=arm rv1126-evb-ddr3-v13.img -j32

./ksize.sh  drivers/gpu/drm/

before ksize: 556038 Bytes
after  kszie: 517946 Bytes
save   about: 38092  Bytes

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9584bd8de16ed0ef1c4a862e71a1eb725c0d2833
2021-08-31 11:35:07 +08:00
Tao Huang
04a1a8eff9 ARM: rv1126-emmc-drivers-modules.config: Fix CONFIG_ROCKCHIP_MPP_XXX
mpp build only one ko and all option config is bool.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id940f29a351d81c301a1ca100b8ebee828b8cc81
2021-08-31 11:21:09 +08:00
Ding Wei
cd5de37f97 video: rockchip: mpp: Use CONFIG_CPU_XX to match build target
Using CONFIG_CPU_XX only compiles the code of matching CPU,
then it can reduce the object file.

Change-Id: Ic19345464c802939d08786ae29b34111c3c5a855
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-31 11:09:17 +08:00
Ding Wei
cae7fb13d6 video: rockchip: mpp: px30: Use hack_xx.c instead workround funcs
move the workaround functions for px30 to the mpp_hack_px30.c.

Change-Id: I9f9880c28fe1d797b0551d116a66294223a5e251
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-31 11:08:08 +08:00
Ding Wei
e32bfc1ed7 video: rockchip: mpp: Use ROCKCHIP_MPP_PROC_FS instead of PROC_FS
For kernel-tiny, remove debug relative code, and reduce the size of module.

Change-Id: Ic78a0839a75c9cebb56fa32e87235bd97be0370a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-08-31 10:48:39 +08:00
Jon Lin
201fbf5da3 drivers: rkflash: support new spiflash
Add F35SQA001G, W25Q128JWSQ, XT25F64F, P25Q32SL, GM25Q128A
Change XT25F256BSFIGU, MX25U51245G

Change-Id: Ib9f60efbd3aad72044b7f3b0ee5a1a93333f0005
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-08-31 09:39:09 +08:00
Zhihuan He
30fc471b5b arm64: dts: rockchip: rk3568: add dmcdbg node
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: Iab620f4d82f2b55c0a141138d59c80e102e2b829
2021-08-30 19:21:45 +08:00
Zhihuan He
6f922f7041 PM / devfreq: rockchip_dmcdbg: add rk3568 support
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: I9bf3a5dc18c8f0659bbd9053f6937bfe0f04ef51
2021-08-30 19:21:39 +08:00
Sugar Zhang
db30f559af ASoC: rockchip: pdm: Build depends on CPU config
$ ./scripts/bloat-o-meter rockchip_pdm.o.old rockchip_pdm.o
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-980 (-980)
Function                                     old     new   delta
rockchip_pdm_match                          1372     392    -980
Total: Before=7288, After=6308, chg -13.45%

Change-Id: I9450d3a7e3f85482473e2086a0fcb8313d6db30d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 19:11:05 +08:00
Sugar Zhang
a6f29f4e17 ARM: dts: rockchip: Drop wrong compatible string for pdm
Change-Id: I93cc4b8e512a02c89b69a18f2d4445ed58a85bff
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 19:10:44 +08:00
Sugar Zhang
2ca5c74504 arm64: dts: rockchip: Drop wrong compatible string for pdm
Change-Id: I469ef093926b89df5f50c72a9283a2391f729f4f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 19:10:44 +08:00
Sugar Zhang
08bdd7eeb8 ASoC: rockchip: pdm: Rename compatible string for rk3328
- correct the wrong type 'RK3229', should be type 'RK3328'
- rename compatible 'rockchip,pdm' to 'rockchip,rk3328-pdm'
  for better match.

Change-Id: I0156bd114a3a89ddcda077587366351521dfb701
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 19:10:44 +08:00
Damon Ding
17a85268b7 drm/rockchip: vop: separate the of_device_id array by different SoC
Separate the process of device matching by the different SoC macro
definitions, which can reduce memory usage.

make ARCH=arm rv1126_defconfig

./ksize.sh  drivers/gpu/drm/

before ksize: 579486 Bytes
after  kszie: 556038 Bytes
save   about: 23448  Bytes

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6b3689b11598120aad16956235d1ee2bbdbe80e0
2021-08-30 18:54:36 +08:00
Damon Ding
1e9ad2a9ba drm/rockchip: add config options of VOP and VOP2 driver
rv1126 does not support VOP2, so add config options to
reduce memory usage.

make ARCH=arm rv1126_defconfig

./ksize.sh  drivers/gpu/drm/

before ksize: 675434 Bytes
after  kszie: 581268 Bytes
save   about: 94166  Bytes

In addition, improve the format of space and tab, and remove
extra "depends on DRM_ROCKCHIP".

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I2b29a543a7e52e4e4b72112980e2c6dc6c6cce92
2021-08-30 18:11:24 +08:00
Tao Huang
05163ed048 ASoC: rockchip: i2s-tdm: Add HAVE_SYNC_RESET config
$ ./scripts/bloat-o-meter rockchip_i2s_tdm.o.old rockchip_i2s_tdm.o
add/remove: 0/2 grow/shrink: 0/3 up/down: 0/-948 (-948)
Function                                     old     new   delta
rockchip_i2s_tdm_hw_params                  2768    2760      -8
rockchip_i2s_tdm_trigger                    1232    1216     -16
of_i2s_resetid_get                           124       -    -124
rockchip_i2s_tdm_probe                      1676    1496    -180
rockchip_snd_xfer_sync_reset                 620       -    -620
Total: Before=12012, After=11064, chg -7.89%

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3cffc57ca5fe4271d4a2c9584383777871123f14
2021-08-30 17:50:39 +08:00
Sugar Zhang
c63e6495a8 ASoC: rockchip: i2s-tdm: Build depends on CPU config
$ ./scripts/bloat-o-meter rockchip_i2s_tdm.o.old rockchip_i2s_tdm.o
add/remove: 0/8 grow/shrink: 0/1 up/down: 0/-992 (-992)
Function                                     old     new   delta
rk1808_txrx_config                            16       -     -16
px30_txrx_config                              16       -     -16
rk3568_i2s_soc_data                           24       -     -24
rk3308_i2s_soc_data                           24       -     -24
rk1808_i2s_soc_data                           24       -     -24
px30_i2s_soc_data                             24       -     -24
rk3308_txrx_config                            32       -     -32
rk3568_txrx_config                            48       -     -48
rockchip_i2s_tdm_match                      1176     392    -784
Total: Before=13004, After=12012, chg -7.63%

Change-Id: Iaedb9e9b11b38255a7a5b57a9a77c1523fc9d515
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 17:50:39 +08:00
Sugar Zhang
67edaaefd3 ASoC: rockchip: i2s: Build depends on CPU config
$ ./scripts/bloat-o-meter rockchip_i2s.o.old rockchip_i2s.o
add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-1968 (-1968)
Function                                     old     new   delta
rk3399_i2s_pins                                8       -      -8
rockchip_i2s_match                          2548     588   -1960
Total: Before=8656, After=6688, chg -22.74%

Change-Id: Iabb0a00ab27ce5623164d40de6b379272a81e4e5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-30 17:10:12 +08:00