Commit Graph

1066189 Commits

Author SHA1 Message Date
David Wu
df2bec8b00 arm64: dts: rockchip: rk3308 add io-domain node
Change-Id: I57bbb420b8114850a16b3e7ad9f6c3564930d699
Signed-off-by: David Wu <david.wu@rock-chips.com>
2022-05-21 18:45:56 +08:00
XiaoTan Luo
765055059c ASoC: rk3308_codec: fix codec no sound when drop testing
IP vendor suggest that enable pop sound when enable hpout,
and disable it after disable hpout.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I01f03de8c4859faa4d8966440e8d2dcfa53c8da4
2022-05-21 18:22:57 +08:00
Xing Zheng
2492bad388 ASoC: rk3308_codec: fix the leak LINEOUT signal when using HPOUT path
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iac3e978e1bf7e1995e270feb7f96da077379b164
2022-05-21 18:22:56 +08:00
Xing Zheng
0b095228a2 ASoC: rk3308_codec: clean up unnecessary AGC controls
The AGC may bring non-linear ADC processing, that makes it
difficult for back-end audio algorithms to use NLP, so we
usually turn them off.
In addition, it seems too many controls and easy to confuse,
let's remove them.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: If17387b0db055942acf1d7e9a5b8b6b9057f1c78
2022-05-21 18:22:56 +08:00
Xing Zheng
dc43d8633b ASoC: rk3308_codec: recover default 0dB gain for DAC
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Ic3c108e6eed5894a69f06ad30e837d0513093335
2022-05-21 18:22:56 +08:00
Xing Zheng
8f114b8eff ASoC: rk3308_codec: update some codec features for RK3308BS
And clean up the brackets of macro variables.

The DAC_DIG_CON04 is conflict with RK3308BS and RK3308/RK3308B,
let's fix it.

Using large driver strength for HPOUT and LINEOUT for RK3308BS Codec.

keep DAC mclk enabled for RK3308BS codec version.
Since the new process version optimizes the design of the clock,
part, we need to enable DAC mclk during codec detect headphone.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I0617049c9ed494ba17c1d548413e49355c9bf01f
2022-05-21 18:21:56 +08:00
Tao Huang
d38087b67a ASoC: rk3308_codec: Fix missing device_unregister() in error path
rk3308_platform_probe() should call device_unregister() in error path.
Otherwise, the memory of dev will free without unregister. Kernel will
panic when reboot.

kobject: '(null)' (ffffffc01e94a830): is not initialized,
yet kobject_get() is being called.

[<ffffff80081e8f6c>] kobject_get+0x30/0x80
[<ffffff800829c110>] get_device+0x14/0x24
[<ffffff800829e044>] device_shutdown+0x84/0x1a8
[<ffffff80080b265c>] kernel_restart_prepare+0x34/0x3c
[<ffffff80080b274c>] kernel_restart+0x14/0x5c
[<ffffff80080b2a9c>] SyS_reboot+0x1a0/0x1bc
[<ffffff8008082f30>] el0_svc_naked+0x24/0x28

Change-Id: I8eb838deb3b540792f63124365bf821f7ee15649
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-05-21 18:01:03 +08:00
Cai YiWei
6a6fce1d1a media: rockchip: isp: module auto gating for isp30/isp32
Change-Id: I2f40cb447a66559a56a910c8545ba319ffdbb58f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-05-21 17:48:16 +08:00
Wang Panzhenzhuan
319eea00ad leds: leds-rgb13h: fix compile error
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Iafd7db5aa53ea70d9a6aa45f8270a3d3fd43bf4e
2022-05-21 17:43:58 +08:00
Wang Panzhenzhuan
828f51750a media: rockchip: rk-led-flash: use __kernel_old_timeval
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I23dd287426e378410789c07991cdbd4231e339b0
2022-05-21 17:35:07 +08:00
Cai YiWei
0cd024b0dd media: rockchip: isp: isp32 min clk to 200M
Change-Id: I24dea05cbe0a2839800099d9697302549d6ccc7f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-05-21 17:24:55 +08:00
Su Yuefu
446814d43f media: i2c: sc4336 default 25fps
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I97befd81b9f3616cf94aa54e7eab85e22f48a751
2022-05-21 17:23:22 +08:00
Jianqun Xu
e6bce9ac74 dma-buf: rk_heaps: rk-dma-heap fix dump name for dmabuf
Fixes: 6cc665a643 ("dma-buf: rk_heaps: rk-cma-heap replace orig_alloc by dmabuf->name")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I5e1634a26578730d0d8af66c543de5566f6617b3
2022-05-21 16:56:24 +08:00
Jon Lin
c79cf2c1a8 phy: rockchip: naneng-combphy: Set gate_tx_pck_sel length select work for L1SS
This configuration is required for Gen1 l1ss support.

