xref: /freebsd/sys/contrib/device-tree/src/xtensa/xtfpga.dtsi (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*c66ec88fSEmmanuel Vadot/ {
3*c66ec88fSEmmanuel Vadot	compatible = "cdns,xtensa-xtfpga";
4*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
5*c66ec88fSEmmanuel Vadot	#size-cells = <1>;
6*c66ec88fSEmmanuel Vadot	interrupt-parent = <&pic>;
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel Vadot	chosen {
9*c66ec88fSEmmanuel Vadot		bootargs = "earlycon=uart8250,mmio32native,0xfd050020,115200n8 console=ttyS0,115200n8 ip=dhcp root=/dev/nfs rw debug";
10*c66ec88fSEmmanuel Vadot	};
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadot	memory@0 {
13*c66ec88fSEmmanuel Vadot		device_type = "memory";
14*c66ec88fSEmmanuel Vadot		reg = <0x00000000 0x06000000>;
15*c66ec88fSEmmanuel Vadot	};
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel Vadot	cpus {
18*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
19*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
20*c66ec88fSEmmanuel Vadot		cpu@0 {
21*c66ec88fSEmmanuel Vadot			compatible = "cdns,xtensa-cpu";
22*c66ec88fSEmmanuel Vadot			reg = <0>;
23*c66ec88fSEmmanuel Vadot			clocks = <&osc>;
24*c66ec88fSEmmanuel Vadot		};
25*c66ec88fSEmmanuel Vadot	};
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot	pic: pic {
28*c66ec88fSEmmanuel Vadot		compatible = "cdns,xtensa-pic";
29*c66ec88fSEmmanuel Vadot		/* one cell: internal irq number,
30*c66ec88fSEmmanuel Vadot		 * two cells: second cell == 0: internal irq number
31*c66ec88fSEmmanuel Vadot		 *            second cell == 1: external irq number
32*c66ec88fSEmmanuel Vadot		 */
33*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
34*c66ec88fSEmmanuel Vadot		interrupt-controller;
35*c66ec88fSEmmanuel Vadot	};
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadot	clocks {
38*c66ec88fSEmmanuel Vadot		clk54: clk54 {
39*c66ec88fSEmmanuel Vadot			#clock-cells = <0>;
40*c66ec88fSEmmanuel Vadot			compatible = "fixed-clock";
41*c66ec88fSEmmanuel Vadot			clock-frequency = <54000000>;
42*c66ec88fSEmmanuel Vadot		};
43*c66ec88fSEmmanuel Vadot	};
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadot	soc {
46*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
47*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
48*c66ec88fSEmmanuel Vadot		compatible = "simple-bus";
49*c66ec88fSEmmanuel Vadot		ranges = <0x00000000 0xf0000000 0x10000000>;
50*c66ec88fSEmmanuel Vadot
51*c66ec88fSEmmanuel Vadot		osc: main-oscillator {
52*c66ec88fSEmmanuel Vadot			#clock-cells = <0>;
53*c66ec88fSEmmanuel Vadot			compatible = "cdns,xtfpga-clock";
54*c66ec88fSEmmanuel Vadot			reg = <0x0d020004 0x4>;
55*c66ec88fSEmmanuel Vadot		};
56*c66ec88fSEmmanuel Vadot
57*c66ec88fSEmmanuel Vadot		serial0: serial@0d050020 {
58*c66ec88fSEmmanuel Vadot			device_type = "serial";
59*c66ec88fSEmmanuel Vadot			compatible = "ns16550a";
60*c66ec88fSEmmanuel Vadot			no-loopback-test;
61*c66ec88fSEmmanuel Vadot			reg = <0x0d050020 0x20>;
62*c66ec88fSEmmanuel Vadot			reg-shift = <2>;
63*c66ec88fSEmmanuel Vadot			reg-io-width = <4>;
64*c66ec88fSEmmanuel Vadot			native-endian;
65*c66ec88fSEmmanuel Vadot			interrupts = <0 1>; /* external irq 0 */
66*c66ec88fSEmmanuel Vadot			clocks = <&osc>;
67*c66ec88fSEmmanuel Vadot		};
68*c66ec88fSEmmanuel Vadot
69*c66ec88fSEmmanuel Vadot		enet0: ethoc@0d030000 {
70*c66ec88fSEmmanuel Vadot			compatible = "opencores,ethoc";
71*c66ec88fSEmmanuel Vadot			reg = <0x0d030000 0x4000 0x0d800000 0x4000>;
72*c66ec88fSEmmanuel Vadot			native-endian;
73*c66ec88fSEmmanuel Vadot			interrupts = <1 1>; /* external irq 1 */
74*c66ec88fSEmmanuel Vadot			local-mac-address = [00 50 c2 13 6f 00];
75*c66ec88fSEmmanuel Vadot			clocks = <&osc>;
76*c66ec88fSEmmanuel Vadot		};
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot		i2s0: xtfpga-i2s@0d080000 {
79*c66ec88fSEmmanuel Vadot			#sound-dai-cells = <0>;
80*c66ec88fSEmmanuel Vadot			compatible = "cdns,xtfpga-i2s";
81*c66ec88fSEmmanuel Vadot			reg = <0x0d080000 0x40>;
82*c66ec88fSEmmanuel Vadot			interrupts = <2 1>; /* external irq 2 */
83*c66ec88fSEmmanuel Vadot			clocks = <&cdce706 4>;
84*c66ec88fSEmmanuel Vadot		};
85*c66ec88fSEmmanuel Vadot
86*c66ec88fSEmmanuel Vadot		i2c0: i2c-master@0d090000 {
87*c66ec88fSEmmanuel Vadot			compatible = "opencores,i2c-ocores";
88*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
89*c66ec88fSEmmanuel Vadot			#size-cells = <0>;
90*c66ec88fSEmmanuel Vadot			reg = <0x0d090000 0x20>;
91*c66ec88fSEmmanuel Vadot			reg-shift = <2>;
92*c66ec88fSEmmanuel Vadot			reg-io-width = <4>;
93*c66ec88fSEmmanuel Vadot			native-endian;
94*c66ec88fSEmmanuel Vadot			interrupts = <4 1>;
95*c66ec88fSEmmanuel Vadot			clocks = <&osc>;
96*c66ec88fSEmmanuel Vadot
97*c66ec88fSEmmanuel Vadot			cdce706: clock-synth@69 {
98*c66ec88fSEmmanuel Vadot				compatible = "ti,cdce706";
99*c66ec88fSEmmanuel Vadot				#clock-cells = <1>;
100*c66ec88fSEmmanuel Vadot				reg = <0x69>;
101*c66ec88fSEmmanuel Vadot				clocks = <&clk54>;
102*c66ec88fSEmmanuel Vadot				clock-names = "clk_in0";
103*c66ec88fSEmmanuel Vadot			};
104*c66ec88fSEmmanuel Vadot		};
105*c66ec88fSEmmanuel Vadot
106*c66ec88fSEmmanuel Vadot		spi0: spi@0d0a0000 {
107*c66ec88fSEmmanuel Vadot			compatible = "cdns,xtfpga-spi";
108*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
109*c66ec88fSEmmanuel Vadot			#size-cells = <0>;
110*c66ec88fSEmmanuel Vadot			reg = <0x0d0a0000 0xc>;
111*c66ec88fSEmmanuel Vadot
112*c66ec88fSEmmanuel Vadot			tlv320aic23: sound-codec@0 {
113*c66ec88fSEmmanuel Vadot				#sound-dai-cells = <0>;
114*c66ec88fSEmmanuel Vadot				compatible = "tlv320aic23";
115*c66ec88fSEmmanuel Vadot				reg = <0>;
116*c66ec88fSEmmanuel Vadot				spi-max-frequency = <12500000>;
117*c66ec88fSEmmanuel Vadot			};
118*c66ec88fSEmmanuel Vadot		};
119*c66ec88fSEmmanuel Vadot	};
120*c66ec88fSEmmanuel Vadot
121*c66ec88fSEmmanuel Vadot	sound {
122*c66ec88fSEmmanuel Vadot		compatible = "simple-audio-card";
123*c66ec88fSEmmanuel Vadot		simple-audio-card,format = "i2s";
124*c66ec88fSEmmanuel Vadot		simple-audio-card,mclk-fs = <256>;
125*c66ec88fSEmmanuel Vadot
126*c66ec88fSEmmanuel Vadot		simple-audio-card,cpu {
127*c66ec88fSEmmanuel Vadot			sound-dai = <&i2s0>;
128*c66ec88fSEmmanuel Vadot		};
129*c66ec88fSEmmanuel Vadot
130*c66ec88fSEmmanuel Vadot		simple-audio-card,codec {
131*c66ec88fSEmmanuel Vadot			sound-dai = <&tlv320aic23>;
132*c66ec88fSEmmanuel Vadot			simple-audio-card,bitclock-master = <0>;
133*c66ec88fSEmmanuel Vadot			simple-audio-card,frame-master = <0>;
134*c66ec88fSEmmanuel Vadot			clocks = <&cdce706 4>;
135*c66ec88fSEmmanuel Vadot		};
136*c66ec88fSEmmanuel Vadot	};
137*c66ec88fSEmmanuel Vadot};
138