ramips: dts: use generic node name for flash
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_zbtlink_zbt-wa05.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc";
10         model = "Zbtlink ZBT-WA05";
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         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power: power {
27                         label = "zbt-wa05:blue:power";
28                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
29                 };
30
31                 usb {
32                         label = "zbt-wa05:blue:usb";
33                         gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
34                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
35                         linux,default-trigger = "usbport";
36                 };
37
38                 air {
39                         label = "zbt-wa05:blue:air";
40                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
41                 };
42         };
43
44         keys {
45                 compatible = "gpio-keys";
46
47                 reset {
48                         label = "reset";
49                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_RESTART>;
51                 };
52         };
53 };
54
55 &gpio1 {
56         status = "okay";
57 };
58
59 &gpio2 {
60         status = "okay";
61 };
62
63 &gpio3 {
64         status = "okay";
65 };
66
67 &spi0 {
68         status = "okay";
69
70         flash@0 {
71                 compatible = "jedec,spi-nor";
72                 reg = <0>;
73                 spi-max-frequency = <10000000>;
74
75                 partitions {
76                         compatible = "fixed-partitions";
77                         #address-cells = <1>;
78                         #size-cells = <1>;
79
80                         partition@0 {
81                                 label = "u-boot";
82                                 reg = <0x0 0x30000>;
83                                 read-only;
84                         };
85
86                         partition@30000 {
87                                 label = "u-boot-env";
88                                 reg = <0x30000 0x10000>;
89                                 read-only;
90                         };
91
92                         factory: partition@40000 {
93                                 label = "factory";
94                                 reg = <0x40000 0x10000>;
95                                 read-only;
96                         };
97
98                         partition@50000 {
99                                 compatible = "denx,uimage";
100                                 label = "firmware";
101                                 reg = <0x50000 0x760000>;
102                         };
103                 };
104         };
105 };
106
107 &ehci {
108         status = "okay";
109 };
110
111 &ohci {
112         status = "okay";
113 };
114
115 &ethernet {
116         mtd-mac-address = <&factory 0x4>;
117         mediatek,portmap = "wllll";
118 };
119
120 &wmac {
121         ralink,mtd-eeprom = <&factory 0x0>;
122 };
123
124 &state_default {
125         default {
126                 groups = "i2c", "spi refclk", "wled";
127                 function = "gpio";
128         };
129 };