Change-Id: I921d1551dbbb4e85f823ce9ce0abbb96198d2ccf
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-05-21 16:43:56 +08:00
Jon Lin
e18dfa93d0 PCI: rockchip: dw: Support PM L1 clock removing
The application logic is ready to have reference clock removed through
either L1 PM Sub-states or L1 CPM.

Change-Id: I1622416fcff716b2b342746fb3f93f61d4092101
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-05-21 16:43:56 +08:00
Jon Lin
0a082fd9da PCI: rockchip: dw: Save&Restore L1SS in PM
Change-Id: I05c9787faff35e3ca4ea21b35261f4f7c3496fc8
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-05-21 16:43:56 +08:00
Yu Qiaowei
a8d165418a video: rockchip: rga3: Fix physically contiguous memory missing dma_put
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I053a3975619eec2788a67e1b22508c473b54291f
2022-05-21 16:37:19 +08:00
Jianqun Xu
6638888eeb drm/rockchip: use drm_gem_object_put to free object
Descripted in drm_gem_object structure description:

 * Reference count of this object
 *
 * Please use drm_gem_object_get() to acquire and drm_gem_object_put_locked()
 * or drm_gem_object_put() to release a reference to a GEM
 * buffer object.
 */
 struct kref refcount;

It's better to release object by drm_gem_object_put.

About the refcount for object of drm device,
  rockchip_gem_create_object    -> refcount = 1
  drm->driver->gem_prime_export -> refcount = 2

This patch will decrease a refcount from export, and decrease another
one in rockchip_drm_direct_show_free_buffer:

  drm_gem_dmabuf_release               -> refcount = 1
  rockchip_drm_direct_show_free_buffer -> refcount = 0

