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/interrupt-controller/irq.h>
6
7/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
8#define RTCCLK_FREQ		1000000
9
10/ {
11	model = "SiFive HiFive Unmatched A00";
12	compatible = "sifive,hifive-unmatched-a00", "sifive,fu740-c000",
13		     "sifive,fu740";
14
15	chosen {
16		stdout-path = "serial0";
17	};
18
19	cpus {
20		timebase-frequency = <RTCCLK_FREQ>;
21	};
22
23	memory@80000000 {
24		device_type = "memory";
25		reg = <0x0 0x80000000 0x4 0x00000000>;
26	};
27
28	hfclk: hfclk {
29		#clock-cells = <0>;
30		compatible = "fixed-clock";
31		clock-frequency = <26000000>;
32		clock-output-names = "hfclk";
33	};
34
35	rtcclk: rtcclk {
36		#clock-cells = <0>;
37		compatible = "fixed-clock";
38		clock-frequency = <RTCCLK_FREQ>;
39		clock-output-names = "rtcclk";
40	};
41};
42
43&uart0 {
44	status = "okay";
45};
46
47&uart1 {
48	status = "okay";
49};
50
51&i2c0 {
52	status = "okay";
53
54	temperature-sensor@4c {
55		compatible = "ti,tmp451";
56		reg = <0x4c>;
57		interrupt-parent = <&gpio>;
58		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
59	};
60
61	pmic@58 {
62		compatible = "dlg,da9063";
63		reg = <0x58>;
64		interrupt-parent = <&gpio>;
65		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
66		interrupt-controller;
67
68		regulators {
69			vdd_bcore1: bcore1 {
70				regulator-min-microvolt = <900000>;
71				regulator-max-microvolt = <900000>;
72				regulator-min-microamp = <5000000>;
73				regulator-max-microamp = <5000000>;
74				regulator-always-on;
75			};
76
77			vdd_bcore2: bcore2 {
78				regulator-min-microvolt = <900000>;
79				regulator-max-microvolt = <900000>;
80				regulator-min-microamp = <5000000>;
81				regulator-max-microamp = <5000000>;
82				regulator-always-on;
83			};
84
85			vdd_bpro: bpro {
86				regulator-min-microvolt = <1800000>;
87				regulator-max-microvolt = <1800000>;
88				regulator-min-microamp = <2500000>;
89				regulator-max-microamp = <2500000>;
90				regulator-always-on;
91			};
92
93			vdd_bperi: bperi {
94				regulator-min-microvolt = <1050000>;
95				regulator-max-microvolt = <1050000>;
96				regulator-min-microamp = <1500000>;
97				regulator-max-microamp = <1500000>;
98				regulator-always-on;
99			};
100
101			vdd_bmem: bmem {
102				regulator-min-microvolt = <1200000>;
103				regulator-max-microvolt = <1200000>;
104				regulator-min-microamp = <3000000>;
105				regulator-max-microamp = <3000000>;
106				regulator-always-on;
107			};
108
109			vdd_bio: bio {
110				regulator-min-microvolt = <1200000>;
111				regulator-max-microvolt = <1200000>;
112				regulator-min-microamp = <3000000>;
113				regulator-max-microamp = <3000000>;
114				regulator-always-on;
115			};
116
117			vdd_ldo1: ldo1 {
118				regulator-min-microvolt = <1800000>;
119				regulator-max-microvolt = <1800000>;
120				regulator-min-microamp = <100000>;
121				regulator-max-microamp = <100000>;
122				regulator-always-on;
123			};
124
125			vdd_ldo2: ldo2 {
126				regulator-min-microvolt = <1800000>;
127				regulator-max-microvolt = <1800000>;
128				regulator-min-microamp = <200000>;
129				regulator-max-microamp = <200000>;
130				regulator-always-on;
131			};
132
133			vdd_ldo3: ldo3 {
134				regulator-min-microvolt = <1800000>;
135				regulator-max-microvolt = <1800000>;
136				regulator-min-microamp = <200000>;
137				regulator-max-microamp = <200000>;
138				regulator-always-on;
139			};
140
141			vdd_ldo4: ldo4 {
142				regulator-min-microvolt = <1800000>;
143				regulator-max-microvolt = <1800000>;
144				regulator-min-microamp = <200000>;
145				regulator-max-microamp = <200000>;
146				regulator-always-on;
147			};
148
149			vdd_ldo5: ldo5 {
150				regulator-min-microvolt = <1800000>;
151				regulator-max-microvolt = <1800000>;
152				regulator-min-microamp = <100000>;
153				regulator-max-microamp = <100000>;
154				regulator-always-on;
155			};
156
157			vdd_ldo6: ldo6 {
158				regulator-min-microvolt = <3300000>;
159				regulator-max-microvolt = <3300000>;
160				regulator-min-microamp = <200000>;
161				regulator-max-microamp = <200000>;
162				regulator-always-on;
163			};
164
165			vdd_ldo7: ldo7 {
166				regulator-min-microvolt = <1800000>;
167				regulator-max-microvolt = <1800000>;
168				regulator-min-microamp = <200000>;
169				regulator-max-microamp = <200000>;
170				regulator-always-on;
171			};
172
173			vdd_ldo8: ldo8 {
174				regulator-min-microvolt = <1800000>;
175				regulator-max-microvolt = <1800000>;
176				regulator-min-microamp = <200000>;
177				regulator-max-microamp = <200000>;
178				regulator-always-on;
179			};
180
181			vdd_ld09: ldo9 {
182				regulator-min-microvolt = <1050000>;
183				regulator-max-microvolt = <1050000>;
184				regulator-min-microamp = <200000>;
185				regulator-max-microamp = <200000>;
186			};
187
188			vdd_ldo10: ldo10 {
189				regulator-min-microvolt = <1000000>;
190				regulator-max-microvolt = <1000000>;
191				regulator-min-microamp = <300000>;
192				regulator-max-microamp = <300000>;
193			};
194
195			vdd_ldo11: ldo11 {
196				regulator-min-microvolt = <2500000>;
197				regulator-max-microvolt = <2500000>;
198				regulator-min-microamp = <300000>;
199				regulator-max-microamp = <300000>;
200				regulator-always-on;
201			};
202		};
203	};
204};
205
206&qspi0 {
207	status = "okay";
208	flash@0 {
209		compatible = "jedec,spi-nor";
210		reg = <0>;
211		spi-max-frequency = <50000000>;
212		m25p,fast-read;
213		spi-tx-bus-width = <4>;
214		spi-rx-bus-width = <4>;
215	};
216};
217
218&spi0 {
219	status = "okay";
220	mmc@0 {
221		compatible = "mmc-spi-slot";
222		reg = <0>;
223		spi-max-frequency = <20000000>;
224		voltage-ranges = <3300 3300>;
225		disable-wp;
226	};
227};
228
229&eth0 {
230	status = "okay";
231	phy-mode = "gmii";
232	phy-handle = <&phy0>;
233	phy0: ethernet-phy@0 {
234		reg = <0>;
235	};
236};
237
238&pwm0 {
239	status = "okay";
240};
241
242&pwm1 {
243	status = "okay";
244};
245
246&gpio {
247	status = "okay";
248};
249