Commit Graph

1066554 Commits

Author SHA1 Message Date
shengfei Xu
bcbe97df5c power: supply: rockchip-charger-manager: support charger manager
support:
1. Use EXTCON Subsystem to detect charger cables for charging
2. Set current limit of battery for over current protection
3. Set power limit of charger for overload protection
4. control charge pump charging current/voltage

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I97a461996977d418a47e6075202d82c5b87bd17b
2022-06-30 10:14:50 +08:00
Jianqun Xu
0c51523b06 iommu/iova: dump iova when alloc failed
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I8e2d99ed2e22e1c22f11ba67b5a69783d39df87d
2022-06-30 09:58:55 +08:00
Wu Liangqing
7d1bea221a arm64: dts: rockchip: add rk3588s-evb8-lp4x-v10.dts
Change-Id: Idd2e2cbc82445bef0871a155893a089232b1583a
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-06-30 09:58:10 +08:00
Finley Xiao
f822ab60e5 rtc: hym8563: Add CLK_IS_CRITICAL for output clock
The 32k clock is used for hp timer on RK3588, and it should be always on.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie28a16308521fadc33ae91c25215f30bd2265f33
2022-06-30 09:56:31 +08:00
Sugar Zhang
112f4f431d ASoC: rockchip: i2s-tdm: Fix panic on rockchip_dai_tdm_slot
SError Interrupt on CPU0, code 0xbe000011 -- SError
CPU: 0 PID: 7 Comm: kworker/u16:0 Not tainted 5.10.66 #107
Workqueue: events_unbound deferred_probe_work_func
pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
pc : _raw_spin_unlock_irqrestore+0x28/0x60
lr : regmap_unlock_spinlock+0x18/0x28
sp : ffffffc01251b850
x29: ffffffc01251b850 x28: ffffff81039afa80
x27: ffffff810349b1b0 x26: ffffffc011aa5d20
x25: 0000000000000000 x24: ffffff8100023000
x23: 0000000000000030 x22: 0000000000003fff
x21: 0000000000001e7f x20: 0000000000000000
x19: 0000000000000000 x18: ffffffc0123d10c0
x17: 0000000000000080 x16: 00000000000000d8
x15: ffffffc0105db5c8 x14: ffffffc011668c18
x13: 0000000062b0642e x12: 7fffffffffffffff
x11: 0000000000000000 x10: 0000000000000030
x9 : 0000000100000001 x8 : ffffff8100325880
x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000
x3 : 0000000000003eff x2 : 0000000000001e7f
x1 : 0000000000000000 x0 : ffffff8100023000
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 0 PID: 7 Comm: kworker/u16:0 Not tainted 5.10.66 #107
Workqueue: events_unbound deferred_probe_work_func
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 test_taint+0x0/0x30
 arm64_serror_panic+0x78/0x84
 do_serror+0xe0/0x100
 el1_error+0x94/0x118
 _raw_spin_unlock_irqrestore+0x28/0x60
 regmap_unlock_spinlock+0x18/0x28
 regmap_update_bits_base+0x78/0x9c
 rockchip_dai_tdm_slot+0x5c/0x94
 snd_soc_dai_set_tdm_slot+0xac/0x124
 asoc_simple_init_dai+0x64/0xc4
 asoc_simple_dai_init+0x74/0x178
 snd_soc_link_init+0x28/0x84
 snd_soc_bind_card+0x6b4/0xad0
 snd_soc_register_card+0xf8/0x114
 devm_snd_soc_register_card+0x48/0x90
 asoc_simple_probe+0x2a0/0x348
 ...

