Skip to content

Commit 5506018

Browse files
lynxeye-devShawn Guo
authored andcommitted
soc: imx: imx8mp-blk-ctrl: handle PCIe PHY resets
Dessert the PHY reset when powering up the domain and put it back into reset when the domain is powered down. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent a1a5f15 commit 5506018

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/soc/imx/imx8mp-blk-ctrl.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#define GPR_REG0 0x0
2020
#define PCIE_CLOCK_MODULE_EN BIT(0)
2121
#define USB_CLOCK_MODULE_EN BIT(1)
22+
#define PCIE_PHY_APB_RST BIT(4)
23+
#define PCIE_PHY_INIT_RST BIT(5)
2224

2325
struct imx8mp_blk_ctrl_domain;
2426

@@ -81,6 +83,10 @@ static void imx8mp_hsio_blk_ctrl_power_on(struct imx8mp_blk_ctrl *bc,
8183
case IMX8MP_HSIOBLK_PD_PCIE:
8284
regmap_set_bits(bc->regmap, GPR_REG0, PCIE_CLOCK_MODULE_EN);
8385
break;
86+
case IMX8MP_HSIOBLK_PD_PCIE_PHY:
87+
regmap_set_bits(bc->regmap, GPR_REG0,
88+
PCIE_PHY_APB_RST | PCIE_PHY_INIT_RST);
89+
break;
8490
default:
8591
break;
8692
}
@@ -96,6 +102,10 @@ static void imx8mp_hsio_blk_ctrl_power_off(struct imx8mp_blk_ctrl *bc,
96102
case IMX8MP_HSIOBLK_PD_PCIE:
97103
regmap_clear_bits(bc->regmap, GPR_REG0, PCIE_CLOCK_MODULE_EN);
98104
break;
105+
case IMX8MP_HSIOBLK_PD_PCIE_PHY:
106+
regmap_clear_bits(bc->regmap, GPR_REG0,
107+
PCIE_PHY_APB_RST | PCIE_PHY_INIT_RST);
108+
break;
99109
default:
100110
break;
101111
}

0 commit comments

Comments
 (0)