arm64: dts: renesas: gray-hawk-single: Add Ethernet support
authorThanh Quan <thanh.quan.xn@renesas.com>
Sun, 11 Feb 2024 14:30:46 +0000 (15:30 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 22 Feb 2024 10:06:33 +0000 (11:06 +0100)
Describe the wiring of the first Ethernet AVB instance to the Micrel
KSZ9031RNXVB PHY.

Signed-off-by: Thanh Quan <thanh.quan.xn@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/b83b21b6477a0e31f99eaedbd36c03014b72ec8a.1707661382.git.geert+renesas@glider.be
arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts

index 5a7e1bea9f6601b24c0966298309f85f6fdc76b2..c900ccd18573a699fba45740f5df473d6a903983 100644 (file)
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
 #include "r8a779h0.dtsi"
 
 / {
@@ -15,6 +18,7 @@
 
        aliases {
                serial0 = &hscif0;
+               ethernet0 = &avb0;
        };
 
        chosen {
        };
 };
 
+&avb0 {
+       pinctrl-0 = <&avb0_pins>;
+       pinctrl-names = "default";
+       phy-handle = <&phy0>;
+       tx-internal-delay-ps = <2000>;
+       status = "okay";
+
+       phy0: ethernet-phy@0 {
+               compatible = "ethernet-phy-id0022.1622",
+                            "ethernet-phy-ieee802.3-c22";
+               rxc-skew-ps = <1500>;
+               reg = <0>;
+               interrupt-parent = <&gpio7>;
+               interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+               reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>;
+       };
+};
+
 &extal_clk {
        clock-frequency = <16666666>;
 };
        pinctrl-0 = <&scif_clk_pins>;
        pinctrl-names = "default";
 
+       avb0_pins: avb0 {
+               mux {
+                       groups = "avb0_link", "avb0_mdio", "avb0_rgmii",
+                                "avb0_txcrefclk";
+                       function = "avb0";
+               };
+
+               pins_mdio {
+                       groups = "avb0_mdio";
+                       drive-strength = <21>;
+               };
+
+               pins_mii {
+                       groups = "avb0_rgmii";
+                       drive-strength = <21>;
+               };
+       };
+
        hscif0_pins: hscif0 {
                groups = "hscif0_data", "hscif0_ctrl";
                function = "hscif0";