xref: /linux/scripts/dtc/include-prefixes/riscv/sifive/hifive-unmatched-a00.dts (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1d573b555SYash Shah// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2d573b555SYash Shah/* Copyright (c) 2020 SiFive, Inc */
3d573b555SYash Shah
4d573b555SYash Shah#include "fu740-c000.dtsi"
5298d03c2SBin Meng#include <dt-bindings/gpio/gpio.h>
6d573b555SYash Shah#include <dt-bindings/interrupt-controller/irq.h>
72cfe9bbeSEmil Renner Berthing#include <dt-bindings/leds/common.h>
82cfe9bbeSEmil Renner Berthing#include <dt-bindings/pwm/pwm.h>
9d573b555SYash Shah
10d573b555SYash Shah/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
11d573b555SYash Shah#define RTCCLK_FREQ		1000000
12d573b555SYash Shah
13d573b555SYash Shah/ {
14d573b555SYash Shah	model = "SiFive HiFive Unmatched A00";
15d573b555SYash Shah	compatible = "sifive,hifive-unmatched-a00", "sifive,fu740-c000",
16d573b555SYash Shah		     "sifive,fu740";
17d573b555SYash Shah
18d573b555SYash Shah	chosen {
19d573b555SYash Shah		stdout-path = "serial0";
20d573b555SYash Shah	};
21d573b555SYash Shah
22d573b555SYash Shah	cpus {
23d573b555SYash Shah		timebase-frequency = <RTCCLK_FREQ>;
24d573b555SYash Shah	};
25d573b555SYash Shah
26d573b555SYash Shah	memory@80000000 {
27d573b555SYash Shah		device_type = "memory";
28d0956043SQiu Wenbo		reg = <0x0 0x80000000 0x4 0x00000000>;
29d573b555SYash Shah	};
30d573b555SYash Shah
31d573b555SYash Shah	hfclk: hfclk {
32d573b555SYash Shah		#clock-cells = <0>;
33d573b555SYash Shah		compatible = "fixed-clock";
34d573b555SYash Shah		clock-frequency = <26000000>;
35d573b555SYash Shah		clock-output-names = "hfclk";
36d573b555SYash Shah	};
37d573b555SYash Shah
38d573b555SYash Shah	rtcclk: rtcclk {
39d573b555SYash Shah		#clock-cells = <0>;
40d573b555SYash Shah		compatible = "fixed-clock";
41d573b555SYash Shah		clock-frequency = <RTCCLK_FREQ>;
42d573b555SYash Shah		clock-output-names = "rtcclk";
43d573b555SYash Shah	};
44db3f02dfSRon Economos
45db3f02dfSRon Economos	gpio-poweroff {
46db3f02dfSRon Economos		compatible = "gpio-poweroff";
47db3f02dfSRon Economos		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
48db3f02dfSRon Economos	};
492cfe9bbeSEmil Renner Berthing
502cfe9bbeSEmil Renner Berthing	led-controller-1 {
512cfe9bbeSEmil Renner Berthing		compatible = "pwm-leds";
522cfe9bbeSEmil Renner Berthing
532cfe9bbeSEmil Renner Berthing		led-d12 {
542cfe9bbeSEmil Renner Berthing			pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
552cfe9bbeSEmil Renner Berthing			active-low;
562cfe9bbeSEmil Renner Berthing			color = <LED_COLOR_ID_GREEN>;
572cfe9bbeSEmil Renner Berthing			max-brightness = <255>;
582cfe9bbeSEmil Renner Berthing			label = "d12";
592cfe9bbeSEmil Renner Berthing		};
602cfe9bbeSEmil Renner Berthing	};
612cfe9bbeSEmil Renner Berthing
622cfe9bbeSEmil Renner Berthing	led-controller-2 {
632cfe9bbeSEmil Renner Berthing		compatible = "pwm-leds-multicolor";
642cfe9bbeSEmil Renner Berthing
652cfe9bbeSEmil Renner Berthing		multi-led {
662cfe9bbeSEmil Renner Berthing			color = <LED_COLOR_ID_RGB>;
672cfe9bbeSEmil Renner Berthing			max-brightness = <255>;
682cfe9bbeSEmil Renner Berthing			label = "d2";
692cfe9bbeSEmil Renner Berthing
702cfe9bbeSEmil Renner Berthing			led-red {
712cfe9bbeSEmil Renner Berthing				pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
722cfe9bbeSEmil Renner Berthing				active-low;
732cfe9bbeSEmil Renner Berthing				color = <LED_COLOR_ID_RED>;
742cfe9bbeSEmil Renner Berthing			};
752cfe9bbeSEmil Renner Berthing
762cfe9bbeSEmil Renner Berthing			led-green {
772cfe9bbeSEmil Renner Berthing				pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
782cfe9bbeSEmil Renner Berthing				active-low;
792cfe9bbeSEmil Renner Berthing				color = <LED_COLOR_ID_GREEN>;
802cfe9bbeSEmil Renner Berthing			};
812cfe9bbeSEmil Renner Berthing
822cfe9bbeSEmil Renner Berthing			led-blue {
832cfe9bbeSEmil Renner Berthing				pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
842cfe9bbeSEmil Renner Berthing				active-low;
852cfe9bbeSEmil Renner Berthing				color = <LED_COLOR_ID_BLUE>;
862cfe9bbeSEmil Renner Berthing			};
872cfe9bbeSEmil Renner Berthing		};
882cfe9bbeSEmil Renner Berthing	};
89d573b555SYash Shah};
90d573b555SYash Shah
91d573b555SYash Shah&uart0 {
92d573b555SYash Shah	status = "okay";
93d573b555SYash Shah};
94d573b555SYash Shah
95d573b555SYash Shah&uart1 {
96d573b555SYash Shah	status = "okay";
97d573b555SYash Shah};
98d573b555SYash Shah
99d573b555SYash Shah&i2c0 {
100d573b555SYash Shah	status = "okay";
101d573b555SYash Shah
102d573b555SYash Shah	temperature-sensor@4c {
103d573b555SYash Shah		compatible = "ti,tmp451";
104d573b555SYash Shah		reg = <0x4c>;
105f6f7fbb8SVincent Pelletier		vcc-supply = <&vdd_bpro>;
106d573b555SYash Shah		interrupt-parent = <&gpio>;
107d573b555SYash Shah		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
108d573b555SYash Shah	};
109d573b555SYash Shah
1108120393bSVincent Pelletier	eeprom@54 {
1118120393bSVincent Pelletier		compatible = "microchip,24c02", "atmel,24c02";
1128120393bSVincent Pelletier		reg = <0x54>;
1138120393bSVincent Pelletier		vcc-supply = <&vdd_bpro>;
1148120393bSVincent Pelletier		label = "board-id";
1158120393bSVincent Pelletier		pagesize = <16>;
1168120393bSVincent Pelletier		read-only;
1178120393bSVincent Pelletier		size = <256>;
1188120393bSVincent Pelletier	};
1198120393bSVincent Pelletier
120d573b555SYash Shah	pmic@58 {
121d573b555SYash Shah		compatible = "dlg,da9063";
122d573b555SYash Shah		reg = <0x58>;
123d573b555SYash Shah		interrupt-parent = <&gpio>;
124d573b555SYash Shah		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
125d573b555SYash Shah		interrupt-controller;
126*ce6b6d15SConor Dooley		#interrupt-cells = <2>;
127d573b555SYash Shah
128cd29cc8aSVincent Pelletier		onkey {
129cd29cc8aSVincent Pelletier			compatible = "dlg,da9063-onkey";
130cd29cc8aSVincent Pelletier		};
131cd29cc8aSVincent Pelletier
132cd29cc8aSVincent Pelletier		rtc {
133cd29cc8aSVincent Pelletier			compatible = "dlg,da9063-rtc";
134cd29cc8aSVincent Pelletier		};
135cd29cc8aSVincent Pelletier
136b4981661SConor Dooley		watchdog {
137cd29cc8aSVincent Pelletier			compatible = "dlg,da9063-watchdog";
138cd29cc8aSVincent Pelletier		};
139cd29cc8aSVincent Pelletier
140d573b555SYash Shah		regulators {
141ad931d9bSVincent Pelletier			vdd_bcore: bcores-merged {
142ad931d9bSVincent Pelletier				regulator-min-microvolt = <1050000>;
143ad931d9bSVincent Pelletier				regulator-max-microvolt = <1050000>;
144ad931d9bSVincent Pelletier				regulator-min-microamp = <4800000>;
145ad931d9bSVincent Pelletier				regulator-max-microamp = <4800000>;
146d573b555SYash Shah				regulator-always-on;
147d573b555SYash Shah			};
148d573b555SYash Shah
149d573b555SYash Shah			vdd_bpro: bpro {
150d573b555SYash Shah				regulator-min-microvolt = <1800000>;
151d573b555SYash Shah				regulator-max-microvolt = <1800000>;
152ad931d9bSVincent Pelletier				regulator-min-microamp = <2400000>;
153ad931d9bSVincent Pelletier				regulator-max-microamp = <2400000>;
154d573b555SYash Shah				regulator-always-on;
155d573b555SYash Shah			};
156d573b555SYash Shah
157d573b555SYash Shah			vdd_bperi: bperi {
158ad931d9bSVincent Pelletier				regulator-min-microvolt = <1060000>;
159ad931d9bSVincent Pelletier				regulator-max-microvolt = <1060000>;
160d573b555SYash Shah				regulator-min-microamp = <1500000>;
161d573b555SYash Shah				regulator-max-microamp = <1500000>;
162d573b555SYash Shah				regulator-always-on;
163d573b555SYash Shah			};
164d573b555SYash Shah
165ad931d9bSVincent Pelletier			vdd_bmem_bio: bmem-bio-merged {
166d573b555SYash Shah				regulator-min-microvolt = <1200000>;
167d573b555SYash Shah				regulator-max-microvolt = <1200000>;
168d573b555SYash Shah				regulator-min-microamp = <3000000>;
169d573b555SYash Shah				regulator-max-microamp = <3000000>;
170d573b555SYash Shah				regulator-always-on;
171d573b555SYash Shah			};
172d573b555SYash Shah
173d573b555SYash Shah			vdd_ldo1: ldo1 {
174d573b555SYash Shah				regulator-min-microvolt = <1800000>;
175d573b555SYash Shah				regulator-max-microvolt = <1800000>;
176d573b555SYash Shah				regulator-always-on;
177d573b555SYash Shah			};
178d573b555SYash Shah
179d573b555SYash Shah			vdd_ldo2: ldo2 {
180d573b555SYash Shah				regulator-min-microvolt = <1800000>;
181d573b555SYash Shah				regulator-max-microvolt = <1800000>;
182d573b555SYash Shah				regulator-always-on;
183d573b555SYash Shah			};
184d573b555SYash Shah
185d573b555SYash Shah			vdd_ldo3: ldo3 {
186ad931d9bSVincent Pelletier				regulator-min-microvolt = <3300000>;
187ad931d9bSVincent Pelletier				regulator-max-microvolt = <3300000>;
188d573b555SYash Shah				regulator-always-on;
189d573b555SYash Shah			};
190d573b555SYash Shah
191d573b555SYash Shah			vdd_ldo4: ldo4 {
192ad931d9bSVincent Pelletier				regulator-min-microvolt = <2500000>;
193ad931d9bSVincent Pelletier				regulator-max-microvolt = <2500000>;
194d573b555SYash Shah				regulator-always-on;
195d573b555SYash Shah			};
196d573b555SYash Shah
197d573b555SYash Shah			vdd_ldo5: ldo5 {
198ad931d9bSVincent Pelletier				regulator-min-microvolt = <3300000>;
199ad931d9bSVincent Pelletier				regulator-max-microvolt = <3300000>;
200d573b555SYash Shah				regulator-always-on;
201d573b555SYash Shah			};
202d573b555SYash Shah
203d573b555SYash Shah			vdd_ldo6: ldo6 {
204ad931d9bSVincent Pelletier				regulator-min-microvolt = <1800000>;
205ad931d9bSVincent Pelletier				regulator-max-microvolt = <1800000>;
206d573b555SYash Shah				regulator-always-on;
207d573b555SYash Shah			};
208d573b555SYash Shah
209d573b555SYash Shah			vdd_ldo7: ldo7 {
210ad931d9bSVincent Pelletier				regulator-min-microvolt = <3300000>;
211ad931d9bSVincent Pelletier				regulator-max-microvolt = <3300000>;
212d573b555SYash Shah				regulator-always-on;
213d573b555SYash Shah			};
214d573b555SYash Shah
215d573b555SYash Shah			vdd_ldo8: ldo8 {
216ad931d9bSVincent Pelletier				regulator-min-microvolt = <3300000>;
217ad931d9bSVincent Pelletier				regulator-max-microvolt = <3300000>;
218d573b555SYash Shah				regulator-always-on;
219d573b555SYash Shah			};
220d573b555SYash Shah
221d573b555SYash Shah			vdd_ld09: ldo9 {
222d573b555SYash Shah				regulator-min-microvolt = <1050000>;
223d573b555SYash Shah				regulator-max-microvolt = <1050000>;
224ad931d9bSVincent Pelletier				regulator-always-on;
225d573b555SYash Shah			};
226d573b555SYash Shah
227d573b555SYash Shah			vdd_ldo10: ldo10 {
228d573b555SYash Shah				regulator-min-microvolt = <1000000>;
229d573b555SYash Shah				regulator-max-microvolt = <1000000>;
230ad931d9bSVincent Pelletier				regulator-always-on;
231d573b555SYash Shah			};
232d573b555SYash Shah
233d573b555SYash Shah			vdd_ldo11: ldo11 {
234d573b555SYash Shah				regulator-min-microvolt = <2500000>;
235d573b555SYash Shah				regulator-max-microvolt = <2500000>;
236d573b555SYash Shah				regulator-always-on;
237d573b555SYash Shah			};
238d573b555SYash Shah		};
239d573b555SYash Shah	};
240d573b555SYash Shah};
241d573b555SYash Shah
242d573b555SYash Shah&qspi0 {
243d573b555SYash Shah	status = "okay";
244d573b555SYash Shah	flash@0 {
2458ce936c2SKrzysztof Kozlowski		compatible = "jedec,spi-nor";
246d573b555SYash Shah		reg = <0>;
247d573b555SYash Shah		spi-max-frequency = <50000000>;
248d573b555SYash Shah		m25p,fast-read;
249d573b555SYash Shah		spi-tx-bus-width = <4>;
250d573b555SYash Shah		spi-rx-bus-width = <4>;
251d573b555SYash Shah	};
252d573b555SYash Shah};
253d573b555SYash Shah
254d573b555SYash Shah&spi0 {
255d573b555SYash Shah	status = "okay";
256d573b555SYash Shah	mmc@0 {
257d573b555SYash Shah		compatible = "mmc-spi-slot";
258d573b555SYash Shah		reg = <0>;
259d573b555SYash Shah		spi-max-frequency = <20000000>;
260d573b555SYash Shah		voltage-ranges = <3300 3300>;
261d573b555SYash Shah		disable-wp;
262298d03c2SBin Meng		gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
263d573b555SYash Shah	};
264d573b555SYash Shah};
265d573b555SYash Shah
266d573b555SYash Shah&eth0 {
267d573b555SYash Shah	status = "okay";
268d573b555SYash Shah	phy-mode = "gmii";
269d573b555SYash Shah	phy-handle = <&phy0>;
270d573b555SYash Shah	phy0: ethernet-phy@0 {
271d573b555SYash Shah		reg = <0>;
272d573b555SYash Shah	};
273d573b555SYash Shah};
274d573b555SYash Shah
275d573b555SYash Shah&pwm0 {
276d573b555SYash Shah	status = "okay";
277d573b555SYash Shah};
278d573b555SYash Shah
279d573b555SYash Shah&pwm1 {
280d573b555SYash Shah	status = "okay";
281d573b555SYash Shah};
282d573b555SYash Shah
283d573b555SYash Shah&gpio {
284d573b555SYash Shah	status = "okay";
285ea81b91eSVincent Pelletier	gpio-line-names = "J29.1", "PMICNTB", "PMICSHDN", "J8.1", "J8.3",
286ea81b91eSVincent Pelletier		"PCIe_PWREN", "THERM", "UBRDG_RSTN", "PCIe_PERSTN",
287ea81b91eSVincent Pelletier		"ULPI_RSTN", "J8.2", "UHUB_RSTN", "GEMGXL_RST", "J8.4",
288ea81b91eSVincent Pelletier		"EN_VDD_SD", "SD_CD";
289d573b555SYash Shah};
290