arm64: dts: ti: k3-am642-evm: Enable PCIe and SERDES
authorKishon Vijay Abraham I <kishon@ti.com>
Thu, 3 Jun 2021 14:22:49 +0000 (19:52 +0530)
committerNishanth Menon <nm@ti.com>
Tue, 8 Jun 2021 14:32:38 +0000 (09:32 -0500)
AM642 EVM has a x4 lane PCIe connector. Enable PCIe in RC mode here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20210603142251.14563-4-kishon@ti.com
arch/arm64/boot/dts/ti/k3-am642-evm.dts

index dad0efa961ed11701f7b7ab94244922956e18843..8c27f563a390b37721260f1298fa2f9d6bcda4c6 100644 (file)
@@ -5,6 +5,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/mux/ti-serdes.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/net/ti-dp83867.h>
 &mailbox0_cluster7 {
        status = "disabled";
 };
+
+&serdes_ln_ctrl {
+       idle-states = <AM64_SERDES0_LANE0_PCIE0>;
+};
+
+&serdes0 {
+       serdes0_pcie_link: phy@0 {
+               reg = <0>;
+               cdns,num-lanes = <1>;
+               #phy-cells = <0>;
+               cdns,phy-type = <PHY_TYPE_PCIE>;
+               resets = <&serdes_wiz0 1>;
+       };
+};
+
+&pcie0_rc {
+       reset-gpios = <&exp1 5 GPIO_ACTIVE_HIGH>;
+       phys = <&serdes0_pcie_link>;
+       phy-names = "pcie-phy";
+       num-lanes = <1>;
+};
+
+&pcie0_ep {
+       phys = <&serdes0_pcie_link>;
+       phy-names = "pcie-phy";
+       num-lanes = <1>;
+       status = "disabled";
+};