diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index fa40f51e469d..008567cff71e 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -1060,8 +1060,16 @@ static int rk_pcie_resource_get(struct platform_device *pdev, if (IS_ERR(rk_pcie->apb_base)) return PTR_ERR(rk_pcie->apb_base); + /* + * Rest the device before enabling power because some of the + * platforms may use external refclk input with the some power + * rail connect to 100MHz OSC chip. So once the power is up for + * the slot and the refclk is available, which isn't quite follow + * the spec. We should make sure it is in reset state before + * everthing's ready. + */ rk_pcie->rst_gpio = devm_gpiod_get_optional(&pdev->dev, "reset", - GPIOD_OUT_HIGH); + GPIOD_OUT_LOW); if (IS_ERR(rk_pcie->rst_gpio)) { dev_err(&pdev->dev, "invalid reset-gpios property in node\n"); return PTR_ERR(rk_pcie->rst_gpio);