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