ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / rt3883_sitecom_wlr-6000.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "sitecom,wlr-6000", "ralink,rt3883-soc";
10         model = "Sitecom WLR-6000";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         keys {
20                 compatible = "gpio-keys-polled";
21                 poll-interval = <20>;
22
23                 reset {
24                         label = "reset";
25                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
26                         linux,code = <KEY_RESTART>;
27                 };
28         };
29
30         leds {
31                 compatible = "gpio-leds";
32
33                 led_power: power {
34                         label = "wlr-6000:red:power";
35                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
36                 };
37
38                 ops {
39                         label = "wlr-6000:white:ops";
40                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
41                 };
42         };
43
44         gpio_export {
45                 compatible = "gpio-export";
46                 #size-cells = <0>;
47
48                 usb {
49                         gpio-export,name = "usb";
50                         gpio-export,output = <1>;
51                         gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
52                 };
53         };
54 };
55
56 &gpio1 {
57         status = "okay";
58 };
59
60 &pinctrl {
61         state_default: pinctrl0 {
62                 gpio {
63                         ralink,group = "i2c", "jtag", "uartf";
64                         ralink,function = "gpio";
65                 };
66         };
67 };
68
69 &ethernet {
70         status = "okay";
71         mtd-mac-address = <&factory 0x8004>;
72         mtd-mac-address-increment = <1>;
73
74         port@0 {
75                 phy-handle = <&phy0>;
76                 phy-mode = "rgmii";
77         };
78
79         mdio-bus {
80                 status = "okay";
81
82                 phy0: ethernet-phy@0 {
83                         reg = <0>;
84                         phy-mode = "rgmii";
85
86                         qca,ar8327-initvals = <
87                                 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
88                                 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
89                                 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
90                                 0x50 0xc437c437 /* LED Control Register 0 */
91                                 0x54 0xc337c337 /* LED Control Register 1 */
92                                 0x58 0x00000000 /* LED Control Register 2 */
93                                 0x5c 0x03ffff00 /* LED Control Register 3 */
94                                 0x7c 0x0000007e /* PORT0_STATUS */
95                                 0x94 0x0000007e /* PORT6 STATUS */
96                         >;
97                 };
98         };
99 };
100
101 &spi0 {
102         status = "okay";
103
104         m25p80@0 {
105                 compatible = "jedec,spi-nor";
106                 reg = <0>;
107                 spi-max-frequency = <8600000>;
108                 m25p,fast-read;
109
110                 partitions {
111                         compatible = "fixed-partitions";
112                         #address-cells = <1>;
113                         #size-cells = <1>;
114
115                         partition@0 {
116                                 label = "u-boot";
117                                 reg = <0x0 0x30000>;
118                                 read-only;
119                         };
120
121                         partition@30000 {
122                                 label = "u-boot-env";
123                                 reg = <0x30000 0x10000>;
124                                 read-only;
125                         };
126
127                         factory: partition@40000 {
128                                 label = "factory";
129                                 reg = <0x40000 0x10000>;
130                                 read-only;
131                         };
132
133                         partition@50000 {
134                                 compatible = "denx,uimage";
135                                 label = "firmware";
136                                 reg = <0x50000 0x713000>;
137                         };
138
139                         partition@763000 {
140                                 label = "manufacture";
141                                 reg = <0x763000 0x7D000>;
142                                 read-only;
143                         };
144
145                         partition@7E0000 {
146                                 label = "backup";
147                                 reg = <0x7E0000 0x10000>;
148                                 read-only;
149                         };
150
151                         partition@7F0000 {
152                                 label = "storage";
153                                 reg = <0x7F0000 0x10000>;
154                                 read-only;
155                         };
156                 };
157         };
158 };
159
160 &pci {
161         status = "okay";
162 };
163
164 &pci1 {
165         status = "okay";
166
167         wifi@0,0 {
168                 compatible = "pci1814,3091";
169                 reg = <0x10000 0 0 0 0>;
170                 ralink,mtd-eeprom = <&factory 0x8000>;
171         };
172 };
173
174 &wmac {
175         status = "okay";
176         ralink,2ghz = <0>;
177         ralink,mtd-eeprom = <&factory 0x0>;
178 };
179
180 &ehci {
181         status = "okay";
182 };
183
184 &ohci {
185         status = "okay";
186 };