| 1 |
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
/* |
| 3 |
* Device Tree Source for the RZ/G3E SMARC EVK board |
| 4 |
* |
| 5 |
* Copyright (C) 2024 Renesas Electronics Corp. |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
|
| 10 |
/* Switch selection settings */ |
| 11 |
#define SW_GPIO8_CAN0_STB 0 |
| 12 |
#define SW_GPIO9_CAN1_STB 0 |
| 13 |
#define SW_LCD_EN 0 |
| 14 |
#define SW_PDM_EN 0 |
| 15 |
#define SW_SER0_PMOD 1 |
| 16 |
#define SW_SER2_EN 1 |
| 17 |
#define SW_SD0_DEV_SEL 0 |
| 18 |
#define SW_SDIO_M2E 0 |
| 19 |
|
| 20 |
#define PMOD_GPIO4 0 |
| 21 |
#define PMOD_GPIO6 0 |
| 22 |
#define PMOD_GPIO7 0 |
| 23 |
|
| 24 |
#define KEY_1_GPIO RZG3E_GPIO(3, 1) |
| 25 |
#define KEY_2_GPIO RZG3E_GPIO(8, 4) |
| 26 |
#define KEY_3_GPIO RZG3E_GPIO(8, 5) |
| 27 |
|
| 28 |
#include <dt-bindings/gpio/gpio.h> |
| 29 |
#include <dt-bindings/input/input.h> |
| 30 |
#include <dt-bindings/pinctrl/renesas,r9a09g047-pinctrl.h> |
| 31 |
#include "r9a09g047e57.dtsi" |
| 32 |
#include "rzg3e-smarc-som.dtsi" |
| 33 |
#include "renesas-smarc2.dtsi" |
| 34 |
|
| 35 |
/ { |
| 36 |
model = "Renesas SMARC EVK version 2 based on r9a09g047e57"; |
| 37 |
compatible = "renesas,smarc2-evk", "renesas,rzg3e-smarcm", |
| 38 |
"renesas,r9a09g047e57", "renesas,r9a09g047"; |
| 39 |
|
| 40 |
aliases { |
| 41 |
i2c0 = &i2c0; |
| 42 |
serial0 = &rsci4; |
| 43 |
serial1 = &rsci9; |
| 44 |
serial2 = &rsci2; |
| 45 |
serial3 = &scif0; |
| 46 |
mmc1 = &sdhi1; |
| 47 |
}; |
| 48 |
|
| 49 |
vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd { |
| 50 |
compatible = "regulator-gpio"; |
| 51 |
regulator-name = "SD1_PVDD"; |
| 52 |
regulator-min-microvolt = <1800000>; |
| 53 |
regulator-max-microvolt = <3300000>; |
| 54 |
gpios = <&pinctrl RZG3E_GPIO(1, 5) GPIO_ACTIVE_HIGH>; |
| 55 |
gpios-states = <0>; |
| 56 |
states = <3300000 0>, <1800000 1>; |
| 57 |
}; |
| 58 |
}; |
| 59 |
|
| 60 |
&canfd { |
| 61 |
pinctrl-0 = <&canfd_pins>; |
| 62 |
pinctrl-names = "default"; |
| 63 |
|
| 64 |
#if (!SW_PDM_EN) |
| 65 |
channel1 { |
| 66 |
status = "okay"; |
| 67 |
#if (!SW_LCD_EN) && (SW_GPIO9_CAN1_STB) |
| 68 |
phys = <&can_transceiver1>; |
| 69 |
#endif |
| 70 |
}; |
| 71 |
#endif |
| 72 |
|
| 73 |
#if (!SW_LCD_EN) |
| 74 |
channel4 { |
| 75 |
status = "okay"; |
| 76 |
#if (SW_GPIO8_CAN0_STB) |
| 77 |
phys = <&can_transceiver0>; |
| 78 |
#endif |
| 79 |
}; |
| 80 |
#endif |
| 81 |
}; |
| 82 |
|
| 83 |
#if (!SW_LCD_EN) && (SW_GPIO8_CAN0_STB) |
| 84 |
&can_transceiver0 { |
| 85 |
standby-gpios = <&pinctrl RZG3E_GPIO(5, 4) GPIO_ACTIVE_HIGH>; |
| 86 |
status = "okay"; |
| 87 |
}; |
| 88 |
#endif |
| 89 |
|
| 90 |
#if (!SW_LCD_EN) && (SW_GPIO9_CAN1_STB) |
| 91 |
&can_transceiver1 { |
| 92 |
standby-gpios = <&pinctrl RZG3E_GPIO(5, 5) GPIO_ACTIVE_HIGH>; |
| 93 |
status = "okay"; |
| 94 |
}; |
| 95 |
#endif |
| 96 |
|
| 97 |
&i2c0 { |
| 98 |
pinctrl-0 = <&i2c0_pins>; |
| 99 |
pinctrl-names = "default"; |
| 100 |
}; |
| 101 |
|
| 102 |
&keys { |
| 103 |
pinctrl-0 = <&nmi_pins>; |
| 104 |
pinctrl-names = "default"; |
| 105 |
|
| 106 |
key-sleep { |
| 107 |
interrupts-extended = <&icu 0 IRQ_TYPE_EDGE_FALLING>; |
| 108 |
linux,code = <KEY_SLEEP>; |
| 109 |
label = "SLEEP"; |
| 110 |
debounce-interval = <20>; |
| 111 |
}; |
| 112 |
#if PMOD_GPIO4 |
| 113 |
/delete-node/ key-1; |
| 114 |
#endif |
| 115 |
|
| 116 |
#if SW_LCD_EN || PMOD_GPIO6 |
| 117 |
/delete-node/ key-2; |
| 118 |
#endif |
| 119 |
|
| 120 |
#if SW_LCD_EN || PMOD_GPIO7 |
| 121 |
/delete-node/ key-3; |
| 122 |
#endif |
| 123 |
}; |
| 124 |
|
| 125 |
&pinctrl { |
| 126 |
canfd_pins: canfd { |
| 127 |
can1_pins: can1 { |
| 128 |
pinmux = <RZG3E_PORT_PINMUX(L, 2, 3)>, /* RX */ |
| 129 |
<RZG3E_PORT_PINMUX(L, 3, 3)>; /* TX */ |
| 130 |
}; |
| 131 |
|
| 132 |
can4_pins: can4 { |
| 133 |
pinmux = <RZG3E_PORT_PINMUX(5, 2, 3)>, /* RX */ |
| 134 |
<RZG3E_PORT_PINMUX(5, 3, 3)>; /* TX */ |
| 135 |
}; |
| 136 |
}; |
| 137 |
|
| 138 |
i2c0_pins: i2c0 { |
| 139 |
pinmux = <RZG3E_PORT_PINMUX(D, 4, 4)>, /* SCL0 */ |
| 140 |
<RZG3E_PORT_PINMUX(D, 5, 4)>; /* SDA0 */ |
| 141 |
}; |
| 142 |
|
| 143 |
nmi_pins: nmi { |
| 144 |
pinmux = <RZG3E_PORT_PINMUX(S, 0, 0)>; /* NMI */ |
| 145 |
input-schmitt-enable; |
| 146 |
}; |
| 147 |
|
| 148 |
rsci2_pins: rsci2 { |
| 149 |
pinmux = <RZG3E_PORT_PINMUX(1, 0, 1)>, /* RXD2 */ |
| 150 |
<RZG3E_PORT_PINMUX(1, 1, 1)>, /* TXD2 */ |
| 151 |
<RZG3E_PORT_PINMUX(1, 2, 6)>, /* CTS2N */ |
| 152 |
<RZG3E_PORT_PINMUX(1, 3, 1)>; /* RTS2N */ |
| 153 |
bias-pull-up; |
| 154 |
}; |
| 155 |
|
| 156 |
rsci4_pins: rsci4 { |
| 157 |
pinmux = <RZG3E_PORT_PINMUX(7, 6, 5)>, /* RXD4 */ |
| 158 |
<RZG3E_PORT_PINMUX(7, 7, 5)>, /* TXD4 */ |
| 159 |
<RZG3E_PORT_PINMUX(8, 0, 6)>, /* CTS4N */ |
| 160 |
<RZG3E_PORT_PINMUX(8, 1, 5)>; /* RTS4N */ |
| 161 |
bias-pull-up; |
| 162 |
}; |
| 163 |
|
| 164 |
rsci9_pins: rsci9 { |
| 165 |
pinmux = <RZG3E_PORT_PINMUX(8, 2, 5)>, /* RXD9 */ |
| 166 |
<RZG3E_PORT_PINMUX(8, 3, 5)>; /* TXD9 */ |
| 167 |
bias-pull-up; |
| 168 |
}; |
| 169 |
|
| 170 |
scif_pins: scif { |
| 171 |
pins = "SCIF_TXD", "SCIF_RXD"; |
| 172 |
renesas,output-impedance = <1>; |
| 173 |
}; |
| 174 |
|
| 175 |
sd1-pwr-en-hog { |
| 176 |
gpio-hog; |
| 177 |
gpios = <RZG3E_GPIO(1, 6) GPIO_ACTIVE_HIGH>; |
| 178 |
output-high; |
| 179 |
line-name = "sd1_pwr_en"; |
| 180 |
}; |
| 181 |
|
| 182 |
sdhi1_pins: sd1 { |
| 183 |
sd1-cd { |
| 184 |
pinmux = <RZG3E_PORT_PINMUX(1, 4, 8)>; /* SD1CD */ |
| 185 |
}; |
| 186 |
|
| 187 |
sd1-ctrl { |
| 188 |
pinmux = <RZG3E_PORT_PINMUX(G, 0, 1)>, /* SD1CLK */ |
| 189 |
<RZG3E_PORT_PINMUX(G, 1, 1)>; /* SD1CMD */ |
| 190 |
}; |
| 191 |
|
| 192 |
sd1-data { |
| 193 |
pinmux = <RZG3E_PORT_PINMUX(G, 2, 1)>, /* SD1DAT0 */ |
| 194 |
<RZG3E_PORT_PINMUX(G, 3, 1)>, /* SD1DAT1 */ |
| 195 |
<RZG3E_PORT_PINMUX(G, 4, 1)>, /* SD1DAT2 */ |
| 196 |
<RZG3E_PORT_PINMUX(G, 5, 1)>; /* SD1DAT3 */ |
| 197 |
}; |
| 198 |
}; |
| 199 |
|
| 200 |
usb3_pins: usb3 { |
| 201 |
pinmux = <RZG3E_PORT_PINMUX(4, 1, 12)>, /* USB30_VBUSEN */ |
| 202 |
<RZG3E_PORT_PINMUX(4, 0, 12)>; /* USB30_OVRCURN */ |
| 203 |
}; |
| 204 |
}; |
| 205 |
|
| 206 |
#if SW_SER0_PMOD && SW_SER2_EN |
| 207 |
&rsci2 { |
| 208 |
pinctrl-0 = <&rsci2_pins>; |
| 209 |
pinctrl-names = "default"; |
| 210 |
|
| 211 |
uart-has-rtscts; |
| 212 |
|
| 213 |
status = "okay"; |
| 214 |
}; |
| 215 |
#endif |
| 216 |
|
| 217 |
#if (!SW_LCD_EN) && (SW_SER0_PMOD) |
| 218 |
&rsci4 { |
| 219 |
pinctrl-0 = <&rsci4_pins>; |
| 220 |
pinctrl-names = "default"; |
| 221 |
|
| 222 |
uart-has-rtscts; |
| 223 |
|
| 224 |
status = "okay"; |
| 225 |
}; |
| 226 |
#endif |
| 227 |
|
| 228 |
#if (!SW_LCD_EN) |
| 229 |
&rsci9 { |
| 230 |
pinctrl-0 = <&rsci9_pins>; |
| 231 |
pinctrl-names = "default"; |
| 232 |
|
| 233 |
status = "okay"; |
| 234 |
}; |
| 235 |
#endif |
| 236 |
|
| 237 |
&scif0 { |
| 238 |
pinctrl-0 = <&scif_pins>; |
| 239 |
pinctrl-names = "default"; |
| 240 |
}; |
| 241 |
|
| 242 |
&sdhi1 { |
| 243 |
pinctrl-0 = <&sdhi1_pins>; |
| 244 |
pinctrl-1 = <&sdhi1_pins>; |
| 245 |
pinctrl-names = "default", "state_uhs"; |
| 246 |
|
| 247 |
vmmc-supply = <®_3p3v>; |
| 248 |
vqmmc-supply = <&vqmmc_sd1_pvdd>; |
| 249 |
}; |
| 250 |
|
| 251 |
&xhci { |
| 252 |
pinctrl-0 = <&usb3_pins>; |
| 253 |
pinctrl-names = "default"; |
| 254 |
}; |