Commit Graph

1073350 Commits

Author SHA1 Message Date
Jon Lin
246e60c8a0 mtd: spinand: Support skyhigh
S35ML02G3, S35ML04G3

Change-Id: Ie6b0bbba85bb6d646af3534b10107e8efb84a62a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-03 18:07:33 +08:00
Jon Lin
3366823ee0 mtd: spi-nor: xtx: Support xt25q64d xt25q128d
Change-Id: Ic41720b2602447e871ed5fffe39883662ba8a6c2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-03 18:07:33 +08:00
Yandong Lin
98fe9965cc video: rockchip: mpp: fix access null task exception issue
Unable to handle kernel read from unreadable memory at virtual address 0000000000000000
Mem abort info:
  ESR = 0x96000005
  Exception class = DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
Data abort info:
  ISV = 0, ISS = 0x00000005
  CM = 0, WnR = 0
user pgtable: 4k pages, 39-bit VAs, pgdp =00000000c9324dfa
[0000000000000000] pgd=0000000000000000, pud=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: rk_vcodec bcmdhd [last unloaded: rk_vcodec]
Process queue_work0 (pid: 3128, stack limit = 0x00000000044997c1)
CPU: 2 PID: 3128 Comm: queue_work0 Not tainted 4.19.232 #439
Hardware name: Rockchip RK3528 EVB1 DDR4 V10 Board (DT)
pstate: a0400085 (NzCv daIf +PAN -UAO)
pc : __wake_up_common+0x58/0x170
lr : __wake_up_common_lock+0x90/0xe0
sp : ffffff801101bc50
x29: ffffff801101bc50 x28: 0000000000000000
x27: 0000000000000000 x26: 0000000000000003
x25: ffffffc043c62d70 x24: 0000000000000001
x23: ffffffc043c63908 x22: ffffff801101bcf0
x21: 0000000000000003 x20: ffffffffffffffe8
x19: 0000000000000000 x18: 0000000000000030
x17: 0000000000000000 x16: 0000000000000000
x15: ffffffffffffffff x14: 766365725f727369
x13: 5f6b6e696c5f6365 x12: 00000000000001d8
x11: 0000000000000000 x10: 0000000000000000
x9 : 0000000000000000 x8 : 0000000000000000
x7 : ffffffc07f75f340 x6 : 0000000000000000
x5 : ffffff801101bcf0 x4 : 0000000000000000
x3 : 0000000000000000 x2 : 0000000000000001
x1 : 0000000000000003 x0 : 0000000000000000
Call trace:
 __wake_up_common+0x58/0x170
 __wake_up_common_lock+0x90/0xe0
 __wake_up+0x14/0x20
 rkvdec2_link_worker+0xda4/0x12dc [rk_vcodec]
 kthread_worker_fn+0xbc/0x180
 kthread+0x12c/0x160
 ret_from_fork+0x10/0x20

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I5129a1a52ffcf71775410c446ece4b5e85b812cc
2023-01-03 16:35:00 +08:00
Jon Lin
ecfc92e986 spi: rockchip: Remove useless limitation for cs inactive property
The cs inactive interrupt status is effective in both irq and dma
transmission processes.

Change-Id: I6581e8dd74f70aa1c69b888a4acae7c03351b4fd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-02 14:51:01 +08:00
Jon Lin
432666b59b phy: rockchip: naneng-combphy: add support rk3528
1. The layout of controller registers has changed, remove legacy config;
2. Using the default value for grf register;
3. sync to use rk3568 parameter for phy PLL, signal test pass
4. Add 24MHz refclk for rk3528 PCIe, Enable the counting clock of the
rterm detect by setting tx_trim[14] bit for rx detecting.
5. set SSC modulation frequency to 31.5KHz

Change-Id: I45742c416d452037e61b7a7b8765269931d56402
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2022-12-30 17:19:19 +08:00
Jianwei Zheng
197562a087 phy: rockchip: inno-usb2: support usb wakeup for rk3528
This patch set the linestate filter time to support wakeup for
rk3528. Different from other platforms, Both the otg port and
host port have linestate_filter_con register, so we need to set
them separately.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: I4a78dccbdb73c48436876b72e106a2eb608ea99d
2022-12-30 17:19:19 +08:00
Jianwei Zheng
7c24d9902e phy: rockchip: inno-usb2: add usb2 phy support for rk3528
This patch add usb2 phy support for rk3528 and modified the
rk3568_vbus_detect_control as a universal interface due to
more and more platforms may use this interface in the future.

Usb2 phy also has one different design for rk3528. It doesn't
has commonon control bit, we found that there is a phy inner
debug register which can control the pll out. So we can use
this register to support phy pll control for rk3528.

Add usb2 phy tuning for rk3528:

