Commit a39d44763e77addca5b8d43bab4c7a5522b38b36

Authored by Teo Hall
Committed by Ye Li
1 parent 1aeb9d4e29

MLK-18199: Power up HSIO GPIO before first access

For correct PCIE operation the HSIO GPIO must also be powered.
Explicitly power it up to allow SCFW to keep track of used
resources.

Signed-off-by: Teo Hall <teo.hall@nxp.com>
(cherry picked from commit 300f65b3428f4bcb97df85857ff7a871f23caf9c)

Showing 5 changed files with 28 additions and 0 deletions Side-by-side Diff

arch/arm/dts/fsl-imx8qxp.dtsi
... ... @@ -666,6 +666,11 @@
666 666 power-domains =<&pd_serdes1>;
667 667 };
668 668 };
  669 + pd_gpio: PD_HSIO_GPIO {
  670 + reg = <SC_R_HSIO_GPIO>;
  671 + #power-domain-cells = <0>;
  672 + power-domains =<&pd_hsio>;
  673 + };
669 674 };
670 675  
671 676 pd_cm40: PD_CM40 {
board/freescale/imx8qm_arm2/imx8qm_arm2.c
... ... @@ -477,6 +477,12 @@
477 477 printf("hsio_pcie1 Power up failed! (error = %d)\n", ret);
478 478 }
479 479  
  480 + if (!power_domain_lookup_name("hsio_gpio", &pd)) {
  481 + ret = power_domain_on(&pd);
  482 + if (ret)
  483 + printf("hsio_gpio Power up failed! (error = %d)\n", ret);
  484 + }
  485 +
480 486 imx8_iomux_setup_multiple_pads(board_pcie_pins, ARRAY_SIZE(board_pcie_pins));
481 487  
482 488 }
board/freescale/imx8qm_mek/imx8qm_mek.c
... ... @@ -257,6 +257,12 @@
257 257 printf("hsio_pcie1 Power up failed! (error = %d)\n", ret);
258 258 }
259 259  
  260 + if (!power_domain_lookup_name("hsio_gpio", &pd)) {
  261 + ret = power_domain_on(&pd);
  262 + if (ret)
  263 + printf("hsio_gpio Power up failed! (error = %d)\n", ret);
  264 + }
  265 +
260 266 imx8_iomux_setup_multiple_pads(board_pcie_pins, ARRAY_SIZE(board_pcie_pins));
261 267 }
262 268  
board/freescale/imx8qxp_arm2/imx8qxp_arm2.c
... ... @@ -480,6 +480,11 @@
480 480 if (ret)
481 481 printf("hsio_pcie1 Power up failed! (error = %d)\n", ret);
482 482 }
  483 + if (!power_domain_lookup_name("hsio_gpio", &pd)) {
  484 + ret = power_domain_on(&pd);
  485 + if (ret)
  486 + printf("hsio_gpio Power up failed! (error = %d)\n", ret);
  487 + }
483 488  
484 489 imx8_iomux_setup_multiple_pads(board_pcie_pins, ARRAY_SIZE(board_pcie_pins));
485 490 }
board/freescale/imx8qxp_mek/imx8qxp_mek.c
... ... @@ -390,6 +390,12 @@
390 390 printf("hsio_pcie1 Power up failed! (error = %d)\n", ret);
391 391 }
392 392  
  393 + if (!power_domain_lookup_name("hsio_gpio", &pd)) {
  394 + ret = power_domain_on(&pd);
  395 + if (ret)
  396 + printf("hsio_gpio Power up failed! (error = %d)\n", ret);
  397 + }
  398 +
393 399 imx8_iomux_setup_multiple_pads(board_pcie_pins, ARRAY_SIZE(board_pcie_pins));
394 400 }
395 401