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