Skip to content

Commit 45d113a

Browse files
author
Frank Wang
committed
phy: rockchip: inno-usb2: add linestate filter config for rk3588
For linestate irq as a wakeup source, we need to reconfigure the linestate filter value base on 32KHz clk at suspend time, and restore it to the default when the system resume. By the way, set the grf to handle the phy status when the system suspend, which can support the linestate wakeup even the PD of the USB controller was off for RK3588 OTG1 port. Signed-off-by: Frank Wang <[email protected]> Change-Id: I630855981082298d079d9c713029a7e3093b09cd
1 parent af77c1d commit 45d113a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/phy/rockchip/phy-rockchip-inno-usb2.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,7 @@ static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
34203420
.num_ports = 1,
34213421
.phy_tuning = rk3588_usb2phy_tuning,
34223422
.clkout_ctl = { 0x0000, 0, 0, 1, 0 },
3423+
.ls_filter_con = { 0x0040, 19, 0, 0x30100, 0x00020 },
34233424
.port_cfgs = {
34243425
[USB2PHY_PORT_OTG] = {
34253426
.phy_sus = { 0x000c, 11, 11, 0, 1 },
@@ -3473,10 +3474,10 @@ static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
34733474
.num_ports = 1,
34743475
.phy_tuning = rk3588_usb2phy_tuning,
34753476
.clkout_ctl = { 0x0000, 0, 0, 1, 0 },
3477+
.ls_filter_con = { 0x0040, 19, 0, 0x30100, 0x00020 },
34763478
.port_cfgs = {
3477-
/* Select suspend control from controller */
34783479
[USB2PHY_PORT_OTG] = {
3479-
.phy_sus = { 0x000c, 11, 11, 0, 0 },
3480+
.phy_sus = { 0x000c, 11, 11, 0, 1 },
34803481
.pipe_phystatus = { 0x0034, 3, 2, 0, 2 },
34813482
.bvalid_det_en = { 0x0080, 1, 1, 0, 1 },
34823483
.bvalid_det_st = { 0x0084, 1, 1, 0, 1 },
@@ -3524,6 +3525,7 @@ static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
35243525
.num_ports = 1,
35253526
.phy_tuning = rk3588_usb2phy_tuning,
35263527
.clkout_ctl = { 0x0000, 0, 0, 1, 0 },
3528+
.ls_filter_con = { 0x0040, 19, 0, 0x30100, 0x00020 },
35273529
.port_cfgs = {
35283530
[USB2PHY_PORT_HOST] = {
35293531
.phy_sus = { 0x0008, 2, 2, 0, 1 },
@@ -3545,6 +3547,7 @@ static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
35453547
.num_ports = 1,
35463548
.phy_tuning = rk3588_usb2phy_tuning,
35473549
.clkout_ctl = { 0x0000, 0, 0, 1, 0 },
3550+
.ls_filter_con = { 0x0040, 19, 0, 0x30100, 0x00020 },
35483551
.port_cfgs = {
35493552
[USB2PHY_PORT_HOST] = {
35503553
.phy_sus = { 0x0008, 2, 2, 0, 1 },

0 commit comments

Comments
 (0)