Commit Graph

1268423 Commits

Author SHA1 Message Date
Damon Ding
2001d912e4 pwm: rockchip: fix frequency meter mode configurations
1.Add pinctrl config in rockchip_pwm_set_freq_meter().
2.Add input_sel flag to select the input of io or cru.
3.Use usleep_range() instead of readl_relaxed_poll_timeout,
  because there is no need to poll interrupt status.

Change-Id: I6ea4456539fe143baf2bfce70386c51f801a00a3
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:42 +08:00
Damon Ding
da84900d9b pwm: rockchip: add capture support for pwm v1
1.Select pinctrl state in capture mode.
2.Use usleep_range() instead of readx_poll_timeout, because
  there is no need to poll capture_cnt and the read
  of capture_cnt may be interrupted.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9360a42aca374ed5eb089befd05571c4d32038f2
2024-03-03 11:09:42 +08:00
Damon Ding
4a1608c53a pwm: rockchip: fix the global ctrl configurations
1.Add pinctrl config in rockchip_pwm_global_ctrl().
2.Config the dclk for grant channel in PWM_GLOBAL_CTRL_ENABLE
  and PWM_GLOBAL_CTRL_DISABLE commands.
3.Add flag is_clk_enabled to confirm the status of dclk.

Change-Id: I9a377d6a72d2f242f9df5e707c42d86db0c13f69
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:42 +08:00
Damon Ding
a1f5874163 pwm: rockchip: fix reg shift to macro in version-specific functions
Using macro will be more efficient if related function
is called frequently.

In addition, remove unused parameter cntr in struct
rockchip_pwm_regs for pwm v1.

Change-Id: I7a1d5aa6e08845afc9501756dadacef09f527a13
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:42 +08:00
Damon Ding
fc2656bc0d pwm: rockchip: add debugfs support for pwm v4
Change-Id: I2af2e28a24fd6c034e5b21792baa5641517ab773
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:42 +08:00
Damon Ding
f41ba3a17b pwm: rockchip: add support for rk3576
Change-Id: Ifaaa5b5479ecc98fe09e5e1fac523ba92dd4f8d0
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:42 +08:00
Tao Huang
d9c8121457 arm64: configs: Add rk3576.config
disable CONFIG_MALI_CSF_SUPPORT for rk3576.

Change-Id: Id0b71e03ee808ec4c34b046fc44acf864caccf54
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-03-03 11:09:42 +08:00
Ye Zhang
d2e1994957 thermal: rockchip: Support RK3576 SoC in the thermal driver
The RK3576 SoC has six channels TS-ADC(TOP, BIG_CORE, LITTLE_CORE
DDR, NPU and GPU).

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I800dee18937d3d35243896fe22a953eac111ba3f
2024-03-03 11:09:42 +08:00
Finley Xiao
922c5061d2 driver: rknpu: Add opp data for rk3576
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I947194e9c4770c2cdd0ff0d0bb3e8f1f622abfa1
2024-03-03 11:09:42 +08:00
Felix Zeng
dd7e4afc21 driver: rknpu: Add support for rk3576
Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: I2264165d76be012044663be6fb5c04bc10ed687b
2024-03-03 11:09:42 +08:00
Lin Jinhan
58aeaf2a1d crypto: rockchip: Kconfig: select crypto v4 if RK3576
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I4a1c4e346cda769fa7e91efff2f7a23a8b4ea4be
2024-03-03 11:09:42 +08:00
David Wu
71bd521294 ethernet: stmmac: dwmac-rk: Add GMAC support for RK3576
Add constants and callback functions for the dwmac on RK3576 soc.
As can be seen, the base structure is the same.

Change-Id: If5081998d98a20c6efe14992e00b719ae0ad0dd2
Signed-off-by: David Wu <david.wu@rock-chips.com>
2024-03-03 11:09:41 +08:00
Zefa Chen
b25f38ede4 phy: rockchip: csi2-dphy: support rk3576
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I7a0665bda1a02e8dd74dfa1b2b14bfb3ad43fd82
2024-03-03 11:09:41 +08:00
Algea Cao
8c42cecbaa phy: rockchip-samsung-hdptx-hdmi: Remove phy/pll reset
These are ic debug reset, practically unusable.

