Commit Graph

1279914 Commits

Author SHA1 Message Date
Sandy Huang
aeda6a1feb drm/rockchip: vop2: move devm_request_irq to the end of vop2_bind
At MOS environment, the irq handle may be triggered immediately
after request irq, the irq handle maybe access vop2 memory, e.g.,
vop3_vp_isr() -> vop2_wb_handler() access vop2->wb->regs, so move
devm_request_irq() to the end of this function to make sure vop2 is
initialized.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3df1cc08069ffcffefa91a523db75fb67cd47de3
2025-01-15 06:43:42 +00:00
Cai YiWei
0520bd5114 media: rockchip: isp: fix CTRL_SWS_CFG config error
Change-Id: Idc84e44ce5064d1c91579c0f4ef9891a476f2e79
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-01-15 11:40:01 +08:00
William Wu
9541ea94fb Revert "usb: dwc3: add a new glue layer for rockchip SoCs with INNO PHY"
This reverts commit 0cbdc8c1da.

The legacy glue layer driver dwc3-rockchip-inno.c is only
used for RK3328/RK3228H platforms, and now they use the
dwc3 core driver instead of the legacy driver, so let's
discard the legacy driver.

Change-Id: Ib1f43aacddea0e0155aa75b0efb58452b0514860
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-01-14 11:54:11 +00:00
William Wu
00baab7edf ARM: configs: rv1126-tb.config: Remove unused CONFIG_USB_DWC3_ROCKCHIP_INNO
Change-Id: I5fb6b42f0d04885df5934465ab8cc57726089a4e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-01-14 19:03:11 +08:00
Xing Zheng
8a89e948a2 ARM: dts: rockchip: rk3506g-demo-display-control: fix noise dues to mclk and coeffs without matched
The requirements of rk3506 codec are mainly divided into three
sampling rate groups: 48/44.1/32kHz.

And, the rk3506 codec has internal frequency division, the driver
limits these three mclk inputs:
 #define MCLK_REFERENCE_8000 32768000
 #define MCLK_REFERENCE_11025 45158400
 #define MCLK_REFERENCE_12000 49152000

Therefore, it is necessary to add the "rockchip,mclk-no-set" property
to the SAI4 to avoid switching the mclk frequency in the function of
rockchip_sai_set_sysclk() after the codec configures mclk, causing
the codec filter to work abnormally.

Change-Id: Ic6cd0688287eb4c92c3b27bba4f60c46610c9006
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2025-01-14 08:19:53 +00:00
Xing Zheng
c48bb00056 ASoC: rockchip: sai: add support "rockchip,mclk-no-set" property
Sometimes the mclk frequency needs to be set by the external codec
according to the sampling rate, rather than just keeping a fixed
multiple of the sampling rate. In this case, through the property
of "rockchip,mclk-no-set", the SAI will not modify the mclk frequency
again after the codec sets it.

Change-Id: I9bacebb397b9219b773b9953afabd1c5156c8a19
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2025-01-14 08:19:53 +00:00
Xing Zheng
4036781b83 ASoC: codecs: rk730: fix and update some clock configurations
This patch removes the two uncommon sampling rates of 12000 and 24000Hz,
because they are not in the definition of SNDRV_PCM_RATE_8000_192000 in
the sound framework:
...
 #define SNDRV_PCM_RATE_11025 (1U<<2) /* 11025Hz */
 #define SNDRV_PCM_RATE_16000 (1U<<3) /* 16000Hz */
 #define SNDRV_PCM_RATE_22050 (1U<<4) /* 22050Hz */
 #define SNDRV_PCM_RATE_32000 (1U<<5) /* 32000Hz */
...

According to the configuration of the sampling rate group clock, the
configuration of 11025 and 22050Hz is added. And, it is changed to
select the appropriate mclk in the coeff_clk array according to the
sampling by the codec by default. If you need to use the previous
fixed FS method, you need to specify the property "rockchip,mclk-fs-fixed"
in the dts node.

