ipq806x: backport mtd adm and smem driver
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-nbg6817.dts
1 #include "qcom-ipq8065.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "ZyXEL NBG6817";
7 compatible = "zyxel,nbg6817", "qcom,ipq8065", "qcom,ipq8064";
8
9 memory@0 {
10 reg = <0x42000000 0x1e000000>;
11 device_type = "memory";
12 };
13
14 aliases {
15 mdio-gpio0 = &mdio0;
16 sdcc1 = &sdcc1;
17
18 led-boot = &power;
19 led-failsafe = &power;
20 led-running = &power;
21 led-upgrade = &power;
22 };
23
24 chosen {
25 bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1";
26 append-rootblock = "root=/dev/mmcblk0p";
27 };
28
29 keys {
30 compatible = "gpio-keys";
31 pinctrl-0 = <&button_pins>;
32 pinctrl-names = "default";
33
34 wifi {
35 label = "wifi";
36 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RFKILL>;
38 linux,input-type = <EV_SW>;
39 };
40
41 reset {
42 label = "reset";
43 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53
54 leds {
55 compatible = "gpio-leds";
56 pinctrl-0 = <&led_pins>;
57 pinctrl-names = "default";
58
59 internet {
60 label = "white:internet";
61 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
62 };
63
64 power: power {
65 label = "white:power";
66 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
67 default-state = "keep";
68 };
69
70 wifi2g {
71 label = "amber:wifi2g";
72 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
73 };
74
75 /* wifi2g amber from the manual is missing */
76
77 wifi5g {
78 label = "amber:wifi5g";
79 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
80 };
81
82 /* wifi5g amber from the manual is missing */
83 };
84 };
85
86 &qcom_pinmux {
87 button_pins: button_pins {
88 mux {
89 pins = "gpio53", "gpio54", "gpio65";
90 function = "gpio";
91 drive-strength = <2>;
92 bias-pull-up;
93 };
94 };
95
96 led_pins: led_pins {
97 mux {
98 pins = "gpio9", "gpio26", "gpio33", "gpio64";
99 function = "gpio";
100 drive-strength = <2>;
101 bias-pull-down;
102 };
103 };
104
105 mdio0_pins: mdio0_pins {
106 clk {
107 pins = "gpio1";
108 input-disable;
109 };
110 };
111
112 rgmii2_pins: rgmii2_pins {
113 tx {
114 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
115 input-disable;
116 };
117 };
118
119 spi_pins: spi_pins {
120 cs {
121 pins = "gpio20";
122 drive-strength = <12>;
123 };
124 };
125
126 usb0_pwr_en_pins: usb0_pwr_en_pins {
127 mux {
128 pins = "gpio16", "gpio17";
129 function = "gpio";
130 drive-strength = <12>;
131 };
132
133 pwr {
134 pins = "gpio17";
135 bias-pull-down;
136 output-high;
137 };
138
139 ovc {
140 pins = "gpio16";
141 bias-pull-up;
142 };
143 };
144
145 usb1_pwr_en_pins: usb1_pwr_en_pins {
146 mux {
147 pins = "gpio14", "gpio15";
148 function = "gpio";
149 drive-strength = <12>;
150 };
151
152 pwr {
153 pins = "gpio14";
154 bias-pull-down;
155 output-high;
156 };
157
158 ovc {
159 pins = "gpio15";
160 bias-pull-up;
161 };
162 };
163 };
164
165 &gsbi5 {
166 qcom,mode = <GSBI_PROT_SPI>;
167 status = "okay";
168
169 spi4: spi@1a280000 {
170 status = "okay";
171
172 pinctrl-0 = <&spi_pins>;
173 pinctrl-names = "default";
174
175 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
176
177 m25p80@0 {
178 compatible = "jedec,spi-nor";
179 #address-cells = <1>;
180 #size-cells = <1>;
181 spi-max-frequency = <51200000>;
182 reg = <0>;
183
184 partitions {
185 compatible = "qcom,smem-part";
186 };
187 };
188 };
189 };
190
191 &usb3_0 {
192 status = "okay";
193
194 pinctrl-0 = <&usb0_pwr_en_pins>;
195 pinctrl-names = "default";
196 };
197
198 &usb3_1 {
199 status = "okay";
200
201 pinctrl-0 = <&usb1_pwr_en_pins>;
202 pinctrl-names = "default";
203 };
204
205 &pcie0 {
206 status = "okay";
207 reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
208 pinctrl-0 = <&pcie0_pins>;
209 pinctrl-names = "default";
210 };
211
212 &pcie1 {
213 status = "okay";
214 reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
215 pinctrl-0 = <&pcie1_pins>;
216 pinctrl-names = "default";
217 max-link-speed = <1>;
218 };
219
220 &mdio0 {
221 status = "okay";
222
223 pinctrl-0 = <&mdio0_pins>;
224 pinctrl-names = "default";
225
226
227 phy0: ethernet-phy@0 {
228 reg = <0>;
229 qca,ar8327-initvals = <
230 0x00004 0x7600000 /* PAD0_MODE */
231 0x00008 0x1000000 /* PAD5_MODE */
232 0x0000c 0x80 /* PAD6_MODE */
233 0x000e4 0xaa545 /* MAC_POWER_SEL */
234 0x000e0 0xc74164de /* SGMII_CTRL */
235 0x0007c 0x4e /* PORT0_STATUS */
236 0x00094 0x4e /* PORT6_STATUS */
237 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
238 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
239 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
240 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
241 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
242 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
243 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
244 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
245 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
246 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
247 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
248 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
249 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
250 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
251 >;
252 };
253
254 phy4: ethernet-phy@4 {
255 reg = <4>;
256 qca,ar8327-initvals = <
257 0x000e4 0x6a545 /* MAC_POWER_SEL */
258 0x0000c 0x80 /* PAD6_MODE */
259 >;
260 };
261 };
262
263 &gmac1 {
264 status = "okay";
265 phy-mode = "rgmii";
266 qcom,id = <1>;
267 qcom,phy_mdio_addr = <4>;
268 qcom,poll_required = <0>;
269 qcom,rgmii_delay = <1>;
270 qcom,phy_mii_type = <0>;
271 qcom,emulation = <0>;
272 qcom,irq = <255>;
273 mdiobus = <&mdio0>;
274
275 pinctrl-0 = <&rgmii2_pins>;
276 pinctrl-names = "default";
277
278 fixed-link {
279 speed = <1000>;
280 full-duplex;
281 };
282 };
283
284 &gmac2 {
285 status = "okay";
286 phy-mode = "sgmii";
287 qcom,id = <2>;
288 qcom,phy_mdio_addr = <0>; /* none */
289 qcom,poll_required = <0>; /* no polling */
290 qcom,rgmii_delay = <0>;
291 qcom,phy_mii_type = <1>;
292 qcom,emulation = <0>;
293 qcom,irq = <258>;
294 mdiobus = <&mdio0>;
295
296 fixed-link {
297 speed = <1000>;
298 full-duplex;
299 };
300 };
301
302 &amba {
303 sdcc1: sdcc@12400000 {
304 status = "okay";
305 };
306 };
307
308 &adm_dma {
309 status = "okay";
310 };