| 1 |
// SPDX-License-Identifier: (GPL-2.0 OR MIT) |
| 2 |
/* |
| 3 |
* Device Tree Source for the Spider CPU board |
| 4 |
* |
| 5 |
* Copyright (C) 2021 Renesas Electronics Corp. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include <dt-bindings/gpio/gpio.h> |
| 9 |
#include <dt-bindings/leds/common.h> |
| 10 |
|
| 11 |
#include "r8a779f0.dtsi" |
| 12 |
|
| 13 |
/ { |
| 14 |
model = "Renesas Spider CPU board"; |
| 15 |
compatible = "renesas,spider-cpu", "renesas,r8a779f0"; |
| 16 |
|
| 17 |
aliases { |
| 18 |
i2c0 = &i2c0; |
| 19 |
i2c1 = &i2c1; |
| 20 |
i2c2 = &i2c2; |
| 21 |
i2c3 = &i2c3; |
| 22 |
i2c4 = &i2c4; |
| 23 |
i2c5 = &i2c5; |
| 24 |
serial0 = &hscif0; |
| 25 |
serial1 = &scif0; |
| 26 |
}; |
| 27 |
|
| 28 |
chosen { |
| 29 |
bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; |
| 30 |
stdout-path = "serial0:1843200n8"; |
| 31 |
}; |
| 32 |
|
| 33 |
leds { |
| 34 |
compatible = "gpio-leds"; |
| 35 |
|
| 36 |
led-7 { |
| 37 |
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; |
| 38 |
color = <LED_COLOR_ID_GREEN>; |
| 39 |
function = LED_FUNCTION_INDICATOR; |
| 40 |
function-enumerator = <7>; |
| 41 |
}; |
| 42 |
|
| 43 |
led-8 { |
| 44 |
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 45 |
color = <LED_COLOR_ID_GREEN>; |
| 46 |
function = LED_FUNCTION_INDICATOR; |
| 47 |
function-enumerator = <8>; |
| 48 |
}; |
| 49 |
}; |
| 50 |
|
| 51 |
memory@48000000 { |
| 52 |
device_type = "memory"; |
| 53 |
/* first 128MB is reserved for secure area. */ |
| 54 |
reg = <0x0 0x48000000 0x0 0x78000000>; |
| 55 |
}; |
| 56 |
|
| 57 |
memory@480000000 { |
| 58 |
device_type = "memory"; |
| 59 |
reg = <0x4 0x80000000 0x0 0x80000000>; |
| 60 |
}; |
| 61 |
|
| 62 |
rc21012_pci: clk-rc21012-pci { |
| 63 |
compatible = "fixed-clock"; |
| 64 |
clock-frequency = <100000000>; |
| 65 |
#clock-cells = <0>; |
| 66 |
}; |
| 67 |
|
| 68 |
rc21012_ufs: clk-rc21012-ufs { |
| 69 |
compatible = "fixed-clock"; |
| 70 |
clock-frequency = <38400000>; |
| 71 |
#clock-cells = <0>; |
| 72 |
}; |
| 73 |
|
| 74 |
reg_1p8v: regulator-1p8v { |
| 75 |
compatible = "regulator-fixed"; |
| 76 |
regulator-name = "fixed-1.8V"; |
| 77 |
regulator-min-microvolt = <1800000>; |
| 78 |
regulator-max-microvolt = <1800000>; |
| 79 |
regulator-boot-on; |
| 80 |
regulator-always-on; |
| 81 |
}; |
| 82 |
|
| 83 |
reg_3p3v: regulator-3p3v { |
| 84 |
compatible = "regulator-fixed"; |
| 85 |
regulator-name = "fixed-3.3V"; |
| 86 |
regulator-min-microvolt = <3300000>; |
| 87 |
regulator-max-microvolt = <3300000>; |
| 88 |
regulator-boot-on; |
| 89 |
regulator-always-on; |
| 90 |
}; |
| 91 |
}; |
| 92 |
|
| 93 |
&extal_clk { |
| 94 |
clock-frequency = <20000000>; |
| 95 |
}; |
| 96 |
|
| 97 |
&extalr_clk { |
| 98 |
clock-frequency = <32768>; |
| 99 |
}; |
| 100 |
|
| 101 |
&hscif0 { |
| 102 |
pinctrl-0 = <&hscif0_pins>; |
| 103 |
pinctrl-names = "default"; |
| 104 |
bootph-all; |
| 105 |
|
| 106 |
uart-has-rtscts; |
| 107 |
status = "okay"; |
| 108 |
}; |
| 109 |
|
| 110 |
&i2c0 { |
| 111 |
pinctrl-0 = <&i2c0_pins>; |
| 112 |
pinctrl-names = "default"; |
| 113 |
|
| 114 |
status = "okay"; |
| 115 |
clock-frequency = <400000>; |
| 116 |
|
| 117 |
gpio_exp_20: gpio@20 { |
| 118 |
compatible = "ti,tca9554"; |
| 119 |
reg = <0x20>; |
| 120 |
gpio-controller; |
| 121 |
#gpio-cells = <2>; |
| 122 |
|
| 123 |
rc21012-gpio2-hog { |
| 124 |
gpio-hog; |
| 125 |
gpios = <5 GPIO_ACTIVE_LOW>; |
| 126 |
output-high; |
| 127 |
}; |
| 128 |
}; |
| 129 |
}; |
| 130 |
|
| 131 |
&i2c4 { |
| 132 |
pinctrl-0 = <&i2c4_pins>; |
| 133 |
pinctrl-names = "default"; |
| 134 |
|
| 135 |
status = "okay"; |
| 136 |
clock-frequency = <400000>; |
| 137 |
|
| 138 |
eeprom@50 { |
| 139 |
compatible = "rohm,br24g01", "atmel,24c01"; |
| 140 |
label = "cpu-board"; |
| 141 |
reg = <0x50>; |
| 142 |
pagesize = <8>; |
| 143 |
}; |
| 144 |
}; |
| 145 |
|
| 146 |
/* |
| 147 |
* This board also has a microSD slot which we will not support upstream |
| 148 |
* because we cannot directly switch voltages in software. |
| 149 |
*/ |
| 150 |
&mmc0 { |
| 151 |
pinctrl-0 = <&mmc_pins>; |
| 152 |
pinctrl-1 = <&mmc_pins>; |
| 153 |
pinctrl-names = "default", "state_uhs"; |
| 154 |
|
| 155 |
vmmc-supply = <®_3p3v>; |
| 156 |
vqmmc-supply = <®_1p8v>; |
| 157 |
mmc-hs200-1_8v; |
| 158 |
mmc-hs400-1_8v; |
| 159 |
bus-width = <8>; |
| 160 |
no-sd; |
| 161 |
no-sdio; |
| 162 |
non-removable; |
| 163 |
full-pwr-cycle-in-suspend; |
| 164 |
status = "okay"; |
| 165 |
}; |
| 166 |
|
| 167 |
&pcie0_clkref { |
| 168 |
compatible = "gpio-gate-clock"; |
| 169 |
clocks = <&rc21012_pci>; |
| 170 |
enable-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; |
| 171 |
/delete-property/ clock-frequency; |
| 172 |
}; |
| 173 |
|
| 174 |
&pciec0 { |
| 175 |
reset-gpios = <&gpio_exp_20 0 GPIO_ACTIVE_LOW>; |
| 176 |
status = "okay"; |
| 177 |
}; |
| 178 |
|
| 179 |
&pfc { |
| 180 |
pinctrl-0 = <&scif_clk_pins>; |
| 181 |
pinctrl-names = "default"; |
| 182 |
|
| 183 |
hscif0_pins: hscif0 { |
| 184 |
groups = "hscif0_data", "hscif0_ctrl"; |
| 185 |
function = "hscif0"; |
| 186 |
}; |
| 187 |
|
| 188 |
i2c0_pins: i2c0 { |
| 189 |
groups = "i2c0"; |
| 190 |
function = "i2c0"; |
| 191 |
}; |
| 192 |
|
| 193 |
i2c4_pins: i2c4 { |
| 194 |
groups = "i2c4"; |
| 195 |
function = "i2c4"; |
| 196 |
}; |
| 197 |
|
| 198 |
mmc_pins: mmc { |
| 199 |
groups = "mmc_data8", "mmc_ctrl", "mmc_ds"; |
| 200 |
function = "mmc"; |
| 201 |
power-source = <1800>; |
| 202 |
}; |
| 203 |
|
| 204 |
scif0_pins: scif0 { |
| 205 |
groups = "scif0_data", "scif0_ctrl"; |
| 206 |
function = "scif0"; |
| 207 |
}; |
| 208 |
|
| 209 |
scif_clk_pins: scif_clk { |
| 210 |
groups = "scif_clk"; |
| 211 |
function = "scif_clk"; |
| 212 |
}; |
| 213 |
}; |
| 214 |
|
| 215 |
&rwdt { |
| 216 |
timeout-sec = <60>; |
| 217 |
status = "okay"; |
| 218 |
}; |
| 219 |
|
| 220 |
&scif0 { |
| 221 |
pinctrl-0 = <&scif0_pins>; |
| 222 |
pinctrl-names = "default"; |
| 223 |
|
| 224 |
uart-has-rtscts; |
| 225 |
status = "okay"; |
| 226 |
}; |
| 227 |
|
| 228 |
&scif_clk { |
| 229 |
clock-frequency = <24000000>; |
| 230 |
}; |
| 231 |
|
| 232 |
&ufs { |
| 233 |
status = "okay"; |
| 234 |
}; |
| 235 |
|
| 236 |
&ufs30_clk { |
| 237 |
compatible = "gpio-gate-clock"; |
| 238 |
clocks = <&rc21012_ufs>; |
| 239 |
enable-gpios = <&gpio_exp_20 4 GPIO_ACTIVE_LOW>; |
| 240 |
/delete-property/ clock-frequency; |
| 241 |
}; |