xref: /linux/arch/arm/boot/dts/intel/ixp/intel-ixp42x-usrobotics-usr8200.dts (revision 06d07429858317ded2db7986113a9e0129cd599b)
1f71d371aSLinus Walleij// SPDX-License-Identifier: ISC
2f71d371aSLinus Walleij/*
3f71d371aSLinus Walleij * Device Tree file for the USRobotics USR8200 firewall
4f71d371aSLinus Walleij * VPN and NAS. Based on know-how from Peter Denison.
5f71d371aSLinus Walleij *
6f71d371aSLinus Walleij * This machine is based on IXP422, the USR internal codename
7f71d371aSLinus Walleij * is "Jeeves".
8f71d371aSLinus Walleij */
9f71d371aSLinus Walleij
10f71d371aSLinus Walleij/dts-v1/;
11f71d371aSLinus Walleij
12f71d371aSLinus Walleij#include "intel-ixp42x.dtsi"
13f71d371aSLinus Walleij#include <dt-bindings/input/input.h>
14f71d371aSLinus Walleij
15f71d371aSLinus Walleij/ {
16f71d371aSLinus Walleij	model = "USRobotics USR8200";
17f71d371aSLinus Walleij	compatible = "usr,usr8200", "intel,ixp42x";
18f71d371aSLinus Walleij	#address-cells = <1>;
19f71d371aSLinus Walleij	#size-cells = <1>;
20f71d371aSLinus Walleij
21f71d371aSLinus Walleij	memory@0 {
22f71d371aSLinus Walleij		device_type = "memory";
23f71d371aSLinus Walleij		reg = <0x00000000 0x4000000>;
24f71d371aSLinus Walleij	};
25f71d371aSLinus Walleij
26f71d371aSLinus Walleij	chosen {
27f71d371aSLinus Walleij		bootargs = "console=ttyS0,115200n8";
28f71d371aSLinus Walleij		stdout-path = "uart1:115200n8";
29f71d371aSLinus Walleij	};
30f71d371aSLinus Walleij
31f71d371aSLinus Walleij	aliases {
32f71d371aSLinus Walleij		/* These are switched around */
33f71d371aSLinus Walleij		serial0 = &uart1;
34f71d371aSLinus Walleij		serial1 = &uart0;
35f71d371aSLinus Walleij	};
36f71d371aSLinus Walleij
37f71d371aSLinus Walleij	leds {
38f71d371aSLinus Walleij		compatible = "gpio-leds";
39f71d371aSLinus Walleij		ieee1394_led: led-1394 {
40f71d371aSLinus Walleij			label = "usr8200:green:1394";
41f71d371aSLinus Walleij			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
42f71d371aSLinus Walleij			default-state = "off";
43f71d371aSLinus Walleij		};
44f71d371aSLinus Walleij		usb1_led: led-usb1 {
45f71d371aSLinus Walleij			label = "usr8200:green:usb1";
46f71d371aSLinus Walleij			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
47f71d371aSLinus Walleij			default-state = "off";
48f71d371aSLinus Walleij		};
49f71d371aSLinus Walleij		usb2_led: led-usb2 {
50f71d371aSLinus Walleij			label = "usr8200:green:usb2";
51f71d371aSLinus Walleij			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
52f71d371aSLinus Walleij			default-state = "off";
53f71d371aSLinus Walleij		};
54f71d371aSLinus Walleij		wireless_led: led-wireless {
55f71d371aSLinus Walleij			/*
56f71d371aSLinus Walleij			 * This LED is mounted inside the case but cannot be
57f71d371aSLinus Walleij			 * seen from the outside: probably USR planned at one
58f71d371aSLinus Walleij			 * point for the device to have a wireless card, then
59f71d371aSLinus Walleij			 * changed their mind and didn't mount it, leaving the
60f71d371aSLinus Walleij			 * LED in place.
61f71d371aSLinus Walleij			 */
62f71d371aSLinus Walleij			label = "usr8200:green:wireless";
63f71d371aSLinus Walleij			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
64f71d371aSLinus Walleij			default-state = "off";
65f71d371aSLinus Walleij		};
66f71d371aSLinus Walleij		pwr_led: led-pwr {
67f71d371aSLinus Walleij			label = "usr8200:green:pwr";
68f71d371aSLinus Walleij			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
69f71d371aSLinus Walleij			default-state = "on";
70f71d371aSLinus Walleij			linux,default-trigger = "heartbeat";
71f71d371aSLinus Walleij		};
72f71d371aSLinus Walleij	};
73f71d371aSLinus Walleij
74f71d371aSLinus Walleij	gpio_keys {
75f71d371aSLinus Walleij		compatible = "gpio-keys";
76f71d371aSLinus Walleij
77f71d371aSLinus Walleij		button-reset {
78f71d371aSLinus Walleij			wakeup-source;
79f71d371aSLinus Walleij			linux,code = <KEY_RESTART>;
80f71d371aSLinus Walleij			label = "reset";
81f71d371aSLinus Walleij			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
82f71d371aSLinus Walleij		};
83f71d371aSLinus Walleij	};
84f71d371aSLinus Walleij
85f71d371aSLinus Walleij	soc {
86f71d371aSLinus Walleij		bus@c4000000 {
87f71d371aSLinus Walleij			flash@0,0 {
88f71d371aSLinus Walleij				compatible = "intel,ixp4xx-flash", "cfi-flash";
89f71d371aSLinus Walleij				bank-width = <2>;
90f71d371aSLinus Walleij				/* Enable writes on the expansion bus */
91f71d371aSLinus Walleij				intel,ixp4xx-eb-write-enable = <1>;
92f71d371aSLinus Walleij				/* 16 MB of Flash mapped in at CS0 */
93f71d371aSLinus Walleij				reg = <0 0x00000000 0x1000000>;
94f71d371aSLinus Walleij
95f71d371aSLinus Walleij				partitions {
96f71d371aSLinus Walleij					compatible = "redboot-fis";
97f71d371aSLinus Walleij					/* Eraseblock at 0x0fe0000 */
98f71d371aSLinus Walleij					fis-index-block = <0x7f>;
99f71d371aSLinus Walleij				};
100f71d371aSLinus Walleij			};
101f71d371aSLinus Walleij			rtc@2,0 {
102f71d371aSLinus Walleij				/* EPSON RTC7301 DG DIL-capsule */
103f71d371aSLinus Walleij				compatible = "epson,rtc7301dg";
104f71d371aSLinus Walleij				/*
105f71d371aSLinus Walleij				 * These timing settings were found in the boardfile patch:
106f71d371aSLinus Walleij				 * IXP4XX_EXP_CS2 = 0x3fff000 | IXP4XX_EXP_BUS_SIZE(0) | IXP4XX_EXP_BUS_WR_EN |
107f71d371aSLinus Walleij				 *                  IXP4XX_EXP_BUS_CS_EN | IXP4XX_EXP_BUS_BYTE_EN;
108f71d371aSLinus Walleij				 */
109f71d371aSLinus Walleij				intel,ixp4xx-eb-t1 = <0>; // no cycles extra address phase
110f71d371aSLinus Walleij				intel,ixp4xx-eb-t2 = <0>; // no cycles extra setup phase
111f71d371aSLinus Walleij				intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase
112f71d371aSLinus Walleij				intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase
113f71d371aSLinus Walleij				intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase
114f71d371aSLinus Walleij				intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle
115f71d371aSLinus Walleij				intel,ixp4xx-eb-byte-access-on-halfword = <0>;
116f71d371aSLinus Walleij				intel,ixp4xx-eb-mux-address-and-data = <0>;
117f71d371aSLinus Walleij				intel,ixp4xx-eb-ahb-split-transfers = <0>;
118f71d371aSLinus Walleij				intel,ixp4xx-eb-write-enable = <1>;
119f71d371aSLinus Walleij				intel,ixp4xx-eb-byte-access = <1>;
120f71d371aSLinus Walleij				/* 512 bytes at CS2 */
121f71d371aSLinus Walleij				reg = <2 0x00000000 0x0000200>;
122f71d371aSLinus Walleij				reg-io-width = <1>;
123f71d371aSLinus Walleij				native-endian;
124f71d371aSLinus Walleij				/* FIXME: try to check if there is an IRQ for the RTC? */
125f71d371aSLinus Walleij			};
126f71d371aSLinus Walleij		};
127f71d371aSLinus Walleij
128f71d371aSLinus Walleij		pci@c0000000 {
129f71d371aSLinus Walleij			status = "okay";
130f71d371aSLinus Walleij
131f71d371aSLinus Walleij			/*
132f71d371aSLinus Walleij			 * Taken from USR8200 boardfile from OpenWrt
133f71d371aSLinus Walleij			 *
134f71d371aSLinus Walleij			 * We have 3 slots (IDSEL) with partly swizzled IRQs on slot 16.
135f71d371aSLinus Walleij			 * We assume the same IRQ for all pins on the remaining slots, that
136f71d371aSLinus Walleij			 * is what the boardfile was doing.
137f71d371aSLinus Walleij			 */
138f71d371aSLinus Walleij			#interrupt-cells = <1>;
139f71d371aSLinus Walleij			interrupt-map-mask = <0xf800 0 0 7>;
140f71d371aSLinus Walleij			interrupt-map =
141f71d371aSLinus Walleij			/* IDSEL 14 used for "Wireless" in the board file */
142f71d371aSLinus Walleij			<0x7000 0 0 1 &gpio0 7  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 7 */
143f71d371aSLinus Walleij			/* IDSEL 15 used for VIA VT6307 IEEE 1394 Firewire */
144f71d371aSLinus Walleij			<0x7800 0 0 1 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 15 is irq 8 */
145f71d371aSLinus Walleij			/* IDSEL 16 used for VIA VT6202 USB 2.0 4+1 */
146f71d371aSLinus Walleij			<0x8000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 16 is irq 11 */
147f71d371aSLinus Walleij			<0x8000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 16 is irq 10 */
148f71d371aSLinus Walleij			<0x8000 0 0 3 &gpio0 9  IRQ_TYPE_LEVEL_LOW>; /* INT C on slot 16 is irq 9 */
149f71d371aSLinus Walleij		};
150f71d371aSLinus Walleij
151f71d371aSLinus Walleij		gpio@c8004000 {
152f71d371aSLinus Walleij			/* Enable clock out on GPIO 15 */
153f71d371aSLinus Walleij			intel,ixp4xx-gpio15-clkout;
154f71d371aSLinus Walleij		};
155f71d371aSLinus Walleij
156f71d371aSLinus Walleij		/* EthB WAN */
157f71d371aSLinus Walleij		ethernet@c8009000 {
158f71d371aSLinus Walleij			status = "okay";
159f71d371aSLinus Walleij			queue-rx = <&qmgr 3>;
160f71d371aSLinus Walleij			queue-txready = <&qmgr 20>;
161f71d371aSLinus Walleij			phy-mode = "rgmii";
162f71d371aSLinus Walleij			phy-handle = <&phy9>;
163f71d371aSLinus Walleij
164f71d371aSLinus Walleij			mdio {
165f71d371aSLinus Walleij				#address-cells = <1>;
166f71d371aSLinus Walleij				#size-cells = <0>;
167f71d371aSLinus Walleij
168*18a1ee9dSLinus Walleij				/*
169*18a1ee9dSLinus Walleij				 * PHY 0..4 are internal to the MV88E6060 switch but appear
170*18a1ee9dSLinus Walleij				 * as independent devices.
171*18a1ee9dSLinus Walleij				 */
172*18a1ee9dSLinus Walleij				phy0: ethernet-phy@0 {
173*18a1ee9dSLinus Walleij					reg = <0>;
174*18a1ee9dSLinus Walleij				};
175*18a1ee9dSLinus Walleij				phy1: ethernet-phy@1 {
176*18a1ee9dSLinus Walleij					reg = <1>;
177*18a1ee9dSLinus Walleij				};
178*18a1ee9dSLinus Walleij				phy2: ethernet-phy@2 {
179*18a1ee9dSLinus Walleij					reg = <2>;
180*18a1ee9dSLinus Walleij				};
181*18a1ee9dSLinus Walleij				phy3: ethernet-phy@3 {
182*18a1ee9dSLinus Walleij					reg = <3>;
183*18a1ee9dSLinus Walleij				};
184*18a1ee9dSLinus Walleij
185*18a1ee9dSLinus Walleij				/* Altima AMI101L used by the WAN port */
186f71d371aSLinus Walleij				phy9: ethernet-phy@9 {
187f71d371aSLinus Walleij					reg = <9>;
188f71d371aSLinus Walleij				};
189f71d371aSLinus Walleij
190f71d371aSLinus Walleij				/* The switch uses MDIO addresses 16 thru 31 */
191f71d371aSLinus Walleij				switch@16 {
192f71d371aSLinus Walleij					compatible = "marvell,mv88e6060";
193f71d371aSLinus Walleij					reg = <16>;
194f71d371aSLinus Walleij
195f71d371aSLinus Walleij					ports {
196f71d371aSLinus Walleij						#address-cells = <1>;
197f71d371aSLinus Walleij						#size-cells = <0>;
198f71d371aSLinus Walleij
199f71d371aSLinus Walleij						port@0 {
200f71d371aSLinus Walleij							reg = <0>;
201f71d371aSLinus Walleij							label = "lan1";
202*18a1ee9dSLinus Walleij							phy-handle = <&phy0>;
203f71d371aSLinus Walleij						};
204f71d371aSLinus Walleij
205f71d371aSLinus Walleij						port@1 {
206f71d371aSLinus Walleij							reg = <1>;
207f71d371aSLinus Walleij							label = "lan2";
208*18a1ee9dSLinus Walleij							phy-handle = <&phy1>;
209f71d371aSLinus Walleij						};
210f71d371aSLinus Walleij
211f71d371aSLinus Walleij						port@2 {
212f71d371aSLinus Walleij							reg = <2>;
213f71d371aSLinus Walleij							label = "lan3";
214*18a1ee9dSLinus Walleij							phy-handle = <&phy2>;
215f71d371aSLinus Walleij						};
216f71d371aSLinus Walleij
217f71d371aSLinus Walleij						port@3 {
218f71d371aSLinus Walleij							reg = <3>;
219f71d371aSLinus Walleij							label = "lan4";
220*18a1ee9dSLinus Walleij							phy-handle = <&phy3>;
221f71d371aSLinus Walleij						};
222f71d371aSLinus Walleij
223f71d371aSLinus Walleij						port@5 {
224f71d371aSLinus Walleij							/* Port 5 is the CPU port according to the MV88E6060 datasheet */
225f71d371aSLinus Walleij							reg = <5>;
226f71d371aSLinus Walleij							phy-mode = "rgmii-id";
227f71d371aSLinus Walleij							ethernet = <&ethc>;
228f71d371aSLinus Walleij							label = "cpu";
229f71d371aSLinus Walleij							fixed-link {
230f71d371aSLinus Walleij								speed = <100>;
231f71d371aSLinus Walleij								full-duplex;
232f71d371aSLinus Walleij							};
233f71d371aSLinus Walleij						};
234f71d371aSLinus Walleij					};
235f71d371aSLinus Walleij				};
236f71d371aSLinus Walleij			};
237f71d371aSLinus Walleij		};
238f71d371aSLinus Walleij
239f71d371aSLinus Walleij		/* EthC LAN connected to the Marvell DSA Switch */
240f71d371aSLinus Walleij		ethc: ethernet@c800a000 {
241f71d371aSLinus Walleij			status = "okay";
242f71d371aSLinus Walleij			queue-rx = <&qmgr 4>;
243f71d371aSLinus Walleij			queue-txready = <&qmgr 21>;
244f71d371aSLinus Walleij			phy-mode = "rgmii";
245f71d371aSLinus Walleij			fixed-link {
246f71d371aSLinus Walleij				speed = <100>;
247f71d371aSLinus Walleij				full-duplex;
248f71d371aSLinus Walleij			};
249f71d371aSLinus Walleij		};
250f71d371aSLinus Walleij	};
251f71d371aSLinus Walleij};
252