| 1 |
// SPDX-License-Identifier: GPL-2.0 |
| 2 |
/* |
| 3 |
* Device Tree Source for the RZA2MEVB board |
| 4 |
* |
| 5 |
* Copyright (C) 2018 Renesas Electronics |
| 6 |
* |
| 7 |
* As upstream Linux does not support XIP, it cannot run in 8 MiB of HyperRAM. |
| 8 |
* Hence the 64 MiB of SDRAM on the sub-board needs to be enabled, which has |
| 9 |
* the following ramifications: |
| 10 |
* - SCIF4 connected to the on-board USB-serial can no longer be used as the |
| 11 |
* serial console, |
| 12 |
* - Instead, SCIF2 is used as the serial console, by connecting a 3.3V TTL |
| 13 |
* USB-to-Serial adapter to the CMOS camera connector: |
| 14 |
* - RXD = CN17-9, |
| 15 |
* - TXD = CN17-10, |
| 16 |
* - GND = CN17-2 or CN17-17, |
| 17 |
* - The first Ethernet channel can no longer be used, |
| 18 |
* - USB Channel 1 loses the overcurrent input signal. |
| 19 |
* |
| 20 |
* Please make sure your sub-board matches the following switch settings: |
| 21 |
* |
| 22 |
* SW6 SW6-1 set to SDRAM |
| 23 |
* ON SW6-2 set to Audio |
| 24 |
* +---------------------+ SW6-3 set to DRP |
| 25 |
* | = = = = = | SW6-4 set to CEU |
| 26 |
* | = = | SW6-5 set to Ether2 |
| 27 |
* | 1 2 3 4 5 6 7 8 9 0 | SW6-6 set to VDC6 |
| 28 |
* +---------------------+ SW6-7 set to VDC6 |
| 29 |
*/ |
| 30 |
|
| 31 |
/dts-v1/; |
| 32 |
#include "r7s9210.dtsi" |
| 33 |
#include <dt-bindings/gpio/gpio.h> |
| 34 |
#include <dt-bindings/input/input.h> |
| 35 |
#include <dt-bindings/pinctrl/r7s9210-pinctrl.h> |
| 36 |
|
| 37 |
/ { |
| 38 |
model = "RZA2MEVB"; |
| 39 |
compatible = "renesas,rza2mevb", "renesas,r7s9210"; |
| 40 |
|
| 41 |
aliases { |
| 42 |
serial0 = &scif2; |
| 43 |
ethernet0 = ðer1; |
| 44 |
}; |
| 45 |
|
| 46 |
chosen { |
| 47 |
bootargs = "ignore_loglevel"; |
| 48 |
stdout-path = "serial0:115200n8"; |
| 49 |
}; |
| 50 |
|
| 51 |
keyboard { |
| 52 |
compatible = "gpio-keys"; |
| 53 |
|
| 54 |
pinctrl-names = "default"; |
| 55 |
pinctrl-0 = <&keyboard_pins>; |
| 56 |
|
| 57 |
key-3 { |
| 58 |
interrupts-extended = <&irqc 0 IRQ_TYPE_EDGE_BOTH>; |
| 59 |
linux,code = <KEY_3>; |
| 60 |
label = "SW3"; |
| 61 |
wakeup-source; |
| 62 |
}; |
| 63 |
}; |
| 64 |
|
| 65 |
leds { |
| 66 |
compatible = "gpio-leds"; |
| 67 |
|
| 68 |
led-red { |
| 69 |
gpios = <&pinctrl RZA2_PIN(PORT6, 0) GPIO_ACTIVE_HIGH>; |
| 70 |
}; |
| 71 |
led-green { |
| 72 |
gpios = <&pinctrl RZA2_PIN(PORTC, 1) GPIO_ACTIVE_HIGH>; |
| 73 |
}; |
| 74 |
}; |
| 75 |
|
| 76 |
memory@c000000 { |
| 77 |
device_type = "memory"; |
| 78 |
reg = <0x0c000000 0x04000000>; /* SDRAM */ |
| 79 |
}; |
| 80 |
}; |
| 81 |
|
| 82 |
&ehci0 { |
| 83 |
status = "okay"; |
| 84 |
}; |
| 85 |
|
| 86 |
&ehci1 { |
| 87 |
status = "okay"; |
| 88 |
}; |
| 89 |
|
| 90 |
ðer1 { |
| 91 |
pinctrl-names = "default"; |
| 92 |
pinctrl-0 = <ð1_pins>; |
| 93 |
status = "okay"; |
| 94 |
renesas,no-ether-link; |
| 95 |
phy-handle = <&phy1>; |
| 96 |
phy1: ethernet-phy@1 { |
| 97 |
compatible = "ethernet-phy-id001c.c816", |
| 98 |
"ethernet-phy-ieee802.3-c22"; |
| 99 |
reg = <0>; |
| 100 |
}; |
| 101 |
}; |
| 102 |
|
| 103 |
/* EXTAL */ |
| 104 |
&extal_clk { |
| 105 |
clock-frequency = <24000000>; /* 24MHz */ |
| 106 |
}; |
| 107 |
|
| 108 |
&i2c3 { |
| 109 |
status = "okay"; |
| 110 |
clock-frequency = <400000>; |
| 111 |
|
| 112 |
pinctrl-names = "default"; |
| 113 |
pinctrl-0 = <&i2c3_pins>; |
| 114 |
|
| 115 |
eeprom@50 { |
| 116 |
compatible = "renesas,r1ex24128", "atmel,24c128"; |
| 117 |
reg = <0x50>; |
| 118 |
pagesize = <64>; |
| 119 |
}; |
| 120 |
}; |
| 121 |
|
| 122 |
/* High resolution System tick timers */ |
| 123 |
&ostm0 { |
| 124 |
status = "okay"; |
| 125 |
}; |
| 126 |
|
| 127 |
&ostm1 { |
| 128 |
status = "okay"; |
| 129 |
}; |
| 130 |
|
| 131 |
&pinctrl { |
| 132 |
eth0_pins: eth0 { |
| 133 |
pinmux = <RZA2_PINMUX(PORTE, 0, 7)>, /* REF50CK0 */ |
| 134 |
<RZA2_PINMUX(PORT6, 1, 7)>, /* RMMI0_TXDEN */ |
| 135 |
<RZA2_PINMUX(PORT6, 2, 7)>, /* RMII0_TXD0 */ |
| 136 |
<RZA2_PINMUX(PORT6, 3, 7)>, /* RMII0_TXD1 */ |
| 137 |
<RZA2_PINMUX(PORTE, 4, 7)>, /* RMII0_CRSDV */ |
| 138 |
<RZA2_PINMUX(PORTE, 1, 7)>, /* RMII0_RXD0 */ |
| 139 |
<RZA2_PINMUX(PORTE, 2, 7)>, /* RMII0_RXD1 */ |
| 140 |
<RZA2_PINMUX(PORTE, 3, 7)>, /* RMII0_RXER */ |
| 141 |
<RZA2_PINMUX(PORTE, 5, 1)>, /* ET0_MDC */ |
| 142 |
<RZA2_PINMUX(PORTE, 6, 1)>, /* ET0_MDIO */ |
| 143 |
<RZA2_PINMUX(PORTL, 0, 5)>; /* IRQ4 */ |
| 144 |
}; |
| 145 |
|
| 146 |
eth1_pins: eth1 { |
| 147 |
pinmux = <RZA2_PINMUX(PORTK, 3, 7)>, /* REF50CK1 */ |
| 148 |
<RZA2_PINMUX(PORTK, 0, 7)>, /* RMMI1_TXDEN */ |
| 149 |
<RZA2_PINMUX(PORTK, 1, 7)>, /* RMII1_TXD0 */ |
| 150 |
<RZA2_PINMUX(PORTK, 2, 7)>, /* RMII1_TXD1 */ |
| 151 |
<RZA2_PINMUX(PORT3, 2, 7)>, /* RMII1_CRSDV */ |
| 152 |
<RZA2_PINMUX(PORTK, 4, 7)>, /* RMII1_RXD0 */ |
| 153 |
<RZA2_PINMUX(PORT3, 5, 7)>, /* RMII1_RXD1 */ |
| 154 |
<RZA2_PINMUX(PORT3, 1, 7)>, /* RMII1_RXER */ |
| 155 |
<RZA2_PINMUX(PORT3, 3, 1)>, /* ET1_MDC */ |
| 156 |
<RZA2_PINMUX(PORT3, 4, 1)>, /* ET1_MDIO */ |
| 157 |
<RZA2_PINMUX(PORTL, 1, 5)>; /* IRQ5 */ |
| 158 |
}; |
| 159 |
|
| 160 |
i2c3_pins: i2c3 { |
| 161 |
pinmux = <RZA2_PINMUX(PORTD, 6, 1)>, /* RIIC3SCL */ |
| 162 |
<RZA2_PINMUX(PORTD, 7, 1)>; /* RIIC3SDA */ |
| 163 |
}; |
| 164 |
|
| 165 |
keyboard_pins: keyboard { |
| 166 |
pinmux = <RZA2_PINMUX(PORTJ, 1, 6)>; /* IRQ0 */ |
| 167 |
}; |
| 168 |
|
| 169 |
/* Serial Console */ |
| 170 |
scif2_pins: serial2 { |
| 171 |
pinmux = <RZA2_PINMUX(PORTE, 2, 3)>, /* TxD2 */ |
| 172 |
<RZA2_PINMUX(PORTE, 1, 3)>; /* RxD2 */ |
| 173 |
}; |
| 174 |
|
| 175 |
sdhi0_pins: sdhi0 { |
| 176 |
pinmux = <RZA2_PINMUX(PORT5, 0, 3)>, /* SD0_CD */ |
| 177 |
<RZA2_PINMUX(PORT5, 1, 3)>; /* SD0_WP */ |
| 178 |
}; |
| 179 |
|
| 180 |
sdhi1_pins: sdhi1 { |
| 181 |
pinmux = <RZA2_PINMUX(PORT5, 4, 3)>, /* SD1_CD */ |
| 182 |
<RZA2_PINMUX(PORT5, 5, 3)>; /* SD1_WP */ |
| 183 |
}; |
| 184 |
|
| 185 |
usb0_pins: usb0 { |
| 186 |
pinmux = <RZA2_PINMUX(PORT5, 2, 3)>, /* VBUSIN0 */ |
| 187 |
<RZA2_PINMUX(PORTC, 6, 1)>, /* VBUSEN0 */ |
| 188 |
<RZA2_PINMUX(PORTC, 7, 1)>; /* OVRCUR0 */ |
| 189 |
}; |
| 190 |
|
| 191 |
usb1_pins: usb1 { |
| 192 |
pinmux = <RZA2_PINMUX(PORTC, 0, 1)>, /* VBUSIN1 */ |
| 193 |
<RZA2_PINMUX(PORTC, 5, 1)>; /* VBUSEN1 */ |
| 194 |
}; |
| 195 |
}; |
| 196 |
|
| 197 |
/* RTC_X1 */ |
| 198 |
&rtc_x1_clk { |
| 199 |
clock-frequency = <32768>; |
| 200 |
}; |
| 201 |
|
| 202 |
/* Serial Console */ |
| 203 |
&scif2 { |
| 204 |
pinctrl-names = "default"; |
| 205 |
pinctrl-0 = <&scif2_pins>; |
| 206 |
|
| 207 |
status = "okay"; |
| 208 |
}; |
| 209 |
|
| 210 |
&sdhi0 { |
| 211 |
pinctrl-names = "default"; |
| 212 |
pinctrl-0 = <&sdhi0_pins>; |
| 213 |
bus-width = <4>; |
| 214 |
status = "okay"; |
| 215 |
}; |
| 216 |
|
| 217 |
&sdhi1 { |
| 218 |
pinctrl-names = "default"; |
| 219 |
pinctrl-0 = <&sdhi1_pins>; |
| 220 |
bus-width = <4>; |
| 221 |
status = "okay"; |
| 222 |
}; |
| 223 |
|
| 224 |
/* USB-0 as Host */ |
| 225 |
&usb2_phy0 { |
| 226 |
pinctrl-names = "default"; |
| 227 |
pinctrl-0 = <&usb0_pins>; |
| 228 |
dr_mode = "host"; /* Requires JP3 to be fitted */ |
| 229 |
status = "okay"; |
| 230 |
}; |
| 231 |
|
| 232 |
/* USB-1 as Host */ |
| 233 |
&usb2_phy1 { |
| 234 |
pinctrl-names = "default"; |
| 235 |
pinctrl-0 = <&usb1_pins>; |
| 236 |
dr_mode = "host"; |
| 237 |
status = "okay"; |
| 238 |
}; |
| 239 |
|
| 240 |
/* USB_X1 */ |
| 241 |
&usb_x1_clk { |
| 242 |
clock-frequency = <48000000>; |
| 243 |
}; |