ARM: dts: at91: sam9x60: Add macb0 Ethernet controller
authorNicolas Ferre <nicolas.ferre@microchip.com>
Fri, 27 Sep 2019 13:08:48 +0000 (13:08 +0000)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 8 Oct 2019 06:16:11 +0000 (09:16 +0300)
Add Ethernet controller to dtsi file and enable it on sam9x60ek
platform connected with rmii.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
arch/arm/dts/sam9x60.dtsi
arch/arm/dts/sam9x60ek.dts

index e880dc0068df6f157fb0e4b31d647338331ab8c4..a66d0a278a87b8ad7f6af857ec69eff0139ace9f 100644 (file)
                        #size-cells = <1>;
                        ranges;
 
+                       macb0: ethernet@f802c000 {
+                               compatible = "cdns,sam9x60-macb", "cdns,macb";
+                               reg = <0xf802c000 0x100>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_macb0_rmii>;
+                               clock-names = "hclk", "pclk";
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               status = "disabled";
+                       };
+
                        dbgu: serial@fffff200 {
                                compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
                                reg = <0xfffff200 0x200>;
                                        };
                                };
 
+                               macb0 {
+                                       pinctrl_macb0_rmii: macb0_rmii-0 {
+                                               atmel,pins =
+                                                       <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB0 periph A */
+                                                        AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB1 periph A */
+                                                        AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB2 periph A */
+                                                        AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB3 periph A */
+                                                        AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB4 periph A */
+                                                        AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB5 periph A */
+                                                        AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB6 periph A */
+                                                        AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB7 periph A */
+                                                        AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE    /* PB9 periph A */
+                                                        AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
+                                       };
+                               };
+
                                sdhci0 {
                                        pinctrl_sdhci0: sdhci0 {
                                                atmel,pins =
                                                #clock-cells = <0>;
                                                reg = <47>;
                                        };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
                                };
 
                                generic: gck {
index e64566ec8e58324385e6b88218b408bb7ef88f8f..6fe9f19f0bc7bd233a4acb6d36c41bde09b1964e 100644 (file)
@@ -17,3 +17,8 @@
                stdout-path = &dbgu;
        };
 };
+
+&macb0 {
+       phy-mode = "rmii";
+       status = "okay";
+};