lantiq: pcie: use devm_gpiod_get_optional
[openwrt/staging/mkresin.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_avm_fritz7412.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
7
8 / {
9 compatible = "avm,fritz7412", "lantiq,xway", "lantiq,vr9";
10 model = "AVM FRITZ!Box 7412";
11
12 chosen {
13 bootargs = "console=ttyLTQ0,115200";
14 };
15
16 aliases {
17 led-boot = &power_green;
18 led-failsafe = &power_red;
19 led-running = &power_green;
20 led-upgrade = &power_red;
21
22 led-dsl = &info;
23 led-wifi = &wifi;
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x8000000>;
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
33 poll-interval = <100>;
34
35 wps {
36 label = "wps";
37 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40
41 dect {
42 label = "dect";
43 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_PHONE>;
45 };
46 };
47
48 leds {
49 compatible = "gpio-leds";
50
51 power_green: power_green {
52 label = "green:power";
53 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
54 default-state = "keep";
55 };
56
57 power_red: power_red {
58 label = "red:power";
59 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
60 };
61
62 fon {
63 label = "green:fon";
64 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
65 };
66
67 dect {
68 label = "green:dect";
69 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
70 };
71
72 wifi: wifi {
73 label = "green:wifi";
74 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
75 };
76
77 info: info {
78 label = "green:info";
79 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
80 };
81 };
82 };
83
84 &localbus {
85 flash@0 {
86 compatible = "lantiq,nand-xway";
87 bank-width = <2>;
88 reg = <0 0x0 0x2000000>;
89 lantiq,cs = <1>;
90
91 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
92 pinctrl-names = "default";
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "urlader";
101 reg = <0x0 0x40000>;
102 read-only;
103 };
104
105 partition@40000 {
106 label = "nand-tffs";
107 reg = <0x40000 0x400000>;
108 read-only;
109 };
110
111 partition@440000 {
112 label = "kernel";
113 reg = <0x440000 0x400000>;
114 };
115
116 partition@840000 {
117 label = "ubi";
118 reg = <0x840000 0x3000000>;
119 };
120
121 partition@3840000 {
122 label = "reserved-kernel";
123 reg = <0x3840000 0x400000>;
124 read-only;
125 };
126
127 partition@3c40000 {
128 label = "reserved-filesystem";
129 reg = <0x3c40000 0x3000000>;
130 read-only;
131 };
132
133 partition@6c40000 {
134 label = "config";
135 reg = <0x6c40000 0x400000>;
136 read-only;
137 };
138
139 partition@6e40000 {
140 label = "nand-filesystem";
141 reg = <0x6e40000 0x400000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &pcie0 {
149 status = "okay";
150 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
151 };
152
153 &pcie_bridge0 {
154 wifi@0,0{
155 compatible = "pci168c,002e";
156 reg = <0 0 0 0 0>;
157 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
158 };
159 };
160
161 &gpio {
162 pinctrl-names = "default";
163 pinctrl-0 = <&state_default>;
164
165 state_default: pinmux {
166 pcie-rst {
167 lantiq,pins = "io11";
168 lantiq,open-drain = <1>;
169 lantiq,output = <1>;
170 };
171 };
172 };
173
174 &gphy0 {
175 lantiq,gphy-mode = <GPHY_MODE_FE>;
176 };
177
178 &eth0 {
179 lantiq,phys = <&gphy0>;
180
181 interface@0 {
182 compatible = "lantiq,xrx200-pdi";
183 #address-cells = <1>;
184 #size-cells = <0>;
185 reg = <0>;
186 mac-address = [ 00 11 22 33 44 55 ];
187 lantiq,switch;
188
189 ethernet@2 {
190 compatible = "lantiq,xrx200-pdi-port";
191 reg = <2>;
192 phy-mode = "mii";
193 phy-handle = <&phy11>;
194 };
195 };
196
197 mdio {
198 #address-cells = <1>;
199 #size-cells = <0>;
200 compatible = "lantiq,xrx200-mdio";
201
202 phy11: ethernet-phy@11 {
203 reg = <0x11>;
204 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
205 };
206 };
207 };