Change-Id: Iae4478b807f4e6eb88bf6cc9f431ce2f725a5b36
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2025-01-14 06:23:22 +00:00
Zhang Yubing
fdcec7349c drm/rockchip: vop2: reset dclk after config stream output
In RK3576, DP0 attach to VP1 or VP2 will cause vertical stripe. It
need reset dclk after config stream output to avoid this issue.

Change-Id: I00112e8541828ed53a2ea91e7d79f8d148a7b3df
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-01-14 06:21:20 +00:00
Zhang Yubing
cd51e4eb73 drm/bridge: synopsys: dw-hdmi-qp: support pre disable/post enable crtc
Change-Id: If11faf7c1ca6079f2f6fef4c8b914b07615b65b3
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-01-14 06:21:20 +00:00
Zhang Yubing
a3ad373b3f arm64: dts: rockchip: rk3576: support vop dclk reset
Change-Id: I93552e3d8e5c20dabc5061b8cb8071846ce3b27a
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-01-14 06:21:20 +00:00
Zefa Chen
61397641fb media: rockchip: vicap fixes warning of compile
drivers/media/platform/rockchip/cif/dev.c:1461:6: warning: no previous prototype for ‘rkcif_set_sensor_streamon_in_sync_mode’ [-Wmissing-prototypes]
drivers/media/platform/rockchip/cif/dev.c:2477:6: warning: no previous prototype for ‘rkcif_set_sensor_stream’ [-Wmissing-prototypes]

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I7df0b1505e763b51e277f70f7a46d4eb163a82d6
2025-01-14 06:14:37 +00:00
Zefa Chen
e0747a9113 media: rockchip: vicap fixes error of thunderboot change to online in hdr mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I90f4f82d5f380961a3c61634f4233e35973f64c6
2025-01-14 06:14:37 +00:00
Zefa Chen
f61210ec08 media: rockchip: vicap clean crop mask after stop stream
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I16eba981614ca49d8e4dbc5bb011d3237835c6ad
2025-01-14 06:14:37 +00:00
Zefa Chen
0d7d8acd16 media: rockchip: vicap fixes error fps print of proc when work in online
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I257f5df24fb5adc9ab9ddd3321ef3ff21ea88034
2025-01-14 06:14:37 +00:00
Zefa Chen
baef3a2632 phy: rockchip: csi2-dphy: mipi csi2 dphy dual init host_sel when work dual camera mode
only valid for rk3566/rk3568

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2c808fcccf201a84097acac3399b412eb251b28e
2025-01-14 06:14:11 +00:00
LiuDiMing Lin
7566b06bc2 iio: imu: inv_icm42670: add drive-open-drain setting
Signed-off-by: LiuDiMing Lin <fenrir.lin@rock-chips.com>
Change-Id: I78727be0f7554afc4bc884bf0df27d31127c6c7a
2025-01-13 09:54:08 +00:00
Jon Lin
195855c2d1 spi: rockchip-slave: Get rid of the sram driver dependency
Use devm_ioremap to get rid of the sram driver dependency.

Change-Id: I908c4f6aee1d545d80b5821375d0962c2640c0e2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-13 09:36:28 +00:00
LiuDiMing Lin
08f6731c5a iio: imu: inv_icm42670: use low pass filter bypassed
set gyro and accel UI low pass filter bandwidth: Low pass filter bypassed

Change-Id: Ia36c04380f630799f27938006b06432d49c83c62
Signed-off-by: LiuDiMing Lin <fenrir.lin@rock-chips.com>
2025-01-13 09:25:44 +00:00
Ye Zhang
5c3cf57fce pinctrl: rockchip: rk3328: Fix pinmux for GPIO2-B
Since the iomux type for GPIO2-B has been fixed to IOMUX_WIDTH_2BIT, the
registers for pins 8 to 14 can now be calculated correctly. Therefore,
pins 8 to 14 have been removed from rk3328_mux_recalced_data.

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I0af399d1fed813934e753bd08842b2ab182dce92
2025-01-13 09:18:03 +08:00
Tao Huang
96900fe2fe Merge tag 'v6.1.115'
This is the 6.1.115 stable release

