The infinitely cyclic without CPU intervention use the single desc,
so, should always return DMA_IN_PROGRESS to match its status.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1e104d2eadb5ba2c7271a830fa35a047891562c0
sai mclk is not controlled by sai controller driver but peri device driver,
so set it here for saving system suspend power.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibca621eb2975b06a7fd2d805db06b8dd70ec0596
When the ISR is blocked, it's possible that the original job has already
been released while the scheduler is now running a new job. Therefore,
it is necessary to check whether the current job has already triggered a
hardware interrupt.
Change-Id: If8999b07c76c5217f47419908f20945b6f619e67
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
We may want to know how many size of a gem object is allocated, but
this size in rockchip_gem_object for no-IOMMU devices will not be set.
There are two ways to use rockchip GEMs, one is to create GEMs via DRM,
and the other is to import buffer created by other devices via DMA-BUF
and map it. For no-IOMMU devices, neither of them will set the buffer
size.
Let's set the size in rockchip_gem_object when we create a new rockchip
gem.
Fixes: c1c9524d3f ("drm/rockchip: debugfs: optimize dump buffer file name and size")
Change-Id: I396bf60a0d49d6f703044f9d354aa37312c9cc82
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
In order to support the suspend/resume power supply sequence,
the power supplies are grouped and controlled in stages to enter sleep mode.
Change-Id: I16cb53b01b86a8b221de91a62c5ffddfa34e0f33
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
rockchip_pmx_set reset all pinmuxs in group to 0 in the case of error,
add missing bank data retrieval in that code to avoid setting mux on
unexpected pins.
Change-Id: I5a1943732317002f77e4c0f80ded68952795418e
Fixes: 14797189b3 ("pinctrl: rockchip: add return value to rockchip_set_mux")
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Huang-Huang Bao <i@eh5.me>
Link: https://lore.kernel.org/r/20240606125755.53778-5-i@eh5.me
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
(cherry picked from commit 4ea4d4808e342ddf89ba24b93ffa2057005aaced)
The RK3576 platform doesn't use the dwc3 glue layer
which supports to call dwc3_of_simple_shutdown and
dwc3_remove on system shutdown. Therefore, the RK3576
dwc3 controller still keeps working on system shutdown,
and it may cause pending usb irq if usb transmission
happens when do reboot test.
This patch adds shutdown support for RK3576 platform.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I2cc0764402909fc8c168c0bad75909a8719fce80
Test on RK3576 EVB1, if do tcpci_unregister_port on
husb311_shutdown, it will cause two issues in reboot
test.
1. Introducing unnecessary usb mode initialization
in dwc3 driver, the call trace:
husb311_shutdown -> tcpci_unregister_port -> tcpm_reset_port ->
tcpm_mux_set -> usb_role_switch_set_role -> dwc3_usb_role_switch_set
2. More seriously, if the dwc3 driver is unbind before
husb311_shutdown, it will cause kernel panic.
(1) echo 23000000.usb > /sys/bus/platform/drivers/dwc3/unbind
(2) do reboot
(3) kernel panic with the following log:
Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000010
Mem abort info:
ESR = 0x0000000096000005
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x05: level 1 translation fault
Data abort info:
ISV = 0, ISS = 0x00000005
CM = 0, WnR = 0
user pgtable: 4k pages, 39-bit VAs, pgdp=00000001021ef000
[0000000000000010] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 4 PID: 1 Comm: init Not tainted 6.1.99 #110
Hardware name: Rockchip RK3576 EVB1 V10 Board (DT)
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : usb_role_switch_put+0x24/0x40
lr : tcpm_unregister_port+0x7c/0xd0
...
Call trace:
usb_role_switch_put+0x24/0x40
tcpm_unregister_port+0x7c/0xd0
tcpci_unregister_port+0x18/0x2c
husb311_shutdown+0x80/0xb0
i2c_device_shutdown+0x3c/0x5c
device_shutdown+0x16c/0x21c
kernel_restart+0x3c/0x104
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iab02d60b7e25d0cb086fa486e5f31b30029142ec
1. Support linestate filter time control register for OTG0 and OTG1.
2. Disable disconnect rise and disconnect fall irq. Because these
two interrupts will be triggered immediately after the system goes
into sleep mode, causing the system to be unable to sleep.
Change-Id: Ia6c1e58ef926f86dee6df0013aafe9bfe4586b52
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
The queue nodes will be deleted, the driver cannot get it, add
status "okay" attributes to avoid deletion.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3898d58805f80cddbe5e71a07d9055b66fab651f
This patch sloves following error:
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.o: in function `stmmac_adjust_time':
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:107: undefined reference to `stmmac_calc_tas_basetime'
Change-Id: I929b9df0b72dfd48ef03caa5cec8c6fec14ee4d7
Signed-off-by: David Wu <david.wu@rock-chips.com>
This patch add name-prefix for i2s/pdm to support prefix kcontrol,
widget and route names in an ASoC machine that has multiple dais with
conflicting names.
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: Id48d35f7678000efd3bbf56673768bc5f225dfba
When disable encoder, the encoder.crtc will be reference. In some
case, for example show logo stage, if some config cause a full
modeset, the encoder.crtc will be used before assigned a value,
which will cause a NUll pointer issue.
It's better to use drm_connector_state.crtc to avoid this issue.
Change-Id: I0382eda8a7e25e15b06cefc08ec7be94cf8136ea
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Reset AXI bus to get a clean state, which is conducive to recovering
from exceptions when enable at next time(such as iommu page fault).
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I70e2a119e5abf3399720cc06a083a4468e60a1cb
Simplify the lost threshold config per sample rate.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic032a91ae7c3727f299fdab17acbabe879e57b1d
This reverts commit 89941824ca.
Only used in RK1808/RK3399Pro platform which is probably
not going to be supported on new version. So remove this file.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ied493b9d215f83543d8187be31b4d6f9aa708e7f
Removed leading zeros from I2C unit addresses to match the expected format.
Build warnings as below:
arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dtsi:797.26-808.4:
Warning (unit_address_format): /i2c@ff110000/tc358749x@0f: unit name should not have leading 0s
...
Change-Id: Id1e94a40d2e13a98cb999275d6d7b8edbda238b0
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
The dclk parent for VOP->HDMI must from VPLL, the other can from CPLL.
Fixes: c2395e6617 ("arm64: dts: rockchip: add rk3399 evb ind v11 board support for linux")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iac83d4e1911a07ccd20fc8a5ddbee48f470d06da