xref: /freebsd-src/sys/contrib/device-tree/src/riscv/sifive/hifive-unleashed-a00.dts (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2c66ec88fSEmmanuel Vadot/* Copyright (c) 2018-2019 SiFive, Inc */
3c66ec88fSEmmanuel Vadot
4c66ec88fSEmmanuel Vadot#include "fu540-c000.dtsi"
5c66ec88fSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
6*7ef62cebSEmmanuel Vadot#include <dt-bindings/leds/common.h>
7*7ef62cebSEmmanuel Vadot#include <dt-bindings/pwm/pwm.h>
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadot/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
10c66ec88fSEmmanuel Vadot#define RTCCLK_FREQ		1000000
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadot/ {
13c66ec88fSEmmanuel Vadot	model = "SiFive HiFive Unleashed A00";
148cc087a1SEmmanuel Vadot	compatible = "sifive,hifive-unleashed-a00", "sifive,fu540-c000",
158cc087a1SEmmanuel Vadot		     "sifive,fu540";
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot	chosen {
18c66ec88fSEmmanuel Vadot		stdout-path = "serial0";
19c66ec88fSEmmanuel Vadot	};
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot	cpus {
22c66ec88fSEmmanuel Vadot		timebase-frequency = <RTCCLK_FREQ>;
23c66ec88fSEmmanuel Vadot	};
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot	memory@80000000 {
26c66ec88fSEmmanuel Vadot		device_type = "memory";
27c66ec88fSEmmanuel Vadot		reg = <0x0 0x80000000 0x2 0x00000000>;
28c66ec88fSEmmanuel Vadot	};
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot	hfclk: hfclk {
31c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
32c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
33c66ec88fSEmmanuel Vadot		clock-frequency = <33333333>;
34c66ec88fSEmmanuel Vadot		clock-output-names = "hfclk";
35c66ec88fSEmmanuel Vadot	};
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot	rtcclk: rtcclk {
38c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
39c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
40c66ec88fSEmmanuel Vadot		clock-frequency = <RTCCLK_FREQ>;
41c66ec88fSEmmanuel Vadot		clock-output-names = "rtcclk";
42c66ec88fSEmmanuel Vadot	};
43c66ec88fSEmmanuel Vadot	gpio-restart {
44c66ec88fSEmmanuel Vadot		compatible = "gpio-restart";
45c66ec88fSEmmanuel Vadot		gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
46c66ec88fSEmmanuel Vadot	};
47*7ef62cebSEmmanuel Vadot
48*7ef62cebSEmmanuel Vadot	led-controller {
49*7ef62cebSEmmanuel Vadot		compatible = "pwm-leds";
50*7ef62cebSEmmanuel Vadot
51*7ef62cebSEmmanuel Vadot		led-d1 {
52*7ef62cebSEmmanuel Vadot			pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
53*7ef62cebSEmmanuel Vadot			active-low;
54*7ef62cebSEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
55*7ef62cebSEmmanuel Vadot			max-brightness = <255>;
56*7ef62cebSEmmanuel Vadot			label = "d1";
57*7ef62cebSEmmanuel Vadot		};
58*7ef62cebSEmmanuel Vadot
59*7ef62cebSEmmanuel Vadot		led-d2 {
60*7ef62cebSEmmanuel Vadot			pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
61*7ef62cebSEmmanuel Vadot			active-low;
62*7ef62cebSEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
63*7ef62cebSEmmanuel Vadot			max-brightness = <255>;
64*7ef62cebSEmmanuel Vadot			label = "d2";
65*7ef62cebSEmmanuel Vadot		};
66*7ef62cebSEmmanuel Vadot
67*7ef62cebSEmmanuel Vadot		led-d3 {
68*7ef62cebSEmmanuel Vadot			pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
69*7ef62cebSEmmanuel Vadot			active-low;
70*7ef62cebSEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
71*7ef62cebSEmmanuel Vadot			max-brightness = <255>;
72*7ef62cebSEmmanuel Vadot			label = "d3";
73*7ef62cebSEmmanuel Vadot		};
74*7ef62cebSEmmanuel Vadot
75*7ef62cebSEmmanuel Vadot		led-d4 {
76*7ef62cebSEmmanuel Vadot			pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
77*7ef62cebSEmmanuel Vadot			active-low;
78*7ef62cebSEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
79*7ef62cebSEmmanuel Vadot			max-brightness = <255>;
80*7ef62cebSEmmanuel Vadot			label = "d4";
81*7ef62cebSEmmanuel Vadot		};
82*7ef62cebSEmmanuel Vadot	};
83c66ec88fSEmmanuel Vadot};
84c66ec88fSEmmanuel Vadot
85c66ec88fSEmmanuel Vadot&uart0 {
86c66ec88fSEmmanuel Vadot	status = "okay";
87c66ec88fSEmmanuel Vadot};
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot&uart1 {
90c66ec88fSEmmanuel Vadot	status = "okay";
91c66ec88fSEmmanuel Vadot};
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot&i2c0 {
94c66ec88fSEmmanuel Vadot	status = "okay";
95c66ec88fSEmmanuel Vadot};
96c66ec88fSEmmanuel Vadot
97c66ec88fSEmmanuel Vadot&qspi0 {
98c66ec88fSEmmanuel Vadot	status = "okay";
99c66ec88fSEmmanuel Vadot	flash@0 {
1008cc087a1SEmmanuel Vadot		compatible = "jedec,spi-nor";
101c66ec88fSEmmanuel Vadot		reg = <0>;
102c66ec88fSEmmanuel Vadot		spi-max-frequency = <50000000>;
103c66ec88fSEmmanuel Vadot		m25p,fast-read;
104c66ec88fSEmmanuel Vadot		spi-tx-bus-width = <4>;
105c66ec88fSEmmanuel Vadot		spi-rx-bus-width = <4>;
106c66ec88fSEmmanuel Vadot	};
107c66ec88fSEmmanuel Vadot};
108c66ec88fSEmmanuel Vadot
109c66ec88fSEmmanuel Vadot&qspi2 {
110c66ec88fSEmmanuel Vadot	status = "okay";
111c66ec88fSEmmanuel Vadot	mmc@0 {
112c66ec88fSEmmanuel Vadot		compatible = "mmc-spi-slot";
113c66ec88fSEmmanuel Vadot		reg = <0>;
114c66ec88fSEmmanuel Vadot		spi-max-frequency = <20000000>;
115c66ec88fSEmmanuel Vadot		voltage-ranges = <3300 3300>;
116c66ec88fSEmmanuel Vadot		disable-wp;
1178cc087a1SEmmanuel Vadot		gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
118c66ec88fSEmmanuel Vadot	};
119c66ec88fSEmmanuel Vadot};
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel Vadot&eth0 {
122c66ec88fSEmmanuel Vadot	status = "okay";
123c66ec88fSEmmanuel Vadot	phy-mode = "gmii";
124c66ec88fSEmmanuel Vadot	phy-handle = <&phy0>;
125c66ec88fSEmmanuel Vadot	phy0: ethernet-phy@0 {
1265def4c47SEmmanuel Vadot		compatible = "ethernet-phy-id0007.0771";
127c66ec88fSEmmanuel Vadot		reg = <0>;
128c66ec88fSEmmanuel Vadot	};
129c66ec88fSEmmanuel Vadot};
130c66ec88fSEmmanuel Vadot
131c66ec88fSEmmanuel Vadot&pwm0 {
132c66ec88fSEmmanuel Vadot	status = "okay";
133c66ec88fSEmmanuel Vadot};
134c66ec88fSEmmanuel Vadot
135c66ec88fSEmmanuel Vadot&pwm1 {
136c66ec88fSEmmanuel Vadot	status = "okay";
137c66ec88fSEmmanuel Vadot};
138c66ec88fSEmmanuel Vadot
139c66ec88fSEmmanuel Vadot&gpio {
140c66ec88fSEmmanuel Vadot	status = "okay";
141c66ec88fSEmmanuel Vadot};
142