Commit Graph

1080671 Commits

Author SHA1 Message Date
Cody Xie
f237af29a4 media: i2c: maxim4c: Add config ssc-ratio property
Change-Id: I1178c5becbdf2ded1648e31ff609b7ce6a07bdf5
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2023-10-09 17:55:42 +08:00
Cody Xie
368f785570 arm64: dts: rockchip: rk3588-vehicle-evb-v22: Change regulators supply for cameras
Change-Id: I6c004cc78d851500b6e1651419c6aa3b3f6a5a31
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2023-10-09 17:55:18 +08:00
Cody Xie
423b02db66 arm64: dts: rockchip: rk3588-vehicle-evb-maxim-max9671(/2)2-d(c)phy0(/3): Add regulators
Change-Id: Idb176416c330ecf11d646d7582377d82ae401f72
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2023-10-09 17:53:37 +08:00
Cody Xie
ea15f616ec media: i2c: maxim4c: Add regulator suppliers
Change-Id: I637e20533515844f185167cda97a619cc475debd
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2023-10-09 17:52:22 +08:00
Nuno Sá
1341bf639b BACKPORT: iio: adc: rockchip_saradc: do not use internal iio_dev lock
The iio_device lock is only meant for internal use. Hence define a
device local lock to protect against concurrent accesses.

While at it, properly include "mutex.h" for mutex related APIs.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20221004134909.1692021-8-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
(cherry picked from commit bb690935df)
Change-Id: If04914774fec56645b1eb9bbb82d504fdd44779f
2023-10-09 15:27:09 +08:00
Xing Zheng
eade682577 arm64/configs: rockchip_defconfig: enable CONFIG_GPIO_SYSCON
The SYSCON driver was designed for using memory areas (registers)
that are used in several subsystems. We can use bits in one
register for various purposes and thus should be handled by
various kernel subsystems.

In Rockchip RK3328, the output only GPIO_MUTE pin, originally for
codec mute control, can also be used for general purpose. It is
manipulated by the GRF_SOC_CON10 register in GRF. Aside from the
GPIO_MUTE pin, the HDMI pins can also be set in the same way.

Therefore, we need to enable this feature in rockchip_defconfig.

Change-Id: I0036bb8d3fb007f0ccab5d340d179886926a98ed
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2023-10-09 15:11:59 +08:00
Xing Zheng
8c83c66953 arm64/configs: rockchip_linux_defconfig: enable CONFIG_GPIO_SYSCON
The SYSCON driver was designed for using memory areas (registers)
that are used in several subsystems. We can use bits in one
register for various purposes and thus should be handled by
various kernel subsystems.

In Rockchip RK3328, the output only GPIO_MUTE pin, originally for
codec mute control, can also be used for general purpose. It is
manipulated by the GRF_SOC_CON10 register in GRF. Aside from the
GPIO_MUTE pin, the HDMI pins can also be set in the same way.

Therefore, we need to enable this feature in rockchip_linux_defconfig.

Change-Id: If83f232121fb9fe54b6ff362d7911edf229d3878
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2023-10-09 14:46:48 +08:00
Jianwei Fan
26290eb60d media: i2c: lt6911uxc: add dcphy params
Change-Id: Id97a48e84fd84a70f4ba2d092436355a55f78779
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-10-08 12:18:43 +00:00
Jianwei Fan
11a496172b arm64: dts: rockchip: Add dual mipi configuration for rk3588 evb1 extboard
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Id3efb7546e3e9fb5206cc12058724e778f1c5340
2023-10-08 19:29:11 +08:00
LongChang Ma
7a031fea60 media: i2c: sc401ai: add support thunder boot
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: I1608a9341ddc772aaa72002e1b9c7361235908c0
2023-10-08 19:27:02 +08:00
Xiao Ya peng
f7a8feac25 misc: pcie-rkep: Fix memory leak in pcie_rkep_remove.
Fixes: 006505ca76 ("misc: add rockchip standard EP function driver")
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
Change-Id: I602323f9cedc6edf94f951b9b9c9787b3a271550
2023-10-08 18:52:45 +08:00
Rimon Xu
da317c6776 video: rockchip: vtunnel: add video tunnel driver
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Ic621f6fcbc4924bd5567c9161f358e9365830618
2023-10-08 14:47:17 +08:00
Sugar Zhang
7405801db4 dmaengine: Drop the unused config
This patch drop the unused config src/dst_interleace_size.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I78dba866c6d7c6c755c77d1558a8449716bcc1aa
2023-10-08 09:35:31 +08:00
Sugar Zhang
86f2de0e18 ASoC: rockchip: multi-dais: Use interleaved dma transfer API
This patch use the interleaved dma transfer API for multi-dais
data, now, let's drop the legacy implementation.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8f217e25ae68017eff3eaedfe1d3475cbbaccde6
2023-10-08 09:35:31 +08:00
Sugar Zhang
0eba9f8ec0 dmaengine: pl330: Add support for interleaved transfer
This patch add support for interleaved transfer which used
for interleaved audio or 2d video data transfer.

