lantiq: Enable the hardware SPI driver on the DGN3500/DGN3500B
[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                                 spi {
49                                         lantiq,groups = "spi", "spi_cs4";
50                                         lantiq,function = "spi";
51                                 };
52                         };
53                 };
54
55                 etop@E180000 {
56                         phy-mode = "mii";
57                         mac-address = [ 00 11 22 33 44 55 ];
58                 };
59
60                 ifxhcd@E101000 {
61                         status = "okay";
62                 };
63
64                 pci@E105400 {
65                         status = "okay";
66
67                         lantiq,bus-clock = <33333333>;
68                         interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
69                         interrupt-map = <0x7000 0 0 1 &icu0 30 1>;
70                         gpio-reset = <&gpio 21 0>;
71                         req-mask = <0x1>; /* GNT1 */
72                 };
73         };
74
75         ath9k_eep {
76                 compatible = "ath9k,eeprom";
77                 ath,eep-flash = <&ath9k_cal 0xf000>;
78                 ath,pci-slot = <14>;
79                 ath,eep-endian;
80                 ath,eep-swap;
81         };
82
83         rtl8366rb {
84                 compatible = "rtl8366rb";
85                 gpio-sda = <&gpio 35 0>;
86                 gpio-sck = <&gpio 37 0>;
87         };
88
89         gpio-keys-polled {
90                 compatible = "gpio-keys-polled";
91                 #address-cells = <1>;
92                 #size-cells = <0>;
93                 poll-interval = <100>;
94
95                 rfkill {
96                         label = "rfkill";
97                         gpios = <&gpio 36 1>;
98                         linux,code = <0xf7>;
99                 };
100                 wps {
101                         label = "wps";
102                         gpios = <&gpio 54 1>;
103                         linux,code = <0x211>;
104                 };
105                 reset {
106                         label = "reset";
107                         gpios = <&gpio 53 1>;
108                         linux,code = <0x198>;
109                 };
110         };
111
112         gpio-leds {
113                 compatible = "gpio-leds";
114                 internet: internet {
115                         label = "dgn3500:green:internet";
116                         gpios = <&gpio 2 1>;
117                 };
118                 /*
119                         internet red is missing
120                 */
121                 dsl: dsl {
122                         label = "dgn3500:green:dsl";
123                         gpios = <&gpio 4 1>;
124                 };
125                 usb: usb {
126                         label = "dgn3500:green:usb";
127                         gpios = <&gpio 22 1>;
128                 };
129                 power_green: power {
130                         label = "dgn3500:green:power";
131                         gpios = <&gpio 34 1>;
132                         default-state = "keep";
133                 };
134                 power_red: power2 {
135                         label = "dgn3500:red:power";
136                         gpios = <&gpio 39 1>;
137                 };
138         /*
139                         power amber is missing
140                 */
141                 wifi: wifi {
142                         label = "dgn3500:blue:wireless";
143                         gpios = <&gpio 51 1>;
144                 };
145                 wps {
146                         label = "dgn3500:green:wps";
147                         gpios = <&gpio 52 1>;
148                 };
149         };
150 };
151
152 &spi {
153         status = "ok";
154
155         m25p80@3 {
156                 #address-cells = <1>;
157                 #size-cells = <1>;
158                 compatible = "jedec,spi-nor";
159                 reg = <3 0>;
160                 spi-max-frequency = <1000000>;
161
162                 partition@0 {
163                         reg = <0x0 0x10000>;
164                         label = "uboot";
165                         read-only;
166                 };
167
168                 partition@10000 {
169                         reg = <0x10000 0x10000>;
170                         label = "uboot-env";
171                         read-only;
172                 };
173
174                 ath9k_cal: partition@20000 {
175                         reg = <0x20000 0x10000>;
176                         label = "calibration";
177                         read-only;
178                 };
179
180                 partition@50000 {
181                         reg = <0x50000 0xfa0000>;
182                         label = "firmware";
183                 };
184         };
185 };