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