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