| 1 |
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
/* |
| 3 |
* Device Tree Source for the R9A09G047E57 SMARC SoM board. |
| 4 |
* |
| 5 |
* Copyright (C) 2024 Renesas Electronics Corp. |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Please set the below switch position on the SoM and the corresponding macro |
| 10 |
* on the board DTS: |
| 11 |
* |
| 12 |
* Switch position SYS.1, Macro SW_SD0_DEV_SEL: |
| 13 |
* 0 - SD0 is connected to eMMC (default) |
| 14 |
* 1 - SD0 is connected to uSD0 card |
| 15 |
* |
| 16 |
* Switch position SYS.4, Macro SW_SER2_EN: |
| 17 |
* 0 - Select Module DSI connector(GPIO) |
| 18 |
* 1 - Select SER2 |
| 19 |
* |
| 20 |
* Switch position SYS.5, Macro SW_LCD_EN: |
| 21 |
* 0 - Select Misc. Signals routing |
| 22 |
* 1 - Select LCD |
| 23 |
* |
| 24 |
* Switch position BOOT.6, Macro SW_PDM_EN: |
| 25 |
* 0 - Select CAN routing |
| 26 |
* 1 - Select PDM |
| 27 |
*/ |
| 28 |
|
| 29 |
/ { |
| 30 |
compatible = "renesas,rzg3e-smarcm", "renesas,r9a09g047e57", "renesas,r9a09g047"; |
| 31 |
|
| 32 |
aliases { |
| 33 |
ethernet0 = ð0; |
| 34 |
ethernet1 = ð1; |
| 35 |
i2c2 = &i2c2; |
| 36 |
mmc0 = &sdhi0; |
| 37 |
mmc2 = &sdhi2; |
| 38 |
}; |
| 39 |
|
| 40 |
memory@48000000 { |
| 41 |
device_type = "memory"; |
| 42 |
/* First 128MB is reserved for secure area. */ |
| 43 |
reg = <0x0 0x48000000 0x0 0xf8000000>; |
| 44 |
}; |
| 45 |
|
| 46 |
reg_1p8v: regulator-1p8v { |
| 47 |
compatible = "regulator-fixed"; |
| 48 |
regulator-name = "fixed-1.8V"; |
| 49 |
regulator-min-microvolt = <1800000>; |
| 50 |
regulator-max-microvolt = <1800000>; |
| 51 |
regulator-boot-on; |
| 52 |
regulator-always-on; |
| 53 |
}; |
| 54 |
|
| 55 |
reg_3p3v: regulator-3p3v { |
| 56 |
compatible = "regulator-fixed"; |
| 57 |
regulator-name = "fixed-3.3V"; |
| 58 |
regulator-min-microvolt = <3300000>; |
| 59 |
regulator-max-microvolt = <3300000>; |
| 60 |
regulator-boot-on; |
| 61 |
regulator-always-on; |
| 62 |
}; |
| 63 |
|
| 64 |
reg_vdd0p8v_others: regulator-vdd0p8v-others { |
| 65 |
compatible = "regulator-fixed"; |
| 66 |
|
| 67 |
regulator-name = "fixed-0.8V"; |
| 68 |
regulator-min-microvolt = <800000>; |
| 69 |
regulator-max-microvolt = <800000>; |
| 70 |
regulator-boot-on; |
| 71 |
regulator-always-on; |
| 72 |
}; |
| 73 |
|
| 74 |
/* 32.768kHz crystal */ |
| 75 |
x3: x3-clock { |
| 76 |
compatible = "fixed-clock"; |
| 77 |
#clock-cells = <0>; |
| 78 |
clock-frequency = <32768>; |
| 79 |
}; |
| 80 |
}; |
| 81 |
|
| 82 |
&audio_extal_clk { |
| 83 |
clock-frequency = <48000000>; |
| 84 |
}; |
| 85 |
|
| 86 |
ð0 { |
| 87 |
phy-handle = <&phy0>; |
| 88 |
phy-mode = "rgmii-id"; |
| 89 |
|
| 90 |
pinctrl-0 = <ð0_pins>; |
| 91 |
pinctrl-names = "default"; |
| 92 |
status = "okay"; |
| 93 |
}; |
| 94 |
|
| 95 |
ð1 { |
| 96 |
phy-handle = <&phy1>; |
| 97 |
phy-mode = "rgmii-id"; |
| 98 |
|
| 99 |
pinctrl-0 = <ð1_pins>; |
| 100 |
pinctrl-names = "default"; |
| 101 |
status = "okay"; |
| 102 |
}; |
| 103 |
|
| 104 |
&gpu { |
| 105 |
status = "okay"; |
| 106 |
mali-supply = <®_vdd0p8v_others>; |
| 107 |
}; |
| 108 |
|
| 109 |
&i2c2 { |
| 110 |
pinctrl-0 = <&i2c2_pins>; |
| 111 |
pinctrl-names = "default"; |
| 112 |
clock-frequency = <400000>; |
| 113 |
status = "okay"; |
| 114 |
|
| 115 |
raa215300: pmic@12 { |
| 116 |
compatible = "renesas,raa215300"; |
| 117 |
reg = <0x12>, <0x6f>; |
| 118 |
reg-names = "main", "rtc"; |
| 119 |
clocks = <&x3>; |
| 120 |
clock-names = "xin"; |
| 121 |
|
| 122 |
pinctrl-0 = <&rtc_irq_pin>; |
| 123 |
pinctrl-names = "default"; |
| 124 |
|
| 125 |
interrupts-extended = <&pinctrl RZG3E_GPIO(S, 1) IRQ_TYPE_EDGE_FALLING>; |
| 126 |
}; |
| 127 |
}; |
| 128 |
|
| 129 |
&i3c { |
| 130 |
pinctrl-0 = <&i3c_pins>; |
| 131 |
pinctrl-names = "default"; |
| 132 |
i2c-scl-hz = <400000>; |
| 133 |
i3c-scl-hz = <12500000>; |
| 134 |
status = "okay"; |
| 135 |
}; |
| 136 |
|
| 137 |
&mdio0 { |
| 138 |
phy0: ethernet-phy@7 { |
| 139 |
compatible = "ethernet-phy-id0022.1640", |
| 140 |
"ethernet-phy-ieee802.3-c22"; |
| 141 |
reg = <7>; |
| 142 |
interrupts-extended = <&icu 3 IRQ_TYPE_LEVEL_LOW>; |
| 143 |
rxc-skew-psec = <1400>; |
| 144 |
txc-skew-psec = <1400>; |
| 145 |
rxdv-skew-psec = <0>; |
| 146 |
txdv-skew-psec = <0>; |
| 147 |
rxd0-skew-psec = <0>; |
| 148 |
rxd1-skew-psec = <0>; |
| 149 |
rxd2-skew-psec = <0>; |
| 150 |
rxd3-skew-psec = <0>; |
| 151 |
txd0-skew-psec = <0>; |
| 152 |
txd1-skew-psec = <0>; |
| 153 |
txd2-skew-psec = <0>; |
| 154 |
txd3-skew-psec = <0>; |
| 155 |
}; |
| 156 |
}; |
| 157 |
|
| 158 |
&mdio1 { |
| 159 |
phy1: ethernet-phy@7 { |
| 160 |
compatible = "ethernet-phy-id0022.1640", |
| 161 |
"ethernet-phy-ieee802.3-c22"; |
| 162 |
reg = <7>; |
| 163 |
interrupts-extended = <&icu 16 IRQ_TYPE_LEVEL_LOW>; |
| 164 |
rxc-skew-psec = <1400>; |
| 165 |
txc-skew-psec = <1400>; |
| 166 |
rxdv-skew-psec = <0>; |
| 167 |
txdv-skew-psec = <0>; |
| 168 |
rxd0-skew-psec = <0>; |
| 169 |
rxd1-skew-psec = <0>; |
| 170 |
rxd2-skew-psec = <0>; |
| 171 |
rxd3-skew-psec = <0>; |
| 172 |
txd0-skew-psec = <0>; |
| 173 |
txd1-skew-psec = <0>; |
| 174 |
txd2-skew-psec = <0>; |
| 175 |
txd3-skew-psec = <0>; |
| 176 |
}; |
| 177 |
}; |
| 178 |
|
| 179 |
&pinctrl { |
| 180 |
eth0_pins: eth0 { |
| 181 |
clk { |
| 182 |
pinmux = <RZG3E_PORT_PINMUX(B, 1, 1)>; /* TXC */ |
| 183 |
output-enable; |
| 184 |
}; |
| 185 |
|
| 186 |
ctrl { |
| 187 |
pinmux = <RZG3E_PORT_PINMUX(A, 1, 1)>, /* MDC */ |
| 188 |
<RZG3E_PORT_PINMUX(A, 0, 1)>, /* MDIO */ |
| 189 |
<RZG3E_PORT_PINMUX(C, 2, 15)>, /* PHY_INTR (IRQ2) */ |
| 190 |
<RZG3E_PORT_PINMUX(C, 1, 1)>, /* RXD3 */ |
| 191 |
<RZG3E_PORT_PINMUX(C, 0, 1)>, /* RXD2 */ |
| 192 |
<RZG3E_PORT_PINMUX(B, 7, 1)>, /* RXD1 */ |
| 193 |
<RZG3E_PORT_PINMUX(B, 6, 1)>, /* RXD0 */ |
| 194 |
<RZG3E_PORT_PINMUX(B, 0, 1)>, /* RXC */ |
| 195 |
<RZG3E_PORT_PINMUX(A, 2, 1)>, /* RX_CTL */ |
| 196 |
<RZG3E_PORT_PINMUX(B, 5, 1)>, /* TXD3 */ |
| 197 |
<RZG3E_PORT_PINMUX(B, 4, 1)>, /* TXD2 */ |
| 198 |
<RZG3E_PORT_PINMUX(B, 3, 1)>, /* TXD1 */ |
| 199 |
<RZG3E_PORT_PINMUX(B, 2, 1)>, /* TXD0 */ |
| 200 |
<RZG3E_PORT_PINMUX(A, 3, 1)>; /* TX_CTL */ |
| 201 |
}; |
| 202 |
}; |
| 203 |
|
| 204 |
eth1_pins: eth1 { |
| 205 |
clk { |
| 206 |
pinmux = <RZG3E_PORT_PINMUX(E, 1, 1)>; /* TXC */ |
| 207 |
output-enable; |
| 208 |
}; |
| 209 |
|
| 210 |
ctrl { |
| 211 |
|
| 212 |
pinmux = <RZG3E_PORT_PINMUX(D, 1, 1)>, /* MDC */ |
| 213 |
<RZG3E_PORT_PINMUX(D, 0, 1)>, /* MDIO */ |
| 214 |
<RZG3E_PORT_PINMUX(F, 2, 15)>, /* PHY_INTR (IRQ15) */ |
| 215 |
<RZG3E_PORT_PINMUX(F, 1, 1)>, /* RXD3 */ |
| 216 |
<RZG3E_PORT_PINMUX(F, 0, 1)>, /* RXD2 */ |
| 217 |
<RZG3E_PORT_PINMUX(E, 7, 1)>, /* RXD1 */ |
| 218 |
<RZG3E_PORT_PINMUX(E, 6, 1)>, /* RXD0 */ |
| 219 |
<RZG3E_PORT_PINMUX(E, 0, 1)>, /* RXC */ |
| 220 |
<RZG3E_PORT_PINMUX(D, 2, 1)>, /* RX_CTL */ |
| 221 |
<RZG3E_PORT_PINMUX(E, 5, 1)>, /* TXD3 */ |
| 222 |
<RZG3E_PORT_PINMUX(E, 4, 1)>, /* TXD2 */ |
| 223 |
<RZG3E_PORT_PINMUX(E, 3, 1)>, /* TXD1 */ |
| 224 |
<RZG3E_PORT_PINMUX(E, 2, 1)>, /* TXD0 */ |
| 225 |
<RZG3E_PORT_PINMUX(D, 3, 1)>; /* TX_CTL */ |
| 226 |
}; |
| 227 |
}; |
| 228 |
|
| 229 |
i2c2_pins: i2c { |
| 230 |
pinmux = <RZG3E_PORT_PINMUX(3, 4, 1)>, /* SCL2 */ |
| 231 |
<RZG3E_PORT_PINMUX(3, 5, 1)>; /* SDA2 */ |
| 232 |
}; |
| 233 |
|
| 234 |
i3c_pins: i3c { |
| 235 |
pinmux = <RZG3E_PORT_PINMUX(2, 0, 2)>, /* I3C0_SCL */ |
| 236 |
<RZG3E_PORT_PINMUX(2, 1, 2)>; /* I3C0_SDA */ |
| 237 |
drive-push-pull; |
| 238 |
}; |
| 239 |
|
| 240 |
rtc_irq_pin: rtc-irq { |
| 241 |
pins = "PS1"; |
| 242 |
bias-pull-up; |
| 243 |
}; |
| 244 |
|
| 245 |
sdhi0_emmc_pins: sd0-emmc { |
| 246 |
sd0-ctrl { |
| 247 |
pins = "SD0CLK", "SD0CMD"; |
| 248 |
renesas,output-impedance = <3>; |
| 249 |
}; |
| 250 |
|
| 251 |
sd0-data { |
| 252 |
pins = "SD0DAT0", "SD0DAT1", "SD0DAT2", "SD0DAT3", |
| 253 |
"SD0DAT4", "SD0DAT5", "SD0DAT6", "SD0DAT7"; |
| 254 |
renesas,output-impedance = <3>; |
| 255 |
}; |
| 256 |
|
| 257 |
sd0-rst { |
| 258 |
pins = "SD0RSTN"; |
| 259 |
renesas,output-impedance = <3>; |
| 260 |
}; |
| 261 |
}; |
| 262 |
|
| 263 |
sdhi0_usd_pins: sd0-usd { |
| 264 |
sd0-cd { |
| 265 |
pinmux = <RZG3E_PORT_PINMUX(5, 0, 8)>; |
| 266 |
}; |
| 267 |
|
| 268 |
sd0-ctrl { |
| 269 |
pins = "SD0CLK", "SD0CMD"; |
| 270 |
renesas,output-impedance = <3>; |
| 271 |
}; |
| 272 |
|
| 273 |
sd0-data { |
| 274 |
pins = "SD0DAT0", "SD0DAT1", "SD0DAT2", "SD0DAT3"; |
| 275 |
renesas,output-impedance = <3>; |
| 276 |
}; |
| 277 |
|
| 278 |
sd0-iovs { |
| 279 |
pins = "SD0IOVS"; |
| 280 |
renesas,output-impedance = <3>; |
| 281 |
}; |
| 282 |
|
| 283 |
sd0-pwen { |
| 284 |
pins = "SD0PWEN"; |
| 285 |
renesas,output-impedance = <3>; |
| 286 |
}; |
| 287 |
}; |
| 288 |
|
| 289 |
sdhi2_pins: sd2 { |
| 290 |
sd2-cd { |
| 291 |
pinmux = <RZG3E_PORT_PINMUX(K, 0, 1)>; /* SD2CD */ |
| 292 |
}; |
| 293 |
|
| 294 |
sd2-ctrl { |
| 295 |
pinmux = <RZG3E_PORT_PINMUX(H, 0, 1)>, /* SD2CLK */ |
| 296 |
<RZG3E_PORT_PINMUX(H, 1, 1)>; /* SD2CMD */ |
| 297 |
}; |
| 298 |
|
| 299 |
sd2-data { |
| 300 |
pinmux = <RZG3E_PORT_PINMUX(H, 2, 1)>, /* SD2DAT0 */ |
| 301 |
<RZG3E_PORT_PINMUX(H, 3, 1)>, /* SD2DAT1 */ |
| 302 |
<RZG3E_PORT_PINMUX(H, 4, 1)>, /* SD2DAT2 */ |
| 303 |
<RZG3E_PORT_PINMUX(H, 5, 1)>; /* SD2DAT3 */ |
| 304 |
}; |
| 305 |
|
| 306 |
sd2-iovs { |
| 307 |
pinmux = <RZG3E_PORT_PINMUX(K, 1, 1)>; /* SD2IOVS */ |
| 308 |
}; |
| 309 |
|
| 310 |
sd2-pwen { |
| 311 |
pinmux = <RZG3E_PORT_PINMUX(K, 2, 1)>; /* SD2PWEN */ |
| 312 |
}; |
| 313 |
}; |
| 314 |
|
| 315 |
xspi_pins: xspi0 { |
| 316 |
pinmux = <RZG3E_PORT_PINMUX(M, 0, 0)>, /* XSPI0_IO0 */ |
| 317 |
<RZG3E_PORT_PINMUX(M, 1, 0)>, /* XSPI0_IO1 */ |
| 318 |
<RZG3E_PORT_PINMUX(M, 2, 0)>, /* XSPI0_IO2 */ |
| 319 |
<RZG3E_PORT_PINMUX(M, 3, 0)>, /* XSPI0_IO3 */ |
| 320 |
<RZG3E_PORT_PINMUX(L, 0, 0)>, /* XSPI0_CKP */ |
| 321 |
<RZG3E_PORT_PINMUX(L, 1, 0)>; /* XSPI0_CS0 */ |
| 322 |
}; |
| 323 |
}; |
| 324 |
|
| 325 |
&qextal_clk { |
| 326 |
clock-frequency = <24000000>; |
| 327 |
}; |
| 328 |
|
| 329 |
&rtxin_clk { |
| 330 |
clock-frequency = <32768>; |
| 331 |
}; |
| 332 |
|
| 333 |
#if (SW_SD0_DEV_SEL) |
| 334 |
&sdhi0 { |
| 335 |
pinctrl-0 = <&sdhi0_usd_pins>; |
| 336 |
pinctrl-1 = <&sdhi0_usd_pins>; |
| 337 |
pinctrl-names = "default", "state_uhs"; |
| 338 |
|
| 339 |
vmmc-supply = <®_3p3v>; |
| 340 |
vqmmc-supply = <&sdhi0_vqmmc>; |
| 341 |
bus-width = <4>; |
| 342 |
sd-uhs-sdr50; |
| 343 |
sd-uhs-sdr104; |
| 344 |
status = "okay"; |
| 345 |
}; |
| 346 |
|
| 347 |
&sdhi0_vqmmc { |
| 348 |
status = "okay"; |
| 349 |
}; |
| 350 |
#else |
| 351 |
&sdhi0 { |
| 352 |
pinctrl-0 = <&sdhi0_emmc_pins>; |
| 353 |
pinctrl-1 = <&sdhi0_emmc_pins>; |
| 354 |
pinctrl-names = "default", "state_uhs"; |
| 355 |
|
| 356 |
vmmc-supply = <®_3p3v>; |
| 357 |
vqmmc-supply = <®_1p8v>; |
| 358 |
bus-width = <8>; |
| 359 |
mmc-hs200-1_8v; |
| 360 |
non-removable; |
| 361 |
fixed-emmc-driver-type = <1>; |
| 362 |
status = "okay"; |
| 363 |
}; |
| 364 |
#endif |
| 365 |
|
| 366 |
&sdhi2 { |
| 367 |
pinctrl-0 = <&sdhi2_pins>; |
| 368 |
pinctrl-1 = <&sdhi2_pins>; |
| 369 |
pinctrl-names = "default", "state_uhs"; |
| 370 |
|
| 371 |
vmmc-supply = <®_3p3v>; |
| 372 |
vqmmc-supply = <&sdhi2_vqmmc>; |
| 373 |
bus-width = <4>; |
| 374 |
sd-uhs-sdr50; |
| 375 |
sd-uhs-sdr104; |
| 376 |
status = "okay"; |
| 377 |
}; |
| 378 |
|
| 379 |
&sdhi2_vqmmc { |
| 380 |
status = "okay"; |
| 381 |
}; |
| 382 |
|
| 383 |
&wdt1 { |
| 384 |
status = "okay"; |
| 385 |
}; |
| 386 |
|
| 387 |
&xspi { |
| 388 |
pinctrl-0 = <&xspi_pins>; |
| 389 |
pinctrl-names = "default"; |
| 390 |
status = "okay"; |
| 391 |
|
| 392 |
flash@0 { |
| 393 |
compatible = "jedec,spi-nor"; |
| 394 |
reg = <0>; |
| 395 |
vcc-supply = <®_1p8v>; |
| 396 |
m25p,fast-read; |
| 397 |
spi-max-frequency = <50000000>; |
| 398 |
spi-tx-bus-width = <4>; |
| 399 |
spi-rx-bus-width = <4>; |
| 400 |
|
| 401 |
partitions { |
| 402 |
compatible = "fixed-partitions"; |
| 403 |
#address-cells = <1>; |
| 404 |
#size-cells = <1>; |
| 405 |
|
| 406 |
partition@0 { |
| 407 |
label = "bl2"; |
| 408 |
reg = <0x00000000 0x00060000>; |
| 409 |
}; |
| 410 |
|
| 411 |
partition@60000 { |
| 412 |
label = "fip"; |
| 413 |
reg = <0x00060000 0x007a0000>; |
| 414 |
}; |
| 415 |
|
| 416 |
partition@800000 { |
| 417 |
label = "user"; |
| 418 |
reg = <0x800000 0x800000>; |
| 419 |
}; |
| 420 |
}; |
| 421 |
}; |
| 422 |
}; |