* tag 'v6.1.115': (2780 commits)
  Linux 6.1.115
  xfrm: validate new SA's prefixlen using SA family when sel.family is unset
  arm64/uprobes: change the uprobe_opcode_t typedef to fix the sparse warning
  ACPI: PRM: Clean up guid type in struct prm_handler_info
  platform/x86: dell-wmi: Ignore suspend notifications
  ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
  net: phy: dp83822: Fix reset pin definitions
  serial: protect uart_port_dtr_rts() in uart_shutdown() too
  selinux: improve error checking in sel_write_load()
  drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too
  hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event
  xfrm: fix one more kernel-infoleak in algo dumping
  LoongArch: Get correct cores_per_package for SMT systems
  ALSA: hda/realtek: Add subwoofer quirk for Acer Predator G9-593
  KVM: arm64: Don't eagerly teardown the vgic on init error
  KVM: nSVM: Ignore nCR3[4:0] when loading PDPTEs from memory
  openat2: explicitly return -E2BIG for (usize > PAGE_SIZE)
  nilfs2: fix kernel bug due to missing clearing of buffer delay flag
  ACPI: button: Add DMI quirk for Samsung Galaxy Book2 to fix initial lid detection issue
  ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context
  ...

Change-Id: Iee600c49a5c914b79141c62cda38e787e429a167

Conflicts:
	arch/arm64/boot/dts/rockchip/rk356x.dtsi
	drivers/gpio/gpio-rockchip.c
	drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.h
	drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/media/i2c/imx335.c
	drivers/pci/controller/dwc/pcie-dw-rockchip.c
	drivers/spi/spi-rockchip.c
	drivers/spi/spidev.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/host/xhci.h
2025-01-10 17:48:57 +08:00
Tao Huang
8533b2249e Revert "exfat: fix memory leak in exfat_load_bitmap()"
This reverts commit 6732e1af29.

Replaced by commit 4e1813e52f ("exfat: fix memory leak in exfat_load_bitmap()").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I323d80bccfc1c1fa021d9b86433a766f7bbebe5b
2025-01-10 17:47:50 +08:00
Finley Xiao
75588ef133 clk: rockchip: rk3506: Use MUXTBL for MCLK_SAI
Change-Id: I590ae0788ab9e064563284d157078b8a0bbcb349
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2025-01-10 08:50:45 +00:00
Chandler Chen
9b5850c977 video: rockchip: mpp: iep2: fix mapping conflict issue
amend extra page for some I1O1T page-fault cases
Fixes: cdc9ee0588 ("video: rockchip: mpp: fix iep2 page-fault issue")

Change-Id: I81820d8a45488bd4c578fa37f18436719afe912e
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2025-01-10 08:48:32 +00:00
Joseph Chen
77c148f147 regulator: rk801: Use a better name for bool variable
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8c6ce6271ff13a9adfbb0b9f1d86850aa52c889e
2025-01-10 08:44:53 +00:00
Joseph Chen
7063c002ba ARM: dts: rockchip: rk3506-rk801: Add index for switch regulator name
It's used for U-Boot rk801 driver.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6f9ebc4427db097b0e3af08c672a63d2c3c42037
2025-01-10 08:44:53 +00:00
Finley Xiao
6c8f7b74b5 ARM: dts: rockchip: Add RK3562 EVB2 devicetree
Change-Id: Ie1aedbacce23218bb8a1c1ab1f5afb4fd206a777
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2025-01-10 07:01:21 +00:00
Shengfei Xu
ebfac24357 clk: RK808: Configure 32k always on through dts
Change-Id: I91d860c40940fb02af2226f95ff69685e65a8434
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-01-10 01:59:46 +00:00
Zefa Chen
44d8208235 phy: rockchip: samsung dcphy reinit c_option when rx stream on
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I05d4b845a8aa7493be8cb659545d6cdb3c708e7f
2025-01-09 08:17:44 +00:00
Sandy Huang
7b21f59425 drm/rockchip: vop2: adjust VOP aclk mode according to line duration
Some panel resolution is less than 2560 but pixel clock/fps is
relatively large, In this scene, VOP aclk need enter advance mode to
make sure VOP performance is enough. 4kp60 line duration is roughly
equal to 7500 ns, so we add a condition(linedur_ns < 7500) to enter
VOP aclk advance mode.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I50e15e8b05cfcf3c92704b8d96287099ce851686
2025-01-09 08:17:11 +00:00
Ye Zhang
bb0e9e5f8b thermal: rockchip: change code table for rk3506
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I489586424f6a7901933e0b1bed888ca7d5818331
2025-01-09 08:16:37 +00:00
Sandy Huang
673b576813 drm/rockchip: vop2: fix null point at non dovi platform
Fixes: a8f0dc0b74e7 ("drm/rockchip: vop2: add dolby vision supported for rk3588")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I873d10ca97dd108e1f60f2862f6d7af068a7f0b1
2025-01-08 10:54:36 +00:00
Sugar Zhang
90d2e27567 clk: rockchip: rk3588: Use CLK_MUX_ROUND_CLOSEST for Audio
Use flag CLK_MUX_ROUND_CLOSEST to be able to round the divider
to the closest one instead than roundup.

