lantiq: dts: assign the PCI pins to the PCI controller node
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / FRITZ7312.dts
1 /dts-v1/;
2
3 #include "ar9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "avm,fritz7312", "lantiq,xway", "lantiq,ar9";
9 model = "AVM FRITZ!Box 7312";
10
11 chosen {
12 bootargs = "console=ttyLTQ0,115200";
13 };
14
15 aliases {
16 led-boot = &power;
17 led-failsafe = &power;
18 led-running = &power;
19 led-upgrade = &power;
20
21 led-dsl = &info_green;
22 led-wifi = &wlan;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x4000000>;
28 };
29
30 keys {
31 compatible = "gpio-keys-polled";
32 poll-interval = <100>;
33
34 wlan {
35 label = "wlan";
36 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RFKILL>;
38 };
39 dect {
40 label = "dect";
41 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_PHONE>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 power: power {
50 label = "fritz7312:green:power";
51 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
52 default-state = "keep";
53 };
54 voice {
55 label = "fritz7312:green:fon";
56 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
57 };
58 dect {
59 label = "fritz7312:green:dect";
60 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
61 };
62 wlan: wlan {
63 label = "fritz7312:green:wlan";
64 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
65 };
66 info_green: info_green {
67 label = "fritz7312:green:info";
68 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
69 };
70 };
71 };
72
73 &gpio {
74 pinctrl-names = "default";
75 pinctrl-0 = <&state_default>;
76
77 state_default: pinmux {
78 ar8030-intr {
79 lantiq,groups = "exin3";
80 lantiq,function = "exin";
81 lantiq,pull = <2>;
82 lantiq,output = <0>;
83 };
84 ar8030-clk {
85 lantiq,groups = "clkout2";
86 lantiq,output = <1>;
87 lantiq,open-drain;
88 };
89 ar8030-rst {
90 lantiq,pins = "io34";
91 lantiq,output = <1>;
92 lantiq,pull = <2>;
93 lantiq,open-drain;
94 };
95 };
96 };
97
98 &gsw {
99 phy-mode = "rmii";
100 phy-handle = <&phy0>;
101 mtd-mac-address = <&ath9k_cal 0xa91>;
102 mtd-mac-address-increment = <(-2)>;
103
104 mdio-bus {
105 #address-cells = <1>;
106 #size-cells = <0>;
107
108 phy0: ethernet-phy@0 {
109 reg = <0>;
110 reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
111 };
112 };
113 };
114
115 &localbus {
116 flash@0 {
117 compatible = "lantiq,nor";
118 bank-width = <2>;
119 reg = <0 0x0 0x1000000>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 ath9k_cal: partition@0 {
127 label = "urlader";
128 reg = <0x00000 0x20000>;
129 read-only;
130 };
131
132 partition@20000 {
133 label = "firmware";
134 reg = <0x20000 0xf60000>;
135 };
136
137 partition@f80000 {
138 label = "tffs (1)";
139 reg = <0xf80000 0x40000>;
140 read-only;
141 };
142
143 partition@fc0000 {
144 label = "tffs (2)";
145 reg = <0xfc0000 0x40000>;
146 read-only;
147 };
148 };
149 };
150 };
151
152 &pci0 {
153 status = "okay";
154
155 pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>,
156 <&pci_gnt3_pins>, <&pci_gnt4_pins>,
157 <&pci_req1_pins>, <&pci_req2_pins>,
158 <&pci_req4_pins>;
159 pinctrl-names = "default";
160
161 req-mask = <0xf>;
162 gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>;
163
164 wifi@0,0 {
165 compatible = "pci0,0";
166 reg = <0x7000 0 0 0 0>;
167 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
168 };
169 };