xref: /freebsd-src/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-gateworks-gw2348.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: ISC
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device Tree file for the Gateworks Avila GW2348 board.
4*f126890aSEmmanuel Vadot * This machine is based on IXP425.
5*f126890aSEmmanuel Vadot */
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadot/dts-v1/;
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadot#include "intel-ixp42x.dtsi"
10*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
11*f126890aSEmmanuel Vadot
12*f126890aSEmmanuel Vadot/ {
13*f126890aSEmmanuel Vadot	model = "Gateworks Avila GW2348";
14*f126890aSEmmanuel Vadot	compatible = "gateworks,gw2348", "intel,ixp42x";
15*f126890aSEmmanuel Vadot	#address-cells = <1>;
16*f126890aSEmmanuel Vadot	#size-cells = <1>;
17*f126890aSEmmanuel Vadot
18*f126890aSEmmanuel Vadot	memory@0 {
19*f126890aSEmmanuel Vadot		device_type = "memory";
20*f126890aSEmmanuel Vadot		reg = <0x00000000 0x4000000>;
21*f126890aSEmmanuel Vadot	};
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot	chosen {
24*f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8";
25*f126890aSEmmanuel Vadot		stdout-path = "uart0:115200n8";
26*f126890aSEmmanuel Vadot	};
27*f126890aSEmmanuel Vadot
28*f126890aSEmmanuel Vadot	aliases {
29*f126890aSEmmanuel Vadot		serial0 = &uart0;
30*f126890aSEmmanuel Vadot	};
31*f126890aSEmmanuel Vadot
32*f126890aSEmmanuel Vadot	leds {
33*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
34*f126890aSEmmanuel Vadot		led-user {
35*f126890aSEmmanuel Vadot			label = "gw2348:green:user";
36*f126890aSEmmanuel Vadot			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
37*f126890aSEmmanuel Vadot			default-state = "on";
38*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
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	};
65*f126890aSEmmanuel Vadot
66*f126890aSEmmanuel Vadot	soc {
67*f126890aSEmmanuel Vadot		bus@c4000000 {
68*f126890aSEmmanuel Vadot			flash@0,0 {
69*f126890aSEmmanuel Vadot				compatible = "intel,ixp4xx-flash", "cfi-flash";
70*f126890aSEmmanuel Vadot				bank-width = <2>;
71*f126890aSEmmanuel Vadot				/* Enable writes on the expansion bus */
72*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-write-enable = <1>;
73*f126890aSEmmanuel Vadot				/* 16 MB of Flash mapped in at CS0 */
74*f126890aSEmmanuel Vadot				reg = <0 0x00000000 0x1000000>;
75*f126890aSEmmanuel Vadot
76*f126890aSEmmanuel Vadot				partitions {
77*f126890aSEmmanuel Vadot					compatible = "redboot-fis";
78*f126890aSEmmanuel Vadot					/* Eraseblock at 0x0fe0000 */
79*f126890aSEmmanuel Vadot					fis-index-block = <0x7f>;
80*f126890aSEmmanuel Vadot				};
81*f126890aSEmmanuel Vadot			};
82*f126890aSEmmanuel Vadot			ide@1,0 {
83*f126890aSEmmanuel Vadot				compatible = "intel,ixp4xx-compact-flash";
84*f126890aSEmmanuel Vadot				/*
85*f126890aSEmmanuel Vadot				 * Set up expansion bus config to a really slow timing.
86*f126890aSEmmanuel Vadot				 * The CF driver will dynamically reconfigure these timings
87*f126890aSEmmanuel Vadot				 * depending on selected PIO mode (0-4).
88*f126890aSEmmanuel Vadot				 */
89*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t1 = <3>; // 3 cycles extra address phase
90*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t2 = <3>; // 3 cycles extra setup phase
91*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase
92*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase
93*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase
94*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle type
95*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-byte-access-on-halfword = <1>;
96*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-mux-address-and-data = <0>;
97*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-ahb-split-transfers = <0>;
98*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-write-enable = <1>;
99*f126890aSEmmanuel Vadot				intel,ixp4xx-eb-byte-access = <1>;
100*f126890aSEmmanuel Vadot				/* First register set is CMD second is CTL (notice it uses CS2) */
101*f126890aSEmmanuel Vadot				reg = <1 0x00000000 0x1000000>, <2 0x00000000 0x1000000>;
102*f126890aSEmmanuel Vadot				interrupt-parent = <&gpio0>;
103*f126890aSEmmanuel Vadot				interrupts = <12 IRQ_TYPE_EDGE_RISING>;
104*f126890aSEmmanuel Vadot			};
105*f126890aSEmmanuel Vadot			/*
106*f126890aSEmmanuel Vadot			 * FIXME: Latch LEDs or extra UARTs at CS4
107*f126890aSEmmanuel Vadot			 */
108*f126890aSEmmanuel Vadot		};
109*f126890aSEmmanuel Vadot
110*f126890aSEmmanuel Vadot		pci@c0000000 {
111*f126890aSEmmanuel Vadot			status = "okay";
112*f126890aSEmmanuel Vadot
113*f126890aSEmmanuel Vadot			/*
114*f126890aSEmmanuel Vadot			 * Taken from Avila PCI boardfile.
115*f126890aSEmmanuel Vadot			 *
116*f126890aSEmmanuel Vadot			 * We have up to 4 slots (IDSEL) with 4 swizzled IRQs.
117*f126890aSEmmanuel Vadot			 */
118*f126890aSEmmanuel Vadot			#interrupt-cells = <1>;
119*f126890aSEmmanuel Vadot			interrupt-map-mask = <0xf800 0 0 7>;
120*f126890aSEmmanuel Vadot			interrupt-map =
121*f126890aSEmmanuel Vadot			/* IDSEL 1 */
122*f126890aSEmmanuel Vadot			<0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
123*f126890aSEmmanuel Vadot			<0x0800 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 10 */
124*f126890aSEmmanuel Vadot			<0x0800 0 0 3 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 9 */
125*f126890aSEmmanuel Vadot			<0x0800 0 0 4 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */
126*f126890aSEmmanuel Vadot			/* IDSEL 2 */
127*f126890aSEmmanuel Vadot			<0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
128*f126890aSEmmanuel Vadot			<0x1000 0 0 2 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 9 */
129*f126890aSEmmanuel Vadot			<0x1000 0 0 3 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 8 */
130*f126890aSEmmanuel Vadot			<0x1000 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 2 is irq 11 */
131*f126890aSEmmanuel Vadot			/* IDSEL 3 */
132*f126890aSEmmanuel Vadot			<0x1800 0 0 1 &gpio0 9  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 9 */
133*f126890aSEmmanuel Vadot			<0x1800 0 0 2 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 8 */
134*f126890aSEmmanuel Vadot			<0x1800 0 0 3 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 11 */
135*f126890aSEmmanuel Vadot			<0x1800 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 10 */
136*f126890aSEmmanuel Vadot			/* IDSEL 4 */
137*f126890aSEmmanuel Vadot			<0x2000 0 0 1 &gpio0 8  IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 4 is irq 8 */
138*f126890aSEmmanuel Vadot			<0x2000 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 4 is irq 11 */
139*f126890aSEmmanuel Vadot			<0x2000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 4 is irq 10 */
140*f126890aSEmmanuel Vadot			<0x2000 0 0 4 &gpio0 9  IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 4 is irq 9 */
141*f126890aSEmmanuel Vadot		};
142*f126890aSEmmanuel Vadot
143*f126890aSEmmanuel Vadot		/* EthB */
144*f126890aSEmmanuel Vadot		ethernet@c8009000 {
145*f126890aSEmmanuel Vadot			status = "okay";
146*f126890aSEmmanuel Vadot			queue-rx = <&qmgr 3>;
147*f126890aSEmmanuel Vadot			queue-txready = <&qmgr 20>;
148*f126890aSEmmanuel Vadot			phy-mode = "rgmii";
149*f126890aSEmmanuel Vadot			phy-handle = <&phy0>;
150*f126890aSEmmanuel Vadot
151*f126890aSEmmanuel Vadot			mdio {
152*f126890aSEmmanuel Vadot				#address-cells = <1>;
153*f126890aSEmmanuel Vadot				#size-cells = <0>;
154*f126890aSEmmanuel Vadot
155*f126890aSEmmanuel Vadot				phy0: ethernet-phy@0 {
156*f126890aSEmmanuel Vadot					reg = <0>;
157*f126890aSEmmanuel Vadot				};
158*f126890aSEmmanuel Vadot
159*f126890aSEmmanuel Vadot				phy1: ethernet-phy@1 {
160*f126890aSEmmanuel Vadot					reg = <1>;
161*f126890aSEmmanuel Vadot				};
162*f126890aSEmmanuel Vadot			};
163*f126890aSEmmanuel Vadot		};
164*f126890aSEmmanuel Vadot
165*f126890aSEmmanuel Vadot		/* EthC */
166*f126890aSEmmanuel Vadot		ethernet@c800a000 {
167*f126890aSEmmanuel Vadot			status = "okay";
168*f126890aSEmmanuel Vadot			queue-rx = <&qmgr 4>;
169*f126890aSEmmanuel Vadot			queue-txready = <&qmgr 21>;
170*f126890aSEmmanuel Vadot			phy-mode = "rgmii";
171*f126890aSEmmanuel Vadot			phy-handle = <&phy1>;
172*f126890aSEmmanuel Vadot		};
173*f126890aSEmmanuel Vadot	};
174*f126890aSEmmanuel Vadot};
175