lantiq: Switch to the new SPI driver
[openwrt.git] / target / linux / lantiq / dts / DGN3500.dtsi
1 /include/ "ar9.dtsi"
2
3 / {
4         chosen {
5                 bootargs-append = "root= console=ttyLTQ0,115200";
6
7                 leds {
8                         boot = &power_green;
9                         failsafe = &power_red;
10                         running = &power_green;
11
12                         dsl = &dsl;
13                         internet = &internet;
14                         usb = &usb;
15                         wifi = &wifi;
16                 };
17         };
18
19         memory@0 {
20                 reg = <0x0 0x4000000>;
21         };
22
23         fpi@10000000 {
24                 gpio: pinmux@E100B10 {
25                         pinctrl-names = "default";
26                         pinctrl-0 = <&state_default>;
27
28                         state_default: pinmux {
29                                 exin {
30                                         lantiq,groups = "exin1";
31                                         lantiq,function = "exin";
32                                 };
33                                 pci {
34                                         lantiq,groups = "gnt1", "req1";
35                                         lantiq,function = "pci";
36                                 };
37                                 pci-in {
38                                         lantiq,groups = "req1";
39                                         lantiq,output = <0>;
40                                         lantiq,open-drain = <1>;
41                                         lantiq,pull = <2>;
42                                 };
43                                 pci-out {
44                                         lantiq,groups = "gnt1";
45                                         lantiq,output = <1>;
46                                         lantiq,pull = <0>;
47                                 };
48                         };
49                         pins_spi_default: pins_spi_default {
50                                 spi_in {
51                                         lantiq,groups = "spi_di";
52                                         lantiq,function = "spi";
53                                 };
54                                 spi_out {
55                                         lantiq,groups = "spi_do", "spi_clk",
56                                                 "spi_cs4";
57                                         lantiq,function = "spi";
58                                         lantiq,output = <1>;
59                                 };
60                         };
61                 };
62
63                 etop@E180000 {
64                         phy-mode = "mii";
65                         mac-address = [ 00 11 22 33 44 55 ];
66                 };
67
68                 ifxhcd@E101000 {
69                         status = "okay";
70                 };
71
72                 pci@E105400 {
73                         status = "okay";
74
75                         lantiq,bus-clock = <33333333>;
76                         interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
77                         interrupt-map = <0x7000 0 0 1 &icu0 30 1>;
78                         gpio-reset = <&gpio 21 0>;
79                         req-mask = <0x1>; /* GNT1 */
80                 };
81         };
82
83         ath9k_eep {
84                 compatible = "ath9k,eeprom";
85                 ath,eep-flash = <&ath9k_cal 0xf000>;
86                 ath,pci-slot = <14>;
87                 ath,eep-endian;
88                 ath,eep-swap;
89         };
90
91         rtl8366rb {
92                 compatible = "rtl8366rb";
93                 gpio-sda = <&gpio 35 0>;
94                 gpio-sck = <&gpio 37 0>;
95         };
96
97         gpio-keys-polled {
98                 compatible = "gpio-keys-polled";
99                 #address-cells = <1>;
100                 #size-cells = <0>;
101                 poll-interval = <100>;
102
103                 rfkill {
104                         label = "rfkill";
105                         gpios = <&gpio 36 1>;
106                         linux,code = <0xf7>;
107                 };
108                 wps {
109                         label = "wps";
110                         gpios = <&gpio 54 1>;
111                         linux,code = <0x211>;
112                 };
113                 reset {
114                         label = "reset";
115                         gpios = <&gpio 53 1>;
116                         linux,code = <0x198>;
117                 };
118         };
119
120         gpio-leds {
121                 compatible = "gpio-leds";
122                 internet: internet {
123                         label = "dgn3500:green:internet";
124                         gpios = <&gpio 2 1>;
125                 };
126                 /*
127                         internet red is missing
128                 */
129                 dsl: dsl {
130                         label = "dgn3500:green:dsl";
131                         gpios = <&gpio 4 1>;
132                 };
133                 usb: usb {
134                         label = "dgn3500:green:usb";
135                         gpios = <&gpio 22 1>;
136                 };
137                 power_green: power {
138                         label = "dgn3500:green:power";
139                         gpios = <&gpio 34 1>;
140                         default-state = "keep";
141                 };
142                 power_red: power2 {
143                         label = "dgn3500:red:power";
144                         gpios = <&gpio 39 1>;
145                 };
146         /*
147                         power amber is missing
148                 */
149                 wifi: wifi {
150                         label = "dgn3500:blue:wireless";
151                         gpios = <&gpio 51 1>;
152                 };
153                 wps {
154                         label = "dgn3500:green:wps";
155                         gpios = <&gpio 52 1>;
156                 };
157         };
158 };
159
160 &spi {
161         pinctrl-names = "default";
162         pinctrl-0 = <&pins_spi_default>;
163
164         status = "ok";
165
166         m25p80@4 {
167                 #address-cells = <1>;
168                 #size-cells = <1>;
169                 compatible = "jedec,spi-nor";
170                 reg = <4 0>;
171                 spi-max-frequency = <1000000>;
172
173                 partition@0 {
174                         reg = <0x0 0x10000>;
175                         label = "uboot";
176                         read-only;
177                 };
178
179                 partition@10000 {
180                         reg = <0x10000 0x10000>;
181                         label = "uboot-env";
182                         read-only;
183                 };
184
185                 ath9k_cal: partition@20000 {
186                         reg = <0x20000 0x10000>;
187                         label = "calibration";
188                         read-only;
189                 };
190
191                 partition@50000 {
192                         reg = <0x50000 0xfa0000>;
193                         label = "firmware";
194                 };
195         };
196 };