xref: /freebsd/sys/contrib/device-tree/src/riscv/sifive/hifive-unmatched-a00.dts (revision fe75646a0234a261c0013bf1840fdac4acaf0cec)
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
127		onkey {
128			compatible = "dlg,da9063-onkey";
129		};
130
131		rtc {
132			compatible = "dlg,da9063-rtc";
133		};
134
135		watchdog {
136			compatible = "dlg,da9063-watchdog";
137		};
138
139		regulators {
140			vdd_bcore: bcores-merged {
141				regulator-min-microvolt = <1050000>;
142				regulator-max-microvolt = <1050000>;
143				regulator-min-microamp = <4800000>;
144				regulator-max-microamp = <4800000>;
145				regulator-always-on;
146			};
147
148			vdd_bpro: bpro {
149				regulator-min-microvolt = <1800000>;
150				regulator-max-microvolt = <1800000>;
151				regulator-min-microamp = <2400000>;
152				regulator-max-microamp = <2400000>;
153				regulator-always-on;
154			};
155
156			vdd_bperi: bperi {
157				regulator-min-microvolt = <1060000>;
158				regulator-max-microvolt = <1060000>;
159				regulator-min-microamp = <1500000>;
160				regulator-max-microamp = <1500000>;
161				regulator-always-on;
162			};
163
164			vdd_bmem_bio: bmem-bio-merged {
165				regulator-min-microvolt = <1200000>;
166				regulator-max-microvolt = <1200000>;
167				regulator-min-microamp = <3000000>;
168				regulator-max-microamp = <3000000>;
169				regulator-always-on;
170			};
171
172			vdd_ldo1: ldo1 {
173				regulator-min-microvolt = <1800000>;
174				regulator-max-microvolt = <1800000>;
175				regulator-always-on;
176			};
177
178			vdd_ldo2: ldo2 {
179				regulator-min-microvolt = <1800000>;
180				regulator-max-microvolt = <1800000>;
181				regulator-always-on;
182			};
183
184			vdd_ldo3: ldo3 {
185				regulator-min-microvolt = <3300000>;
186				regulator-max-microvolt = <3300000>;
187				regulator-always-on;
188			};
189
190			vdd_ldo4: ldo4 {
191				regulator-min-microvolt = <2500000>;
192				regulator-max-microvolt = <2500000>;
193				regulator-always-on;
194			};
195
196			vdd_ldo5: ldo5 {
197				regulator-min-microvolt = <3300000>;
198				regulator-max-microvolt = <3300000>;
199				regulator-always-on;
200			};
201
202			vdd_ldo6: ldo6 {
203				regulator-min-microvolt = <1800000>;
204				regulator-max-microvolt = <1800000>;
205				regulator-always-on;
206			};
207
208			vdd_ldo7: ldo7 {
209				regulator-min-microvolt = <3300000>;
210				regulator-max-microvolt = <3300000>;
211				regulator-always-on;
212			};
213
214			vdd_ldo8: ldo8 {
215				regulator-min-microvolt = <3300000>;
216				regulator-max-microvolt = <3300000>;
217				regulator-always-on;
218			};
219
220			vdd_ld09: ldo9 {
221				regulator-min-microvolt = <1050000>;
222				regulator-max-microvolt = <1050000>;
223				regulator-always-on;
224			};
225
226			vdd_ldo10: ldo10 {
227				regulator-min-microvolt = <1000000>;
228				regulator-max-microvolt = <1000000>;
229				regulator-always-on;
230			};
231
232			vdd_ldo11: ldo11 {
233				regulator-min-microvolt = <2500000>;
234				regulator-max-microvolt = <2500000>;
235				regulator-always-on;
236			};
237		};
238	};
239};
240
241&qspi0 {
242	status = "okay";
243	flash@0 {
244		compatible = "jedec,spi-nor";
245		reg = <0>;
246		spi-max-frequency = <50000000>;
247		m25p,fast-read;
248		spi-tx-bus-width = <4>;
249		spi-rx-bus-width = <4>;
250	};
251};
252
253&spi0 {
254	status = "okay";
255	mmc@0 {
256		compatible = "mmc-spi-slot";
257		reg = <0>;
258		spi-max-frequency = <20000000>;
259		voltage-ranges = <3300 3300>;
260		disable-wp;
261		gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
262	};
263};
264
265&eth0 {
266	status = "okay";
267	phy-mode = "gmii";
268	phy-handle = <&phy0>;
269	phy0: ethernet-phy@0 {
270		reg = <0>;
271	};
272};
273
274&pwm0 {
275	status = "okay";
276};
277
278&pwm1 {
279	status = "okay";
280};
281
282&gpio {
283	status = "okay";
284	gpio-line-names = "J29.1", "PMICNTB", "PMICSHDN", "J8.1", "J8.3",
285		"PCIe_PWREN", "THERM", "UBRDG_RSTN", "PCIe_PERSTN",
286		"ULPI_RSTN", "J8.2", "UHUB_RSTN", "GEMGXL_RST", "J8.4",
287		"EN_VDD_SD", "SD_CD";
288};
289