xref: /freebsd-src/sys/contrib/device-tree/src/arc/axs10x_mb.dtsi (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Support for peripherals on the AXS10x mainboard
4c66ec88fSEmmanuel Vadot *
5c66ec88fSEmmanuel Vadot * Copyright (C) 2013-15 Synopsys, Inc. (www.synopsys.com)
6c66ec88fSEmmanuel Vadot */
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadot/ {
9c66ec88fSEmmanuel Vadot	aliases {
10c66ec88fSEmmanuel Vadot		ethernet = &gmac;
11c66ec88fSEmmanuel Vadot	};
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadot	axs10x_mb {
14c66ec88fSEmmanuel Vadot		compatible = "simple-bus";
15c66ec88fSEmmanuel Vadot		#address-cells = <1>;
16c66ec88fSEmmanuel Vadot		#size-cells = <1>;
17c66ec88fSEmmanuel Vadot		ranges = <0x00000000 0x0 0xe0000000 0x10000000>;
18c66ec88fSEmmanuel Vadot		interrupt-parent = <&mb_intc>;
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel Vadot		creg_rst: reset-controller@11220 {
21c66ec88fSEmmanuel Vadot			compatible = "snps,axs10x-reset";
22c66ec88fSEmmanuel Vadot			#reset-cells = <1>;
23c66ec88fSEmmanuel Vadot			reg = <0x11220 0x4>;
24c66ec88fSEmmanuel Vadot		};
25c66ec88fSEmmanuel Vadot
26c66ec88fSEmmanuel Vadot		i2sclk: i2sclk@100a0 {
27c66ec88fSEmmanuel Vadot			compatible = "snps,axs10x-i2s-pll-clock";
28c66ec88fSEmmanuel Vadot			reg = <0x100a0 0x10>;
29c66ec88fSEmmanuel Vadot			clocks = <&i2spll_clk>;
30c66ec88fSEmmanuel Vadot			#clock-cells = <0>;
31c66ec88fSEmmanuel Vadot		};
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot		clocks {
34c66ec88fSEmmanuel Vadot			i2spll_clk: i2spll_clk {
35c66ec88fSEmmanuel Vadot				compatible = "fixed-clock";
36c66ec88fSEmmanuel Vadot				clock-frequency = <27000000>;
37c66ec88fSEmmanuel Vadot				#clock-cells = <0>;
38c66ec88fSEmmanuel Vadot			};
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot			i2cclk: i2cclk {
41c66ec88fSEmmanuel Vadot				compatible = "fixed-clock";
42c66ec88fSEmmanuel Vadot				clock-frequency = <50000000>;
43c66ec88fSEmmanuel Vadot				#clock-cells = <0>;
44c66ec88fSEmmanuel Vadot			};
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot			apbclk: apbclk {
47c66ec88fSEmmanuel Vadot				compatible = "fixed-clock";
48c66ec88fSEmmanuel Vadot				clock-frequency = <50000000>;
49c66ec88fSEmmanuel Vadot				#clock-cells = <0>;
50c66ec88fSEmmanuel Vadot			};
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadot			mmcclk: mmcclk {
53c66ec88fSEmmanuel Vadot				compatible = "fixed-clock";
54c66ec88fSEmmanuel Vadot				/*
55c66ec88fSEmmanuel Vadot				 * DW sdio controller has external ciu clock divider
56c66ec88fSEmmanuel Vadot				 * controlled via register in SDIO IP. It divides
57c66ec88fSEmmanuel Vadot				 * sdio_ref_clk (which comes from CGU) by 16 for
58c66ec88fSEmmanuel Vadot				 * default. So default mmcclk clock (which comes
59c66ec88fSEmmanuel Vadot				 * to sdk_in) is 25000000 Hz.
60c66ec88fSEmmanuel Vadot				 */
61c66ec88fSEmmanuel Vadot				clock-frequency = <25000000>;
62c66ec88fSEmmanuel Vadot				#clock-cells = <0>;
63c66ec88fSEmmanuel Vadot			};
64c66ec88fSEmmanuel Vadot		};
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot		pguclk: pguclk@10080 {
67c66ec88fSEmmanuel Vadot			compatible = "snps,axs10x-pgu-pll-clock";
68c66ec88fSEmmanuel Vadot			reg = <0x10080 0x10>, <0x110 0x10>;
69c66ec88fSEmmanuel Vadot			#clock-cells = <0>;
70c66ec88fSEmmanuel Vadot			clocks = <&input_clk>;
71c66ec88fSEmmanuel Vadot		};
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot		gmac: ethernet@18000 {
74c66ec88fSEmmanuel Vadot			#interrupt-cells = <1>;
75c66ec88fSEmmanuel Vadot			compatible = "snps,dwmac";
76c66ec88fSEmmanuel Vadot			reg = < 0x18000 0x2000 >;
77c66ec88fSEmmanuel Vadot			interrupts = < 4 >;
78c66ec88fSEmmanuel Vadot			interrupt-names = "macirq";
79c66ec88fSEmmanuel Vadot			phy-mode = "rgmii";
80c66ec88fSEmmanuel Vadot			snps,pbl = < 32 >;
81c66ec88fSEmmanuel Vadot			snps,multicast-filter-bins = <256>;
82c66ec88fSEmmanuel Vadot			clocks = <&apbclk>;
83c66ec88fSEmmanuel Vadot			clock-names = "stmmaceth";
84c66ec88fSEmmanuel Vadot			max-speed = <100>;
85c66ec88fSEmmanuel Vadot			resets = <&creg_rst 5>;
86c66ec88fSEmmanuel Vadot			reset-names = "stmmaceth";
87c66ec88fSEmmanuel Vadot			mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
88c66ec88fSEmmanuel Vadot		};
89c66ec88fSEmmanuel Vadot
90*7ef62cebSEmmanuel Vadot		usb@40000 {
91c66ec88fSEmmanuel Vadot			compatible = "generic-ehci";
92c66ec88fSEmmanuel Vadot			reg = < 0x40000 0x100 >;
93c66ec88fSEmmanuel Vadot			interrupts = < 8 >;
94c66ec88fSEmmanuel Vadot		};
95c66ec88fSEmmanuel Vadot
96*7ef62cebSEmmanuel Vadot		usb@60000 {
97c66ec88fSEmmanuel Vadot			compatible = "generic-ohci";
98c66ec88fSEmmanuel Vadot			reg = < 0x60000 0x100 >;
99c66ec88fSEmmanuel Vadot			interrupts = < 8 >;
100c66ec88fSEmmanuel Vadot		};
101c66ec88fSEmmanuel Vadot
102c66ec88fSEmmanuel Vadot		/*
103c66ec88fSEmmanuel Vadot		 * According to DW Mobile Storage databook it is required
104c66ec88fSEmmanuel Vadot		 * to use  "Hold Register" if card is enumerated in SDR12 or
105c66ec88fSEmmanuel Vadot		 * SDR25 modes.
106c66ec88fSEmmanuel Vadot		 *
107c66ec88fSEmmanuel Vadot		 * Utilization of "Hold Register" is already implemented via
108c66ec88fSEmmanuel Vadot		 * dw_mci_pltfm_prepare_command() which in its turn gets
109c66ec88fSEmmanuel Vadot		 * used through dw_mci_drv_data->prepare_command call-back.
110c66ec88fSEmmanuel Vadot		 * This call-back is used in Altera Socfpga platform and so
111c66ec88fSEmmanuel Vadot		 * we may reuse it saying that we're compatible with their
112c66ec88fSEmmanuel Vadot		 * "altr,socfpga-dw-mshc".
113c66ec88fSEmmanuel Vadot		 *
114c66ec88fSEmmanuel Vadot		 * Most probably "Hold Register" utilization is platform-
115c66ec88fSEmmanuel Vadot		 * independent requirement which means that single unified
116c66ec88fSEmmanuel Vadot		 * "snps,dw-mshc" should be enough for all users of DW MMC once
117c66ec88fSEmmanuel Vadot		 * dw_mci_pltfm_prepare_command() is used in generic platform
118c66ec88fSEmmanuel Vadot		 * code.
119c66ec88fSEmmanuel Vadot		 */
120c66ec88fSEmmanuel Vadot		mmc@15000 {
121c66ec88fSEmmanuel Vadot			compatible = "altr,socfpga-dw-mshc";
122c66ec88fSEmmanuel Vadot			reg = < 0x15000 0x400 >;
123c66ec88fSEmmanuel Vadot			fifo-depth = < 16 >;
124c66ec88fSEmmanuel Vadot			card-detect-delay = < 200 >;
125c66ec88fSEmmanuel Vadot			clocks = <&apbclk>, <&mmcclk>;
126c66ec88fSEmmanuel Vadot			clock-names = "biu", "ciu";
127c66ec88fSEmmanuel Vadot			interrupts = < 7 >;
128c66ec88fSEmmanuel Vadot			bus-width = < 4 >;
129c66ec88fSEmmanuel Vadot		};
130c66ec88fSEmmanuel Vadot
131c66ec88fSEmmanuel Vadot		uart@20000 {
132c66ec88fSEmmanuel Vadot			compatible = "snps,dw-apb-uart";
133c66ec88fSEmmanuel Vadot			reg = <0x20000 0x100>;
134c66ec88fSEmmanuel Vadot			clock-frequency = <33333333>;
135c66ec88fSEmmanuel Vadot			interrupts = <17>;
136c66ec88fSEmmanuel Vadot			baud = <115200>;
137c66ec88fSEmmanuel Vadot			reg-shift = <2>;
138c66ec88fSEmmanuel Vadot			reg-io-width = <4>;
139c66ec88fSEmmanuel Vadot		};
140c66ec88fSEmmanuel Vadot
141c66ec88fSEmmanuel Vadot		uart@21000 {
142c66ec88fSEmmanuel Vadot			compatible = "snps,dw-apb-uart";
143c66ec88fSEmmanuel Vadot			reg = <0x21000 0x100>;
144c66ec88fSEmmanuel Vadot			clock-frequency = <33333333>;
145c66ec88fSEmmanuel Vadot			interrupts = <18>;
146c66ec88fSEmmanuel Vadot			baud = <115200>;
147c66ec88fSEmmanuel Vadot			reg-shift = <2>;
148c66ec88fSEmmanuel Vadot			reg-io-width = <4>;
149c66ec88fSEmmanuel Vadot		};
150c66ec88fSEmmanuel Vadot
151c66ec88fSEmmanuel Vadot		/* UART muxed with USB data port (ttyS3) */
152c66ec88fSEmmanuel Vadot		uart@22000 {
153c66ec88fSEmmanuel Vadot			compatible = "snps,dw-apb-uart";
154c66ec88fSEmmanuel Vadot			reg = <0x22000 0x100>;
155c66ec88fSEmmanuel Vadot			clock-frequency = <33333333>;
156c66ec88fSEmmanuel Vadot			interrupts = <19>;
157c66ec88fSEmmanuel Vadot			baud = <115200>;
158c66ec88fSEmmanuel Vadot			reg-shift = <2>;
159c66ec88fSEmmanuel Vadot			reg-io-width = <4>;
160c66ec88fSEmmanuel Vadot		};
161c66ec88fSEmmanuel Vadot
162c66ec88fSEmmanuel Vadot		i2c@1d000 {
163c66ec88fSEmmanuel Vadot			compatible = "snps,designware-i2c";
164c66ec88fSEmmanuel Vadot			reg = <0x1d000 0x100>;
165c66ec88fSEmmanuel Vadot			clock-frequency = <400000>;
166c66ec88fSEmmanuel Vadot			clocks = <&i2cclk>;
167c66ec88fSEmmanuel Vadot			interrupts = <14>;
168c66ec88fSEmmanuel Vadot		};
169c66ec88fSEmmanuel Vadot
170c66ec88fSEmmanuel Vadot		i2s: i2s@1e000 {
171c66ec88fSEmmanuel Vadot			compatible = "snps,designware-i2s";
172c66ec88fSEmmanuel Vadot			reg = <0x1e000 0x100>;
173c66ec88fSEmmanuel Vadot			clocks = <&i2sclk 0>;
174c66ec88fSEmmanuel Vadot			clock-names = "i2sclk";
175c66ec88fSEmmanuel Vadot			interrupts = <15>;
176c66ec88fSEmmanuel Vadot			#sound-dai-cells = <0>;
177c66ec88fSEmmanuel Vadot		};
178c66ec88fSEmmanuel Vadot
179c66ec88fSEmmanuel Vadot		i2c@1f000 {
180c66ec88fSEmmanuel Vadot			compatible = "snps,designware-i2c";
181c66ec88fSEmmanuel Vadot			#address-cells = <1>;
182c66ec88fSEmmanuel Vadot			#size-cells = <0>;
183c66ec88fSEmmanuel Vadot			reg = <0x1f000 0x100>;
184c66ec88fSEmmanuel Vadot			clock-frequency = <400000>;
185c66ec88fSEmmanuel Vadot			clocks = <&i2cclk>;
186c66ec88fSEmmanuel Vadot			interrupts = <16>;
187c66ec88fSEmmanuel Vadot
188c66ec88fSEmmanuel Vadot			adv7511:adv7511@39{
189c66ec88fSEmmanuel Vadot				compatible="adi,adv7511";
190c66ec88fSEmmanuel Vadot				reg = <0x39>;
191c66ec88fSEmmanuel Vadot				interrupts = <23>;
192c66ec88fSEmmanuel Vadot				adi,input-depth = <8>;
193c66ec88fSEmmanuel Vadot				adi,input-colorspace = "rgb";
194c66ec88fSEmmanuel Vadot				adi,input-clock = "1x";
195c66ec88fSEmmanuel Vadot				adi,clock-delay = <0x03>;
196c66ec88fSEmmanuel Vadot				#sound-dai-cells = <0>;
197c66ec88fSEmmanuel Vadot
198c66ec88fSEmmanuel Vadot				ports {
199c66ec88fSEmmanuel Vadot					#address-cells = <1>;
200c66ec88fSEmmanuel Vadot					#size-cells = <0>;
201c66ec88fSEmmanuel Vadot
202c66ec88fSEmmanuel Vadot					/* RGB/YUV input */
203c66ec88fSEmmanuel Vadot					port@0 {
204c66ec88fSEmmanuel Vadot						reg = <0>;
205c66ec88fSEmmanuel Vadot						adv7511_input:endpoint {
206c66ec88fSEmmanuel Vadot						remote-endpoint = <&pgu_output>;
207c66ec88fSEmmanuel Vadot						};
208c66ec88fSEmmanuel Vadot					};
209c66ec88fSEmmanuel Vadot
210c66ec88fSEmmanuel Vadot					/* HDMI output */
211c66ec88fSEmmanuel Vadot					port@1 {
212c66ec88fSEmmanuel Vadot						reg = <1>;
213c66ec88fSEmmanuel Vadot						adv7511_output: endpoint {
214c66ec88fSEmmanuel Vadot							remote-endpoint = <&hdmi_connector_in>;
215c66ec88fSEmmanuel Vadot						};
216c66ec88fSEmmanuel Vadot					};
217c66ec88fSEmmanuel Vadot				};
218c66ec88fSEmmanuel Vadot			};
219c66ec88fSEmmanuel Vadot
220c66ec88fSEmmanuel Vadot			eeprom@54{
221c66ec88fSEmmanuel Vadot				compatible = "atmel,24c01";
222c66ec88fSEmmanuel Vadot				reg = <0x54>;
223c66ec88fSEmmanuel Vadot				pagesize = <0x8>;
224c66ec88fSEmmanuel Vadot			};
225c66ec88fSEmmanuel Vadot
226c66ec88fSEmmanuel Vadot			eeprom@57{
227c66ec88fSEmmanuel Vadot				compatible = "atmel,24c04";
228c66ec88fSEmmanuel Vadot				reg = <0x57>;
229c66ec88fSEmmanuel Vadot				pagesize = <0x8>;
230c66ec88fSEmmanuel Vadot			};
231c66ec88fSEmmanuel Vadot		};
232c66ec88fSEmmanuel Vadot
233c66ec88fSEmmanuel Vadot		hdmi0: connector {
234c66ec88fSEmmanuel Vadot			compatible = "hdmi-connector";
235c66ec88fSEmmanuel Vadot			type = "a";
236c66ec88fSEmmanuel Vadot			port {
237c66ec88fSEmmanuel Vadot				hdmi_connector_in: endpoint {
238c66ec88fSEmmanuel Vadot					remote-endpoint = <&adv7511_output>;
239c66ec88fSEmmanuel Vadot				};
240c66ec88fSEmmanuel Vadot			};
241c66ec88fSEmmanuel Vadot		};
242c66ec88fSEmmanuel Vadot
243c66ec88fSEmmanuel Vadot		gpio0:gpio@13000 {
244c66ec88fSEmmanuel Vadot			compatible = "snps,dw-apb-gpio";
245c66ec88fSEmmanuel Vadot			reg = <0x13000 0x1000>;
246c66ec88fSEmmanuel Vadot			#address-cells = <1>;
247c66ec88fSEmmanuel Vadot			#size-cells = <0>;
248c66ec88fSEmmanuel Vadot
249c66ec88fSEmmanuel Vadot			gpio0_banka: gpio-controller@0 {
250c66ec88fSEmmanuel Vadot				compatible = "snps,dw-apb-gpio-port";
251c66ec88fSEmmanuel Vadot				gpio-controller;
252c66ec88fSEmmanuel Vadot				#gpio-cells = <2>;
253c66ec88fSEmmanuel Vadot				snps,nr-gpios = <32>;
254c66ec88fSEmmanuel Vadot				reg = <0>;
255c66ec88fSEmmanuel Vadot			};
256c66ec88fSEmmanuel Vadot
257c66ec88fSEmmanuel Vadot			gpio0_bankb: gpio-controller@1 {
258c66ec88fSEmmanuel Vadot				compatible = "snps,dw-apb-gpio-port";
259c66ec88fSEmmanuel Vadot				gpio-controller;
260c66ec88fSEmmanuel Vadot				#gpio-cells = <2>;
261c66ec88fSEmmanuel Vadot				snps,nr-gpios = <8>;
262c66ec88fSEmmanuel Vadot				reg = <1>;
263c66ec88fSEmmanuel Vadot			};
264c66ec88fSEmmanuel Vadot
265c66ec88fSEmmanuel Vadot			gpio0_bankc: gpio-controller@2 {
266c66ec88fSEmmanuel Vadot				compatible = "snps,dw-apb-gpio-port";
267c66ec88fSEmmanuel Vadot				gpio-controller;
268c66ec88fSEmmanuel Vadot				#gpio-cells = <2>;
269c66ec88fSEmmanuel Vadot				snps,nr-gpios = <8>;
270c66ec88fSEmmanuel Vadot				reg = <2>;
271c66ec88fSEmmanuel Vadot			};
272c66ec88fSEmmanuel Vadot		};
273c66ec88fSEmmanuel Vadot
274c66ec88fSEmmanuel Vadot		gpio1:gpio@14000 {
275c66ec88fSEmmanuel Vadot			compatible = "snps,dw-apb-gpio";
276c66ec88fSEmmanuel Vadot			reg = <0x14000 0x1000>;
277c66ec88fSEmmanuel Vadot			#address-cells = <1>;
278c66ec88fSEmmanuel Vadot			#size-cells = <0>;
279c66ec88fSEmmanuel Vadot
280c66ec88fSEmmanuel Vadot			gpio1_banka: gpio-controller@0 {
281c66ec88fSEmmanuel Vadot				compatible = "snps,dw-apb-gpio-port";
282c66ec88fSEmmanuel Vadot				gpio-controller;
283c66ec88fSEmmanuel Vadot				#gpio-cells = <2>;
284c66ec88fSEmmanuel Vadot				snps,nr-gpios = <30>;
285c66ec88fSEmmanuel Vadot				reg = <0>;
286c66ec88fSEmmanuel Vadot			};
287c66ec88fSEmmanuel Vadot
288c66ec88fSEmmanuel Vadot			gpio1_bankb: gpio-controller@1 {
289c66ec88fSEmmanuel Vadot				compatible = "snps,dw-apb-gpio-port";
290c66ec88fSEmmanuel Vadot				gpio-controller;
291c66ec88fSEmmanuel Vadot				#gpio-cells = <2>;
292c66ec88fSEmmanuel Vadot				snps,nr-gpios = <10>;
293c66ec88fSEmmanuel Vadot				reg = <1>;
294c66ec88fSEmmanuel Vadot			};
295c66ec88fSEmmanuel Vadot
296c66ec88fSEmmanuel Vadot			gpio1_bankc: gpio-controller@2 {
297c66ec88fSEmmanuel Vadot				compatible = "snps,dw-apb-gpio-port";
298c66ec88fSEmmanuel Vadot				gpio-controller;
299c66ec88fSEmmanuel Vadot				#gpio-cells = <2>;
300c66ec88fSEmmanuel Vadot				snps,nr-gpios = <8>;
301c66ec88fSEmmanuel Vadot				reg = <2>;
302c66ec88fSEmmanuel Vadot			};
303c66ec88fSEmmanuel Vadot		};
304c66ec88fSEmmanuel Vadot
305c66ec88fSEmmanuel Vadot		pgu@17000 {
306c66ec88fSEmmanuel Vadot			compatible = "snps,arcpgu";
307c66ec88fSEmmanuel Vadot			reg = <0x17000 0x400>;
308c66ec88fSEmmanuel Vadot			clocks = <&pguclk>;
309c66ec88fSEmmanuel Vadot			clock-names = "pxlclk";
310c66ec88fSEmmanuel Vadot			memory-region = <&frame_buffer>;
311c66ec88fSEmmanuel Vadot			port {
312c66ec88fSEmmanuel Vadot				pgu_output: endpoint {
313c66ec88fSEmmanuel Vadot					remote-endpoint = <&adv7511_input>;
314c66ec88fSEmmanuel Vadot				};
315c66ec88fSEmmanuel Vadot			};
316c66ec88fSEmmanuel Vadot		};
317c66ec88fSEmmanuel Vadot
318c66ec88fSEmmanuel Vadot		sound_playback {
319c66ec88fSEmmanuel Vadot			compatible = "simple-audio-card";
320c66ec88fSEmmanuel Vadot			simple-audio-card,name = "AXS10x HDMI Audio";
321c66ec88fSEmmanuel Vadot			simple-audio-card,format = "i2s";
322c66ec88fSEmmanuel Vadot			simple-audio-card,cpu {
323c66ec88fSEmmanuel Vadot				sound-dai = <&i2s>;
324c66ec88fSEmmanuel Vadot			};
325c66ec88fSEmmanuel Vadot			simple-audio-card,codec {
326c66ec88fSEmmanuel Vadot				sound-dai = <&adv7511>;
327c66ec88fSEmmanuel Vadot			};
328c66ec88fSEmmanuel Vadot		};
329c66ec88fSEmmanuel Vadot	};
330c66ec88fSEmmanuel Vadot};
331