ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / rt3052_huawei_hg255d.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "huawei,hg255d", "ralink,rt3052-soc";
10         model = "HuaWei HG255D";
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         cfi@1f000000 {
20                 compatible = "cfi-flash";
21                 reg = <0x1f000000 0x1000000>;
22                 bank-width = <2>;
23                 device-width = <2>;
24
25                 partitions {
26                         compatible = "fixed-partitions";
27                         #address-cells = <1>;
28                         #size-cells = <1>;
29
30                         partition@0 {
31                                 label = "u-boot";
32                                 reg = <0x0 0x40000>;
33                                 read-only;
34                         };
35
36                         partition@30000 {
37                                 label = "u-boot-env";
38                                 reg = <0x40000 0x20000>;
39                                 read-only;
40                         };
41
42                         factory: partition@60000 {
43                                 label = "factory";
44                                 reg = <0x60000 0x20000>;
45                                 read-only;
46                         };
47
48                         partition@80000 {
49                                 compatible = "denx,uimage";
50                                 label = "firmware";
51                                 reg = <0x80000 0xf60000>;
52                         };
53
54                         partition@fa0000 {
55                                 label = "factory-orig";
56                                 reg = <0xfa0000 0x20000>;
57                                 read-only;
58                         };
59                 };
60         };
61
62         leds {
63                 compatible = "gpio-leds";
64
65                 led_power: power {
66                         label = "hg255d:green:power";
67                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
68                 };
69
70                 internet {
71                         label = "hg255d:green:internet";
72                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
73                 };
74
75                 wifi {
76                         label = "hg255d:green:wlan";
77                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
78                 };
79
80                 usb {
81                         label = "hg255d:green:usb";
82                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
83                         trigger-sources = <&otg_port1>;
84                         linux,default-trigger = "usbport";
85                 };
86
87                 wps {
88                         label = "hg255d:green:wps";
89                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
90                 };
91
92                 voice {
93                         label = "hg255d:green:voice";
94                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
95                 };
96         };
97
98         keys {
99                 compatible = "gpio-keys-polled";
100                 poll-interval = <10>;
101
102                 reset {
103                         label = "reset";
104                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
105                         linux,code = <KEY_RESTART>;
106                 };
107
108                 wps {
109                         label = "wps";
110                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
111                         linux,code = <KEY_WPS_BUTTON>;
112                 };
113
114                 rfkill {
115                         label = "rfkill";
116                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
117                         linux,code = <KEY_RFKILL>;
118                 };
119         };
120 };
121
122 &pinctrl {
123         state_default: pinctrl0 {
124                 gpio {
125                         ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
126                         ralink,function = "gpio";
127                 };
128         };
129 };
130
131 &ethernet {
132         mtd-mac-address = <&factory 0x28>;
133 };
134
135 &esw {
136         mediatek,portmap = <0x2f>;
137 };
138
139 &wmac {
140         ralink,mtd-eeprom = <&factory 0>;
141 };
142
143 &otg {
144         status = "okay";
145 };