for audio situation, we add 'nump' for number of period frames.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I502ea9c86c8403dc5b1f38abf40be8b6ee13c1dc
2023-10-08 09:35:31 +08:00
Tony Xie
de0064df8f arm64: dts: rockchip: rk3308b-amp: using 64-bits for cpu's affinity
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I532adb6c891fcda4733740027cb6bbb878b24e2b
2023-10-07 15:45:45 +08:00
Tony Xie
8c22a02698 arm64: dts: rockchip: rk3562-amp: using 64-bits for cpu's affinity
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: Ic515f53185d380c6ce4de84b777ca6578e8c08fa
2023-10-07 15:45:33 +08:00
Tony Xie
cb753cddaa irqchip/gic: add the parameter of gic version for rockchip amp
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: Idf679a2e91a62a90de4059f09451c58d6d56ecd4
2023-10-07 15:40:17 +08:00
Tony Xie
5c09e33a23 soc: rockchip: amp: using 64-bits variable to manage the cpu's affinity
for compatiblility between arm32 and arm64, giv2 and giv3,using 64-bits
variable to manage the cpu's affinity.

Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: Ic5ce758d4711c039be9dc52df8f0ebbbdfcc1244
2023-10-07 15:39:17 +08:00
Tony Xie
726d78e739 irqchip/gic: allow to config pending function between different os
for rpmsg, it needs to set pending reg between different os, so allow to
config pending function between different os.

Fixes: 2e7658ef57 ("irqchip/gic: support config amp os irqs")
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I4b06f8a692e34c339d4facb40b8120fdbe1d7bcd
2023-10-07 15:38:17 +08:00
Cody Xie
6013ab7070 arm64: dts: rockchip: rk3588-vehicle-evb-v22: Add delay for all camera related regulators
It will be more safer for regulator consumer devices to power on
after their power suppliers are stable. And regulator consumer devices
need to completely shut down, then power up for a reset cycle.
Therefor, regulator providers need to be make sure shutdown completely.

- startup-delay-us can be used to wait regulator providers be powered on
  good, according their power-up time.
- off-on-delay-us can be used to wait regulator providers be shut down
  completely.

1. cameraN_vcc12v_buck have a approximate ~1ms power on rise time
and ~13-~14ms power off fall time

2. vcc5v0_buck uses MPQ4317 which have a approximate ~1.5ms
EN(on)->PG(high) delay and ~0.8ms EN(off)->PG(low)

Change-Id: I8f23a6a4b53c8760f62c64758a481ad86be4da16
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2023-10-07 15:27:30 +08:00
Algea Cao
db86421b1a drm: bridge: dw-hdmi: Fix 3d fp mode clock miscalculation
3d fp mode pixel clock needs to be doubled. mode->crtc_clock
is already a doubled clock, don't have to multiply it by 2.
At the same time, this error will cause the audio cts calculation
error so that hdmi has no sound output. This commit can also
fix the problem.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I7d080f9779a640649c149f4b21072597cf0c0cf7
2023-10-07 15:23:13 +08:00
Basavaraj Natikar
e7893cb391 BACKPORT: xhci: Improve the XHCI system resume time
Avoid extra 120ms delay during system resume.

The xHC controller may signal wake up to 120ms before showing which usb
device caused the wake on the xHC port registers.

The xhci driver therefore checks for port activity up to 120ms during
resume, making sure that the hub driver can see the port change, and
won't immediately runtime suspend back due to no port activity.

This is however only needed for runtime resume as system resume will
resume all child hubs and other child usb devices anyway.

Fixes: 253f588c70 ("xhci: Improve detection of device initiated wake signal.")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20230428140056.1318981-3-Basavaraj.Natikar@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1c024241d0)
Change-Id: Icf4e8c97b3d5f6e9550fcad0e748c7badf1b22df
2023-10-07 15:03:09 +08:00
Mingwei Yan
824a8b7fd5 media: rockchip: isp: fix rv1106g3 4k cmsk right
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I0754f3a4e8b0ac5227b933eeb0cc41d9782fb790
2023-10-03 10:02:04 +08:00
Jianwei Fan
28a26c7b72 media: i2c: lt6911uxc: add 4K60 dual mipi port support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ib70ec05ed521b924f5e10343a3399d629ee40dbe
2023-09-28 18:49:13 +08:00
Tao Huang
533c34604f drm/panel: simple: Introduce panel_simple_msleep() helper
Replace usleep_range() with panel_simple_msleep() to simplify code.

