Skip to content

Commit 21a4706

Browse files
smaeulvinodkoul
authored andcommitted
phy: rockchip-inno-usb2: Handle bvalid falling
Some SoCs have a bvalid falling interrupt, in addition to bvalid rising. This interrupt can detect OTG cable plugout immediately, so it can avoid the delay until the next scheduled work. Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent ffe597d commit 21a4706

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,9 +1345,9 @@ static const struct rockchip_usb2phy_cfg rk3308_phy_cfgs[] = {
13451345
.port_cfgs = {
13461346
[USB2PHY_PORT_OTG] = {
13471347
.phy_sus = { 0x0100, 8, 0, 0, 0x1d1 },
1348-
.bvalid_det_en = { 0x3020, 2, 2, 0, 1 },
1349-
.bvalid_det_st = { 0x3024, 2, 2, 0, 1 },
1350-
.bvalid_det_clr = { 0x3028, 2, 2, 0, 1 },
1348+
.bvalid_det_en = { 0x3020, 3, 2, 0, 3 },
1349+
.bvalid_det_st = { 0x3024, 3, 2, 0, 3 },
1350+
.bvalid_det_clr = { 0x3028, 3, 2, 0, 3 },
13511351
.ls_det_en = { 0x3020, 0, 0, 0, 1 },
13521352
.ls_det_st = { 0x3024, 0, 0, 0, 1 },
13531353
.ls_det_clr = { 0x3028, 0, 0, 0, 1 },
@@ -1388,9 +1388,9 @@ static const struct rockchip_usb2phy_cfg rk3328_phy_cfgs[] = {
13881388
.port_cfgs = {
13891389
[USB2PHY_PORT_OTG] = {
13901390
.phy_sus = { 0x0100, 15, 0, 0, 0x1d1 },
1391-
.bvalid_det_en = { 0x0110, 2, 2, 0, 1 },
1392-
.bvalid_det_st = { 0x0114, 2, 2, 0, 1 },
1393-
.bvalid_det_clr = { 0x0118, 2, 2, 0, 1 },
1391+
.bvalid_det_en = { 0x0110, 3, 2, 0, 3 },
1392+
.bvalid_det_st = { 0x0114, 3, 2, 0, 3 },
1393+
.bvalid_det_clr = { 0x0118, 3, 2, 0, 3 },
13941394
.ls_det_en = { 0x0110, 0, 0, 0, 1 },
13951395
.ls_det_st = { 0x0114, 0, 0, 0, 1 },
13961396
.ls_det_clr = { 0x0118, 0, 0, 0, 1 },
@@ -1512,9 +1512,9 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = {
15121512
.port_cfgs = {
15131513
[USB2PHY_PORT_OTG] = {
15141514
.phy_sus = { 0x0000, 8, 0, 0, 0x1d1 },
1515-
.bvalid_det_en = { 0x0080, 2, 2, 0, 1 },
1516-
.bvalid_det_st = { 0x0084, 2, 2, 0, 1 },
1517-
.bvalid_det_clr = { 0x0088, 2, 2, 0, 1 },
1515+
.bvalid_det_en = { 0x0080, 3, 2, 0, 3 },
1516+
.bvalid_det_st = { 0x0084, 3, 2, 0, 3 },
1517+
.bvalid_det_clr = { 0x0088, 3, 2, 0, 3 },
15181518
.utmi_avalid = { 0x00c0, 10, 10, 0, 1 },
15191519
.utmi_bvalid = { 0x00c0, 9, 9, 0, 1 },
15201520
},

0 commit comments

Comments
 (0)