Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree Source for the RZA2MEVB board
0004  *
0005  * Copyright (C) 2018 Renesas Electronics
0006  *
0007  * As upstream Linux does not support XIP, it cannot run in 8 MiB of HyperRAM.
0008  * Hence the 64 MiB of SDRAM on the sub-board needs to be enabled, which has
0009  * the following ramifications:
0010  *   - SCIF4 connected to the on-board USB-serial can no longer be used as the
0011  *     serial console,
0012  *   - Instead, SCIF2 is used as the serial console, by connecting a 3.3V TTL
0013  *     USB-to-Serial adapter to the CMOS camera connector:
0014  *       - RXD = CN17-9,
0015  *       - TXD = CN17-10,
0016  *       - GND = CN17-2 or CN17-17,
0017  *   - The first Ethernet channel can no longer be used,
0018  *   - USB Channel 1 loses the overcurrent input signal.
0019  *
0020  * Please make sure your sub-board matches the following switch settings:
0021  *
0022  *           SW6                SW6-1 set to SDRAM
0023  *  ON                          SW6-2 set to Audio
0024  * +---------------------+      SW6-3 set to DRP
0025  * | =   =   = = =       |      SW6-4 set to CEU
0026  * |   =   =             |      SW6-5 set to Ether2
0027  * | 1 2 3 4 5 6 7 8 9 0 |      SW6-6 set to VDC6
0028  * +---------------------+      SW6-7 set to VDC6
0029  */
0030 
0031 /dts-v1/;
0032 #include "r7s9210.dtsi"
0033 #include <dt-bindings/gpio/gpio.h>
0034 #include <dt-bindings/input/input.h>
0035 #include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
0036 
0037 / {
0038         model = "RZA2MEVB";
0039         compatible = "renesas,rza2mevb", "renesas,r7s9210";
0040 
0041         aliases {
0042                 serial0 = &scif2;
0043                 ethernet0 = &ether1;
0044         };
0045 
0046         chosen {
0047                 bootargs = "ignore_loglevel";
0048                 stdout-path = "serial0:115200n8";
0049         };
0050 
0051         keyboard {
0052                 compatible = "gpio-keys";
0053 
0054                 pinctrl-names = "default";
0055                 pinctrl-0 = <&keyboard_pins>;
0056 
0057                 key-3 {
0058                         interrupt-parent = <&irqc>;
0059                         interrupts = <0 IRQ_TYPE_EDGE_BOTH>;
0060                         linux,code = <KEY_3>;
0061                         label = "SW3";
0062                         wakeup-source;
0063                 };
0064         };
0065 
0066         lbsc {
0067                 #address-cells = <1>;
0068                 #size-cells = <1>;
0069         };
0070 
0071         leds {
0072                 compatible = "gpio-leds";
0073 
0074                 led-red {
0075                         gpios = <&pinctrl RZA2_PIN(PORT6, 0) GPIO_ACTIVE_HIGH>;
0076                 };
0077                 led-green {
0078                         gpios = <&pinctrl RZA2_PIN(PORTC, 1) GPIO_ACTIVE_HIGH>;
0079                 };
0080         };
0081 
0082         memory@c000000 {
0083                 device_type = "memory";
0084                 reg = <0x0c000000 0x04000000>;  /* SDRAM */
0085         };
0086 };
0087 
0088 &ehci0 {
0089         status = "okay";
0090 };
0091 
0092 &ehci1 {
0093         status = "okay";
0094 };
0095 
0096 &ether1 {
0097         pinctrl-names = "default";
0098         pinctrl-0 = <&eth1_pins>;
0099         status = "okay";
0100         renesas,no-ether-link;
0101         phy-handle = <&phy1>;
0102         phy1: ethernet-phy@1 {
0103                 compatible = "ethernet-phy-id001c.c816",
0104                              "ethernet-phy-ieee802.3-c22";
0105                 reg = <0>;
0106         };
0107 };
0108 
0109 /* EXTAL */
0110 &extal_clk {
0111         clock-frequency = <24000000>;   /* 24MHz */
0112 };
0113 
0114 &i2c3 {
0115         status = "okay";
0116         clock-frequency = <400000>;
0117 
0118         pinctrl-names = "default";
0119         pinctrl-0 = <&i2c3_pins>;
0120 
0121         eeprom@50 {
0122                 compatible = "renesas,r1ex24128", "atmel,24c128";
0123                 reg = <0x50>;
0124                 pagesize = <64>;
0125         };
0126 };
0127 
0128 /* High resolution System tick timers */
0129 &ostm0 {
0130         status = "okay";
0131 };
0132 
0133 &ostm1 {
0134         status = "okay";
0135 };
0136 
0137 &pinctrl {
0138         eth0_pins: eth0 {
0139                 pinmux = <RZA2_PINMUX(PORTE, 0, 7)>, /* REF50CK0 */
0140                          <RZA2_PINMUX(PORT6, 1, 7)>, /* RMMI0_TXDEN */
0141                          <RZA2_PINMUX(PORT6, 2, 7)>, /* RMII0_TXD0 */
0142                          <RZA2_PINMUX(PORT6, 3, 7)>, /* RMII0_TXD1 */
0143                          <RZA2_PINMUX(PORTE, 4, 7)>, /* RMII0_CRSDV */
0144                          <RZA2_PINMUX(PORTE, 1, 7)>, /* RMII0_RXD0 */
0145                          <RZA2_PINMUX(PORTE, 2, 7)>, /* RMII0_RXD1 */
0146                          <RZA2_PINMUX(PORTE, 3, 7)>, /* RMII0_RXER */
0147                          <RZA2_PINMUX(PORTE, 5, 1)>, /* ET0_MDC */
0148                          <RZA2_PINMUX(PORTE, 6, 1)>, /* ET0_MDIO */
0149                          <RZA2_PINMUX(PORTL, 0, 5)>; /* IRQ4 */
0150         };
0151 
0152         eth1_pins: eth1 {
0153                 pinmux = <RZA2_PINMUX(PORTK, 3, 7)>, /* REF50CK1 */
0154                          <RZA2_PINMUX(PORTK, 0, 7)>, /* RMMI1_TXDEN */
0155                          <RZA2_PINMUX(PORTK, 1, 7)>, /* RMII1_TXD0 */
0156                          <RZA2_PINMUX(PORTK, 2, 7)>, /* RMII1_TXD1 */
0157                          <RZA2_PINMUX(PORT3, 2, 7)>, /* RMII1_CRSDV */
0158                          <RZA2_PINMUX(PORTK, 4, 7)>, /* RMII1_RXD0 */
0159                          <RZA2_PINMUX(PORT3, 5, 7)>, /* RMII1_RXD1 */
0160                          <RZA2_PINMUX(PORT3, 1, 7)>, /* RMII1_RXER */
0161                          <RZA2_PINMUX(PORT3, 3, 1)>, /* ET1_MDC */
0162                          <RZA2_PINMUX(PORT3, 4, 1)>, /* ET1_MDIO */
0163                          <RZA2_PINMUX(PORTL, 1, 5)>; /* IRQ5 */
0164         };
0165 
0166         i2c3_pins: i2c3 {
0167                 pinmux = <RZA2_PINMUX(PORTD, 6, 1)>,    /* RIIC3SCL */
0168                          <RZA2_PINMUX(PORTD, 7, 1)>;    /* RIIC3SDA */
0169         };
0170 
0171         keyboard_pins: keyboard {
0172                 pinmux = <RZA2_PINMUX(PORTJ, 1, 6)>;    /* IRQ0 */
0173         };
0174 
0175         /* Serial Console */
0176         scif2_pins: serial2 {
0177                 pinmux = <RZA2_PINMUX(PORTE, 2, 3)>,    /* TxD2 */
0178                          <RZA2_PINMUX(PORTE, 1, 3)>;    /* RxD2 */
0179         };
0180 
0181         sdhi0_pins: sdhi0 {
0182                 pinmux = <RZA2_PINMUX(PORT5, 0, 3)>,    /* SD0_CD */
0183                          <RZA2_PINMUX(PORT5, 1, 3)>;    /* SD0_WP */
0184         };
0185 
0186         sdhi1_pins: sdhi1 {
0187                 pinmux = <RZA2_PINMUX(PORT5, 4, 3)>,    /* SD1_CD */
0188                          <RZA2_PINMUX(PORT5, 5, 3)>;    /* SD1_WP */
0189         };
0190 
0191         usb0_pins: usb0 {
0192                 pinmux = <RZA2_PINMUX(PORT5, 2, 3)>,    /* VBUSIN0 */
0193                          <RZA2_PINMUX(PORTC, 6, 1)>,    /* VBUSEN0 */
0194                          <RZA2_PINMUX(PORTC, 7, 1)>;    /* OVRCUR0 */
0195         };
0196 
0197         usb1_pins: usb1 {
0198                 pinmux = <RZA2_PINMUX(PORTC, 0, 1)>,    /* VBUSIN1 */
0199                          <RZA2_PINMUX(PORTC, 5, 1)>;    /* VBUSEN1 */
0200         };
0201 };
0202 
0203 /* RTC_X1 */
0204 &rtc_x1_clk {
0205         clock-frequency = <32768>;
0206 };
0207 
0208 /* Serial Console */
0209 &scif2 {
0210         pinctrl-names = "default";
0211         pinctrl-0 = <&scif2_pins>;
0212 
0213         status = "okay";
0214 };
0215 
0216 &sdhi0 {
0217         pinctrl-names = "default";
0218         pinctrl-0 = <&sdhi0_pins>;
0219         bus-width = <4>;
0220         status = "okay";
0221 };
0222 
0223 &sdhi1 {
0224         pinctrl-names = "default";
0225         pinctrl-0 = <&sdhi1_pins>;
0226         bus-width = <4>;
0227         status = "okay";
0228 };
0229 
0230 /* USB-0 as Host */
0231 &usb2_phy0 {
0232         pinctrl-names = "default";
0233         pinctrl-0 = <&usb0_pins>;
0234         dr_mode = "host";       /* Requires JP3 to be fitted */
0235         status = "okay";
0236 };
0237 
0238 /* USB-1 as Host */
0239 &usb2_phy1 {
0240         pinctrl-names = "default";
0241         pinctrl-0 = <&usb1_pins>;
0242         dr_mode = "host";
0243         status = "okay";
0244 };
0245 
0246 /* USB_X1 */
0247 &usb_x1_clk {
0248         clock-frequency = <48000000>;
0249 };