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