1. Turn off differential receiver in suspend mode for
   the otg and host port to save power consumption.

2. Choose the Tx fs/ls data as linestate from TX driver
   for otg port which uses dwc3 controller to improve
   fs/ls devices compatibility with long cable.

3. Enable both the otg and host ports phy irq to pmu
   wakeup source.

4. Set HS eye-height to 400mV for rk3528

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: Ia4a861bccd6a37db4e1ba42cede66a6b07947b5d
2022-12-30 17:19:19 +08:00
Jon Lin
a786cb4a0b spi: rockchip: Mask cs inactive interrupt after dma finished
The cs inactive logic can always be triggered when the controller
is working, so the interrupt may be triggered when processing the
dma transmission completion interrupt.

Change-Id: I529140e43125ff3a06da67604a17afb585aafd72
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-12-30 14:51:56 +08:00
Jon Lin
0c670d9d98 spi: rockchip: Only check stb bit for spi slave write completion
The SPI_SR->busy is invalid for SPI slave write with ip version
ROCKCHIP_SPI_VER2_TYPE2.

Change-Id: Ib5d04a1a7859d7d47e5162f1db58f110dda8bad4
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-12-30 14:51:56 +08:00
Jon Lin
f4a2303e6f mtd: spinand: foresee: Fix the way to program load cache
There are many restrictions on the use of the foresee devices Program
Load Random Data (84H), for example it's not allow after a block erase.

Change-Id: I345757016aa9b4c70b6cd5cca54f49166bb9dd99
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-12-30 14:36:50 +08:00
YouMin Chen
97c00cc207 PM / devfreq: rockchip_dmc: support configure wait_mode for rk3588
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I2a5a4c24133e9018450ce0810556b3c30ef4f74a
2022-12-29 15:11:50 +08:00
Cai YiWei
3175c9a26f media: rockchip: isp: fix isp32 vflip config
Change-Id: If3113a66608753173353ff96eabacec517705981
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-29 14:49:25 +08:00
Cai YiWei
846b7640cf media: rockchip: isp: fix ldch err
Change-Id: I6b8e2beb068343823fe46a96a4384f3159ae960f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-29 14:49:25 +08:00
Sandy Huang
13bc82b203 drm/rockchip: drv: add api to get scane line time for DMC
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id7b5ab9579c47a8475382f8dba40c9938845a2ca
2022-12-29 13:54:22 +08:00
Sandy Huang
9310ffb31b drm/rockchip: vop2: add support vop state to triggle DMC
VOP will triggle DMC at the following condition:

wb_en && wb_dma_finish && (vp lineflag || vp post full)

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2ec972d74f7c8eab0088fcd96dc394e0d554020e
2022-12-29 13:54:21 +08:00
Damon Ding
b1aaf80222 drm/rockchip: tve: add support for rk3528
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6d9cbfdd19ad37bad9ae88f84911a8ee23c85f5a
2022-12-28 16:57:07 +08:00
Yu Qiaowei
0a7cd35e38 video: rockchip: rga3: disable memory when RGA power off to save power
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6499783fff415dcf62b03f44d1736157ae04eedf
2022-12-28 16:53:47 +08:00
Yu Qiaowei
e647074c1c arm64: dts: rockchip: rk3528: add grf for RGA node
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie1849435327b91eb7d4457bb7f6260d4db0461f5
2022-12-28 16:53:47 +08:00
Sandy Huang
9cb660cf9c drm/rockchip: vop3: sync with kernel 4.19
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I11c5491e51b0159ddfa8da778fe77cc9c617450b
2022-12-28 15:07:18 +08:00
Zhang Yubing
a7a63a477c drm/rockchip: vop3: support acm and csc
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I743ac4f78196b014e282c98a717de797050ca2c6
2022-12-28 15:07:18 +08:00
Zhang Yubing
e606ea2bbe drm/rockchip: vop3: add support hdrvivid
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I741ed74b38ea431e03bacacf1300793a9e2660f5
2022-12-28 15:07:18 +08:00
Sandy Huang
10e7cc72b7 drm/rockchip: vop3: add support rk3528
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iaea5ccff625c0bc8d0cfe0d81a90b193c26c06b1
2022-12-28 15:07:18 +08:00
Algea Cao
3ed8bec2c8 drm: bridge: dw-hdmi: Fix hpd wake up loop calls
For compatibility with gki, dw-hdmi use callback
function instead of direct call dw-hdmi-cec wake up function.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I06fb65eadead5e3395bbd69a4dd465c95c684494
2022-12-28 14:47:16 +08:00
Sandy Huang
8a6ca5d2c7 arm64: dts: rockchip: add RK3528 evaluation board devicetree
Add some board files for RK3528 SoCs:

