xref: /freebsd/sys/contrib/device-tree/src/arm/intel/ixp/intel-ixp42x-netgear-wg302v1.dts (revision 8ccc0d235c226d84112561d453c49904398d085c)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: ISC
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree file for Netgear WG302v2 based on IXP422BB
4f126890aSEmmanuel Vadot * Derived from boardfiles written by Imre Kaloz
5f126890aSEmmanuel Vadot */
6f126890aSEmmanuel Vadot
7f126890aSEmmanuel Vadot/dts-v1/;
8f126890aSEmmanuel Vadot
9f126890aSEmmanuel Vadot#include "intel-ixp42x.dtsi"
10f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
11*8ccc0d23SEmmanuel Vadot#include <dt-bindings/leds/common.h>
12f126890aSEmmanuel Vadot
13f126890aSEmmanuel Vadot/ {
14f126890aSEmmanuel Vadot	model = "Netgear WG302 v1";
15f126890aSEmmanuel Vadot	compatible = "netgear,wg302v1", "intel,ixp42x";
16f126890aSEmmanuel Vadot	#address-cells = <1>;
17f126890aSEmmanuel Vadot	#size-cells = <1>;
18f126890aSEmmanuel Vadot
19f126890aSEmmanuel Vadot	memory@0 {
20f126890aSEmmanuel Vadot		/* 32 MB SDRAM according to boot arguments */
21f126890aSEmmanuel Vadot		device_type = "memory";
22f126890aSEmmanuel Vadot		reg = <0x00000000 0x02000000>;
23f126890aSEmmanuel Vadot	};
24f126890aSEmmanuel Vadot
25f126890aSEmmanuel Vadot	chosen {
26f126890aSEmmanuel Vadot		/* The RedBoot comes up in 9600 baud so let's keep this */
27f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,9600n8";
28f126890aSEmmanuel Vadot		stdout-path = "uart1:9600n8";
29f126890aSEmmanuel Vadot	};
30f126890aSEmmanuel Vadot
31f126890aSEmmanuel Vadot	aliases {
32f126890aSEmmanuel Vadot		/* These are switched around */
33f126890aSEmmanuel Vadot		serial0 = &uart1;
34f126890aSEmmanuel Vadot	};
35f126890aSEmmanuel Vadot
36*8ccc0d23SEmmanuel Vadot	leds {
37*8ccc0d23SEmmanuel Vadot		compatible = "gpio-leds";
38*8ccc0d23SEmmanuel Vadot		test_led: led-test {
39*8ccc0d23SEmmanuel Vadot			color = <LED_COLOR_ID_AMBER>;
40*8ccc0d23SEmmanuel Vadot			function = "test";
41*8ccc0d23SEmmanuel Vadot			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
42*8ccc0d23SEmmanuel Vadot			default-state = "off";
43*8ccc0d23SEmmanuel Vadot		};
44*8ccc0d23SEmmanuel Vadot		wlan_led: led-wlan {
45*8ccc0d23SEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
46*8ccc0d23SEmmanuel Vadot			function = LED_FUNCTION_WLAN;
47*8ccc0d23SEmmanuel Vadot			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
48*8ccc0d23SEmmanuel Vadot			default-state = "off";
49*8ccc0d23SEmmanuel Vadot			linux,default-trigger = "phy0tx";
50*8ccc0d23SEmmanuel Vadot		};
51*8ccc0d23SEmmanuel Vadot	};
52*8ccc0d23SEmmanuel Vadot
53*8ccc0d23SEmmanuel Vadot	gpio_keys {
54*8ccc0d23SEmmanuel Vadot		/* RESET is on GPIO13 which can't fire interrupts */
55*8ccc0d23SEmmanuel Vadot		compatible = "gpio-keys-polled";
56*8ccc0d23SEmmanuel Vadot		poll-interval = <100>;
57*8ccc0d23SEmmanuel Vadot
58*8ccc0d23SEmmanuel Vadot		button-reset {
59*8ccc0d23SEmmanuel Vadot			linux,code = <KEY_RESTART>;
60*8ccc0d23SEmmanuel Vadot			label = "reset";
61*8ccc0d23SEmmanuel Vadot			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
62*8ccc0d23SEmmanuel Vadot		};
63*8ccc0d23SEmmanuel Vadot	};
64*8ccc0d23SEmmanuel Vadot
65f126890aSEmmanuel Vadot	soc {
66f126890aSEmmanuel Vadot		bus@c4000000 {
67f126890aSEmmanuel Vadot			flash@0,0 {
68f126890aSEmmanuel Vadot				compatible = "intel,ixp4xx-flash", "cfi-flash";
69f126890aSEmmanuel Vadot				bank-width = <2>;
70f126890aSEmmanuel Vadot				/*
71f126890aSEmmanuel Vadot				 * 8 MB of Flash in 64 0x20000 sized blocks
72f126890aSEmmanuel Vadot				 * mapped in at CS0.
73f126890aSEmmanuel Vadot				 */
74f126890aSEmmanuel Vadot				reg = <0 0x00000000 0x800000>;
75f126890aSEmmanuel Vadot
76f126890aSEmmanuel Vadot				/* Configure expansion bus to allow writes */
77f126890aSEmmanuel Vadot				intel,ixp4xx-eb-write-enable = <1>;
78f126890aSEmmanuel Vadot
79f126890aSEmmanuel Vadot				partitions {
80f126890aSEmmanuel Vadot					compatible = "redboot-fis";
81f126890aSEmmanuel Vadot					fis-index-block = <0x3f>;
82f126890aSEmmanuel Vadot				};
83f126890aSEmmanuel Vadot			};
84f126890aSEmmanuel Vadot		};
85f126890aSEmmanuel Vadot
86f126890aSEmmanuel Vadot		pci@c0000000 {
87f126890aSEmmanuel Vadot			status = "okay";
88f126890aSEmmanuel Vadot
89f126890aSEmmanuel Vadot			/*
90*8ccc0d23SEmmanuel Vadot			 * Taken from WG302 v1 PCI boardfile (wg302v1-pci.c)
91f126890aSEmmanuel Vadot			 * We have slots (IDSEL) 1 and 2 with one assigned IRQ
92f126890aSEmmanuel Vadot			 * each handling all IRQs.
93f126890aSEmmanuel Vadot			 */
94f126890aSEmmanuel Vadot			#interrupt-cells = <1>;
95f126890aSEmmanuel Vadot			interrupt-map-mask = <0xf800 0 0 7>;
96f126890aSEmmanuel Vadot			interrupt-map =
97f126890aSEmmanuel Vadot			/* IDSEL 1 */
98f126890aSEmmanuel Vadot			<0x0800 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 8 */
99f126890aSEmmanuel Vadot			<0x0800 0 0 2 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 8 */
100f126890aSEmmanuel Vadot			<0x0800 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 8 */
101f126890aSEmmanuel Vadot			<0x0800 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */
102f126890aSEmmanuel Vadot			/* IDSEL 2 */
103*8ccc0d23SEmmanuel Vadot			<0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
104*8ccc0d23SEmmanuel Vadot			<0x1000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 10 */
105*8ccc0d23SEmmanuel Vadot			<0x1000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 10 */
106*8ccc0d23SEmmanuel Vadot			<0x1000 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 10 */
107f126890aSEmmanuel Vadot		};
108f126890aSEmmanuel Vadot
109f126890aSEmmanuel Vadot		ethernet@c8009000 {
110f126890aSEmmanuel Vadot			status = "okay";
111f126890aSEmmanuel Vadot			queue-rx = <&qmgr 3>;
112f126890aSEmmanuel Vadot			queue-txready = <&qmgr 20>;
113f126890aSEmmanuel Vadot			phy-mode = "rgmii";
114f126890aSEmmanuel Vadot			phy-handle = <&phy30>;
115f126890aSEmmanuel Vadot
116f126890aSEmmanuel Vadot			mdio {
117f126890aSEmmanuel Vadot				#address-cells = <1>;
118f126890aSEmmanuel Vadot				#size-cells = <0>;
119f126890aSEmmanuel Vadot
120f126890aSEmmanuel Vadot				phy30: ethernet-phy@30 {
121f126890aSEmmanuel Vadot					reg = <30>;
122f126890aSEmmanuel Vadot				};
123f126890aSEmmanuel Vadot			};
124f126890aSEmmanuel Vadot		};
125f126890aSEmmanuel Vadot	};
126f126890aSEmmanuel Vadot};
127