ramips: dts: use generic node name for flash
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_planex_cs-qr10.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "planex,cs-qr10", "ralink,mt7620a-soc";
10         model = "Planex CS-QR10";
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         leds {
20                 compatible = "gpio-leds";
21
22                 led_power: power {
23                         label = "cs-qr10:red:power";
24                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys";
30
31                 s1 {
32                         label = "reset";
33                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
34                         linux,code = <KEY_RESTART>;
35                 };
36
37                 s2 {
38                         label = "wps";
39                         gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_WPS_BUTTON>;
41                 };
42         };
43 };
44
45 &gpio0 {
46         status = "okay";
47 };
48
49 &gpio1 {
50         status = "okay";
51 };
52
53 &gpio2 {
54         status = "okay";
55 };
56
57 &gpio3 {
58         status = "okay";
59 };
60
61 &i2c {
62         status = "okay";
63 };
64
65 &i2s {
66         status = "okay";
67         pinctrl-names = "default";
68         pinctrl-0 = <&pcm_i2s_pins>;
69 };
70
71 &spi0 {
72         status = "okay";
73
74         flash@0 {
75                 compatible = "jedec,spi-nor";
76                 reg = <0>;
77                 spi-max-frequency = <10000000>;
78
79                 partitions {
80                         compatible = "fixed-partitions";
81                         #address-cells = <1>;
82                         #size-cells = <1>;
83
84                         partition@0 {
85                                 label = "u-boot";
86                                 reg = <0x0 0x30000>;
87                                 read-only;
88                         };
89
90                         partition@30000 {
91                                 label = "u-boot-env";
92                                 reg = <0x30000 0x10000>;
93                                 read-only;
94                         };
95
96                         factory: partition@40000 {
97                                 label = "factory";
98                                 reg = <0x40000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@50000 {
103                                 compatible = "denx,uimage";
104                                 label = "firmware";
105                                 reg = <0x50000 0x7b0000>;
106                         };
107                 };
108         };
109 };
110
111 &pcm {
112         status = "okay";
113 };
114
115 &gdma {
116         status = "okay";
117 };
118
119 &state_default {
120         gpio {
121                 groups = "spi refclk", "rgmii1";
122                 function = "gpio";
123         };
124         wdt {
125                 groups = "wdt";
126                 function = "wdt refclk";
127         };
128 };
129
130 &ethernet {
131         pinctrl-names = "default";
132         pinctrl-0 = <&ephy_pins>;
133         mtd-mac-address = <&factory 0x4>;
134         mediatek,portmap = "llllw";
135 };
136
137 &gsw {
138         ralink,port4 = "ephy";
139 };
140
141 &sdhci {
142         status = "okay";
143 };
144
145 &ehci {
146         status = "okay";
147 };
148
149 &ohci {
150         status = "okay";
151 };
152
153 &wmac {
154         ralink,mtd-eeprom = <&factory 0x0>;
155 };