Fixes: 2b987b28a8 ("ASoC: rockchip: i2s_tdm: add support for tdm mode")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib5ceb2f21bad346285c814aaf4c367e71c44230a
2022-06-30 09:51:16 +08:00
Wangqiang Guo
1d20cb9b78 media: rockchip: hdmirx: fix 1280x720p25 get timing error
According to the CEA-861, 1280x720p25 Hblank timing up to 2680,
and all standard video format timings are less than 3000

Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I936ac8d6a21754fee6038328fd45eaf028f2dd2f
2022-06-29 19:45:48 +08:00
Wang Panzhenzhuan
fe6fe3c72d media: i2c: ov02b10: fix power on & off sequence
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I6b751f0bc14b6c4e5f1bcb2b46bb6de5e2708330
2022-06-29 19:42:57 +08:00
Wang Panzhenzhuan
b96728f539 media: i2c: s5kjn1: adjust supply sequence to suit spec
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I1f38b2d2d59a068c4b400bdc95aa3582aff23ac0
2022-06-29 19:41:57 +08:00
Wang Panzhenzhuan
fbd4a4eb7e media: i2c: gc8034: adjust supply sequence to suit spec
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I8089970ea321472c3d66e6e65c33954010367da2
2022-06-29 19:41:22 +08:00
Wyon Bi
332f5e008a mfd: max96752f: Fix display error during system suspend/resume
Remove regcache function.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I17c17b8f6d49a6de0248932e4d579bcd4bd623ae
2022-06-29 19:11:19 +08:00
Yu Qiaowei
a9d7cb122c video: rockchip: rga3: remove the binding of RGA2 and 'RGA_MMU'
Since some RGA2 will use IOMMU, it is unreasonable to use RGA2_core for
previous MMU-related judgments.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ibd1f33cd57178fac9fa04ea752459307b7304d39
2022-06-29 17:46:17 +08:00
shengfei Xu
da1523cb4e power: supply: charger: add sgm4154x charger driver
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ib6440de3638622c9b7c8a76950940ffadb47036a
2022-06-29 14:33:17 +08:00
Cai YiWei
9f30930942 media: rockchip: isp: fix warp size error
Change-Id: I33f168bc12ecad0a774261f2b8cf49daf3d8d60f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-28 20:20:49 +08:00
Bian Jin chen
73b47f5972 arm64: dts: rockchip: rk3588s-tablet: add simple battery info.
Test: CtsStatsdAtomHostTestCases
android.cts.statsdatom.statsd.HostAtomTests#testFullBatteryCapacity

Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: I516bd06211e02e563d6243985d597964d7596448
2022-06-28 17:22:27 +08:00
Yu Qiaowei
450da90c36 video: rockchip: rga3: Fix config-only mode cannot release request
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I11e38dfc72c0a6ba1300646f7c83707dec9eaaf6
2022-06-28 16:49:38 +08:00
Yu Qiaowei
e19e03fdeb video: rockchip: rga3: RGA3 IOMMU supports physical address
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1071ce8f38f71a13b5e632fc20bc56b75f333944
2022-06-28 16:49:38 +08:00
Jianwei Fan
7a37791d87 media: i2c: it6616: add it6616 HDMI to MIPI-CSI2 bridge driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I8bfd9c90ae8517fd307d6831d5325187756c90ea
2022-06-28 15:39:22 +08:00
Jianwei Fan
280c9a89fa include: rk-camera-module: add hdmi2mipi-csi mode control
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ia1257ec877b82ac6ba3f5b283960742b61908215
2022-06-28 15:39:22 +08:00
Cai YiWei
a4678e961a media: rockchip: isp: api for video to free tb reserved memory
Change-Id: Ia7ca669fac6c58a700fff9f1f18d51210da484b7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-28 15:14:45 +08:00
Cai YiWei
6977a0278f media: rockchip: isp: api get fast stream output info
Change-Id: I770906113078104b22731a83bf3280331f3ac15e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-28 15:14:45 +08:00
Xing Zheng
c10b7526e9 ASoC: codecs: rv1106_codec: fix the incorrect range of ADC ALC
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I3d01fafe78d5ac70d20fc310d0727a5e7c516bdc
2022-06-28 15:11:52 +08:00
Algea Cao
69e9bf7101 drm/bridge: synopsys: dw-hdmi-qp: Don't re-training when switch color in frl mode
In the frl mode, hdmi output in fixed rate. Don't re-training
It can avoid the abnormal of 8/10 bit deep color switching, and
reduce the black screen time during switching, so that the user
experience is better.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I3207639fdfdbfda7bad26b151358cae7a79037d3
2022-06-28 11:40:38 +08:00
Zhang Yubing
727678768b drm/rockchip: vop2: set active vp for splice video port
When the vop run in splice mode, 2 video port is used. But just
the main video port set as active vp, and the splice video port
not.

