xref: /freebsd/sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/* Copyright (c) 2020 SiFive, Inc */
3
4#include "fu740-c000.dtsi"
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7#include <dt-bindings/leds/common.h>
8#include <dt-bindings/pwm/pwm.h>
9
10/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
11#define RTCCLK_FREQ		1000000
12
13/ {
14	model = "SiFive HiFive Unmatched A00";
15	compatible = "sifive,hifive-unmatched-a00", "sifive,fu740-c000",
16		     "sifive,fu740";
17
18	chosen {
19		stdout-path = "serial0";
20	};
21
22	cpus {
23		timebase-frequency = <RTCCLK_FREQ>;
24	};
25
26	memory@80000000 {
27		device_type = "memory";
28		reg = <0x0 0x80000000 0x4 0x00000000>;
29	};
30
31	hfclk: hfclk {
32		#clock-cells = <0>;
33		compatible = "fixed-clock";
34		clock-frequency = <26000000>;
35		clock-output-names = "hfclk";
36	};
37
38	rtcclk: rtcclk {
39		#clock-cells = <0>;
40		compatible = "fixed-clock";
41		clock-frequency = <RTCCLK_FREQ>;
42		clock-output-names = "rtcclk";
43	};
44
45	gpio-poweroff {
46		compatible = "gpio-poweroff";
47		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
48	};
49
50	led-controller-1 {
51		compatible = "pwm-leds";
52
53		led-d12 {
54			pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
55			active-low;
56			color = <LED_COLOR_ID_GREEN>;
57			max-brightness = <255>;
58			label = "d12";
59		};
60	};
61
62	led-controller-2 {
63		compatible = "pwm-leds-multicolor";
64
65		multi-led {
66			color = <LED_COLOR_ID_RGB>;
67			max-brightness = <255>;
68			label = "d2";
69
70			led-red {
71				pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
72				active-low;
73				color = <LED_COLOR_ID_RED>;
74			};
75
76			led-green {
77				pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
78				active-low;
79				color = <LED_COLOR_ID_GREEN>;
80			};
81
82			led-blue {
83				pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
84				active-low;
85				color = <LED_COLOR_ID_BLUE>;
86			};
87		};
88	};
89};
90
91&uart0 {
92	status = "okay";
93};
94
95&uart1 {
96	status = "okay";
97};
98
99&i2c0 {
100	status = "okay";
101
102	temperature-sensor@4c {
103		compatible = "ti,tmp451";
104		reg = <0x4c>;
105		vcc-supply = <&vdd_bpro>;
106		interrupt-parent = <&gpio>;
107		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
108	};
109
110	eeprom@54 {
111		compatible = "microchip,24c02", "atmel,24c02";
112		reg = <0x54>;
113		vcc-supply = <&vdd_bpro>;
114		label = "board-id";
115		pagesize = <16>;
116		read-only;
117		size = <256>;
118	};
119
120	pmic@58 {
121		compatible = "dlg,da9063";
122		reg = <0x58>;
123		interrupt-parent = <&gpio>;
124		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
125		interrupt-controller;
126		#interrupt-cells = <2>;
127
128		onkey {
129			compatible = "dlg,da9063-onkey";
130		};
131
132		rtc {
133			compatible = "dlg,da9063-rtc";
134		};
135
136		watchdog {
137			compatible = "dlg,da9063-watchdog";
138		};
139
140		regulators {
141			vdd_bcore: bcores-merged {
142				regulator-min-microvolt = <1050000>;
143				regulator-max-microvolt = <1050000>;
144				regulator-min-microamp = <4800000>;
145				regulator-max-microamp = <4800000>;
146				regulator-always-on;
147			};
148
149			vdd_bpro: bpro {
150				regulator-min-microvolt = <1800000>;
151				regulator-max-microvolt = <1800000>;
152				regulator-min-microamp = <2400000>;
153				regulator-max-microamp = <2400000>;
154				regulator-always-on;
155			};
156
157			vdd_bperi: bperi {
158				regulator-min-microvolt = <1060000>;
159				regulator-max-microvolt = <1060000>;
160				regulator-min-microamp = <1500000>;
161				regulator-max-microamp = <1500000>;
162				regulator-always-on;
163			};
164
165			vdd_bmem_bio: bmem-bio-merged {
166				regulator-min-microvolt = <1200000>;
167				regulator-max-microvolt = <1200000>;
168				regulator-min-microamp = <3000000>;
169				regulator-max-microamp = <3000000>;
170				regulator-always-on;
171			};
172
173			vdd_ldo1: ldo1 {
174				regulator-min-microvolt = <1800000>;
175				regulator-max-microvolt = <1800000>;
176				regulator-always-on;
177			};
178
179			vdd_ldo2: ldo2 {
180				regulator-min-microvolt = <1800000>;
181				regulator-max-microvolt = <1800000>;
182				regulator-always-on;
183			};
184
185			vdd_ldo3: ldo3 {
186				regulator-min-microvolt = <3300000>;
187				regulator-max-microvolt = <3300000>;
188				regulator-always-on;
189			};
190
191			vdd_ldo4: ldo4 {
192				regulator-min-microvolt = <2500000>;
193				regulator-max-microvolt = <2500000>;
194				regulator-always-on;
195			};
196
197			vdd_ldo5: ldo5 {
198				regulator-min-microvolt = <3300000>;
199				regulator-max-microvolt = <3300000>;
200				regulator-always-on;
201			};
202
203			vdd_ldo6: ldo6 {
204				regulator-min-microvolt = <1800000>;
205				regulator-max-microvolt = <1800000>;
206				regulator-always-on;
207			};
208
209			vdd_ldo7: ldo7 {
210				regulator-min-microvolt = <3300000>;
211				regulator-max-microvolt = <3300000>;
212				regulator-always-on;
213			};
214
215			vdd_ldo8: ldo8 {
216				regulator-min-microvolt = <3300000>;
217				regulator-max-microvolt = <3300000>;
218				regulator-always-on;
219			};
220
221			vdd_ld09: ldo9 {
222				regulator-min-microvolt = <1050000>;
223				regulator-max-microvolt = <1050000>;
224				regulator-always-on;
225			};
226
227			vdd_ldo10: ldo10 {
228				regulator-min-microvolt = <1000000>;
229				regulator-max-microvolt = <1000000>;
230				regulator-always-on;
231			};
232
233			vdd_ldo11: ldo11 {
234				regulator-min-microvolt = <2500000>;
235				regulator-max-microvolt = <2500000>;
236				regulator-always-on;
237			};
238		};
239	};
240};
241
242&qspi0 {
243	status = "okay";
244	flash@0 {
245		compatible = "jedec,spi-nor";
246		reg = <0>;
247		spi-max-frequency = <50000000>;
248		m25p,fast-read;
249		spi-tx-bus-width = <4>;
250		spi-rx-bus-width = <4>;
251	};
252};
253
254&spi0 {
255	status = "okay";
256	mmc@0 {
257		compatible = "mmc-spi-slot";
258		reg = <0>;
259		spi-max-frequency = <20000000>;
260		voltage-ranges = <3300 3300>;
261		disable-wp;
262		gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
263	};
264};
265
266&eth0 {
267	status = "okay";
268	phy-mode = "gmii";
269	phy-handle = <&phy0>;
270	phy0: ethernet-phy@0 {
271		reg = <0>;
272	};
273};
274
275&pwm0 {
276	status = "okay";
277};
278
279&pwm1 {
280	status = "okay";
281};
282
283&gpio {
284	status = "okay";
285	gpio-line-names = "J29.1", "PMICNTB", "PMICSHDN", "J8.1", "J8.3",
286		"PCIe_PWREN", "THERM", "UBRDG_RSTN", "PCIe_PERSTN",
287		"ULPI_RSTN", "J8.2", "UHUB_RSTN", "GEMGXL_RST", "J8.4",
288		"EN_VDD_SD", "SD_CD";
289};
290