Tested by rockchip_drm_self_test.c.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I812770ed832d71121aab5212d62b96815cbe2d68
2022-05-21 16:35:17 +08:00
Lyude Paul
c2d31c3bd7 UPSTREAM: drm/bridge/analogix/dp_core: Unregister DP AUX channel on error in analogix_dp_probe()
Just another drive-by fix I noticed while going through the tree to cleanup
DP aux adapter registration - make sure we unregister the DP AUX dev if
analogix_dp_probe() fails.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-14-lyude@redhat.com
(cherry picked from commit b3bdf89c02)
Change-Id: I874281fb7980372af9fa19965400f1b2fd00168e
2022-05-21 16:33:03 +08:00
Shunhua Lan
fe1fe371dc arm64: dts: rockchip: rk3588-evbs: enable dp0 sound card
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Id1a8d26def060de71078621635de7c70bc7cd6c1
2022-05-21 16:30:18 +08:00
Shunhua Lan
f1147b3eb3 arm64: dts: rockchip: rk3588-evb: add spdif0 sound card and add mclk-fs property
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: If0b4f162fb9ac54b81ff4e109f8e843035d8a517
2022-05-21 16:29:53 +08:00
Jianqun Xu
8aaac87d71 arm64: configs: rockchip_defconfig set IOMMU IOVA ALIGN to 64KiB
Decrease the iommu iova alignment to 4 (means 64 KiB), to fix the
fragment in the video stress test.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ifdd9da0110a6ac14ad0d962394ab3e0a0cc5ff65
2022-05-21 15:06:55 +08:00
Lian Xu
ec704551c3 media: rockchip: isp: add the pause, config, resume stream for isp32
Change-Id: Ifd2ca42954f5efdfd4fd2b4abf42f740a5cd10f3
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-05-21 15:03:59 +08:00
Jianqun Xu
6f2a765085 dma-buf: rk_heaps: allows sub heaps to add proc entry
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Iaf7aa874f156790edccf8b7c6711baf88218a065
2022-05-21 14:58:50 +08:00
Ziyuan Xu
6db606fa31 ARM: configs: rv1106-ipc.config: enable CONFIG_ROCKCHIP_OPP
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I86384d21d3d92f10504f2bf8552c2ff7138700c1
2022-05-21 14:52:19 +08:00
Ziyuan Xu
8572c2e2b3 ARM: dts: rockchip: rv1106-ipc: enable cpu-supply for dvfs
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I00faad3fdafa16695fe66b83965462f76b3d0096
2022-05-21 14:52:19 +08:00
Elaine Zhang
cb8b36d3db clk: rockchip: pll: support rk3588 pll clk compensation
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I09b425a95d8ca0d707d86b09dc53ea63d10b5524
2022-05-20 16:42:47 +08:00
Zefa Chen
a4a620bb37 media: rockchip: vicap do software reset when size err occurs
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I76b0af368dcbd504aeb00230493fda719297d985
2022-05-20 11:23:10 +08:00
Yifeng Zhao
2690864f78 scsi: sata: move device_init_wakeup form ahci_platform.c to sd.c
The "struct device *dev" in sd_resume is for the hard disk, and
the correct device needs to be initialized for pm_stay_awake.

Fixes: da1c2c4a2c ("scsi: sata: re enter sleep is prohibited during wake-up")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ic6c4a340672605ac64fc0778f6938898dee1b8eb
2022-05-19 20:17:44 +08:00
XiaoDong Huang
2c8328c3f1 soc: rockchip: rk_fiq_debugger: change parameter type of fiq_debugger_uart_irq_tf
"struct pt_regs" is big data structure, so pass a "struct pt_regs *"
parameter is a better choice.

Change-Id: I2bef0f2cf4332c61bc6a5a0717de66db221b836d
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2022-05-19 19:52:31 +08:00
XiaoDong Huang
81bad55a0c firmware: rockchip_sip: define fiq_pt_regs as a global variable
"fiq_pt_regs" is a big data structures, so it'll save
lots of stack space if define "fiq_pt_regs" as a global
variable instead of a local variable.