When attaching a win to a vp, a win for main video port set the
main video port to its vp mask, a win for splice video port set
the splice video port to its vp mask. The vp mask will attach
to the win's power domain finally.

When set a power domain off, it's a constraint that win power
dowmain's vp mask is included in vop active vp. For splice video
mode, it can's satisfied this condition, which will not real
set the power domain off.

To fix this issue, it need to set the splice video port as active
vp.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: If60d057c21c1f24db0c6e3001c2da2f5a8b46f27
2022-06-27 18:56:59 +08:00
Lin Jinhan
96f4d4808f ARM: dts: rockchip: rv1106-smd-cam: fix ircut config error
1. ircut should use 'lens-focus' as label rather than 'ir-cut' in
 kernel-5.10.
2. swap open and close gpio setting.

Change-Id: I44f55c0e455d0ee19c14207928bafadeac934703
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-06-27 18:25:08 +08:00
shengfei Xu
18e0f4ff9f power_supply: Add power supply type "Charge Pump"
Introduce a new power supply type "Charge Pump" under the power_supply
class. Also, add power supply properties corresponding to power supply
type charge pump.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ib51bfd7c69b549cad4a254bd0c3f50629ea211a3
2022-06-27 16:38:29 +08:00
Yu Qiaowei
560bc18d7e video: rockchip: rga3: modify the check of virtual stride
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6c955fc1c746629142494c4c6d6f2f49c94d0d7c
2022-06-27 15:55:23 +08:00
Yu Qiaowei
fc308534be video: rockchip: rga3: optimize struct rga_hw_data
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If48f4748409226dc73bdf0822eb832ca09bca86e
2022-06-27 15:55:23 +08:00
Elon Zhang
9293a37349 ARM: dts: rockchip: rv1106-thunder-boot: remove no-map for rtos mem
no-map property added in rtos reserved memory will cause
kernel can not boot up issue.