Change-Id: Ibc5817ccf9d17abf35d1ff32c2a047866ef1dd2f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-03 11:09:41 +08:00
Kever Yang
19c4dcb933 phy: rockchip-naneng-combo: Support rk3576
phy0: pcie, sata
phy1: pcie, sata, usb3

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I03ffa5b31e5093100beb31c7841ad98265f5d81f
2024-03-03 11:09:41 +08:00
Guochun Huang
cdc22e20a9 phy: rockchip: mipi-dcphy: ref clock of pll cannot be 0
Change-Id: I8add85dc269ae927a96d2ed50524e570eb60320b
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-03-03 11:09:41 +08:00
Guochun Huang
6eeeb8ab7a phy: rockchip: mipi-dcphy: add support rk3576
Change-Id: I08bfe6b2af3dabdf5a8c5993304454a9dd6ca61c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-03-03 11:09:41 +08:00
William Wu
aedf737234 phy: rockchip: inno-usb2: Add usb2 phys support for rk3576
The RK3576 SoC has two independent USB2.0 PHYs, and
each PHY has one port.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I017dd09b83c8330c9f4a3d6d8a41eaa1d4c88df7
2024-03-03 11:09:41 +08:00
Frank Wang
eadf273e38 phy: rockchip: usbdp: add rk3576 device match data
This adds RK3576 device match data support.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I265450a0e515c791771f3e581ea30b0b800b8d08
2024-03-03 11:09:41 +08:00
Finley Xiao
142dd519b5 nvmem: rockchip-otp: Add support for rk3576
This adds the necessary data for handling otp on the rk3576.

Change-Id: I42536b05a24f32d0c98ceebe82aec5af9716513f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-03-03 11:09:41 +08:00
Sugar Zhang
34fa929b18 ASoC: rockchip: sai: Fix stuck on probe
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I459bcd7e4db2396a1e27d13741d6018dd08c63a7
2024-03-03 11:09:41 +08:00
Sugar Zhang
12df5e18d8 ASoC: rockchip: sai: Add support for RK3576
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Icc47d1970afcb4ec9c304952d44267c4c6521d98
2024-03-03 11:09:41 +08:00
Jason Zhu
6d4eba5dd5 ASoC: rockchip: pdm: support pdm version 2
The pdm version 2 support more features:
1. Support gain control
2. Support more pdm clk, like 2.4Mhz
3. Support single channel single data

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3651e4416b30e84f0796a3a09574f39908adbfb5
2024-03-03 11:09:41 +08:00
Jason Zhu
25791b5f4c ASoC: codecs: rk_dsm: support rk3576
Change-Id: Ie9048cc82c015e7eadd41b4ee12e694eea1ccb95
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-03-03 11:09:41 +08:00
Shawn Lin
1505eda5b9 mmc: dw_mmc-rockchip: Add internal phase support
Rockchip platform will put phase settings into dw_mmc controller
instead. For USRID register, 0x20230002 stands for that this new
feature is implemented.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ida9d25f7631fe57b87c70832671973bb97d9f82f
2024-03-03 11:09:41 +08:00
Shawn Lin
3a74e09f5f mmc: sdhci-of-dwcmshc: Add rk3576 support
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I34f1495fb2188a16fba9a6505117e751fc1e98da
2024-03-03 11:09:41 +08:00
Chaoyi Chen
e53dabb0a0 dt-bindings: display: Add Document for Rockchip EINK panel
Change-Id: I542f7a38998a56bf4eab9d79d4c34bd4ad576eae
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-03-03 11:09:41 +08:00
Zhang Yubing
09bbffb298 drm/rockchip: dw-dp: get the real hpd state
In DPTX Controller, when hpd signal is low, the hpd state will
change to unplug immediately. if the low level signal is less
than 2ms, the hpd state will change to plug state and trigger a
hpd irq interrupt.

In some case, driver will detect hpd state to get the plug/unplug
info when a hpd irq is coming. A hpd irq may be regard as a unplug
state. To avoid this issue, it better to wait the hpd state change
to the nest state.