e.g. clk_set_rate 6150144 (6144000 * 1.001)

Before:

clk_get_rate - 6144000

After:

clk_get_rate - 6150145

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic3d1ed3f4de0abf0c7e4c1027a68c2d2cb681029
2025-01-08 10:20:44 +00:00
Ye Zhang
1a5b21655b gpio: rockchip: Fix rk3506 gpio4a0~4a5 mapping issue
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: Ic34079132f95e93b9a0777d6d1ceabee0e566026
2025-01-08 10:19:34 +00:00
Algea Cao
0cb3359e28 drm/bridge: synopsys: dw-hdmi-qp: Support DOVI HDR
Change-Id: I72279ebf4d55b1aa53ca12bb8995881af3f0defd
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-01-07 10:37:33 +00:00
Algea Cao
03d21c720f drm/rockchip: dw_hdmi: Add property MODE_COLOR_CAPACITY
This property is used to report the supported color format for each
resolution to userspace.

Change-Id: Ib2e8c712d7590b1cff77d03eb789bc49c18d6e74
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-01-07 10:37:33 +00:00
Algea Cao
c9ee08a32f drm/bridge: synopsys: dw-hdmi-qp: Add property to set quant range
quant_range:
	flags: enum
	enums: default=0 limit=1 full=2

Change-Id: I6a4d30c2c45cf744a47f93162fd0f81bed75bc73
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-01-07 10:37:33 +00:00
Sandy Huang
d74f593005 arm64: dts: rockchip: rk3588: add vop aclk_dovi for dolby vision
The dolby core work at 1 pixel rate and the vop work at 2 pixel rate,
so the aclk_vop_doby : aclk_vop = 2 : 1 when enter dolby mode,

Non dovi mode clk tree:
aclk_vop_root            750000000
    aclk_vop             750000000
    aclk_vop_doby        750000000
    aclk_vop_div2_src    375000000

Dovi mode clk tree:
aclk_vop_root            750000000
    aclk_vop_doby        750000000
    aclk_vop_div2_src    375000000
        aclk_vop         375000000

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I649fd6263245a93c67a577262a95d23328880d06
2025-01-07 10:37:33 +00:00
Sandy Huang
16391830d3 drm/rockchip: vop2: add dolby vision supported for rk3588
The dolby vision will be supported by RK3588*-*V* SOCs,
e.g., RK3588S2-DV.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I1e8cf8f0e2b1521b858704df9a88261cec038ebb
2025-01-07 10:37:33 +00:00
Sandy Huang
6cb13bd18d drm/rockchip: vop2: set DRM_MODE_BLEND_PIXEL_NONE as alpha premutli
DRM_MODE_BLEND_PIXEL_NONE usual be set at ARGB format and pixel alpha
is 0xff, no need to do blend, but vop2 platform at the following
scene, the cluster win1 and win0 do blend first, the blend result
with esmart do blend, we can't direct to close layer_mix0, because
the cluster win0 some area will do blend with esmart, so we keep
layer0 mix alpha be enabled and set as premutli mode.

