ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_afoundry_ew1200.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
10         model = "EW1200";
11
12         aliases {
13                 led-boot = &led_run;
14                 led-failsafe = &led_run;
15                 led-running = &led_run;
16                 led-upgrade = &led_run;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,57600";
21         };
22
23         palmbus: palmbus@1E000000 {
24                 i2c@900 {
25                         status = "okay";
26                 };
27         };
28
29         keys {
30                 compatible = "gpio-keys-polled";
31                 poll-interval = <20>;
32
33                 reset {
34                         label = "reset";
35                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_RESTART>;
37                 };
38         };
39
40         leds {
41                 compatible = "gpio-leds";
42
43                 led_run: run {
44                         label = "ew1200:green:run";
45                         gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
46                 };
47
48                 usb {
49                         label = "ew1200:green:usb";
50                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
51                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
52                         linux,default-trigger = "usbport";
53                 };
54         };
55 };
56
57 &sdhci {
58         status = "okay";
59 };
60
61 &spi0 {
62         status = "okay";
63
64         m25p80@0 {
65                 compatible = "jedec,spi-nor";
66                 reg = <0>;
67                 spi-max-frequency = <10000000>;
68
69                 partitions {
70                         compatible = "fixed-partitions";
71                         #address-cells = <1>;
72                         #size-cells = <1>;
73
74                         partition@0 {
75                                 label = "u-boot";
76                                 reg = <0x0 0x30000>;
77                                 read-only;
78                         };
79
80                         partition@30000 {
81                                 label = "u-boot-env";
82                                 reg = <0x30000 0x10000>;
83                                 read-only;
84                         };
85
86                         factory: partition@40000 {
87                                 label = "factory";
88                                 reg = <0x40000 0x10000>;
89                                 read-only;
90                         };
91
92                         partition@50000 {
93                                 compatible = "denx,uimage";
94                                 label = "firmware";
95                                 reg = <0x50000 0xfb0000>;
96                         };
97                 };
98         };
99 };
100
101 &pcie {
102         status = "okay";
103 };
104
105 &pcie0 {
106         mt76@0,0 {
107                 reg = <0x0000 0 0 0 0>;
108                 mediatek,mtd-eeprom = <&factory 0x8000>;
109                 ieee80211-freq-limit = <5000000 6000000>;
110         };
111 };
112
113 &pcie1 {
114         mt76@0,0 {
115                 reg = <0x0000 0 0 0 0>;
116                 mediatek,mtd-eeprom = <&factory 0x0000>;
117                 ieee80211-freq-limit = <2400000 2500000>;
118         };
119 };
120
121 &ethernet {
122         mtd-mac-address = <&factory 0xe000>;
123 };
124
125 &pinctrl {
126         state_default: pinctrl0 {
127                 gpio {
128                         ralink,group = "wdt", "rgmii2", "jtag", "mdio";
129                         ralink,function = "gpio";
130                 };
131         };
132 };