xref: /freebsd-src/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-freecom-fsg-3.dts (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: ISC
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree file for the Freecom FSG-3 router.
4f126890aSEmmanuel Vadot * This machine is based on IXP425.
5f126890aSEmmanuel Vadot * This device tree is inspired by the board file by Rod Whitby.
6f126890aSEmmanuel Vadot */
7f126890aSEmmanuel Vadot
8f126890aSEmmanuel Vadot/dts-v1/;
9f126890aSEmmanuel Vadot
10f126890aSEmmanuel Vadot#include "intel-ixp42x.dtsi"
11f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
12f126890aSEmmanuel Vadot
13f126890aSEmmanuel Vadot/ {
14f126890aSEmmanuel Vadot	model = "Freecom FSG-3";
15f126890aSEmmanuel Vadot	compatible = "freecom,fsg-3", "intel,ixp42x";
16f126890aSEmmanuel Vadot	#address-cells = <1>;
17f126890aSEmmanuel Vadot	#size-cells = <1>;
18f126890aSEmmanuel Vadot
19f126890aSEmmanuel Vadot	memory@0 {
20f126890aSEmmanuel Vadot		/* 64 MB memory */
21f126890aSEmmanuel Vadot		device_type = "memory";
22f126890aSEmmanuel Vadot		reg = <0x00000000 0x4000000>;
23f126890aSEmmanuel Vadot	};
24f126890aSEmmanuel Vadot
25f126890aSEmmanuel Vadot	chosen {
26f126890aSEmmanuel Vadot		/* Boot from the first partition on the hard drive */
27f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootfstype=ext4 rootwait";
28f126890aSEmmanuel Vadot		stdout-path = "uart0:115200n8";
29f126890aSEmmanuel Vadot	};
30f126890aSEmmanuel Vadot
31f126890aSEmmanuel Vadot	aliases {
32f126890aSEmmanuel Vadot		serial0 = &uart0;
33f126890aSEmmanuel Vadot	};
34f126890aSEmmanuel Vadot
35f126890aSEmmanuel Vadot	gpio_keys {
36f126890aSEmmanuel Vadot		compatible = "gpio-keys";
37f126890aSEmmanuel Vadot
38f126890aSEmmanuel Vadot		button-sync {
39f126890aSEmmanuel Vadot			wakeup-source;
40f126890aSEmmanuel Vadot			/* Closest approximation of what the key should do */
41f126890aSEmmanuel Vadot			linux,code = <KEY_CONNECT>;
42f126890aSEmmanuel Vadot			label = "sync";
43f126890aSEmmanuel Vadot			gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
44f126890aSEmmanuel Vadot		};
45f126890aSEmmanuel Vadot		button-reset {
46f126890aSEmmanuel Vadot			wakeup-source;
47*84943d6fSEmmanuel Vadot			linux,code = <KEY_RESTART>;
48f126890aSEmmanuel Vadot			label = "reset";
49f126890aSEmmanuel Vadot			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
50f126890aSEmmanuel Vadot		};
51f126890aSEmmanuel Vadot		button-usb {
52f126890aSEmmanuel Vadot			wakeup-source;
53f126890aSEmmanuel Vadot			/* Unplug USB, closest approximation of what the key should do */
54f126890aSEmmanuel Vadot			linux,code = <KEY_EJECTCD>;
55f126890aSEmmanuel Vadot			label = "usb";
56f126890aSEmmanuel Vadot			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
57f126890aSEmmanuel Vadot		};
58f126890aSEmmanuel Vadot	};
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot	i2c {
61f126890aSEmmanuel Vadot		compatible = "i2c-gpio";
62f126890aSEmmanuel Vadot		sda-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
63f126890aSEmmanuel Vadot		scl-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
64f126890aSEmmanuel Vadot		#address-cells = <1>;
65f126890aSEmmanuel Vadot		#size-cells = <0>;
66f126890aSEmmanuel Vadot
67f126890aSEmmanuel Vadot		hwmon@28 {
68f126890aSEmmanuel Vadot			/*
69f126890aSEmmanuel Vadot			 * Temperature sensor and fan control chip.
70f126890aSEmmanuel Vadot			 *
71f126890aSEmmanuel Vadot			 * TODO: create a proper device tree binding for
72f126890aSEmmanuel Vadot			 * the sensor and temperature zone and create a
73f126890aSEmmanuel Vadot			 * zone with fan control.
74f126890aSEmmanuel Vadot			 */
75f126890aSEmmanuel Vadot			compatible = "winbond,w83781d";
76f126890aSEmmanuel Vadot			reg = <0x28>;
77f126890aSEmmanuel Vadot		};
78f126890aSEmmanuel Vadot		rtc@6f {
79f126890aSEmmanuel Vadot			compatible = "isil,isl1208";
80f126890aSEmmanuel Vadot			reg = <0x6f>;
81f126890aSEmmanuel Vadot		};
82f126890aSEmmanuel Vadot	};
83f126890aSEmmanuel Vadot
84f126890aSEmmanuel Vadot	soc {
85f126890aSEmmanuel Vadot		bus@c4000000 {
86f126890aSEmmanuel Vadot			flash@0,0 {
87f126890aSEmmanuel Vadot				compatible = "intel,ixp4xx-flash", "cfi-flash";
88f126890aSEmmanuel Vadot				bank-width = <2>;
89f126890aSEmmanuel Vadot				/* Enable writes on the expansion bus */
90f126890aSEmmanuel Vadot				intel,ixp4xx-eb-write-enable = <1>;
91f126890aSEmmanuel Vadot				/* 4 MB of Flash mapped in at CS0 */
92f126890aSEmmanuel Vadot				reg = <0 0x00000000 0x400000>;
93f126890aSEmmanuel Vadot
94f126890aSEmmanuel Vadot				partitions {
95f126890aSEmmanuel Vadot					compatible = "redboot-fis";
96f126890aSEmmanuel Vadot					/* Eraseblock at 0x3e0000 */
97f126890aSEmmanuel Vadot					fis-index-block = <0x1f>;
98f126890aSEmmanuel Vadot				};
99f126890aSEmmanuel Vadot			};
100f126890aSEmmanuel Vadot
101f126890aSEmmanuel Vadot			/* Small syscon with some LEDs at CS2 */
102f126890aSEmmanuel Vadot			syscon@2,0 {
103f126890aSEmmanuel Vadot				compatible = "freecom,fsg-cs2-system-controller", "syscon";
104f126890aSEmmanuel Vadot				reg = <2 0x0 0x200>;
105f126890aSEmmanuel Vadot				reg-io-width = <2>;
106f126890aSEmmanuel Vadot				#address-cells = <1>;
107f126890aSEmmanuel Vadot				#size-cells = <1>;
108f126890aSEmmanuel Vadot				ranges = <2 0x0 0x0 0x200>;
109f126890aSEmmanuel Vadot
110f126890aSEmmanuel Vadot				led@0,0 {
111f126890aSEmmanuel Vadot					compatible = "register-bit-led";
112f126890aSEmmanuel Vadot					reg = <0x00 0x02>;
113f126890aSEmmanuel Vadot					mask = <0x01>;
114f126890aSEmmanuel Vadot					label = "fsg:blue:wlan";
115f126890aSEmmanuel Vadot					linux,default-trigger = "wlan";
116f126890aSEmmanuel Vadot					default-state = "on";
117f126890aSEmmanuel Vadot				};
118f126890aSEmmanuel Vadot				led@0,1 {
119f126890aSEmmanuel Vadot					compatible = "register-bit-led";
120f126890aSEmmanuel Vadot					reg = <0x00 0x02>;
121f126890aSEmmanuel Vadot					mask = <0x02>;
122f126890aSEmmanuel Vadot					label = "fsg:blue:wan";
123f126890aSEmmanuel Vadot					linux,default-trigger = "";
124f126890aSEmmanuel Vadot					default-state = "on";
125f126890aSEmmanuel Vadot				};
126f126890aSEmmanuel Vadot				led@0,2 {
127f126890aSEmmanuel Vadot					compatible = "register-bit-led";
128f126890aSEmmanuel Vadot					reg = <0x00 0x02>;
129f126890aSEmmanuel Vadot					mask = <0x04>;
130f126890aSEmmanuel Vadot					label = "fsg:blue:sata";
131f126890aSEmmanuel Vadot					linux,default-trigger = "";
132f126890aSEmmanuel Vadot					default-state = "on";
133f126890aSEmmanuel Vadot				};
134f126890aSEmmanuel Vadot				led@0,3 {
135f126890aSEmmanuel Vadot					compatible = "register-bit-led";
136f126890aSEmmanuel Vadot					reg = <0x00 0x02>;
137f126890aSEmmanuel Vadot					mask = <0x04>;
138f126890aSEmmanuel Vadot					label = "fsg:blue:usb";
139f126890aSEmmanuel Vadot					linux,default-trigger = "";
140f126890aSEmmanuel Vadot					default-state = "on";
141f126890aSEmmanuel Vadot				};
142f126890aSEmmanuel Vadot				led@0,4 {
143f126890aSEmmanuel Vadot					compatible = "register-bit-led";
144f126890aSEmmanuel Vadot					reg = <0x00 0x02>;
145f126890aSEmmanuel Vadot					mask = <0x08>;
146f126890aSEmmanuel Vadot					label = "fsg:blue:sync";
147f126890aSEmmanuel Vadot					linux,default-trigger = "";
148f126890aSEmmanuel Vadot					default-state = "on";
149f126890aSEmmanuel Vadot				};
150f126890aSEmmanuel Vadot				led@0,5 {
151f126890aSEmmanuel Vadot					compatible = "register-bit-led";
152f126890aSEmmanuel Vadot					reg = <0x00 0x02>;
153f126890aSEmmanuel Vadot					mask = <0x10>;
154f126890aSEmmanuel Vadot					label = "fsg:blue:ring";
155f126890aSEmmanuel Vadot					linux,default-trigger = "";
156f126890aSEmmanuel Vadot					default-state = "on";
157f126890aSEmmanuel Vadot				};
158f126890aSEmmanuel Vadot			};
159f126890aSEmmanuel Vadot		};
160f126890aSEmmanuel Vadot
161f126890aSEmmanuel Vadot		pci@c0000000 {
162f126890aSEmmanuel Vadot			status = "okay";
163f126890aSEmmanuel Vadot
164f126890aSEmmanuel Vadot			/*
165f126890aSEmmanuel Vadot			 * Written based on the FSG-3 PCI boardfile.
166f126890aSEmmanuel Vadot			 * We have slots 12, 13 & 14 (IDSEL) with one IRQ each.
167f126890aSEmmanuel Vadot			 */
168f126890aSEmmanuel Vadot			#interrupt-cells = <1>;
169f126890aSEmmanuel Vadot			interrupt-map-mask = <0xf800 0 0 7>;
170f126890aSEmmanuel Vadot			interrupt-map =
171f126890aSEmmanuel Vadot			/* IDSEL 12 */
172f126890aSEmmanuel Vadot			<0x6000 0 0 1 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 12 is irq 5 */
173f126890aSEmmanuel Vadot			<0x6000 0 0 2 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 12 is irq 5 */
174f126890aSEmmanuel Vadot			<0x6000 0 0 3 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 12 is irq 5 */
175f126890aSEmmanuel Vadot			<0x6000 0 0 4 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 12 is irq 5 */
176f126890aSEmmanuel Vadot			/* IDSEL 13 */
177f126890aSEmmanuel Vadot			<0x6800 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 13 is irq 7 */
178f126890aSEmmanuel Vadot			<0x6800 0 0 2 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 13 is irq 7 */
179f126890aSEmmanuel Vadot			<0x6800 0 0 3 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 13 is irq 7 */
180f126890aSEmmanuel Vadot			<0x6800 0 0 4 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 13 is irq 7 */
181f126890aSEmmanuel Vadot			/* IDSEL 14 */
182f126890aSEmmanuel Vadot			<0x7000 0 0 1 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 6 */
183f126890aSEmmanuel Vadot			<0x7000 0 0 2 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 14 is irq 6 */
184f126890aSEmmanuel Vadot			<0x7000 0 0 3 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 14 is irq 6 */
185f126890aSEmmanuel Vadot			<0x7000 0 0 4 &gpio0 6 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 14 is irq 6 */
186f126890aSEmmanuel Vadot		};
187f126890aSEmmanuel Vadot
188f126890aSEmmanuel Vadot		/* EthB */
189f126890aSEmmanuel Vadot		ethernet@c8009000 {
190f126890aSEmmanuel Vadot			status = "okay";
191f126890aSEmmanuel Vadot			queue-rx = <&qmgr 3>;
192f126890aSEmmanuel Vadot			queue-txready = <&qmgr 20>;
193f126890aSEmmanuel Vadot			phy-mode = "rgmii";
194f126890aSEmmanuel Vadot			phy-handle = <&phy5>;
195f126890aSEmmanuel Vadot
196f126890aSEmmanuel Vadot			mdio {
197f126890aSEmmanuel Vadot				#address-cells = <1>;
198f126890aSEmmanuel Vadot				#size-cells = <0>;
199f126890aSEmmanuel Vadot
200f126890aSEmmanuel Vadot				phy4: ethernet-phy@4 {
201f126890aSEmmanuel Vadot					reg = <4>;
202f126890aSEmmanuel Vadot				};
203f126890aSEmmanuel Vadot
204f126890aSEmmanuel Vadot				phy5: ethernet-phy@5 {
205f126890aSEmmanuel Vadot					reg = <5>;
206f126890aSEmmanuel Vadot				};
207f126890aSEmmanuel Vadot			};
208f126890aSEmmanuel Vadot		};
209f126890aSEmmanuel Vadot
210f126890aSEmmanuel Vadot		/* EthC */
211f126890aSEmmanuel Vadot		ethernet@c800a000 {
212f126890aSEmmanuel Vadot			status = "okay";
213f126890aSEmmanuel Vadot			queue-rx = <&qmgr 4>;
214f126890aSEmmanuel Vadot			queue-txready = <&qmgr 21>;
215f126890aSEmmanuel Vadot			phy-mode = "rgmii";
216f126890aSEmmanuel Vadot			phy-handle = <&phy4>;
217f126890aSEmmanuel Vadot		};
218f126890aSEmmanuel Vadot	};
219f126890aSEmmanuel Vadot};
220