hsdk.dts 6.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
 * Copyright (C) 2017 Synopsys, Inc. (www.synopsys.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

/*
 * Device Tree for ARC HS Development Kit
 */
/dts-v1/;

14
#include <dt-bindings/reset/snps,hsdk-reset.h>
15 16 17 18 19

/ {
	model = "snps,hsdk";
	compatible = "snps,hsdk";

20 21
	#address-cells = <2>;
	#size-cells = <2>;
22 23 24 25 26

	chosen {
		bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1";
	};

27 28 29 30
	aliases {
		ethernet = &gmac;
	};

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu@0 {
			device_type = "cpu";
			compatible = "snps,archs38";
			reg = <0>;
			clocks = <&core_clk>;
		};

		cpu@1 {
			device_type = "cpu";
			compatible = "snps,archs38";
			reg = <1>;
			clocks = <&core_clk>;
		};

		cpu@2 {
			device_type = "cpu";
			compatible = "snps,archs38";
			reg = <2>;
			clocks = <&core_clk>;
		};

		cpu@3 {
			device_type = "cpu";
			compatible = "snps,archs38";
			reg = <3>;
			clocks = <&core_clk>;
		};
	};

64
	input_clk: input-clk {
65 66
		#clock-cells = <0>;
		compatible = "fixed-clock";
67
		clock-frequency = <33333333>;
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
	};

	cpu_intc: cpu-interrupt-controller {
		compatible = "snps,archs-intc";
		interrupt-controller;
		#interrupt-cells = <1>;
	};

	idu_intc: idu-interrupt-controller {
		compatible = "snps,archs-idu-intc";
		interrupt-controller;
		#interrupt-cells = <1>;
		interrupt-parent = <&cpu_intc>;
	};

	arcpct: pct {
		compatible = "snps,archs-pct";
	};

	/* TIMER0 with interrupt for clockevent */
	timer {
		compatible = "snps,arc-timer";
		interrupts = <16>;
		interrupt-parent = <&cpu_intc>;
		clocks = <&core_clk>;
	};

	/* 64-bit Global Free Running Counter */
	gfrc {
		compatible = "snps,archs-timer-gfrc";
		clocks = <&core_clk>;
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		interrupt-parent = <&idu_intc>;

107
		ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
108

109 110 111
		cgu_rst: reset-controller@8a0 {
			compatible = "snps,hsdk-reset";
			#reset-cells = <1>;
112
			reg = <0x8a0 0x4>, <0xff0 0x4>;
113 114
		};

115 116
		core_clk: core-clk@0 {
			compatible = "snps,hsdk-core-pll-clock";
117
			reg = <0x00 0x10>, <0x14b8 0x4>;
118 119
			#clock-cells = <0>;
			clocks = <&input_clk>;
120 121 122 123 124 125 126 127

			/*
			 * Set initial core pll output frequency to 1GHz.
			 * It will be applied at the core pll driver probing
			 * on early boot.
			 */
			assigned-clocks = <&core_clk>;
			assigned-clock-rates = <1000000000>;
128 129
		};

130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
		serial: serial@5000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x5000 0x100>;
			clock-frequency = <33330000>;
			interrupts = <6>;
			baud = <115200>;
			reg-shift = <2>;
			reg-io-width = <4>;
		};

		gmacclk: gmacclk {
			compatible = "fixed-clock";
			clock-frequency = <400000000>;
			#clock-cells = <0>;
		};

		mmcclk_ciu: mmcclk-ciu {
			compatible = "fixed-clock";
148 149 150
			/*
			 * DW sdio controller has external ciu clock divider
			 * controlled via register in SDIO IP. Due to its
151 152
			 * unexpected default value (it should divide by 1
			 * but it divides by 8) SDIO IP uses wrong clock and
153
			 * works unstable (see STAR 9001204800)
154 155
			 * We switched to the minimum possible value of the
			 * divisor (div-by-2) in HSDK platform code.
156
			 * So add temporary fix and change clock frequency
157
			 * to 50000000 Hz until we fix dw sdio driver itself.
158
			 */
159
			clock-frequency = <50000000>;
160 161 162 163 164 165 166 167 168
			#clock-cells = <0>;
		};

		mmcclk_biu: mmcclk-biu {
			compatible = "fixed-clock";
			clock-frequency = <400000000>;
			#clock-cells = <0>;
		};

169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
		gpu_core_clk: gpu-core-clk {
			compatible = "fixed-clock";
			clock-frequency = <400000000>;
			#clock-cells = <0>;
		};

		gpu_dma_clk: gpu-dma-clk {
			compatible = "fixed-clock";
			clock-frequency = <400000000>;
			#clock-cells = <0>;
		};

		gpu_cfg_clk: gpu-cfg-clk {
			compatible = "fixed-clock";
			clock-frequency = <200000000>;
			#clock-cells = <0>;
		};

187 188 189 190 191 192 193 194 195 196 197 198
		dmac_core_clk: dmac-core-clk {
			compatible = "fixed-clock";
			clock-frequency = <400000000>;
			#clock-cells = <0>;
		};

		dmac_cfg_clk: dmac-gpu-cfg-clk {
			compatible = "fixed-clock";
			clock-frequency = <200000000>;
			#clock-cells = <0>;
		};

199
		gmac: ethernet@8000 {
200 201 202 203 204 205 206
			#interrupt-cells = <1>;
			compatible = "snps,dwmac";
			reg = <0x8000 0x2000>;
			interrupts = <10>;
			interrupt-names = "macirq";
			phy-mode = "rgmii";
			snps,pbl = <32>;
207
			snps,multicast-filter-bins = <256>;
208 209 210
			clocks = <&gmacclk>;
			clock-names = "stmmaceth";
			phy-handle = <&phy0>;
211 212
			resets = <&cgu_rst HSDK_ETH_RESET>;
			reset-names = "stmmaceth";
213
			mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
214
			dma-coherent;
215

216 217 218
			tx-fifo-depth = <4096>;
			rx-fifo-depth = <4096>;

219 220 221 222 223 224 225 226 227 228 229 230 231 232
			mdio {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "snps,dwmac-mdio";
				phy0: ethernet-phy@0 {
					reg = <0>;
				};
			};
		};

		ohci@60000 {
			compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
			reg = <0x60000 0x100>;
			interrupts = <15>;
233
			resets = <&cgu_rst HSDK_USB_RESET>;
234
			dma-coherent;
235 236 237 238 239 240
		};

		ehci@40000 {
			compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
			reg = <0x40000 0x100>;
			interrupts = <15>;
241
			resets = <&cgu_rst HSDK_USB_RESET>;
242
			dma-coherent;
243 244 245 246 247 248 249 250 251 252 253 254
		};

		mmc@a000 {
			compatible = "altr,socfpga-dw-mshc";
			reg = <0xa000 0x400>;
			num-slots = <1>;
			fifo-depth = <16>;
			card-detect-delay = <200>;
			clocks = <&mmcclk_biu>, <&mmcclk_ciu>;
			clock-names = "biu", "ciu";
			interrupts = <12>;
			bus-width = <4>;
255
			dma-coherent;
256
		};
257

258 259 260 261 262 263 264 265
		creg_gpio: gpio@14b0 {
			compatible = "snps,creg-gpio-hsdk";
			reg = <0x14b0 0x4>;
			gpio-controller;
			#gpio-cells = <2>;
			ngpios = <2>;
		};

266 267 268 269 270 271 272 273 274 275 276 277 278 279
		gpio: gpio@3000 {
			compatible = "snps,dw-apb-gpio";
			reg = <0x3000 0x20>;
			#address-cells = <1>;
			#size-cells = <0>;

			gpio_port_a: gpio-controller@0 {
				compatible = "snps,dw-apb-gpio-port";
				gpio-controller;
				#gpio-cells = <2>;
				snps,nr-gpios = <24>;
				reg = <0>;
			};
		};
280

281 282 283 284 285 286 287 288 289 290 291
		gpu_3d: gpu@90000 {
			compatible = "vivante,gc";
			reg = <0x90000 0x4000>;
			clocks = <&gpu_dma_clk>,
				 <&gpu_cfg_clk>,
				 <&gpu_core_clk>,
				 <&gpu_core_clk>;
			clock-names = "bus", "reg", "core", "shader";
			interrupts = <28>;
		};

292 293 294 295 296 297 298 299 300 301 302 303 304 305
		dmac: dmac@80000 {
			compatible = "snps,axi-dma-1.01a";
			reg = <0x80000 0x400>;
			interrupts = <27>;
			clocks = <&dmac_core_clk>, <&dmac_cfg_clk>;
			clock-names = "core-clk", "cfgr-clk";

			dma-channels = <4>;
			snps,dma-masters = <2>;
			snps,data-width = <3>;
			snps,block-size = <4096 4096 4096 4096>;
			snps,priority = <0 1 2 3>;
			snps,axi-max-burst-len = <16>;
		};
306 307 308
	};

	memory@80000000 {
309 310
		#address-cells = <2>;
		#size-cells = <2>;
311
		device_type = "memory";
312 313
		reg = <0x0 0x80000000 0x0 0x40000000>;  /* 1 GB lowmem */
		/*     0x1 0x00000000 0x0 0x40000000>;     1 GB highmem */
314 315
	};
};