Fixes: 60dbf2d80a ("ARM: dts: rv1106-thunder-boot: reserve 256KB~512KB for hpmcu")

Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I24f588a54e88d7c546cd3e53bd7aa5a0f5a46476
2022-06-27 15:44:47 +08:00
Ziyuan Xu
e23ddb2ee4 dma-buf: rk_heaps: call rk_add_default_cma_heap() early when ROCKCHIP_THUNDER_BOOT_ISP=y && !CONFIG_INITCALL_ASYNC
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ief7da5a7358b4e0625c68e2b51583f89cb0362c6
2022-06-27 12:07:35 +08:00
Wang Panzhenzhuan
95c6c7edb6 media: i2c: imx415: add dcphy param for hdr2 mode
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ib59b19aa65aac0aaeb4a5d51c9b7f3cbd6e1ee76
2022-06-27 11:34:31 +08:00
Ziyuan Xu
335ff91245 ARM: dts: rockchip: rv1103g-battery-ipc-v10: rectify compatible/model description
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ib8d308f664f2ea16db7882f9412bed42e2855d58
2022-06-27 11:33:14 +08:00
Zefa Chen
b0092eca95 media: rockchip: vicap: rv1106 support hdr compress
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ibac5d9205c01b4692d74289cbc5edc70c9d91f4d
2022-06-24 22:08:00 +08:00
Cai YiWei
84564f9c76 media: rockchip: isp: fix module exit
Change-Id: Ib0a2bddb6646ec93106736fcfe96cba837af8daf
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-24 21:55:26 +08:00
Cai YiWei
92eb422f64 media: rockchip: isp: fix rockit set fps fail
Change-Id: I0b419db064d7a5b317aca0aebb9ba88ba6862dc9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-24 21:53:23 +08:00
Jon Lin
14af2adffc arm64: configs: rockchip_linux_defconfig: Enable PCIEASPM_EXT
Change-Id: I4c38d1c7e83e0e55808344645dee9656a6f09773
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-06-24 21:50:21 +08:00
Jon Lin
e02eb52953 arm64: configs: rockchip_defconfig: Enable PCIEASPM_EXT
Change-Id: Ic309c2569f3d5c7c76a4f91d7f94d6d79b3fa8f9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-06-24 18:14:44 +08:00
YouMin Chen
9f8075b8ae PM / devfreq: rockchip_dmc: clear the irq if waiting complt_irq timeout
If waiting for wait_ctrl.complt_irq times out, clear the IRQ and stop the MCU by
sip_smc_dram(DRAM_POST_SET_RATE). Prevent the complt_irq which blocked from responding
in the next DDR frequency conversion flow.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I771ac2471dd1ef388f249c367d4f875ea0502e6c
2022-06-24 15:44:03 +08:00
Jianwei Fan
ed1e2d4c5b media: i2c: max96722: add max96722 GMSL to MIPI-CSI driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ibb78ca2757705d106ad9c6899775e5e5785595ff
2022-06-24 15:23:39 +08:00
Wangqiang Guo
09a4eade6e media: rockchip: hdmirx: edid support yuv444
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: Ifb52d50a982fcd23d557c977c874478bade14277
2022-06-24 15:21:10 +08:00
XiaoTan Luo
046993ac20 ASoC: rockchip: multicodecs: remove MAX_CODECS
a soundcard can connected more than 2 codecs.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ie42d54e33c1be58582350ec24165d5310347b4d2
2022-06-24 14:26:04 +08:00
Ziyuan Xu
f72f13b4ce i2c: rk3x: initcall early when CONFIG_ROCKCHIP_THUNDER_BOOT=y && !CONFIG_INITCALL_ASYNC
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I496f251febc01c49f2703c425ea6563db3439203
2022-06-24 09:55:37 +08:00
Ziyuan Xu
aabfa89452 media: i2c: initcall sc230ai early when ROCKCHIP_THUNDER_BOOT_ISP=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ie4311886a46f070703ceb613bef0a8e3f85b5076
2022-06-23 18:40:22 +08:00
Ziyuan Xu
3c8e72bfea phy: rockchip: initcall csi2-dphy early when ROCKCHIP_THUNDER_BOOT_ISP=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I431f55560f2f87984ad92fd73f6ad4e0dd16e79e
2022-06-23 18:39:46 +08:00
Ziyuan Xu
6a0ab1e9fa media: platform: rockchip: initcall cif/isp early when ROCKCHIP_THUNDER_BOOT_ISP=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ibd92065a9819096275ea6530e6f1c3830b2ed463
2022-06-23 18:39:33 +08:00
Ziyuan Xu
4ce0428e42 media: v4l2-dev: call call videodev_init() early when ROCKCHIP_THUNDER_BOOT_ISP=y
The cif/isp drivers depends on videodev_init() to *video_register_device*.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ifc6d8c3e8a90ac045b68e3299537fec8d17f477f
2022-06-23 18:39:01 +08:00
Zefa Chen
67ca18a877 media: rockchip: vicap fixed pipe s_power error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1e5e133127c2cd64f38da7d87af23fa8e5f5ceac
2022-06-23 18:38:27 +08:00
Zefa Chen
7466682f92 media: i2c: sc230ai fixed linkfreq err
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib30492b8ff31d6cae36b4c237a84c3da09435fb2
2022-06-23 18:38:00 +08:00
Ziyuan Xu
60dbf2d80a ARM: dts: rv1106-thunder-boot: reserve 256KB~512KB for hpmcu
The HPMCU life cycle maybe go so far as to linux kernel, resever it
until thunder-boot had been done.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I6994e035bad24e910be7b7572fb85fbbcebec487
2022-06-23 18:36:35 +08:00
Wang Panzhenzhuan
6607339e85 arm64: rockchip_defconfig: enable ov02b10 & s5kjn1 & cn3927v & aw36518
Enable camera configs: ov02b10 & s5kjn1 & cn3927v & aw36518
for rk3588s tablet

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I46b59c285a0741ed0c6744bd6ae9bac5e943ae45
2022-06-23 15:10:59 +08:00
Caesar Wang
049b3dc624 arm64: dts: rockchip: add rk3588-evb7-lp4-v10-linux.dts
Add rk3588-evb7 that have single PMIC hardware design scheme
for customers to choose.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ia99fda8f73ad3bf7a3d4cb2a7763c2453176d10d
2022-06-23 15:08:31 +08:00