arm64: dts: ti: k3-j721e: Enable PCIe nodes at the board level
authorAndrew Davis <afd@ti.com>
Mon, 15 May 2023 17:21:35 +0000 (12:21 -0500)
committerVignesh Raghavendra <vigneshr@ti.com>
Thu, 15 Jun 2023 05:35:45 +0000 (11:05 +0530)
PCIe nodes defined in the top-level J721e SoC dtsi files are incomplete
and will not be functional unless they are extended with a SerDes PHY.
And usually only one of the two modes can be used at a time as they
share a SerDes link.

As the PHY and mode is only known at the board integration level, these
nodes should only be enabled when provided with this information.

Disable the PCIe nodes in the dtsi files and only enable the ones that
are actually pinned out on a given board.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20230515172137.474626-3-afd@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
arch/arm64/boot/dts/ti/k3-j721e-sk.dts

index d77eeff0d81d49c8d934ae3f0605686b4d9ff9fc..be0c5431119ee0a957f711cca42781da5aeb1201 100644 (file)
        };
 };
 
-&pcie0_rc {
-       /* Unused */
-       status = "disabled";
-};
-
 &pcie1_rc {
+       status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&pcie1_rst_pins_default>;
        phys = <&serdes1_pcie_link>;
        reset-gpios = <&main_gpio0 22 GPIO_ACTIVE_HIGH>;
 };
 
-&pcie2_rc {
-       /* Unused */
-       status = "disabled";
-};
-
-&pcie3_rc {
-       /* Unused */
-       status = "disabled";
-};
-
 &icssg0_mdio {
        /* Unused */
        status = "disabled";
index 7957d09bf04b5a42b23278e68e53def021dacf51..42579564c3bde86986d7d672d32036d5be9cf28a 100644 (file)
 };
 
 &pcie0_rc {
+       status = "okay";
        reset-gpios = <&exp1 6 GPIO_ACTIVE_HIGH>;
        phys = <&serdes0_pcie_link>;
        phy-names = "pcie-phy";
 };
 
 &pcie1_rc {
+       status = "okay";
        reset-gpios = <&exp1 2 GPIO_ACTIVE_HIGH>;
        phys = <&serdes1_pcie_link>;
        phy-names = "pcie-phy";
 };
 
 &pcie2_rc {
+       status = "okay";
        reset-gpios = <&exp2 20 GPIO_ACTIVE_HIGH>;
        phys = <&serdes2_pcie_link>;
        phy-names = "pcie-phy";
        num-lanes = <2>;
 };
 
-&pcie3_rc {
-       status = "disabled";
-};
-
 &icssg0_mdio {
        status = "disabled";
 };
index 5ca0ddd82bfc6742511be7807ca957e90f2e26f1..af5bc2d284ca8786eebbf788bcefbfd42b0cc539 100644 (file)
                ranges = <0x01000000 0x0 0x10001000 0x0 0x10001000 0x0 0x0010000>,
                         <0x02000000 0x0 0x10011000 0x0 0x10011000 0x0 0x7fef000>;
                dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
+               status = "disabled";
        };
 
        pcie1_rc: pcie@2910000 {
                ranges = <0x01000000 0x0 0x18001000 0x0 0x18001000 0x0 0x0010000>,
                         <0x02000000 0x0 0x18011000 0x0 0x18011000 0x0 0x7fef000>;
                dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
+               status = "disabled";
        };
 
        pcie2_rc: pcie@2920000 {
                ranges = <0x01000000 0x0 0x00001000 0x44 0x00001000 0x0 0x0010000>,
                         <0x02000000 0x0 0x00011000 0x44 0x00011000 0x0 0x7fef000>;
                dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
+               status = "disabled";
        };
 
        pcie3_rc: pcie@2930000 {
                ranges = <0x01000000 0x0 0x00001000 0x44 0x10001000 0x0 0x0010000>,
                         <0x02000000 0x0 0x00011000 0x44 0x10011000 0x0 0x7fef000>;
                dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
+               status = "disabled";
        };
 
        serdes_wiz4: wiz@5050000 {
index 3fb24b68fe8e5922614b2dc53b432607df15a341..50364c05415e4afe909cdb80b1e513bb3422bc17 100644 (file)
 };
 
 &pcie0_rc {
+       status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&ekey_reset_pins_default>;
        reset-gpios = <&main_gpio0 72 GPIO_ACTIVE_HIGH>;
 };
 
 &pcie1_rc {
+       status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&mkey_reset_pins_default>;
        reset-gpios = <&wkup_gpio0 11 GPIO_ACTIVE_HIGH>;
        num-lanes = <2>;
 };
 
-&pcie2_rc {
-       /* Unused */
-       status = "disabled";
-};
-
-&pcie3_rc {
-       /* Unused */
-       status = "disabled";
-};
-
 &icssg0_mdio {
        status = "disabled";
 };