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