Change-Id: I68c5bdc72128a2bc3ea990cfcb54e2ade755abc7
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-03-03 11:09:41 +08:00
Zhang Yubing
969569b827 drm/rockchip: dw-dp: register mst encoder when port node enabled
Change-Id: Ie242c1a0425a3b01dea1378661a0c18daf3e5d32
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-03-03 11:09:41 +08:00
Sandy Huang
c4642391b1 drm/rockchip: vop2: adjust hfp and hbp for YUV420 output
For RK3576 YUV420 output, hden signal introduce one cycle delay,
so we need to adjust hfp and hbp to compatible with this design.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I272f3e145bfe216b1d76f6313c43180040590deb
2024-03-03 11:09:40 +08:00
Sandy Huang
bcc718e4cf drm/rockchip: vop2: add some debug log for BCSH
Some platform VP can't support BCSH, add some log to remind this info
when userspace want to enable BCSH at unsupported VP.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I8247475edad30e14f08ef8c23e8314916c57a1f4
2024-03-03 11:09:40 +08:00
Zhang Yubing
f07a5c3cf0 drm/rockchip: dw-dp: optimeize disable/enable dp flow
when enable dp, it need config as follow:
1. enable dp link clk;
2. config dp regs;
3. enable dp video stream;
4. enable vop data stream.
when disable dp, it need config as follow:
1. disable vop data steam.
2. disable dp video stream;
3. disable dp link clk.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Icd5407da090f137e02d3028b01576ea157401a8a
2024-03-03 11:09:40 +08:00
Zhang Yubing
77187ba446 drm/rockchip: vop2: support disable/enable vop video stream by interface
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I29dd1033616b80845a83f9125373df3056a9572f
2024-03-03 11:09:40 +08:00
Sandy Huang
ce8f21340f drm/rockchip: vop2: set pre_scan_hblank minimum value to 8
pre_scan_hblank minimum value is 8, otherwise the win reset signal
lead to first line data be zero.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ibef722cd65a9f7e276ba1ffda1d75cac2ac8b83a
2024-03-03 11:09:40 +08:00
Sandy Huang
700e168994 drm/rockchip: vop2: disable writeback auto gating at oneshot mode
At writeback oneshot mode, the writeback auto gating will close clk after
VOP writeback complete, but at this time, the writeback axi access maybe
uncomplete, this will lead to writeback state error and iommu stall failed.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4a74a8ace1cf6dba6d60af822e0d74d31d7f61fa
2024-03-03 11:09:40 +08:00
Sandy Huang
e5f93a3ed6 drm/rockchip: vop2: add support hdmi phy pll for dclk parent
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I07cf03e0c0d075693bcd4388f52b32b2be4c87de
2024-03-03 11:09:40 +08:00
Elaine Zhang
743c572ad8 drm/rockchip: vop2: add rockchip_drm_dclk_set_rate for rk3576
Change-Id: I22257c8a31233dc6bb0617cfb1c816a51ef134e8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2024-03-03 11:09:40 +08:00
Algea Cao
bd6b813ad4 drm/bridge: dw-hdmi-qp: Add hdmi quirks function
Different hdmi sinks have different compatibility issues.
Many of the solutions are conflicting between different sinks,
So special treatment is needed for different sinks.
Only VSI-related quirks are currently supported, new functions
are gradually supported.

Change-Id: I3aaf654424502380d460b3e9d2229a4cdc56dcb1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-03 11:09:40 +08:00
Sandy Huang
6b1476cb36 drm/rockchip: vop2: set reg done every field for interlace
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie003f46f78700a8a01399616619ffaa68f2d7ec9
2024-03-03 11:09:40 +08:00
Algea Cao
0b9ec0ec3c drm/rockchip: vop3: Fix post csc matrix error
Fix vop3_post_csc_config() variable passing
error when property POST_CSC_DATA is NULL.

