| 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 |
fan1 { |
| 51 |
compatible = "pwm-fan"; |
| 52 |
pwms = <&pwm1 2 7812500 0>; |
| 53 |
}; |
| 54 |
|
| 55 |
fan2 { |
| 56 |
compatible = "pwm-fan"; |
| 57 |
pwms = <&pwm1 3 7812500 0>; |
| 58 |
}; |
| 59 |
|
| 60 |
led-controller-1 { |
| 61 |
compatible = "pwm-leds"; |
| 62 |
|
| 63 |
led-d12 { |
| 64 |
pwms = <&pwm0 0 7812500 0>; |
| 65 |
color = <LED_COLOR_ID_GREEN>; |
| 66 |
max-brightness = <255>; |
| 67 |
label = "d12"; |
| 68 |
}; |
| 69 |
}; |
| 70 |
|
| 71 |
led-controller-2 { |
| 72 |
compatible = "pwm-leds-multicolor"; |
| 73 |
|
| 74 |
multi-led { |
| 75 |
color = <LED_COLOR_ID_RGB>; |
| 76 |
max-brightness = <255>; |
| 77 |
label = "d2"; |
| 78 |
|
| 79 |
led-red { |
| 80 |
pwms = <&pwm0 2 7812500 0>; |
| 81 |
color = <LED_COLOR_ID_RED>; |
| 82 |
}; |
| 83 |
|
| 84 |
led-green { |
| 85 |
pwms = <&pwm0 1 7812500 0>; |
| 86 |
color = <LED_COLOR_ID_GREEN>; |
| 87 |
}; |
| 88 |
|
| 89 |
led-blue { |
| 90 |
pwms = <&pwm0 3 7812500 0>; |
| 91 |
color = <LED_COLOR_ID_BLUE>; |
| 92 |
}; |
| 93 |
}; |
| 94 |
}; |
| 95 |
}; |
| 96 |
|
| 97 |
&uart0 { |
| 98 |
status = "okay"; |
| 99 |
}; |
| 100 |
|
| 101 |
&uart1 { |
| 102 |
status = "okay"; |
| 103 |
}; |
| 104 |
|
| 105 |
&i2c0 { |
| 106 |
status = "okay"; |
| 107 |
|
| 108 |
temperature-sensor@4c { |
| 109 |
compatible = "ti,tmp451"; |
| 110 |
reg = <0x4c>; |
| 111 |
vcc-supply = <&vdd_bpro>; |
| 112 |
interrupt-parent = <&gpio>; |
| 113 |
interrupts = <6 IRQ_TYPE_LEVEL_LOW>; |
| 114 |
}; |
| 115 |
|
| 116 |
eeprom@54 { |
| 117 |
compatible = "microchip,24c02", "atmel,24c02"; |
| 118 |
reg = <0x54>; |
| 119 |
vcc-supply = <&vdd_bpro>; |
| 120 |
label = "board-id"; |
| 121 |
pagesize = <16>; |
| 122 |
read-only; |
| 123 |
size = <256>; |
| 124 |
}; |
| 125 |
|
| 126 |
pmic@58 { |
| 127 |
compatible = "dlg,da9063"; |
| 128 |
reg = <0x58>; |
| 129 |
interrupt-parent = <&gpio>; |
| 130 |
interrupts = <1 IRQ_TYPE_LEVEL_LOW>; |
| 131 |
interrupt-controller; |
| 132 |
#interrupt-cells = <2>; |
| 133 |
|
| 134 |
onkey { |
| 135 |
compatible = "dlg,da9063-onkey"; |
| 136 |
}; |
| 137 |
|
| 138 |
rtc { |
| 139 |
compatible = "dlg,da9063-rtc"; |
| 140 |
}; |
| 141 |
|
| 142 |
watchdog { |
| 143 |
compatible = "dlg,da9063-watchdog"; |
| 144 |
}; |
| 145 |
|
| 146 |
regulators { |
| 147 |
vdd_bcore: bcores-merged { |
| 148 |
regulator-min-microvolt = <1050000>; |
| 149 |
regulator-max-microvolt = <1050000>; |
| 150 |
regulator-min-microamp = <4800000>; |
| 151 |
regulator-max-microamp = <4800000>; |
| 152 |
regulator-always-on; |
| 153 |
}; |
| 154 |
|
| 155 |
vdd_bpro: bpro { |
| 156 |
regulator-min-microvolt = <1800000>; |
| 157 |
regulator-max-microvolt = <1800000>; |
| 158 |
regulator-min-microamp = <2400000>; |
| 159 |
regulator-max-microamp = <2400000>; |
| 160 |
regulator-always-on; |
| 161 |
}; |
| 162 |
|
| 163 |
vdd_bperi: bperi { |
| 164 |
regulator-min-microvolt = <1060000>; |
| 165 |
regulator-max-microvolt = <1060000>; |
| 166 |
regulator-min-microamp = <1500000>; |
| 167 |
regulator-max-microamp = <1500000>; |
| 168 |
regulator-always-on; |
| 169 |
}; |
| 170 |
|
| 171 |
vdd_bmem_bio: bmem-bio-merged { |
| 172 |
regulator-min-microvolt = <1200000>; |
| 173 |
regulator-max-microvolt = <1200000>; |
| 174 |
regulator-min-microamp = <3000000>; |
| 175 |
regulator-max-microamp = <3000000>; |
| 176 |
regulator-always-on; |
| 177 |
}; |
| 178 |
|
| 179 |
vdd_ldo1: ldo1 { |
| 180 |
regulator-min-microvolt = <1800000>; |
| 181 |
regulator-max-microvolt = <1800000>; |
| 182 |
regulator-always-on; |
| 183 |
}; |
| 184 |
|
| 185 |
vdd_ldo2: ldo2 { |
| 186 |
regulator-min-microvolt = <1800000>; |
| 187 |
regulator-max-microvolt = <1800000>; |
| 188 |
regulator-always-on; |
| 189 |
}; |
| 190 |
|
| 191 |
vdd_ldo3: ldo3 { |
| 192 |
regulator-min-microvolt = <3300000>; |
| 193 |
regulator-max-microvolt = <3300000>; |
| 194 |
regulator-always-on; |
| 195 |
}; |
| 196 |
|
| 197 |
vdd_ldo4: ldo4 { |
| 198 |
regulator-min-microvolt = <2500000>; |
| 199 |
regulator-max-microvolt = <2500000>; |
| 200 |
regulator-always-on; |
| 201 |
}; |
| 202 |
|
| 203 |
vdd_ldo5: ldo5 { |
| 204 |
regulator-min-microvolt = <3300000>; |
| 205 |
regulator-max-microvolt = <3300000>; |
| 206 |
regulator-always-on; |
| 207 |
}; |
| 208 |
|
| 209 |
vdd_ldo6: ldo6 { |
| 210 |
regulator-min-microvolt = <1800000>; |
| 211 |
regulator-max-microvolt = <1800000>; |
| 212 |
regulator-always-on; |
| 213 |
}; |
| 214 |
|
| 215 |
vdd_ldo7: ldo7 { |
| 216 |
regulator-min-microvolt = <3300000>; |
| 217 |
regulator-max-microvolt = <3300000>; |
| 218 |
regulator-always-on; |
| 219 |
}; |
| 220 |
|
| 221 |
vdd_ldo8: ldo8 { |
| 222 |
regulator-min-microvolt = <3300000>; |
| 223 |
regulator-max-microvolt = <3300000>; |
| 224 |
regulator-always-on; |
| 225 |
}; |
| 226 |
|
| 227 |
vdd_ld09: ldo9 { |
| 228 |
regulator-min-microvolt = <1050000>; |
| 229 |
regulator-max-microvolt = <1050000>; |
| 230 |
regulator-always-on; |
| 231 |
}; |
| 232 |
|
| 233 |
vdd_ldo10: ldo10 { |
| 234 |
regulator-min-microvolt = <1000000>; |
| 235 |
regulator-max-microvolt = <1000000>; |
| 236 |
regulator-always-on; |
| 237 |
}; |
| 238 |
|
| 239 |
vdd_ldo11: ldo11 { |
| 240 |
regulator-min-microvolt = <2500000>; |
| 241 |
regulator-max-microvolt = <2500000>; |
| 242 |
regulator-always-on; |
| 243 |
}; |
| 244 |
}; |
| 245 |
}; |
| 246 |
}; |
| 247 |
|
| 248 |
&qspi0 { |
| 249 |
status = "okay"; |
| 250 |
flash@0 { |
| 251 |
compatible = "jedec,spi-nor"; |
| 252 |
reg = <0>; |
| 253 |
spi-max-frequency = <50000000>; |
| 254 |
m25p,fast-read; |
| 255 |
spi-tx-bus-width = <4>; |
| 256 |
spi-rx-bus-width = <4>; |
| 257 |
}; |
| 258 |
}; |
| 259 |
|
| 260 |
&spi0 { |
| 261 |
status = "okay"; |
| 262 |
mmc@0 { |
| 263 |
compatible = "mmc-spi-slot"; |
| 264 |
reg = <0>; |
| 265 |
spi-max-frequency = <20000000>; |
| 266 |
voltage-ranges = <3300 3300>; |
| 267 |
disable-wp; |
| 268 |
gpios = <&gpio 15 GPIO_ACTIVE_LOW>; |
| 269 |
}; |
| 270 |
}; |
| 271 |
|
| 272 |
ð0 { |
| 273 |
status = "okay"; |
| 274 |
phy-mode = "gmii"; |
| 275 |
phy-handle = <&phy0>; |
| 276 |
phy0: ethernet-phy@0 { |
| 277 |
reg = <0>; |
| 278 |
}; |
| 279 |
}; |
| 280 |
|
| 281 |
&pwm0 { |
| 282 |
status = "okay"; |
| 283 |
}; |
| 284 |
|
| 285 |
&pwm1 { |
| 286 |
status = "okay"; |
| 287 |
}; |
| 288 |
|
| 289 |
&gpio { |
| 290 |
status = "okay"; |
| 291 |
gpio-line-names = "J29.1", "PMICNTB", "PMICSHDN", "J8.1", "J8.3", |
| 292 |
"PCIe_PWREN", "THERM", "UBRDG_RSTN", "PCIe_PERSTN", |
| 293 |
"ULPI_RSTN", "J8.2", "UHUB_RSTN", "GEMGXL_RST", "J8.4", |
| 294 |
"EN_VDD_SD", "SD_CD"; |
| 295 |
}; |