Fixes: cd26d5970c ("drm/panel: simple: Replace msleep() with usleep_range()")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie0679526b51e0c84a5e89bc212601b5cde1bfda8
2023-09-28 18:23:18 +08:00
Cai Wenzhong
9230030991 media: i2c: maxim4c: driver version v2.03.00
1. remote device add the maxim4c prefix to driver name.

Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I31f6762bb9e468da0c7586d6b0b6475939b89d42
2023-09-28 10:43:29 +08:00
Luo Wei
49ec4aba84 mfd: display-serdes: return 0 even if i2c error so that can run bridge
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I047627b0a668612c421f95186be1af08d6ff56b2
2023-09-27 18:28:45 +08:00
Huibin Hong
4217f795ff soc: rockchip: debug: rcu stall and hard lock have own notifier_block
Add rockchip_hardlock_notify to save pc of the cpu that is hard lock,
the pc is used for minidump cpu hard lock stack.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ie542d981f3f12ac1eb3a2f425b76780a04f220cf
2023-09-27 18:18:21 +08:00
Huibin Hong
212f9f2656 soc: rockchip: minidump: save more
1. save more data of cpu sp and general registers
2. save hardlock cpu pc to note section
3. save hang task context to note section

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I52bfc419aeff1c049c5c88e77ed29d7be56601b7
2023-09-27 18:18:21 +08:00
Yifeng Zhao
aaa824499d mmc: dw_mmc: Fix some TF card write data errors in RV1106
Before sending the stop command, there may still be some
valid data in the fifo that has not been transmitted to
the TF card. Therefore, it is necessary to increase the
determination of fifo count and reset the controller
before send the stop command.

Fixes: 6eca689b99 ("mmc: dw_mmc: Workaround for RV1106/1103 sdmmc")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I766673b25157a77018ac127e2ad9fb3f9672904b
2023-09-27 17:47:23 +08:00
XiaoDong Huang
0f39cdefa8 ARM: rockchip: rv1106: sleep: decrease pmu-fsm time
Change-Id: I57e88bb222ce26c7bf4736244e958e13b91ae184
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2023-09-27 17:14:24 +08:00
XiaoDong Huang
b1c3fa9777 ARM: rockchip: rv1106: sleep: fix flow for HPMCU_FAST_WAKEUP
1. Don't config PMU_WAKEUP_TIMEOUT_CNT.
2. Do hpmcu_fast_wkup if gpio0 wakeup.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ib8ea97809e43d31e1f84212df72225d51f503f11
2023-09-27 17:14:24 +08:00
Chaoyi Chen
b87a32fd67 arm64: dts: rockchip: add rk3568 evb1 dual lvds devicetree
Add support for dual lvds with hdmi output

Change-Id: I8b6e294e6e96b2c65c27da346868a4f051d24ab2
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2023-09-27 17:13:44 +08:00
Sugar Zhang
0c2c6c9430 drm/bridge: synopsys: Fix wrong FIFO reset on AUD_CONF0
Should use update_bits instead of write directly which
will override the other configs on AUD_CONF0.

Fixes: 19820cc653 ("drm/bridge: synopsys: Recover sound for XRUN routine")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie64cdce700a30f1b4a64fc9d437d34bd0496aa30
2023-09-27 17:13:08 +08:00
Huang Chaoqun
dcec32c361 power: supply: test-power: modify battery_voltage
healthd will voltage_now/1000 cause batteryVoltageMillivolts too small
which cause BatteryStatsHistory.setBitField() error

