ARM: dts: am3517-evm: Enable Ethernet PHY Interrupt
authorAdam Ford <aford173@gmail.com>
Thu, 5 Oct 2023 00:04:02 +0000 (19:04 -0500)
committerTony Lindgren <tony@atomide.com>
Sat, 7 Oct 2023 07:22:49 +0000 (10:22 +0300)
The Ethernet PHY interrupt pin is routed to GPIO_58.  Create a
PHY node to configure this GPIO for the interrupt to avoid polling.

Signed-off-by: Adam Ford <aford173@gmail.com>
Message-ID: <20231005000402.50879-2-aford173@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/ti/omap/am3517-evm.dts

index 866f68c5b504dcdd0e5472b12f8d593a1cd048d6..40f15da810435ad9de7ae52bfc567bc1b11317ec 100644 (file)
 &davinci_emac {
        pinctrl-names = "default";
        pinctrl-0 = <&ethernet_pins>;
+       phy-mode = "rmii";
+       phy-handle = <&ethphy0>;
        status = "okay";
 };
 
 &davinci_mdio {
+       #address-cells = <1>;
+       #size-cells = <0>;
        status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&enet_phy_pins>;
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <0>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <26 IRQ_TYPE_LEVEL_LOW>;   /* gpio_58 */
+       };
 };
 
 &dss {
                >;
        };
 
+       enet_phy_pins: ethernet-phy-pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20bc, PIN_INPUT | MUX_MODE4)        /* gpmc_ncs7.gpio_57 */
+               >;
+       };
+
        i2c2_pins: i2c2-pins {
                pinctrl-single,pins = <
                        OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT_PULLUP | MUX_MODE0)  /* i2c2_scl */