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
Set these gpios to right state for system low power.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8e030a872209f9955834aab008b8059f4fb2d507
And update naming 'dsm_audmX_pins' by generating file and using
ioc1 base for dsm-audm0 iomux switching only by default.
Change-Id: I4791a464513bc36ff277abecf98ea4b1ee65a2fa
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
The LP/LN and RP/RN differential pairs of rkdsm should keep
in the same direction as much as possible when working and
shutting down, otherwise the common mode output is likely
to cause pop sound.
Therefore, we can introduce the ioc register address as REG
resource in dts, and switch the dsm pin to function and io
state respectively when dsm starts and stops.
Change-Id: I4a3e6f5e45f030fdbab74ee7d9a769fc8d77f86d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
1.add data reset after video enable
2.fix mipi dphy reset before dphy init
Change-Id: I003f1c99563dc658f4bbff706de84668e24161d2
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
This reverts commit e15707617c.
This need the system to rmmod wireless ko before suspend, otherwise even if
the power is down but removing wakeup will call the sub-device driver to
broadcast this uevent to the userspace which prevent the system from into
suspend. Whether to rmmod wireless driver is system depend, so revert this
commit.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9f0467a7403c1f18820a89ae4707d3bd469910a6
rk3399 vop lite can't support afbc, so remove afbc support from
win feature.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3ccdc2a821bc97fd4993688c61b776c1c77d0cb9