Change-Id: Id447c41009fc4454bc821c194e9d50ec00087754
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2022-05-19 19:52:30 +08:00
Chen Shunqing
4c2c5e87e1 media: rockchip: hdmirx: add interface for user to set EDID
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I6fd46c472a35e13db55dc67de34943e7f2194a1c
2022-05-19 19:44:07 +08:00
Finley Xiao
e39a6e8221 arm64: dts: rockchip: rk3588s: Add rockchip,opp-shared-dsu for cpul
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I0a9b92514cd50b3a7428844b512d20de6a80eb8f
2022-05-19 19:22:43 +08:00
Finley Xiao
5aae99103c cpufreq: rockchip: Add support to change dsu rate according to cpub rate
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2784763f4975c5293e4c1c03c43b83ebb004835f
2022-05-19 19:22:43 +08:00
Ziyuan Xu
24d76c3ea6 pwm: rockchip: register pwm_chip via OF aliases
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ie6e348062ca7e8411330864f95898ec96127c69e
2022-05-19 16:47:37 +08:00
Sugar Zhang
ed2568914a ARM: dts: rockchip: rv1106: Add aliases for PWMx
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I0bde4ed3bbdabf26ca2048eefa877ebb99649631
2022-05-19 16:42:52 +08:00
Yu Qiaowei
ad3be4b3e8 video: rockchip: rga3: Fix wrong header dependencies
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib3c47a36791aa83d2a9d949cb1ed5cb619011a1a
2022-05-19 14:21:52 +08:00
Ziyuan Xu
87dc0474c7 ARM: dts: rockchip: rv1103-evb-v10: enable cpu-supply for dvfs
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I4060435493846fb0c3033d25d1c4952bdc3f09a5
2022-05-19 14:20:49 +08:00
Chris Zhong
65d8b32df9 arm64: configs: rockchip_linux_defconfig: enable EFI
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: Ic274e1cc81f6457a03477791bd1b63fcbbb25f42
2022-05-19 14:08:42 +08:00
Finley Xiao
a2328c4f99 PM / devfreq: rockchip_dmc: Get policy when need to increase cpu frequency
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I60d1e7b129b56502d054f041a29438bd37e917ae
2022-05-18 20:50:47 +08:00
Tao Huang
c12aebd032 rockchip: cpu: soc_is_xxx() depends on CPU config
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id32ac13361edf2b06b4747f0a52175f258654252
2022-05-18 19:53:55 +08:00
Wyon Bi
7e5c72a3e6 drm/bridge: Add support for Maxim MAX96745
The MAX96745 convert DP1.4 and eDP1.4a to single or dual GMSL2 serial.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I63951d28b4f8e6be6d1671650cee208ff0760e95
2022-05-18 19:18:35 +08:00
Wyon Bi
f775e6b074 pinctrl: Add support for Maxim MAX96745 pin controller
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I1c1c5cc76449d094dd92347c20695a97c32ee4e4
2022-05-18 19:18:35 +08:00
Wyon Bi
83451397e8 mfd: Add support for Maxim MAX96745
The MAX96745 and MAX96747 convert DP1.4 and
eDP1.4a to single or dual GMSL2 serial. They also send
and receive control channel and peripheral control data,
enabling bidirectional transmission of video and data over
cables in excess of 15 meters in length.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I59a338b0ef092bde1d1a444600acd92348cc9443
2022-05-18 19:18:35 +08:00
Wyon Bi
24af5158d9 drm/bridge: Add support for Maxim MAX96752F
The MAX96752F deserializers convert a single- or
dual-link GMSL2 serial input to single or dual OLDI.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ic0582fa9ce077e0af79ecd0d63af38b23feb7265
2022-05-18 19:18:35 +08:00
Wyon Bi
673d3358b0 gpio: Add support for Maxim MAX96752F GPIO controller
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ib94de1c8ac1af44f0f3b61aa5eccff8dda741450
2022-05-18 19:18:35 +08:00
Wyon Bi
530d7e8c7c pinctrl: Add support for Maxim MAX96752F pin controller
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I6a0a38a64f139adc3630895aefc10e2b37449f1e
2022-05-18 19:18:35 +08:00
Wyon Bi
ad3d90b0ba mfd: Add support for Maxim MAX96752F
The MAX96752F/MAX96754F deserializers convert a
single- or dual-link GMSL2 serial input to single or dual
OLDI. They also send and receive side-channel and
peripheral control data, enabling full-duplex, single wire,
bidirectional transmission of video and data over 15
meter cables.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ibac9f881bd832e96a8606b9f6492e80f8d2494c6
2022-05-18 19:18:35 +08:00
Finley Xiao
b1244ddff6 cpufreq: dt-platdev: Add rk3308 project into blacklist
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5f7f76f85fc01359b9245e059edb6c9a3dcb5d5c
2022-05-18 18:31:15 +08:00
Shiqin Chen
fb4a5d99b3 media: i2c: add sc301iot sensor driver
Signed-off-by: Shiqin Chen <chensq@rock-chips.com>
Change-Id: I6a141751e3ba070b06e0c95ce170e37fb348d48f
2022-05-18 18:25:52 +08:00