Signed-off-by: Huang Chaoqun <chaoqun.huang@rock-chips.com>
Change-Id: I8da022a2b7461ac62f0cdcb34a2488a333967523
2023-09-27 14:16:34 +08:00
Shawn Lin
629252c396 mmc: dw_mmc: Don't reset controller when powering up vqmmc in thunderboot
It will lead the device pull down Data0 sometimes, which makes the insmod
process very long based on different eMMCs. The biggest will be 4s.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I2dbf76f62c9cbaa31db101ed91765ecb7eaf6633
2023-09-26 19:39:48 +08:00
Finley Xiao
1e5bbbbd53 soc: rockchip: rockchip_system_monitor: Make mem volt greater than vdd volt
The vdd is the power supply of pvtpll, if mem volt less than vdd volt,
there will not be enough voltage margin.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I15b57904c20b74d16ac8113f3e49e3410bcf02af
2023-09-26 19:39:27 +08:00
Jianwei Fan
08d68a6729 arm64: dts: rockchip: rk3588-evb1: add rk3588 evb1 rk628 hdmi2csi config
Change-Id: Id4be886b25a9097b24a1b225db208eb4b727bbff
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-09-26 18:54:28 +08:00
Jianwei Fan
c9885c773d media: i2c: rk628_csi: update the driver to v0.0.8
1.fix mipi timing bug when hsfreq is 1250Mbps
2.add continue mode config from dts

Change-Id: I62b6d8effe43b1915bbdf55eb377ce6f0d004b14
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-09-26 18:54:14 +08:00
Lin Jianhua
09746a7b2c arm64: dts: rockchip: add rk3308 evb v13
Change-Id: I6f5ab31218236d6243e046270ba05bb7c5a48038
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2023-09-26 18:46:18 +08:00
Lin Jianhua
d4a3eab170 arm64: dts: rockchip: fixup check warning about is31fl3236 addr in rk3308 evb
Change-Id: I67c50a48f22d8495528f52a353007e4efab7fa95
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2023-09-26 18:39:33 +08:00
Lin Jianhua
58239c7ec1 ARM: dts: rockchip: rk3308 boards: add uart rts pinctrl for bt
Change-Id: I67ab4b33e5a31223c33fe224a928b9cbdeff936a
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2023-09-26 18:38:36 +08:00
Lin Jianhua
cc36289ad4 arm64: dts: rockchip: rk3308-evb: add uart rts pinctrl for bt
Change-Id: I07e0f5aa459139b91c45be244a2c0df3d0340e10
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2023-09-26 18:37:22 +08:00
William Wu
ed67590b8a arm64: dts: rockchip: rk3588: Add aclk_usb for ehci and ohci controllers
Test on RK3588 EVB1 with dwc3_of_simple_driver_init in
initcall_blacklist like this:

bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 initcall_blacklist=dwc3_of_simple_driver_init";

Kernel halt in ehci_bus_resume when read the intr_enable
register of the ehci controller. It's because that the
ehci controllers depend on the aclk_usb which only be
managed by DWC3 controller driver right now.

The clock dependency when access ehci/ohci controller registers:
CPU -> hclk_vo1usbtop -> aclk_usb -> hclk_usb -> ehci/ohci

This patch adds the aclk_usb for all ehci and ohci controllers.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I66a622d7156d52451273423c4d6ca2cd965fe55a
2023-09-26 10:41:49 +08:00
Elaine Zhang
ec3fad65f8 arm64: dts: rockchip: rk3588s: Add aclk_usb3otg for usb pd
add aclk_usb3otg0\1 to resolve noc clock dependency.
hclk_host0 ----> hclk_usb |--->hclk_usb_root
                          |---->hclk_vo1usbtop

aclk_usb3otg0 ----> aclk_usb |--->aclk_usb_root
                             |---->aclk_vo1usbtop

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Iee97338d1960f0333fe6c79819f1872ece07ec04
2023-09-26 09:04:51 +08:00
Huibin Hong
df04f5eab5 arm64: rockchip_defconfig: set MINIDUMP_MAX_ENTRIES 512
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: If1e5d6e5c295c3f6581182c1fd36f306bfcf2045
2023-09-25 20:16:54 +08:00
Huibin Hong
fac207b672 arm64: traps: save cpu regs to minidump when cpus die
If two cpu die at the same time, the first cpu get die_lock,
calls minidump die notify and saves regs, then panics.
But the second cpu would hardlock because it can't get the die_lock.
And nothing is saved to minidump, so we have the patch.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I38cda3a6cee160ba1293a2e18c7238c96cf2e755
2023-09-25 20:16:43 +08:00
Huibin Hong
6925da1c98 watchdog/hardlockup: move hardlock_notifier before panic
And update the cpu regs when it is soft lock.

Fixes: d851edc401 ("watchdog/hardlockup: add hardlock_notifier_list")
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Id695ee4e7a80bfde2c15891f19e98af092f74a01
2023-09-25 20:08:25 +08:00
Huibin Hong
5a65668788 soc: rockchip: minidump: pass minidump_table to uboot
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I67c7a0cd3817a145003afbad1b5d6d4275738ea1
2023-09-25 20:04:16 +08:00