zpos layer
2    cluster win1[ARGB/BLEND_COVERAGE]  -->|
1    cluster win0[ARGB/BLEND_PIXEL_NONE]-->|cluster mix-->|
0    esmart[ARGB/BLEND_PIXEL_NONE]                     -->|layer0 mix

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4ae75a9b443ea965527fd656821016acca35afe1
2025-01-07 10:37:33 +00:00
Sandy Huang
6d1b5beb2b drm/rockchip: vop: use DOVI instead of NEXT_HDR
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib3405d2dff684e3ce1d512fccbb8b1a3bef72151
2025-01-07 10:37:33 +00:00
Sandy Huang
52e0f85d38 drm/rockchip: vop: add crtc dolby vision feature
ROCKCHIP_DRM_CRTC_FEATURE_NEXT_HDR will be instead of by
ROCKCHIP_DRM_CRTC_FEATURE_DOVI,

VOP_FEATURE_NEXT_HDR will be instead of by VOP_FEATURE_DOVI.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ifae130599bc1a966ae316de002df3a1a3fec9d5a
2025-01-07 10:37:33 +00:00
Sandy Huang
497e16fefa drm/rockchip: vop2: reset splice_win at vop2_win_disable()
We only need to ignore rk3588/rk3576 esmart pd turn on/off at
vop2_win_disable(), the following splice win reset should
be run.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I617f73786d93398965f5dcfac32f6fa76ee2e42e
2025-01-07 10:37:33 +00:00
Sandy Huang
ab24b712e1 drm/rockchip: vop2: add support esmart BACKGROUND prop
This may be used by android solid color layer, userspace can set
plane BACKGROUND prop to assigned color, the plane will display
this color and no need to access DDR.

The color value should layout as following:

Enable:
    val = BIT(31) | R << 16 | G << 8 | B;/* R/G/B can be 0 ~ 0xff */

    For example, set a pure red color:
        modetest -w 125:BACKGROUND:2164195328

Disable:
        modetest -w 125:BACKGROUND:0

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie1e077594e385e8ddd244f7c33b6182309a5c134
2025-01-07 10:37:33 +00:00
Wesley Yao
6554f0eb7c iio: dac: rockchip-flexbus-dac: Add write memory barrier
Guarantee the data is written before flexbus starts transmission.

Change-Id: I24e7e1b9e7f0fcd57b9269746251a05801007f3e
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-01-07 10:00:28 +00:00
Wesley Yao
655499e285 iio: adc: rockchip-flexbus-adc: Add read memory barrier
Guarantee flexbus has completed transmission before reading.

Change-Id: I38d600a9feb1c0e586e70ec8cb581f803cf7902d
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-01-07 09:59:53 +00:00
Zefa Chen
072c7b2223 media: i2c: sc450ai fixes error of clk disable twice
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I87fab4101a598a99f20b936a851794049be1e269
2025-01-07 11:18:55 +08:00
Zefa Chen
d5e5e440af media: i2c: sc450ai fixes error of compile
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I7a458a0eecafc22df828727e2cd370e61860aa5b
2025-01-07 11:04:52 +08:00
Damon Ding
f73b02ad8c pwm: rockchip: Unify the process of requesting irq for PWM v1-v4
The irq for PWM v1-v3 used to be exclusively associated with oneshot
mode, but capture mode also needs interrupt, which does not depend on
CONFIG_PWM_ROCKCHIP_ONESHOT.

Change-Id: Iaf0e01ec7c5d02d2d379776cba41841d59c46d20
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-06 10:59:26 +00:00
Shawn Lin
87813ce9aa PCI: dw: rockchip: Remove unused PORT_LOGIC_LTSSM_L2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I382233f963533d93ad582888afe728841515a18b
2025-01-03 16:22:31 +08:00
Hongjin Li
a5d7c37e04 video: rockchip: mpp: mpp_common: Declare function as static in header
Change-Id: Ia5ad136e286d0cfcfe9d3f66db16110eff15d631
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-01-02 19:09:47 +08:00