xref: /linux/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-wrv54g.dts (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1724ba675SRob Herring// SPDX-License-Identifier: ISC
2724ba675SRob Herring/*
3724ba675SRob Herring * Device Tree file for the Linksys WRV54G router
4724ba675SRob Herring * Also known as Gemtek GTWX5715
5724ba675SRob Herring * Based on a board file by George T. Joseph and other patches.
6724ba675SRob Herring * This machine is based on IXP425.
7724ba675SRob Herring */
8724ba675SRob Herring
9724ba675SRob Herring/dts-v1/;
10724ba675SRob Herring
11724ba675SRob Herring#include "intel-ixp42x.dtsi"
12724ba675SRob Herring#include <dt-bindings/input/input.h>
13724ba675SRob Herring
14724ba675SRob Herring/ {
15724ba675SRob Herring	model = "Linksys WRV54G / Gemtek GTWX5715";
16*5b1d4d99SLinus Walleij	compatible = "linksys,wrv54g", "intel,ixp42x";
17724ba675SRob Herring	#address-cells = <1>;
18724ba675SRob Herring	#size-cells = <1>;
19724ba675SRob Herring
20724ba675SRob Herring	memory@0 {
21724ba675SRob Herring		/* 32 MB memory */
22724ba675SRob Herring		device_type = "memory";
23724ba675SRob Herring		reg = <0x00000000 0x2000000>;
24724ba675SRob Herring	};
25724ba675SRob Herring
26724ba675SRob Herring	chosen {
27724ba675SRob Herring		bootargs = "console=ttyS0,115200n8";
28724ba675SRob Herring		stdout-path = "uart1:115200n8";
29724ba675SRob Herring	};
30724ba675SRob Herring
31724ba675SRob Herring	aliases {
32724ba675SRob Herring		/* UART2 is the primary console */
33724ba675SRob Herring		serial0 = &uart1;
34724ba675SRob Herring		serial1 = &uart0;
35724ba675SRob Herring	};
36724ba675SRob Herring
37724ba675SRob Herring	/* There is an unpopulated LED slot (3) connected to GPIO 8 */
38724ba675SRob Herring	leds {
39724ba675SRob Herring		compatible = "gpio-leds";
40724ba675SRob Herring		led-power {
41724ba675SRob Herring			label = "wrv54g:yellow:power";
42724ba675SRob Herring			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
43724ba675SRob Herring			default-state = "on";
44724ba675SRob Herring			linux,default-trigger = "heartbeat";
45724ba675SRob Herring		};
46724ba675SRob Herring		led-wireless {
47724ba675SRob Herring			label = "wrv54g:yellow:wireless";
48724ba675SRob Herring			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
49724ba675SRob Herring			default-state = "on";
50724ba675SRob Herring		};
51724ba675SRob Herring		led-internet {
52724ba675SRob Herring			label = "wrv54g:yellow:internet";
53724ba675SRob Herring			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
54724ba675SRob Herring			default-state = "on";
55724ba675SRob Herring		};
56724ba675SRob Herring		led-dmz {
57724ba675SRob Herring			label = "wrv54g:green:dmz";
58724ba675SRob Herring			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
59724ba675SRob Herring			default-state = "on";
60724ba675SRob Herring		};
61724ba675SRob Herring	};
62724ba675SRob Herring
63724ba675SRob Herring	/* This set-up comes from an OpenWrt patch */
64724ba675SRob Herring	spi {
65724ba675SRob Herring		compatible = "spi-gpio";
66724ba675SRob Herring		#address-cells = <1>;
67724ba675SRob Herring		#size-cells = <0>;
68724ba675SRob Herring
69724ba675SRob Herring		sck-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
70724ba675SRob Herring		miso-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
71724ba675SRob Herring		mosi-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
72724ba675SRob Herring		cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
73724ba675SRob Herring		num-chipselects = <1>;
74724ba675SRob Herring
75724ba675SRob Herring		switch@0 {
76724ba675SRob Herring			compatible = "micrel,ks8995";
77724ba675SRob Herring			reg = <0>;
78724ba675SRob Herring			spi-max-frequency = <50000000>;
79724ba675SRob Herring		};
80724ba675SRob Herring	};
81724ba675SRob Herring
82724ba675SRob Herring	soc {
83724ba675SRob Herring		bus@c4000000 {
84724ba675SRob Herring			flash@0,0 {
85724ba675SRob Herring				compatible = "intel,ixp4xx-flash", "cfi-flash";
86724ba675SRob Herring				bank-width = <2>;
87724ba675SRob Herring				/* Enable writes on the expansion bus */
88724ba675SRob Herring				intel,ixp4xx-eb-write-enable = <1>;
89724ba675SRob Herring				/* 8 MB of Flash mapped in at CS0 */
90724ba675SRob Herring				reg = <0 0x00000000 0x00800000>;
91724ba675SRob Herring
92724ba675SRob Herring				partitions {
93724ba675SRob Herring					compatible = "fixed-partitions";
94724ba675SRob Herring					/*
95724ba675SRob Herring					 * Partition info from a boot log
96724ba675SRob Herring					 * CHECKME: not using redboot? FIS index 0x3f @7e00000?
97724ba675SRob Herring					 */
98724ba675SRob Herring					#address-cells = <1>;
99724ba675SRob Herring					#size-cells = <1>;
100724ba675SRob Herring					partition@0 {
101724ba675SRob Herring						label = "boot";
102724ba675SRob Herring						reg = <0x0 0x140000>;
103724ba675SRob Herring						read-only;
104724ba675SRob Herring					};
105724ba675SRob Herring					partition@140000 {
106724ba675SRob Herring						label = "linux";
107724ba675SRob Herring						reg = <0x140000 0x100000>;
108724ba675SRob Herring						read-only;
109724ba675SRob Herring					};
110724ba675SRob Herring					partition@240000 {
111724ba675SRob Herring						label = "root";
112724ba675SRob Herring						reg = <0x240000 0x480000>;
113724ba675SRob Herring						read-write;
114724ba675SRob Herring					};
115724ba675SRob Herring				};
116724ba675SRob Herring			};
117724ba675SRob Herring		};
118724ba675SRob Herring
119724ba675SRob Herring		pci@c0000000 {
120724ba675SRob Herring			status = "okay";
121724ba675SRob Herring
122724ba675SRob Herring			/*
123724ba675SRob Herring			 * We have up to 2 slots (IDSEL) with 2 swizzled IRQs.
124724ba675SRob Herring			 * Derived from the GTWX5715 PCI boardfile.
125724ba675SRob Herring			 */
126724ba675SRob Herring			#interrupt-cells = <1>;
127724ba675SRob Herring			interrupt-map-mask = <0xf800 0 0 7>;
128724ba675SRob Herring			interrupt-map =
129724ba675SRob Herring			/* IDSEL 0 */
130724ba675SRob Herring			<0x0000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 0 is irq 10 */
131724ba675SRob Herring			<0x0000 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 0 is irq 11 */
132724ba675SRob Herring			/* IDSEL 1 */
133724ba675SRob Herring			<0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
134724ba675SRob Herring			<0x0800 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>; /* INT B on slot 1 is irq 10 */
135724ba675SRob Herring		};
136724ba675SRob Herring
137724ba675SRob Herring		/*
138724ba675SRob Herring		 * EthB - connected to the KS8995 switch ports 1-4
139724ba675SRob Herring		 * FIXME: the boardfile defines .phy_mask = 0x1e for this port to enable output to
140724ba675SRob Herring		 * all four switch ports, also using an out of tree multiphy patch.
141724ba675SRob Herring		 * Do we need a new binding and property for this?
142724ba675SRob Herring		 */
143724ba675SRob Herring		ethernet@c8009000 {
144724ba675SRob Herring			status = "okay";
145724ba675SRob Herring			queue-rx = <&qmgr 3>;
146724ba675SRob Herring			queue-txready = <&qmgr 20>;
147724ba675SRob Herring			phy-mode = "rgmii";
148724ba675SRob Herring			phy-handle = <&phy4>;
149724ba675SRob Herring
150724ba675SRob Herring			mdio {
151724ba675SRob Herring				#address-cells = <1>;
152724ba675SRob Herring				#size-cells = <0>;
153724ba675SRob Herring
154724ba675SRob Herring				/* Should be ports 1-4 on the KS8995 switch */
155724ba675SRob Herring				phy4: ethernet-phy@4 {
156724ba675SRob Herring					reg = <4>;
157724ba675SRob Herring				};
158724ba675SRob Herring
159724ba675SRob Herring				/* Should be port 5 on the KS8995 switch */
160724ba675SRob Herring				phy5: ethernet-phy@5 {
161724ba675SRob Herring					reg = <5>;
162724ba675SRob Herring				};
163724ba675SRob Herring			};
164724ba675SRob Herring		};
165724ba675SRob Herring
166724ba675SRob Herring		/* EthC - connected to KS8995 switch port 5 */
167724ba675SRob Herring		ethernet@c800a000 {
168724ba675SRob Herring			status = "okay";
169724ba675SRob Herring			queue-rx = <&qmgr 4>;
170724ba675SRob Herring			queue-txready = <&qmgr 21>;
171724ba675SRob Herring			phy-mode = "rgmii";
172724ba675SRob Herring			phy-handle = <&phy5>;
173724ba675SRob Herring		};
174724ba675SRob Herring	};
175724ba675SRob Herring};
176