rk3528-evb1-ddr4-v10.dts is for android platform,
rk3528-evb1-ddr4-v10-linux.dts is for linux platform.
add evb2/evb3/evb4.

evb1: gmac0 + 100M Embed PHY, gmac1 + 1000M RGMII PHY
evb2: gmac0 + 100M Embed PHY
evb3: gmac0 + 100M Embed PHY
evb4: gmac0 + 100M Embed PHY, gmac1 + 1000M RGMII PHY

The evb1 & evb2 & evb4's pa-ctl-gpios are same. But the evb3
is different.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Lin Qihao <kevin.lin@rock-chips.com>
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Zou Dengming <marsow.zou@rock-chips.com>
Signed-off-by: Shaohan Yao <shaohan.yao@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Id08f7e353159cfd38e3fab7912771db792f4b1ba
2022-12-27 16:39:17 +08:00
Algea Cao
54abe82fdc drm: bridge: dw-hdmi: Fix hdmi no output signal when hpd occur in kernel logo
If the hdmi is plug out during the kernel logo phase and
hwc is not initialized, the hpd event cannot be received,
hdmi will not be disabled. Even if the hdmi is plugged in,
it will not actually be reinitialized, resulting in no signal output.
In this status, kernel must set mode_changed flag to true that
disable/enable hdmi when hwc enable hdmi.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I6aa0e8d7c3126b329d591de82a8fb91ec3f67f70
2022-12-27 14:59:55 +08:00
Algea Cao
9751314d63 drm: bridge: dw-hdmi: Add picture_aspect_ratio for HDMI 1.4 4K modes
Kernel 4.19 edid parse process does not add picture_aspect_ratio
for HDMI 1.4 4K modes. This does not match uboot next-dev, that
will cause kernel logo display error.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I1b81f9b9c30ed86e671e2aa8b4a3d498e07c9410
2022-12-27 14:59:54 +08:00
Algea Cao
f1583e326a drm/bridge: synopsys: dw-hdmi: Achieve the same frequency color seamless switch
When the frequency before and after color switching is the
same, the resolution switching process is not performed.
Instead, go through the following process:

connector atomic check--->set avmute--->config hdmi controller
-->config vop-->connector atomic commit-->clear avmute.

This way the HDMI output will not be interrupted, the black
screen time will be shorter, and the user experience will be
better.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: If2d0d9d21c2c343cd8e2b5135b214bc1a6f6706c
2022-12-27 14:59:54 +08:00
Algea Cao
52c123bfd4 drm/rockchip: vop2: Move color cfg to atomic_flush
In order to switch HDR/SDR output status without
enable/disable CRTC, VOP color config should be
done in atomic_flush.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic8baee19e41ac7379699bbca21667be00e7e5934
2022-12-27 14:59:54 +08:00
Algea Cao
88ea93aeb0 drm/rockchip: Introduce connector commit
In order to achieve seamless HDR switching, avmute
must be unmuted after VOP atomic flush. So we
introduce connector commit.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ibf11da67c4388f50d8fa34aa5b4902a45ef89f6f
2022-12-27 14:59:54 +08:00
Algea Cao
3882773b0d drm: bridge: dw-hdmi: Support rk3528 hdp wake up
Support system wake up if hpd pin gpio irq occur when hdmi plug in.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5a3896e8b1b86bccbda6681db26ab4285e3eec72
2022-12-27 14:59:54 +08:00
Algea Cao
0a8b81fb3f drm: bridge: dw-hdmi: Support cec wake up
If cec in standby status, cec wake up interrupt will be
triggered when specific cec message is received.
Then input power key event to wake up system.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I91b4482ab78f91e5e9df66fa8384e118b08f35a2
2022-12-27 14:59:54 +08:00
Algea Cao
378d1905a2 drm/bridge: synopsys: dw-hdmi: Fix hdr mode abnormal color
1.Add support rgb bt2020 color space output.
2.Set AVI YQ to limited range.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I0a7d1ecbf2ab002328c8e6bcb115753e17e4bbb9
2022-12-27 14:59:53 +08:00
Algea Cao
5e211fd067 drm/rockchip: dw_hdmi: Workaround for RK3528 hdmi hpd
RK3528 hdmi hpd 5v io is always being pulled down.
This workaround is set hpd 5v io to gpio function and
receive hpd signal from sink.

