@@ -8,6 +8,7 @@
/dts-v1/;
/plugin/;
+#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-pinctrl.h"
@@ -124,6 +125,15 @@ AM65X_IOPAD(0x0088, PIN_INPUT, 2) /* (AG17) PRG2_PRU0_GPO4.PRG2_RGMII1_RX_CTL */
};
};
+&main_pmx1 {
+ /* Select GPIO1_87 for ICSSG2 PHY interrupt */
+ icssg2_phy_irq_pins_default: icssg2-phy-irq-default-pins {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0014, PIN_INPUT, 7) /* (A22) EXT_REFCLK1.GPIO1_87 */
+ >;
+ };
+};
+
&icssg2_mdio {
status = "okay";
pinctrl-names = "default";
@@ -131,8 +141,21 @@ &icssg2_mdio {
#address-cells = <1>;
#size-cells = <0>;
+ /*
+ * icssg2_phy0 and icssg2_phy1 share the same interrupt:
+ * "GPIO1_87" due to the board design.
+ * Since the SoC only supports Edge-Triggered interrupts and
+ * Edge-Triggered interrupts cannot be shared, the interrupt will
+ * be dedicated solely for icssg2_phy0's use while icssg2_phy1
+ * shall continue operating in polled mode.
+ */
icssg2_phy0: ethernet-phy@0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&icssg2_phy_irq_pins_default>;
+
reg = <0>;
+ interrupt-parent = <&main_gpio1>;
+ interrupts = <87 IRQ_TYPE_EDGE_FALLING>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
};