xref: /freebsd-src/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp43x-gateworks-gw2358.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: ISC
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device Tree file for Gateworks IXP43x-based Cambria GW2358
4*f126890aSEmmanuel Vadot */
5*f126890aSEmmanuel Vadot
6*f126890aSEmmanuel Vadot/dts-v1/;
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot#include "intel-ixp43x.dtsi"
9*f126890aSEmmanuel Vadot
10*f126890aSEmmanuel Vadot/ {
11*f126890aSEmmanuel Vadot	model = "Gateworks Cambria GW2358";
12*f126890aSEmmanuel Vadot	compatible = "gateworks,gw2358", "intel,ixp43x";
13*f126890aSEmmanuel Vadot	#address-cells = <1>;
14*f126890aSEmmanuel Vadot	#size-cells = <1>;
15*f126890aSEmmanuel Vadot
16*f126890aSEmmanuel Vadot	memory@0 {
17*f126890aSEmmanuel Vadot		/* 128 MB SDRAM */
18*f126890aSEmmanuel Vadot		device_type = "memory";
19*f126890aSEmmanuel Vadot		reg = <0x00000000 0x8000000>;
20*f126890aSEmmanuel Vadot	};
21*f126890aSEmmanuel Vadot
22*f126890aSEmmanuel Vadot	chosen {
23*f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
24*f126890aSEmmanuel Vadot		stdout-path = "uart0:115200n8";
25*f126890aSEmmanuel Vadot	};
26*f126890aSEmmanuel Vadot
27*f126890aSEmmanuel Vadot	aliases {
28*f126890aSEmmanuel Vadot		serial0 = &uart0;
29*f126890aSEmmanuel Vadot	};
30*f126890aSEmmanuel Vadot
31*f126890aSEmmanuel Vadot	leds {
32*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
33*f126890aSEmmanuel Vadot		led-user {
34*f126890aSEmmanuel Vadot			label = "gw2358:green:LED";
35*f126890aSEmmanuel Vadot			gpios = <&pld1 0 GPIO_ACTIVE_LOW>;
36*f126890aSEmmanuel Vadot			default-state = "on";
37*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
38*f126890aSEmmanuel Vadot		};
39*f126890aSEmmanuel Vadot	};
40*f126890aSEmmanuel Vadot
41*f126890aSEmmanuel Vadot
42*f126890aSEmmanuel Vadot	i2c {
43*f126890aSEmmanuel Vadot		compatible = "i2c-gpio";
44*f126890aSEmmanuel Vadot		sda-gpios = <&gpio0 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
45*f126890aSEmmanuel Vadot		scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
46*f126890aSEmmanuel Vadot		#address-cells = <1>;
47*f126890aSEmmanuel Vadot		#size-cells = <0>;
48*f126890aSEmmanuel Vadot
49*f126890aSEmmanuel Vadot		hwmon@28 {
50*f126890aSEmmanuel Vadot			compatible = "adi,ad7418";
51*f126890aSEmmanuel Vadot			reg = <0x28>;
52*f126890aSEmmanuel Vadot		};
53*f126890aSEmmanuel Vadot		rtc: ds1672@68 {
54*f126890aSEmmanuel Vadot			compatible = "dallas,ds1672";
55*f126890aSEmmanuel Vadot			reg = <0x68>;
56*f126890aSEmmanuel Vadot		};
57*f126890aSEmmanuel Vadot		eeprom@51 {
58*f126890aSEmmanuel Vadot			compatible = "atmel,24c08";
59*f126890aSEmmanuel Vadot			reg = <0x51>;
60*f126890aSEmmanuel Vadot			pagesize = <16>;
61*f126890aSEmmanuel Vadot			size = <1024>;
62*f126890aSEmmanuel Vadot			read-only;
63*f126890aSEmmanuel Vadot		};
64*f126890aSEmmanuel Vadot		pld0: pld@56 {
65*f126890aSEmmanuel Vadot			compatible = "gateworks,pld-gpio";
66*f126890aSEmmanuel Vadot			reg = <0x56>;
67*f126890aSEmmanuel Vadot			gpio-controller;
68*f126890aSEmmanuel Vadot			#gpio-cells = <2>;
69*f126890aSEmmanuel Vadot		};
70*f126890aSEmmanuel Vadot		/* This PLD just handles the LED and user button */
71*f126890aSEmmanuel Vadot		pld1: pld@57 {
72*f126890aSEmmanuel Vadot			compatible = "gateworks,pld-gpio";
73*f126890aSEmmanuel Vadot			reg = <0x57>;
74*f126890aSEmmanuel Vadot			gpio-controller;
75*f126890aSEmmanuel Vadot			#gpio-cells = <2>;
76*f126890aSEmmanuel Vadot		};
77*f126890aSEmmanuel Vadot	};
78*f126890aSEmmanuel Vadot
79*f126890aSEmmanuel Vadot	soc {
80*f126890aSEmmanuel Vadot		bus@c4000000 {
81*f126890aSEmmanuel Vadot			flash@0,0 {
82*f126890aSEmmanuel Vadot				compatible = "intel,ixp4xx-flash", "cfi-flash";
83*f126890aSEmmanuel Vadot				bank-width = <2>;
84*f126890aSEmmanuel Vadot				/* Enable writes on the expansion bus */
85*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-write-enable = <1>;
86*f126890aSEmmanuel Vadot				/*
87*f126890aSEmmanuel Vadot				 * 32 MB of Flash in 0x20000 byte blocks
88*f126890aSEmmanuel Vadot				 * mapped in at CS0 and CS1
89*f126890aSEmmanuel Vadot				 */
90*f126890aSEmmanuel Vadot				reg = <0 0x00000000 0x2000000>;
91*f126890aSEmmanuel Vadot
92*f126890aSEmmanuel Vadot				partitions {
93*f126890aSEmmanuel Vadot					compatible = "redboot-fis";
94*f126890aSEmmanuel Vadot					/* Eraseblock at 0x1fe0000 */
95*f126890aSEmmanuel Vadot					fis-index-block = <0xff>;
96*f126890aSEmmanuel Vadot				};
97*f126890aSEmmanuel Vadot			};
98*f126890aSEmmanuel Vadot			ide@3,0 {
99*f126890aSEmmanuel Vadot				compatible = "intel,ixp4xx-compact-flash";
100*f126890aSEmmanuel Vadot				/*
101*f126890aSEmmanuel Vadot				 * Set up expansion bus config to a really slow timing.
102*f126890aSEmmanuel Vadot				 * The CF driver will dynamically reconfigure these timings
103*f126890aSEmmanuel Vadot				 * depending on selected PIO mode (0-4).
104*f126890aSEmmanuel Vadot				 */
105*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t1 = <3>; // 3 cycles extra address phase
106*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t2 = <3>; // 3 cycles extra setup phase
107*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase
108*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase
109*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase
110*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle type
111*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-byte-access-on-halfword = <1>;
112*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-mux-address-and-data = <0>;
113*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-ahb-split-transfers = <0>;
114*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-write-enable = <1>;
115*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-byte-access = <1>;
116*f126890aSEmmanuel Vadot				/* First register set is CMD second is CTL */
117*f126890aSEmmanuel Vadot				reg = <3 0xe00000 0x40000>, <3 0xe40000 0x40000>;
118*f126890aSEmmanuel Vadot				interrupt-parent = <&gpio0>;
119*f126890aSEmmanuel Vadot				interrupts = <12 IRQ_TYPE_EDGE_RISING>;
120*f126890aSEmmanuel Vadot			};
121*f126890aSEmmanuel Vadot		};
122*f126890aSEmmanuel Vadot
123*f126890aSEmmanuel Vadot		pci@c0000000 {
124*f126890aSEmmanuel Vadot			status = "okay";
125*f126890aSEmmanuel Vadot
126*f126890aSEmmanuel Vadot			/*
127*f126890aSEmmanuel Vadot			 * In the boardfile for the Cambria from OpenWRT the interrupts
128*f126890aSEmmanuel Vadot			 * are assigned one per IDSEL, so all 4 interrupts from IDSEL
129*f126890aSEmmanuel Vadot			 * 1 are connected to IRQ 11, all 4 interrupts from IDSEL 2
130*f126890aSEmmanuel Vadot			 * connected to IRQ 10 etc. I find this highly unlikely so I
131*f126890aSEmmanuel Vadot			 * have instead assumed that they are rotated (swizzled) like
132*f126890aSEmmanuel Vadot			 * this with 11, 10, 9, 8 for the 4 pins on IDSEL 1 etc.
133*f126890aSEmmanuel Vadot			 */
134*f126890aSEmmanuel Vadot			#interrupt-cells = <1>;
135*f126890aSEmmanuel Vadot			interrupt-map-mask = <0xf800 0 0 7>;
136*f126890aSEmmanuel Vadot			interrupt-map =
137*f126890aSEmmanuel Vadot			/* IDSEL 1 */
138*f126890aSEmmanuel Vadot			<0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
139*f126890aSEmmanuel Vadot			<0x0800 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 10 */
140*f126890aSEmmanuel Vadot			<0x0800 0 0 3 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 9 */
141*f126890aSEmmanuel Vadot			<0x0800 0 0 4 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */
142*f126890aSEmmanuel Vadot			/* IDSEL 2 */
143*f126890aSEmmanuel Vadot			<0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
144*f126890aSEmmanuel Vadot			<0x1000 0 0 2 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 9 */
145*f126890aSEmmanuel Vadot			<0x1000 0 0 3 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 8 */
146*f126890aSEmmanuel Vadot			<0x1000 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 2 is irq 11 */
147*f126890aSEmmanuel Vadot			/* IDSEL 3 */
148*f126890aSEmmanuel Vadot			<0x1800 0 0 1 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 9 */
149*f126890aSEmmanuel Vadot			<0x1800 0 0 2 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 8 */
150*f126890aSEmmanuel Vadot			<0x1800 0 0 3 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 11 */
151*f126890aSEmmanuel Vadot			<0x1800 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 10 */
152*f126890aSEmmanuel Vadot			/* IDSEL 4 */
153*f126890aSEmmanuel Vadot			<0x2000 0 0 1 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 8 */
154*f126890aSEmmanuel Vadot			<0x2000 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 11 */
155*f126890aSEmmanuel Vadot			<0x2000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 10 */
156*f126890aSEmmanuel Vadot			<0x2000 0 0 4 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 9 */
157*f126890aSEmmanuel Vadot			/* IDSEL 6 */
158*f126890aSEmmanuel Vadot			<0x3000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 10 */
159*f126890aSEmmanuel Vadot			<0x3000 0 0 2 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 9 */
160*f126890aSEmmanuel Vadot			<0x3000 0 0 3 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 8 */
161*f126890aSEmmanuel Vadot			<0x3000 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 11 */
162*f126890aSEmmanuel Vadot			/* IDSEL 15 */
163*f126890aSEmmanuel Vadot			<0x7800 0 0 1 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 8 */
164*f126890aSEmmanuel Vadot			<0x7800 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 11 */
165*f126890aSEmmanuel Vadot			<0x7800 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 10 */
166*f126890aSEmmanuel Vadot			<0x7800 0 0 4 &gpio0 9  IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 3 is irq 9 */
167*f126890aSEmmanuel Vadot		};
168*f126890aSEmmanuel Vadot
169*f126890aSEmmanuel Vadot		ethernet@c800a000 {
170*f126890aSEmmanuel Vadot			status = "okay";
171*f126890aSEmmanuel Vadot			queue-rx = <&qmgr 4>;
172*f126890aSEmmanuel Vadot			queue-txready = <&qmgr 21>;
173*f126890aSEmmanuel Vadot			phy-mode = "rgmii";
174*f126890aSEmmanuel Vadot			phy-handle = <&phy1>;
175*f126890aSEmmanuel Vadot
176*f126890aSEmmanuel Vadot			mdio {
177*f126890aSEmmanuel Vadot				#address-cells = <1>;
178*f126890aSEmmanuel Vadot				#size-cells = <0>;
179*f126890aSEmmanuel Vadot
180*f126890aSEmmanuel Vadot				phy1: ethernet-phy@1 {
181*f126890aSEmmanuel Vadot					reg = <1>;
182*f126890aSEmmanuel Vadot				};
183*f126890aSEmmanuel Vadot
184*f126890aSEmmanuel Vadot				phy2: ethernet-phy@2 {
185*f126890aSEmmanuel Vadot					reg = <2>;
186*f126890aSEmmanuel Vadot				};
187*f126890aSEmmanuel Vadot			};
188*f126890aSEmmanuel Vadot		};
189*f126890aSEmmanuel Vadot
190*f126890aSEmmanuel Vadot		ethernet@c800c000 {
191*f126890aSEmmanuel Vadot			status = "okay";
192*f126890aSEmmanuel Vadot			queue-rx = <&qmgr 2>;
193*f126890aSEmmanuel Vadot			queue-txready = <&qmgr 19>;
194*f126890aSEmmanuel Vadot			phy-mode = "rgmii";
195*f126890aSEmmanuel Vadot			phy-handle = <&phy2>;
196*f126890aSEmmanuel Vadot			intel,npe-handle = <&npe 0>;
197*f126890aSEmmanuel Vadot		};
198*f126890aSEmmanuel Vadot	};
199*f126890aSEmmanuel Vadot};
200