162306a36Sopenharmony_ci// SPDX-License-Identifier: ISC
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Device Tree file for ADI Engineering Coyote platform.
462306a36Sopenharmony_ci * Derived from boardfiles written by MontaVista software.
562306a36Sopenharmony_ci * Ethernet set-up from OpenWrt.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci/dts-v1/;
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#include "intel-ixp42x.dtsi"
1162306a36Sopenharmony_ci#include <dt-bindings/input/input.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/ {
1462306a36Sopenharmony_ci	model = "ADI Engineering Coyote reference design";
1562306a36Sopenharmony_ci	compatible = "adieng,coyote", "intel,ixp42x";
1662306a36Sopenharmony_ci	#address-cells = <1>;
1762306a36Sopenharmony_ci	#size-cells = <1>;
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci	memory@0 {
2062306a36Sopenharmony_ci		/* CHECKME: 16 MB SDRAM minimum, maybe the Coyote actually has more */
2162306a36Sopenharmony_ci		device_type = "memory";
2262306a36Sopenharmony_ci		reg = <0x00000000 0x01000000>;
2362306a36Sopenharmony_ci	};
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci	chosen {
2662306a36Sopenharmony_ci		bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
2762306a36Sopenharmony_ci		stdout-path = "uart1:115200n8";
2862306a36Sopenharmony_ci	};
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci	aliases {
3162306a36Sopenharmony_ci		/* These are switched around */
3262306a36Sopenharmony_ci		serial0 = &uart1;
3362306a36Sopenharmony_ci		serial1 = &uart0;
3462306a36Sopenharmony_ci	};
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci	soc {
3762306a36Sopenharmony_ci		bus@c4000000 {
3862306a36Sopenharmony_ci			flash@0,0 {
3962306a36Sopenharmony_ci				compatible = "intel,ixp4xx-flash", "cfi-flash";
4062306a36Sopenharmony_ci				bank-width = <2>;
4162306a36Sopenharmony_ci				/*
4262306a36Sopenharmony_ci				 * 32 MB of Flash in 128 0x20000 sized blocks
4362306a36Sopenharmony_ci				 * mapped in at CS0 and CS1
4462306a36Sopenharmony_ci				 */
4562306a36Sopenharmony_ci				reg = <0 0x00000000 0x2000000>;
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci				/* Configure expansion bus to allow writes */
4862306a36Sopenharmony_ci				intel,ixp4xx-eb-write-enable = <1>;
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci				partitions {
5162306a36Sopenharmony_ci					compatible = "redboot-fis";
5262306a36Sopenharmony_ci					/* CHECKME: guess this is Redboot FIS */
5362306a36Sopenharmony_ci					fis-index-block = <0x1ff>;
5462306a36Sopenharmony_ci				};
5562306a36Sopenharmony_ci			};
5662306a36Sopenharmony_ci		};
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci		pci@c0000000 {
5962306a36Sopenharmony_ci			status = "okay";
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci			/*
6262306a36Sopenharmony_ci			 * Taken from Coyote PCI boardfile.
6362306a36Sopenharmony_ci			 * We have slots (IDSEL) 1 and 2 with one assigned IRQ
6462306a36Sopenharmony_ci			 * each handling all IRQs.
6562306a36Sopenharmony_ci			 */
6662306a36Sopenharmony_ci			#interrupt-cells = <1>;
6762306a36Sopenharmony_ci			interrupt-map-mask = <0xf800 0 0 7>;
6862306a36Sopenharmony_ci			interrupt-map =
6962306a36Sopenharmony_ci			/* IDSEL 1 */
7062306a36Sopenharmony_ci			<0x0800 0 0 1 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 6 */
7162306a36Sopenharmony_ci			<0x0800 0 0 2 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 6 */
7262306a36Sopenharmony_ci			<0x0800 0 0 3 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 6 */
7362306a36Sopenharmony_ci			<0x0800 0 0 4 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 6 */
7462306a36Sopenharmony_ci			/* IDSEL 2 */
7562306a36Sopenharmony_ci			<0x1000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 11 */
7662306a36Sopenharmony_ci			<0x1000 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 11 */
7762306a36Sopenharmony_ci			<0x1000 0 0 3 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 11 */
7862306a36Sopenharmony_ci			<0x1000 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 2 is irq 11 */
7962306a36Sopenharmony_ci		};
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci		/* EthB */
8262306a36Sopenharmony_ci		ethernet@c8009000 {
8362306a36Sopenharmony_ci			status = "okay";
8462306a36Sopenharmony_ci			queue-rx = <&qmgr 3>;
8562306a36Sopenharmony_ci			queue-txready = <&qmgr 20>;
8662306a36Sopenharmony_ci			phy-mode = "rgmii";
8762306a36Sopenharmony_ci			phy-handle = <&phy5>;
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci			mdio {
9062306a36Sopenharmony_ci				#address-cells = <1>;
9162306a36Sopenharmony_ci				#size-cells = <0>;
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci				phy4: ethernet-phy@4 {
9462306a36Sopenharmony_ci					reg = <4>;
9562306a36Sopenharmony_ci				};
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci				phy5: ethernet-phy@5 {
9862306a36Sopenharmony_ci					reg = <5>;
9962306a36Sopenharmony_ci				};
10062306a36Sopenharmony_ci			};
10162306a36Sopenharmony_ci		};
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci		/* EthC */
10462306a36Sopenharmony_ci		ethernet@c800a000 {
10562306a36Sopenharmony_ci			status = "okay";
10662306a36Sopenharmony_ci			queue-rx = <&qmgr 4>;
10762306a36Sopenharmony_ci			queue-txready = <&qmgr 21>;
10862306a36Sopenharmony_ci			phy-mode = "rgmii";
10962306a36Sopenharmony_ci			phy-handle = <&phy4>;
11062306a36Sopenharmony_ci		};
11162306a36Sopenharmony_ci	};
11262306a36Sopenharmony_ci};
113