Change-Id: I628178877dbe16a2697ad716f103725952a3a6fa
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-03 11:09:40 +08:00
Sandy Huang
e2a0c491c8 drm/rockchip: vop2: disable dma access stride 4k
If less this commit, Cluster will be display black and appear
POST_BUF_EMPTY.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ia0505bdb3917624725bb288e089fb88abbe9972e
2024-03-03 11:09:40 +08:00
Sandy Huang
999eaf4dae drm/rockchip: vop2: update default axi id for rk3576
win axi id register is 5 bits, but lut/dci axi id is 4 bits, so lut axi id
should be less then 0xf;

  Cluster0 win0: 0x10, 0x11	[AXI0]
  Cluster0 win1: 0x12, 0x13	[AXI0]
  Cluster1 win0: 6, 7        	[AXI0]
  Cluster1 win1: 8, 9        	[AXI0]
  Esmart0:	 a, b           [AXI0]
  Esmart1:	 c, d           [AXI0]
  Esmart2:	 a, b           [AXI1]
  Esmart3:	 c, d           [AXI1]
  Lut dma rid:	 0x1, 0x2, 0x3  [AXI0]
  DCI dma rid:	 0x4        	[AXI0]
  Metadata rid:	 0x5        	[AXI0]

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If1148aba4ab5242470511b356ee53db9cccef1eb
2024-03-03 11:09:40 +08:00
Algea Cao
3832b4ab01 drm/rockchip: dw_hdmi: Support rk3576 config ddc sda holding time
If hdmi ddc sda and scl fall edge phase difference
is too small, support configure the sda falling edge
in dts.
The delay range is 0-76800 ns.

Change-Id: I116137d8e6b9adac1262a8e658320845281555b5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-03 11:09:40 +08:00
Algea Cao
99433cbd0e drm/rockchip: dw_hdmi: Support hdcp1.4 repeator auth
Change-Id: I0905b4e77c89c6d9020903d00105e7d3eea3cfef
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-03 11:09:40 +08:00
Guochun Huang
53c35ed667 drm/rockchip: dsi2: optimize power-on sequence
1.set dsi lane to LP11 status before powering on the sceen
2.Support for init codes can be transmitted at LP or HS mode
3.HS clk comes out when the high-speed video signal is sent

Change-Id: I192a9b9d6ac3fb0cdbb4b4d462203e97c6427028
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-03-03 11:09:40 +08:00
Sandy Huang
1a3e95ad13 drm/rockchip: vop2: update output mode for rk3576/rk3588 yuv422
RK3588:
    4'b0011: eDP YUV422
    4'b1100: DP YUV422
    4'b1101: DP YUV420
    4'b1110: HDMI YUV420
RK3576:
    4'b1100: eDP/DP YUV422
    4'b1101: HDMI YUV422
    4'b1110: DP/HDMI YUV420

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I8f51ccda820ecba15c1f594794a24138e9348c54
2024-03-03 11:09:39 +08:00
Sandy Huang
fe3cbe40dc drm/rockchip: vop2: esmart port sel config need only consider region0
If less this commit, esmart port sel will be set error val and lead to
esmart register can't take effect, this will lead to like iommu
pagefault issues.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If2c80a683b81d1ad00bdea9f2c09da90a5f55964
2024-03-03 11:09:39 +08:00
Damon Ding
ff9086b3e3 drm/rockchip: vop: fix the configurations of 1to4 function for rk3576
1.Fix the shift of reg grf_mipi_1to4_en to 0.
2.Set grf_mipi_mode to 0(video mode) if using display path
  vopl->1to4->mipi.
3.Add configuration of reg out_dresetn, which should be
  set to 1 if using display path vopl->1to4->edp/hdmi/mipi.
4.Set reg grf_hdmi_1to4_en to 1 if using display path
  vopl->1to4->hdmi.

Change-Id: Ia19725f69382d6b0d2a710c17b9ac1c8a284ddf5
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:39 +08:00
Damon Ding
3965fbfb46 drm/rockchip: vop: enable rb_swap and rg_swap in YUV444 bus_format for rk3576 vopl
The RGB888 bus_format can be converted to VYU444 if r2y
enabled, so it is needed to enable rb_swap and rg_swap
for YUV444.

Change-Id: Ib35398137dcd3c849590ba5243d879c5ef11ccee
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-03-03 11:09:39 +08:00
Algea Cao
0a6460072f drm/bridge: dw-hdmi-qp: Fix timer reference base error
Set timer reference base According to the actual
refclk frequency, otherwise cec or ddc function
may be abnormal.

Change-Id: Id45af649182a5158a47ee2cadb1254f2dc855d52
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-03-03 11:09:39 +08:00