lantiq: dts: use generic node names
[oweals/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / WBMR.dts
1 /dts-v1/;
2
3 #include "ar9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "buffalo,wbmr-hp-g300h", "lantiq,xway", "lantiq,ar9";
9         model = "Buffalo WBMR-HP-G300H";
10
11         chosen {
12                 bootargs = "console=ttyLTQ0,115200";
13         };
14
15         aliases {
16                 led-boot = &power_green;
17                 led-failsafe = &power_red;
18                 led-running = &power_green;
19                 led-upgrade = &power_green;
20
21                 led-dsl = &dsl;
22                 led-internet = &online_green;
23                 led-usb = &led_usb;
24                 led-wifi = &wifi;
25         };
26
27         memory@0 {
28                 device_type = "memory";
29                 reg = <0x0 0x4000000>;
30         };
31
32         keys {
33                 compatible = "gpio-keys-polled";
34                 poll-interval = <100>;
35
36                 wps {
37                         label = "wps";
38                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
39                         linux,code = <KEY_WPS_BUTTON>;
40                 };
41                 reset {
42                         label = "reset";
43                         gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_RESTART>;
45                 };
46                 eject {
47                         label = "eject";
48                         gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
49                         linux,code = <KEY_EJECTCD>;
50                 };
51                 movie {
52                         label = "movie";
53                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
54                         linux,code = <KEY_VIDEO>;
55                 };
56         };
57
58         leds {
59                 compatible = "gpio-leds";
60
61                 power_green: power {
62                         label = "wbmr:green:power";
63                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
64                         default-state = "keep";
65                 };
66                 power_red: power2 {
67                         label = "wbmr:red:power";
68                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
69                 };
70                 security {
71                         label = "wbmr:yellow:security";
72                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
73                 };
74                 wifi: wifi {
75                         label = "wbmr:green:wireless";
76                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
77                 };
78                 dsl: dsl {
79                         label = "wbmr:green:dsl";
80                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
81                 };
82                 online_green: online {
83                         label = "wbmr:green:internet";
84                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
85                 };
86                 online2 {
87                         label = "wbmr:red:internet";
88                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
89                 };
90                 movie {
91                         label = "wbmr:blue:movie";
92                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
93                 };
94                 led_usb: usb {
95                         label = "wbmr:green:usb";
96                         gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
97                         default-state = "on";
98                 };
99         };
100
101         usb_vbus: regulator-usb-vbus {
102                 compatible = "regulator-fixed";
103
104                 regulator-name = "USB_VBUS";
105
106                 regulator-min-microvolt = <5000000>;
107                 regulator-max-microvolt = <5000000>;
108
109                 gpio = <&gpio 36 GPIO_ACTIVE_HIGH>;
110                 enable-active-high;
111         };
112 };
113
114 &gpio {
115         pinctrl-names = "default";
116         pinctrl-0 = <&state_default>;
117
118         state_default: pinmux {
119                 pci-in {
120                         lantiq,groups = "req1";
121                         lantiq,output = <0>;
122                         lantiq,open-drain = <1>;
123                         lantiq,pull = <2>;
124                 };
125                 pci-out {
126                         lantiq,groups = "gnt1";
127                         lantiq,output = <1>;
128                         lantiq,pull = <0>;
129                 };
130                 pci_rst {
131                         lantiq,pins = "io21";
132                         lantiq,pull = <0>;
133                         lantiq,output = <1>;
134                 };
135         };
136 };
137
138 &gsw {
139         phy-mode = "rgmii";
140         mtd-mac-address = <&boardconfig 0x10024>;
141 };
142
143 &pci0 {
144         status = "okay";
145 };
146
147 &localbus {
148         flash@0 {
149                 compatible = "lantiq,nor";
150                 bank-width = <2>;
151                 reg = <0 0x0 0x2000000>;
152
153                 partitions {
154                         compatible = "fixed-partitions";
155                         #address-cells = <1>;
156                         #size-cells = <1>;
157
158                         partition@0 {
159                                 label = "uboot";
160                                 reg = <0x00000 0x40000>;
161                                 read-only;
162                         };
163
164                         partition@40000 {
165                                 label = "uboot_env";
166                                 reg = <0x40000 0x20000>;
167                                 read-only;
168                         };
169
170                         partition@20000 {
171                                 label = "firmware";
172                                 reg = <0x60000 0x1f20000>;
173                         };
174
175                         boardconfig: partition@1fc0000 {
176                                 label = "board";
177                                 reg = <0x1fc0000 0x20000>;
178                                 read-only;
179                         };
180
181                         partition@1fe0000 {
182                                 label = "calibration";
183                                 reg = <0x1fe0000 0x20000>;
184                                 read-only;
185                         };
186                 };
187         };
188 };
189
190 &usb_phy0 {
191         status = "okay";
192 };
193
194 &usb0 {
195         status = "okay";
196         vbus-supply = <&usb_vbus>;
197 };