If dynamic dptx power domain ctrl is enabled and dptx power
domain not enabled when init dptx controller, the dptx power
domain will be disabled though the uboot logo is enable. this
will cause display issue. To avoid this issue, it need enable
dptx power domain when enable uboot logo.
Change-Id: I3105556de3dee5e592242150935133cce0971551
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Fix the modpost error "device_is_dependent" undefined by
adding device_link in ehci_platform_priv.
Fixes: 68850661b5 ("usb: host: ehci-platform: Add device_link between the ehci and companion")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0552eab4cc45750e0c4ea494880667a29998f6b0
1. Select the usb2 phy interrupt logic clock from OSC clock
to support interrupt detection if VD_LOGIC is powerdown.
2. Set the linestate filter time control register depends
on the OSC 24MHz clock during suspend.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ib265747013b0a08dc0599df25e40dce306ccb289
For IOMMU devices, the mapped size may be larger than the requested
alloc size, which may result in inconsistent sizes being used for
unmap.
[ 12.286016] iova: 0x0000000000000000 already mapped to 0x000000000c201000 cannot remap to phys: 0x000000001369f000 prot: 0x3
[ 12.287163] [drm:rockchip_gem_iommu_map] *ERROR* failed to map buffer: size=-98 request_size=4096
[ 12.299439] iova: 0x0000000000000000 already mapped to 0x000000000c201000 cannot remap to phys: 0x000000000c2b8000 prot: 0x3
[ 12.300541] [drm:rockchip_gem_iommu_map] *ERROR* failed to map buffer: size=-98 request_size=2785280
Fixes: 2ba5e1d681 ("drm/rockchip: gem: Set size of the allocated object when create gem")
Change-Id: I3496544e5a4eb65dde657f8ed3890f4db933258f
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
200M is not an integer frequency.
300M is more suitable.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7a6ce23a47691fbdc6180f9cb63b832950bc2f59
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>