THUNDER_BOOT_ISP is used for snapshot first frame in risc-v, it's
useless for most of products.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Id64c514f9d21671dfae43b7eff927cae861ce733
The nandc's DMA only supports 32bits. When the DDR capacity exceeds 4GB,
It need to configure DMA mask to 32bits and use API dma_map_single to
get the physical address.
Change-Id: I1510f7bbe2779ea20ff83a93e3a4dabb941263e3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Clear irq status first then handle the udma interrupt.
Change-Id: I3638524b7bd09ad21a431bfebd3ba0b5bfbe7b8e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
RK3568 USB DWC3 controllers require to disable receiver detection
in P3 for correct detection of USB devices. And this quirk to set
the GUSB3PIPECTL.DISRXDETINP3, then the DWC3 core will change the
PHY power state to P2 and then perform receiver detection. After
receiver detection, the DWC3 core will change the PHY power state
to P3 state.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iaad3f7ce2c4dee1788539781e3bcfbb39458f5d6
When do uvc hotplug test on RV1126 EVB, it may crash in the
uvc_v4l2_streamon() with the following error log. Because
it tries to enable the video stream after usb disconnect.
[ 1748.947755] configfs-gadget gadget: uvc_function_disable
[ 1748.947947] android_work: sent uevent USB_STATE=DISCONNECTED
[ 1748.955347] Unable to handle kernel NULL pointer dereference at virtual address 00000003
[ 1748.956158] pgd = ef2a7e72
[ 1748.956550] [00000003] *pgd=6dde7835
[ 1748.956893] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 1748.957381] Modules linked in: galcore(O) bcmdhd
[ 1748.957819] CPU: 3 PID: 2706 Comm: uvc_gadget_pthr Tainted: G W O 4.19.111 #9
[ 1748.958567] Hardware name: Generic DT based system
[ 1748.959218] PC is at uvcg_video_enable+0xb8/0x228
[ 1748.959775] LR is at vb2_core_streamon+0x11c/0x15c
......
[ 1749.041063] [<b056a2cc>] (uvcg_video_enable) from [<b0569968>] (uvc_v4l2_streamon+0x28/0x70)
[ 1749.041906] [<b0569968>] (uvc_v4l2_streamon) from [<b0590b54>] (__video_do_ioctl+0x1c8/0x3a0)
[ 1749.042681] [<b0590b54>] (__video_do_ioctl) from [<b0594288>] (video_usercopy+0x200/0x494)
[ 1749.043475] [<b0594288>] (video_usercopy) from [<b0220c38>] (do_vfs_ioctl+0xac/0x798)
[ 1749.044178] [<b0220c38>] (do_vfs_ioctl) from [<b0221358>] (ksys_ioctl+0x34/0x58)
[ 1749.044843] [<b0221358>] (ksys_ioctl) from [<b0101000>] (ret_fast_syscall+0x0/0x4c)
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I6bb58133aaade0ff389fa4af2cfc05fe598de250
Some linux display framework will set display area out of display mode,
this is incorrect config and will lead vop iommu pagefault, we add this
commit to avoid vop pagefault and output error info.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I50f9c93d807858b8939038aae9915b4895fe35e2
RK3568 usb phy0 and phy1 linestate irq can be set as
wakeup source, but the default linestate filter time
is based on the usb phy grf pclk 100MHz. So it needs
to reconfigure the linestate filter time base on 32KHz
clk when enter deep sleep.
In addition, it needs to enable the host port (usb3
host1 and usb2 host1) wakeup irq because of legacy
reason.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I9151d49721e8e9d917fdb51228f3ca2627090156
This value is better to be 0x10 instead of 0x16 by new test report
to keep all RK356x work consistently.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I87a22f6e02a6206981fe484db353613ac9a3ede6
Since the MMU base is not shifted forward, when the sync/async mode
is called together, the same memory is used to store the page table,
resulting in data errors.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If4807da8159e98a8d807cc24b4d6533793eeefa8
1.max_dll_cells is 0x1FF when sfc_ver_4
2.sfc_set_delay_lines to zero means disable dll
3.bypass dll training when there is no device
4.Adjust the dll_value to from the middle of the dll window to
the better one
5.Change RKSFC_DLL_THRESHOLD_RATE to ">50MHz"
Change-Id: Ibd669420899925272c74e190fee8c62c09db8d14
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
The rv1126-snapshot products aim to capture the camera frames as soon
as possible, that use RISC-V to get the camera frames after 'fastae'.
Change-Id: I62fc197279e9188c87616f0cbbaa747b05042e1b
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
There is no need to call dw_hdmi_setup() when atomic_check.
dw_hdmi_color_changed() will check if color format changed and
call a mode_set.
If call dw_hdmi_setup() to enable hdmi when the first plug in
atomic_check, HPLL has not been configured in rk356x, there will
be display err in some monitor.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I83f3d1d3ff45e3e07910449d8d03f94b82fc0abe
DIGEN_CLKE can only be controlled when the amplifier is turned off
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I5758cab8f20bd2ede008d1ad138cdadcaa55e39d
This reverts commit 42256c1a8f will lead to
DMA buffer + IOMMU free buffer error:
when we use DMA continue buffer, we have the following two use case:
case 1: DMA + IOMMU, we have two addr
alloc:
dma_handle = dma_alloc_attrs()
dma_addr = rockchip_gem_iommu_map() --> config to vop register
free:
rockchip_gem_iommu_unmap(dma_addr)
dma_free_attrs(dma_handle)
case 2: DMA + no IOMMU, we have one addr
alloc:
dma_handle = dma_alloc_attrs()
dma_addr = dma_handle --> config to vop register
free:
dma_free_attrs(dma_handle)
After convert this commit, we still fix the dma_free_attrs() parameter
error at rockchip_gem_alloc_dma(), detail:
...
dma_free_attrs(drm->dev, obj->size, rk_obj->kvaddr,
old: rk_obj->dma_addr, rk_obj->dma_attrs);
new: rk_obj->dma_handle, rk_obj->dma_attrs);
...
Change-Id: I3c05d632b42e09b082d7e378dc7510548a794727
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Video output device is images from user space to the driver,
Sequence set to 0 default when fill vb2 buffer. For driver maybe
need image sequence information.
Change-Id: I34f39a98c6fa8dfa1ea2c45cfa7e6b20114236a3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
The mclk iomux operation should be done on RISC-V stage.
Change-Id: I392ef059bae44e3432ac97dd40c644c43766a1ba
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Commit 6de4caa7df ("arm64: dts: rockchip: rk356x-evb: fix pcie supply
to regulator-fixed") cleanup these stuff but we still have some left.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I29ebb92cc3dd0eaccfa610c7d526e46a0c33f320
This patch place parentheses around 'x' to silence potential warning.
Change-Id: I7c6cd70c03f71e85bd39faa092f2d0eb61409431
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
When do charge detection, the phy specification suggests that
it needs to holds the phy in reset state to avoid USB data
communication. However, the utmi clk60_30 will be disabled at
the same time, that's causing a synchronization issue between
the phy and the USB controller.
I test on RV1126 EVB Linux SDK, do usb device hot plug test
quickly. The USB dwc3 controller may fail to enable ep0 because
of no clk60_30 is supplied by the phy.
This patch sets the phy utmi in normal mode by GRF to keeps the
utmi clk on for USB controller.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I8958a491130faeb9ac361b8639e4c3d3190fad1b
When the related print appears, it means that the SDK is too old
and the storage driver needs to be updated.
Change-Id: I63f45fba4cf52108c628f225ee23aa0819ca256f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
make sure vop power is enabled before use priv function crtc_close() to
close current crtc plane.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I928e5f0f38692fbb8a134e6938ec28f8c1f41285
overlay mode: black and white use du framecount,
to fix trailing smear when draw line on grey background
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: If02bd8edb0c02a159a5359a231b487b09dfd26d2
When area0 is disabled, all other sub multi area must be
disabled, or the win may run into unexpected situlation:
such as post_buf_empty or iommu fault.
Change-Id: I8a92e45849cfc31af029ba0e86562751be92ddbd
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
HDR window is fixed(not move in the overlay path with port_mux change)
and is the most slow window. And the bg is the fast. So other windows
and bg need to add delay number to keep align with the most slow window.
The delay number list in the trm is a relative value for port_mux set at
last level.
Change-Id: I731b909c0a3f483be081e16610536b4ce5b9b8b0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
DPTX implements the programmable SSC down-spreading with up to
0.5% modulation amplitude and 30k/33k modulation frequency.
Change-Id: I2c3eae8f27c84eb1b22eac8973691e0276c1588e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
ddr clk using SCMI that it no longer need sclk_ddrc.
Change-Id: I5cee84896083610d9b1a5bc6bcd23ac628ec5c73
Signed-off-by: YouMin Chen <cym@rock-chips.com>