When hpd status is changed, gpio interrupt will trigger,
then set the hdmi_snk_det reg to change the hpd status of
the hdmi controller. Finally trigger the hpd interrupt
of the hdmi controller.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iac5140a09d3dda172f0125a25dbc8b281c8e0fa5
2022-12-27 14:59:53 +08:00
Algea Cao
e528f6340a phy: rockchip: inno-hdmi: Support rk3528 hdmi phy
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ie555fa26eb482e045cf97e72f6f396526df3c257
2022-12-27 14:59:53 +08:00
Algea Cao
5bc64913bd drm/rockchip: dw_hdmi: support rk3528 hdmi
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I1b12b2d30c84065b9f5873b015898dc5bcbbf48f
2022-12-27 14:59:53 +08:00
Damon Ding
9578f65f39 ARM: dts: rockchip: rv1103g-evb: add sii902x bt656 to hdmi board
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I09a254df6c78c699fcea2ac4d3fae253d35634c8
2022-12-27 10:57:13 +08:00
Damon Ding
f1a9a74336 ARM: dts: rockchip: rv1103g-evb: add rv1103g-evb-mcu-display-v11 board
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I025821484772b5dca9cf5c728c131caeddc50c40
2022-12-27 09:43:35 +08:00
Cai YiWei
b819ded322 media: rockchip: isp: wrap width and height config by user
Change-Id: I5090f57f4231da2af258991b264e8f91a46b5adb
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-27 09:15:01 +08:00
David Wu
9499956474 dt-bindings: net: rockchip-dwmac: add rk3528 compatible string
Add compatible string for Rk3528 gmac, and constrain it to
be compatible with Synopsys dwmac 4.20a.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I63d79df0812b5d2a40664aadc1ae36e6b2f9534a
2022-12-26 16:10:14 +08:00
Wyon Bi
9e8c381e3e phy/rockchip: samsung-hdptx: Fix link train EQ failed
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I72b78e063eb014e756ba9d39d9e79909a09dce5e
2022-12-26 15:38:01 +08:00
David Wu
61c0ac4317 ethernet: stmmac: dwmac-rk: Add GMAC support for RK3528
Add constants and callback functions for the dwmac on RK3528 Soc.
As can be seen, the base structure is the same. In addition, there
is an internal phy inside with Gmac0.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I8a69a1239ed3ae91bfe44c96287210da758f9cf9
2022-12-26 15:29:41 +08:00
David Wu
e083b1d684 ethernet: stmmac: dwmac-rk: Prepare for support more FEPHY
Use a common interface to implement power up/dowm for FEPHY,
which we could reduce codes.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ia7b42862abb20ea7395d6dad021621c8e1ededb9
2022-12-26 15:29:09 +08:00
Yiqing Zeng
976e5bf438 ARM: dts: rockchip: rv1106-evb-cam: change sc530ai to 2lane
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Id9869b58421fab69e6814fea71d2ad43f2a54228
2022-12-26 15:25:42 +08:00
Damon Ding
1af1e11e66 ARM: dts: rockchip: rv1106: add pinctrl for rgb3x8
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Id865d56828eb5ff111fde1706a7438469fa16448
2022-12-26 15:10:18 +08:00
Chen Shunqing
1cf5f10498 media: rockchip: hdmirx: fix cec hpd event was not received
Change-Id: Ib9ce30d1edf71ceddf9cb9cbf6a657f5ecb7aa05
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2022-12-23 15:44:26 +08:00
Chen Shunqing
737ce0c6a6 media: rockchip: hdmirx: map to physical address 0
Change-Id: I7a9492c38fb514f1747ae6d4f28dcd583cc7814b
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2022-12-23 15:44:26 +08:00
Sugar Zhang
32306b2e23 arm64: configs: rockchip: Enable CONFIG_SND_SOC_ROCKCHIP_SAI
This patch enable SAI which act as I2S/PCM/TDM, and much more
flexible protocol.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie1295825040ebbd9dd3848ed1c961f616e52a60f
2022-12-23 15:39:17 +08:00
Sugar Zhang
bd28b0a474 arm64: configs: rockchip_linux: Enable CONFIG_SND_SOC_ROCKCHIP_SAI
This patch enable SAI which act as I2S/PCM/TDM, and much more
flexible protocol.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I14b5f0ba183dddfdb97cf3365057e08201487d7c
2022-12-23 15:39:17 +08:00
Sugar Zhang
bfc169fd30 ASoC: rockchip: sai: Set maxburst per FIFO waterlevel
Set dma maxburst per FIFO waterlevel for better performance
on high bit-rate situation, such as 192k 8ch 32bit situation.

Change-Id: Ida94609185b97c31bbfbb02ed65961c90f3d30f3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-12-23 15:35:10 +08:00
Sugar Zhang
9f0c3c0661 ASoC: rockchip: sai: Add support for LANE-Auto mode
This patch allow driver to set lanes auto depends on
common-use format, such as I2S, DSP_A, DSP_B etc.

And allow user to select lanes manually as required,
such as TDM32 x 4

Change-Id: If6adb2bded38faa3462c52286602506f991cc0e5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-12-23 15:35:10 +08:00