]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ARM: dts: owl-s500-roseapplepi: Add ethernet support
authorCristian Ciocaltea <cristian.ciocaltea@gmail.com>
Mon, 28 Jun 2021 07:28:17 +0000 (12:58 +0530)
committerArnd Bergmann <arnd@arndb.de>
Mon, 2 Aug 2021 13:22:55 +0000 (15:22 +0200)
Add pinctrl configuration for enabling the Ethernet MAC on RoseapplePi
SBC. Additionally, provide the necessary properties for the generic S500
ethernet node in order to setup PHY and MDIO.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/d0e1fbf81984127f0352eb740c7129424b5e40f9.1623401998.git.cristian.ciocaltea@gmail.com
Link: https://lore.kernel.org/r/20210628072817.8269-3-mani@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/boot/dts/owl-s500-roseapplepi.dts

index b8c5db2344aa0c344dfb49b7af2dbf87b44d61be..eb555f38528334fe849718fd33df60ef5da261f8 100644 (file)
                        bias-pull-down;
                };
        };
+
+       ethernet_pins: ethernet-pins {
+               eth_rmii-pinmux {
+                       groups = "rmii_txd0_mfp", "rmii_txd1_mfp",
+                                "rmii_rxd0_mfp", "rmii_rxd1_mfp",
+                                "rmii_txen_mfp", "rmii_rxen_mfp",
+                                "rmii_crs_dv_mfp", "rmii_ref_clk_mfp";
+                       function = "eth_rmii";
+               };
+
+               phy_clk-pinmux {
+                       groups = "clko_25m_mfp";
+                       function = "clko_25m";
+               };
+
+               ref_clk-pinconf {
+                       groups = "rmii_ref_clk_drv";
+                       drive-strength = <2>;
+               };
+
+       };
 };
 
 /* uSD */
        vqmmc-supply = <&sd_vcc>;
 };
 
+&ethernet {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ethernet_pins>;
+       phy-mode = "rmii";
+       phy-handle = <&eth_phy>;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reset-gpios = <&pinctrl 88 GPIO_ACTIVE_LOW>; /* GPIOC24 */
+               reset-delay-us = <10000>;
+               reset-post-delay-us = <150000>;
+
+               eth_phy: ethernet-phy@3 {
+                       reg = <0x3>;
+                       max-speed = <100>;
+                       interrupt-parent = <&sirq>;
+                       interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+               };
+       };
+};
+
 &twd_timer {
        status = "okay";
 };